diff --git a/.env.example b/.env.example index 944da2aa9296..f398a72aa0af 100644 --- a/.env.example +++ b/.env.example @@ -28,3 +28,7 @@ EXPENSIFY_ACCOUNT_ID_RECEIPTS=-1 EXPENSIFY_ACCOUNT_ID_REWARDS=-1 EXPENSIFY_ACCOUNT_ID_STUDENT_AMBASSADOR=-1 EXPENSIFY_ACCOUNT_ID_SVFG=-1 + +FB_API_KEY=YOUR_API_KEY +FB_APP_ID=YOUR_APP_ID +FB_PROJECT_ID=YOUR_PROJECT_ID diff --git a/.env.production b/.env.production index 5e676134d681..bb925eb70d39 100644 --- a/.env.production +++ b/.env.production @@ -7,3 +7,7 @@ PUSHER_APP_KEY=268df511a204fbb60884 USE_WEB_PROXY=false ENVIRONMENT=production SEND_CRASH_REPORTS=true + +FB_API_KEY=AIzaSyDxzigVLZl4G8MP7jACQ0qpmADMzmrrON0 +FB_APP_ID=1:921154746561:web:1583e882584cf151027c40 +FB_PROJECT_ID=expensify-chat diff --git a/.github/actions/javascript/authorChecklist/index.js b/.github/actions/javascript/authorChecklist/index.js index 612a2457d630..e09b95d572ff 100644 --- a/.github/actions/javascript/authorChecklist/index.js +++ b/.github/actions/javascript/authorChecklist/index.js @@ -18153,12 +18153,6 @@ class Buffer { if (!this._map) return; this._normalizePosition(prop, loc, columnOffset); } - withSource(prop, loc, cb) { - if (this._map) { - this.source(prop, loc); - } - cb(); - } _normalizePosition(prop, loc, columnOffset) { const pos = loc[prop]; const target = this._sourcePosition; @@ -18218,9 +18212,9 @@ exports.Placeholder = Placeholder; exports.Program = Program; function File(node) { if (node.program) { - this.print(node.program.interpreter, node); + this.print(node.program.interpreter); } - this.print(node.program, node); + this.print(node.program); } function Program(node) { var _node$directives; @@ -18230,14 +18224,14 @@ function Program(node) { if (directivesLen) { var _node$directives$trai; const newline = node.body.length ? 2 : 1; - this.printSequence(node.directives, node, { + this.printSequence(node.directives, { trailingCommentsLineOffset: newline }); if (!((_node$directives$trai = node.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai.length)) { this.newline(newline); } } - this.printSequence(node.body, node); + this.printSequence(node.body); } function BlockStatement(node) { var _node$directives2; @@ -18246,7 +18240,7 @@ function BlockStatement(node) { if (directivesLen) { var _node$directives$trai2; const newline = node.body.length ? 2 : 1; - this.printSequence(node.directives, node, { + this.printSequence(node.directives, { indent: true, trailingCommentsLineOffset: newline }); @@ -18254,13 +18248,15 @@ function BlockStatement(node) { this.newline(newline); } } - this.printSequence(node.body, node, { + const exit = this.enterForStatementInit(false); + this.printSequence(node.body, { indent: true }); + exit(); this.rightBrace(node); } function Directive(node) { - this.print(node.value, node); + this.print(node.value); this.semicolon(); } const unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/; @@ -18326,7 +18322,7 @@ const { function ClassDeclaration(node, parent) { const inExport = isExportDefaultDeclaration(parent) || isExportNamedDeclaration(parent); if (!inExport || !this._shouldPrintDecoratorsBeforeExport(parent)) { - this.printJoin(node.decorators, node); + this.printJoin(node.decorators); } if (node.declare) { this.word("declare"); @@ -18339,24 +18335,24 @@ function ClassDeclaration(node, parent) { this.word("class"); if (node.id) { this.space(); - this.print(node.id, node); + this.print(node.id); } - this.print(node.typeParameters, node); + this.print(node.typeParameters); if (node.superClass) { this.space(); this.word("extends"); this.space(); - this.print(node.superClass, node); - this.print(node.superTypeParameters, node); + this.print(node.superClass); + this.print(node.superTypeParameters); } if (node.implements) { this.space(); this.word("implements"); this.space(); - this.printList(node.implements, node); + this.printList(node.implements); } this.space(); - this.print(node.body, node); + this.print(node.body); } function ClassBody(node) { this.tokenChar(123); @@ -18364,26 +18360,28 @@ function ClassBody(node) { this.tokenChar(125); } else { this.newline(); - this.printSequence(node.body, node, { + const exit = this.enterForStatementInit(false); + this.printSequence(node.body, { indent: true }); + exit(); if (!this.endsWith(10)) this.newline(); this.rightBrace(node); } } function ClassProperty(node) { var _node$key$loc; - this.printJoin(node.decorators, node); + this.printJoin(node.decorators); const endLine = (_node$key$loc = node.key.loc) == null || (_node$key$loc = _node$key$loc.end) == null ? void 0 : _node$key$loc.line; if (endLine) this.catchUp(endLine); this.tsPrintClassMemberModifiers(node); if (node.computed) { this.tokenChar(91); - this.print(node.key, node); + this.print(node.key); this.tokenChar(93); } else { this._variance(node); - this.print(node.key, node); + this.print(node.key); } if (node.optional) { this.tokenChar(63); @@ -18391,18 +18389,18 @@ function ClassProperty(node) { if (node.definite) { this.tokenChar(33); } - this.print(node.typeAnnotation, node); + this.print(node.typeAnnotation); if (node.value) { this.space(); this.tokenChar(61); this.space(); - this.print(node.value, node); + this.print(node.value); } this.semicolon(); } function ClassAccessorProperty(node) { var _node$key$loc2; - this.printJoin(node.decorators, node); + this.printJoin(node.decorators); const endLine = (_node$key$loc2 = node.key.loc) == null || (_node$key$loc2 = _node$key$loc2.end) == null ? void 0 : _node$key$loc2.line; if (endLine) this.catchUp(endLine); this.tsPrintClassMemberModifiers(node); @@ -18410,11 +18408,11 @@ function ClassAccessorProperty(node) { this.space(); if (node.computed) { this.tokenChar(91); - this.print(node.key, node); + this.print(node.key); this.tokenChar(93); } else { this._variance(node); - this.print(node.key, node); + this.print(node.key); } if (node.optional) { this.tokenChar(63); @@ -18422,44 +18420,44 @@ function ClassAccessorProperty(node) { if (node.definite) { this.tokenChar(33); } - this.print(node.typeAnnotation, node); + this.print(node.typeAnnotation); if (node.value) { this.space(); this.tokenChar(61); this.space(); - this.print(node.value, node); + this.print(node.value); } this.semicolon(); } function ClassPrivateProperty(node) { - this.printJoin(node.decorators, node); + this.printJoin(node.decorators); if (node.static) { this.word("static"); this.space(); } - this.print(node.key, node); - this.print(node.typeAnnotation, node); + this.print(node.key); + this.print(node.typeAnnotation); if (node.value) { this.space(); this.tokenChar(61); this.space(); - this.print(node.value, node); + this.print(node.value); } this.semicolon(); } function ClassMethod(node) { this._classMethodHead(node); this.space(); - this.print(node.body, node); + this.print(node.body); } function ClassPrivateMethod(node) { this._classMethodHead(node); this.space(); - this.print(node.body, node); + this.print(node.body); } function _classMethodHead(node) { var _node$key$loc3; - this.printJoin(node.decorators, node); + this.printJoin(node.decorators); const endLine = (_node$key$loc3 = node.key.loc) == null || (_node$key$loc3 = _node$key$loc3.end) == null ? void 0 : _node$key$loc3.line; if (endLine) this.catchUp(endLine); this.tsPrintClassMemberModifiers(node); @@ -18473,7 +18471,7 @@ function StaticBlock(node) { this.tokenChar(125); } else { this.newline(); - this.printSequence(node.body, node, { + this.printSequence(node.body, { indent: true }); this.rightBrace(node); @@ -18522,7 +18520,7 @@ exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier; exports.YieldExpression = YieldExpression; exports._shouldPrintDecoratorsBeforeExport = _shouldPrintDecoratorsBeforeExport; var _t = __nccwpck_require__(7912); -var n = __nccwpck_require__(9223); +var _index = __nccwpck_require__(9223); const { isCallExpression, isLiteral, @@ -18539,7 +18537,7 @@ function UnaryExpression(node) { } else { this.token(operator); } - this.print(node.argument, node); + this.print(node.argument); } function DoExpression(node) { if (node.async) { @@ -18548,53 +18546,55 @@ function DoExpression(node) { } this.word("do"); this.space(); - this.print(node.body, node); + this.print(node.body); } function ParenthesizedExpression(node) { this.tokenChar(40); - this.print(node.expression, node); + this.print(node.expression); this.rightParens(node); } function UpdateExpression(node) { if (node.prefix) { this.token(node.operator); - this.print(node.argument, node); + this.print(node.argument); } else { - this.printTerminatorless(node.argument, node, true); + this.printTerminatorless(node.argument, true); this.token(node.operator); } } function ConditionalExpression(node) { - this.print(node.test, node); + this.print(node.test); this.space(); this.tokenChar(63); this.space(); - this.print(node.consequent, node); + this.print(node.consequent); this.space(); this.tokenChar(58); this.space(); - this.print(node.alternate, node); + this.print(node.alternate); } function NewExpression(node, parent) { this.word("new"); this.space(); - this.print(node.callee, node); + this.print(node.callee); if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression(parent, { callee: node }) && !isMemberExpression(parent) && !isNewExpression(parent)) { return; } - this.print(node.typeArguments, node); - this.print(node.typeParameters, node); + this.print(node.typeArguments); + this.print(node.typeParameters); if (node.optional) { this.token("?."); } this.tokenChar(40); - this.printList(node.arguments, node); + const exit = this.enterForStatementInit(false); + this.printList(node.arguments); + exit(); this.rightParens(node); } function SequenceExpression(node) { - this.printList(node.expressions, node); + this.printList(node.expressions); } function ThisExpression() { this.word("this"); @@ -18602,22 +18602,6 @@ function ThisExpression() { function Super() { this.word("super"); } -function isDecoratorMemberExpression(node) { - switch (node.type) { - case "Identifier": - return true; - case "MemberExpression": - return !node.computed && node.property.type === "Identifier" && isDecoratorMemberExpression(node.object); - default: - return false; - } -} -function shouldParenthesizeDecoratorExpression(node) { - if (node.type === "ParenthesizedExpression") { - return false; - } - return !isDecoratorMemberExpression(node.type === "CallExpression" ? node.callee : node); -} function _shouldPrintDecoratorsBeforeExport(node) { if (typeof this.format.decoratorsBeforeExport === "boolean") { return this.format.decoratorsBeforeExport; @@ -18626,16 +18610,7 @@ function _shouldPrintDecoratorsBeforeExport(node) { } function Decorator(node) { this.tokenChar(64); - const { - expression - } = node; - if (shouldParenthesizeDecoratorExpression(expression)) { - this.tokenChar(40); - this.print(expression, node); - this.tokenChar(41); - } else { - this.print(expression, node); - } + this.print(node.expression); this.newline(); } function OptionalMemberExpression(node) { @@ -18646,7 +18621,7 @@ function OptionalMemberExpression(node) { optional, property } = node; - this.print(node.object, node); + this.print(node.object); if (!computed && isMemberExpression(property)) { throw new TypeError("Got a MemberExpression for MemberExpression property"); } @@ -18658,32 +18633,36 @@ function OptionalMemberExpression(node) { } if (computed) { this.tokenChar(91); - this.print(property, node); + this.print(property); this.tokenChar(93); } else { if (!optional) { this.tokenChar(46); } - this.print(property, node); + this.print(property); } } function OptionalCallExpression(node) { - this.print(node.callee, node); - this.print(node.typeParameters, node); + this.print(node.callee); + this.print(node.typeParameters); if (node.optional) { this.token("?."); } - this.print(node.typeArguments, node); + this.print(node.typeArguments); this.tokenChar(40); - this.printList(node.arguments, node); + const exit = this.enterForStatementInit(false); + this.printList(node.arguments); + exit(); this.rightParens(node); } function CallExpression(node) { - this.print(node.callee, node); - this.print(node.typeArguments, node); - this.print(node.typeParameters, node); + this.print(node.callee); + this.print(node.typeArguments); + this.print(node.typeParameters); this.tokenChar(40); - this.printList(node.arguments, node); + const exit = this.enterForStatementInit(false); + this.printList(node.arguments); + exit(); this.rightParens(node); } function Import() { @@ -18693,7 +18672,7 @@ function AwaitExpression(node) { this.word("await"); if (node.argument) { this.space(); - this.printTerminatorless(node.argument, node, false); + this.printTerminatorless(node.argument, false); } } function YieldExpression(node) { @@ -18702,12 +18681,12 @@ function YieldExpression(node) { this.tokenChar(42); if (node.argument) { this.space(); - this.print(node.argument, node); + this.print(node.argument); } } else { if (node.argument) { this.space(); - this.printTerminatorless(node.argument, node, false); + this.printTerminatorless(node.argument, false); } } } @@ -18715,43 +18694,40 @@ function EmptyStatement() { this.semicolon(true); } function ExpressionStatement(node) { - this.print(node.expression, node); + this.tokenContext |= _index.TokenContext.expressionStatement; + this.print(node.expression); this.semicolon(); } function AssignmentPattern(node) { - this.print(node.left, node); - if (node.left.optional) this.tokenChar(63); - this.print(node.left.typeAnnotation, node); + this.print(node.left); + if (node.left.type === "Identifier") { + if (node.left.optional) this.tokenChar(63); + this.print(node.left.typeAnnotation); + } this.space(); this.tokenChar(61); this.space(); - this.print(node.right, node); + this.print(node.right); } -function AssignmentExpression(node, parent) { - const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent); - if (parens) { - this.tokenChar(40); - } - this.print(node.left, node); +function AssignmentExpression(node) { + this.print(node.left); this.space(); if (node.operator === "in" || node.operator === "instanceof") { this.word(node.operator); } else { this.token(node.operator); + this._endsWithDiv = node.operator === "/"; } this.space(); - this.print(node.right, node); - if (parens) { - this.tokenChar(41); - } + this.print(node.right); } function BindExpression(node) { - this.print(node.object, node); + this.print(node.object); this.token("::"); - this.print(node.callee, node); + this.print(node.callee); } function MemberExpression(node) { - this.print(node.object, node); + this.print(node.object); if (!node.computed && isMemberExpression(node.property)) { throw new TypeError("Got a MemberExpression for MemberExpression property"); } @@ -18760,22 +18736,24 @@ function MemberExpression(node) { computed = true; } if (computed) { + const exit = this.enterForStatementInit(false); this.tokenChar(91); - this.print(node.property, node); + this.print(node.property); this.tokenChar(93); + exit(); } else { this.tokenChar(46); - this.print(node.property, node); + this.print(node.property); } } function MetaProperty(node) { - this.print(node.meta, node); + this.print(node.meta); this.tokenChar(46); - this.print(node.property, node); + this.print(node.property); } function PrivateName(node) { this.tokenChar(35); - this.print(node.id, node); + this.print(node.id); } function V8IntrinsicIdentifier(node) { this.tokenChar(37); @@ -18792,7 +18770,7 @@ function ModuleExpression(node) { if (body.body.length || body.directives.length) { this.newline(); } - this.print(body, node); + this.print(body); this.dedent(); this.rightBrace(node); } @@ -18887,6 +18865,7 @@ exports._interfaceish = _interfaceish; exports._variance = _variance; var _t = __nccwpck_require__(7912); var _modules = __nccwpck_require__(319); +var _index = __nccwpck_require__(9223); var _types2 = __nccwpck_require__(3817); const { isDeclareExportDeclaration, @@ -18896,7 +18875,7 @@ function AnyTypeAnnotation() { this.word("any"); } function ArrayTypeAnnotation(node) { - this.print(node.elementType, node, true); + this.print(node.elementType, true); this.tokenChar(91); this.tokenChar(93); } @@ -18925,11 +18904,11 @@ function DeclareFunction(node, parent) { } this.word("function"); this.space(); - this.print(node.id, node); - this.print(node.id.typeAnnotation.typeAnnotation, node); + this.print(node.id); + this.print(node.id.typeAnnotation.typeAnnotation); if (node.predicate) { this.space(); - this.print(node.predicate, node); + this.print(node.predicate); } this.semicolon(); } @@ -18941,7 +18920,7 @@ function DeclaredPredicate(node) { this.tokenChar(37); this.word("checks"); this.tokenChar(40); - this.print(node.value, node); + this.print(node.value); this.tokenChar(41); } function DeclareInterface(node) { @@ -18954,9 +18933,9 @@ function DeclareModule(node) { this.space(); this.word("module"); this.space(); - this.print(node.id, node); + this.print(node.id); this.space(); - this.print(node.body, node); + this.print(node.body); } function DeclareModuleExports(node) { this.word("declare"); @@ -18964,7 +18943,7 @@ function DeclareModuleExports(node) { this.word("module"); this.tokenChar(46); this.word("exports"); - this.print(node.typeAnnotation, node); + this.print(node.typeAnnotation); } function DeclareTypeAlias(node) { this.word("declare"); @@ -18985,8 +18964,8 @@ function DeclareVariable(node, parent) { } this.word("var"); this.space(); - this.print(node.id, node); - this.print(node.id.typeAnnotation, node); + this.print(node.id); + this.print(node.id.typeAnnotation); this.semicolon(); } function DeclareExportDeclaration(node) { @@ -19012,8 +18991,8 @@ function EnumDeclaration(node) { } = node; this.word("enum"); this.space(); - this.print(id, node); - this.print(body, node); + this.print(id); + this.print(body); } function enumExplicitType(context, name, hasExplicitType) { if (hasExplicitType) { @@ -19032,7 +19011,7 @@ function enumBody(context, node) { context.indent(); context.newline(); for (const member of members) { - context.print(member, node); + context.print(member); context.newline(); } if (node.hasUnknownMembers) { @@ -19071,19 +19050,15 @@ function EnumDefaultedMember(node) { const { id } = node; - this.print(id, node); + this.print(id); this.tokenChar(44); } function enumInitializedMember(context, node) { - const { - id, - init - } = node; - context.print(id, node); + context.print(node.id); context.space(); context.token("="); context.space(); - context.print(init, node); + context.print(node.init); context.token(","); } function EnumBooleanMember(node) { @@ -19098,13 +19073,13 @@ function EnumStringMember(node) { function FlowExportDeclaration(node) { if (node.declaration) { const declar = node.declaration; - this.print(declar, node); + this.print(declar); if (!isStatement(declar)) this.semicolon(); } else { this.tokenChar(123); if (node.specifiers.length) { this.space(); - this.printList(node.specifiers, node); + this.printList(node.specifiers); this.space(); } this.tokenChar(125); @@ -19112,7 +19087,7 @@ function FlowExportDeclaration(node) { this.space(); this.word("from"); this.space(); - this.print(node.source, node); + this.print(node.source); } this.semicolon(); } @@ -19121,26 +19096,26 @@ function ExistsTypeAnnotation() { this.tokenChar(42); } function FunctionTypeAnnotation(node, parent) { - this.print(node.typeParameters, node); + this.print(node.typeParameters); this.tokenChar(40); if (node.this) { this.word("this"); this.tokenChar(58); this.space(); - this.print(node.this.typeAnnotation, node); + this.print(node.this.typeAnnotation); if (node.params.length || node.rest) { this.tokenChar(44); this.space(); } } - this.printList(node.params, node); + this.printList(node.params); if (node.rest) { if (node.params.length) { this.tokenChar(44); this.space(); } this.token("..."); - this.print(node.rest, node); + this.print(node.rest); } this.tokenChar(41); const type = parent == null ? void 0 : parent.type; @@ -19151,30 +19126,30 @@ function FunctionTypeAnnotation(node, parent) { this.token("=>"); } this.space(); - this.print(node.returnType, node); + this.print(node.returnType); } function FunctionTypeParam(node) { - this.print(node.name, node); + this.print(node.name); if (node.optional) this.tokenChar(63); if (node.name) { this.tokenChar(58); this.space(); } - this.print(node.typeAnnotation, node); + this.print(node.typeAnnotation); } function InterfaceExtends(node) { - this.print(node.id, node); - this.print(node.typeParameters, node, true); + this.print(node.id); + this.print(node.typeParameters, true); } function _interfaceish(node) { var _node$extends; - this.print(node.id, node); - this.print(node.typeParameters, node); + this.print(node.id); + this.print(node.typeParameters); if ((_node$extends = node.extends) != null && _node$extends.length) { this.space(); this.word("extends"); this.space(); - this.printList(node.extends, node); + this.printList(node.extends); } if (node.type === "DeclareClass") { var _node$mixins, _node$implements; @@ -19182,17 +19157,17 @@ function _interfaceish(node) { this.space(); this.word("mixins"); this.space(); - this.printList(node.mixins, node); + this.printList(node.mixins); } if ((_node$implements = node.implements) != null && _node$implements.length) { this.space(); this.word("implements"); this.space(); - this.printList(node.implements, node); + this.printList(node.implements); } } this.space(); - this.print(node.body, node); + this.print(node.body); } function _variance(node) { var _node$variance; @@ -19222,13 +19197,13 @@ function InterfaceTypeAnnotation(node) { this.space(); this.word("extends"); this.space(); - this.printList(node.extends, node); + this.printList(node.extends); } this.space(); - this.print(node.body, node); + this.print(node.body); } function IntersectionTypeAnnotation(node) { - this.printJoin(node.types, node, { + this.printJoin(node.types, { separator: andSeparator }); } @@ -19240,7 +19215,7 @@ function EmptyTypeAnnotation() { } function NullableTypeAnnotation(node) { this.tokenChar(63); - this.print(node.typeAnnotation, node); + this.print(node.typeAnnotation); } function NumberTypeAnnotation() { this.word("number"); @@ -19253,47 +19228,51 @@ function ThisTypeAnnotation() { } function TupleTypeAnnotation(node) { this.tokenChar(91); - this.printList(node.types, node); + this.printList(node.types); this.tokenChar(93); } function TypeofTypeAnnotation(node) { this.word("typeof"); this.space(); - this.print(node.argument, node); + this.print(node.argument); } function TypeAlias(node) { this.word("type"); this.space(); - this.print(node.id, node); - this.print(node.typeParameters, node); + this.print(node.id); + this.print(node.typeParameters); this.space(); this.tokenChar(61); this.space(); - this.print(node.right, node); + this.print(node.right); this.semicolon(); } -function TypeAnnotation(node) { +function TypeAnnotation(node, parent) { this.tokenChar(58); this.space(); - if (node.optional) this.tokenChar(63); - this.print(node.typeAnnotation, node); + if (parent.type === "ArrowFunctionExpression") { + this.tokenContext |= _index.TokenContext.arrowFlowReturnType; + } else if (node.optional) { + this.tokenChar(63); + } + this.print(node.typeAnnotation); } function TypeParameterInstantiation(node) { this.tokenChar(60); - this.printList(node.params, node, {}); + this.printList(node.params, {}); this.tokenChar(62); } function TypeParameter(node) { this._variance(node); this.word(node.name); if (node.bound) { - this.print(node.bound, node); + this.print(node.bound); } if (node.default) { this.space(); this.tokenChar(61); this.space(); - this.print(node.default, node); + this.print(node.default); } } function OpaqueType(node) { @@ -19301,18 +19280,18 @@ function OpaqueType(node) { this.space(); this.word("type"); this.space(); - this.print(node.id, node); - this.print(node.typeParameters, node); + this.print(node.id); + this.print(node.typeParameters); if (node.supertype) { this.tokenChar(58); this.space(); - this.print(node.supertype, node); + this.print(node.supertype); } if (node.impltype) { this.space(); this.tokenChar(61); this.space(); - this.print(node.impltype, node); + this.print(node.impltype); } this.semicolon(); } @@ -19326,7 +19305,7 @@ function ObjectTypeAnnotation(node) { if (props.length) { this.newline(); this.space(); - this.printJoin(props, node, { + this.printJoin(props, { addNewlines(leading) { if (leading && !props[0]) return 1; }, @@ -19362,7 +19341,7 @@ function ObjectTypeInternalSlot(node) { } this.tokenChar(91); this.tokenChar(91); - this.print(node.id, node); + this.print(node.id); this.tokenChar(93); this.tokenChar(93); if (node.optional) this.tokenChar(63); @@ -19370,14 +19349,14 @@ function ObjectTypeInternalSlot(node) { this.tokenChar(58); this.space(); } - this.print(node.value, node); + this.print(node.value); } function ObjectTypeCallProperty(node) { if (node.static) { this.word("static"); this.space(); } - this.print(node.value, node); + this.print(node.value); } function ObjectTypeIndexer(node) { if (node.static) { @@ -19387,15 +19366,15 @@ function ObjectTypeIndexer(node) { this._variance(node); this.tokenChar(91); if (node.id) { - this.print(node.id, node); + this.print(node.id); this.tokenChar(58); this.space(); } - this.print(node.key, node); + this.print(node.key); this.tokenChar(93); this.tokenChar(58); this.space(); - this.print(node.value, node); + this.print(node.value); } function ObjectTypeProperty(node) { if (node.proto) { @@ -19411,22 +19390,22 @@ function ObjectTypeProperty(node) { this.space(); } this._variance(node); - this.print(node.key, node); + this.print(node.key); if (node.optional) this.tokenChar(63); if (!node.method) { this.tokenChar(58); this.space(); } - this.print(node.value, node); + this.print(node.value); } function ObjectTypeSpreadProperty(node) { this.token("..."); - this.print(node.argument, node); + this.print(node.argument); } function QualifiedTypeIdentifier(node) { - this.print(node.qualification, node); + this.print(node.qualification); this.tokenChar(46); - this.print(node.id, node); + this.print(node.id); } function SymbolTypeAnnotation() { this.word("symbol"); @@ -19437,14 +19416,14 @@ function orSeparator() { this.space(); } function UnionTypeAnnotation(node) { - this.printJoin(node.types, node, { + this.printJoin(node.types, { separator: orSeparator }); } function TypeCastExpression(node) { this.tokenChar(40); - this.print(node.expression, node); - this.print(node.typeAnnotation, node); + this.print(node.expression); + this.print(node.typeAnnotation); this.tokenChar(41); } function Variance(node) { @@ -19458,18 +19437,18 @@ function VoidTypeAnnotation() { this.word("void"); } function IndexedAccessType(node) { - this.print(node.objectType, node, true); + this.print(node.objectType, true); this.tokenChar(91); - this.print(node.indexType, node); + this.print(node.indexType); this.tokenChar(93); } function OptionalIndexedAccessType(node) { - this.print(node.objectType, node); + this.print(node.objectType); if (node.optional) { this.token("?."); } this.tokenChar(91); - this.print(node.indexType, node); + this.print(node.indexType); this.tokenChar(93); } @@ -19639,41 +19618,41 @@ exports.JSXSpreadAttribute = JSXSpreadAttribute; exports.JSXSpreadChild = JSXSpreadChild; exports.JSXText = JSXText; function JSXAttribute(node) { - this.print(node.name, node); + this.print(node.name); if (node.value) { this.tokenChar(61); - this.print(node.value, node); + this.print(node.value); } } function JSXIdentifier(node) { this.word(node.name); } function JSXNamespacedName(node) { - this.print(node.namespace, node); + this.print(node.namespace); this.tokenChar(58); - this.print(node.name, node); + this.print(node.name); } function JSXMemberExpression(node) { - this.print(node.object, node); + this.print(node.object); this.tokenChar(46); - this.print(node.property, node); + this.print(node.property); } function JSXSpreadAttribute(node) { this.tokenChar(123); this.token("..."); - this.print(node.argument, node); - this.tokenChar(125); + this.print(node.argument); + this.rightBrace(node); } function JSXExpressionContainer(node) { this.tokenChar(123); - this.print(node.expression, node); - this.tokenChar(125); + this.print(node.expression); + this.rightBrace(node); } function JSXSpreadChild(node) { this.tokenChar(123); this.token("..."); - this.print(node.expression, node); - this.tokenChar(125); + this.print(node.expression); + this.rightBrace(node); } function JSXText(node) { const raw = this.getPossibleRaw(node); @@ -19685,25 +19664,25 @@ function JSXText(node) { } function JSXElement(node) { const open = node.openingElement; - this.print(open, node); + this.print(open); if (open.selfClosing) return; this.indent(); for (const child of node.children) { - this.print(child, node); + this.print(child); } this.dedent(); - this.print(node.closingElement, node); + this.print(node.closingElement); } function spaceSeparator() { this.space(); } function JSXOpeningElement(node) { this.tokenChar(60); - this.print(node.name, node); - this.print(node.typeParameters, node); + this.print(node.name); + this.print(node.typeParameters); if (node.attributes.length > 0) { this.space(); - this.printJoin(node.attributes, node, { + this.printJoin(node.attributes, { separator: spaceSeparator }); } @@ -19716,20 +19695,20 @@ function JSXOpeningElement(node) { } function JSXClosingElement(node) { this.token(""); this.space(); - this.print(node.body, node); + this.tokenContext |= _index.TokenContext.arrowBody; + this.print(node.body); } function hasTypesOrComments(node, param) { var _param$leadingComment, _param$trailingCommen; @@ -19949,6 +19932,7 @@ exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; exports.ImportSpecifier = ImportSpecifier; exports._printAttributes = _printAttributes; var _t = __nccwpck_require__(7912); +var _index = __nccwpck_require__(9223); const { isClassDeclaration, isExportDefaultSpecifier, @@ -19962,31 +19946,31 @@ function ImportSpecifier(node) { this.word(node.importKind); this.space(); } - this.print(node.imported, node); + this.print(node.imported); if (node.local && node.local.name !== node.imported.name) { this.space(); this.word("as"); this.space(); - this.print(node.local, node); + this.print(node.local); } } function ImportDefaultSpecifier(node) { - this.print(node.local, node); + this.print(node.local); } function ExportDefaultSpecifier(node) { - this.print(node.exported, node); + this.print(node.exported); } function ExportSpecifier(node) { if (node.exportKind === "type") { this.word("type"); this.space(); } - this.print(node.local, node); + this.print(node.local); if (node.exported && node.local.name !== node.exported.name) { this.space(); this.word("as"); this.space(); - this.print(node.exported, node); + this.print(node.exported); } } function ExportNamespaceSpecifier(node) { @@ -19994,7 +19978,7 @@ function ExportNamespaceSpecifier(node) { this.space(); this.word("as"); this.space(); - this.print(node.exported, node); + this.print(node.exported); } let warningShown = false; function _printAttributes(node) { @@ -20019,12 +20003,12 @@ Please specify the "importAttributesKeyword" generator option, whose value can b this.word(useAssertKeyword ? "assert" : "with"); this.space(); if (!useAssertKeyword && importAttributesKeyword !== "with") { - this.printList(attributes || assertions, node); + this.printList(attributes || assertions); return; } this.tokenChar(123); this.space(); - this.printList(attributes || assertions, node); + this.printList(attributes || assertions); this.space(); this.tokenChar(125); } @@ -20041,17 +20025,17 @@ function ExportAllDeclaration(node) { this.word("from"); this.space(); if ((_node$attributes = node.attributes) != null && _node$attributes.length || (_node$assertions = node.assertions) != null && _node$assertions.length) { - this.print(node.source, node, true); + this.print(node.source, true); this.space(); this._printAttributes(node); } else { - this.print(node.source, node); + this.print(node.source); } this.semicolon(); } function maybePrintDecoratorsBeforeExport(printer, node) { if (isClassDeclaration(node.declaration) && printer._shouldPrintDecoratorsBeforeExport(node)) { - printer.printJoin(node.declaration.decorators, node); + printer.printJoin(node.declaration.decorators); } } function ExportNamedDeclaration(node) { @@ -20060,7 +20044,7 @@ function ExportNamedDeclaration(node) { this.space(); if (node.declaration) { const declar = node.declaration; - this.print(declar, node); + this.print(declar); if (!isStatement(declar)) this.semicolon(); } else { if (node.exportKind === "type") { @@ -20073,7 +20057,7 @@ function ExportNamedDeclaration(node) { const first = specifiers[0]; if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) { hasSpecial = true; - this.print(specifiers.shift(), node); + this.print(specifiers.shift()); if (specifiers.length) { this.tokenChar(44); this.space(); @@ -20086,7 +20070,7 @@ function ExportNamedDeclaration(node) { this.tokenChar(123); if (specifiers.length) { this.space(); - this.printList(specifiers, node); + this.printList(specifiers); this.space(); } this.tokenChar(125); @@ -20097,11 +20081,11 @@ function ExportNamedDeclaration(node) { this.word("from"); this.space(); if ((_node$attributes2 = node.attributes) != null && _node$attributes2.length || (_node$assertions2 = node.assertions) != null && _node$assertions2.length) { - this.print(node.source, node, true); + this.print(node.source, true); this.space(); this._printAttributes(node); } else { - this.print(node.source, node); + this.print(node.source); } } this.semicolon(); @@ -20114,8 +20098,9 @@ function ExportDefaultDeclaration(node) { this.space(); this.word("default"); this.space(); + this.tokenContext |= _index.TokenContext.exportDefault; const declar = node.declaration; - this.print(declar, node); + this.print(declar); if (!isStatement(declar)) this.semicolon(); } function ImportDeclaration(node) { @@ -20141,7 +20126,7 @@ function ImportDeclaration(node) { while (hasSpecifiers) { const first = specifiers[0]; if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) { - this.print(specifiers.shift(), node); + this.print(specifiers.shift()); if (specifiers.length) { this.tokenChar(44); this.space(); @@ -20153,7 +20138,7 @@ function ImportDeclaration(node) { if (specifiers.length) { this.tokenChar(123); this.space(); - this.printList(specifiers, node); + this.printList(specifiers); this.space(); this.tokenChar(125); } else if (isTypeKind && !hasSpecifiers) { @@ -20166,11 +20151,11 @@ function ImportDeclaration(node) { this.space(); } if ((_node$attributes3 = node.attributes) != null && _node$attributes3.length || (_node$assertions3 = node.assertions) != null && _node$assertions3.length) { - this.print(node.source, node, true); + this.print(node.source, true); this.space(); this._printAttributes(node); } else { - this.print(node.source, node); + this.print(node.source); } this.semicolon(); } @@ -20185,7 +20170,7 @@ function ImportNamespaceSpecifier(node) { this.space(); this.word("as"); this.space(); - this.print(node.local, node); + this.print(node.local); } function ImportExpression(node) { this.word("import"); @@ -20194,11 +20179,11 @@ function ImportExpression(node) { this.word(node.phase); } this.tokenChar(40); - this.print(node.source, node); + this.print(node.source); if (node.options != null) { this.tokenChar(44); this.space(); - this.print(node.options, node); + this.print(node.options); } this.tokenChar(41); } @@ -20236,6 +20221,7 @@ exports.VariableDeclarator = VariableDeclarator; exports.WhileStatement = WhileStatement; exports.WithStatement = WithStatement; var _t = __nccwpck_require__(7912); +var _index = __nccwpck_require__(9223); const { isFor, isForStatement, @@ -20246,7 +20232,7 @@ function WithStatement(node) { this.word("with"); this.space(); this.tokenChar(40); - this.print(node.object, node); + this.print(node.object); this.tokenChar(41); this.printBlock(node); } @@ -20254,7 +20240,7 @@ function IfStatement(node) { this.word("if"); this.space(); this.tokenChar(40); - this.print(node.test, node); + this.print(node.test); this.tokenChar(41); this.space(); const needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent)); @@ -20263,7 +20249,7 @@ function IfStatement(node) { this.newline(); this.indent(); } - this.printAndIndentOnComments(node.consequent, node); + this.printAndIndentOnComments(node.consequent); if (needsBlock) { this.dedent(); this.newline(); @@ -20273,7 +20259,7 @@ function IfStatement(node) { if (this.endsWith(125)) this.space(); this.word("else"); this.space(); - this.printAndIndentOnComments(node.alternate, node); + this.printAndIndentOnComments(node.alternate); } } function getLastStatement(statement) { @@ -20289,18 +20275,21 @@ function ForStatement(node) { this.word("for"); this.space(); this.tokenChar(40); - this.inForStatementInitCounter++; - this.print(node.init, node); - this.inForStatementInitCounter--; + { + const exit = this.enterForStatementInit(true); + this.tokenContext |= _index.TokenContext.forHead; + this.print(node.init); + exit(); + } this.tokenChar(59); if (node.test) { this.space(); - this.print(node.test, node); + this.print(node.test); } this.tokenChar(59); if (node.update) { this.space(); - this.print(node.update, node); + this.print(node.update); } this.tokenChar(41); this.printBlock(node); @@ -20309,7 +20298,7 @@ function WhileStatement(node) { this.word("while"); this.space(); this.tokenChar(40); - this.print(node.test, node); + this.print(node.test); this.tokenChar(41); this.printBlock(node); } @@ -20323,11 +20312,16 @@ function ForXStatement(node) { } this.noIndentInnerCommentsHere(); this.tokenChar(40); - this.print(node.left, node); + { + const exit = isForOf ? null : this.enterForStatementInit(true); + this.tokenContext |= isForOf ? _index.TokenContext.forOfHead : _index.TokenContext.forInHead; + this.print(node.left); + exit == null || exit(); + } this.space(); this.word(isForOf ? "of" : "in"); this.space(); - this.print(node.right, node); + this.print(node.right); this.tokenChar(41); this.printBlock(node); } @@ -20336,59 +20330,59 @@ const ForOfStatement = exports.ForOfStatement = ForXStatement; function DoWhileStatement(node) { this.word("do"); this.space(); - this.print(node.body, node); + this.print(node.body); this.space(); this.word("while"); this.space(); this.tokenChar(40); - this.print(node.test, node); + this.print(node.test); this.tokenChar(41); this.semicolon(); } -function printStatementAfterKeyword(printer, node, parent, isLabel) { +function printStatementAfterKeyword(printer, node, isLabel) { if (node) { printer.space(); - printer.printTerminatorless(node, parent, isLabel); + printer.printTerminatorless(node, isLabel); } printer.semicolon(); } function BreakStatement(node) { this.word("break"); - printStatementAfterKeyword(this, node.label, node, true); + printStatementAfterKeyword(this, node.label, true); } function ContinueStatement(node) { this.word("continue"); - printStatementAfterKeyword(this, node.label, node, true); + printStatementAfterKeyword(this, node.label, true); } function ReturnStatement(node) { this.word("return"); - printStatementAfterKeyword(this, node.argument, node, false); + printStatementAfterKeyword(this, node.argument, false); } function ThrowStatement(node) { this.word("throw"); - printStatementAfterKeyword(this, node.argument, node, false); + printStatementAfterKeyword(this, node.argument, false); } function LabeledStatement(node) { - this.print(node.label, node); + this.print(node.label); this.tokenChar(58); this.space(); - this.print(node.body, node); + this.print(node.body); } function TryStatement(node) { this.word("try"); this.space(); - this.print(node.block, node); + this.print(node.block); this.space(); if (node.handlers) { - this.print(node.handlers[0], node); + this.print(node.handlers[0]); } else { - this.print(node.handler, node); + this.print(node.handler); } if (node.finalizer) { this.space(); this.word("finally"); this.space(); - this.print(node.finalizer, node); + this.print(node.finalizer); } } function CatchClause(node) { @@ -20396,22 +20390,22 @@ function CatchClause(node) { this.space(); if (node.param) { this.tokenChar(40); - this.print(node.param, node); - this.print(node.param.typeAnnotation, node); + this.print(node.param); + this.print(node.param.typeAnnotation); this.tokenChar(41); this.space(); } - this.print(node.body, node); + this.print(node.body); } function SwitchStatement(node) { this.word("switch"); this.space(); this.tokenChar(40); - this.print(node.discriminant, node); + this.print(node.discriminant); this.tokenChar(41); this.space(); this.tokenChar(123); - this.printSequence(node.cases, node, { + this.printSequence(node.cases, { indent: true, addNewlines(leading, cas) { if (!leading && node.cases[node.cases.length - 1] === cas) return -1; @@ -20423,7 +20417,7 @@ function SwitchCase(node) { if (node.test) { this.word("case"); this.space(); - this.print(node.test, node); + this.print(node.test); this.tokenChar(58); } else { this.word("default"); @@ -20431,7 +20425,7 @@ function SwitchCase(node) { } if (node.consequent.length) { this.newline(); - this.printSequence(node.consequent, node, { + this.printSequence(node.consequent, { indent: true }); } @@ -20448,7 +20442,13 @@ function VariableDeclaration(node, parent) { const { kind } = node; - this.word(kind, kind === "using" || kind === "await using"); + if (kind === "await using") { + this.word("await"); + this.space(); + this.word("using", true); + } else { + this.word(kind, kind === "using"); + } this.space(); let hasInits = false; if (!isFor(parent)) { @@ -20458,7 +20458,7 @@ function VariableDeclaration(node, parent) { } } } - this.printList(node.declarations, node, { + this.printList(node.declarations, { separator: hasInits ? function () { this.tokenChar(44); this.newline(); @@ -20475,14 +20475,14 @@ function VariableDeclaration(node, parent) { this.semicolon(); } function VariableDeclarator(node) { - this.print(node.id, node); + this.print(node.id); if (node.definite) this.tokenChar(33); - this.print(node.id.typeAnnotation, node); + this.print(node.id.typeAnnotation); if (node.init) { this.space(); this.tokenChar(61); this.space(); - this.print(node.init, node); + this.print(node.init); } } @@ -20504,9 +20504,9 @@ exports.TaggedTemplateExpression = TaggedTemplateExpression; exports.TemplateElement = TemplateElement; exports.TemplateLiteral = TemplateLiteral; function TaggedTemplateExpression(node) { - this.print(node.tag, node); - this.print(node.typeParameters, node); - this.print(node.quasi, node); + this.print(node.tag); + this.print(node.typeParameters); + this.print(node.quasi); } function TemplateElement() { throw new Error("TemplateElement printing is handled in TemplateLiteral"); @@ -20518,7 +20518,7 @@ function TemplateLiteral(node) { partRaw += quasis[i].value.raw; if (i + 1 < quasis.length) { this.token(partRaw + "${", true); - this.print(node.expressions[i], node); + this.print(node.expressions[i]); partRaw = "}"; } } @@ -20575,62 +20575,66 @@ function ArgumentPlaceholder() { } function RestElement(node) { this.token("..."); - this.print(node.argument, node); + this.print(node.argument); } function ObjectExpression(node) { const props = node.properties; this.tokenChar(123); if (props.length) { + const exit = this.enterForStatementInit(false); this.space(); - this.printList(props, node, { + this.printList(props, { indent: true, statement: true }); this.space(); + exit(); } this.sourceWithOffset("end", node.loc, -1); this.tokenChar(125); } function ObjectMethod(node) { - this.printJoin(node.decorators, node); + this.printJoin(node.decorators); this._methodHead(node); this.space(); - this.print(node.body, node); + this.print(node.body); } function ObjectProperty(node) { - this.printJoin(node.decorators, node); + this.printJoin(node.decorators); if (node.computed) { this.tokenChar(91); - this.print(node.key, node); + this.print(node.key); this.tokenChar(93); } else { if (isAssignmentPattern(node.value) && isIdentifier(node.key) && node.key.name === node.value.left.name) { - this.print(node.value, node); + this.print(node.value); return; } - this.print(node.key, node); + this.print(node.key); if (node.shorthand && isIdentifier(node.key) && isIdentifier(node.value) && node.key.name === node.value.name) { return; } } this.tokenChar(58); this.space(); - this.print(node.value, node); + this.print(node.value); } function ArrayExpression(node) { const elems = node.elements; const len = elems.length; this.tokenChar(91); + const exit = this.enterForStatementInit(false); for (let i = 0; i < elems.length; i++) { const elem = elems[i]; if (elem) { if (i > 0) this.space(); - this.print(elem, node); + this.print(elem); if (i < len - 1) this.tokenChar(44); } else { this.tokenChar(44); } } + exit(); this.tokenChar(93); } function RecordExpression(node) { @@ -20651,7 +20655,7 @@ function RecordExpression(node) { this.token(startToken); if (props.length) { this.space(); - this.printList(props, node, { + this.printList(props, { indent: true, statement: true }); @@ -20680,7 +20684,7 @@ function TupleExpression(node) { const elem = elems[i]; if (elem) { if (i > 0) this.space(); - this.print(elem, node); + this.print(elem); if (i < len - 1) this.tokenChar(44); } } @@ -20749,10 +20753,10 @@ function TopicReference() { } } function PipelineTopicExpression(node) { - this.print(node.expression, node); + this.print(node.expression); } function PipelineBareFunction(node) { - this.print(node.callee, node); + this.print(node.callee); } function PipelinePrimaryTopicReference() { this.tokenChar(35); @@ -20844,11 +20848,11 @@ function TSTypeAnnotation(node) { this.tokenChar(58); this.space(); if (node.optional) this.tokenChar(63); - this.print(node.typeAnnotation, node); + this.print(node.typeAnnotation); } function TSTypeParameterInstantiation(node, parent) { this.tokenChar(60); - this.printList(node.params, node, {}); + this.printList(node.params, {}); if (parent.type === "ArrowFunctionExpression" && node.params.length === 1) { this.tokenChar(44); } @@ -20868,13 +20872,13 @@ function TSTypeParameter(node) { this.space(); this.word("extends"); this.space(); - this.print(node.constraint, node); + this.print(node.constraint); } if (node.default) { this.space(); this.tokenChar(61); this.space(); - this.print(node.default, node); + this.print(node.default); } } function TSParameterProperty(node) { @@ -20894,26 +20898,26 @@ function TSDeclareFunction(node, parent) { this.space(); } this._functionHead(node, parent); - this.tokenChar(59); + this.semicolon(); } function TSDeclareMethod(node) { this._classMethodHead(node); - this.tokenChar(59); + this.semicolon(); } function TSQualifiedName(node) { - this.print(node.left, node); + this.print(node.left); this.tokenChar(46); - this.print(node.right, node); + this.print(node.right); } function TSCallSignatureDeclaration(node) { this.tsPrintSignatureDeclarationBase(node); - this.tokenChar(59); + this.semicolon(); } function TSConstructSignatureDeclaration(node) { this.word("new"); this.space(); this.tsPrintSignatureDeclarationBase(node); - this.tokenChar(59); + this.semicolon(); } function TSPropertySignature(node) { const { @@ -20924,14 +20928,14 @@ function TSPropertySignature(node) { this.space(); } this.tsPrintPropertyOrMethodName(node); - this.print(node.typeAnnotation, node); - this.tokenChar(59); + this.print(node.typeAnnotation); + this.semicolon(); } function tsPrintPropertyOrMethodName(node) { if (node.computed) { this.tokenChar(91); } - this.print(node.key, node); + this.print(node.key); if (node.computed) { this.tokenChar(93); } @@ -20949,7 +20953,7 @@ function TSMethodSignature(node) { } this.tsPrintPropertyOrMethodName(node); this.tsPrintSignatureDeclarationBase(node); - this.tokenChar(59); + this.semicolon(); } function TSIndexSignature(node) { const { @@ -20965,10 +20969,10 @@ function TSIndexSignature(node) { this.space(); } this.tokenChar(91); - this._parameters(node.parameters, node); + this._parameters(node.parameters); this.tokenChar(93); - this.print(node.typeAnnotation, node); - this.tokenChar(59); + this.print(node.typeAnnotation); + this.semicolon(); } function TSAnyKeyword() { this.word("any"); @@ -21029,19 +21033,19 @@ function tsPrintFunctionOrConstructorType(node) { typeParameters } = node; const parameters = node.parameters; - this.print(typeParameters, node); + this.print(typeParameters); this.tokenChar(40); - this._parameters(parameters, node); + this._parameters(parameters); this.tokenChar(41); this.space(); this.token("=>"); this.space(); const returnType = node.typeAnnotation; - this.print(returnType.typeAnnotation, node); + this.print(returnType.typeAnnotation); } function TSTypeReference(node) { - this.print(node.typeName, node, true); - this.print(node.typeParameters, node, true); + this.print(node.typeName, true); + this.print(node.typeParameters, true); } function TSTypePredicate(node) { if (node.asserts) { @@ -21061,7 +21065,7 @@ function TSTypeQuery(node) { this.space(); this.print(node.exprName); if (node.typeParameters) { - this.print(node.typeParameters, node); + this.print(node.typeParameters); } } function TSTypeLiteral(node) { @@ -21076,7 +21080,7 @@ function tsPrintBraced(printer, members, node) { printer.indent(); printer.newline(); for (const member of members) { - printer.print(member, node); + printer.print(member); printer.newline(); } printer.dedent(); @@ -21084,28 +21088,29 @@ function tsPrintBraced(printer, members, node) { printer.rightBrace(node); } function TSArrayType(node) { - this.print(node.elementType, node, true); - this.token("[]"); + this.print(node.elementType, true); + this.tokenChar(91); + this.tokenChar(93); } function TSTupleType(node) { this.tokenChar(91); - this.printList(node.elementTypes, node); + this.printList(node.elementTypes); this.tokenChar(93); } function TSOptionalType(node) { - this.print(node.typeAnnotation, node); + this.print(node.typeAnnotation); this.tokenChar(63); } function TSRestType(node) { this.token("..."); - this.print(node.typeAnnotation, node); + this.print(node.typeAnnotation); } function TSNamedTupleMember(node) { - this.print(node.label, node); + this.print(node.label); if (node.optional) this.tokenChar(63); this.tokenChar(58); this.space(); - this.print(node.elementType, node); + this.print(node.elementType); } function TSUnionType(node) { tsPrintUnionOrIntersectionType(this, node, "|"); @@ -21114,7 +21119,7 @@ function TSIntersectionType(node) { tsPrintUnionOrIntersectionType(this, node, "&"); } function tsPrintUnionOrIntersectionType(printer, node, sep) { - printer.printJoin(node.types, node, { + printer.printJoin(node.types, { separator() { this.space(); this.token(sep); @@ -21144,18 +21149,18 @@ function TSInferType(node) { } function TSParenthesizedType(node) { this.tokenChar(40); - this.print(node.typeAnnotation, node); + this.print(node.typeAnnotation); this.tokenChar(41); } function TSTypeOperator(node) { this.word(node.operator); this.space(); - this.print(node.typeAnnotation, node); + this.print(node.typeAnnotation); } function TSIndexedAccessType(node) { - this.print(node.objectType, node, true); + this.print(node.objectType, true); this.tokenChar(91); - this.print(node.indexType, node); + this.print(node.indexType); this.tokenChar(93); } function TSMappedType(node) { @@ -21163,7 +21168,6 @@ function TSMappedType(node) { nameType, optional, readonly, - typeParameter, typeAnnotation } = node; this.tokenChar(123); @@ -21174,16 +21178,20 @@ function TSMappedType(node) { this.space(); } this.tokenChar(91); - this.word(typeParameter.name); + { + this.word(node.typeParameter.name); + } this.space(); this.word("in"); this.space(); - this.print(typeParameter.constraint, typeParameter); + { + this.print(node.typeParameter.constraint); + } if (nameType) { this.space(); this.word("as"); this.space(); - this.print(nameType, node); + this.print(nameType); } this.tokenChar(93); if (optional) { @@ -21193,7 +21201,7 @@ function TSMappedType(node) { if (typeAnnotation) { this.tokenChar(58); this.space(); - this.print(typeAnnotation, node); + this.print(typeAnnotation); } this.space(); this.tokenChar(125); @@ -21204,11 +21212,11 @@ function tokenIfPlusMinus(self, tok) { } } function TSLiteralType(node) { - this.print(node.literal, node); + this.print(node.literal); } function TSExpressionWithTypeArguments(node) { - this.print(node.expression, node); - this.print(node.typeParameters, node); + this.print(node.expression); + this.print(node.typeParameters); } function TSInterfaceDeclaration(node) { const { @@ -21224,16 +21232,16 @@ function TSInterfaceDeclaration(node) { } this.word("interface"); this.space(); - this.print(id, node); - this.print(typeParameters, node); + this.print(id); + this.print(typeParameters); if (extendz != null && extendz.length) { this.space(); this.word("extends"); this.space(); - this.printList(extendz, node); + this.printList(extendz); } this.space(); - this.print(body, node); + this.print(body); } function TSInterfaceBody(node) { this.tsPrintTypeLiteralOrInterfaceBody(node.body, node); @@ -21251,13 +21259,13 @@ function TSTypeAliasDeclaration(node) { } this.word("type"); this.space(); - this.print(id, node); - this.print(typeParameters, node); + this.print(id); + this.print(typeParameters); this.space(); this.tokenChar(61); this.space(); - this.print(typeAnnotation, node); - this.tokenChar(59); + this.print(typeAnnotation); + this.semicolon(); } function TSTypeExpression(node) { var _expression$trailingC; @@ -21266,12 +21274,12 @@ function TSTypeExpression(node) { expression, typeAnnotation } = node; - const forceParens = !!((_expression$trailingC = expression.trailingComments) != null && _expression$trailingC.length); - this.print(expression, node, true, undefined, forceParens); + const forceParens = (_expression$trailingC = expression.trailingComments) == null ? void 0 : _expression$trailingC.some(c => c.type === "CommentLine" || /[\r\n\u2028\u2029]/.test(c.value)); + this.print(expression, true, undefined, forceParens); this.space(); this.word(type === "TSAsExpression" ? "as" : "satisfies"); this.space(); - this.print(typeAnnotation, node); + this.print(typeAnnotation); } function TSTypeAssertion(node) { const { @@ -21279,14 +21287,14 @@ function TSTypeAssertion(node) { expression } = node; this.tokenChar(60); - this.print(typeAnnotation, node); + this.print(typeAnnotation); this.tokenChar(62); this.space(); - this.print(expression, node); + this.print(expression); } function TSInstantiationExpression(node) { - this.print(node.expression, node); - this.print(node.typeParameters, node); + this.print(node.expression); + this.print(node.typeParameters); } function TSEnumDeclaration(node) { const { @@ -21305,7 +21313,7 @@ function TSEnumDeclaration(node) { } this.word("enum"); this.space(); - this.print(id, node); + this.print(id); this.space(); tsPrintBraced(this, members, node); } @@ -21314,12 +21322,12 @@ function TSEnumMember(node) { id, initializer } = node; - this.print(id, node); + this.print(id); if (initializer) { this.space(); this.tokenChar(61); this.space(); - this.print(initializer, node); + this.print(initializer); } this.tokenChar(44); } @@ -21336,19 +21344,19 @@ function TSModuleDeclaration(node) { this.word(id.type === "Identifier" ? "namespace" : "module"); this.space(); } - this.print(id, node); + this.print(id); if (!node.body) { - this.tokenChar(59); + this.semicolon(); return; } let body = node.body; while (body.type === "TSModuleDeclaration") { this.tokenChar(46); - this.print(body.id, body); + this.print(body.id); body = body.body; } this.space(); - this.print(body, node); + this.print(body); } function TSModuleBlock(node) { tsPrintBraced(this, node.body, node); @@ -21361,14 +21369,14 @@ function TSImportType(node) { } = node; this.word("import"); this.tokenChar(40); - this.print(argument, node); + this.print(argument); this.tokenChar(41); if (qualifier) { this.tokenChar(46); - this.print(qualifier, node); + this.print(qualifier); } if (typeParameters) { - this.print(typeParameters, node); + this.print(typeParameters); } } function TSImportEqualsDeclaration(node) { @@ -21383,20 +21391,20 @@ function TSImportEqualsDeclaration(node) { } this.word("import"); this.space(); - this.print(id, node); + this.print(id); this.space(); this.tokenChar(61); this.space(); - this.print(moduleReference, node); - this.tokenChar(59); + this.print(moduleReference); + this.semicolon(); } function TSExternalModuleReference(node) { this.token("require("); - this.print(node.expression, node); + this.print(node.expression); this.tokenChar(41); } function TSNonNullExpression(node) { - this.print(node.expression, node); + this.print(node.expression); this.tokenChar(33); } function TSExportAssignment(node) { @@ -21404,8 +21412,8 @@ function TSExportAssignment(node) { this.space(); this.tokenChar(61); this.space(); - this.print(node.expression, node); - this.tokenChar(59); + this.print(node.expression); + this.semicolon(); } function TSNamespaceExportDeclaration(node) { this.word("export"); @@ -21414,19 +21422,20 @@ function TSNamespaceExportDeclaration(node) { this.space(); this.word("namespace"); this.space(); - this.print(node.id, node); + this.print(node.id); + this.semicolon(); } function tsPrintSignatureDeclarationBase(node) { const { typeParameters } = node; const parameters = node.parameters; - this.print(typeParameters, node); + this.print(typeParameters); this.tokenChar(40); - this._parameters(parameters, node); + this._parameters(parameters); this.tokenChar(41); const returnType = node.typeAnnotation; - this.print(returnType, node); + this.print(returnType); } function tsPrintClassMemberModifiers(node) { const isField = node.type === "ClassAccessorProperty" || node.type === "ClassProperty"; @@ -21567,6 +21576,7 @@ function generate(ast, opts = {}, code) { Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TokenContext = void 0; exports.needsParens = needsParens; exports.needsWhitespace = needsWhitespace; exports.needsWhitespaceAfter = needsWhitespaceAfter; @@ -21577,17 +21587,28 @@ var _t = __nccwpck_require__(7912); const { FLIPPED_ALIAS_KEYS, isCallExpression, + isDecorator, isExpressionStatement, isMemberExpression, - isNewExpression + isNewExpression, + isParenthesizedExpression } = _t; +const TokenContext = exports.TokenContext = { + expressionStatement: 1, + arrowBody: 2, + exportDefault: 4, + forHead: 8, + forInHead: 16, + forOfHead: 32, + arrowFlowReturnType: 64 +}; function expandAliases(obj) { const map = new Map(); function add(type, func) { const fn = map.get(type); - map.set(type, fn ? function (node, parent, stack) { + map.set(type, fn ? function (node, parent, stack, inForInit) { var _fn; - return (_fn = fn(node, parent, stack)) != null ? _fn : func(node, parent, stack); + return (_fn = fn(node, parent, stack, inForInit)) != null ? _fn : func(node, parent, stack, inForInit); } : func); } for (const type of Object.keys(obj)) { @@ -21628,13 +21649,26 @@ function needsWhitespaceBefore(node, parent) { function needsWhitespaceAfter(node, parent) { return needsWhitespace(node, parent, 2); } -function needsParens(node, parent, printStack) { +function needsParens(node, parent, tokenContext, inForInit) { var _expandedParens$get; if (!parent) return false; if (isNewExpression(parent) && parent.callee === node) { if (isOrHasCallExpression(node)) return true; } - return (_expandedParens$get = expandedParens.get(node.type)) == null ? void 0 : _expandedParens$get(node, parent, printStack); + if (isDecorator(parent)) { + return !isDecoratorMemberExpression(node) && !(isCallExpression(node) && isDecoratorMemberExpression(node.callee)) && !isParenthesizedExpression(node); + } + return (_expandedParens$get = expandedParens.get(node.type)) == null ? void 0 : _expandedParens$get(node, parent, tokenContext, inForInit); +} +function isDecoratorMemberExpression(node) { + switch (node.type) { + case "Identifier": + return true; + case "MemberExpression": + return !node.computed && node.property.type === "Identifier" && isDecoratorMemberExpression(node.object); + default: + return false; + } } //# sourceMappingURL=index.js.map @@ -21651,12 +21685,11 @@ function needsParens(node, parent, printStack) { Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ArrowFunctionExpression = ArrowFunctionExpression; exports.AssignmentExpression = AssignmentExpression; exports.Binary = Binary; exports.BinaryExpression = BinaryExpression; exports.ClassExpression = ClassExpression; -exports.ConditionalExpression = ConditionalExpression; +exports.ArrowFunctionExpression = exports.ConditionalExpression = ConditionalExpression; exports.DoExpression = DoExpression; exports.FunctionExpression = FunctionExpression; exports.FunctionTypeAnnotation = FunctionTypeAnnotation; @@ -21667,29 +21700,37 @@ exports.ObjectExpression = ObjectExpression; exports.OptionalIndexedAccessType = OptionalIndexedAccessType; exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression; exports.SequenceExpression = SequenceExpression; -exports.TSTypeAssertion = exports.TSSatisfiesExpression = exports.TSAsExpression = TSAsExpression; +exports.TSSatisfiesExpression = exports.TSAsExpression = TSAsExpression; exports.TSInferType = TSInferType; exports.TSInstantiationExpression = TSInstantiationExpression; +exports.UnaryLike = exports.TSTypeAssertion = UnaryLike; exports.TSIntersectionType = exports.TSUnionType = TSUnionType; -exports.UnaryLike = UnaryLike; exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; exports.UpdateExpression = UpdateExpression; exports.AwaitExpression = exports.YieldExpression = YieldExpression; var _t = __nccwpck_require__(7912); +var _index = __nccwpck_require__(9223); const { isArrayTypeAnnotation, - isArrowFunctionExpression, isBinaryExpression, isCallExpression, - isExportDeclaration, isForOfStatement, isIndexedAccessType, isMemberExpression, isObjectPattern, isOptionalMemberExpression, - isYieldExpression + isYieldExpression, + isStatement } = _t; const PRECEDENCE = new Map([["||", 0], ["??", 0], ["|>", 0], ["&&", 1], ["|", 2], ["^", 3], ["&", 4], ["==", 5], ["===", 5], ["!=", 5], ["!==", 5], ["<", 6], [">", 6], ["<=", 6], [">=", 6], ["in", 6], ["instanceof", 6], [">>", 7], ["<<", 7], [">>>", 7], ["+", 8], ["-", 8], ["*", 9], ["/", 9], ["%", 9], ["**", 10]]); +function getBinaryPrecedence(node, nodeType) { + if (nodeType === "BinaryExpression" || nodeType === "LogicalExpression") { + return PRECEDENCE.get(node.operator); + } + if (nodeType === "TSAsExpression" || nodeType === "TSSatisfiesExpression") { + return PRECEDENCE.get("in"); + } +} function isTSTypeExpression(nodeType) { return nodeType === "TSAsExpression" || nodeType === "TSSatisfiesExpression" || nodeType === "TSTypeAssertion"; } @@ -21704,23 +21745,25 @@ const hasPostfixPart = (node, parent) => { function NullableTypeAnnotation(node, parent) { return isArrayTypeAnnotation(parent); } -function FunctionTypeAnnotation(node, parent, printStack) { - if (printStack.length < 3) return; +function FunctionTypeAnnotation(node, parent, tokenContext) { const parentType = parent.type; - return parentType === "UnionTypeAnnotation" || parentType === "IntersectionTypeAnnotation" || parentType === "ArrayTypeAnnotation" || parentType === "TypeAnnotation" && isArrowFunctionExpression(printStack[printStack.length - 3]); + return parentType === "UnionTypeAnnotation" || parentType === "IntersectionTypeAnnotation" || parentType === "ArrayTypeAnnotation" || Boolean(tokenContext & _index.TokenContext.arrowFlowReturnType); } function UpdateExpression(node, parent) { return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent); } -function ObjectExpression(node, parent, printStack) { - return isFirstInContext(printStack, 1 | 2); +function needsParenBeforeExpressionBrace(tokenContext) { + return Boolean(tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.arrowBody)); +} +function ObjectExpression(node, parent, tokenContext) { + return needsParenBeforeExpressionBrace(tokenContext); } -function DoExpression(node, parent, printStack) { - return !node.async && isFirstInContext(printStack, 1); +function DoExpression(node, parent, tokenContext) { + return !node.async && Boolean(tokenContext & _index.TokenContext.expressionStatement); } function Binary(node, parent) { const parentType = parent.type; - if (node.operator === "**" && parentType === "BinaryExpression" && parent.operator === "**") { + if (node.type === "BinaryExpression" && node.operator === "**" && parentType === "BinaryExpression" && parent.operator === "**") { return parent.left === node; } if (isClassExtendsClause(node, parent)) { @@ -21729,10 +21772,10 @@ function Binary(node, parent) { if (hasPostfixPart(node, parent) || parentType === "UnaryExpression" || parentType === "SpreadElement" || parentType === "AwaitExpression") { return true; } - if (parentType === "BinaryExpression" || parentType === "LogicalExpression") { - const parentPos = PRECEDENCE.get(parent.operator); - const nodePos = PRECEDENCE.get(node.operator); - if (parentPos === nodePos && parent.right === node && parentType !== "LogicalExpression" || parentPos > nodePos) { + const parentPos = getBinaryPrecedence(parent, parentType); + if (parentPos != null) { + const nodePos = getBinaryPrecedence(node, node.type); + if (parentPos === nodePos && parentType === "BinaryExpression" && parent.right === node || parentPos > nodePos) { return true; } } @@ -21745,12 +21788,18 @@ function UnionTypeAnnotation(node, parent) { function OptionalIndexedAccessType(node, parent) { return isIndexedAccessType(parent) && parent.objectType === node; } -function TSAsExpression() { - return true; +function TSAsExpression(node, parent) { + if ((parent.type === "AssignmentExpression" || parent.type === "AssignmentPattern") && parent.left === node) { + return true; + } + if (parent.type === "BinaryExpression" && (parent.operator === "|" || parent.operator === "&") && node === parent.left) { + return true; + } + return Binary(node, parent); } function TSUnionType(node, parent) { const parentType = parent.type; - return parentType === "TSArrayType" || parentType === "TSOptionalType" || parentType === "TSIntersectionType" || parentType === "TSUnionType" || parentType === "TSRestType"; + return parentType === "TSArrayType" || parentType === "TSOptionalType" || parentType === "TSIntersectionType" || parentType === "TSRestType"; } function TSInferType(node, parent) { const parentType = parent.type; @@ -21760,35 +21809,37 @@ function TSInstantiationExpression(node, parent) { const parentType = parent.type; return (parentType === "CallExpression" || parentType === "OptionalCallExpression" || parentType === "NewExpression" || parentType === "TSInstantiationExpression") && !!parent.typeParameters; } -function BinaryExpression(node, parent) { - if (node.operator === "in") { - const parentType = parent.type; - return parentType === "VariableDeclarator" || parentType === "ForStatement" || parentType === "ForInStatement" || parentType === "ForOfStatement"; - } - return false; +function BinaryExpression(node, parent, tokenContext, inForStatementInit) { + return node.operator === "in" && inForStatementInit; } function SequenceExpression(node, parent) { const parentType = parent.type; - if (parentType === "ForStatement" || parentType === "ThrowStatement" || parentType === "ReturnStatement" || parentType === "IfStatement" && parent.test === node || parentType === "WhileStatement" && parent.test === node || parentType === "ForInStatement" && parent.right === node || parentType === "SwitchStatement" && parent.discriminant === node || parentType === "ExpressionStatement" && parent.expression === node) { + if (parentType === "SequenceExpression" || parentType === "ParenthesizedExpression" || parentType === "MemberExpression" && parent.property === node || parentType === "OptionalMemberExpression" && parent.property === node || parentType === "TemplateLiteral") { return false; } - return true; + if (parentType === "ClassDeclaration") { + return true; + } + if (parentType === "ForOfStatement") { + return parent.right === node; + } + if (parentType === "ExportDefaultDeclaration") { + return true; + } + return !isStatement(parent); } function YieldExpression(node, parent) { const parentType = parent.type; - return parentType === "BinaryExpression" || parentType === "LogicalExpression" || parentType === "UnaryExpression" || parentType === "SpreadElement" || hasPostfixPart(node, parent) || parentType === "AwaitExpression" && isYieldExpression(node) || parentType === "ConditionalExpression" && node === parent.test || isClassExtendsClause(node, parent); + return parentType === "BinaryExpression" || parentType === "LogicalExpression" || parentType === "UnaryExpression" || parentType === "SpreadElement" || hasPostfixPart(node, parent) || parentType === "AwaitExpression" && isYieldExpression(node) || parentType === "ConditionalExpression" && node === parent.test || isClassExtendsClause(node, parent) || isTSTypeExpression(parentType); } -function ClassExpression(node, parent, printStack) { - return isFirstInContext(printStack, 1 | 4); +function ClassExpression(node, parent, tokenContext) { + return Boolean(tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.exportDefault)); } function UnaryLike(node, parent) { return hasPostfixPart(node, parent) || isBinaryExpression(parent) && parent.operator === "**" && parent.left === node || isClassExtendsClause(node, parent); } -function FunctionExpression(node, parent, printStack) { - return isFirstInContext(printStack, 1 | 4); -} -function ArrowFunctionExpression(node, parent) { - return isExportDeclaration(parent) || ConditionalExpression(node, parent); +function FunctionExpression(node, parent, tokenContext) { + return Boolean(tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.exportDefault)); } function ConditionalExpression(node, parent) { const parentType = parent.type; @@ -21800,8 +21851,8 @@ function ConditionalExpression(node, parent) { function OptionalMemberExpression(node, parent) { return isCallExpression(parent) && parent.callee === node || isMemberExpression(parent) && parent.object === node; } -function AssignmentExpression(node, parent) { - if (isObjectPattern(node.left)) { +function AssignmentExpression(node, parent, tokenContext) { + if (needsParenBeforeExpressionBrace(tokenContext) && isObjectPattern(node.left)) { return true; } else { return ConditionalExpression(node, parent); @@ -21820,7 +21871,7 @@ function LogicalExpression(node, parent) { return parent.operator !== "??"; } } -function Identifier(node, parent, printStack) { +function Identifier(node, parent, tokenContext) { var _node$extra; const parentType = parent.type; if ((_node$extra = node.extra) != null && _node$extra.parenthesized && parentType === "AssignmentExpression" && parent.left === node) { @@ -21838,36 +21889,15 @@ function Identifier(node, parent, printStack) { computed: true, optional: false }); - return isFirstInContext(printStack, isFollowedByBracket ? 1 | 8 | 16 | 32 : 32); - } - return node.name === "async" && isForOfStatement(parent) && node === parent.left; -} -function isFirstInContext(printStack, checkParam) { - const expressionStatement = checkParam & 1; - const arrowBody = checkParam & 2; - const exportDefault = checkParam & 4; - const forHead = checkParam & 8; - const forInHead = checkParam & 16; - const forOfHead = checkParam & 32; - let i = printStack.length - 1; - if (i <= 0) return; - let node = printStack[i]; - i--; - let parent = printStack[i]; - while (i >= 0) { - const parentType = parent.type; - if (expressionStatement && parentType === "ExpressionStatement" && parent.expression === node || exportDefault && parentType === "ExportDefaultDeclaration" && node === parent.declaration || arrowBody && parentType === "ArrowFunctionExpression" && parent.body === node || forHead && parentType === "ForStatement" && parent.init === node || forInHead && parentType === "ForInStatement" && parent.left === node || forOfHead && parentType === "ForOfStatement" && parent.left === node) { + if (isFollowedByBracket && tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.forHead | _index.TokenContext.forInHead)) { return true; } - if (i > 0 && (hasPostfixPart(node, parent) && parentType !== "NewExpression" || parentType === "SequenceExpression" && parent.expressions[0] === node || parentType === "UpdateExpression" && !parent.prefix || parentType === "ConditionalExpression" && parent.test === node || (parentType === "BinaryExpression" || parentType === "LogicalExpression") && parent.left === node || parentType === "AssignmentExpression" && parent.left === node)) { - node = parent; - i--; - parent = printStack[i]; - } else { - return false; - } + return Boolean(tokenContext & _index.TokenContext.forOfHead); } - return false; + return node.name === "async" && isForOfStatement(parent, { + left: node, + await: false + }); } //# sourceMappingURL=parentheses.js.map @@ -22058,8 +22088,9 @@ const { } = n; class Printer { constructor(format, map) { - this.inForStatementInitCounter = 0; - this._printStack = []; + this.inForStatementInit = false; + this.tokenContext = 0; + this._currentNode = null; this._indent = 0; this._indentRepeat = 0; this._insideAux = false; @@ -22069,6 +22100,7 @@ class Printer { this._printedComments = new Set(); this._endsWithInteger = false; this._endsWithWord = false; + this._endsWithDiv = false; this._lastCommentLine = 0; this._endsWithInnerRaw = false; this._indentInnerComments = true; @@ -22077,6 +22109,14 @@ class Printer { this._inputMap = map == null ? void 0 : map._inputMap; this._buf = new _buffer.default(map, format.indent.style[0]); } + enterForStatementInit(val) { + const old = this.inForStatementInit; + if (old === val) return () => {}; + this.inForStatementInit = val; + return () => { + this.inForStatementInit = old; + }; + } generate(ast) { this.print(ast); this._maybeAddAuxComment(); @@ -22122,8 +22162,9 @@ class Printer { } } word(str, noLineTerminatorAfter = false) { + this.tokenContext = 0; this._maybePrintInnerComments(); - if (this._endsWithWord || str.charCodeAt(0) === 47 && this.endsWith(47)) { + if (this._endsWithWord || this._endsWithDiv && str.charCodeAt(0) === 47) { this._space(); } this._maybeAddAuxComment(); @@ -22143,6 +22184,7 @@ class Printer { this._endsWithInteger = Number.isInteger(number) && !isNonDecimalLiteral(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str.charCodeAt(str.length - 1) !== 46; } token(str, maybeNewline = false) { + this.tokenContext = 0; this._maybePrintInnerComments(); const lastChar = this.getLastChar(); const strFirst = str.charCodeAt(0); @@ -22154,6 +22196,7 @@ class Printer { this._noLineTerminator = false; } tokenChar(char) { + this.tokenContext = 0; this._maybePrintInnerComments(); const lastChar = this.getLastChar(); if (char === 43 && lastChar === 43 || char === 45 && lastChar === 45 || char === 46 && this._endsWithInteger) { @@ -22209,14 +22252,6 @@ class Printer { this._catchUp(prop, loc); this._buf.sourceWithOffset(prop, loc, columnOffset); } - withSource(prop, loc, cb) { - if (!loc) { - cb(); - return; - } - this._catchUp(prop, loc); - this._buf.withSource(prop, loc, cb); - } sourceIdentifierName(identifierName, pos) { if (!this._buf._canMarkIdName) return; const sourcePosition = this._buf._sourcePosition; @@ -22235,6 +22270,7 @@ class Printer { this._buf.append(str, maybeNewline); this._endsWithWord = false; this._endsWithInteger = false; + this._endsWithDiv = false; } _appendChar(char) { this._maybeAddParenChar(char); @@ -22242,6 +22278,7 @@ class Printer { this._buf.appendChar(char); this._endsWithWord = false; this._endsWithInteger = false; + this._endsWithDiv = false; } _queue(char) { this._maybeAddParenChar(char); @@ -22322,16 +22359,16 @@ class Printer { _getIndent() { return this._indentRepeat * this._indent; } - printTerminatorless(node, parent, isLabel) { + printTerminatorless(node, isLabel) { if (isLabel) { this._noLineTerminator = true; - this.print(node, parent); + this.print(node); } else { const terminatorState = { printed: false }; this._parenPushNewlineState = terminatorState; - this.print(node, parent); + this.print(node); if (terminatorState.printed) { this.dedent(); this.newline(); @@ -22339,7 +22376,7 @@ class Printer { } } } - print(node, parent, noLineTerminatorAfter, trailingCommentsLineOffset, forceParens) { + print(node, noLineTerminatorAfter, trailingCommentsLineOffset, forceParens) { var _node$extra, _node$leadingComments; if (!node) return; this._endsWithInnerRaw = false; @@ -22353,12 +22390,13 @@ class Printer { if (printMethod === undefined) { throw new ReferenceError(`unknown node of type ${JSON.stringify(nodeType)} with constructor ${JSON.stringify(node.constructor.name)}`); } - this._printStack.push(node); + const parent = this._currentNode; + this._currentNode = node; const oldInAux = this._insideAux; this._insideAux = node.loc == null; this._maybeAddAuxComment(this._insideAux && !oldInAux); const parenthesized = (_node$extra = node.extra) == null ? void 0 : _node$extra.parenthesized; - let shouldPrintParens = forceParens || parenthesized && format.retainFunctionParens && nodeType === "FunctionExpression" || needsParens(node, parent, this._printStack); + let shouldPrintParens = forceParens || parenthesized && format.retainFunctionParens && nodeType === "FunctionExpression" || needsParens(node, parent, this.tokenContext, this.inForStatementInit); if (!shouldPrintParens && parenthesized && (_node$leadingComments = node.leadingComments) != null && _node$leadingComments.length && node.leadingComments[0].type === "CommentBlock") { const parentType = parent == null ? void 0 : parent.type; switch (parentType) { @@ -22375,9 +22413,11 @@ class Printer { shouldPrintParens = true; } } + let exitInForStatementInit; if (shouldPrintParens) { this.tokenChar(40); this._endsWithInnerRaw = false; + exitInForStatementInit = this.enterForStatementInit(false); } this._lastCommentLine = 0; this._printLeadingComments(node, parent); @@ -22387,13 +22427,14 @@ class Printer { this._printTrailingComments(node, parent); this.tokenChar(41); this._noLineTerminator = noLineTerminatorAfter; + exitInForStatementInit(); } else if (noLineTerminatorAfter && !this._noLineTerminator) { this._noLineTerminator = true; this._printTrailingComments(node, parent); } else { this._printTrailingComments(node, parent, trailingCommentsLineOffset); } - this._printStack.pop(); + this._currentNode = parent; format.concise = oldConcise; this._insideAux = oldInAux; this._endsWithInnerRaw = false; @@ -22430,7 +22471,7 @@ class Printer { return extra.raw; } } - printJoin(nodes, parent, opts = {}) { + printJoin(nodes, opts = {}) { if (!(nodes != null && nodes.length)) return; let { indent @@ -22453,7 +22494,7 @@ class Printer { const node = nodes[i]; if (!node) continue; if (opts.statement) this._printNewline(i === 0, newlineOpts); - this.print(node, parent, undefined, opts.trailingCommentsLineOffset || 0); + this.print(node, undefined, opts.trailingCommentsLineOffset || 0); opts.iterator == null || opts.iterator(node, i); if (i < len - 1) separator == null || separator(); if (opts.statement) { @@ -22473,10 +22514,10 @@ class Printer { } if (indent) this.dedent(); } - printAndIndentOnComments(node, parent) { + printAndIndentOnComments(node) { const indent = node.leadingComments && node.leadingComments.length > 0; if (indent) this.indent(); - this.print(node, parent); + this.print(node); if (indent) this.dedent(); } printBlock(parent) { @@ -22484,7 +22525,7 @@ class Printer { if (node.type !== "EmptyStatement") { this.space(); } - this.print(node, parent); + this.print(node); } _printTrailingComments(node, parent, lineOffset) { const { @@ -22509,7 +22550,7 @@ class Printer { this._indentInnerComments = true; } printInnerComments() { - const node = this._printStack[this._printStack.length - 1]; + const node = this._currentNode; const comments = node.innerComments; if (!(comments != null && comments.length)) return; const hasSpace = this.endsWith(32); @@ -22525,17 +22566,17 @@ class Printer { noIndentInnerCommentsHere() { this._indentInnerComments = false; } - printSequence(nodes, parent, opts = {}) { + printSequence(nodes, opts = {}) { var _opts$indent; opts.statement = true; (_opts$indent = opts.indent) != null ? _opts$indent : opts.indent = false; - this.printJoin(nodes, parent, opts); + this.printJoin(nodes, opts); } - printList(items, parent, opts = {}) { + printList(items, opts = {}) { if (opts.separator == null) { opts.separator = commaSeparator; } - this.printJoin(items, parent, opts); + this.printJoin(items, opts); } _printNewline(newLine, opts) { const format = this.format; @@ -22580,7 +22621,7 @@ class Printer { this.newline(1); } const lastCharCode = this.getLastChar(); - if (lastCharCode !== 91 && lastCharCode !== 123) { + if (lastCharCode !== 91 && lastCharCode !== 123 && lastCharCode !== 40) { this.space(); } let val; @@ -22616,7 +22657,7 @@ class Printer { } else { val = `/*${comment.value}*/`; } - if (this.endsWith(47)) this._space(); + if (this._endsWithDiv) this._space(); this.source("start", comment.loc); this._append(val, isBlockComment); if (!isBlockComment && !noLineTerminator) { @@ -23335,7 +23376,7 @@ function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) { default: if (ch >= 48 && ch <= 55) { const startPos = pos - 1; - const match = input.slice(startPos, pos + 2).match(/^[0-7]+/); + const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2)); let octalStr = match[0]; let octal = parseInt(octalStr, 8); if (octal > 255) { @@ -23800,17 +23841,14 @@ function highlight(code, options = {}) { Object.defineProperty(exports, "__esModule", ({ value: true })); -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; +function _objectWithoutPropertiesLoose(r, e) { + if (null == r) return {}; + var t = {}; + for (var n in r) if ({}.hasOwnProperty.call(r, n)) { + if (e.includes(n)) continue; + t[n] = r[n]; } - return target; + return t; } class Position { constructor(line, col, index) { @@ -24130,8 +24168,7 @@ var PipelineOperatorErrors = { PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.", PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.' }; -const _excluded = ["toMessage"], - _excluded2 = ["message"]; +const _excluded = ["message"]; function defineHidden(obj, key, value) { Object.defineProperty(obj, key, { enumerable: false, @@ -24139,21 +24176,35 @@ function defineHidden(obj, key, value) { value }); } -function toParseErrorConstructor(_ref) { - let { - toMessage - } = _ref, - properties = _objectWithoutPropertiesLoose(_ref, _excluded); +function toParseErrorConstructor({ + toMessage, + code, + reasonCode, + syntaxPlugin +}) { + const hasMissingPlugin = reasonCode === "MissingPlugin" || reasonCode === "MissingOneOfPlugins"; + { + const oldReasonCodes = { + AccessorCannotDeclareThisParameter: "AccesorCannotDeclareThisParameter", + AccessorCannotHaveTypeParameters: "AccesorCannotHaveTypeParameters", + ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference", + SetAccessorCannotHaveOptionalParameter: "SetAccesorCannotHaveOptionalParameter", + SetAccessorCannotHaveRestParameter: "SetAccesorCannotHaveRestParameter", + SetAccessorCannotHaveReturnType: "SetAccesorCannotHaveReturnType" + }; + if (oldReasonCodes[reasonCode]) { + reasonCode = oldReasonCodes[reasonCode]; + } + } return function constructor(loc, details) { const error = new SyntaxError(); - Object.assign(error, properties, { - loc, - pos: loc.index - }); - if ("missingPlugin" in details) { - Object.assign(error, { - missingPlugin: details.missingPlugin - }); + error.code = code; + error.reasonCode = reasonCode; + error.loc = loc; + error.pos = loc.index; + error.syntaxPlugin = syntaxPlugin; + if (hasMissingPlugin) { + error.missingPlugin = details.missingPlugin; } defineHidden(error, "clone", function clone(overrides = {}) { var _overrides$loc; @@ -24189,15 +24240,15 @@ function ParseErrorEnum(argument, syntaxPlugin) { const ParseErrorConstructors = {}; for (const reasonCode of Object.keys(argument)) { const template = argument[reasonCode]; - const _ref2 = typeof template === "string" ? { + const _ref = typeof template === "string" ? { message: () => template } : typeof template === "function" ? { message: template } : template, { message - } = _ref2, - rest = _objectWithoutPropertiesLoose(_ref2, _excluded2); + } = _ref, + rest = _objectWithoutPropertiesLoose(_ref, _excluded); const toMessage = typeof message === "string" ? () => message : message; ParseErrorConstructors[reasonCode] = toParseErrorConstructor(Object.assign({ code: "BABEL_PARSER_SYNTAX_ERROR", @@ -24213,13 +24264,17 @@ const Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(St const { defineProperty } = Object; -const toUnenumerable = (object, key) => defineProperty(object, key, { - enumerable: false, - value: object[key] -}); +const toUnenumerable = (object, key) => { + if (object) { + defineProperty(object, key, { + enumerable: false, + value: object[key] + }); + } +}; function toESTreeLocation(node) { - node.loc.start && toUnenumerable(node.loc.start, "index"); - node.loc.end && toUnenumerable(node.loc.end, "index"); + toUnenumerable(node.loc.start, "index"); + toUnenumerable(node.loc.end, "index"); return node; } var estree = superClass => class ESTreeParserMixin extends superClass { @@ -24237,7 +24292,7 @@ var estree = superClass => class ESTreeParserMixin extends superClass { let regex = null; try { regex = new RegExp(pattern, flags); - } catch (e) {} + } catch (_) {} const node = this.estreeParseLiteral(regex); node.regex = { pattern, @@ -25583,7 +25638,7 @@ class CommentsParser extends BaseParser { } } } -const lineBreak = /\r\n?|[\n\u2028\u2029]/; +const lineBreak = /\r\n|[\r\n\u2028\u2029]/; const lineBreakG = new RegExp(lineBreak.source, "g"); function isNewLine(code) { switch (code) { @@ -25596,9 +25651,16 @@ function isNewLine(code) { return false; } } +function hasNewLine(input, start, end) { + for (let i = start; i < end; i++) { + if (isNewLine(input.charCodeAt(i))) { + return true; + } + } + return false; +} const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; const skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g; -const skipWhiteSpaceToLineBreak = new RegExp("(?=(" + skipWhiteSpaceInLine.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"); function isWhitespace(code) { switch (code) { case 0x0009: @@ -25740,6 +25802,12 @@ class State { set containsEsc(v) { if (v) this.flags |= 2048;else this.flags &= -2049; } + get hasTopLevelAwait() { + return (this.flags & 4096) > 0; + } + set hasTopLevelAwait(v) { + if (v) this.flags |= 4096;else this.flags &= -4097; + } curPosition() { return new Position(this.curLine, this.pos - this.lineStart, this.pos); } @@ -25920,7 +25988,7 @@ function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) { default: if (ch >= 48 && ch <= 55) { const startPos = pos - 1; - const match = input.slice(startPos, pos + 2).match(/^[0-7]+/); + const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2)); let octalStr = match[0]; let octal = parseInt(octalStr, 8); if (octal > 255) { @@ -27293,7 +27361,13 @@ function functionFlags(isAsync, isGenerator) { class UtilParser extends Tokenizer { addExtra(node, key, value, enumerable = true) { if (!node) return; - const extra = node.extra = node.extra || {}; + let { + extra + } = node; + if (extra == null) { + extra = {}; + node.extra = extra; + } if (enumerable) { extra[key] = value; } else { @@ -27337,11 +27411,10 @@ class UtilParser extends Tokenizer { return this.match(139) || this.match(8) || this.hasPrecedingLineBreak(); } hasPrecedingLineBreak() { - return lineBreak.test(this.input.slice(this.state.lastTokEndLoc.index, this.state.start)); + return hasNewLine(this.input, this.state.lastTokEndLoc.index, this.state.start); } hasFollowingLineBreak() { - skipWhiteSpaceToLineBreak.lastIndex = this.state.end; - return skipWhiteSpaceToLineBreak.test(this.input); + return hasNewLine(this.input, this.state.end, this.nextTokenStart()); } isLineTerminator() { return this.eat(13) || this.canInsertSemicolon(); @@ -27351,7 +27424,9 @@ class UtilParser extends Tokenizer { this.raise(Errors.MissingSemicolon, this.state.lastTokEndLoc); } expect(type, loc) { - this.eat(type) || this.unexpected(loc, type); + if (!this.eat(type)) { + this.unexpected(loc, type); + } } tryParse(fn, oldState = this.state.clone()) { const abortSignal = { @@ -28956,7 +29031,7 @@ var flow = superClass => class FlowParserMixin extends superClass { } forwardNoArrowParamsConversionAt(node, parse) { let result; - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + if (this.state.noArrowParamsConversionAt.includes(node.start)) { this.state.noArrowParamsConversionAt.push(this.state.start); result = parse(); this.state.noArrowParamsConversionAt.pop(); @@ -29466,14 +29541,14 @@ var flow = superClass => class FlowParserMixin extends superClass { return this.match(14) || super.shouldParseArrow(params); } setArrowFunctionParameters(node, params) { - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + if (this.state.noArrowParamsConversionAt.includes(node.start)) { node.params = params; } else { super.setArrowFunctionParameters(node, params); } } checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { - if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + if (isArrowFunction && this.state.noArrowParamsConversionAt.includes(node.start)) { return; } for (let i = 0; i < node.params.length; i++) { @@ -29484,10 +29559,10 @@ var flow = superClass => class FlowParserMixin extends superClass { super.checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged); } parseParenAndDistinguishExpression(canBeArrow) { - return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1); + return super.parseParenAndDistinguishExpression(canBeArrow && !this.state.noArrowAt.includes(this.state.start)); } parseSubscripts(base, startLoc, noCalls) { - if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startLoc.index) !== -1) { + if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.includes(startLoc.index)) { this.next(); const node = this.startNodeAt(startLoc); node.callee = base; @@ -30748,7 +30823,6 @@ class TypeScriptScopeHandler extends ScopeHandler { super.checkLocalExport(id); } } -const getOwn$1 = (object, key) => hasOwnProperty.call(object, key) && object[key]; const unwrapParenthesizedExpression = node => { return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; }; @@ -31007,25 +31081,26 @@ class LValParser extends NodeUtils { return this.finishNode(node, "AssignmentPattern"); } isValidLVal(type, isUnparenthesizedInAssign, binding) { - return getOwn$1({ - AssignmentPattern: "left", - RestElement: "argument", - ObjectProperty: "value", - ParenthesizedExpression: "expression", - ArrayPattern: "elements", - ObjectPattern: "properties" - }, type); + switch (type) { + case "AssignmentPattern": + return "left"; + case "RestElement": + return "argument"; + case "ObjectProperty": + return "value"; + case "ParenthesizedExpression": + return "expression"; + case "ArrayPattern": + return "elements"; + case "ObjectPattern": + return "properties"; + } + return false; } isOptionalMemberExpression(expression) { return expression.type === "OptionalMemberExpression"; } - checkLVal(expression, { - in: ancestor, - binding = 64, - checkClashes = false, - strictModeChanged = false, - hasParenthesizedAncestor = false - }) { + checkLVal(expression, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false) { var _expression$extra; const type = expression.type; if (this.isObjectMethod(expression)) return; @@ -31067,20 +31142,25 @@ class LValParser extends NodeUtils { }); return; } - const [key, isParenthesizedExpression] = Array.isArray(validity) ? validity : [validity, type === "ParenthesizedExpression"]; + let key, isParenthesizedExpression; + if (typeof validity === "string") { + key = validity; + isParenthesizedExpression = type === "ParenthesizedExpression"; + } else { + [key, isParenthesizedExpression] = validity; + } const nextAncestor = type === "ArrayPattern" || type === "ObjectPattern" ? { type } : ancestor; - for (const child of [].concat(expression[key])) { - if (child) { - this.checkLVal(child, { - in: nextAncestor, - binding, - checkClashes, - strictModeChanged, - hasParenthesizedAncestor: isParenthesizedExpression - }); + const val = expression[key]; + if (Array.isArray(val)) { + for (const child of val) { + if (child) { + this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression); + } } + } else if (val) { + this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression); } } checkIdentifier(at, bindingType, strictModeChanged = false) { @@ -31128,7 +31208,6 @@ class LValParser extends NodeUtils { return true; } } -const getOwn = (object, key) => hasOwnProperty.call(object, key) && object[key]; function nonNull(x) { if (x == null) { throw new Error(`Unexpected ${x} value.`); @@ -31147,12 +31226,12 @@ const TSErrors = ParseErrorEnum`typescript`({ AbstractPropertyHasInitializer: ({ propertyName }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`, - AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", - AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.", AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.", + AccessorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", + AccessorCannotHaveTypeParameters: "An accessor cannot have type parameters.", ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", - ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", + ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", DeclareAccessor: ({ kind @@ -31211,9 +31290,9 @@ const TSErrors = ParseErrorEnum`typescript`({ ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.", ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.", - SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", - SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", - SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", + SetAccessorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", + SetAccessorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", + SetAccessorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", SingleTypeParameterWithoutTrailingComma: ({ typeParameterName }) => `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`, @@ -31291,18 +31370,28 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { return tokenIsIdentifier(this.state.type); } tsTokenCanFollowModifier() { - return (this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(138) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak(); + return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(138) || this.isLiteralPropertyName(); } - tsNextTokenCanFollowModifier() { + tsNextTokenOnSameLineAndCanFollowModifier() { this.next(); + if (this.hasPrecedingLineBreak()) { + return false; + } return this.tsTokenCanFollowModifier(); } + tsNextTokenCanFollowModifier() { + if (this.match(106)) { + this.next(); + return this.tsTokenCanFollowModifier(); + } + return this.tsNextTokenOnSameLineAndCanFollowModifier(); + } tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) { if (!tokenIsIdentifier(this.state.type) && this.state.type !== 58 && this.state.type !== 75) { return undefined; } const modifier = this.state.value; - if (allowedModifiers.indexOf(modifier) !== -1) { + if (allowedModifiers.includes(modifier)) { if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) { return undefined; } @@ -31620,7 +31709,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { } const method = nodeAny; if (method.kind && this.match(47)) { - this.raise(TSErrors.AccesorCannotHaveTypeParameters, this.state.curPosition()); + this.raise(TSErrors.AccessorCannotHaveTypeParameters, this.state.curPosition()); } this.tsFillSignature(14, method); this.tsParseTypeMemberSemicolon(); @@ -31630,7 +31719,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { if (method[paramsKey].length > 0) { this.raise(Errors.BadGetterArity, this.state.curPosition()); if (this.isThisParam(method[paramsKey][0])) { - this.raise(TSErrors.AccesorCannotDeclareThisParameter, this.state.curPosition()); + this.raise(TSErrors.AccessorCannotDeclareThisParameter, this.state.curPosition()); } } } else if (method.kind === "set") { @@ -31639,17 +31728,17 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { } else { const firstParameter = method[paramsKey][0]; if (this.isThisParam(firstParameter)) { - this.raise(TSErrors.AccesorCannotDeclareThisParameter, this.state.curPosition()); + this.raise(TSErrors.AccessorCannotDeclareThisParameter, this.state.curPosition()); } if (firstParameter.type === "Identifier" && firstParameter.optional) { - this.raise(TSErrors.SetAccesorCannotHaveOptionalParameter, this.state.curPosition()); + this.raise(TSErrors.SetAccessorCannotHaveOptionalParameter, this.state.curPosition()); } if (firstParameter.type === "RestElement") { - this.raise(TSErrors.SetAccesorCannotHaveRestParameter, this.state.curPosition()); + this.raise(TSErrors.SetAccessorCannotHaveRestParameter, this.state.curPosition()); } } if (method[returnTypeKey]) { - this.raise(TSErrors.SetAccesorCannotHaveReturnType, method[returnTypeKey]); + this.raise(TSErrors.SetAccessorCannotHaveReturnType, method[returnTypeKey]); } } else { method.kind = "method"; @@ -31723,12 +31812,6 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { this.next(); return this.match(58); } - tsParseMappedTypeParameter() { - const node = this.startNode(); - node.name = this.tsParseTypeParameterName(); - node.constraint = this.tsExpectThenParseType(58); - return this.finishNode(node, "TSTypeParameter"); - } tsParseMappedType() { const node = this.startNode(); this.expect(5); @@ -31740,7 +31823,12 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { node.readonly = true; } this.expect(0); - node.typeParameter = this.tsParseMappedTypeParameter(); + { + const typeParameter = this.startNode(); + typeParameter.name = this.tsParseTypeParameterName(); + typeParameter.constraint = this.tsExpectThenParseType(58); + node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); + } node.nameType = this.eatContextual(93) ? this.tsParseType() : null; this.expect(3); if (this.match(53)) { @@ -32878,7 +32966,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { if (kind !== "const" || !!id.typeAnnotation) { this.raise(TSErrors.InitializerNotAllowedInAmbientContext, init); } else if (!isValidAmbientConstInitializer(init, this.hasPlugin("estree"))) { - this.raise(TSErrors.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference, init); + this.raise(TSErrors.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, init); } } return declaration; @@ -33311,15 +33399,21 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { } } isValidLVal(type, isUnparenthesizedInAssign, binding) { - return getOwn({ - TSTypeCastExpression: true, - TSParameterProperty: "parameter", - TSNonNullExpression: "expression", - TSInstantiationExpression: "expression", - TSAsExpression: (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true], - TSSatisfiesExpression: (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true], - TSTypeAssertion: (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true] - }, type) || super.isValidLVal(type, isUnparenthesizedInAssign, binding); + switch (type) { + case "TSTypeCastExpression": + return true; + case "TSParameterProperty": + return "parameter"; + case "TSNonNullExpression": + case "TSInstantiationExpression": + return "expression"; + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSTypeAssertion": + return (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true]; + default: + return super.isValidLVal(type, isUnparenthesizedInAssign, binding); + } } parseBindingAtom() { if (this.state.type === 78) { @@ -33445,12 +33539,17 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { return param; } tsInAmbientContext(cb) { - const oldIsAmbientContext = this.state.isAmbientContext; + const { + isAmbientContext: oldIsAmbientContext, + strict: oldStrict + } = this.state; this.state.isAmbientContext = true; + this.state.strict = false; try { return cb(); } finally { this.state.isAmbientContext = oldIsAmbientContext; + this.state.strict = oldStrict; } } parseClass(node, isStatement, optionalId) { @@ -33861,107 +33960,71 @@ var v8intrinsic = superClass => class V8IntrinsicMixin extends superClass { return this.parseV8Intrinsic() || super.parseExprAtom(refExpressionErrors); } }; -function hasPlugin(plugins, expectedConfig) { - const [expectedName, expectedOptions] = typeof expectedConfig === "string" ? [expectedConfig, {}] : expectedConfig; - const expectedKeys = Object.keys(expectedOptions); - const expectedOptionsIsEmpty = expectedKeys.length === 0; - return plugins.some(p => { - if (typeof p === "string") { - return expectedOptionsIsEmpty && p === expectedName; - } else { - const [pluginName, pluginOptions] = p; - if (pluginName !== expectedName) { - return false; - } - for (const key of expectedKeys) { - if (pluginOptions[key] !== expectedOptions[key]) { - return false; - } - } - return true; - } - }); -} -function getPluginOption(plugins, name, option) { - const plugin = plugins.find(plugin => { - if (Array.isArray(plugin)) { - return plugin[0] === name; - } else { - return plugin === name; - } - }); - if (plugin && Array.isArray(plugin) && plugin.length > 1) { - return plugin[1][option]; - } - return null; -} const PIPELINE_PROPOSALS = ["minimal", "fsharp", "hack", "smart"]; const TOPIC_TOKENS = ["^^", "@@", "^", "%", "#"]; -function validatePlugins(plugins) { - if (hasPlugin(plugins, "decorators")) { - if (hasPlugin(plugins, "decorators-legacy")) { +function validatePlugins(pluginsMap) { + if (pluginsMap.has("decorators")) { + if (pluginsMap.has("decorators-legacy")) { throw new Error("Cannot use the decorators and decorators-legacy plugin together"); } - const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport"); + const decoratorsBeforeExport = pluginsMap.get("decorators").decoratorsBeforeExport; if (decoratorsBeforeExport != null && typeof decoratorsBeforeExport !== "boolean") { throw new Error("'decoratorsBeforeExport' must be a boolean, if specified."); } - const allowCallParenthesized = getPluginOption(plugins, "decorators", "allowCallParenthesized"); + const allowCallParenthesized = pluginsMap.get("decorators").allowCallParenthesized; if (allowCallParenthesized != null && typeof allowCallParenthesized !== "boolean") { throw new Error("'allowCallParenthesized' must be a boolean."); } } - if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) { + if (pluginsMap.has("flow") && pluginsMap.has("typescript")) { throw new Error("Cannot combine flow and typescript plugins."); } - if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) { + if (pluginsMap.has("placeholders") && pluginsMap.has("v8intrinsic")) { throw new Error("Cannot combine placeholders and v8intrinsic plugins."); } - if (hasPlugin(plugins, "pipelineOperator")) { - const proposal = getPluginOption(plugins, "pipelineOperator", "proposal"); + if (pluginsMap.has("pipelineOperator")) { + var _pluginsMap$get; + const proposal = pluginsMap.get("pipelineOperator").proposal; if (!PIPELINE_PROPOSALS.includes(proposal)) { const proposalList = PIPELINE_PROPOSALS.map(p => `"${p}"`).join(", "); throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`); } - const recordAndTupleConfigItem = ["recordAndTuple", { - syntaxType: "hash" - }]; - const tupleSyntaxIsHash = hasPlugin(plugins, recordAndTupleConfigItem); + const tupleSyntaxIsHash = ((_pluginsMap$get = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get.syntaxType) === "hash"; if (proposal === "hack") { - if (hasPlugin(plugins, "placeholders")) { + if (pluginsMap.has("placeholders")) { throw new Error("Cannot combine placeholders plugin and Hack-style pipes."); } - if (hasPlugin(plugins, "v8intrinsic")) { + if (pluginsMap.has("v8intrinsic")) { throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes."); } - const topicToken = getPluginOption(plugins, "pipelineOperator", "topicToken"); + const topicToken = pluginsMap.get("pipelineOperator").topicToken; if (!TOPIC_TOKENS.includes(topicToken)) { const tokenList = TOPIC_TOKENS.map(t => `"${t}"`).join(", "); throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`); } if (topicToken === "#" && tupleSyntaxIsHash) { - throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(recordAndTupleConfigItem)}\`.`); + throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`); } } else if (proposal === "smart" && tupleSyntaxIsHash) { - throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(recordAndTupleConfigItem)}\`.`); + throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`); } } - if (hasPlugin(plugins, "moduleAttributes")) { + if (pluginsMap.has("moduleAttributes")) { { - if (hasPlugin(plugins, "importAssertions") || hasPlugin(plugins, "importAttributes")) { + if (pluginsMap.has("importAttributes") || pluginsMap.has("importAssertions")) { throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins."); } - const moduleAttributesVersionPluginOption = getPluginOption(plugins, "moduleAttributes", "version"); + const moduleAttributesVersionPluginOption = pluginsMap.get("moduleAttributes").version; if (moduleAttributesVersionPluginOption !== "may-2020") { throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'."); } } } - if (hasPlugin(plugins, "importAssertions") && hasPlugin(plugins, "importAttributes")) { + if (pluginsMap.has("importAttributes") && pluginsMap.has("importAssertions")) { throw new Error("Cannot combine importAssertions and importAttributes plugins."); } - if (hasPlugin(plugins, "recordAndTuple")) { - const syntaxType = getPluginOption(plugins, "recordAndTuple", "syntaxType"); + if (pluginsMap.has("recordAndTuple")) { + const syntaxType = pluginsMap.get("recordAndTuple").syntaxType; if (syntaxType != null) { { const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"]; @@ -33971,12 +34034,12 @@ function validatePlugins(plugins) { } } } - if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) { + if (pluginsMap.has("asyncDoExpressions") && !pluginsMap.has("doExpressions")) { const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins."); error.missingPlugins = "doExpressions"; throw error; } - if (hasPlugin(plugins, "optionalChainingAssign") && getPluginOption(plugins, "optionalChainingAssign", "version") !== "2023-07") { + if (pluginsMap.has("optionalChainingAssign") && pluginsMap.get("optionalChainingAssign").version !== "2023-07") { throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is '2023-07'."); } } @@ -34147,9 +34210,7 @@ class ExpressionParser extends LValParser { } this.next(); node.right = this.parseMaybeAssign(); - this.checkLVal(left, { - in: this.finishNode(node, "AssignmentExpression") - }); + this.checkLVal(left, this.finishNode(node, "AssignmentExpression")); return node; } else if (ownExpressionErrors) { this.checkExpressionErrors(refExpressionErrors, true); @@ -34290,7 +34351,7 @@ class ExpressionParser extends LValParser { parseMaybeUnary(refExpressionErrors, sawUnary) { const startLoc = this.state.startLoc; const isAwait = this.isContextual(96); - if (isAwait && this.isAwaitAllowed()) { + if (isAwait && this.recordAwaitIfAllowed()) { this.next(); const expr = this.parseAwait(startLoc); if (!sawUnary) this.checkExponentialAfterUnary(expr); @@ -34339,9 +34400,7 @@ class ExpressionParser extends LValParser { parseUpdate(node, update, refExpressionErrors) { if (update) { const updateExpressionNode = node; - this.checkLVal(updateExpressionNode.argument, { - in: this.finishNode(updateExpressionNode, "UpdateExpression") - }); + this.checkLVal(updateExpressionNode.argument, this.finishNode(updateExpressionNode, "UpdateExpression")); return node; } const startLoc = this.state.startLoc; @@ -34353,9 +34412,7 @@ class ExpressionParser extends LValParser { node.prefix = false; node.argument = expr; this.next(); - this.checkLVal(expr, { - in: expr = this.finishNode(node, "UpdateExpression") - }); + this.checkLVal(expr, expr = this.finishNode(node, "UpdateExpression")); } return expr; } @@ -34922,10 +34979,12 @@ class ExpressionParser extends LValParser { return this.parseLiteral(value, "DecimalLiteral"); } parseRegExpLiteral(value) { - const node = this.parseLiteral(value.value, "RegExpLiteral"); + const node = this.startNode(); + this.addExtra(node, "raw", this.input.slice(node.start, this.state.end)); node.pattern = value.pattern; node.flags = value.flags; - return node; + this.next(); + return this.finishNode(node, "RegExpLiteral"); } parseBooleanLiteral(value) { const node = this.startNode(); @@ -35425,12 +35484,7 @@ class ExpressionParser extends LValParser { type: "FormalParameters" }; for (const param of node.params) { - this.checkLVal(param, { - in: formalParameters, - binding: 5, - checkClashes, - strictModeChanged - }); + this.checkLVal(param, formalParameters, 5, checkClashes, strictModeChanged); } } parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) { @@ -35551,12 +35605,12 @@ class ExpressionParser extends LValParser { } } } - isAwaitAllowed() { - if (this.prodParam.hasAwait) return true; - if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) { - return true; + recordAwaitIfAllowed() { + const isAwaitAllowed = this.prodParam.hasAwait || this.options.allowAwaitOutsideFunction && !this.scope.inFunction; + if (isAwaitAllowed && !this.scope.inFunction) { + this.state.hasTopLevelAwait = true; } - return false; + return isAwaitAllowed; } parseAwait(startLoc) { const node = this.startNodeAt(startLoc); @@ -35895,12 +35949,15 @@ class StatementParser extends ExpressionParser { program.sourceType = sourceType; program.interpreter = this.parseInterpreterDirective(); this.parseBlockBody(program, true, true, end); - if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) { - for (const [localName, at] of Array.from(this.scope.undefinedExports)) { - this.raise(Errors.ModuleExportUndefined, at, { - localName - }); + if (this.inModule) { + if (!this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) { + for (const [localName, at] of Array.from(this.scope.undefinedExports)) { + this.raise(Errors.ModuleExportUndefined, at, { + localName + }); + } } + this.addExtra(program, "topLevelAwait", this.state.hasTopLevelAwait); } let finishedProgram; if (end === 139) { @@ -35964,10 +36021,10 @@ class StatementParser extends ExpressionParser { const nextCh = this.codePointAtPos(next); return this.chStartsBindingPattern(nextCh) || this.chStartsBindingIdentifier(nextCh, next); } - hasInLineFollowingBindingIdentifier() { + hasInLineFollowingBindingIdentifierOrBrace() { const next = this.nextTokenInLineStart(); const nextCh = this.codePointAtPos(next); - return this.chStartsBindingIdentifier(nextCh, next); + return nextCh === 123 || this.chStartsBindingIdentifier(nextCh, next); } startsUsingForOf() { const { @@ -36020,12 +36077,12 @@ class StatementParser extends ExpressionParser { return this.parseStatementContent(flags, decorators); } parseStatementContent(flags, decorators) { - const starttype = this.state.type; + const startType = this.state.type; const node = this.startNode(); const allowDeclaration = !!(flags & 2); const allowFunctionDeclaration = !!(flags & 4); const topLevel = flags & 1; - switch (starttype) { + switch (startType) { case 60: return this.parseBreakContinueStatement(node, true); case 63: @@ -36057,7 +36114,7 @@ class StatementParser extends ExpressionParser { return this.parseTryStatement(node); case 96: if (!this.state.containsEsc && this.startsAwaitUsing()) { - if (!this.isAwaitAllowed()) { + if (!this.recordAwaitIfAllowed()) { this.raise(Errors.AwaitUsingNotInAsyncContext, node); } else if (!allowDeclaration) { this.raise(Errors.UnexpectedLexicalDeclaration, node); @@ -36067,7 +36124,7 @@ class StatementParser extends ExpressionParser { } break; case 107: - if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifier()) { + if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifierOrBrace()) { break; } this.expectPlugin("explicitResourceManagement"); @@ -36124,7 +36181,7 @@ class StatementParser extends ExpressionParser { } this.next(); let result; - if (starttype === 83) { + if (startType === 83) { result = this.parseImport(node); if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { this.sawUnambiguousESM = true; @@ -36151,7 +36208,7 @@ class StatementParser extends ExpressionParser { } const maybeName = this.state.value; const expr = this.parseExpression(); - if (tokenIsIdentifier(starttype) && expr.type === "Identifier" && this.eat(14)) { + if (tokenIsIdentifier(startType) && expr.type === "Identifier" && this.eat(14)) { return this.parseLabeledStatement(node, maybeName, expr, flags); } else { return this.parseExpressionStatement(node, expr, decorators); @@ -36304,8 +36361,9 @@ class StatementParser extends ExpressionParser { this.next(); this.state.labels.push(loopLabel); let awaitAt = null; - if (this.isAwaitAllowed() && this.eatContextual(96)) { - awaitAt = this.state.lastTokStartLoc; + if (this.isContextual(96) && this.recordAwaitIfAllowed()) { + awaitAt = this.state.startLoc; + this.next(); } this.scope.enter(0); this.expect(10); @@ -36325,7 +36383,7 @@ class StatementParser extends ExpressionParser { let kind; if (startsWithAwaitUsing) { kind = "await using"; - if (!this.isAwaitAllowed()) { + if (!this.recordAwaitIfAllowed()) { this.raise(Errors.AwaitUsingNotInAsyncContext, this.state.startLoc); } this.next(); @@ -36365,9 +36423,7 @@ class StatementParser extends ExpressionParser { this.toAssignable(init, true); const type = isForOf ? "ForOfStatement" : "ForInStatement"; this.checkLVal(init, { - in: { - type - } + type }); return this.parseForIn(node, init, awaitAt); } else { @@ -36454,11 +36510,8 @@ class StatementParser extends ExpressionParser { const param = this.parseBindingAtom(); this.scope.enter(this.options.annexB && param.type === "Identifier" ? 8 : 0); this.checkLVal(param, { - in: { - type: "CatchClause" - }, - binding: 9 - }); + type: "CatchClause" + }, 9); return param; } parseTryStatement(node) { @@ -36661,12 +36714,14 @@ class StatementParser extends ExpressionParser { } parseVarId(decl, kind) { const id = this.parseBindingAtom(); + if (kind === "using" || kind === "await using") { + if (id.type === "ArrayPattern" || id.type === "ObjectPattern") { + this.raise(Errors.UsingDeclarationHasBindingPattern, id.loc.start); + } + } this.checkLVal(id, { - in: { - type: "VariableDeclarator" - }, - binding: kind === "var" ? 5 : 8201 - }); + type: "VariableDeclarator" + }, kind === "var" ? 5 : 8201); decl.id = id; } parseAsyncFunctionExpression(node) { @@ -37360,7 +37415,7 @@ class StatementParser extends ExpressionParser { parseModuleExportName() { if (this.match(133)) { const result = this.parseStringLiteral(this.state.value); - const surrogate = result.value.match(loneSurrogate); + const surrogate = loneSurrogate.exec(result.value); if (surrogate) { this.raise(Errors.ModuleExportNameHasLoneSurrogate, result, { surrogateCharCode: surrogate[0].charCodeAt(0) @@ -37511,11 +37566,8 @@ class StatementParser extends ExpressionParser { } finishImportSpecifier(specifier, type, bindingType = 8201) { this.checkLVal(specifier.local, { - in: { - type - }, - binding: bindingType - }); + type + }, bindingType); return this.finishNode(specifier, type); } parseImportAttributes() { @@ -37681,12 +37733,12 @@ class StatementParser extends ExpressionParser { } } class Parser extends StatementParser { - constructor(options, input) { + constructor(options, input, pluginsMap) { options = getOptions(options); super(options, input); this.options = options; this.initializeScopes(); - this.plugins = pluginsMap(this.options.plugins); + this.plugins = pluginsMap; this.filename = options.sourceFilename; } getScopeHandler() { @@ -37704,14 +37756,6 @@ class Parser extends StatementParser { return file; } } -function pluginsMap(plugins) { - const pluginMap = new Map(); - for (const plugin of plugins) { - const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}]; - if (!pluginMap.has(name)) pluginMap.set(name, options || {}); - } - return pluginMap; -} function parse(input, options) { var _options; if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") { @@ -37760,23 +37804,40 @@ function generateExportedTokenTypes(internalTokenTypes) { const tokTypes = generateExportedTokenTypes(tt); function getParser(options, input) { let cls = Parser; + const pluginsMap = new Map(); if (options != null && options.plugins) { - validatePlugins(options.plugins); - cls = getParserClass(options.plugins); + for (const plugin of options.plugins) { + let name, opts; + if (typeof plugin === "string") { + name = plugin; + } else { + [name, opts] = plugin; + } + if (!pluginsMap.has(name)) { + pluginsMap.set(name, opts || {}); + } + } + validatePlugins(pluginsMap); + cls = getParserClass(pluginsMap); } - return new cls(options, input); + return new cls(options, input, pluginsMap); } -const parserClassCache = {}; -function getParserClass(pluginsFromOptions) { - const pluginList = mixinPluginNames.filter(name => hasPlugin(pluginsFromOptions, name)); - const key = pluginList.join("/"); - let cls = parserClassCache[key]; +const parserClassCache = new Map(); +function getParserClass(pluginsMap) { + const pluginList = []; + for (const name of mixinPluginNames) { + if (pluginsMap.has(name)) { + pluginList.push(name); + } + } + const key = pluginList.join("|"); + let cls = parserClassCache.get(key); if (!cls) { cls = Parser; for (const plugin of pluginList) { cls = mixinPlugins[plugin](cls); } - parserClassCache[key] = cls; + parserClassCache.set(key, cls); } return cls; } @@ -38395,9 +38456,24 @@ function applyReplacement(placeholder, ast, replacement) { throw new Error("Cannot replace single expression with an array."); } } + function set(parent, key, value) { + const node = parent[key]; + parent[key] = value; + if (node.type === "Identifier") { + if (node.typeAnnotation) { + value.typeAnnotation = node.typeAnnotation; + } + if (node.optional) { + value.optional = node.optional; + } + if (node.decorators) { + value.decorators = node.decorators; + } + } + } if (index === undefined) { validate(parent, key, replacement); - parent[key] = replacement; + set(parent, key, replacement); } else { const items = parent[key].slice(); if (placeholder.type === "statement" || placeholder.type === "param") { @@ -38406,10 +38482,10 @@ function applyReplacement(placeholder, ast, replacement) { } else if (Array.isArray(replacement)) { items.splice(index, 1, ...replacement); } else { - items[index] = replacement; + set(items, index, replacement); } } else { - items[index] = replacement; + set(items, index, replacement); } validate(parent, key, items); parent[key] = items; @@ -48952,6 +49028,9 @@ function cloneNodeInternal(node, deep = true, withoutLoc = false, commentsCache) if (hasOwn(node, "typeAnnotation")) { newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc, commentsCache) : node.typeAnnotation; } + if (hasOwn(node, "decorators")) { + newNode.decorators = deep ? cloneIfNodeOrArray(node.decorators, true, withoutLoc, commentsCache) : node.decorators; + } } else if (!hasOwn(_index.NODE_FIELDS, type)) { throw new Error(`Unknown node type: "${type}"`); } else { @@ -49727,7 +49806,7 @@ function valueToNode(value) { } if (isRegExp(value)) { const pattern = value.source; - const flags = value.toString().match(/\/([a-z]+|)$/)[1]; + const flags = /\/([a-z]*)$/.exec(value.toString())[1]; return (0, _index.regExpLiteral)(pattern, flags); } if (Array.isArray(value)) { @@ -49950,7 +50029,8 @@ defineType("DebuggerStatement", { aliases: ["Statement"] }); defineType("DoWhileStatement", { - visitor: ["test", "body"], + builder: ["test", "body"], + visitor: ["body", "test"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") @@ -50068,7 +50148,7 @@ const functionDeclarationCommon = () => Object.assign({}, functionCommon(), { exports.functionDeclarationCommon = functionDeclarationCommon; defineType("FunctionDeclaration", { builder: ["id", "params", "body", "generator", "async"], - visitor: ["id", "params", "body", "returnType", "typeParameters"], + visitor: ["id", "typeParameters", "params", "returnType", "body"], fields: Object.assign({}, functionDeclarationCommon(), functionTypeAnnotationCommon(), { body: { validate: (0, _utils.assertNodeType)("BlockStatement") @@ -50338,6 +50418,7 @@ defineType("ObjectExpression", { }); defineType("ObjectMethod", { builder: ["kind", "key", "params", "body", "computed", "generator", "async"], + visitor: ["decorators", "key", "typeParameters", "params", "returnType", "body"], fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), { kind: Object.assign({ validate: (0, _utils.assertOneOf)("method", "get", "set") @@ -50367,7 +50448,6 @@ defineType("ObjectMethod", { validate: (0, _utils.assertNodeType)("BlockStatement") } }), - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] }); defineType("ObjectProperty", { @@ -50670,7 +50750,7 @@ defineType("ArrayPattern", { }); defineType("ArrowFunctionExpression", { builder: ["params", "body", "async"], - visitor: ["params", "body", "returnType", "typeParameters"], + visitor: ["typeParameters", "params", "returnType", "body"], aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), { expression: { @@ -50695,7 +50775,7 @@ defineType("ClassBody", { }); defineType("ClassExpression", { builder: ["id", "superClass", "body", "decorators"], - visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], + visitor: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "mixins", "implements", "body"], aliases: ["Scopable", "Class", "Expression"], fields: { id: { @@ -50962,7 +51042,8 @@ defineType("ImportNamespaceSpecifier", { } }); defineType("ImportSpecifier", { - visitor: ["local", "imported"], + visitor: ["imported", "local"], + builder: ["local", "imported"], aliases: ["ModuleSpecifier"], fields: { local: { @@ -51082,7 +51163,7 @@ exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; defineType("ClassMethod", { aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"], - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + visitor: ["decorators", "key", "typeParameters", "params", "returnType", "body"], fields: Object.assign({}, classMethodOrDeclareMethodCommon(), functionTypeAnnotationCommon(), { body: { validate: (0, _utils.assertNodeType)("BlockStatement") @@ -51113,7 +51194,7 @@ defineType("Super", { aliases: ["Expression"] }); defineType("TaggedTemplateExpression", { - visitor: ["tag", "quasi", "typeParameters"], + visitor: ["tag", "typeParameters", "quasi"], builder: ["tag", "quasi"], aliases: ["Expression"], fields: { @@ -51293,7 +51374,7 @@ defineType("OptionalCallExpression", { } }); defineType("ClassProperty", { - visitor: ["key", "value", "typeAnnotation", "decorators"], + visitor: ["decorators", "key", "typeAnnotation", "value"], builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], aliases: ["Property"], fields: Object.assign({}, classMethodOrPropertyCommon(), { @@ -51328,7 +51409,7 @@ defineType("ClassProperty", { }) }); defineType("ClassAccessorProperty", { - visitor: ["key", "value", "typeAnnotation", "decorators"], + visitor: ["decorators", "key", "typeAnnotation", "value"], builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], aliases: ["Property", "Accessor"], fields: Object.assign({}, classMethodOrPropertyCommon(), { @@ -51373,7 +51454,7 @@ defineType("ClassAccessorProperty", { }) }); defineType("ClassPrivateProperty", { - visitor: ["key", "value", "decorators", "typeAnnotation"], + visitor: ["decorators", "key", "typeAnnotation", "value"], builder: ["key", "value", "decorators", "static"], aliases: ["Property", "Private"], fields: { @@ -51412,7 +51493,7 @@ defineType("ClassPrivateProperty", { }); defineType("ClassPrivateMethod", { builder: ["kind", "key", "params", "body", "static"], - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + visitor: ["decorators", "key", "typeParameters", "params", "returnType", "body"], aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], fields: Object.assign({}, classMethodOrDeclareMethodCommon(), functionTypeAnnotationCommon(), { kind: { @@ -51854,7 +51935,8 @@ defineType("ObjectTypeAnnotation", { } }); defineType("ObjectTypeInternalSlot", { - visitor: ["id", "value", "optional", "static", "method"], + visitor: ["id", "value"], + builder: ["id", "value", "optional", "static", "method"], aliases: ["UserWhitespacable"], fields: { id: (0, _utils.validateType)("Identifier"), @@ -51873,7 +51955,8 @@ defineType("ObjectTypeCallProperty", { } }); defineType("ObjectTypeIndexer", { - visitor: ["id", "key", "value", "variance"], + visitor: ["variance", "id", "key", "value"], + builder: ["id", "key", "value", "variance"], aliases: ["UserWhitespacable"], fields: { id: (0, _utils.validateOptionalType)("Identifier"), @@ -51915,7 +51998,8 @@ defineType("OpaqueType", { } }); defineType("QualifiedTypeIdentifier", { - visitor: ["id", "qualification"], + visitor: ["qualification", "id"], + builder: ["id", "qualification"], fields: { id: (0, _utils.validateType)("Identifier"), qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) @@ -52714,14 +52798,16 @@ defineType("TSIndexedAccessType", { }); defineType("TSMappedType", { aliases: ["TSType"], - visitor: ["typeParameter", "typeAnnotation", "nameType"], - fields: { + visitor: ["typeParameter", "nameType", "typeAnnotation"], + builder: ["typeParameter", "typeAnnotation", "nameType"], + fields: Object.assign({}, { + typeParameter: (0, _utils.validateType)("TSTypeParameter") + }, { readonly: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")), - typeParameter: (0, _utils.validateType)("TSTypeParameter"), optional: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")), typeAnnotation: (0, _utils.validateOptionalType)("TSType"), nameType: (0, _utils.validateOptionalType)("TSType") - } + }) }); defineType("TSLiteralType", { aliases: ["TSType", "TSBaseType"], @@ -53047,7 +53133,7 @@ function assertEach(callback) { } function assertOneOf(...values) { function validate(node, key, val) { - if (values.indexOf(val) < 0) { + if (!values.includes(val)) { throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`); } } @@ -53190,7 +53276,7 @@ function defineType(type, opts = {}) { const aliases = opts.aliases || inherits.aliases || []; const builder = opts.builder || inherits.builder || opts.visitor || []; for (const k of Object.keys(opts)) { - if (validTypeOpts.indexOf(k) === -1) { + if (!validTypeOpts.includes(k)) { throw new Error(`Unknown type option "${k}" on ${type}`); } } @@ -53202,7 +53288,7 @@ function defineType(type, opts = {}) { } for (const key of Object.keys(fields)) { const field = fields[key]; - if (field.default !== undefined && builder.indexOf(key) === -1) { + if (field.default !== undefined && !builder.includes(key)) { field.optional = true; } if (field.default === undefined) { @@ -53211,7 +53297,7 @@ function defineType(type, opts = {}) { field.validate = assertValueType(getType(field.default)); } for (const k of Object.keys(field)) { - if (validFieldKeys.indexOf(k) === -1) { + if (!validFieldKeys.includes(k)) { throw new Error(`Unknown field key "${k}" on ${type}.${key}`); } } @@ -53278,8 +53364,10 @@ var _exportNames = { removeProperties: true, removePropertiesDeep: true, removeTypeDuplicates: true, + getAssignmentIdentifiers: true, getBindingIdentifiers: true, getOuterBindingIdentifiers: true, + getFunctionName: true, traverse: true, traverseFast: true, shallowEqual: true, @@ -53399,12 +53487,24 @@ Object.defineProperty(exports, "ensureBlock", ({ return _ensureBlock.default; } })); +Object.defineProperty(exports, "getAssignmentIdentifiers", ({ + enumerable: true, + get: function () { + return _getAssignmentIdentifiers.default; + } +})); Object.defineProperty(exports, "getBindingIdentifiers", ({ enumerable: true, get: function () { return _getBindingIdentifiers.default; } })); +Object.defineProperty(exports, "getFunctionName", ({ + enumerable: true, + get: function () { + return _getFunctionName.default; + } +})); Object.defineProperty(exports, "getOuterBindingIdentifiers", ({ enumerable: true, get: function () { @@ -53758,8 +53858,10 @@ var _prependToMemberExpression = __nccwpck_require__(6676); var _removeProperties = __nccwpck_require__(7517); var _removePropertiesDeep = __nccwpck_require__(665); var _removeTypeDuplicates = __nccwpck_require__(1009); +var _getAssignmentIdentifiers = __nccwpck_require__(2901); var _getBindingIdentifiers = __nccwpck_require__(3331); var _getOuterBindingIdentifiers = __nccwpck_require__(3102); +var _getFunctionName = __nccwpck_require__(3591); var _traverse = __nccwpck_require__(9018); Object.keys(_traverse).forEach(function (key) { if (key === "default" || key === "__esModule") return; @@ -53865,7 +53967,7 @@ function removeTypeDuplicates(nodesIn) { for (let i = 0; i < nodes.length; i++) { const node = nodes[i]; if (!node) continue; - if (types.indexOf(node) >= 0) { + if (types.includes(node)) { continue; } if ((0, _index.isAnyTypeAnnotation)(node)) { @@ -54053,7 +54155,7 @@ function removeTypeDuplicates(nodesIn) { for (let i = 0; i < nodes.length; i++) { const node = nodes[i]; if (!node) continue; - if (types.indexOf(node) >= 0) { + if (types.includes(node)) { continue; } if ((0, _index.isTSAnyKeyword)(node)) { @@ -54101,6 +54203,62 @@ function removeTypeDuplicates(nodesIn) { //# sourceMappingURL=removeTypeDuplicates.js.map +/***/ }), + +/***/ 2901: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getAssignmentIdentifiers; +function getAssignmentIdentifiers(node) { + const search = [].concat(node); + const ids = Object.create(null); + while (search.length) { + const id = search.pop(); + if (!id) continue; + switch (id.type) { + case "ArrayPattern": + search.push(...id.elements); + break; + case "AssignmentExpression": + case "AssignmentPattern": + case "ForInStatement": + case "ForOfStatement": + search.push(id.left); + break; + case "ObjectPattern": + search.push(...id.properties); + break; + case "ObjectProperty": + search.push(id.value); + break; + case "RestElement": + case "UpdateExpression": + search.push(id.argument); + break; + case "UnaryExpression": + if (id.operator === "delete") { + search.push(id.argument); + } + break; + case "Identifier": + ids[id.name] = id; + break; + default: + break; + } + } + return ids; +} + +//# sourceMappingURL=getAssignmentIdentifiers.js.map + + /***/ }), /***/ 3331: @@ -54153,14 +54311,18 @@ function getBindingIdentifiers(node, duplicates, outerOnly, newBindingsOnly) { const key = keys[i]; const nodes = id[key]; if (nodes) { - Array.isArray(nodes) ? search.push(...nodes) : search.push(nodes); + if (Array.isArray(nodes)) { + search.push(...nodes); + } else { + search.push(nodes); + } } } } } return ids; } -getBindingIdentifiers.keys = { +const keys = { DeclareClass: ["id"], DeclareFunction: ["id"], DeclareModule: ["id"], @@ -54201,10 +54363,82 @@ getBindingIdentifiers.keys = { VariableDeclaration: ["declarations"], VariableDeclarator: ["id"] }; +getBindingIdentifiers.keys = keys; //# sourceMappingURL=getBindingIdentifiers.js.map +/***/ }), + +/***/ 3591: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = getFunctionName; +var _index = __nccwpck_require__(2605); +function getNameFromLiteralId(id) { + if ((0, _index.isNullLiteral)(id)) { + return "null"; + } + if ((0, _index.isRegExpLiteral)(id)) { + return `/${id.pattern}/${id.flags}`; + } + if ((0, _index.isTemplateLiteral)(id)) { + return id.quasis.map(quasi => quasi.value.raw).join(""); + } + if (id.value !== undefined) { + return String(id.value); + } + return null; +} +function getObjectMemberKey(node) { + if (!node.computed || (0, _index.isLiteral)(node.key)) { + return node.key; + } +} +function getFunctionName(node, parent) { + if ("id" in node && node.id) { + return { + name: node.id.name, + originalNode: node.id + }; + } + let prefix = ""; + let id; + if ((0, _index.isObjectProperty)(parent, { + value: node + })) { + id = getObjectMemberKey(parent); + } else if ((0, _index.isObjectMethod)(node) || (0, _index.isClassMethod)(node)) { + id = getObjectMemberKey(node); + if (node.kind === "get") prefix = "get ";else if (node.kind === "set") prefix = "set "; + } else if ((0, _index.isVariableDeclarator)(parent, { + init: node + })) { + id = parent.id; + } else if ((0, _index.isAssignmentExpression)(parent, { + operator: "=", + right: node + })) { + id = parent.left; + } + if (!id) return null; + const name = (0, _index.isLiteral)(id) ? getNameFromLiteralId(id) : (0, _index.isIdentifier)(id) ? id.name : (0, _index.isPrivateName)(id) ? id.id.name : null; + if (name == null) return null; + return { + name: prefix + name, + originalNode: id + }; +} + +//# sourceMappingURL=getFunctionName.js.map + + /***/ }), /***/ 3102: @@ -54409,7 +54643,7 @@ function cleanJSXElementLiteralChild(child, args) { const lines = child.value.split(/\r\n|\n|\r/); let lastNonEmptyLine = 0; for (let i = 0; i < lines.length; i++) { - if (lines[i].match(/[^ \t]/)) { + if (/[^ \t]/.exec(lines[i])) { lastNonEmptyLine = i; } } @@ -54421,10 +54655,10 @@ function cleanJSXElementLiteralChild(child, args) { const isLastNonEmptyLine = i === lastNonEmptyLine; let trimmedLine = line.replace(/\t/g, " "); if (!isFirstLine) { - trimmedLine = trimmedLine.replace(/^[ ]+/, ""); + trimmedLine = trimmedLine.replace(/^ +/, ""); } if (!isLastLine) { - trimmedLine = trimmedLine.replace(/[ ]+$/, ""); + trimmedLine = trimmedLine.replace(/ +$/, ""); } if (trimmedLine) { if (!isLastNonEmptyLine) { @@ -57303,7 +57537,7 @@ function isBinding(node, parent, grandparent) { const key = keys[i]; const val = parent[key]; if (Array.isArray(val)) { - if (val.indexOf(node) >= 0) return true; + if (val.includes(node)) return true; } else { if (val === node) return true; } diff --git a/.storybook/webpack.config.ts b/.storybook/webpack.config.ts index 0aa38f2e3b82..f0fff8bda698 100644 --- a/.storybook/webpack.config.ts +++ b/.storybook/webpack.config.ts @@ -94,6 +94,11 @@ const webpackConfig = ({config}: {config: Configuration}) => { loader: require.resolve('@svgr/webpack'), }); + config.module.rules?.push({ + test: /pdf\.worker\.mjs$/, + type: 'asset/source', + }); + config.plugins.push( new DefinePlugin({ __DEV__: process.env.NODE_ENV === 'development', diff --git a/android/app/build.gradle b/android/app/build.gradle index 7634aea8f5f9..11430a438fc9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -110,8 +110,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1009003601 - versionName "9.0.36-1" + versionCode 1009003700 + versionName "9.0.37-0" // Supported language variants must be declared here to avoid from being removed during the compilation. // This also helps us to not include unnecessary language variants in the APK. resConfigs "en", "es" diff --git a/babel.config.js b/babel.config.js index dcf12ba4d91e..9d7224ec4436 100644 --- a/babel.config.js +++ b/babel.config.js @@ -17,9 +17,9 @@ const defaultPlugins = [ '@babel/transform-runtime', '@babel/plugin-proposal-class-properties', - // We use `transform-class-properties` for transforming ReactNative libraries and do not use it for our own + // We use `@babel/plugin-transform-class-properties` for transforming ReactNative libraries and do not use it for our own // source code transformation as we do not use class property assignment. - 'transform-class-properties', + '@babel/plugin-transform-class-properties', // Keep it last 'react-native-reanimated/plugin', diff --git a/config/webpack/webpack.common.ts b/config/webpack/webpack.common.ts index 33fd9131eca0..0640d007b960 100644 --- a/config/webpack/webpack.common.ts +++ b/config/webpack/webpack.common.ts @@ -123,7 +123,7 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment): {from: 'node_modules/pdfjs-dist/cmaps/', to: 'cmaps/'}, ], }), - new EnvironmentPlugin({JEST_WORKER_ID: null}), + new EnvironmentPlugin({JEST_WORKER_ID: ''}), new IgnorePlugin({ resourceRegExp: /^\.\/locale$/, contextRegExp: /moment$/, @@ -165,7 +165,7 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment): // We are importing this worker as a string by using asset/source otherwise it will default to loading via an HTTPS request later. // This causes issues if we have gone offline before the pdfjs web worker is set up as we won't be able to load it from the server. { - test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.js'), + test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.mjs'), type: 'asset/source', }, diff --git a/contributingGuides/CONTRIBUTING.md b/contributingGuides/CONTRIBUTING.md index 4f949aa6b8b4..82e368214223 100644 --- a/contributingGuides/CONTRIBUTING.md +++ b/contributingGuides/CONTRIBUTING.md @@ -4,7 +4,7 @@ Welcome! Thanks for checking out the New Expensify app and taking the time to co ## Getting Started If you would like to become an Expensify contributor, the first step is to read this document in its **entirety**. The second step is to review the README guidelines [here](https://github.com/Expensify/App/blob/main/README.md) to understand our coding philosophy and for a general overview of the code repository (i.e. how to run the app locally, testing, storage, our app philosophy, etc). Please read both documents before asking questions, as it may be covered within the documentation. -#### Test Accounts +### Test Accounts You can create as many accounts as needed in order to test your changes directly from [the app](https://new.expensify.com/). An initial account can be created when logging in for the first time, and additional accounts can be created by opening the "New Chat" or "Group Chat" pages via the Global Create menu, inputting a valid email or phone number, and tapping the user's avatar. Do not use Expensify employee or customer accounts for testing. **Notes**: @@ -12,17 +12,17 @@ You can create as many accounts as needed in order to test your changes directly 1. When testing chat functionality in the app please do this between accounts you or your fellow contributors own - **do not test chatting with Concierge**, as this diverts to our customer support team. Thank you. 2. A member of our customer onboarding team gets auto-assigned to every new policy created by a non-paying account to help them set up. Please **do not interact with these teams, ask for calls, or support on your issues.** If you do need to test functionality inside the defaultRooms (#admins & #announce) for any issues you’re working on, please let them know that you are a contributor and don’t need assistance. They will proceed to ignore the chat. -##### Generating Multiple Test Accounts +#### Generating Multiple Test Accounts You can generate multiple test accounts by using a `+` postfix, for example if your email is test@test.com, you can create multiple New Expensify accounts connected to the same email address by using test+123@test.com, test+456@test.com, etc. -##### High Traffic Accounts +#### High Traffic Accounts All internal engineers, contributors, and C+ members are required to test with a “high traffic” account against the staging or production web servers. Use these Google forms to manage your high-traffic accounts. You'll need to authenticate via Google first. 1. [Make an account high-traffic](https://docs.google.com/forms/d/e/1FAIpQLScpiS0Mo-HA5xHPsvDow79yTsMBgF0wjuqc0K37lTK5fheB8Q/viewform) 2. [Remove a high-traffic account](https://docs.google.com/forms/d/e/1FAIpQLSd9_FDav83pnhhtu1KGAKIpf2yttQ_0Bvq1b9nuFM1-wbL11Q/viewform) -#### Working on beta features +### Working on beta features Some features are locked behind beta flags while development is ongoing. As a contributor you can work on these beta features locally by overriding the [`Permissions.canUseAllBetas` function](https://github.com/Expensify/App/blob/5e268df7f2989ed04bc64c0c86ed77faf134554d/src/libs/Permissions.js#L10-L12) to return `true`. ## Code of Conduct @@ -67,35 +67,76 @@ The 168 hours (aka 7 days) will be measured by calculating the time between when ## Finding Jobs A job could be fixing a bug or working on a new feature. There are two ways you can find a job that you can contribute to: -#### Finding a job that Expensify posted +### Finding a job that Expensify posted This is the most common scenario for contributors. The Expensify team posts new jobs to the Upwork job list [here](https://www.upwork.com/nx/search/jobs/?nbs=1&q=expensify%20react%20native&sort=recency&user_location_match=2) (you must be signed in to Upwork to view jobs). Each job in Upwork has a corresponding GitHub issue, which will include instructions to follow. You can also view all open jobs in the Expensify/App GH repository by searching for GH issues with the [`Help Wanted` label](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22). Lastly, you can follow the [@ExpensifyOSS](https://twitter.com/ExpensifyOSS) Twitter account to see a live feed of jobs that are posted. ->**Note:** Our problem solving approach at Expensify is to focus on high value problems and avoid small optimizations with results that are difficult to measure. We also prefer to identify and solve problems at their root. Given that, please ensure all proposed jobs fix a specific problem in a measurable way with evidence so they are easy to evaluate. Here's an example of a good problem/solution: +### Posting proposals for new projects +Our problem solving approach at Expensify is to focus on high value problems and avoid small optimizations with results that are difficult to measure. We also prefer to identify and solve problems at their root. Given that, please ensure all proposed jobs fix a specific problem in a measurable way with evidence so they are easy to evaluate. If you want to propose that Expensify implement some idea you have, you should post it in the #expensify-open-source slack room with the `Strategy`/`Problem`/`Solution` format. + +#### How to write a good problem statement +A good problem statement is in this format: + +> **Problem**: When X happens, it causes Y, which prevents us from Z. + +Just state the direct cause and effect, with minimal fluff and analysis. + +In short, a good problem statement makes no mention whatsoever of the desired solution. This sounds obvious, but is easier said than done. The point of not mentioning the solution is to force you to identify the actual problem you are trying to solve, and not waving your hands with a "reverse solution statement". For example: + +**Bad:** +> **Problem:** We don't have a car +> +> **Solution:** Buy a car. + + +**Good:** +> **Problem:** I want to buy a new chair, but it's too heavy for me to carry it home, so I can't sit in it. +> +> **Solution:** Buy a truck. > ->**Problem:** The app start up time has regressed because we introduced "New Feature" in PR #12345 and is now 1042ms slower because `SomeComponent` is re-rendering 42 times. +> **Solution:** Rent a truck. > ->**Solution:** Start up time will perceptibly decrease by 1042ms if we prevent the unnecessary re-renders of this component. +> **Solution:** Hire movers. +> +> **Solution:** Buy a bean bag. -## Working on Expensify Jobs -*Reminder: For technical guidance, please refer to the [README](https://github.com/Expensify/App/blob/main/README.md)*. -## Posting Ideas +A real problem description enables a much richer discussion to find more creative solutions. Having multiple viable solutions is a good indicator that your problem statement is *NOT* a reverse solution description. + +#### How to write a bad problem statement + +Similarly, a sign that you are actually doing a reverse solution statement is if it contains phrases like: + +* **Problem:** We don't do/have X; **Solution:** Build X + * Rewrite the problem statement to explain the consequence of not doing/having X. You might think it is incredibly obvious -- so obvious that it doesn't need to be stated. But just state it outright. An obvious problem statement is the goal: this is not a place to be clever, it's a place to be clear. +* **Problem:** We lack insight/knowledge/awareness/visibility; **Solution:** Create insight + * Information isn't itself valuable. Not having it isn't inherently a problem; having it isn't itself a solution. Information is only valuable when it enables us to act -- so the problem isn't the lack of information, but the problem is that there is something we aren't doing. Part of the solution might be getting more information -- but the information isn't the whole solution, the solution is that we are doing something with that information that we weren't doing before. +* **Problem:** There are problems A, B, C, D, and E. **Solution:** Do F. + * Focus on one problem at a time, to enable a collaborative conversation about each of the problems in isolation. Are all of A-E equally important? If one stands out, lead with it and focus on it. Otherwise, it's likely you are just "fitting the problem to the solution" and trying to invent a justification for a solution you've already mentally committed to, and aren't genuinely trying to create a collaborative, problem-focused solution. +* **Problem:** X is inefficient/error-prone. **Solution:** Do Y. + * Everything is inefficient and error prone. Everything is cumbersome. Without some kind of quantification, they are not problems, they are just statements of reality. Without some kind of measurable improvement, it's not a solution: it's just a change. Focus on the actual, tangible, measurable problems that can be provably solved. + +Basically, a bad problem statement (ie, a reverse solution statement) is written in such a fashion that it only allows for a single solution. To enable the most creative, most collaborative discussion, equip your peers with the tools to engage by listing all the key assumptions that went into your understanding of the problem, and connecting that directly to the solution. + +### Posting Ideas Additionally, if you want to discuss an idea with the open source community without having a P/S statement yet, you can post it in #expensify-open-source with the prefix `IDEA:`. All ideas to build the future of Expensify are always welcome! i.e.: "`IDEA:` I don't have a P/S for this yet, but just kicking the idea around... what if we [insert crazy idea]?". -#### Make sure you can test on all platforms +## Working on Expensify Jobs +*Reminder: For technical guidance, please refer to the [README](https://github.com/Expensify/App/blob/main/README.md)*. + +### Make sure you can test on all platforms * Expensify requires that you can test the app on iOS, MacOS, Android, Web, and mWeb. * You'll need a Mac to test the iOS and MacOS app. * In case you don't have one, here's a helpful [document](https://github.com/Expensify/App/blob/main/contributingGuides/TESTING_MACOS_AND_IOS.md) on how you might test all platforms on a Windows/Linux device. -#### Check GitHub for existing proposals from other users +### Check GitHub for existing proposals from other users 1. Expensify reviews all solution proposals on a first come first serve basis. If you see other contributors have already proposed a solution, you can still provide a solution proposal and we will review it. We look for the earliest provided, best proposed solution that addresses the job. -#### Make sure you can reproduce the problem +### Make sure you can reproduce the problem 2. Use your test account(s) to reproduce the problem by following the steps in the GitHub issue. 3. If you cannot reproduce the problem, pause on this step and add a comment to the issue explaining where you are stuck or that you don't think the issue can be reproduced. -#### Propose a solution for the job +### Propose a solution for the job 4. You can propose solutions on any issue at any time, but if you propose solutions to jobs before the `Help Wanted` label is applied, you do so at your own risk. Proposals will not be reviewed until the label is added and there is always a chance that we might not add the label or hire an external contributor for the job. 5. Contributors should **not** submit proposals on issues when they have assigned issues or PRs that are awaiting an action from them. If so, they will be in violation of Rule #1 (Get Shit Done) in our [Code of Conduct](https://github.com/Expensify/App/blob/main/CODE_OF_CONDUCT.md) and will receive a warning. Multiple warnings can lead to removal from the program. 6. After you reproduce the issue, complete the [proposal template here](./PROPOSAL_TEMPLATE.md) and post it as a comment in the corresponding GitHub issue (linked in the Upwork job). @@ -111,7 +152,7 @@ Additionally, if you want to discuss an idea with the open source community with 8. If your proposal is accepted by the Expensify engineer assigned to the issue, Expensify will hire you on Upwork and assign the GitHub issue to you. 9. Once hired, post a comment in the Github issue stating when you expect to have your PR ready for review. -#### Begin coding your solution in a pull request +### Begin coding your solution in a pull request 9. When you are ready to start, fork the repository and create a new branch. 10. Before you begin writing any code, please be aware that we require all commits to be [signed](https://docs.github.com/en/github/authenticating-to-github/signing-commits). The easiest way to do that is to [generate a new GPG key](https://docs.github.com/en/github/authenticating-to-github/generating-a-new-gpg-key) and [add it to your GitHub account](https://docs.github.com/en/github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account). Once you've done that, you can automatically sign all your commits by adding the following to your `.gitconfig`: ``` @@ -128,7 +169,7 @@ Additionally, if you want to discuss an idea with the open source community with 12. An Expensify engineer and a member from the Contributor-Plus team will be assigned to your pull request automatically to review. 13. Daily updates on weekdays are highly recommended. If you know you won’t be able to provide updates within 48 hours, please comment on the PR or issue stating how long you plan to be out so that we may plan accordingly. We understand everyone needs a little vacation here and there. Any issue that doesn't receive an update for 5 days (including weekend days) may be considered abandoned and the original contract terminated. -#### Submit your pull request for final review +### Submit your pull request for final review 14. When you are ready to submit your pull request for final review, make sure the following checks pass: 1. CLA - You must sign our [Contributor License Agreement](https://github.com/Expensify/App/blob/main/contributingGuides/CLA.md) by following the CLA bot instructions that will be posted on your PR 2. Tests - All tests must pass before a merge of a pull request @@ -138,7 +179,7 @@ Additionally, if you want to discuss an idea with the open source community with 17. Upon submission of a PR, please include a numbered list of explicit testing steps for each platform (Web, Desktop, iOS, Android, and Mobile Web) to confirm the fix works as expected and there are no regressions. 18. Please add a screenshot of the app running on each platform (Web, Desktop, iOS, Android, Mobile Web). -#### Completing the final checklist +### Completing the final checklist 19. Once your PR has been deployed to production, a checklist will automatically be commented in the GH issue. You're required to complete the steps that have your name mentioned before payment will be issued. 20. The items requiring your completion consist of: 1. Proposing steps to take for a regression test to ensure the bug doesn't occur again (For information on how to successfully complete this, head [here](https://github.com/Expensify/App/blob/main/contributingGuides/REGRESSION_TEST_BEST_PRACTICES.md)). @@ -147,23 +188,23 @@ Additionally, if you want to discuss an idea with the open source community with 4. Starting a conversation on if any additional steps should be taken to prevent further bugs similar to the one fixed from occurring again. 21. Once the above items have been successfully completed, then payments will begin to be issued. -#### Timeline expectations and asking for help along the way +### Timeline expectations and asking for help along the way - If you have made a change to your pull request and are ready for another review, leave a comment that says "Updated" on the pull request itself. - Please keep the conversation in GitHub, and do not ping individual reviewers in Slack or Upwork to get their attention. - Pull Request reviews can sometimes take a few days. If your pull request has not been addressed after four days, please let us know via the #expensify-open-source Slack channel. - On occasion, our engineers will need to focus on a feature release and choose to place a hold on the review of your PR. -#### Important note about JavaScript Style +### Important note about JavaScript Style - Read our official [JavaScript and React style guide](https://github.com/Expensify/App/blob/main/contributingGuides/STYLE.md). Please refer to our Style Guide before asking for a review. -#### For external agencies that Expensify partners with +### For external agencies that Expensify partners with Follow all the above above steps and processes. When you find a job you'd like to work on: - Post “I’m from [agency], I’d like to work on this job” - If no proposals have been submitted by other contributors, BugZero (BZ) team member or an internal engineer will assign the issue to you. - If there are existing proposals, BZ will put the issue on hold. [Contributor+](https://github.com/Expensify/App/blob/main/contributingGuides/HOW_TO_BECOME_A_CONTRIBUTOR_PLUS.md) will review the existing proposals. If a contributor’s proposal is accepted then the contributor will be assigned to the issue. If not the issue will be assigned to the agency-employee. - Once assigned follow the steps [here](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#propose-a-solution-for-the-job) to submit your proposal -#### Guide on Acronyms used within Expensify Communication +## Guide on Acronyms used within Expensify Communication During communication with Expensify, you will come across a variety of acronyms used by our team. While acronyms can be useful, they cease to be the moment they are not known to the receiver. As such, we wanted to create a list here of our most commonly used acronyms and what they're referring to. Lastly, please never hesitate to ask in Slack or the GH issue if there are any that are not understood/known! - **ND/NewDot:** new.expensify.com - **OD/OldDot:** expensify.com diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 717ffc789054..3747b826c5f8 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 9.0.36 + 9.0.37 CFBundleSignature ???? CFBundleURLTypes @@ -40,7 +40,7 @@ CFBundleVersion - 9.0.36.1 + 9.0.37.0 FullStory OrgId diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index ee36b22be568..8adae57b17ac 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 9.0.36 + 9.0.37 CFBundleSignature ???? CFBundleVersion - 9.0.36.1 + 9.0.37.0 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index 39dbe2194b38..edfb80d0153b 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -11,9 +11,9 @@ CFBundleName $(PRODUCT_NAME) CFBundleShortVersionString - 9.0.36 + 9.0.37 CFBundleVersion - 9.0.36.1 + 9.0.37.0 NSExtension NSExtensionPointIdentifier diff --git a/ios/Podfile.lock b/ios/Podfile.lock index a8d151d3811d..0f1a42791d1e 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1774,7 +1774,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - react-native-pdf (6.7.5): + - react-native-pdf (6.7.3): - DoubleConversion - glog - hermes-engine @@ -3182,7 +3182,7 @@ SPEC CHECKSUMS: react-native-launch-arguments: 5f41e0abf88a15e3c5309b8875d6fd5ac43df49d react-native-netinfo: fb5112b1fa754975485884ae85a3fb6a684f49d5 react-native-pager-view: 94195f1bf32e7f78359fa20057c97e632364a08b - react-native-pdf: 2e2591ebd39422163850403b1c0cd7d6b351e168 + react-native-pdf: dd6ae39a93607a80919bef9f3499e840c693989d react-native-performance: 3c608307be10964f8a97d3af462f37125b6d8fa5 react-native-plaid-link-sdk: f91a22b45b7c3d4cd6c47273200dc57df35068b0 react-native-quick-sqlite: 7c793c9f5834e756b336257a8d8b8239b7ceb451 @@ -3246,7 +3246,7 @@ SPEC CHECKSUMS: SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d Turf: aa2ede4298009639d10db36aba1a7ebaad072a5e VisionCamera: c6c8aa4b028501fc87644550fbc35a537d4da3fb - Yoga: 2a45d7e59592db061217551fd3bbe2dd993817ae + Yoga: a1d7895431387402a674fd0d1c04ec85e87909b8 PODFILE CHECKSUM: e479ec84cb53e5fd463486d71dfee91708d3fd9a diff --git a/package-lock.json b/package-lock.json index 85c6fc1d0a45..d21d80353080 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,20 @@ { "name": "new.expensify", - "version": "9.0.36-1", + "version": "9.0.37-0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "9.0.36-1", + "version": "9.0.37-0", "hasInstallScript": true, "license": "MIT", "dependencies": { "@dotlottie/react-player": "^1.6.3", "@expensify/react-native-live-markdown": "0.1.143", "@expo/metro-runtime": "~3.2.3", + "@firebase/app": "^0.10.10", + "@firebase/performance": "^0.6.8", "@formatjs/intl-datetimeformat": "^6.12.5", "@formatjs/intl-listformat": "^7.5.7", "@formatjs/intl-locale": "^4.0.0", @@ -97,7 +99,7 @@ "react-native-modal": "^13.0.0", "react-native-onyx": "2.0.68", "react-native-pager-view": "6.4.1", - "react-native-pdf": "6.7.5", + "react-native-pdf": "6.7.3", "react-native-performance": "^5.1.0", "react-native-permissions": "^3.10.0", "react-native-picker-select": "git+https://github.com/Expensify/react-native-picker-select.git#da50d2c5c54e268499047f9cc98b8df4196c1ddf", @@ -119,7 +121,7 @@ "react-native-web": "^0.19.12", "react-native-web-sound": "^0.1.3", "react-native-webview": "13.8.6", - "react-pdf": "^7.7.3", + "react-pdf": "9.1.0", "react-plaid-link": "3.3.2", "react-web-config": "^1.0.0", "react-webcam": "^7.1.1", @@ -135,6 +137,7 @@ "@babel/plugin-proposal-export-namespace-from": "^7.18.9", "@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", + "@babel/plugin-transform-class-properties": "^7.25.4", "@babel/preset-env": "^7.20.0", "@babel/preset-flow": "^7.12.13", "@babel/preset-react": "^7.10.4", @@ -202,7 +205,6 @@ "babel-plugin-module-resolver": "^5.0.0", "babel-plugin-react-compiler": "0.0.0-experimental-334f00b-20240725", "babel-plugin-react-native-web": "^0.18.7", - "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-remove-console": "^6.9.4", "clean-webpack-plugin": "^4.0.0", "concurrently": "^8.2.2", @@ -258,7 +260,7 @@ "type-fest": "4.20.0", "typescript": "^5.4.5", "wait-port": "^0.2.9", - "webpack": "^5.76.0", + "webpack": "^5.94.0", "webpack-bundle-analyzer": "^4.5.0", "webpack-cli": "^5.0.4", "webpack-dev-server": "^5.0.4", @@ -585,6 +587,17 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/core/node_modules/json5": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", + "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.1", "license": "ISC", @@ -618,10 +631,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.7", - "license": "MIT", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.6.tgz", + "integrity": "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==", "dependencies": { - "@babel/types": "^7.24.7", + "@babel/types": "^7.25.6", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -715,17 +729,16 @@ "license": "ISC" }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.7", - "license": "MIT", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.4.tgz", + "integrity": "sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-member-expression-to-functions": "^7.24.7", + "@babel/helper-member-expression-to-functions": "^7.24.8", "@babel/helper-optimise-call-expression": "^7.24.7", - "@babel/helper-replace-supers": "^7.24.7", + "@babel/helper-replace-supers": "^7.25.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/traverse": "^7.25.4", "semver": "^6.3.1" }, "engines": { @@ -735,6 +748,23 @@ "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-create-class-features-plugin/node_modules/@babel/traverse": { + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", + "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.6", + "@babel/parser": "^7.25.6", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": { "version": "6.3.1", "license": "ISC", @@ -818,28 +848,27 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.24.7", - "license": "MIT", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz", + "integrity": "sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.24.8", + "@babel/types": "^7.24.8" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/traverse": { - "version": "7.24.7", - "license": "MIT", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", + "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7", + "@babel/generator": "^7.25.6", + "@babel/parser": "^7.25.6", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -905,8 +934,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.7", - "license": "MIT", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", + "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", "engines": { "node": ">=6.9.0" } @@ -927,12 +957,13 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.24.7", - "license": "MIT", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.0.tgz", + "integrity": "sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-member-expression-to-functions": "^7.24.7", - "@babel/helper-optimise-call-expression": "^7.24.7" + "@babel/helper-member-expression-to-functions": "^7.24.8", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -941,6 +972,23 @@ "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-replace-supers/node_modules/@babel/traverse": { + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", + "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.6", + "@babel/parser": "^7.25.6", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-simple-access": { "version": "7.24.7", "license": "MIT", @@ -1012,8 +1060,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "license": "MIT", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", "engines": { "node": ">=6.9.0" } @@ -1109,8 +1158,12 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.7", - "license": "MIT", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz", + "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", + "dependencies": { + "@babel/types": "^7.25.6" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -1721,11 +1774,12 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.24.7", - "license": "MIT", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.4.tgz", + "integrity": "sha512-nZeZHyCWPfjkdU5pA/uHiTaDAFUEqkpzf1YoQT2NeSynCGYq9rxfyI3XpQbfx/a0hSnFH6TGlEXvae5Vi7GD8g==", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-class-features-plugin": "^7.25.4", + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -2732,12 +2786,13 @@ "license": "MIT" }, "node_modules/@babel/template": { - "version": "7.24.7", - "license": "MIT", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -2763,10 +2818,11 @@ } }, "node_modules/@babel/types": { - "version": "7.24.7", - "license": "MIT", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", + "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -2789,9 +2845,10 @@ "license": "Apache-2.0" }, "node_modules/@blakeembrey/template": { - "version": "1.1.0", - "dev": true, - "license": "Apache-2.0" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@blakeembrey/template/-/template-1.2.0.tgz", + "integrity": "sha512-w/63nURdkRPpg3AXbNr7lPv6HgOuVDyefTumiXsbXxtIwcuk5EXayWR5OpSwDjsQPgaYsfUSedMduaNOjAYY8A==", + "dev": true }, "node_modules/@callstack/reassure-cli": { "version": "1.0.0-rc.4", @@ -3683,14 +3740,6 @@ "expo-internal": "build/bin/cli" } }, - "node_modules/@expo/cli/node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, "node_modules/@expo/cli/node_modules/@expo/config-plugins": { "version": "8.0.8", "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-8.0.8.tgz", @@ -3733,31 +3782,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@expo/cli/node_modules/@expo/config-types": { - "version": "51.0.2", - "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-51.0.2.tgz", - "integrity": "sha512-IglkIoiDwJMY01lYkF/ZSBoe/5cR+O3+Gx6fpLFjLfgZGBTdyPkKa1g8NWoWQCk+D3cKL2MDbszT2DyRRB0YqQ==" - }, - "node_modules/@expo/cli/node_modules/@expo/json-file": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-8.3.3.tgz", - "integrity": "sha512-eZ5dld9AD0PrVRiIWpRkm5aIoWBw3kAyd8VkuWEy92sEthBKDDDHAnK2a0dw0Eil6j7rK7lS/Qaq/Zzngv2h5A==", - "dependencies": { - "@babel/code-frame": "~7.10.4", - "json5": "^2.2.2", - "write-file-atomic": "^2.3.0" - } - }, - "node_modules/@expo/cli/node_modules/@expo/plist": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@expo/plist/-/plist-0.1.3.tgz", - "integrity": "sha512-GW/7hVlAylYg1tUrEASclw1MMk9FP4ZwyFAY/SUTJIhPDQHtfOlXREyWV3hhrHdX/K+pS73GNgdfT6E/e+kBbg==", - "dependencies": { - "@xmldom/xmldom": "~0.7.7", - "base64-js": "^1.2.3", - "xmlbuilder": "^14.0.0" - } - }, "node_modules/@expo/cli/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -4106,6 +4130,26 @@ "node": ">= 4.0.0" } }, + "node_modules/@expo/cli/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/@expo/code-signing-certificates": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/@expo/code-signing-certificates/-/code-signing-certificates-0.0.5.tgz", @@ -4134,24 +4178,25 @@ } }, "node_modules/@expo/config-plugins": { - "version": "4.1.5", - "license": "MIT", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-8.0.4.tgz", + "integrity": "sha512-Hi+xuyNWE2LT4LVbGttHJgl9brnsdWAhEB42gWKb5+8ae86Nr/KwUBQJsJppirBYTeLjj5ZlY0glYnAkDa2jqw==", "dependencies": { - "@expo/config-types": "^45.0.0", - "@expo/json-file": "8.2.36", - "@expo/plist": "0.0.18", + "@expo/config-types": "^51.0.0-unreleased", + "@expo/json-file": "~8.3.0", + "@expo/plist": "^0.1.0", "@expo/sdk-runtime-versions": "^1.0.0", - "@react-native/normalize-color": "^2.0.0", "chalk": "^4.1.2", "debug": "^4.3.1", "find-up": "~5.0.0", "getenv": "^1.0.0", "glob": "7.1.6", "resolve-from": "^5.0.0", - "semver": "^7.3.5", + "semver": "^7.5.4", "slash": "^3.0.0", + "slugify": "^1.6.6", "xcode": "^3.0.1", - "xml2js": "0.4.23" + "xml2js": "0.6.0" } }, "node_modules/@expo/config-plugins/node_modules/ansi-styles": { @@ -4212,27 +4257,10 @@ "node": ">=8" } }, - "node_modules/@expo/config-plugins/node_modules/xml2js": { - "version": "0.4.23", - "license": "MIT", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/@expo/config-plugins/node_modules/xmlbuilder": { - "version": "11.0.1", - "license": "MIT", - "engines": { - "node": ">=4.0" - } - }, "node_modules/@expo/config-types": { - "version": "45.0.0", - "license": "MIT" + "version": "51.0.2", + "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-51.0.2.tgz", + "integrity": "sha512-IglkIoiDwJMY01lYkF/ZSBoe/5cR+O3+Gx6fpLFjLfgZGBTdyPkKa1g8NWoWQCk+D3cKL2MDbszT2DyRRB0YqQ==" }, "node_modules/@expo/config/node_modules/@babel/code-frame": { "version": "7.10.4", @@ -4264,31 +4292,6 @@ "xml2js": "0.6.0" } }, - "node_modules/@expo/config/node_modules/@expo/config-types": { - "version": "51.0.2", - "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-51.0.2.tgz", - "integrity": "sha512-IglkIoiDwJMY01lYkF/ZSBoe/5cR+O3+Gx6fpLFjLfgZGBTdyPkKa1g8NWoWQCk+D3cKL2MDbszT2DyRRB0YqQ==" - }, - "node_modules/@expo/config/node_modules/@expo/json-file": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-8.3.3.tgz", - "integrity": "sha512-eZ5dld9AD0PrVRiIWpRkm5aIoWBw3kAyd8VkuWEy92sEthBKDDDHAnK2a0dw0Eil6j7rK7lS/Qaq/Zzngv2h5A==", - "dependencies": { - "@babel/code-frame": "~7.10.4", - "json5": "^2.2.2", - "write-file-atomic": "^2.3.0" - } - }, - "node_modules/@expo/config/node_modules/@expo/plist": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@expo/plist/-/plist-0.1.3.tgz", - "integrity": "sha512-GW/7hVlAylYg1tUrEASclw1MMk9FP4ZwyFAY/SUTJIhPDQHtfOlXREyWV3hhrHdX/K+pS73GNgdfT6E/e+kBbg==", - "dependencies": { - "@xmldom/xmldom": "~0.7.7", - "base64-js": "^1.2.3", - "xmlbuilder": "^14.0.0" - } - }, "node_modules/@expo/config/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -4691,29 +4694,32 @@ } }, "node_modules/@expo/json-file": { - "version": "8.2.36", - "license": "MIT", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-8.3.3.tgz", + "integrity": "sha512-eZ5dld9AD0PrVRiIWpRkm5aIoWBw3kAyd8VkuWEy92sEthBKDDDHAnK2a0dw0Eil6j7rK7lS/Qaq/Zzngv2h5A==", "dependencies": { "@babel/code-frame": "~7.10.4", - "json5": "^1.0.1", + "json5": "^2.2.2", "write-file-atomic": "^2.3.0" } }, "node_modules/@expo/json-file/node_modules/@babel/code-frame": { "version": "7.10.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dependencies": { "@babel/highlight": "^7.10.4" } }, "node_modules/@expo/json-file/node_modules/json5": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", + "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", "bin": { "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" } }, "node_modules/@expo/metro-config": { @@ -4741,24 +4747,6 @@ "resolve-from": "^5.0.0" } }, - "node_modules/@expo/metro-config/node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@expo/metro-config/node_modules/@expo/json-file": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-8.3.3.tgz", - "integrity": "sha512-eZ5dld9AD0PrVRiIWpRkm5aIoWBw3kAyd8VkuWEy92sEthBKDDDHAnK2a0dw0Eil6j7rK7lS/Qaq/Zzngv2h5A==", - "dependencies": { - "@babel/code-frame": "~7.10.4", - "json5": "^2.2.2", - "write-file-atomic": "^2.3.0" - } - }, "node_modules/@expo/metro-config/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -4882,24 +4870,6 @@ "sudo-prompt": "9.1.1" } }, - "node_modules/@expo/package-manager/node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@expo/package-manager/node_modules/@expo/json-file": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-8.3.3.tgz", - "integrity": "sha512-eZ5dld9AD0PrVRiIWpRkm5aIoWBw3kAyd8VkuWEy92sEthBKDDDHAnK2a0dw0Eil6j7rK7lS/Qaq/Zzngv2h5A==", - "dependencies": { - "@babel/code-frame": "~7.10.4", - "json5": "^2.2.2", - "write-file-atomic": "^2.3.0" - } - }, "node_modules/@expo/package-manager/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -5186,10 +5156,11 @@ } }, "node_modules/@expo/plist": { - "version": "0.0.18", - "license": "MIT", + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@expo/plist/-/plist-0.1.3.tgz", + "integrity": "sha512-GW/7hVlAylYg1tUrEASclw1MMk9FP4ZwyFAY/SUTJIhPDQHtfOlXREyWV3hhrHdX/K+pS73GNgdfT6E/e+kBbg==", "dependencies": { - "@xmldom/xmldom": "~0.7.0", + "@xmldom/xmldom": "~0.7.7", "base64-js": "^1.2.3", "xmlbuilder": "^14.0.0" } @@ -5215,14 +5186,6 @@ "expo-modules-autolinking": ">=0.8.1" } }, - "node_modules/@expo/prebuild-config/node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, "node_modules/@expo/prebuild-config/node_modules/@expo/config-plugins": { "version": "8.0.8", "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-8.0.8.tgz", @@ -5245,31 +5208,6 @@ "xml2js": "0.6.0" } }, - "node_modules/@expo/prebuild-config/node_modules/@expo/config-types": { - "version": "51.0.2", - "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-51.0.2.tgz", - "integrity": "sha512-IglkIoiDwJMY01lYkF/ZSBoe/5cR+O3+Gx6fpLFjLfgZGBTdyPkKa1g8NWoWQCk+D3cKL2MDbszT2DyRRB0YqQ==" - }, - "node_modules/@expo/prebuild-config/node_modules/@expo/json-file": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-8.3.3.tgz", - "integrity": "sha512-eZ5dld9AD0PrVRiIWpRkm5aIoWBw3kAyd8VkuWEy92sEthBKDDDHAnK2a0dw0Eil6j7rK7lS/Qaq/Zzngv2h5A==", - "dependencies": { - "@babel/code-frame": "~7.10.4", - "json5": "^2.2.2", - "write-file-atomic": "^2.3.0" - } - }, - "node_modules/@expo/prebuild-config/node_modules/@expo/plist": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@expo/plist/-/plist-0.1.3.tgz", - "integrity": "sha512-GW/7hVlAylYg1tUrEASclw1MMk9FP4ZwyFAY/SUTJIhPDQHtfOlXREyWV3hhrHdX/K+pS73GNgdfT6E/e+kBbg==", - "dependencies": { - "@xmldom/xmldom": "~0.7.7", - "base64-js": "^1.2.3", - "xmlbuilder": "^14.0.0" - } - }, "node_modules/@expo/prebuild-config/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -5477,6 +5415,72 @@ "node": ">=8" } }, + "node_modules/@firebase/app": { + "version": "0.10.10", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.10.10.tgz", + "integrity": "sha512-sDqkdeFdVn5uygQm5EuIKOQ6/wxTcX/qKfm0MR46AiwLRHGLCDUMrXBkc8GhkK3ca2d6mPUSfPmndggo43D6PQ==", + "dependencies": { + "@firebase/component": "0.6.8", + "@firebase/logger": "0.4.2", + "@firebase/util": "1.9.7", + "idb": "7.1.1", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/component": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.8.tgz", + "integrity": "sha512-LcNvxGLLGjBwB0dJUsBGCej2fqAepWyBubs4jt1Tiuns7QLbXHuyObZ4aMeBjZjWx4m8g1LoVI9QFpSaq/k4/g==", + "dependencies": { + "@firebase/util": "1.9.7", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/installations": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.8.tgz", + "integrity": "sha512-57V374qdb2+wT5v7+ntpLXBjZkO6WRgmAUbVkRfFTM/4t980p0FesbqTAcOIiM8U866UeuuuF8lYH70D3jM/jQ==", + "dependencies": { + "@firebase/component": "0.6.8", + "@firebase/util": "1.9.7", + "idb": "7.1.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/logger": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.4.2.tgz", + "integrity": "sha512-Q1VuA5M1Gjqrwom6I6NUU4lQXdo9IAQieXlujeHZWvRt1b7qQ0KwBaNAjgxG27jgF9/mUwsNmO8ptBCGVYhB0A==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/performance": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.8.tgz", + "integrity": "sha512-F+alziiIZ6Yn8FG47mxwljq+4XkgkT2uJIFRlkyViUQRLzrogaUJW6u/+6ZrePXnouKlKIwzqos3PVJraPEcCA==", + "dependencies": { + "@firebase/component": "0.6.8", + "@firebase/installations": "0.6.8", + "@firebase/logger": "0.4.2", + "@firebase/util": "1.9.7", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/util": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.9.7.tgz", + "integrity": "sha512-fBVNH/8bRbYjqlbIhZ+lBtdAAS4WqZumx03K06/u7fJSpz1TGjEMm1ImvKD47w+xaFKIP2ori6z8BrbakRfjJA==", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/@formatjs/ecma402-abstract": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-2.0.0.tgz", @@ -7253,9 +7257,10 @@ } }, "node_modules/@polka/url": { - "version": "1.0.0-next.21", - "dev": true, - "license": "MIT" + "version": "1.0.0-next.25", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", + "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", + "dev": true }, "node_modules/@radix-ui/primitive": { "version": "1.1.0", @@ -8323,16 +8328,16 @@ } }, "node_modules/@react-native-community/cli-server-api/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "peer": true, "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -8642,10 +8647,23 @@ } }, "node_modules/@react-native-community/cli/node_modules/ws": { - "version": "6.2.3", - "license": "MIT", - "dependencies": { - "async-limiter": "~1.0.0" + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/@react-native-community/eslint-config": { @@ -9386,16 +9404,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@react-native-windows/codegen/node_modules/cliui": { - "version": "7.0.4", - "license": "ISC", - "peer": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, "node_modules/@react-native-windows/codegen/node_modules/color-convert": { "version": "2.0.1", "license": "MIT", @@ -9431,31 +9439,6 @@ "node": ">=8" } }, - "node_modules/@react-native-windows/codegen/node_modules/y18n": { - "version": "5.0.8", - "license": "ISC", - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@react-native-windows/codegen/node_modules/yargs": { - "version": "16.2.0", - "license": "MIT", - "peer": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@react-native-windows/find-repo-root": { "version": "0.73.0", "license": "MIT", @@ -10048,11 +10031,23 @@ } }, "node_modules/@react-native/community-cli-plugin/node_modules/ws": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.3.tgz", - "integrity": "sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==", - "dependencies": { - "async-limiter": "~1.0.0" + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/@react-native/debugger-frontend": { @@ -10115,11 +10110,23 @@ } }, "node_modules/@react-native/dev-middleware/node_modules/ws": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.3.tgz", - "integrity": "sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==", - "dependencies": { - "async-limiter": "~1.0.0" + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/@react-native/gradle-plugin": { @@ -13235,6 +13242,27 @@ "which-typed-array": "^1.1.2" } }, + "node_modules/@storybook/core/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/@storybook/csf": { "version": "0.1.11", "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.1.11.tgz", @@ -15465,24 +15493,9 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/eslint": { - "version": "8.4.6", - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.4", - "license": "MIT", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { "version": "0.0.51", + "dev": true, "license": "MIT" }, "node_modules/@types/express": { @@ -16583,151 +16596,121 @@ "webpack": "^5.20.0 || ^4.1.0" } }, - "node_modules/@webassemblyjs/helper-buffer": { + "node_modules/@webassemblyjs/ast": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { "version": "1.11.6", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==" }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, - "node_modules/@webassemblyjs/helper-numbers/node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-numbers/node_modules/@webassemblyjs/helper-api-error": { + "node_modules/@webassemblyjs/helper-wasm-bytecode": { "version": "1.11.6", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==" }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "license": "MIT", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" - } - }, - "node_modules/@webassemblyjs/helper-wasm-section/node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "license": "MIT", - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@webassemblyjs/wasm-gen": "1.12.1" } }, - "node_modules/@webassemblyjs/helper-wasm-section/node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "license": "MIT" - }, "node_modules/@webassemblyjs/ieee754": { "version": "1.11.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { "version": "1.11.6", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { "version": "1.11.6", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==" }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "license": "MIT", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-edit/node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "license": "MIT", - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-edit/node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "license": "MIT" - }, - "node_modules/@webassemblyjs/wasm-edit/node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@xtuc/long": "4.2.2" + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "license": "MIT", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/leb128": "1.11.6", "@webassemblyjs/utf8": "1.11.6" } }, - "node_modules/@webassemblyjs/wasm-gen/node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "license": "MIT", - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-gen/node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "license": "MIT" - }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-opt/node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "license": "MIT", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, - "node_modules/@webassemblyjs/wasm-opt/node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "license": "MIT" - }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "license": "MIT", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", @@ -16735,22 +16718,15 @@ "@webassemblyjs/utf8": "1.11.6" } }, - "node_modules/@webassemblyjs/wasm-parser/node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "license": "MIT", + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@webassemblyjs/ast": "1.12.1", + "@xtuc/long": "4.2.2" } }, - "node_modules/@webassemblyjs/wasm-parser/node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "license": "MIT" - }, - "node_modules/@webassemblyjs/wasm-parser/node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "license": "MIT" - }, "node_modules/@webpack-cli/configtest": { "version": "2.1.1", "dev": true, @@ -16812,11 +16788,13 @@ }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" }, "node_modules/@xtuc/long": { "version": "4.2.2", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "node_modules/@yarnpkg/fslib": { "version": "2.10.3", @@ -16903,23 +16881,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-dynamic-import": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "acorn": "^4.0.3" - } - }, - "node_modules/acorn-dynamic-import/node_modules/acorn": { - "version": "4.0.13", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/acorn-globals": { "version": "7.0.1", "license": "MIT", @@ -16995,6 +16956,7 @@ }, "node_modules/ajv": { "version": "8.12.0", + "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -17032,6 +16994,18 @@ } } }, + "node_modules/ajv-cli/node_modules/json5": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", + "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/ajv-formats": { "version": "2.1.1", "dev": true, @@ -17048,35 +17022,6 @@ } } }, - "node_modules/ajv-keywords": { - "version": "1.5.1", - "license": "MIT", - "peerDependencies": { - "ajv": ">=4.10.0" - } - }, - "node_modules/align-text": { - "version": "0.1.4", - "license": "MIT", - "dependencies": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/align-text/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/anser": { "version": "1.4.10", "license": "MIT" @@ -17471,22 +17416,6 @@ "dequal": "^2.0.3" } }, - "node_modules/arr-diff": { - "version": "4.0.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-flatten": { - "version": "1.1.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/arr-union": { "version": "3.1.0", "license": "MIT", @@ -17545,14 +17474,6 @@ "node": ">=0.10.0" } }, - "node_modules/array-unique": { - "version": "0.3.2", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array.prototype.findlastindex": { "version": "1.2.3", "dev": true, @@ -17645,28 +17566,6 @@ "version": "0.0.9", "license": "MIT" }, - "node_modules/asn1.js": { - "version": "5.4.1", - "license": "MIT", - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/asn1.js/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, - "node_modules/assert": { - "version": "1.5.0", - "license": "MIT", - "dependencies": { - "object-assign": "^4.1.1", - "util": "0.10.3" - } - }, "node_modules/assert-plus": { "version": "1.0.0", "dev": true, @@ -17676,17 +17575,6 @@ "node": ">=0.8" } }, - "node_modules/assert/node_modules/inherits": { - "version": "2.0.1", - "license": "ISC" - }, - "node_modules/assert/node_modules/util": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "inherits": "2.0.1" - } - }, "node_modules/assign-symbols": { "version": "1.0.0", "license": "MIT", @@ -17724,11 +17612,6 @@ "dev": true, "license": "MIT" }, - "node_modules/async-each": { - "version": "1.0.3", - "license": "MIT", - "optional": true - }, "node_modules/async-exit-hook": { "version": "2.0.1", "dev": true, @@ -17748,10 +17631,6 @@ "node": "^4.7 || >=6.9 || >=7.3" } }, - "node_modules/async-limiter": { - "version": "1.0.1", - "license": "MIT" - }, "node_modules/async-listener": { "version": "0.6.10", "license": "BSD-2-Clause", @@ -17791,17 +17670,6 @@ "node": ">= 4.0.0" } }, - "node_modules/atob": { - "version": "2.1.2", - "license": "(MIT OR Apache-2.0)", - "optional": true, - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, "node_modules/available-typed-arrays": { "version": "1.0.7", "license": "MIT", @@ -17835,79 +17703,6 @@ "node": ">=4" } }, - "node_modules/babel-code-frame": { - "version": "6.26.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "node_modules/babel-code-frame/node_modules/ansi-regex": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/ansi-styles": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/chalk": { - "version": "1.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/babel-code-frame/node_modules/js-tokens": { - "version": "3.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/babel-code-frame/node_modules/strip-ansi": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/supports-color": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/babel-core": { "version": "7.0.0-bridge.0", "license": "MIT", @@ -17942,27 +17737,6 @@ "node": ">=4" } }, - "node_modules/babel-helper-function-name": { - "version": "6.24.1", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "node_modules/babel-helper-get-function-arity": { - "version": "6.24.1", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, "node_modules/babel-jest": { "version": "29.4.1", "license": "MIT", @@ -18190,14 +17964,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/babel-messages": { - "version": "6.23.0", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.22.0" - } - }, "node_modules/babel-plugin-add-module-exports": { "version": "1.0.4", "dev": true, @@ -18485,22 +18251,6 @@ "dev": true, "license": "MIT" }, - "node_modules/babel-plugin-syntax-class-properties": { - "version": "6.13.0", - "dev": true, - "license": "MIT" - }, - "node_modules/babel-plugin-transform-class-properties": { - "version": "6.24.1", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-helper-function-name": "^6.24.1", - "babel-plugin-syntax-class-properties": "^6.8.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, "node_modules/babel-plugin-transform-flow-enums": { "version": "0.0.2", "license": "MIT", @@ -18874,117 +18624,13 @@ "version": "0.11.1", "license": "MIT" }, - "node_modules/babel-template": { - "version": "6.26.0", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "node_modules/babel-traverse": { - "version": "6.26.0", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "node_modules/babel-traverse/node_modules/debug": { - "version": "2.6.9", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/babel-traverse/node_modules/globals": { - "version": "9.18.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-traverse/node_modules/ms": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/babel-types": { - "version": "6.26.0", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "node_modules/babel-types/node_modules/to-fast-properties": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babylon": { - "version": "6.18.0", - "dev": true, - "license": "MIT", - "bin": { - "babylon": "bin/babylon.js" - } - }, "node_modules/balanced-match": { "version": "1.0.2", "license": "MIT" }, - "node_modules/base": { - "version": "0.11.2", - "license": "MIT", - "optional": true, - "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/base-64": { "version": "0.1.0" }, - "node_modules/base/node_modules/define-property": { - "version": "1.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/base64-arraybuffer": { "version": "1.0.2", "license": "MIT", @@ -19058,20 +18704,12 @@ }, "node_modules/binary-extensions": { "version": "2.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/bindings": { - "version": "1.5.0", - "license": "MIT", - "optional": true, - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, "node_modules/bl": { "version": "4.1.0", "license": "MIT", @@ -19106,10 +18744,6 @@ "bluebird": "^3.5.5" } }, - "node_modules/bn.js": { - "version": "5.2.1", - "license": "MIT" - }, "node_modules/body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", @@ -19214,117 +18848,20 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "license": "MIT", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, - "node_modules/brorand": { - "version": "1.1.0", - "license": "MIT" - }, "node_modules/browser-assert": { "version": "1.2.1", "dev": true }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "node_modules/browserify-des": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserify-rsa": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "node_modules/browserify-sign": { - "version": "4.2.2", - "license": "ISC", - "dependencies": { - "bn.js": "^5.2.1", - "browserify-rsa": "^4.1.0", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.4", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.6", - "readable-stream": "^3.6.2", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/browserify-sign/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/browserify-sign/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/browserify-zlib": { - "version": "0.2.0", - "license": "MIT", - "dependencies": { - "pako": "~1.0.5" - } - }, "node_modules/browserslist": { "version": "4.23.0", "funding": [ @@ -19423,10 +18960,6 @@ "version": "1.1.2", "license": "MIT" }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "license": "MIT" - }, "node_modules/builder-util": { "version": "25.0.0", "dev": true, @@ -19566,10 +19099,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/builtin-status-codes": { - "version": "3.0.0", - "license": "MIT" - }, "node_modules/builtins": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", @@ -19712,25 +19241,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/cache-base": { - "version": "1.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/cacheable-lookup": { "version": "5.0.4", "dev": true, @@ -19890,17 +19400,6 @@ "node": ">=4" } }, - "node_modules/center-align": { - "version": "0.1.3", - "license": "MIT", - "dependencies": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/chalk": { "version": "2.4.2", "license": "MIT", @@ -19953,7 +19452,7 @@ }, "node_modules/chokidar": { "version": "3.6.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "anymatch": "~3.1.2", @@ -20035,14 +19534,6 @@ "node": ">=8" } }, - "node_modules/cipher-base": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, "node_modules/citty": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", @@ -20057,96 +19548,6 @@ "version": "1.2.3", "license": "MIT" }, - "node_modules/class-utils": { - "version": "0.3.6", - "license": "MIT", - "optional": true, - "dependencies": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/define-property": { - "version": "0.2.5", - "license": "MIT", - "optional": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor": { - "version": "0.1.4", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-descriptor": { - "version": "0.1.6", - "license": "MIT", - "optional": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/kind-of": { - "version": "5.1.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/classnames": { "version": "2.5.0", "license": "MIT", @@ -20325,29 +19726,10 @@ "node": ">= 0.12.0" } }, - "node_modules/code-point-at": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/collect-v8-coverage": { "version": "1.0.1", "license": "MIT" }, - "node_modules/collection-visit": { - "version": "1.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/color": { "version": "4.2.3", "license": "MIT", @@ -20465,11 +19847,6 @@ "url": "https://www.patreon.com/infusion" } }, - "node_modules/component-emitter": { - "version": "1.3.0", - "license": "MIT", - "optional": true - }, "node_modules/component-type": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/component-type/-/component-type-1.2.2.tgz", @@ -20811,9 +20188,6 @@ "node": "^14.18.0 || >=16.10.0" } }, - "node_modules/console-browserify": { - "version": "1.2.0" - }, "node_modules/console-control-strings": { "version": "1.1.0", "devOptional": true, @@ -20821,6 +20195,7 @@ }, "node_modules/constants-browserify": { "version": "1.0.0", + "dev": true, "license": "MIT" }, "node_modules/content-disposition": { @@ -20891,14 +20266,6 @@ "dev": true, "license": "MIT" }, - "node_modules/copy-descriptor": { - "version": "0.1.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/copy-webpack-plugin": { "version": "10.2.4", "dev": true, @@ -21106,41 +20473,6 @@ "node": ">= 6" } }, - "node_modules/create-ecdh": { - "version": "4.0.4", - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, - "node_modules/create-hash": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "node_modules/create-require": { "version": "1.1.1", "devOptional": true, @@ -21310,26 +20642,6 @@ "node": "*" } }, - "node_modules/crypto-browserify": { - "version": "3.12.0", - "license": "MIT", - "dependencies": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - }, - "engines": { - "node": "*" - } - }, "node_modules/crypto-js": { "version": "4.2.0", "license": "MIT" @@ -21698,13 +21010,6 @@ } } }, - "node_modules/decamelize": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/decimal.js": { "version": "10.4.3", "license": "MIT" @@ -21883,18 +21188,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/define-property": { - "version": "2.0.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/defu": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", @@ -22031,14 +21324,6 @@ "node": ">=6" } }, - "node_modules/des.js": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, "node_modules/destroy": { "version": "1.2.0", "license": "MIT", @@ -22111,19 +21396,6 @@ "diff-so-fancy": "third_party/build_fatpack/diff-so-fancy" } }, - "node_modules/diffie-hellman": { - "version": "5.0.3", - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, "node_modules/dijkstrajs": { "version": "1.0.3", "license": "MIT" @@ -22276,14 +21548,6 @@ "entities": "^2.0.0" } }, - "node_modules/domain-browser": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">=0.4", - "npm": ">=1.2" - } - }, "node_modules/domelementtype": { "version": "2.3.0", "funding": [ @@ -22645,23 +21909,6 @@ "version": "1.4.723", "license": "ISC" }, - "node_modules/elliptic": { - "version": "6.5.4", - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, "node_modules/emitter-listener": { "version": "1.1.2", "license": "BSD-2-Clause", @@ -22729,8 +21976,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.15.0", - "license": "MIT", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -22781,16 +22029,6 @@ "dev": true, "license": "MIT" }, - "node_modules/errno": { - "version": "0.1.8", - "license": "MIT", - "dependencies": { - "prr": "~1.0.1" - }, - "bin": { - "errno": "cli.js" - } - }, "node_modules/error-ex": { "version": "1.3.2", "license": "MIT", @@ -23696,14 +22934,15 @@ } }, "node_modules/eslint-plugin-import/node_modules/json5": { - "version": "1.0.2", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", + "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, "bin": { "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" } }, "node_modules/eslint-plugin-import/node_modules/semver": { @@ -24374,14 +23613,6 @@ "node": ">=0.8.x" } }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, "node_modules/exec-async": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/exec-async/-/exec-async-2.2.0.tgz", @@ -24414,131 +23645,6 @@ "node": ">= 0.8.0" } }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "license": "MIT", - "optional": true, - "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "optional": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "license": "MIT", - "optional": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/extend-shallow": { - "version": "2.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor": { - "version": "0.1.4", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-descriptor": { - "version": "0.1.6", - "license": "MIT", - "optional": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-extendable": { - "version": "0.1.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/kind-of": { - "version": "5.1.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/ms": { - "version": "2.0.0", - "license": "MIT", - "optional": true - }, "node_modules/expect": { "version": "29.7.0", "license": "MIT", @@ -24797,14 +23903,6 @@ "invariant": "^2.2.4" } }, - "node_modules/expo/node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, "node_modules/expo/node_modules/@expo/config-plugins": { "version": "8.0.8", "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-8.0.8.tgz", @@ -24827,31 +23925,6 @@ "xml2js": "0.6.0" } }, - "node_modules/expo/node_modules/@expo/config-types": { - "version": "51.0.2", - "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-51.0.2.tgz", - "integrity": "sha512-IglkIoiDwJMY01lYkF/ZSBoe/5cR+O3+Gx6fpLFjLfgZGBTdyPkKa1g8NWoWQCk+D3cKL2MDbszT2DyRRB0YqQ==" - }, - "node_modules/expo/node_modules/@expo/json-file": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-8.3.3.tgz", - "integrity": "sha512-eZ5dld9AD0PrVRiIWpRkm5aIoWBw3kAyd8VkuWEy92sEthBKDDDHAnK2a0dw0Eil6j7rK7lS/Qaq/Zzngv2h5A==", - "dependencies": { - "@babel/code-frame": "~7.10.4", - "json5": "^2.2.2", - "write-file-atomic": "^2.3.0" - } - }, - "node_modules/expo/node_modules/@expo/plist": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@expo/plist/-/plist-0.1.3.tgz", - "integrity": "sha512-GW/7hVlAylYg1tUrEASclw1MMk9FP4ZwyFAY/SUTJIhPDQHtfOlXREyWV3hhrHdX/K+pS73GNgdfT6E/e+kBbg==", - "dependencies": { - "@xmldom/xmldom": "~0.7.7", - "base64-js": "^1.2.3", - "xmlbuilder": "^14.0.0" - } - }, "node_modules/expo/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -24982,19 +24055,6 @@ "node": ">= 0.8" } }, - "node_modules/express/node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/express/node_modules/ms": { "version": "2.0.0", "dev": true, @@ -25035,48 +24095,6 @@ ], "license": "MIT" }, - "node_modules/express/node_modules/send": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", - "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/express/node_modules/send/node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/express/node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, "node_modules/extend-shallow": { "version": "3.0.2", "license": "MIT", @@ -25088,54 +24106,6 @@ "node": ">=0.10.0" } }, - "node_modules/extglob": { - "version": "2.0.4", - "license": "MIT", - "optional": true, - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/extend-shallow": { - "version": "2.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/is-extendable": { - "version": "0.1.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/extract-zip": { "version": "2.0.1", "dev": true, @@ -25211,20 +24181,10 @@ "license": "MIT" }, "node_modules/fast-json-patch": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^2.0.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/fast-json-patch/node_modules/fast-deep-equal": { - "version": "2.0.1", - "dev": true, - "license": "MIT" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", + "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==", + "dev": true }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", @@ -25236,7 +24196,9 @@ "license": "MIT" }, "node_modules/fast-xml-parser": { - "version": "4.3.6", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", "funding": [ { "type": "github", @@ -25247,7 +24209,6 @@ "url": "https://paypal.me/naturalintelligence" } ], - "license": "MIT", "dependencies": { "strnum": "^1.0.5" }, @@ -25363,11 +24324,6 @@ "node": ">=14.14" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "license": "MIT", - "optional": true - }, "node_modules/filelist": { "version": "1.0.4", "dev": true, @@ -25396,8 +24352,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "license": "MIT", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -25454,6 +24411,18 @@ "node": ">=16.0.0" } }, + "node_modules/find-babel-config/node_modules/json5": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", + "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/find-babel-config/node_modules/path-exists": { "version": "4.0.0", "dev": true, @@ -25605,7 +24574,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.5", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ { @@ -25613,7 +24584,6 @@ "url": "https://github.com/sponsors/RubenVerborgh" } ], - "license": "MIT", "engines": { "node": ">=4.0" }, @@ -25839,17 +24809,6 @@ "url": "https://github.com/sponsors/rawify" } }, - "node_modules/fragment-cache": { - "version": "0.2.1", - "license": "MIT", - "optional": true, - "dependencies": { - "map-cache": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/freeport-async": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/freeport-async/-/freeport-async-2.0.0.tgz", @@ -26243,7 +25202,8 @@ }, "node_modules/glob-to-regexp": { "version": "0.4.1", - "license": "BSD-2-Clause" + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" }, "node_modules/global-agent": { "version": "3.0.0", @@ -26341,8 +25301,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "license": "ISC" + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/graphemer": { "version": "1.4.0", @@ -26377,8 +25338,9 @@ }, "node_modules/gzip-size": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", "dev": true, - "license": "MIT", "dependencies": { "duplexer": "^0.1.2" }, @@ -26433,25 +25395,6 @@ "node": ">= 0.4.0" } }, - "node_modules/has-ansi": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "license": "MIT", @@ -26514,114 +25457,6 @@ "devOptional": true, "license": "ISC" }, - "node_modules/has-value": { - "version": "1.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values": { - "version": "1.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number": { - "version": "3.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/hash-base": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/hash-base/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/hash-base/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/hash.js": { - "version": "1.1.7", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, "node_modules/hasown": { "version": "2.0.2", "license": "MIT", @@ -26699,15 +25534,6 @@ "node": ">=8" } }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "license": "BSD-3-Clause", @@ -27075,10 +25901,6 @@ "node": ">=10.19.0" } }, - "node_modules/https-browserify": { - "version": "1.0.0", - "license": "MIT" - }, "node_modules/https-proxy-agent": { "version": "5.0.1", "license": "MIT", @@ -27143,6 +25965,11 @@ "node": ">=0.10.0" } }, + "node_modules/idb": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", + "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==" + }, "node_modules/idb-keyval": { "version": "6.2.1", "license": "Apache-2.0" @@ -27520,13 +26347,6 @@ "loose-envify": "^1.0.0" } }, - "node_modules/invert-kv": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ip-address": { "version": "9.0.5", "dev": true, @@ -27570,17 +26390,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-arguments": { "version": "1.1.1", "dev": true, @@ -27640,7 +26449,7 @@ }, "node_modules/is-binary-path": { "version": "2.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" @@ -27712,17 +26521,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-data-descriptor": { - "version": "1.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-data-view": { "version": "1.0.1", "license": "MIT", @@ -27749,19 +26547,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-descriptor": { - "version": "1.0.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-directory": { "version": "0.3.1", "license": "MIT", @@ -27977,7 +26762,8 @@ }, "node_modules/is-number": { "version": "7.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "engines": { "node": ">=0.12.0" } @@ -28130,10 +26916,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-utf8": { - "version": "0.2.1", - "license": "MIT" - }, "node_modules/is-valid-path": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-valid-path/-/is-valid-path-0.1.1.tgz", @@ -28175,14 +26957,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-wsl": { "version": "2.2.0", "license": "MIT", @@ -29141,6 +27915,26 @@ "node": ">=12" } }, + "node_modules/jest-environment-jsdom/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/jest-environment-jsdom/node_modules/xml-name-validator": { "version": "4.0.0", "license": "Apache-2.0", @@ -29201,6 +27995,17 @@ "write-file-atomic": "^2.3.0" } }, + "node_modules/jest-expo/node_modules/json5": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", + "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/jest-expo/node_modules/react-test-renderer": { "version": "18.2.0", "license": "MIT", @@ -30531,10 +29336,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json-loader": { - "version": "0.5.7", - "license": "MIT" - }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "license": "MIT" @@ -30589,10 +29390,12 @@ }, "node_modules/json-schema-traverse": { "version": "1.0.0", + "dev": true, "license": "MIT" }, "node_modules/json-stable-stringify": { "version": "1.0.2", + "dev": true, "license": "MIT", "dependencies": { "jsonify": "^0.0.1" @@ -30615,16 +29418,6 @@ "dev": true, "license": "ISC" }, - "node_modules/json5": { - "version": "2.2.3", - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/jsonfile": { "version": "6.1.0", "license": "MIT", @@ -30637,6 +29430,7 @@ }, "node_modules/jsonify": { "version": "0.0.1", + "dev": true, "license": "Public Domain", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -30717,13 +29511,6 @@ "shell-quote": "^1.8.1" } }, - "node_modules/lazy-cache": { - "version": "1.0.4", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lazy-universal-dotenv": { "version": "4.0.0", "dev": true, @@ -30762,16 +29549,6 @@ "node": ">= 0.6.3" } }, - "node_modules/lcid": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "invert-kv": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/leven": { "version": "3.1.0", "license": "MIT", @@ -31021,54 +29798,6 @@ "url": "https://github.com/privatenumber/link?sponsor=1" } }, - "node_modules/load-json-file": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/load-json-file/node_modules/parse-json": { - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "error-ex": "^1.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/load-json-file/node_modules/pify": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/load-json-file/node_modules/strip-bom": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "is-utf8": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/loader-runner": { - "version": "2.4.0", - "license": "MIT", - "engines": { - "node": ">=4.3.0 <5.0.0 || >=5.10" - } - }, "node_modules/loader-utils": { "version": "2.0.4", "dev": true, @@ -31082,6 +29811,18 @@ "node": ">=8.9.0" } }, + "node_modules/loader-utils/node_modules/json5": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", + "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/localforage": { "version": "1.10.0", "license": "Apache-2.0", @@ -31248,150 +29989,6 @@ "logkitty": "bin/logkitty.js" } }, - "node_modules/logkitty/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/logkitty/node_modules/camelcase": { - "version": "5.3.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/logkitty/node_modules/cliui": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/logkitty/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/logkitty/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/logkitty/node_modules/find-up": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/logkitty/node_modules/locate-path": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/logkitty/node_modules/p-limit": { - "version": "2.3.0", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/logkitty/node_modules/p-locate": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/logkitty/node_modules/path-exists": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/logkitty/node_modules/wrap-ansi": { - "version": "6.2.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/logkitty/node_modules/yargs": { - "version": "15.4.1", - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/logkitty/node_modules/yargs-parser": { - "version": "18.1.3", - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/longest": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/loose-envify": { "version": "1.4.0", "license": "MIT", @@ -31675,30 +30272,11 @@ "node": ">=6" } }, - "node_modules/map-cache": { - "version": "0.2.2", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/map-or-similar": { "version": "1.5.0", "dev": true, "license": "MIT" }, - "node_modules/map-visit": { - "version": "1.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mapbox-gl": { "version": "2.15.0", "license": "SEE LICENSE IN LICENSE.txt", @@ -31810,15 +30388,6 @@ "node": ">=0.10" } }, - "node_modules/md5.js": { - "version": "1.3.5", - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, "node_modules/md5hex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/md5hex/-/md5hex-1.0.0.tgz", @@ -31922,14 +30491,6 @@ "resolved": "https://registry.npmjs.org/memory-cache/-/memory-cache-0.2.0.tgz", "integrity": "sha512-OcjA+jzjOYzKmKS6IQVALHLVz+rNTMPoJvCztFaZxwG14wtAW7VRZjwTQu06vKCYOxh4jVnik7ya0SXTB0W+xA==" }, - "node_modules/memory-fs": { - "version": "0.4.1", - "license": "MIT", - "dependencies": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, "node_modules/merge-descriptors": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", @@ -31941,13 +30502,19 @@ } }, "node_modules/merge-refs": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "@types/react": "*" - }, + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.3.0.tgz", + "integrity": "sha512-nqXPXbso+1dcKDpPCXvwZyJILz+vSLqGGOnDrYHQYE+B8n9JTCekVLC65AfCpR4ggVyA/45Y0iR9LDyS2iI+zA==", "funding": { "url": "https://github.com/wojtekmaj/merge-refs?sponsor=1" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, "node_modules/merge-stream": { @@ -32436,15 +31003,15 @@ } }, "node_modules/metro/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -32456,31 +31023,17 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "license": "MIT", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, - "node_modules/miller-rabin": { - "version": "4.0.1", - "license": "MIT", - "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "bin": { - "miller-rabin": "bin/miller-rabin" - } - }, - "node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, "node_modules/mime": { "version": "2.6.0", "license": "MIT", @@ -32533,12 +31086,9 @@ }, "node_modules/minimalistic-assert": { "version": "1.0.1", + "dev": true, "license": "ISC" }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "license": "MIT" - }, "node_modules/minimatch": { "version": "3.1.2", "license": "ISC", @@ -32643,18 +31193,6 @@ "node": ">= 8" } }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "license": "MIT", - "optional": true, - "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mixin-object": { "version": "2.0.1", "license": "MIT", @@ -32722,9 +31260,10 @@ "peer": true }, "node_modules/mrmime": { - "version": "1.0.1", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } @@ -32787,27 +31326,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/nanomatch": { - "version": "1.2.13", - "license": "MIT", - "optional": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "license": "MIT" @@ -33042,52 +31560,6 @@ "version": "0.4.0", "license": "MIT" }, - "node_modules/node-libs-browser": { - "version": "2.2.1", - "license": "MIT", - "dependencies": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.1", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "^1.0.1" - } - }, - "node_modules/node-libs-browser/node_modules/buffer": { - "version": "4.9.2", - "license": "MIT", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "node_modules/node-libs-browser/node_modules/isarray": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/node-libs-browser/node_modules/punycode": { - "version": "1.4.1", - "license": "MIT" - }, "node_modules/node-releases": { "version": "2.0.14", "license": "MIT" @@ -33117,27 +31589,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/hosted-git-info": { - "version": "2.8.9", - "license": "ISC" - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.2", - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "license": "MIT", @@ -33221,13 +31672,6 @@ "version": "1.1.1", "license": "MIT" }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/nwsapi": { "version": "2.2.7", "license": "MIT" @@ -33411,84 +31855,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-copy": { - "version": "0.1.0", - "license": "MIT", - "optional": true, - "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/define-property": { - "version": "0.2.5", - "license": "MIT", - "optional": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-data-descriptor": { - "version": "0.1.4", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor": { - "version": "0.1.6", - "license": "MIT", - "optional": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.13.1", "license": "MIT", @@ -33518,17 +31884,6 @@ "node": ">= 0.4" } }, - "node_modules/object-visit": { - "version": "1.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object.assign": { "version": "4.1.4", "dev": true, @@ -33598,17 +31953,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.pick": { - "version": "1.3.0", - "license": "MIT", - "optional": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object.values": { "version": "1.1.7", "dev": true, @@ -33851,10 +32195,6 @@ "node": ">=8" } }, - "node_modules/os-browserify": { - "version": "0.3.0", - "license": "MIT" - }, "node_modules/os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -33863,16 +32203,6 @@ "node": ">=0.10.0" } }, - "node_modules/os-locale": { - "version": "1.4.0", - "license": "MIT", - "dependencies": { - "lcid": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/os-tmpdir": { "version": "1.0.2", "license": "MIT", @@ -33987,10 +32317,6 @@ "version": "1.0.0", "license": "BlueOak-1.0.0" }, - "node_modules/pako": { - "version": "1.0.11", - "license": "(MIT AND Zlib)" - }, "node_modules/param-case": { "version": "3.0.4", "license": "MIT", @@ -34009,17 +32335,6 @@ "node": ">=6" } }, - "node_modules/parse-asn1": { - "version": "5.1.6", - "license": "ISC", - "dependencies": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, "node_modules/parse-json": { "version": "5.2.0", "license": "MIT", @@ -34070,14 +32385,6 @@ "tslib": "^2.0.3" } }, - "node_modules/pascalcase": { - "version": "0.1.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/password-prompt": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/password-prompt/-/password-prompt-1.1.3.tgz", @@ -34225,15 +32532,6 @@ "node": ">=0.6.0" } }, - "node_modules/path-browserify": { - "version": "0.0.1", - "license": "MIT" - }, - "node_modules/path-dirname": { - "version": "1.0.2", - "license": "MIT", - "optional": true - }, "node_modules/path-exists": { "version": "3.0.0", "license": "MIT", @@ -34306,12 +32604,13 @@ "node": ">=8" } }, - "node_modules/path2d-polyfill": { - "version": "2.0.1", - "license": "MIT", + "node_modules/path2d": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/path2d/-/path2d-0.2.1.tgz", + "integrity": "sha512-Fl2z/BHvkTNvkuBzYTpTuirHZg6wW9z8+4SND/3mDTEcYbbNKWAy21dz9D3ePNNwrrK8pqZO5vLPZ1hLF6T7XA==", "optional": true, "engines": { - "node": ">=8" + "node": ">=6" } }, "node_modules/pathe": { @@ -34332,29 +32631,16 @@ "pbf": "bin/pbf" } }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "license": "MIT", - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" - } - }, "node_modules/pdfjs-dist": { - "version": "3.11.174", - "license": "Apache-2.0", + "version": "4.4.168", + "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-4.4.168.tgz", + "integrity": "sha512-MbkAjpwka/dMHaCfQ75RY1FXX3IewBVu6NGZOcxerRFlaBiIkZmUoR0jotX5VUzYZEXAGzSFtknWs5xRKliXPA==", "engines": { "node": ">=18" }, "optionalDependencies": { "canvas": "^2.11.2", - "path2d-polyfill": "^2.0.1" + "path2d": "^0.2.0" } }, "node_modules/pe-library": { @@ -34410,6 +32696,7 @@ }, "node_modules/pinkie": { "version": "2.0.4", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -34417,6 +32704,7 @@ }, "node_modules/pinkie-promise": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "pinkie": "^2.0.0" @@ -34598,14 +32886,6 @@ "mkdirp": "bin/cmd.js" } }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/possible-typed-array-names": { "version": "1.0.0", "license": "MIT", @@ -34846,30 +33126,10 @@ "node": ">= 0.10" } }, - "node_modules/prr": { - "version": "1.0.1", - "license": "MIT" - }, "node_modules/psl": { "version": "1.9.0", "license": "MIT" }, - "node_modules/public-encrypt": { - "version": "4.0.3", - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, "node_modules/pump": { "version": "3.0.0", "license": "MIT", @@ -34938,143 +33198,6 @@ "qrcode-terminal": "bin/qrcode-terminal.js" } }, - "node_modules/qrcode/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/qrcode/node_modules/camelcase": { - "version": "5.3.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/qrcode/node_modules/cliui": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/qrcode/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/qrcode/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/qrcode/node_modules/find-up": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/qrcode/node_modules/locate-path": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/qrcode/node_modules/p-limit": { - "version": "2.3.0", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/qrcode/node_modules/p-locate": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/qrcode/node_modules/path-exists": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/qrcode/node_modules/wrap-ansi": { - "version": "6.2.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/qrcode/node_modules/yargs": { - "version": "15.4.1", - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/qrcode/node_modules/yargs-parser": { - "version": "18.1.3", - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -35109,12 +33232,7 @@ }, "node_modules/querystring": { "version": "0.2.0", - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/querystring-es3": { - "version": "0.2.1", + "dev": true, "engines": { "node": ">=0.4.x" } @@ -35197,14 +33315,6 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/randomfill": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, "node_modules/range-parser": { "version": "1.2.1", "license": "MIT", @@ -36556,27 +34666,6 @@ "ws": "^7" } }, - "node_modules/react-native-macos/node_modules/react-devtools-core/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "peer": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/react-native-macos/node_modules/react-is": { "version": "17.0.2", "license": "MIT", @@ -36629,12 +34718,24 @@ } }, "node_modules/react-native-macos/node_modules/ws": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.3.tgz", - "integrity": "sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "peer": true, - "dependencies": { - "async-limiter": "~1.0.0" + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/react-native-modal": { @@ -36695,9 +34796,8 @@ } }, "node_modules/react-native-pdf": { - "version": "6.7.5", - "resolved": "https://registry.npmjs.org/react-native-pdf/-/react-native-pdf-6.7.5.tgz", - "integrity": "sha512-d1S76p2Vwax2iG+kTnjINiUMvpjtJJvtMiYwHRbgGczT8GJjtXH49YCWOd+HfnUAU29cB+knzsKGYoZBMQM8Ow==", + "version": "6.7.3", + "license": "MIT", "dependencies": { "crypto-js": "4.2.0", "deprecated-react-native-prop-types": "^2.3.0" @@ -37704,27 +35804,6 @@ "ws": "^7" } }, - "node_modules/react-native-windows/node_modules/react-devtools-core/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "peer": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/react-native-windows/node_modules/react-is": { "version": "17.0.2", "license": "MIT", @@ -37777,12 +35856,24 @@ } }, "node_modules/react-native-windows/node_modules/ws": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.3.tgz", - "integrity": "sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "peer": true, - "dependencies": { - "async-limiter": "~1.0.0" + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/react-native/node_modules/@jest/types": { @@ -37904,25 +35995,6 @@ "ws": "^7" } }, - "node_modules/react-native/node_modules/react-devtools-core/node_modules/ws": { - "version": "7.5.10", - "license": "MIT", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/react-native/node_modules/react-is": { "version": "17.0.2", "license": "MIT" @@ -37938,24 +36010,36 @@ } }, "node_modules/react-native/node_modules/ws": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.3.tgz", - "integrity": "sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==", - "dependencies": { - "async-limiter": "~1.0.0" + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/react-pdf": { - "version": "7.7.3", - "license": "MIT", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-9.1.0.tgz", + "integrity": "sha512-KhPDQE3QshkLdS3b48S5Bldv0N5flob6qwvsiADWdZOS5TMDaIrkRtEs+Dyl6ubRf2jTf9jWmFb6RjWu46lSSg==", "dependencies": { "clsx": "^2.0.0", "dequal": "^2.0.3", "make-cancellable-promise": "^1.3.1", "make-event-props": "^1.6.0", - "merge-refs": "^1.2.1", - "pdfjs-dist": "3.11.174", - "prop-types": "^15.6.2", + "merge-refs": "^1.3.0", + "pdfjs-dist": "4.4.168", "tiny-invariant": "^1.0.0", "warning": "^4.0.0" }, @@ -37963,9 +36047,9 @@ "url": "https://github.com/wojtekmaj/react-pdf?sponsor=1" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -38134,61 +36218,6 @@ "webpack": "^2.3.3" } }, - "node_modules/react-web-config/node_modules/acorn": { - "version": "5.7.4", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/react-web-config/node_modules/ajv": { - "version": "4.11.8", - "license": "MIT", - "dependencies": { - "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" - } - }, - "node_modules/react-web-config/node_modules/ansi-regex": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/async": { - "version": "2.6.4", - "license": "MIT", - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/react-web-config/node_modules/big.js": { - "version": "3.2.0", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/react-web-config/node_modules/camelcase": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/cliui": { - "version": "3.2.0", - "license": "ISC", - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, "node_modules/react-web-config/node_modules/dotenv": { "version": "4.0.0", "license": "BSD-2-Clause", @@ -38196,333 +36225,6 @@ "node": ">=4.6.0" } }, - "node_modules/react-web-config/node_modules/emojis-list": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/react-web-config/node_modules/enhanced-resolve": { - "version": "3.4.1", - "dependencies": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "object-assign": "^4.0.1", - "tapable": "^0.2.7" - }, - "engines": { - "node": ">=4.3.0 <5.0.0 || >=5.10" - } - }, - "node_modules/react-web-config/node_modules/find-up": { - "version": "1.1.2", - "license": "MIT", - "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/get-caller-file": { - "version": "1.0.3", - "license": "ISC" - }, - "node_modules/react-web-config/node_modules/has-flag": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/interpret": { - "version": "1.4.0", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/react-web-config/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/json5": { - "version": "0.5.1", - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/react-web-config/node_modules/loader-utils": { - "version": "0.2.17", - "license": "MIT", - "dependencies": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - }, - "node_modules/react-web-config/node_modules/mkdirp": { - "version": "0.5.6", - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/react-web-config/node_modules/path-exists": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/path-type": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/pify": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/read-pkg": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/read-pkg-up": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/require-main-filename": { - "version": "1.0.1", - "license": "ISC" - }, - "node_modules/react-web-config/node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/string-width": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/strip-ansi": { - "version": "3.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/supports-color": { - "version": "3.2.3", - "license": "MIT", - "dependencies": { - "has-flag": "^1.0.0" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/react-web-config/node_modules/tapable": { - "version": "0.2.9", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/react-web-config/node_modules/uglify-js": { - "version": "2.8.29", - "license": "BSD-2-Clause", - "dependencies": { - "source-map": "~0.5.1", - "yargs": "~3.10.0" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - }, - "optionalDependencies": { - "uglify-to-browserify": "~1.0.0" - } - }, - "node_modules/react-web-config/node_modules/uglify-js/node_modules/camelcase": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/uglify-js/node_modules/cliui": { - "version": "2.1.0", - "license": "ISC", - "dependencies": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, - "node_modules/react-web-config/node_modules/uglify-js/node_modules/yargs": { - "version": "3.10.0", - "license": "MIT", - "dependencies": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - }, - "node_modules/react-web-config/node_modules/watchpack": { - "version": "1.7.5", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - }, - "optionalDependencies": { - "chokidar": "^3.4.1", - "watchpack-chokidar2": "^2.0.1" - } - }, - "node_modules/react-web-config/node_modules/webpack": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "acorn": "^5.0.0", - "acorn-dynamic-import": "^2.0.0", - "ajv": "^4.7.0", - "ajv-keywords": "^1.1.1", - "async": "^2.1.2", - "enhanced-resolve": "^3.3.0", - "interpret": "^1.0.0", - "json-loader": "^0.5.4", - "json5": "^0.5.1", - "loader-runner": "^2.3.0", - "loader-utils": "^0.2.16", - "memory-fs": "~0.4.1", - "mkdirp": "~0.5.0", - "node-libs-browser": "^2.0.0", - "source-map": "^0.5.3", - "supports-color": "^3.1.0", - "tapable": "~0.2.5", - "uglify-js": "^2.8.27", - "watchpack": "^1.3.1", - "webpack-sources": "^1.0.1", - "yargs": "^6.0.0" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=4.3.0 <5.0.0 || >=5.10" - } - }, - "node_modules/react-web-config/node_modules/which-module": { - "version": "1.0.0", - "license": "ISC" - }, - "node_modules/react-web-config/node_modules/wordwrap": { - "version": "0.0.2", - "license": "MIT/X11", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/react-web-config/node_modules/wrap-ansi": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-web-config/node_modules/y18n": { - "version": "3.2.2", - "license": "ISC" - }, - "node_modules/react-web-config/node_modules/yargs": { - "version": "6.6.0", - "license": "MIT", - "dependencies": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^4.2.0" - } - }, - "node_modules/react-web-config/node_modules/yargs-parser": { - "version": "4.2.1", - "license": "ISC", - "dependencies": { - "camelcase": "^3.0.0" - } - }, "node_modules/react-webcam": { "version": "7.2.0", "license": "MIT", @@ -38589,6 +36291,18 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/read-config-file/node_modules/json5": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", + "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/readable-stream": { "version": "2.3.8", "license": "MIT", @@ -38638,7 +36352,7 @@ }, "node_modules/readdirp": { "version": "3.6.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "picomatch": "^2.2.1" @@ -38784,18 +36498,6 @@ "@babel/runtime": "^7.8.4" } }, - "node_modules/regex-not": { - "version": "1.0.2", - "license": "MIT", - "optional": true, - "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "license": "MIT", @@ -38894,11 +36596,6 @@ "node": ">= 0.10" } }, - "node_modules/remove-trailing-separator": { - "version": "1.1.0", - "license": "ISC", - "optional": true - }, "node_modules/remove-trailing-slash": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/remove-trailing-slash/-/remove-trailing-slash-0.1.1.tgz", @@ -38946,16 +36643,9 @@ "entities": "^2.0.0" } }, - "node_modules/repeat-element": { - "version": "1.1.4", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/repeat-string": { "version": "1.6.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10" @@ -38988,10 +36678,6 @@ "node": ">=8.6.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "license": "ISC" - }, "node_modules/requireg": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/requireg/-/requireg-0.2.2.tgz", @@ -39086,11 +36772,6 @@ "protocol-buffers-schema": "^3.3.1" } }, - "node_modules/resolve-url": { - "version": "0.2.1", - "license": "MIT", - "optional": true - }, "node_modules/resolve.exports": { "version": "2.0.2", "license": "MIT", @@ -39120,14 +36801,6 @@ "node": ">=8" } }, - "node_modules/ret": { - "version": "0.1.15", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.12" - } - }, "node_modules/retry": { "version": "0.13.1", "dev": true, @@ -39144,16 +36817,6 @@ "node": ">=0.10.0" } }, - "node_modules/right-align": { - "version": "0.1.3", - "license": "MIT", - "dependencies": { - "align-text": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/rimraf": { "version": "3.0.2", "license": "ISC", @@ -39167,14 +36830,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/ripemd160": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, "node_modules/roarr": { "version": "2.15.4", "dev": true, @@ -39260,14 +36915,6 @@ "version": "5.1.2", "license": "MIT" }, - "node_modules/safe-regex": { - "version": "1.1.0", - "license": "MIT", - "optional": true, - "dependencies": { - "ret": "~0.1.10" - } - }, "node_modules/safe-regex-test": { "version": "1.0.3", "license": "MIT", @@ -39404,8 +37051,9 @@ "license": "MIT" }, "node_modules/send": { - "version": "0.18.0", - "license": "MIT", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -39569,6 +37217,7 @@ }, "node_modules/set-blocking": { "version": "2.0.0", + "devOptional": true, "license": "ISC" }, "node_modules/set-function-length": { @@ -39647,17 +37296,6 @@ "version": "1.2.0", "license": "ISC" }, - "node_modules/sha.js": { - "version": "2.4.11", - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, "node_modules/shallow-clone": { "version": "3.0.1", "license": "MIT", @@ -39882,13 +37520,14 @@ } }, "node_modules/sirv": { - "version": "1.0.19", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", "dev": true, - "license": "MIT", "dependencies": { - "@polka/url": "^1.0.0-next.20", - "mrmime": "^1.0.0", - "totalist": "^1.0.0" + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" }, "engines": { "node": ">= 10" @@ -39968,186 +37607,6 @@ "npm": ">= 3.0.0" } }, - "node_modules/snapdragon": { - "version": "0.8.2", - "license": "MIT", - "optional": true, - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "license": "MIT", - "optional": true, - "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "optional": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "license": "MIT", - "optional": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/extend-shallow": { - "version": "2.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor": { - "version": "0.1.4", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "license": "MIT", - "optional": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-extendable": { - "version": "0.1.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/kind-of": { - "version": "5.1.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/ms": { - "version": "2.0.0", - "license": "MIT", - "optional": true - }, - "node_modules/snapdragon/node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/sockjs": { "version": "0.3.24", "dev": true, @@ -40220,10 +37679,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-list-map": { - "version": "2.0.1", - "license": "MIT" - }, "node_modules/source-map": { "version": "0.7.4", "license": "BSD-3-Clause", @@ -40246,18 +37701,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "license": "MIT", - "optional": true, - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "node_modules/source-map-support": { "version": "0.5.21", "license": "MIT", @@ -40273,11 +37716,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-url": { - "version": "0.4.1", - "license": "MIT", - "optional": true - }, "node_modules/space-separated-tokens": { "version": "2.0.2", "dev": true, @@ -40291,20 +37729,14 @@ "version": "0.0.2", "dev": true }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "license": "Apache-2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, "node_modules/spdx-exceptions": { "version": "2.3.0", + "dev": true, "license": "CC-BY-3.0" }, "node_modules/spdx-expression-parse": { "version": "3.0.1", + "dev": true, "license": "MIT", "dependencies": { "spdx-exceptions": "^2.1.0", @@ -40313,6 +37745,7 @@ }, "node_modules/spdx-license-ids": { "version": "3.0.11", + "dev": true, "license": "CC0-1.0" }, "node_modules/spdy": { @@ -40494,94 +37927,6 @@ "node": ">= 6" } }, - "node_modules/static-extend": { - "version": "0.1.2", - "license": "MIT", - "optional": true, - "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/define-property": { - "version": "0.2.5", - "license": "MIT", - "optional": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor": { - "version": "0.1.4", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-descriptor": { - "version": "0.1.6", - "license": "MIT", - "optional": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/kind-of": { - "version": "5.1.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/statuses": { "version": "2.0.1", "license": "MIT", @@ -40613,14 +37958,6 @@ "url": "https://opencollective.com/storybook" } }, - "node_modules/stream-browserify": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, "node_modules/stream-buffers": { "version": "2.2.0", "license": "Unlicense", @@ -40628,17 +37965,6 @@ "node": ">= 0.10.0" } }, - "node_modules/stream-http": { - "version": "2.8.3", - "license": "MIT", - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, "node_modules/strict-uri-encode": { "version": "2.0.0", "license": "MIT", @@ -41521,16 +38847,6 @@ "node": ">=8" } }, - "node_modules/timers-browserify": { - "version": "2.0.12", - "license": "MIT", - "dependencies": { - "setimmediate": "^1.0.4" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/tiny-emitter": { "version": "2.1.0", "license": "MIT" @@ -41568,10 +38884,6 @@ "version": "1.0.5", "license": "BSD-3-Clause" }, - "node_modules/to-arraybuffer": { - "version": "1.0.1", - "license": "MIT" - }, "node_modules/to-fast-properties": { "version": "2.0.0", "license": "MIT", @@ -41579,45 +38891,10 @@ "node": ">=4" } }, - "node_modules/to-object-path": { - "version": "0.3.0", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex": { - "version": "3.0.2", - "license": "MIT", - "optional": true, - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dependencies": { "is-number": "^7.0.0" }, @@ -41638,9 +38915,10 @@ } }, "node_modules/totalist": { - "version": "1.1.0", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -41769,6 +39047,18 @@ } } }, + "node_modules/ts-jest/node_modules/json5": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", + "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/ts-jest/node_modules/yargs-parser": { "version": "21.1.1", "dev": true, @@ -41868,6 +39158,18 @@ "node": ">=6" } }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", + "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/tsconfig-paths/node_modules/strip-bom": { "version": "3.0.0", "dev": true, @@ -41900,10 +39202,6 @@ "dev": true, "license": "0BSD" }, - "node_modules/tty-browserify": { - "version": "0.0.0", - "license": "MIT" - }, "node_modules/tunnel": { "version": "0.0.6", "dev": true, @@ -42110,11 +39408,6 @@ "node": ">=0.8.0" } }, - "node_modules/uglify-to-browserify": { - "version": "1.0.2", - "license": "MIT", - "optional": true - }, "node_modules/unbox-primitive": { "version": "1.0.2", "license": "MIT", @@ -42340,64 +39633,6 @@ "dev": true, "license": "MIT" }, - "node_modules/unset-value": { - "version": "1.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "license": "MIT", - "optional": true, - "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "license": "MIT", - "optional": true, - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/isarray": { - "version": "1.0.0", - "license": "MIT", - "optional": true - }, - "node_modules/upath": { - "version": "1.2.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=4", - "yarn": "*" - } - }, "node_modules/update-browserslist-db": { "version": "1.0.13", "funding": [ @@ -42437,13 +39672,9 @@ "version": "1.19.11", "license": "MIT" }, - "node_modules/urix": { - "version": "0.1.0", - "license": "MIT", - "optional": true - }, "node_modules/url": { "version": "0.11.0", + "dev": true, "license": "MIT", "dependencies": { "punycode": "1.3.2", @@ -42465,16 +39696,9 @@ }, "node_modules/url/node_modules/punycode": { "version": "1.3.2", + "dev": true, "license": "MIT" }, - "node_modules/use": { - "version": "3.1.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/use-callback-ref": { "version": "1.3.2", "dev": true, @@ -42659,21 +39883,10 @@ "dev": true, "license": "(WTFPL OR MIT)" }, - "node_modules/util": { - "version": "0.11.1", - "license": "MIT", - "dependencies": { - "inherits": "2.0.3" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "license": "MIT" }, - "node_modules/util/node_modules/inherits": { - "version": "2.0.3", - "license": "ISC" - }, "node_modules/utila": { "version": "0.4.0", "license": "MIT" @@ -42721,14 +39934,6 @@ "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", "integrity": "sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA==" }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "license": "Apache-2.0", - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "node_modules/validate-npm-package-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", @@ -42762,10 +39967,6 @@ "version": "1.0.1", "license": "MIT" }, - "node_modules/vm-browserify": { - "version": "1.1.2", - "license": "MIT" - }, "node_modules/vt-pbf": { "version": "3.1.3", "license": "MIT", @@ -42822,8 +40023,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "license": "MIT", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -42832,244 +40034,6 @@ "node": ">=10.13.0" } }, - "node_modules/watchpack-chokidar2": { - "version": "2.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "chokidar": "^2.1.8" - } - }, - "node_modules/watchpack-chokidar2/node_modules/anymatch": { - "version": "2.0.0", - "license": "ISC", - "optional": true, - "dependencies": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "node_modules/watchpack-chokidar2/node_modules/anymatch/node_modules/normalize-path": { - "version": "2.1.1", - "license": "MIT", - "optional": true, - "dependencies": { - "remove-trailing-separator": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/binary-extensions": { - "version": "1.13.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/braces": { - "version": "2.3.2", - "license": "MIT", - "optional": true, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/chokidar": { - "version": "2.1.8", - "license": "MIT", - "optional": true, - "dependencies": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - }, - "optionalDependencies": { - "fsevents": "^1.2.7" - } - }, - "node_modules/watchpack-chokidar2/node_modules/fill-range": { - "version": "4.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/fsevents": { - "version": "1.2.13", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "dependencies": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/glob-parent": { - "version": "3.1.0", - "license": "ISC", - "optional": true, - "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/glob-parent/node_modules/is-glob": { - "version": "3.1.0", - "license": "MIT", - "optional": true, - "dependencies": { - "is-extglob": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/is-binary-path": { - "version": "1.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "binary-extensions": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/is-extendable": { - "version": "0.1.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/is-number": { - "version": "3.0.0", - "license": "MIT", - "optional": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "license": "MIT", - "optional": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/micromatch": { - "version": "3.1.10", - "license": "MIT", - "optional": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchpack-chokidar2/node_modules/readdirp": { - "version": "2.2.1", - "license": "MIT", - "optional": true, - "dependencies": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/watchpack-chokidar2/node_modules/to-regex-range": { - "version": "2.1.1", - "license": "MIT", - "optional": true, - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wbuf": { "version": "1.7.3", "dev": true, @@ -43101,32 +40065,32 @@ } }, "node_modules/webpack": { - "version": "5.88.2", - "license": "MIT", - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", + "dependencies": { + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -43146,18 +40110,22 @@ } }, "node_modules/webpack-bundle-analyzer": { - "version": "4.5.0", + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz", + "integrity": "sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==", "dev": true, - "license": "MIT", "dependencies": { + "@discoveryjs/json-ext": "0.5.7", "acorn": "^8.0.4", "acorn-walk": "^8.0.0", - "chalk": "^4.1.0", "commander": "^7.2.0", + "debounce": "^1.2.1", + "escape-string-regexp": "^4.0.0", "gzip-size": "^6.0.0", - "lodash": "^4.17.20", + "html-escaper": "^2.0.2", "opener": "^1.5.2", - "sirv": "^1.0.7", + "picocolors": "^1.0.0", + "sirv": "^2.0.3", "ws": "^7.3.1" }, "bin": { @@ -43168,9 +40136,10 @@ } }, "node_modules/webpack-bundle-analyzer/node_modules/acorn": { - "version": "8.10.0", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -43179,96 +40148,37 @@ } }, "node_modules/webpack-bundle-analyzer/node_modules/acorn-walk": { - "version": "8.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/color-convert": { - "version": "2.0.1", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", "dev": true, - "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "acorn": "^8.11.0" }, "engines": { - "node": ">=7.0.0" + "node": ">=0.4.0" } }, - "node_modules/webpack-bundle-analyzer/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, "node_modules/webpack-bundle-analyzer/node_modules/commander": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 10" } }, - "node_modules/webpack-bundle-analyzer/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/webpack-bundle-analyzer/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -43646,6 +40556,27 @@ } } }, + "node_modules/webpack-dev-server/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/webpack-hot-middleware": { "version": "2.26.1", "dev": true, @@ -43668,45 +40599,20 @@ "node": ">=10.0.0" } }, - "node_modules/webpack-sources": { - "version": "1.4.3", - "license": "MIT", - "dependencies": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - } - }, - "node_modules/webpack-sources/node_modules/source-map": { - "version": "0.6.1", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/webpack-virtual-modules": { "version": "0.5.0", "dev": true, "license": "MIT" }, "node_modules/webpack/node_modules/@types/estree": { - "version": "1.0.1", - "license": "MIT" - }, - "node_modules/webpack/node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "license": "MIT", - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/webpack/node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "license": "MIT" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, "node_modules/webpack/node_modules/acorn": { - "version": "8.10.0", - "license": "MIT", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "bin": { "acorn": "bin/acorn" }, @@ -43714,9 +40620,10 @@ "node": ">=0.4.0" } }, - "node_modules/webpack/node_modules/acorn-import-assertions": { - "version": "1.9.0", - "license": "MIT", + "node_modules/webpack/node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "peerDependencies": { "acorn": "^8" } @@ -43855,10 +40762,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-module": { - "version": "2.0.1", - "license": "ISC" - }, "node_modules/which-typed-array": { "version": "1.1.15", "license": "MIT", @@ -43889,12 +40792,6 @@ "dev": true, "license": "MIT" }, - "node_modules/window-size": { - "version": "0.1.0", - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/wonka": { "version": "4.0.15", "resolved": "https://registry.npmjs.org/wonka/-/wonka-4.0.15.tgz", @@ -44011,26 +40908,6 @@ "signal-exit": "^3.0.2" } }, - "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/xcode": { "version": "3.0.1", "license": "Apache-2.0", @@ -44146,10 +41023,6 @@ "node": ">=0.4" } }, - "node_modules/y18n": { - "version": "4.0.3", - "license": "ISC" - }, "node_modules/yallist": { "version": "4.0.0", "license": "ISC" @@ -44177,14 +41050,6 @@ "node": ">=12" } }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "license": "ISC", - "peer": true, - "engines": { - "node": ">=10" - } - }, "node_modules/yargs/node_modules/y18n": { "version": "5.0.8", "license": "ISC", diff --git a/package.json b/package.json index 8c0da62cc548..0158dfbefdba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "9.0.36-1", + "version": "9.0.37-0", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", @@ -70,6 +70,8 @@ "@dotlottie/react-player": "^1.6.3", "@expensify/react-native-live-markdown": "0.1.143", "@expo/metro-runtime": "~3.2.3", + "@firebase/app": "^0.10.10", + "@firebase/performance": "^0.6.8", "@formatjs/intl-datetimeformat": "^6.12.5", "@formatjs/intl-listformat": "^7.5.7", "@formatjs/intl-locale": "^4.0.0", @@ -154,7 +156,7 @@ "react-native-modal": "^13.0.0", "react-native-onyx": "2.0.68", "react-native-pager-view": "6.4.1", - "react-native-pdf": "6.7.5", + "react-native-pdf": "6.7.3", "react-native-performance": "^5.1.0", "react-native-permissions": "^3.10.0", "react-native-picker-select": "git+https://github.com/Expensify/react-native-picker-select.git#da50d2c5c54e268499047f9cc98b8df4196c1ddf", @@ -176,7 +178,7 @@ "react-native-web": "^0.19.12", "react-native-web-sound": "^0.1.3", "react-native-webview": "13.8.6", - "react-pdf": "^7.7.3", + "react-pdf": "9.1.0", "react-plaid-link": "3.3.2", "react-web-config": "^1.0.0", "react-webcam": "^7.1.1", @@ -259,7 +261,7 @@ "babel-plugin-module-resolver": "^5.0.0", "babel-plugin-react-compiler": "0.0.0-experimental-334f00b-20240725", "babel-plugin-react-native-web": "^0.18.7", - "babel-plugin-transform-class-properties": "^6.24.1", + "@babel/plugin-transform-class-properties": "^7.25.4", "babel-plugin-transform-remove-console": "^6.9.4", "clean-webpack-plugin": "^4.0.0", "concurrently": "^8.2.2", @@ -315,7 +317,7 @@ "type-fest": "4.20.0", "typescript": "^5.4.5", "wait-port": "^0.2.9", - "webpack": "^5.76.0", + "webpack": "^5.94.0", "webpack-bundle-analyzer": "^4.5.0", "webpack-cli": "^5.0.4", "webpack-dev-server": "^5.0.4", @@ -325,7 +327,26 @@ "react-native": "0.75.2", "react-native-svg": "$react-native-svg", "react": "18.3.1", - "react-dom": "18.3.1" + "react-dom": "18.3.1", + "braces": "3.0.3", + "yargs": "17.7.2", + "yargs-parser": "21.1.1", + "@expo/config-plugins": "8.0.4", + "ws": "8.17.1", + "react-pdf": "9.1.0", + "micromatch": "4.0.8", + "json5": "2.2.2", + "loader-utils": "2.0.4", + "follow-redirects": "1.15.6", + "fast-xml-parser": "4.4.1", + "express": "4.20.0", + "elliptic": "6.5.7", + "fast-json-patch": "3.1.1", + "webpack": "^5.94.0", + "@blakeembrey/template": "1.2.0", + "body-parser": "1.20.3", + "path-to-regexp": "0.1.10", + "send": "0.19.0" }, "expo": { "autolinking": { diff --git a/patches/react-fast-pdf+1.0.14.patch b/patches/react-fast-pdf+1.0.14.patch new file mode 100644 index 000000000000..78a47bfb1b58 --- /dev/null +++ b/patches/react-fast-pdf+1.0.14.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/react-fast-pdf/dist/PDFPreviewer.js b/node_modules/react-fast-pdf/dist/PDFPreviewer.js +index 4407807..ea3964d 100644 +--- a/node_modules/react-fast-pdf/dist/PDFPreviewer.js ++++ b/node_modules/react-fast-pdf/dist/PDFPreviewer.js +@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { + Object.defineProperty(exports, "__esModule", { value: true }); + // @ts-expect-error - This line imports a module from 'pdfjs-dist' package which lacks TypeScript typings. + // eslint-disable-next-line import/no-extraneous-dependencies +-const pdf_worker_1 = __importDefault(require("pdfjs-dist/legacy/build/pdf.worker")); ++const pdf_worker_1 = __importDefault(require("pdfjs-dist/legacy/build/pdf.worker.mjs")); + const react_1 = __importStar(require("react")); + const times_1 = __importDefault(require("lodash/times")); + const prop_types_1 = __importDefault(require("prop-types")); diff --git a/patches/react-native-pdf+6.7.3.patch b/patches/react-native-pdf+6.7.3.patch new file mode 100644 index 000000000000..0f0f270cefd1 --- /dev/null +++ b/patches/react-native-pdf+6.7.3.patch @@ -0,0 +1,53 @@ +diff --git a/node_modules/react-native-pdf/react-native-pdf.podspec b/node_modules/react-native-pdf/react-native-pdf.podspec +index fb36140..5d5f19e 100644 +--- a/node_modules/react-native-pdf/react-native-pdf.podspec ++++ b/node_modules/react-native-pdf/react-native-pdf.podspec +@@ -17,24 +17,11 @@ Pod::Spec.new do |s| + s.framework = "PDFKit" + + if fabric_enabled +- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' +- +- s.pod_target_xcconfig = { +- 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly"', +- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", +- } + s.platforms = { ios: '11.0', tvos: '11.0' } +- s.compiler_flags = folly_compiler_flags + ' -DRCT_NEW_ARCH_ENABLED' + s.source_files = 'ios/**/*.{h,m,mm,cpp}' + s.requires_arc = true + +- s.dependency "React" +- s.dependency "React-RCTFabric" +- s.dependency "React-Codegen" +- s.dependency "RCT-Folly" +- s.dependency "RCTRequired" +- s.dependency "RCTTypeSafety" +- s.dependency "ReactCommon/turbomodule/core" ++ install_modules_dependencies(s) + else + s.platform = :ios, '8.0' + s.source_files = 'ios/**/*.{h,m,mm}' +diff --git a/node_modules/react-native-pdf/index.js b/node_modules/react-native-pdf/index.js +index c05de52..bea7af8 100644 +--- a/node_modules/react-native-pdf/index.js ++++ b/node_modules/react-native-pdf/index.js +@@ -367,11 +367,17 @@ export default class Pdf extends Component { + message[4] = message.splice(4).join('|'); + } + if (message[0] === 'loadComplete') { ++ let tableContents; ++ try { ++ tableContents = message[4]&&JSON.parse(message[4]); ++ } catch(e) { ++ tableContents = message[4]; ++ } + this.props.onLoadComplete && this.props.onLoadComplete(Number(message[1]), this.state.path, { + width: Number(message[2]), + height: Number(message[3]), + }, +- message[4]&&JSON.parse(message[4])); ++ tableContents); + } else if (message[0] === 'pageChanged') { + this.props.onPageChanged && this.props.onPageChanged(Number(message[1]), Number(message[2])); + } else if (message[0] === 'error') { diff --git a/patches/react-native-pdf+6.7.5.patch b/patches/react-native-pdf+6.7.5.patch deleted file mode 100644 index 0cdcf4d5b0c9..000000000000 --- a/patches/react-native-pdf+6.7.5.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js b/node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js -index 596d796..4e47061 100644 ---- a/node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js -+++ b/node_modules/react-native-pdf/fabric/RNPDFPdfNativeComponent.js -@@ -22,6 +22,7 @@ - enablePaging: ?boolean, - enableRTL: ?boolean, - enableAnnotationRendering: ?boolean, -+ enableDoubleTapZoom: ?boolean, - showsHorizontalScrollIndicator: ?boolean, - showsVerticalScrollIndicator: ?boolean, - enableAntialiasing: ?boolean, diff --git a/patches/react-pdf+7.7.3.patch b/patches/react-pdf+9.1.0.patch similarity index 74% rename from patches/react-pdf+7.7.3.patch rename to patches/react-pdf+9.1.0.patch index 0f9a2f47d3c7..f046202de9c2 100644 --- a/patches/react-pdf+7.7.3.patch +++ b/patches/react-pdf+9.1.0.patch @@ -1,24 +1,24 @@ diff --git a/node_modules/react-pdf/dist/cjs/Document.js b/node_modules/react-pdf/dist/cjs/Document.js -index 9bb0398..032d898 100644 +index ed7114d..43d648b 100644 --- a/node_modules/react-pdf/dist/cjs/Document.js +++ b/node_modules/react-pdf/dist/cjs/Document.js -@@ -289,6 +289,7 @@ const Document = (0, react_1.forwardRef)(function Document(_a, ref) { +@@ -281,6 +281,7 @@ const Document = (0, react_1.forwardRef)(function Document(_a, ref) { pdfDispatch({ type: 'REJECT', error }); }); return () => { + loadingTask._worker.destroy(); loadingTask.destroy(); }; - } + }, [options, pdfDispatch, source]); diff --git a/node_modules/react-pdf/dist/esm/Document.js b/node_modules/react-pdf/dist/esm/Document.js -index b1c5a81..569769e 100644 +index 997a370..894e3c9 100644 --- a/node_modules/react-pdf/dist/esm/Document.js +++ b/node_modules/react-pdf/dist/esm/Document.js -@@ -261,6 +261,7 @@ const Document = forwardRef(function Document(_a, ref) { +@@ -253,6 +253,7 @@ const Document = forwardRef(function Document(_a, ref) { pdfDispatch({ type: 'REJECT', error }); }); return () => { + loadingTask._worker.destroy(); loadingTask.destroy(); }; - } + }, [options, pdfDispatch, source]); diff --git a/src/App.tsx b/src/App.tsx index cf0fd5528eec..35254fa29b2a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -20,6 +20,7 @@ import OnyxProvider from './components/OnyxProvider'; import PopoverContextProvider from './components/PopoverProvider'; import SafeArea from './components/SafeArea'; import ScrollOffsetContextProvider from './components/ScrollOffsetContextProvider'; +import {SearchRouterContextProvider} from './components/Search/SearchRouter/SearchRouterContext'; import ThemeIllustrationsProvider from './components/ThemeIllustrationsProvider'; import ThemeProvider from './components/ThemeProvider'; import ThemeStylesProvider from './components/ThemeStylesProvider'; @@ -94,6 +95,7 @@ function App({url}: AppProps) { VolumeContextProvider, VideoPopoverMenuContextProvider, KeyboardProvider, + SearchRouterContextProvider, ]} > diff --git a/src/CONFIG.ts b/src/CONFIG.ts index 047d4dc823fd..d82a261c2ec6 100644 --- a/src/CONFIG.ts +++ b/src/CONFIG.ts @@ -96,6 +96,11 @@ export default { IOS_CLIENT_ID: '921154746561-s3uqn2oe4m85tufi6mqflbfbuajrm2i3.apps.googleusercontent.com', }, GCP_GEOLOCATION_API_KEY: googleGeolocationAPIKey, + FIREBASE_WEB_CONFIG: { + apiKey: get(Config, 'FB_API_KEY', 'AIzaSyDxzigVLZl4G8MP7jACQ0qpmADMzmrrON0'), + appId: get(Config, 'FB_APP_ID', '1:921154746561:web:7b8213357d07d6e4027c40'), + projectId: get(Config, 'FB_PROJECT_ID', 'expensify-chat'), + }, // to read more about StrictMode see: contributingGuides/STRICT_MODE.md USE_REACT_STRICT_MODE_IN_DEV: false, } as const; diff --git a/src/CONST.ts b/src/CONST.ts index 20eab24cf856..c48bd0077940 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -727,6 +727,7 @@ const CONST = { ADMIN_POLICIES_URL: 'admin_policies', ADMIN_DOMAINS_URL: 'admin_domains', INBOX: 'inbox', + POLICY_CONNECTIONS_URL: (policyID: string) => `policy?param={"policyID":"${policyID}"}#connections`, }, EXPENSIFY_POLICY_DOMAIN, @@ -1054,7 +1055,6 @@ const CONST = { BOTTOM_DOCKED: 'bottom_docked', POPOVER: 'popover', RIGHT_DOCKED: 'right_docked', - ONBOARDING: 'onboarding', }, ANCHOR_ORIGIN_VERTICAL: { TOP: 'top', @@ -4039,70 +4039,6 @@ const CONST = { EXPENSIFY_LOGO_MARGIN_RATIO: 0.03, }, - /** - * Acceptable values for the `accessibilityRole` prop on react native components. - * - * **IMPORTANT:** Do not use with the `role` prop as it can cause errors. - * - * @deprecated ACCESSIBILITY_ROLE is deprecated. Please use CONST.ROLE instead. - */ - ACCESSIBILITY_ROLE: { - /** - * @deprecated Please stop using the accessibilityRole prop and use the role prop instead. - */ - BUTTON: 'button', - - /** - * @deprecated Please stop using the accessibilityRole prop and use the role prop instead. - */ - LINK: 'link', - - /** - * @deprecated Please stop using the accessibilityRole prop and use the role prop instead. - */ - MENUITEM: 'menuitem', - - /** - * @deprecated Please stop using the accessibilityRole prop and use the role prop instead. - */ - TEXT: 'text', - - /** - * @deprecated Please stop using the accessibilityRole prop and use the role prop instead. - */ - RADIO: 'radio', - - /** - * @deprecated Please stop using the accessibilityRole prop and use the role prop instead. - */ - IMAGEBUTTON: 'imagebutton', - - /** - * @deprecated Please stop using the accessibilityRole prop and use the role prop instead. - */ - CHECKBOX: 'checkbox', - - /** - * @deprecated Please stop using the accessibilityRole prop and use the role prop instead. - */ - SWITCH: 'switch', - - /** - * @deprecated Please stop using the accessibilityRole prop and use the role prop instead. - */ - ADJUSTABLE: 'adjustable', - - /** - * @deprecated Please stop using the accessibilityRole prop and use the role prop instead. - */ - IMAGE: 'image', - - /** - * @deprecated Please stop using the accessibilityRole prop and use the role prop instead. - */ - TEXTBOX: 'textbox', - }, - /** * Acceptable values for the `role` attribute on react native components. * @@ -4606,6 +4542,25 @@ const CONST = { '\n' + `[Take me to workspace category settings](${workspaceCategoriesLink}).`, }, + { + type: 'setupTags', + autoCompleted: false, + title: 'Set up tags (optional)', + description: ({workspaceMoreFeaturesLink}) => + 'Tags can be used if you want more details with every expense. Use tags for projects, clients, locations, departments, and more. If you need multiple levels of tags you can upgrade to a control plan.\n' + + '\n' + + '*Here’s how to set up tags:*\n' + + '\n' + + '1. Click your profile picture.\n' + + '2. Go to Workspaces.\n' + + '3. Select your workspace.\n' + + '4. Click More features.\n' + + '5. Enable tags.\n' + + '6. Navigate to Tags in the workspace editor.\n' + + '7. In Tags, click + Add tag to make your own.\n' + + '\n' + + `*[Take me to more features](${workspaceMoreFeaturesLink})*`, + }, { type: 'addExpenseApprovals', autoCompleted: false, @@ -5797,6 +5752,7 @@ const CONST = { ICON_HEIGHT: 160, CATEGORIES_ARTICLE_LINK: 'https://help.expensify.com/articles/expensify-classic/workspaces/Create-categories#import-custom-categories', + TAGS_ARTICLE_LINK: 'https://help.expensify.com/articles/expensify-classic/workspaces/Create-tags#import-a-spreadsheet-1', }, } as const; diff --git a/src/ROUTES.ts b/src/ROUTES.ts index 27504998c49c..04cc8a125fbb 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -430,8 +430,8 @@ const ROUTES = { getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/categories`, backTo), }, SETTINGS_CATEGORY_SETTINGS: { - route: 'settings/:policyID/categories/:categoryName', - getRoute: (policyID: string, categoryName: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/categories/${encodeURIComponent(categoryName)}`, backTo), + route: 'settings/:policyID/category/:categoryName', + getRoute: (policyID: string, categoryName: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/category/${encodeURIComponent(categoryName)}`, backTo), }, SETTINGS_CATEGORIES_SETTINGS: { route: 'settings/:policyID/categories/settings', @@ -442,9 +442,8 @@ const ROUTES = { getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/categories/new`, backTo), }, SETTINGS_CATEGORY_EDIT: { - route: 'settings/:policyID/categories/:categoryName/edit', - getRoute: (policyID: string, categoryName: string, backTo = '') => - getUrlWithBackToParam(`settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/edit`, backTo), + route: 'settings/:policyID/category/:categoryName/edit', + getRoute: (policyID: string, categoryName: string, backTo = '') => getUrlWithBackToParam(`settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/edit`, backTo), }, MONEY_REQUEST_STEP_CURRENCY: { route: ':action/:iouType/currency/:transactionID/:reportID/:pageIndex?', @@ -771,8 +770,8 @@ const ROUTES = { getRoute: (policyID: string) => `settings/workspaces/${policyID}/categories` as const, }, WORKSPACE_CATEGORY_SETTINGS: { - route: 'settings/workspaces/:policyID/categories/:categoryName', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}` as const, + route: 'settings/workspaces/:policyID/category/:categoryName', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}` as const, }, WORKSPACE_UPGRADE: { route: 'settings/workspaces/:policyID/upgrade/:featureName', @@ -796,36 +795,36 @@ const ROUTES = { getRoute: (policyID: string) => `settings/workspaces/${policyID}/categories/new` as const, }, WORKSPACE_CATEGORY_EDIT: { - route: 'settings/workspaces/:policyID/categories/:categoryName/edit', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/edit` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/edit', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/edit` as const, }, WORKSPACE_CATEGORY_PAYROLL_CODE: { - route: 'settings/workspaces/:policyID/categories/:categoryName/payroll-code', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/payroll-code` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/payroll-code', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/payroll-code` as const, }, WORKSPACE_CATEGORY_GL_CODE: { - route: 'settings/workspaces/:policyID/categories/:categoryName/gl-code', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/gl-code` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/gl-code', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/gl-code` as const, }, WORSKPACE_CATEGORY_DEFAULT_TAX_RATE: { - route: 'settings/workspaces/:policyID/categories/:categoryName/tax-rate', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/tax-rate` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/tax-rate', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/tax-rate` as const, }, WORSKPACE_CATEGORY_FLAG_AMOUNTS_OVER: { - route: 'settings/workspaces/:policyID/categories/:categoryName/flag-amounts', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/flag-amounts` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/flag-amounts', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/flag-amounts` as const, }, WORSKPACE_CATEGORY_DESCRIPTION_HINT: { - route: 'settings/workspaces/:policyID/categories/:categoryName/description-hint', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/description-hint` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/description-hint', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/description-hint` as const, }, WORSKPACE_CATEGORY_REQUIRE_RECEIPTS_OVER: { - route: 'settings/workspaces/:policyID/categories/:categoryName/require-receipts-over', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/require-receipts-over` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/require-receipts-over', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/require-receipts-over` as const, }, WORSKPACE_CATEGORY_APPROVER: { - route: 'settings/workspaces/:policyID/categories/:categoryName/approver', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/approver` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/approver', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/approver` as const, }, WORKSPACE_MORE_FEATURES: { route: 'settings/workspaces/:policyID/more-features', @@ -863,6 +862,14 @@ const ROUTES = { route: 'settings/workspaces/:policyID/tag/:orderWeight/:tagName/gl-code', getRoute: (policyID: string, orderWeight: number, tagName: string) => `settings/workspaces/${policyID}/tag/${orderWeight}/${encodeURIComponent(tagName)}/gl-code` as const, }, + WORKSPACE_TAGS_IMPORT: { + route: 'settings/workspaces/:policyID/tags/import', + getRoute: (policyID: string) => `settings/workspaces/${policyID}/tags/import` as const, + }, + WORKSPACE_TAGS_IMPORTED: { + route: 'settings/workspaces/:policyID/tags/imported', + getRoute: (policyID: string) => `settings/workspaces/${policyID}/tags/imported` as const, + }, WORKSPACE_TAXES: { route: 'settings/workspaces/:policyID/taxes', getRoute: (policyID: string) => `settings/workspaces/${policyID}/taxes` as const, diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 8168afba89ab..2369e231f519 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -411,6 +411,8 @@ const SCREENS = { TAGS: 'Workspace_Tags', TAGS_SETTINGS: 'Tags_Settings', TAGS_EDIT: 'Tags_Edit', + TAGS_IMPORT: 'Tags_Import', + TAGS_IMPORTED: 'Tags_Imported', TAG_EDIT: 'Tag_Edit', TAXES: 'Workspace_Taxes', REPORT_FIELDS: 'Workspace_ReportFields', diff --git a/src/components/AmountForm.tsx b/src/components/AmountForm.tsx index 09b5fd0cf7d6..564077387d5b 100644 --- a/src/components/AmountForm.tsx +++ b/src/components/AmountForm.tsx @@ -256,6 +256,7 @@ function AmountForm( prefixStyle={styles.colorMuted} keyboardType={CONST.KEYBOARD_TYPE.DECIMAL_PAD} inputMode={CONST.INPUT_MODE.DECIMAL} + errorText={errorText} // eslint-disable-next-line react/jsx-props-no-spreading {...rest} /> diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index 34710a2d897e..7324a9dd9fbe 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -143,13 +143,13 @@ type ButtonProps = Partial & { type KeyboardShortcutComponentProps = Pick; -const accessibilityRoles: string[] = Object.values(CONST.ACCESSIBILITY_ROLE); +const accessibilityRoles: string[] = Object.values(CONST.ROLE); function KeyboardShortcutComponent({isDisabled = false, isLoading = false, onPress = () => {}, pressOnEnter, allowBubble, enterKeyEventListenerPriority}: KeyboardShortcutComponentProps) { const isFocused = useIsFocused(); const activeElementRole = useActiveElementRole(); - const shouldDisableEnterShortcut = useMemo(() => accessibilityRoles.includes(activeElementRole ?? '') && activeElementRole !== CONST.ACCESSIBILITY_ROLE.TEXT, [activeElementRole]); + const shouldDisableEnterShortcut = useMemo(() => accessibilityRoles.includes(activeElementRole ?? ''), [activeElementRole]); const keyboardShortcutCallback = useCallback( (event?: GestureResponderEvent | KeyboardEvent) => { @@ -332,6 +332,9 @@ function Button( /> )} { diff --git a/src/components/CategoryPicker.tsx b/src/components/CategoryPicker.tsx index 7955e5993ba9..e5c85a8f5f6d 100644 --- a/src/components/CategoryPicker.tsx +++ b/src/components/CategoryPicker.tsx @@ -24,12 +24,9 @@ type CategoryPickerProps = CategoryPickerOnyxProps & { policyID: string; selectedCategory?: string; onSubmit: (item: ListItem) => void; - - /** Whether SectionList should use custom ScrollView */ - shouldUseCustomScrollView?: boolean; }; -function CategoryPicker({selectedCategory, policyCategories, policyRecentlyUsedCategories, policyCategoriesDraft, onSubmit, shouldUseCustomScrollView = false}: CategoryPickerProps) { +function CategoryPicker({selectedCategory, policyCategories, policyRecentlyUsedCategories, policyCategoriesDraft, onSubmit}: CategoryPickerProps) { const {translate} = useLocalize(); const [searchValue, debouncedSearchValue, setSearchValue] = useDebouncedState(''); @@ -87,7 +84,6 @@ function CategoryPicker({selectedCategory, policyCategories, policyRecentlyUsedC ListItem={RadioListItem} initiallyFocusedOptionKey={selectedOptionKey ?? undefined} isRowMultilineSupported - shouldUseCustomScrollView={shouldUseCustomScrollView} /> ); } diff --git a/src/components/FocusTrap/BOTTOM_TAB_SCREENS.ts b/src/components/FocusTrap/BOTTOM_TAB_SCREENS.ts index b472b80e5cbd..f6a4f5ba6e83 100644 --- a/src/components/FocusTrap/BOTTOM_TAB_SCREENS.ts +++ b/src/components/FocusTrap/BOTTOM_TAB_SCREENS.ts @@ -1,6 +1,6 @@ import NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; -const BOTTOM_TAB_SCREENS = [SCREENS.HOME, SCREENS.SETTINGS.ROOT, NAVIGATORS.BOTTOM_TAB_NAVIGATOR]; +const BOTTOM_TAB_SCREENS = [SCREENS.HOME, SCREENS.SETTINGS.ROOT, NAVIGATORS.BOTTOM_TAB_NAVIGATOR, SCREENS.SEARCH.BOTTOM_TAB]; export default BOTTOM_TAB_SCREENS; diff --git a/src/components/FocusTrap/FocusTrapForScreen/index.web.tsx b/src/components/FocusTrap/FocusTrapForScreen/index.web.tsx index d91779540447..a51a7d7456e1 100644 --- a/src/components/FocusTrap/FocusTrapForScreen/index.web.tsx +++ b/src/components/FocusTrap/FocusTrapForScreen/index.web.tsx @@ -51,8 +51,11 @@ function FocusTrapForScreen({children, focusTrapSettings}: FocusTrapProps) { return false; } - const isFocusedElementInsideContainer = focusTrapContainers?.some((container) => container.contains(document.activeElement)); - if (isFocusedElementInsideContainer) { + const isFocusedElementInsideContainer = !!focusTrapContainers?.some((container) => container.contains(document.activeElement)); + const hasButtonWithEnterListener = !!focusTrapContainers?.some( + (container) => !!container.querySelector(`button[data-listener="${CONST.KEYBOARD_SHORTCUTS.ENTER.shortcutKey}"]`), + ); + if (isFocusedElementInsideContainer || hasButtonWithEnterListener) { return false; } return undefined; diff --git a/src/components/ImportSpreadsheetColumns.tsx b/src/components/ImportSpreadsheetColumns.tsx index a38e3c636e86..95a6ea4516ac 100644 --- a/src/components/ImportSpreadsheetColumns.tsx +++ b/src/components/ImportSpreadsheetColumns.tsx @@ -36,14 +36,11 @@ type ImportSpreadsheetColumnsProps = { // An optional boolean indicating whether the import button is in a loading state. isButtonLoading?: boolean; - // A string representing the header text to be rendered. - headerText: string; - // Link to learn more about the file preparation for import. learnMoreLink?: string; }; -function ImportSpreeadsheetColumns({spreadsheetColumns, columnNames, columnRoles, errors, importFunction, isButtonLoading, headerText, learnMoreLink}: ImportSpreadsheetColumnsProps) { +function ImportSpreeadsheetColumns({spreadsheetColumns, columnNames, columnRoles, errors, importFunction, isButtonLoading, learnMoreLink}: ImportSpreadsheetColumnsProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); const {isOffline} = useNetwork(); @@ -55,7 +52,7 @@ function ImportSpreeadsheetColumns({spreadsheetColumns, columnNames, columnRoles - {headerText} + {translate('spreadsheet.importDescription')} {` ${translate('common.learnMore')}`} diff --git a/src/components/PDFThumbnail/index.tsx b/src/components/PDFThumbnail/index.tsx index f064229f0739..1115ea21dad4 100644 --- a/src/components/PDFThumbnail/index.tsx +++ b/src/components/PDFThumbnail/index.tsx @@ -1,4 +1,6 @@ -import pdfWorkerSource from 'pdfjs-dist/legacy/build/pdf.worker'; +import 'core-js/proposals/promise-with-resolvers'; +// eslint-disable-next-line import/extensions +import pdfWorkerSource from 'pdfjs-dist/legacy/build/pdf.worker.mjs'; import React, {useMemo, useState} from 'react'; import {View} from 'react-native'; import {Document, pdfjs, Thumbnail} from 'react-pdf'; diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index a411b591a3d3..878fdd8a9c10 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -377,9 +377,12 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals return [imageViolations, allViolations]; }, [transactionViolations, translate]); + const receiptRequiredViolation = transactionViolations?.some((violation) => violation.name === CONST.VIOLATIONS.RECEIPT_REQUIRED); + // Whether to show receipt audit result (e.g.`Verified`, `Issue Found`) and messages (e.g. `Receipt not verified. Please confirm accuracy.`) // `!!(receiptViolations.length || didReceiptScanSucceed)` is for not showing `Verified` when `receiptViolations` is empty and `didReceiptScanSucceed` is false. - const shouldShowAuditMessage = !isReceiptBeingScanned && hasReceipt && !!(receiptViolations.length || didReceiptScanSucceed) && ReportUtils.isPaidGroupPolicy(report); + const shouldShowAuditMessage = + !isReceiptBeingScanned && (hasReceipt || receiptRequiredViolation) && !!(receiptViolations.length || didReceiptScanSucceed) && ReportUtils.isPaidGroupPolicy(report); const shouldShowReceiptAudit = isReceiptAllowed && (shouldShowReceiptEmptyState || hasReceipt); const errors = { @@ -431,7 +434,7 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals {shouldShowReceiptAudit && ( )} {(hasReceipt || errors) && ( diff --git a/src/components/Search/SearchFiltersParticipantsSelector.tsx b/src/components/Search/SearchFiltersParticipantsSelector.tsx index 436cdba91af2..a76ca767ae2a 100644 --- a/src/components/Search/SearchFiltersParticipantsSelector.tsx +++ b/src/components/Search/SearchFiltersParticipantsSelector.tsx @@ -104,19 +104,20 @@ function SearchFiltersParticipantsSelector({initialAccountIDs, onFiltersUpdate}: true, ); - const isCurrentUserSelected = selectedOptions.find((option) => option.accountID === chatOptions.currentUserOption?.accountID); + const selectedCurrentUser = formattedResults.section.data.find((option) => option.accountID === chatOptions.currentUserOption?.accountID); - newSections.push(formattedResults.section); - - if (chatOptions.currentUserOption && !isCurrentUserSelected) { + if (chatOptions.currentUserOption) { const formattedName = ReportUtils.getDisplayNameForParticipant(chatOptions.currentUserOption.accountID, false, true, true, personalDetails); - newSections.push({ - title: '', - data: [{...chatOptions.currentUserOption, text: formattedName}], - shouldShow: true, - }); + if (selectedCurrentUser) { + selectedCurrentUser.text = formattedName; + } else { + chatOptions.currentUserOption.text = formattedName; + chatOptions.recentReports = [chatOptions.currentUserOption, ...chatOptions.recentReports]; + } } + newSections.push(formattedResults.section); + newSections.push({ title: '', data: chatOptions.recentReports, @@ -136,7 +137,7 @@ function SearchFiltersParticipantsSelector({initialAccountIDs, onFiltersUpdate}: sections: newSections, headerMessage: message, }; - }, [areOptionsInitialized, cleanSearchTerm, selectedOptions, chatOptions.recentReports, chatOptions.personalDetails, chatOptions.currentUserOption, personalDetails, translate]); + }, [areOptionsInitialized, cleanSearchTerm, selectedOptions, chatOptions, personalDetails, translate]); // This effect handles setting initial selectedOptions based on accountIDs saved in onyx form useEffect(() => { diff --git a/src/components/Search/SearchRouter/SearchButton.tsx b/src/components/Search/SearchRouter/SearchButton.tsx new file mode 100644 index 000000000000..4948c90ce3d1 --- /dev/null +++ b/src/components/Search/SearchRouter/SearchButton.tsx @@ -0,0 +1,37 @@ +import React from 'react'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import {PressableWithoutFeedback} from '@components/Pressable'; +import useTheme from '@hooks/useTheme'; +import useThemeStyles from '@hooks/useThemeStyles'; +import Permissions from '@libs/Permissions'; +import {useSearchRouterContext} from './SearchRouterContext'; + +function SearchButton() { + const styles = useThemeStyles(); + const theme = useTheme(); + const {openSearchRouter} = useSearchRouterContext(); + + if (!Permissions.canUseNewSearchRouter()) { + return; + } + + return ( + { + openSearchRouter(); + }} + > + + + ); +} + +SearchButton.displayName = 'SearchButton'; + +export default SearchButton; diff --git a/src/components/Search/SearchRouter/SearchRouter.tsx b/src/components/Search/SearchRouter/SearchRouter.tsx new file mode 100644 index 000000000000..b38c55279c1e --- /dev/null +++ b/src/components/Search/SearchRouter/SearchRouter.tsx @@ -0,0 +1,102 @@ +import debounce from 'lodash/debounce'; +import React, {useCallback, useState} from 'react'; +import {View} from 'react-native'; +import FocusTrapForModal from '@components/FocusTrap/FocusTrapForModal'; +import Modal from '@components/Modal'; +import type {SearchQueryJSON} from '@components/Search/types'; +import useKeyboardShortcut from '@hooks/useKeyboardShortcut'; +import useResponsiveLayout from '@hooks/useResponsiveLayout'; +import useThemeStyles from '@hooks/useThemeStyles'; +import * as SearchUtils from '@libs/SearchUtils'; +import Navigation from '@navigation/Navigation'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; +import {useSearchRouterContext} from './SearchRouterContext'; +import SearchRouterInput from './SearchRouterInput'; + +const SEARCH_DEBOUNCE_DELAY = 200; + +function SearchRouter() { + const styles = useThemeStyles(); + + const {isSmallScreenWidth} = useResponsiveLayout(); + const {isSearchRouterDisplayed, closeSearchRouter} = useSearchRouterContext(); + const [currentQuery, setCurrentQuery] = useState(undefined); + + const clearUserQuery = () => { + setCurrentQuery(undefined); + }; + + const onSearchChange = debounce((userQuery: string) => { + if (!userQuery) { + clearUserQuery(); + return; + } + + const queryJSON = SearchUtils.buildSearchQueryJSON(userQuery); + + if (queryJSON) { + // eslint-disable-next-line + console.log('parsedQuery', queryJSON); + + setCurrentQuery(queryJSON); + } else { + // Handle query parsing error + } + }, SEARCH_DEBOUNCE_DELAY); + + const onSearchSubmit = useCallback(() => { + closeSearchRouter(); + + const query = SearchUtils.buildSearchQueryString(currentQuery); + Navigation.navigate(ROUTES.SEARCH_CENTRAL_PANE.getRoute({query})); + clearUserQuery(); + }, [currentQuery, closeSearchRouter]); + + useKeyboardShortcut( + CONST.KEYBOARD_SHORTCUTS.ENTER, + () => { + if (!currentQuery) { + return; + } + + onSearchSubmit(); + }, + { + captureOnInputs: true, + shouldBubble: false, + }, + ); + + useKeyboardShortcut(CONST.KEYBOARD_SHORTCUTS.ESCAPE, () => { + closeSearchRouter(); + clearUserQuery(); + }); + + const modalType = isSmallScreenWidth ? CONST.MODAL.MODAL_TYPE.CENTERED : CONST.MODAL.MODAL_TYPE.POPOVER; + const isFullWidth = isSmallScreenWidth; + + return ( + + + + + + + + ); +} + +SearchRouter.displayName = 'SearchRouter'; + +export default SearchRouter; diff --git a/src/components/Search/SearchRouter/SearchRouterContext.tsx b/src/components/Search/SearchRouter/SearchRouterContext.tsx new file mode 100644 index 000000000000..d935fff110a4 --- /dev/null +++ b/src/components/Search/SearchRouter/SearchRouterContext.tsx @@ -0,0 +1,37 @@ +import React, {useContext, useMemo, useState} from 'react'; +import type ChildrenProps from '@src/types/utils/ChildrenProps'; + +const defaultSearchContext = { + isSearchRouterDisplayed: false, + openSearchRouter: () => {}, + closeSearchRouter: () => {}, +}; + +type SearchRouterContext = typeof defaultSearchContext; + +const Context = React.createContext(defaultSearchContext); + +function SearchRouterContextProvider({children}: ChildrenProps) { + const [isSearchRouterDisplayed, setIsSearchRouterDisplayed] = useState(false); + + const routerContext = useMemo(() => { + const openSearchRouter = () => setIsSearchRouterDisplayed(true); + const closeSearchRouter = () => setIsSearchRouterDisplayed(false); + + return { + isSearchRouterDisplayed, + openSearchRouter, + closeSearchRouter, + }; + }, [isSearchRouterDisplayed, setIsSearchRouterDisplayed]); + + return {children}; +} + +function useSearchRouterContext() { + return useContext(Context); +} + +SearchRouterContextProvider.displayName = 'SearchRouterContextProvider'; + +export {SearchRouterContextProvider, useSearchRouterContext}; diff --git a/src/components/Search/SearchRouter/SearchRouterInput.tsx b/src/components/Search/SearchRouter/SearchRouterInput.tsx new file mode 100644 index 000000000000..860a46239d21 --- /dev/null +++ b/src/components/Search/SearchRouter/SearchRouterInput.tsx @@ -0,0 +1,41 @@ +import React, {useState} from 'react'; +import BaseTextInput from '@components/TextInput/BaseTextInput'; +import useThemeStyles from '@hooks/useThemeStyles'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; + +type SearchRouterInputProps = { + isFullWidth: boolean; + onChange: (searchTerm: string) => void; + onSubmit: () => void; +}; + +function SearchRouterInput({isFullWidth, onChange, onSubmit}: SearchRouterInputProps) { + const styles = useThemeStyles(); + + const [value, setValue] = useState(''); + + const onChangeText = (text: string) => { + setValue(text); + onChange(text); + }; + + const modalWidth = isFullWidth ? styles.w100 : {width: variables.popoverWidth}; + + return ( + + ); +} + +SearchRouterInput.displayName = 'SearchRouterInput'; + +export default SearchRouterInput; diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index a78944b50112..31207fdbf1d7 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -30,6 +30,7 @@ function BaseListItem({ children, isFocused, shouldSyncFocus = true, + shouldDisplayRBR = true, onFocus = () => {}, hoverStyle, onLongPressRow, @@ -115,7 +116,7 @@ function BaseListItem({ )} - {!item.isSelected && !!item.brickRoadIndicator && ( + {!item.isSelected && !!item.brickRoadIndicator && shouldDisplayRBR && ( ( shouldStopPropagation = false, shouldShowTooltips = true, shouldUseDynamicMaxToRenderPerBatch = false, - shouldUseCustomScrollView = false, rightHandSideComponent, isLoadingNewOptions = false, onLayout, @@ -426,9 +424,6 @@ function BaseSelectionList( ); - // eslint-disable-next-line react/jsx-props-no-spreading - const scrollComponent = shouldUseCustomScrollView ? (props: ScrollViewProps) => : undefined; - const renderItem = ({item, index, section}: SectionListRenderItemInfo>) => { const normalizedIndex = index + (section?.indexOffset ?? 0); const isDisabled = !!section.isDisabled || item.isDisabled; @@ -708,7 +703,6 @@ function BaseSelectionList( {!listHeaderContent && header()} ({ const subscriptAvatarBorderColor = isFocused ? focusedBackgroundColor : theme.sidebar; const hoveredBackgroundColor = !!styles.sidebarLinkHover && 'backgroundColor' in styles.sidebarLinkHover ? styles.sidebarLinkHover.backgroundColor : theme.sidebar; + const shouldShowCheckBox = canSelectMultiple && !item.isDisabled; + const handleCheckboxPress = useCallback(() => { if (onCheckboxPress) { onCheckboxPress(item); @@ -68,6 +70,7 @@ function InviteMemberListItem({ keyForList={item.keyForList} onFocus={onFocus} shouldSyncFocus={shouldSyncFocus} + shouldDisplayRBR={!shouldShowCheckBox} > {(hovered?: boolean) => ( <> @@ -113,7 +116,7 @@ function InviteMemberListItem({ )} {!!item.rightElement && item.rightElement} - {canSelectMultiple && !item.isDisabled && ( + {shouldShowCheckBox && ( diff --git a/src/components/SelectionList/types.ts b/src/components/SelectionList/types.ts index 7bdbb03f2101..c1085c71e0f6 100644 --- a/src/components/SelectionList/types.ts +++ b/src/components/SelectionList/types.ts @@ -260,6 +260,9 @@ type ListItemProps = CommonListItemProps & { * When we type something into the text input, the first element found is focused, in this situation we should not synchronize the focus on the element because we will lose the focus from the text input. */ shouldSyncFocus?: boolean; + + /** Whether to show RBR */ + shouldDisplayRBR?: boolean; }; type BaseListItemProps = CommonListItemProps & { @@ -273,6 +276,7 @@ type BaseListItemProps = CommonListItemProps & { children?: ReactElement> | ((hovered: boolean) => ReactElement>); shouldSyncFocus?: boolean; hoverStyle?: StyleProp; + shouldDisplayRBR?: boolean; }; type UserListItemProps = ListItemProps & { @@ -456,9 +460,6 @@ type BaseSelectionListProps = Partial & { /** Whether to use dynamic maxToRenderPerBatch depending on the visible number of elements */ shouldUseDynamicMaxToRenderPerBatch?: boolean; - /** Whether SectionList should use custom ScrollView */ - shouldUseCustomScrollView?: boolean; - /** Whether keyboard shortcuts should be disabled */ disableKeyboardShortcuts?: boolean; diff --git a/src/hooks/useAnimatedHighlightStyle/index.ts b/src/hooks/useAnimatedHighlightStyle/index.ts index e474a9455d4d..dd2df58fb1e2 100644 --- a/src/hooks/useAnimatedHighlightStyle/index.ts +++ b/src/hooks/useAnimatedHighlightStyle/index.ts @@ -66,7 +66,11 @@ export default function useAnimatedHighlightStyle({ return; } setStartHighlight(true); - }, [shouldHighlight, startHighlight]); + // We only need to add shouldHighlight as a dependency and adding startHighlight as deps will cause a loop because + // if shouldHighlight stays at true the above early return will not be executed and this useEffect will be run + // as long as shouldHighlight is true as we set startHighlight to false in the below useEffect. + // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps + }, [shouldHighlight]); React.useEffect(() => { if (!startHighlight || !didScreenTransitionEnd) { diff --git a/src/hooks/useStepFormSubmit.ts b/src/hooks/useStepFormSubmit.ts index 883fe980a338..1119497944f0 100644 --- a/src/hooks/useStepFormSubmit.ts +++ b/src/hooks/useStepFormSubmit.ts @@ -30,6 +30,8 @@ export default function useStepFormSubmit }, {} as Record, OnyxValues[T][Exclude]>); FormActions.setDraftValues(formId, stepValues); + onNext(stepValues); + return; } onNext(); diff --git a/src/hooks/useSubStep/index.ts b/src/hooks/useSubStep/index.ts index 43fc3061d968..c89bb5fd5735 100644 --- a/src/hooks/useSubStep/index.ts +++ b/src/hooks/useSubStep/index.ts @@ -22,24 +22,27 @@ export default function useSubStep({bodyContent, on setScreenIndex(prevScreenIndex); }, [screenIndex]); - const nextScreen = useCallback(() => { - if (isEditing.current) { - isEditing.current = false; + const nextScreen = useCallback( + (finishData?: unknown) => { + if (isEditing.current) { + isEditing.current = false; - setScreenIndex(bodyContent.length - 1); + setScreenIndex(bodyContent.length - 1); - return; - } + return; + } - const nextScreenIndex = screenIndex + 1; + const nextScreenIndex = screenIndex + 1; - if (nextScreenIndex === bodyContent.length) { - onFinished(); - } else { - onNextSubStep(); - setScreenIndex(nextScreenIndex); - } - }, [screenIndex, bodyContent.length, onFinished, onNextSubStep]); + if (nextScreenIndex === bodyContent.length) { + onFinished(finishData); + } else { + onNextSubStep(); + setScreenIndex(nextScreenIndex); + } + }, + [screenIndex, bodyContent.length, onFinished, onNextSubStep], + ); const moveTo = useCallback((step: number) => { isEditing.current = true; diff --git a/src/hooks/useSubStep/types.ts b/src/hooks/useSubStep/types.ts index f3b7939502a8..603534e68c15 100644 --- a/src/hooks/useSubStep/types.ts +++ b/src/hooks/useSubStep/types.ts @@ -5,7 +5,7 @@ type SubStepProps = { isEditing: boolean; /** continues to next sub step */ - onNext: () => void; + onNext: (data?: unknown) => void; /** moves user to passed sub step */ onMove: (step: number) => void; @@ -25,7 +25,7 @@ type UseSubStep = { onNextSubStep?: () => void; /** called on last sub step */ - onFinished: () => void; + onFinished: (data?: unknown) => void; /** index of initial sub step to display */ startFrom?: number; diff --git a/src/languages/en.ts b/src/languages/en.ts index f36db113a2aa..a7ddea880161 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -687,8 +687,10 @@ export default { singleFieldMultipleColumns: (fieldName: string) => `Oops! You've mapped a single field ("${fieldName}") to multiple columns. Please review and try again.`, importSuccessfullTitle: 'Import successful', importCategoriesSuccessfullDescription: (categories: number) => (categories > 1 ? `${categories} categories have been added.` : '1 category has been added.'), + importTagsSuccessfullDescription: (tags: number) => (tags > 1 ? `${tags} tags have been added.` : '1 tag has been added.'), importFailedTitle: 'Import failed', importFailedDescription: 'Please ensure all fields are filled out correctly and try again. If the problem persists, please reach out to Concierge.', + importDescription: 'Choose which fields to map from your spreadsheet by clicking the dropdown next to each imported column below.', sizeNotMet: 'File size must be greater than 0 bytes', invalidFileMessage: 'The file you uploaded is either empty or contains invalid data. Please ensure that the file is correctly formatted and contains the necessary information before uploading it again.', @@ -2968,7 +2970,6 @@ export default { glCode: 'GL code', updateGLCodeFailureMessage: 'An error occurred while updating the GL code, please try again.', importCategories: 'Import categories', - importedCategoriesMessage: 'Choose which fields to map from your spreadsheet by clicking the dropdown next to each imported column below.', }, moreFeatures: { subtitle: 'Use the toggles below to enable more features as you grow. Each feature will appear in the navigation menu for further customization.', @@ -3181,6 +3182,9 @@ export default { importedFromAccountingSoftware: 'The tags below are imported from your', glCode: 'GL code', updateGLCodeFailureMessage: 'An error occurred while updating the GL code, please try again.', + importTags: 'Import tags', + importedTagsMessage: (columnCounts: number) => + `We found *${columnCounts} columns* in your spreadsheet. Select *Name* next to the column that contains tags names. You can also select *Enabled* next to the column that sets tags status.`, }, taxes: { subtitle: 'Add tax names, rates, and set defaults.', @@ -3351,6 +3355,8 @@ export default { } } }, + errorODIntegration: "There's an error with a connection that's been set up in Expensify Classic. ", + goToODToFix: 'Go to Expensiy Classic to fix this issue.', setup: 'Connect', lastSync: (relativeDate: string) => `Last synced ${relativeDate}`, import: 'Import', @@ -3850,6 +3856,7 @@ export default { autoPayReportsUnderDescription: 'Fully compliant expense reports under this amount will be automatically paid. ', unlockFeatureGoToSubtitle: 'Go to', unlockFeatureEnableWorkflowsSubtitle: (featureName: string) => `and enable workflows, then add ${featureName} to unlock this feature.`, + enableFeatureSubtitle: (featureName: string) => `and enable ${featureName} to unlock this feature.`, }, categoryRules: { title: 'Category rules', diff --git a/src/languages/es.ts b/src/languages/es.ts index 8a18c6c002e0..a8481ec305fc 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -681,7 +681,9 @@ export default { importFailedTitle: 'Fallo en la importación', importFailedDescription: 'Por favor, asegúrate de que todos los campos estén llenos correctamente e inténtalo de nuevo. Si el problema persiste, por favor contacta a Concierge.', importCategoriesSuccessfullDescription: (categories: number) => (categories > 1 ? `Se han agregado ${categories} categorías.` : 'Se ha agregado 1 categoría.'), + importTagsSuccessfullDescription: (tags: number) => (tags > 1 ? `Se han agregado ${tags} etiquetas.` : 'Se ha agregado 1 etiqueta.'), importSuccessfullTitle: 'Importar categorías', + importDescription: 'Elige qué campos mapear desde tu hoja de cálculo haciendo clic en el menú desplegable junto a cada columna importada a continuación.', sizeNotMet: 'El archivo adjunto debe ser más grande que 0 bytes.', invalidFileMessage: 'El archivo que subiste está vacío o contiene datos no válidos. Asegúrate de que el archivo esté correctamente formateado y contenga la información necesaria antes de volver a subirlo.', @@ -3016,7 +3018,6 @@ export default { glCode: 'Código de Libro Mayor', updateGLCodeFailureMessage: 'Se produjo un error al actualizar el código de Libro Mayor. Inténtelo nuevamente.', importCategories: 'Importar categorías', - importedCategoriesMessage: 'Elige qué campos mapear desde tu hoja de cálculo haciendo clic en el menú desplegable junto a cada columna importada a continuación.', }, moreFeatures: { subtitle: 'Utiliza los botones de abajo para activar más funciones a medida que creces. Cada función aparecerá en el menú de navegación para una mayor personalización.', @@ -3230,6 +3231,9 @@ export default { importedFromAccountingSoftware: 'Etiquetas importadas desde', glCode: 'Código de Libro Mayor', updateGLCodeFailureMessage: 'Se produjo un error al actualizar el código de Libro Mayor. Por favor, inténtelo nuevamente.', + importTags: 'Importar categorías', + importedTagsMessage: (columnCounts: number) => + `Hemos encontrado *${columnCounts} columnas* en su hoja de cálculo. Seleccione *Nombre* junto a la columna que contiene los nombres de las etiquetas. También puede seleccionar *Habilitado* junto a la columna que establece el estado de la etiqueta.`, }, taxes: { subtitle: 'Añade nombres, tasas y establezca valores por defecto para los impuestos.', @@ -3333,6 +3337,8 @@ export default { } } }, + errorODIntegration: 'Hay un error con una conexión que se ha configurado en Expensify Classic. ', + goToODToFix: 'Ve a Expensify Classic para solucionar este problema.', setup: 'Configurar', lastSync: (relativeDate: string) => `Recién sincronizado ${relativeDate}`, import: 'Importar', @@ -3900,6 +3906,7 @@ export default { autoPayReportsUnderDescription: 'Los informes de gastos totalmente conformes por debajo de esta cantidad se pagarán automáticamente.', unlockFeatureGoToSubtitle: 'Ir a', unlockFeatureEnableWorkflowsSubtitle: (featureName: string) => `y habilita flujos de trabajo, luego agrega ${featureName} para desbloquear esta función.`, + enableFeatureSubtitle: (featureName: string) => `y habilita ${featureName} para desbloquear esta función.`, }, categoryRules: { title: 'Reglas de categoría', diff --git a/src/libs/API/parameters/ExportTagsSpreadsheet.ts b/src/libs/API/parameters/ExportTagsSpreadsheet.ts new file mode 100644 index 000000000000..fc4e78968511 --- /dev/null +++ b/src/libs/API/parameters/ExportTagsSpreadsheet.ts @@ -0,0 +1,6 @@ +type ExportTagsSpreadsheetParams = { + /** ID of the policy */ + policyID: string; +}; + +export default ExportTagsSpreadsheetParams; diff --git a/src/libs/API/parameters/ImportTagsSpreadsheet.ts b/src/libs/API/parameters/ImportTagsSpreadsheet.ts new file mode 100644 index 000000000000..9b35b6646496 --- /dev/null +++ b/src/libs/API/parameters/ImportTagsSpreadsheet.ts @@ -0,0 +1,12 @@ +type ImportTagsSpreadsheetParams = { + /** ID of the policy to which the tags will be imported */ + policyID: string; + + /** + * Stringified JSON object with type of following structure: + * Array<{name: string, enabled: boolean, 'GL Code': string}> + */ + tags: string; +}; + +export default ImportTagsSpreadsheetParams; diff --git a/src/libs/API/parameters/index.ts b/src/libs/API/parameters/index.ts index c780003c3e3f..97a5ddadf7c9 100644 --- a/src/libs/API/parameters/index.ts +++ b/src/libs/API/parameters/index.ts @@ -311,7 +311,9 @@ export type {default as SetPolicyCategoryReceiptsRequiredParams} from './SetPoli export type {default as RemovePolicyCategoryReceiptsRequiredParams} from './RemovePolicyCategoryReceiptsRequiredParams'; export type {default as UpdateQuickbooksOnlineAutoCreateVendorParams} from './UpdateQuickbooksOnlineAutoCreateVendorParams'; export type {default as ImportCategoriesSpreadsheetParams} from './ImportCategoriesSpreadsheet'; +export type {default as ImportTagsSpreadsheetParams} from './ImportTagsSpreadsheet'; export type {default as ExportCategoriesSpreadsheetParams} from './ExportCategoriesSpreadsheet'; +export type {default as ExportTagsSpreadsheetParams} from './ExportTagsSpreadsheet'; export type {default as UpdateXeroGenericTypeParams} from './UpdateXeroGenericTypeParams'; export type {default as UpdateCardSettlementFrequencyParams} from './UpdateCardSettlementFrequencyParams'; export type {default as UpdateCardSettlementAccountParams} from './UpdateCardSettlementAccountParams'; diff --git a/src/libs/API/types.ts b/src/libs/API/types.ts index 81b748ce6edb..5c6102da81d8 100644 --- a/src/libs/API/types.ts +++ b/src/libs/API/types.ts @@ -142,8 +142,10 @@ const WRITE_COMMANDS = { SET_WORKSPACE_CATEGORIES_ENABLED: 'SetWorkspaceCategoriesEnabled', SET_POLICY_TAGS_ENABLED: 'SetPolicyTagsEnabled', CREATE_WORKSPACE_CATEGORIES: 'CreateWorkspaceCategories', + IMPORT_TAGS_SREADSHEET: 'ImportTagsSpreadsheet', IMPORT_CATEGORIES_SPREADSHEET: 'ImportCategoriesSpreadsheet', EXPORT_CATEGORIES_CSV: 'ExportCategoriesCSV', + EXPORT_TAGS_CSV: 'ExportTagsCSV', RENAME_WORKSPACE_CATEGORY: 'RenameWorkspaceCategory', CREATE_POLICY_TAG: 'CreatePolicyTag', RENAME_POLICY_TAG: 'RenamePolicyTag', @@ -240,6 +242,10 @@ const WRITE_COMMANDS = { UPDATE_QUICKBOOKS_ONLINE_ENABLE_NEW_CATEGORIES: 'UpdateQuickbooksOnlineEnableNewCategories', UPDATE_QUICKBOOKS_ONLINE_AUTO_CREATE_VENDOR: 'UpdateQuickbooksOnlineAutoCreateVendor', UPDATE_QUICKBOOKS_ONLINE_REIMBURSABLE_EXPENSES_ACCOUNT: 'UpdateQuickbooksOnlineReimbursableExpensesAccount', + UPDATE_QUICKBOOKS_ONLINE_RECEIVABLE_ACCOUNT: 'UpdateQuickbooksOnlineReceivableAccount', + UPDATE_QUICKBOOKS_ONLINE_EXPORT_DATE: 'UpdateQuickbooksOnlineExportDate', + UPDATE_QUICKBOOKS_ONLINE_NON_REIMBURSABLE_EXPENSES_ACCOUNT: 'UpdateQuickbooksOnlineNonReimbursableExpensesAccount', + UPDATE_QUICKBOOKS_ONLINE_COLLECTION_ACCOUNT_ID: 'UpdateQuickbooksOnlineCollectionAccountID', UPDATE_QUICKBOOKS_ONLINE_SYNC_TAX: 'UpdateQuickbooksOnlineSyncTax', UPDATE_QUICKBOOKS_ONLINE_SYNC_LOCATIONS: 'UpdateQuickbooksOnlineSyncLocations', UPDATE_QUICKBOOKS_ONLINE_SYNC_CUSTOMERS: 'UpdateQuickbooksOnlineSyncCustomers', @@ -524,8 +530,10 @@ type WriteCommandParameters = { [WRITE_COMMANDS.CREATE_WORKSPACE_FROM_IOU_PAYMENT]: Parameters.CreateWorkspaceFromIOUPaymentParams; [WRITE_COMMANDS.SET_WORKSPACE_CATEGORIES_ENABLED]: Parameters.SetWorkspaceCategoriesEnabledParams; [WRITE_COMMANDS.CREATE_WORKSPACE_CATEGORIES]: Parameters.CreateWorkspaceCategoriesParams; + [WRITE_COMMANDS.IMPORT_TAGS_SREADSHEET]: Parameters.ImportTagsSpreadsheetParams; [WRITE_COMMANDS.IMPORT_CATEGORIES_SPREADSHEET]: Parameters.ImportCategoriesSpreadsheetParams; [WRITE_COMMANDS.EXPORT_CATEGORIES_CSV]: Parameters.ExportCategoriesSpreadsheetParams; + [WRITE_COMMANDS.EXPORT_TAGS_CSV]: Parameters.ExportTagsSpreadsheetParams; [WRITE_COMMANDS.RENAME_WORKSPACE_CATEGORY]: Parameters.RenameWorkspaceCategoriesParams; [WRITE_COMMANDS.SET_WORKSPACE_REQUIRES_CATEGORY]: Parameters.SetWorkspaceRequiresCategoryParams; [WRITE_COMMANDS.DELETE_WORKSPACE_CATEGORIES]: Parameters.DeleteWorkspaceCategoriesParams; @@ -659,6 +667,10 @@ type WriteCommandParameters = { [WRITE_COMMANDS.UPDATE_QUICKBOOKS_ONLINE_SYNC_CLASSES]: Parameters.UpdateQuickbooksOnlineGenericTypeParams; [WRITE_COMMANDS.UPDATE_QUICKBOOKS_ONLINE_NON_REIMBURSABLE_BILL_DEFAULT_VENDOR]: Parameters.UpdateQuickbooksOnlineGenericTypeParams; [WRITE_COMMANDS.UPDATE_QUICKBOOKS_ONLINE_REIMBURSABLE_EXPENSES_ACCOUNT]: Parameters.UpdateQuickbooksOnlineGenericTypeParams; + [WRITE_COMMANDS.UPDATE_QUICKBOOKS_ONLINE_RECEIVABLE_ACCOUNT]: Parameters.UpdateQuickbooksOnlineGenericTypeParams; + [WRITE_COMMANDS.UPDATE_QUICKBOOKS_ONLINE_EXPORT_DATE]: Parameters.UpdateQuickbooksOnlineGenericTypeParams; + [WRITE_COMMANDS.UPDATE_QUICKBOOKS_ONLINE_NON_REIMBURSABLE_EXPENSES_ACCOUNT]: Parameters.UpdateQuickbooksOnlineGenericTypeParams; + [WRITE_COMMANDS.UPDATE_QUICKBOOKS_ONLINE_COLLECTION_ACCOUNT_ID]: Parameters.UpdateQuickbooksOnlineGenericTypeParams; [WRITE_COMMANDS.UPDATE_POLICY_CONNECTION_CONFIG]: Parameters.UpdatePolicyConnectionConfigParams; [WRITE_COMMANDS.UPDATE_MANY_POLICY_CONNECTION_CONFIGS]: Parameters.UpdateManyPolicyConnectionConfigurationsParams; [WRITE_COMMANDS.REMOVE_POLICY_CONNECTION]: Parameters.RemovePolicyConnectionParams; diff --git a/src/libs/Firebase/firebaseWebConfig.ts b/src/libs/Firebase/firebaseWebConfig.ts new file mode 100644 index 000000000000..98437441ccc3 --- /dev/null +++ b/src/libs/Firebase/firebaseWebConfig.ts @@ -0,0 +1,12 @@ +import {initializeApp} from '@firebase/app'; +import {getPerformance, initializePerformance} from '@firebase/performance'; +import Config from '@src/CONFIG'; + +const firebaseConfig = Config.FIREBASE_WEB_CONFIG; +const firebaseApp = initializeApp(firebaseConfig); + +initializePerformance(firebaseApp, {dataCollectionEnabled: true}); + +const firebasePerfWeb = getPerformance(firebaseApp); + +export {firebaseApp, firebasePerfWeb}; diff --git a/src/libs/Firebase/index.web.ts b/src/libs/Firebase/index.web.ts new file mode 100644 index 000000000000..e63ea24b4a09 --- /dev/null +++ b/src/libs/Firebase/index.web.ts @@ -0,0 +1,76 @@ +import {trace} from '@firebase/performance'; +import * as Environment from '@libs/Environment/Environment'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; +import * as ReportConnection from '@libs/ReportConnection'; +import * as SessionUtils from '@libs/SessionUtils'; +import {firebasePerfWeb} from './firebaseWebConfig'; +import type {FirebaseAttributes, Log, StartTrace, StopTrace, TraceMap} from './types'; + +const traceMap: TraceMap = {}; + +const startTrace: StartTrace = (customEventName) => { + const start = global.performance.now(); + + if (Environment.isDevelopment()) { + return; + } + + if (traceMap[customEventName]) { + return; + } + + const perfTrace = trace(firebasePerfWeb, customEventName); + + const attributes = getAttributes(); + + Object.entries(attributes).forEach(([name, value]) => { + perfTrace.putAttribute(name, value); + }); + + traceMap[customEventName] = { + trace: perfTrace, + start, + }; + + perfTrace.start(); +}; + +const stopTrace: StopTrace = (customEventName) => { + if (Environment.isDevelopment()) { + return; + } + + const perfTrace = traceMap[customEventName]?.trace; + + if (!perfTrace) { + return; + } + + perfTrace.stop(); + + delete traceMap[customEventName]; +}; + +const log: Log = () => { + // crashlytics is not supported on WEB +}; + +function getAttributes(): FirebaseAttributes { + const session = SessionUtils.getSession(); + + const accountId = session?.accountID?.toString() ?? 'N/A'; + const reportsLength = ReportConnection.getAllReportsLength().toString(); + const personalDetailsLength = PersonalDetailsUtils.getPersonalDetailsLength().toString(); + + return { + accountId, + reportsLength, + personalDetailsLength, + }; +} + +export default { + startTrace, + stopTrace, + log, +}; diff --git a/src/libs/Firebase/types.ts b/src/libs/Firebase/types.ts index e262e3c73e81..bb212596b535 100644 --- a/src/libs/Firebase/types.ts +++ b/src/libs/Firebase/types.ts @@ -1,7 +1,8 @@ +import type {PerformanceTrace} from '@firebase/performance'; import type {FirebasePerformanceTypes} from '@react-native-firebase/perf'; type Trace = { - trace: FirebasePerformanceTypes.Trace; + trace: FirebasePerformanceTypes.Trace | PerformanceTrace; start: number; }; type TraceMap = Record; diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index 5e7d6428d5bb..b68b9441c38c 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -6,6 +6,7 @@ import type {ValueOf} from 'type-fest'; import ComposeProviders from '@components/ComposeProviders'; import OptionsListContextProvider from '@components/OptionListContextProvider'; import {SearchContextProvider} from '@components/Search/SearchContext'; +import SearchRouter from '@components/Search/SearchRouter/SearchRouter'; import useActiveWorkspace from '@hooks/useActiveWorkspace'; import usePermissions from '@hooks/usePermissions'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; @@ -559,6 +560,7 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie ); })} + ); diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx index b41b58530a6b..b4b676bbdec5 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx @@ -261,6 +261,8 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../../pages/workspace/distanceRates/PolicyDistanceRateTaxReclaimableEditPage').default, [SCREENS.WORKSPACE.DISTANCE_RATE_TAX_RATE_EDIT]: () => require('../../../../pages/workspace/distanceRates/PolicyDistanceRateTaxRateEditPage').default, + [SCREENS.WORKSPACE.TAGS_IMPORT]: () => require('../../../../pages/workspace/tags/ImportTagsPage').default, + [SCREENS.WORKSPACE.TAGS_IMPORTED]: () => require('../../../../pages/workspace/tags/ImportedTagsPage').default, [SCREENS.WORKSPACE.TAGS_SETTINGS]: () => require('../../../../pages/workspace/tags/WorkspaceTagsSettingsPage').default, [SCREENS.WORKSPACE.TAG_SETTINGS]: () => require('../../../../pages/workspace/tags/TagSettingsPage').default, [SCREENS.WORKSPACE.TAG_LIST_VIEW]: () => require('../../../../pages/workspace/tags/WorkspaceViewTagsPage').default, diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/TopBar.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/TopBar.tsx index f4728a80f2ca..985c16d50c22 100644 --- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/TopBar.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/TopBar.tsx @@ -5,6 +5,7 @@ import Breadcrumbs from '@components/Breadcrumbs'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import {PressableWithoutFeedback} from '@components/Pressable'; +import SearchButton from '@components/Search/SearchRouter/SearchButton'; import Text from '@components/Text'; import Tooltip from '@components/Tooltip'; import WorkspaceSwitcherButton from '@components/WorkspaceSwitcherButton'; @@ -73,6 +74,8 @@ function TopBar({breadcrumbLabel, activeWorkspaceID, shouldDisplaySearch = true, {translate('common.cancel')} )} + {/* This is only temporary for development and will be cleaned up in: https://github.com/Expensify/App/issues/49122 */} + {displaySearch && ( > = { SCREENS.WORKSPACE.TAG_EDIT, SCREENS.WORKSPACE.TAG_LIST_VIEW, SCREENS.WORKSPACE.TAG_GL_CODE, + SCREENS.WORKSPACE.TAGS_IMPORT, + SCREENS.WORKSPACE.TAGS_IMPORTED, ], [SCREENS.WORKSPACE.CATEGORIES]: [ SCREENS.WORKSPACE.CATEGORY_CREATE, diff --git a/src/libs/Navigation/linkingConfig/config.ts b/src/libs/Navigation/linkingConfig/config.ts index 2ca2db10a1a7..d2e6191349bd 100644 --- a/src/libs/Navigation/linkingConfig/config.ts +++ b/src/libs/Navigation/linkingConfig/config.ts @@ -699,6 +699,12 @@ const config: LinkingOptions['config'] = { orderWeight: Number, }, }, + [SCREENS.WORKSPACE.TAGS_IMPORT]: { + path: ROUTES.WORKSPACE_TAGS_IMPORT.route, + }, + [SCREENS.WORKSPACE.TAGS_IMPORTED]: { + path: ROUTES.WORKSPACE_TAGS_IMPORTED.route, + }, [SCREENS.WORKSPACE.TAG_CREATE]: { path: ROUTES.WORKSPACE_TAG_CREATE.route, }, diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index c6a4ce90c214..9f76814740d3 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -276,6 +276,12 @@ type SettingsNavigatorParamList = { [SCREENS.WORKSPACE.TAGS_SETTINGS]: { policyID: string; }; + [SCREENS.WORKSPACE.TAGS_IMPORT]: { + policyID: string; + }; + [SCREENS.WORKSPACE.TAGS_IMPORTED]: { + policyID: string; + }; [SCREENS.WORKSPACE.TAG_SETTINGS]: { policyID: string; orderWeight: number; diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index f191c1d06532..afedd308371c 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -595,9 +595,8 @@ function getLastMessageTextForReport(report: OnyxEntry, lastActorDetails // some types of actions are filtered out for lastReportAction, in some cases we need to check the actual last action const lastOriginalReportAction = lastReportActions[reportID] ?? null; let lastMessageTextFromReport = ''; - const reportNameValuePairs = ReportUtils.getReportNameValuePairs(report?.reportID); - if (ReportUtils.isArchivedRoom(report, reportNameValuePairs)) { + if (report?.private_isArchived) { const archiveReason = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing (ReportActionUtils.isClosedAction(lastOriginalReportAction) && ReportActionUtils.getOriginalMessage(lastOriginalReportAction)?.reason) || CONST.REPORT.ARCHIVE_REASON.DEFAULT; @@ -712,7 +711,6 @@ function createOption( isIOUReportOwner: null, iouReportAmount: 0, isChatRoom: false, - isArchivedRoom: false, shouldShowSubscript: false, isPolicyExpenseChat: false, isOwnPolicyExpenseChat: false, @@ -730,11 +728,11 @@ function createOption( let reportName; result.participantsList = personalDetailList; result.isOptimisticPersonalDetail = personalDetail?.isOptimisticPersonalDetail; - const reportNameValuePairs = ReportUtils.getReportNameValuePairs(report?.reportID); if (report) { result.isChatRoom = ReportUtils.isChatRoom(report); result.isDefaultRoom = ReportUtils.isDefaultRoom(report); - result.isArchivedRoom = ReportUtils.isArchivedRoom(report, reportNameValuePairs); + // eslint-disable-next-line @typescript-eslint/naming-convention + result.private_isArchived = report.private_isArchived; result.isExpenseReport = ReportUtils.isExpenseReport(report); result.isInvoiceRoom = ReportUtils.isInvoiceRoom(report); result.isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report); @@ -1588,7 +1586,7 @@ function orderOptions(options: ReportUtils.OptionData[], searchValue: string | u if (preferChatroomsOverThreads && option.isThread) { return 4; } - if (!!option.isChatRoom || option.isArchivedRoom) { + if (!!option.isChatRoom || option.private_isArchived) { return 3; } if (!option.login) { @@ -1833,7 +1831,7 @@ function getOptions( // - All archived reports should remain at the bottom const orderedReportOptions = lodashSortBy(filteredReportOptions, (option) => { const report = option.item; - if (option.isArchivedRoom) { + if (option.private_isArchived) { return CONST.DATE.UNIX_EPOCH; } @@ -1942,10 +1940,10 @@ function getOptions( } const isCurrentUserOwnedPolicyExpenseChatThatCouldShow = - reportOption.isPolicyExpenseChat && reportOption.ownerAccountID === currentUserAccountID && includeOwnedWorkspaceChats && !reportOption.isArchivedRoom; + reportOption.isPolicyExpenseChat && reportOption.ownerAccountID === currentUserAccountID && includeOwnedWorkspaceChats && !reportOption.private_isArchived; const shouldShowInvoiceRoom = - includeInvoiceRooms && ReportUtils.isInvoiceRoom(reportOption.item) && ReportUtils.isPolicyAdmin(reportOption.policyID ?? '', policies) && !reportOption.isArchivedRoom; + includeInvoiceRooms && ReportUtils.isInvoiceRoom(reportOption.item) && ReportUtils.isPolicyAdmin(reportOption.policyID ?? '', policies) && !reportOption.private_isArchived; // TODO: Uncomment the following line when the invoices screen is ready - https://github.com/Expensify/App/issues/45175. // && PolicyUtils.canSendInvoiceFromWorkspace(reportOption.policyID); @@ -2305,7 +2303,7 @@ function getHeaderMessageForNonUserList(hasSelectableOptions: boolean, searchVal * Helper method to check whether an option can show tooltip or not */ function shouldOptionShowTooltip(option: ReportUtils.OptionData): boolean { - return (!option.isChatRoom || !!option.isThread) && !option.isArchivedRoom; + return (!option.isChatRoom || !!option.isThread) && !option.private_isArchived; } /** diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts index 8c47100e465b..7f7e89ad3585 100644 --- a/src/libs/Permissions.ts +++ b/src/libs/Permissions.ts @@ -2,6 +2,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import CONST from '@src/CONST'; import type {IOUType} from '@src/CONST'; import type Beta from '@src/types/onyx/Beta'; +import * as Environment from './Environment/Environment'; function canUseAllBetas(betas: OnyxEntry): boolean { return !!betas?.includes(CONST.BETAS.ALL); @@ -49,6 +50,17 @@ function canUseCombinedTrackSubmit(betas: OnyxEntry): boolean { return !!betas?.includes(CONST.BETAS.COMBINED_TRACK_SUBMIT); } +/** + * New Search Router is under construction and for now should be displayed only in dev to allow developers to work on it. + * We are not using BETA for this feature, as betas are heavier to cleanup, + * and the development of new router is expected to take 2-3 weeks at most + * + * After everything is implemented this function can be removed, as we will always use SearchRouter in the App. + */ +function canUseNewSearchRouter() { + return Environment.isDevelopment(); +} + /** * Link previews are temporarily disabled. */ @@ -68,4 +80,5 @@ export default { canUseNewDotCopilot, canUseWorkspaceRules, canUseCombinedTrackSubmit, + canUseNewSearchRouter, }; diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index b98188567178..63db52ff303f 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -951,6 +951,10 @@ function hasIntegrationAutoSync(policy: Policy | undefined, connectedIntegration return (connectedIntegration && policy?.connections?.[connectedIntegration]?.config?.autoSync?.enabled) ?? false; } +function hasUnsupportedIntegration(policy: Policy | undefined, accountingIntegrations?: ConnectionName[]) { + return !(accountingIntegrations ?? Object.values(CONST.POLICY.CONNECTIONS.NAME)).some((integration) => !!policy?.connections?.[integration]); +} + function getCurrentConnectionName(policy: Policy | undefined): string | undefined { const accountingIntegrations = Object.values(CONST.POLICY.CONNECTIONS.NAME); const connectionKey = accountingIntegrations.find((integration) => !!policy?.connections?.[integration]); @@ -1104,6 +1108,7 @@ export { getAllTaxRatesNamesAndKeys as getAllTaxRates, getTagNamesFromTagsLists, getDomainNameForPolicy, + hasUnsupportedIntegration, getWorkflowApprovalsUnavailable, }; diff --git a/src/libs/Pusher/EventType.ts b/src/libs/Pusher/EventType.ts index 89e8a0ca0260..f1f0592aeac6 100644 --- a/src/libs/Pusher/EventType.ts +++ b/src/libs/Pusher/EventType.ts @@ -10,5 +10,6 @@ export default { MULTIPLE_EVENTS: 'multipleEvents', MULTIPLE_EVENT_TYPE: { ONYX_API_UPDATE: 'onyxApiUpdate', + RECONNECT_APP: 'reconnectApp', }, } as const; diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 1bb971272e47..f37f3f940516 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -289,6 +289,7 @@ type OptimisticChatReport = Pick< | 'description' | 'writeCapability' | 'avatarUrl' + | 'avatarFileName' | 'invoiceReceiver' | 'isHidden' > & { @@ -425,7 +426,6 @@ type OptionData = { keyForList?: string; searchText?: string; isIOUReportOwner?: boolean | null; - isArchivedRoom?: boolean | null; shouldShowSubscript?: boolean | null; isPolicyExpenseChat?: boolean | null; isMoneyRequestReport?: boolean | null; @@ -5078,6 +5078,7 @@ function buildOptimisticChatReport( parentReportID = '', description = '', avatarUrl = '', + avatarFileName = '', optimisticReportID = '', ): OptimisticChatReport { const isWorkspaceChatType = chatType && isWorkspaceChat(chatType); @@ -5118,6 +5119,7 @@ function buildOptimisticChatReport( description, writeCapability, avatarUrl, + avatarFileName, }; if (chatType === CONST.REPORT.CHAT_TYPE.INVOICE) { @@ -5135,6 +5137,7 @@ function buildOptimisticGroupChatReport( participantAccountIDs: number[], reportName: string, avatarUri: string, + avatarFilename: string, optimisticReportID?: string, notificationPreference?: NotificationPreference, ) { @@ -5153,6 +5156,7 @@ function buildOptimisticGroupChatReport( undefined, undefined, avatarUri, + avatarFilename, optimisticReportID, ); } @@ -5562,6 +5566,7 @@ function buildOptimisticWorkspaceChats(policyID: string, policyName: string, exp undefined, undefined, undefined, + undefined, expenseReportId, ); const expenseChatReportID = expenseChatData.reportID; @@ -7221,7 +7226,10 @@ function getNonHeldAndFullAmount(iouReport: OnyxEntry, policy: OnyxEntry if (hasUpdatedTotal(iouReport, policy) && hasPendingTransaction) { const unheldTotal = reportTransactions.reduce((currentVal, transaction) => currentVal + (!TransactionUtils.isOnHold(transaction) ? transaction.amount : 0), 0); - return [CurrencyUtils.convertToDisplayString(unheldTotal, iouReport?.currency), CurrencyUtils.convertToDisplayString((iouReport?.total ?? 0) * coefficient, iouReport?.currency)]; + return [ + CurrencyUtils.convertToDisplayString(unheldTotal * coefficient, iouReport?.currency), + CurrencyUtils.convertToDisplayString((iouReport?.total ?? 0) * coefficient, iouReport?.currency), + ]; } return [ diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index 0908892dc376..d056f111695e 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -284,7 +284,8 @@ function getOptionData({ hasParentAccess: undefined, isIOUReportOwner: null, isChatRoom: false, - isArchivedRoom: false, + // eslint-disable-next-line @typescript-eslint/naming-convention + private_isArchived: undefined, shouldShowSubscript: false, isPolicyExpenseChat: false, isMoneyRequestReport: false, @@ -307,8 +308,8 @@ function getOptionData({ result.isTaskReport = ReportUtils.isTaskReport(report); result.isInvoiceReport = ReportUtils.isInvoiceReport(report); result.parentReportAction = parentReportAction; - const reportNameValuePairs = ReportUtils.getReportNameValuePairs(report?.reportID); - result.isArchivedRoom = ReportUtils.isArchivedRoom(report, reportNameValuePairs); + // eslint-disable-next-line @typescript-eslint/naming-convention + result.private_isArchived = report?.private_isArchived; result.isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(report); result.isExpenseRequest = ReportUtils.isExpenseRequest(report); result.isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report); @@ -399,8 +400,7 @@ function getOptionData({ const isThreadMessage = ReportUtils.isThread(report) && lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT && lastAction?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE; - - if ((result.isChatRoom || result.isPolicyExpenseChat || result.isThread || result.isTaskReport || isThreadMessage) && !result.isArchivedRoom) { + if ((result.isChatRoom || result.isPolicyExpenseChat || result.isThread || result.isTaskReport || isThreadMessage) && !result.private_isArchived) { const lastActionName = lastAction?.actionName ?? report.lastActionType; if (ReportActionsUtils.isRenamedAction(lastAction)) { @@ -577,8 +577,7 @@ function getRoomWelcomeMessage(report: OnyxEntry): WelcomeMessage { return welcomeMessage; } - const reportNameValuePairs = ReportUtils.getReportNameValuePairs(report?.reportID); - if (ReportUtils.isArchivedRoom(report, reportNameValuePairs)) { + if (report?.private_isArchived) { welcomeMessage.phrase1 = Localize.translateLocal('reportActionsView.beginningOfArchivedRoomPartOne'); welcomeMessage.phrase2 = Localize.translateLocal('reportActionsView.beginningOfArchivedRoomPartTwo'); } else if (ReportUtils.isDomainRoom(report)) { diff --git a/src/libs/actions/Link.ts b/src/libs/actions/Link.ts index 50a4582dffc1..886f8b06fc6f 100644 --- a/src/libs/actions/Link.ts +++ b/src/libs/actions/Link.ts @@ -39,8 +39,15 @@ Onyx.connect({ }); function buildOldDotURL(url: string, shortLivedAuthToken?: string): Promise { - const hasHashParams = url.indexOf('#') !== -1; + const hashIndex = url.lastIndexOf('#'); + const hasHashParams = hashIndex !== -1; const hasURLParams = url.indexOf('?') !== -1; + let originURL = url; + let hashParams = ''; + if (hasHashParams) { + originURL = url.substring(0, hashIndex); + hashParams = url.substring(hashIndex); + } const authTokenParam = shortLivedAuthToken ? `authToken=${shortLivedAuthToken}` : ''; const emailParam = `email=${encodeURIComponent(currentUserEmail)}`; @@ -51,7 +58,7 @@ function buildOldDotURL(url: string, shortLivedAuthToken?: string): Promise { formData.append(key, String(value)); }); - fileDownload(ApiUtils.getCommandURL({command: WRITE_COMMANDS.EXPORT_CATEGORIES_CSV}), 'Categories.csv', '', false, formData, CONST.NETWORK.METHOD.POST); + fileDownload(ApiUtils.getCommandURL({command: WRITE_COMMANDS.EXPORT_CATEGORIES_CSV}), fileName, '', false, formData, CONST.NETWORK.METHOD.POST); } function setWorkspaceCategoryDescriptionHint(policyID: string, categoryName: string, commentHint: string) { diff --git a/src/libs/actions/Policy/Tag.ts b/src/libs/actions/Policy/Tag.ts index 49a285c12bbe..6455e7fad947 100644 --- a/src/libs/actions/Policy/Tag.ts +++ b/src/libs/actions/Policy/Tag.ts @@ -11,9 +11,13 @@ import type { UpdatePolicyTagGLCodeParams, } from '@libs/API/parameters'; import {READ_COMMANDS, WRITE_COMMANDS} from '@libs/API/types'; +import * as ApiUtils from '@libs/ApiUtils'; import * as ErrorUtils from '@libs/ErrorUtils'; +import fileDownload from '@libs/fileDownload'; import getIsNarrowLayout from '@libs/getIsNarrowLayout'; +import {translateLocal} from '@libs/Localize'; import Log from '@libs/Log'; +import enhanceParameters from '@libs/Network/enhanceParameters'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; import {navigateWhenEnableFeature} from '@libs/PolicyUtils'; @@ -122,6 +126,34 @@ function buildOptimisticPolicyRecentlyUsedTags(policyID?: string, transactionTag return newOptimisticPolicyRecentlyUsedTags; } +function updateImportSpreadsheetData(tagsLength: number): OnyxData { + const onyxData: OnyxData = { + successData: [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.IMPORTED_SPREADSHEET, + value: { + shouldFinalModalBeOpened: true, + importFinalModal: {title: translateLocal('spreadsheet.importSuccessfullTitle'), prompt: translateLocal('spreadsheet.importTagsSuccessfullDescription', tagsLength)}, + }, + }, + ], + + failureData: [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.IMPORTED_SPREADSHEET, + value: { + shouldFinalModalBeOpened: true, + importFinalModal: {title: translateLocal('spreadsheet.importFailedTitle'), prompt: translateLocal('spreadsheet.importFailedDescription')}, + }, + }, + ], + }; + + return onyxData; +} + function createPolicyTag(policyID: string, tagName: string) { const policyTag = PolicyUtils.getTagLists(allPolicyTags?.[`${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`] ?? {})?.[0] ?? {}; const newTagName = PolicyUtils.escapeTagName(tagName); @@ -187,6 +219,18 @@ function createPolicyTag(policyID: string, tagName: string) { API.write(WRITE_COMMANDS.CREATE_POLICY_TAG, parameters, onyxData); } +function importPolicyTags(policyID: string, tags: PolicyTag[]) { + const onyxData = updateImportSpreadsheetData(tags.length); + + const parameters = { + policyID, + // eslint-disable-next-line @typescript-eslint/naming-convention + tags: JSON.stringify(tags.map((tag) => ({name: tag.name, enabled: tag.enabled, 'GL Code': tag['GL Code']}))), + }; + + API.write(WRITE_COMMANDS.IMPORT_TAGS_SREADSHEET, parameters, onyxData); +} + function setWorkspaceTagEnabled(policyID: string, tagsToUpdate: Record, tagListIndex: number) { const policyTag = PolicyUtils.getTagLists(allPolicyTags?.[`${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`] ?? {})?.[tagListIndex] ?? {}; @@ -846,6 +890,20 @@ function setPolicyTagGLCode(policyID: string, tagName: string, tagListIndex: num API.write(WRITE_COMMANDS.UPDATE_POLICY_TAG_GL_CODE, parameters, onyxData); } +function downloadTagsCSV(policyID: string) { + const finalParameters = enhanceParameters(WRITE_COMMANDS.EXPORT_TAGS_CSV, { + policyID, + }); + const fileName = 'Tags.csv'; + + const formData = new FormData(); + Object.entries(finalParameters).forEach(([key, value]) => { + formData.append(key, String(value)); + }); + + fileDownload(ApiUtils.getCommandURL({command: WRITE_COMMANDS.EXPORT_TAGS_CSV}), fileName, '', false, formData, CONST.NETWORK.METHOD.POST); +} + export { buildOptimisticPolicyRecentlyUsedTags, setPolicyRequiresTag, @@ -861,6 +919,8 @@ export { renamePolicyTaglist, setWorkspaceTagEnabled, setPolicyTagGLCode, + importPolicyTags, + downloadTagsCSV, }; export type {NewCustomUnit}; diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 40a7059b54b9..caaf6840e56d 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -697,7 +697,8 @@ function updateGroupChatAvatar(reportID: string, file?: File | CustomRNImageMani onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, value: { - avatarUrl: file?.uri ?? '', + avatarUrl: file ? file?.uri ?? '' : null, + avatarFileName: file ? file?.name ?? '' : null, pendingFields: { avatar: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, }, @@ -708,12 +709,14 @@ function updateGroupChatAvatar(reportID: string, file?: File | CustomRNImageMani }, ]; + const fetchedReport = ReportConnection.getAllReports()?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]; const failureData: OnyxUpdate[] = [ { onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, value: { - avatarUrl: ReportConnection.getAllReports()?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]?.avatarUrl ?? null, + avatarUrl: fetchedReport?.avatarUrl ?? null, + avatarFileName: fetchedReport?.avatarFileName ?? null, pendingFields: { avatar: null, }, @@ -1011,7 +1014,14 @@ function navigateToAndOpenReport( if (isEmptyObject(chat)) { if (isGroupChat) { // If we are creating a group chat then participantAccountIDs is expected to contain currentUserAccountID - newChat = ReportUtils.buildOptimisticGroupChatReport(participantAccountIDs, reportName ?? '', avatarUri ?? '', optimisticReportID, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS); + newChat = ReportUtils.buildOptimisticGroupChatReport( + participantAccountIDs, + reportName ?? '', + avatarUri ?? '', + avatarFile?.name ?? '', + optimisticReportID, + CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, + ); } else { newChat = ReportUtils.buildOptimisticChatReport( [...participantAccountIDs, currentUserAccountID], diff --git a/src/libs/actions/User.ts b/src/libs/actions/User.ts index bf8536b9a461..4f85bbdcd139 100644 --- a/src/libs/actions/User.ts +++ b/src/libs/actions/User.ts @@ -43,6 +43,7 @@ import type OnyxPersonalDetails from '@src/types/onyx/PersonalDetails'; import type {Status} from '@src/types/onyx/PersonalDetails'; import type ReportAction from '@src/types/onyx/ReportAction'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; +import * as App from './App'; import applyOnyxUpdatesReliably from './applyOnyxUpdatesReliably'; import * as Link from './Link'; import * as Report from './Report'; @@ -909,6 +910,13 @@ function subscribeToUserEvents() { return onyxUpdatePromise; }); }); + + // We have an event to reconnect the App. It is triggered when we detect that the user passed updateID + // is not in the DB + PusherUtils.subscribeToMultiEvent(Pusher.TYPE.MULTIPLE_EVENT_TYPE.RECONNECT_APP, () => { + App.reconnectApp(); + return Promise.resolve(); + }); } /** diff --git a/src/libs/actions/connections/QuickbooksOnline.ts b/src/libs/actions/connections/QuickbooksOnline.ts index 94a0bafec547..a32363289268 100644 --- a/src/libs/actions/connections/QuickbooksOnline.ts +++ b/src/libs/actions/connections/QuickbooksOnline.ts @@ -9,7 +9,7 @@ import {getCommandURL} from '@libs/ApiUtils'; import * as ErrorUtils from '@libs/ErrorUtils'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -import type {Connections} from '@src/types/onyx/Policy'; +import type {Connections, QBOConnectionConfig} from '@src/types/onyx/Policy'; function getQuickbooksOnlineSetupLink(policyID: string) { const params: ConnectPolicyToAccountingIntegrationParams = {policyID}; @@ -266,6 +266,67 @@ function updateQuickbooksOnlineNonReimbursableBillDefaultVendor( + policyID: string, + settingValue: TSettingValue, + oldSettingValue?: TSettingValue, +) { + const {optimisticData, failureData, successData} = buildOnyxDataForQuickbooksConfiguration(policyID, CONST.QUICKBOOKS_CONFIG.RECEIVABLE_ACCOUNT, settingValue, oldSettingValue); + + const parameters: UpdateQuickbooksOnlineGenericTypeParams = { + policyID, + settingValue: JSON.stringify(settingValue), + idempotencyKey: String(CONST.QUICKBOOKS_CONFIG.RECEIVABLE_ACCOUNT), + }; + API.write(WRITE_COMMANDS.UPDATE_QUICKBOOKS_ONLINE_RECEIVABLE_ACCOUNT, parameters, {optimisticData, failureData, successData}); +} + +function updateQuickbooksOnlineExportDate(policyID: string, settingValue: TSettingValue, oldSettingValue?: TSettingValue) { + const {optimisticData, failureData, successData} = buildOnyxDataForQuickbooksConfiguration(policyID, CONST.QUICKBOOKS_CONFIG.EXPORT_DATE, settingValue, oldSettingValue); + + const parameters: UpdateQuickbooksOnlineGenericTypeParams = { + policyID, + settingValue: JSON.stringify(settingValue), + idempotencyKey: String(CONST.QUICKBOOKS_CONFIG.EXPORT_DATE), + }; + API.write(WRITE_COMMANDS.UPDATE_QUICKBOOKS_ONLINE_EXPORT_DATE, parameters, {optimisticData, failureData, successData}); +} + +function updateQuickbooksOnlineNonReimbursableExpensesAccount( + policyID: string, + settingValue: TSettingValue, + oldSettingValue?: TSettingValue, +) { + const {optimisticData, failureData, successData} = buildOnyxDataForQuickbooksConfiguration( + policyID, + CONST.QUICKBOOKS_CONFIG.NON_REIMBURSABLE_EXPENSES_ACCOUNT, + settingValue, + oldSettingValue, + ); + + const parameters: UpdateQuickbooksOnlineGenericTypeParams = { + policyID, + settingValue: JSON.stringify(settingValue), + idempotencyKey: String(CONST.QUICKBOOKS_CONFIG.NON_REIMBURSABLE_EXPENSES_ACCOUNT), + }; + API.write(WRITE_COMMANDS.UPDATE_QUICKBOOKS_ONLINE_NON_REIMBURSABLE_EXPENSES_ACCOUNT, parameters, {optimisticData, failureData, successData}); +} + +function updateQuickbooksOnlineCollectionAccountID( + policyID: string, + settingValue: TSettingValue, + oldSettingValue?: TSettingValue, +) { + const {optimisticData, failureData, successData} = buildOnyxDataForQuickbooksConfiguration(policyID, CONST.QUICKBOOKS_CONFIG.COLLECTION_ACCOUNT_ID, settingValue, oldSettingValue); + + const parameters: UpdateQuickbooksOnlineGenericTypeParams = { + policyID, + settingValue: JSON.stringify(settingValue), + idempotencyKey: String(CONST.QUICKBOOKS_CONFIG.COLLECTION_ACCOUNT_ID), + }; + API.write(WRITE_COMMANDS.UPDATE_QUICKBOOKS_ONLINE_COLLECTION_ACCOUNT_ID, parameters, {optimisticData, failureData, successData}); +} + function updateQuickbooksOnlineSyncTax(policyID: string, settingValue: TSettingValue) { const onyxData = buildOnyxDataForQuickbooksConfiguration(policyID, CONST.QUICKBOOKS_CONFIG.SYNC_TAX, settingValue, !settingValue); @@ -282,6 +343,10 @@ export { updateQuickbooksOnlineEnableNewCategories, updateQuickbooksOnlineAutoCreateVendor, updateQuickbooksOnlineReimbursableExpensesAccount, + updateQuickbooksOnlineReceivableAccount, + updateQuickbooksOnlineExportDate, + updateQuickbooksOnlineNonReimbursableExpensesAccount, + updateQuickbooksOnlineCollectionAccountID, updateQuickbooksOnlineNonReimbursableBillDefaultVendor, updateQuickbooksOnlineSyncTax, updateQuickbooksOnlineSyncClasses, diff --git a/src/pages/EditReportFieldPage.tsx b/src/pages/EditReportFieldPage.tsx index 7361a5eeea16..5690d3202136 100644 --- a/src/pages/EditReportFieldPage.tsx +++ b/src/pages/EditReportFieldPage.tsx @@ -52,13 +52,14 @@ function EditReportFieldPage({route, policy, report}: EditReportFieldPageProps) const styles = useThemeStyles(); const fieldKey = ReportUtils.getReportFieldKey(route.params.fieldID); const reportField = report?.fieldList?.[fieldKey] ?? policy?.fieldList?.[fieldKey]; + const policyField = policy?.fieldList?.[fieldKey] ?? reportField; const isDisabled = ReportUtils.isReportFieldDisabled(report, reportField, policy); const [isDeleteModalVisible, setIsDeleteModalVisible] = useState(false); const {translate} = useLocalize(); const isReportFieldTitle = ReportUtils.isReportFieldOfTypeTitle(reportField); const reportFieldsEnabled = (ReportUtils.isPaidGroupPolicyExpenseReport(report) && !!policy?.areReportFieldsEnabled) || isReportFieldTitle; - if (!reportFieldsEnabled || !reportField || !report || isDisabled) { + if (!reportFieldsEnabled || !reportField || !policyField || !report || isDisabled) { return ( !reportField.disabledOptions[index])} + fieldOptions={policyField.values.filter((_value: string, index: number) => !policyField.disabledOptions[index])} onSubmit={handleReportFieldChange} /> )} diff --git a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx index 49052208bfdc..75559aa54803 100644 --- a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx +++ b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx @@ -5,7 +5,6 @@ import FormProvider from '@components/Form/FormProvider'; import InputWrapper from '@components/Form/InputWrapper'; import type {FormOnyxValues} from '@components/Form/types'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; -import OfflineIndicator from '@components/OfflineIndicator'; import ScreenWrapper from '@components/ScreenWrapper'; import Text from '@components/Text'; import TextInput from '@components/TextInput'; @@ -113,67 +112,63 @@ function BaseOnboardingPersonalDetails({ return errors; }; - const PersonalDetailsFooterInstance = ; - return ( - - - - - {translate('onboarding.whatsYourName')} - - - - - - - - - + + + + {translate('onboarding.whatsYourName')} + + + + + + + + ); } diff --git a/src/pages/OnboardingWork/BaseOnboardingWork.tsx b/src/pages/OnboardingWork/BaseOnboardingWork.tsx index f803b4e34a65..1e8406b62c44 100644 --- a/src/pages/OnboardingWork/BaseOnboardingWork.tsx +++ b/src/pages/OnboardingWork/BaseOnboardingWork.tsx @@ -5,7 +5,6 @@ import FormProvider from '@components/Form/FormProvider'; import InputWrapper from '@components/Form/InputWrapper'; import type {FormInputErrors, FormOnyxValues} from '@components/Form/types'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; -import OfflineIndicator from '@components/OfflineIndicator'; import ScreenWrapper from '@components/ScreenWrapper'; import Text from '@components/Text'; import TextInput from '@components/TextInput'; @@ -28,7 +27,6 @@ import type {BaseOnboardingWorkOnyxProps, BaseOnboardingWorkProps} from './types function BaseOnboardingWork({shouldUseNativeStyles, onboardingPurposeSelected, onboardingPolicyID, route}: BaseOnboardingWorkProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); - const {shouldUseNarrowLayout} = useResponsiveLayout(); const {onboardingIsMediumOrLargerScreenWidth} = useResponsiveLayout(); const {inputCallbackRef} = useAutoFocusInput(); @@ -66,53 +64,49 @@ function BaseOnboardingWork({shouldUseNativeStyles, onboardingPurposeSelected, o return errors; }; - const WorkFooterInstance = ; - return ( - - - - - {translate('onboarding.whereYouWork')} - - - - - - + + + + {translate('onboarding.whereYouWork')} + + + + + ); } diff --git a/src/pages/ReimbursementAccount/BankInfo/BankInfo.tsx b/src/pages/ReimbursementAccount/BankInfo/BankInfo.tsx index 3e45b14253f3..888ad24ba2be 100644 --- a/src/pages/ReimbursementAccount/BankInfo/BankInfo.tsx +++ b/src/pages/ReimbursementAccount/BankInfo/BankInfo.tsx @@ -1,7 +1,6 @@ import React, {useCallback, useEffect, useMemo} from 'react'; import {View} from 'react-native'; -import type {OnyxEntry} from 'react-native-onyx'; -import {withOnyx} from 'react-native-onyx'; +import {useOnyx} from 'react-native-onyx'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import InteractiveStepSubHeader from '@components/InteractiveStepSubHeader'; import ScreenWrapper from '@components/ScreenWrapper'; @@ -17,23 +16,10 @@ import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type {ReimbursementAccountForm} from '@src/types/form'; import INPUT_IDS from '@src/types/form/ReimbursementAccountForm'; -import type {ReimbursementAccount} from '@src/types/onyx'; -import Confirmation from './substeps/Confirmation'; import Manual from './substeps/Manual'; import Plaid from './substeps/Plaid'; -type BankInfoOnyxProps = { - /** Plaid SDK token to use to initialize the widget */ - plaidLinkToken: OnyxEntry; - - /** Reimbursement account from ONYX */ - reimbursementAccount: OnyxEntry; - - /** The draft values of the bank account being setup */ - reimbursementAccountDraft: OnyxEntry; -}; - -type BankInfoProps = BankInfoOnyxProps & { +type BankInfoProps = { /** Goes to the previous step */ onBackButtonPress: () => void; @@ -42,11 +28,14 @@ type BankInfoProps = BankInfoOnyxProps & { }; const BANK_INFO_STEP_KEYS = INPUT_IDS.BANK_INFO_STEP; -const manualSubsteps: Array> = [Manual, Confirmation]; -const plaidSubsteps: Array> = [Plaid, Confirmation]; +const manualSubsteps: Array> = [Manual]; +const plaidSubsteps: Array> = [Plaid]; const receivedRedirectURI = getPlaidOAuthReceivedRedirectURI(); -function BankInfo({reimbursementAccount, reimbursementAccountDraft, plaidLinkToken, onBackButtonPress, policyID}: BankInfoProps) { +function BankInfo({onBackButtonPress, policyID}: BankInfoProps) { + const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT); + const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT); + const [plaidLinkToken] = useOnyx(ONYXKEYS.PLAID_LINK_TOKEN); const {translate} = useLocalize(); const styles = useThemeStyles(); @@ -61,37 +50,41 @@ function BankInfo({reimbursementAccount, reimbursementAccountDraft, plaidLinkTok } const bankAccountID = Number(reimbursementAccount?.achData?.bankAccountID ?? '-1'); - const submit = useCallback(() => { - if (setupType === CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL) { - BankAccounts.connectBankAccountManually( - bankAccountID, - { - [BANK_INFO_STEP_KEYS.ROUTING_NUMBER]: values[BANK_INFO_STEP_KEYS.ROUTING_NUMBER] ?? '', - [BANK_INFO_STEP_KEYS.ACCOUNT_NUMBER]: values[BANK_INFO_STEP_KEYS.ACCOUNT_NUMBER] ?? '', - [BANK_INFO_STEP_KEYS.BANK_NAME]: values[BANK_INFO_STEP_KEYS.BANK_NAME] ?? '', - [BANK_INFO_STEP_KEYS.PLAID_ACCOUNT_ID]: values[BANK_INFO_STEP_KEYS.PLAID_ACCOUNT_ID] ?? '', - [BANK_INFO_STEP_KEYS.PLAID_ACCESS_TOKEN]: values[BANK_INFO_STEP_KEYS.PLAID_ACCESS_TOKEN] ?? '', - [BANK_INFO_STEP_KEYS.PLAID_MASK]: values[BANK_INFO_STEP_KEYS.PLAID_MASK] ?? '', - [BANK_INFO_STEP_KEYS.IS_SAVINGS]: values[BANK_INFO_STEP_KEYS.IS_SAVINGS] ?? false, - }, - policyID, - ); - } else if (setupType === CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID) { - BankAccounts.connectBankAccountWithPlaid( - bankAccountID, - { - [BANK_INFO_STEP_KEYS.ROUTING_NUMBER]: values[BANK_INFO_STEP_KEYS.ROUTING_NUMBER] ?? '', - [BANK_INFO_STEP_KEYS.ACCOUNT_NUMBER]: values[BANK_INFO_STEP_KEYS.ACCOUNT_NUMBER] ?? '', - [BANK_INFO_STEP_KEYS.BANK_NAME]: values[BANK_INFO_STEP_KEYS.BANK_NAME] ?? '', - [BANK_INFO_STEP_KEYS.PLAID_ACCOUNT_ID]: values[BANK_INFO_STEP_KEYS.PLAID_ACCOUNT_ID] ?? '', - [BANK_INFO_STEP_KEYS.PLAID_ACCESS_TOKEN]: values[BANK_INFO_STEP_KEYS.PLAID_ACCESS_TOKEN] ?? '', - [BANK_INFO_STEP_KEYS.PLAID_MASK]: values[BANK_INFO_STEP_KEYS.PLAID_MASK] ?? '', - [BANK_INFO_STEP_KEYS.IS_SAVINGS]: values[BANK_INFO_STEP_KEYS.IS_SAVINGS] ?? false, - }, - policyID, - ); - } - }, [setupType, values, bankAccountID, policyID]); + const submit = useCallback( + (submitData: unknown) => { + const data = submitData as ReimbursementAccountForm; + if (setupType === CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL) { + BankAccounts.connectBankAccountManually( + bankAccountID, + { + [BANK_INFO_STEP_KEYS.ROUTING_NUMBER]: data[BANK_INFO_STEP_KEYS.ROUTING_NUMBER] ?? '', + [BANK_INFO_STEP_KEYS.ACCOUNT_NUMBER]: data[BANK_INFO_STEP_KEYS.ACCOUNT_NUMBER] ?? '', + [BANK_INFO_STEP_KEYS.BANK_NAME]: data[BANK_INFO_STEP_KEYS.BANK_NAME] ?? '', + [BANK_INFO_STEP_KEYS.PLAID_ACCOUNT_ID]: data[BANK_INFO_STEP_KEYS.PLAID_ACCOUNT_ID] ?? '', + [BANK_INFO_STEP_KEYS.PLAID_ACCESS_TOKEN]: data[BANK_INFO_STEP_KEYS.PLAID_ACCESS_TOKEN] ?? '', + [BANK_INFO_STEP_KEYS.PLAID_MASK]: data[BANK_INFO_STEP_KEYS.PLAID_MASK] ?? '', + [BANK_INFO_STEP_KEYS.IS_SAVINGS]: data[BANK_INFO_STEP_KEYS.IS_SAVINGS] ?? false, + }, + policyID, + ); + } else if (setupType === CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID) { + BankAccounts.connectBankAccountWithPlaid( + bankAccountID, + { + [BANK_INFO_STEP_KEYS.ROUTING_NUMBER]: data[BANK_INFO_STEP_KEYS.ROUTING_NUMBER] ?? '', + [BANK_INFO_STEP_KEYS.ACCOUNT_NUMBER]: data[BANK_INFO_STEP_KEYS.ACCOUNT_NUMBER] ?? '', + [BANK_INFO_STEP_KEYS.BANK_NAME]: data[BANK_INFO_STEP_KEYS.BANK_NAME] ?? '', + [BANK_INFO_STEP_KEYS.PLAID_ACCOUNT_ID]: data[BANK_INFO_STEP_KEYS.PLAID_ACCOUNT_ID] ?? '', + [BANK_INFO_STEP_KEYS.PLAID_ACCESS_TOKEN]: data[BANK_INFO_STEP_KEYS.PLAID_ACCESS_TOKEN] ?? '', + [BANK_INFO_STEP_KEYS.PLAID_MASK]: data[BANK_INFO_STEP_KEYS.PLAID_MASK] ?? '', + [BANK_INFO_STEP_KEYS.IS_SAVINGS]: data[BANK_INFO_STEP_KEYS.IS_SAVINGS] ?? false, + }, + policyID, + ); + } + }, + [setupType, bankAccountID, policyID], + ); const bodyContent = setupType === CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID ? plaidSubsteps : manualSubsteps; const {componentToRender: SubStep, isEditing, screenIndex, nextScreen, prevScreen, moveTo} = useSubStep({bodyContent, startFrom: 0, onFinished: submit}); @@ -103,12 +96,10 @@ function BankInfo({reimbursementAccount, reimbursementAccountDraft, plaidLinkTok if (redirectedFromPlaidToManual) { return; } - if (setupType === CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL && values.bankName !== '' && !redirectedFromPlaidToManual) { setRedirectedFromPlaidToManual(true); - moveTo(0); } - }, [moveTo, redirectedFromPlaidToManual, setupType, values]); + }, [redirectedFromPlaidToManual, setupType, values]); const handleBackButtonPress = () => { if (screenIndex === 0) { @@ -161,15 +152,4 @@ function BankInfo({reimbursementAccount, reimbursementAccountDraft, plaidLinkTok BankInfo.displayName = 'BankInfo'; -export default withOnyx({ - // @ts-expect-error: ONYXKEYS.REIMBURSEMENT_ACCOUNT is conflicting with ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM - reimbursementAccount: { - key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, - }, - reimbursementAccountDraft: { - key: ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT, - }, - plaidLinkToken: { - key: ONYXKEYS.PLAID_LINK_TOKEN, - }, -})(BankInfo); +export default BankInfo; diff --git a/src/pages/ReimbursementAccount/BankInfo/substeps/Confirmation.tsx b/src/pages/ReimbursementAccount/BankInfo/substeps/Confirmation.tsx deleted file mode 100644 index fb72054303ae..000000000000 --- a/src/pages/ReimbursementAccount/BankInfo/substeps/Confirmation.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import React, {useMemo} from 'react'; -import {View} from 'react-native'; -import type {OnyxEntry} from 'react-native-onyx'; -import {withOnyx} from 'react-native-onyx'; -import Button from '@components/Button'; -import DotIndicatorMessage from '@components/DotIndicatorMessage'; -import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; -import SafeAreaConsumer from '@components/SafeAreaConsumer'; -import ScrollView from '@components/ScrollView'; -import Text from '@components/Text'; -import useLocalize from '@hooks/useLocalize'; -import useNetwork from '@hooks/useNetwork'; -import type {SubStepProps} from '@hooks/useSubStep/types'; -import useThemeStyles from '@hooks/useThemeStyles'; -import * as ErrorUtils from '@libs/ErrorUtils'; -import getSubstepValues from '@pages/ReimbursementAccount/utils/getSubstepValues'; -import CONST from '@src/CONST'; -import ONYXKEYS from '@src/ONYXKEYS'; -import type {ReimbursementAccountForm} from '@src/types/form'; -import INPUT_IDS from '@src/types/form/ReimbursementAccountForm'; -import type {ReimbursementAccount} from '@src/types/onyx'; - -type ConfirmationOnyxProps = { - /** Reimbursement account from ONYX */ - reimbursementAccount: OnyxEntry; - - /** The draft values of the bank account being setup */ - reimbursementAccountDraft: OnyxEntry; -}; - -type ConfirmationProps = ConfirmationOnyxProps & SubStepProps; - -const BANK_INFO_STEP_KEYS = INPUT_IDS.BANK_INFO_STEP; -const BANK_INFO_STEP_INDEXES = CONST.REIMBURSEMENT_ACCOUNT.SUBSTEP_INDEX.BANK_ACCOUNT; - -function Confirmation({reimbursementAccount, reimbursementAccountDraft, onNext, onMove}: ConfirmationProps) { - const {translate} = useLocalize(); - const styles = useThemeStyles(); - const {isOffline} = useNetwork(); - - const isLoading = reimbursementAccount?.isLoading ?? false; - const setupType = reimbursementAccount?.achData?.subStep ?? ''; - const bankAccountID = Number(reimbursementAccount?.achData?.bankAccountID ?? '-1'); - const values = useMemo(() => getSubstepValues(BANK_INFO_STEP_KEYS, reimbursementAccountDraft, reimbursementAccount ?? {}), [reimbursementAccount, reimbursementAccountDraft]); - const error = ErrorUtils.getLatestErrorMessage(reimbursementAccount ?? {}); - - const handleModifyAccountNumbers = () => { - onMove(BANK_INFO_STEP_INDEXES.ACCOUNT_NUMBERS); - }; - - return ( - - {({safeAreaPaddingBottomStyle}) => ( - - {translate('bankAccount.letsDoubleCheck')} - {translate('bankAccount.thisBankAccount')} - {setupType === CONST.BANK_ACCOUNT.SUBSTEP.MANUAL && ( - - - - - - )} - {setupType === CONST.BANK_ACCOUNT.SUBSTEP.PLAID && ( - - )} - - {error && error.length > 0 && ( - - )} -