the-forest/client/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js.map
2024-09-17 20:35:18 -04:00

1 line
100 KiB
Plaintext

{"version":3,"names":["_core","require","_traverse","_helperReplaceSupers","_helperMemberExpressionToFunctions","_helperOptimiseCallExpression","_helperAnnotateAsPure","_helperSkipTransparentExpressionWrappers","ts","newHelpers","file","availableHelper","buildPrivateNamesMap","className","privateFieldsAsSymbolsOrProperties","props","privateNamesMap","Map","classBrandId","prop","isPrivate","name","node","key","id","update","get","isMethod","isProperty","isStatic","static","initAdded","_classBrandId","scope","generateUidIdentifier","method","set","isClassPrivateMethod","kind","body","$","length","t","isReturnStatement","isCallExpression","argument","arguments","isThisExpression","isIdentifier","callee","getId","cloneNode","getterDeclared","params","isExpressionStatement","expression","setId","setterDeclared","methodId","buildPrivateNamesNodes","privateFieldsAsProperties","privateFieldsAsSymbols","state","initNodes","injectedIds","Set","value","isGetterOrSetter","init","callExpression","addHelper","stringLiteral","identifier","has","add","newExpression","annotateAsPure","push","template","statement","ast","privateNameVisitorFactory","visitor","nestedVisitor","visitors","environmentVisitor","Object","assign","privateNameVisitor","Class","path","visiblePrivateNames","redeclared","delete","traverse","skipKey","PrivateName","noDocumentAll","parentPath","isMemberExpression","property","isOptionalMemberExpression","includes","handle","unshadow","innerBinding","_scope","hasBinding","bindingIdentifierEquals","rename","parent","buildCheckInRHS","rhs","inRHSIsObject","privateInVisitor","BinaryExpression","operator","left","right","isPrivateName","classRef","replaceWith","readOnlyError","writeOnlyError","console","warn","buildUndefinedNode","buildStaticPrivateFieldAccess","expr","noUninitializedPrivateFieldAccess","memberExpression","autoInherits","fn","member","inherits","apply","privateNameHandlerSpec","memoise","count","object","memo","maybeGenerateMemoised","memoiser","receiver","privateName","cloneId","helperName","skipCheck","err","sequenceExpression","boundGet","assignmentExpression","destructureSet","helper","_unused","Error","getCall","ref","pop","setCall","buildCodeFrameError","args","computed","arrayExpression","slice","call","optimiseCall","optionalCall","privateNameHandlerLoose","BASE","REF","PROP","simpleSet","optionalCallExpression","transformPrivateNamesUsage","size","handler","memberExpressionToFunctions","buildPrivateFieldInitLoose","inheritPropComments","buildPrivateInstanceFieldInitSpec","inheritLoc","expressionStatement","thisExpression","buildPrivateStaticFieldInitSpec","variableDeclaration","variableDeclarator","buildPrivateStaticFieldInitSpecOld","buildPrivateMethodInitLoose","buildPrivateInstanceMethodInitSpec","buildPrivateAccessorInitialization","buildPrivateInstanceMethodInitialization","buildPublicFieldInitLoose","isLiteral","buildPublicFieldInitSpec","buildPrivateStaticMethodInitLoose","buildPrivateMethodDeclaration","generator","async","isGetter","isSetter","thisArg","thisRef","argumentsPath","thisContextVisitor","argumentsId","unshift","declId","functionDeclaration","Identifier","UnaryExpression","skipTransparentExprWrapperNodes","booleanLiteral","ThisExpression","needsClassRef","MetaProperty","meta","innerReferencesVisitor","ReferencedIdentifier","replaceThisContext","innerBindingRef","_state$thisRef","isNameOrLength","type","inheritLeadingComments","inheritInnerComments","original","start","end","loc","buildFieldsInitNodes","superRef","setPublicClassFields","constantSuper","_ref","_ref2","classRefFlags","injectSuperRef","staticNodes","instanceNodes","lastInstanceNodeReturnsThis","pureStaticNodes","classBindingNode","getSuperRef","_injectSuperRef","generateUidIdentifierBasedOnNode","classRefForInnerBinding","isClassProperty","assertFieldTransformed","isStaticBlock","isInstance","isPublic","isField","ReplaceSupers","methodPath","refToPreserve","getObjectRef","replace","replaced","blockBody","inheritsComments","filter","Boolean","wrapClass","leadingComments","remove","superClass","isClassExpression"],"sources":["../src/fields.ts"],"sourcesContent":["import { template, types as t } from \"@babel/core\";\nimport type { File, NodePath, Visitor, Scope } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport memberExpressionToFunctions from \"@babel/helper-member-expression-to-functions\";\nimport type {\n Handler,\n HandlerState,\n} from \"@babel/helper-member-expression-to-functions\";\nimport optimiseCall from \"@babel/helper-optimise-call-expression\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { skipTransparentExprWrapperNodes } from \"@babel/helper-skip-transparent-expression-wrappers\";\n\nimport * as ts from \"./typescript.ts\";\n\ninterface PrivateNameMetadata {\n id: t.Identifier;\n static: boolean;\n method: boolean;\n getId?: t.Identifier;\n setId?: t.Identifier;\n methodId?: t.Identifier;\n initAdded?: boolean;\n getterDeclared?: boolean;\n setterDeclared?: boolean;\n}\n\ntype PrivateNamesMapGeneric<V> = Map<string, V>;\n\ntype PrivateNamesMap = PrivateNamesMapGeneric<PrivateNameMetadata>;\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var newHelpers = (file: File) => {\n if (!process.env.IS_PUBLISH) {\n const { comments } = file.ast;\n // This is needed for the test in\n // babel-plugin-transform-class-properties/test/fixtures/regression/old-helpers\n if (comments?.some(c => c.value.includes(\"@force-old-private-helpers\"))) {\n return false;\n }\n }\n return file.availableHelper(\"classPrivateFieldGet2\");\n };\n}\n\nexport function buildPrivateNamesMap(\n className: string,\n privateFieldsAsSymbolsOrProperties: boolean,\n props: PropPath[],\n file: File,\n) {\n const privateNamesMap: PrivateNamesMap = new Map();\n let classBrandId: t.Identifier;\n for (const prop of props) {\n if (prop.isPrivate()) {\n const { name } = prop.node.key.id;\n let update: PrivateNameMetadata = privateNamesMap.get(name);\n if (!update) {\n const isMethod = !prop.isProperty();\n const isStatic = prop.node.static;\n let initAdded = false;\n let id: t.Identifier;\n if (\n !privateFieldsAsSymbolsOrProperties &&\n (process.env.BABEL_8_BREAKING || newHelpers(file)) &&\n isMethod &&\n !isStatic\n ) {\n initAdded = !!classBrandId;\n classBrandId ??= prop.scope.generateUidIdentifier(\n `${className}_brand`,\n );\n id = classBrandId;\n } else {\n id = prop.scope.generateUidIdentifier(name);\n }\n update = { id, static: isStatic, method: isMethod, initAdded };\n privateNamesMap.set(name, update);\n }\n if (prop.isClassPrivateMethod()) {\n if (prop.node.kind === \"get\") {\n const { body } = prop.node.body;\n let $: t.Node;\n if (\n // If we have\n // get #foo() { return _some_fn(this); }\n // we can use _some_fn directly.\n body.length === 1 &&\n t.isReturnStatement(($ = body[0])) &&\n t.isCallExpression(($ = $.argument)) &&\n $.arguments.length === 1 &&\n t.isThisExpression($.arguments[0]) &&\n t.isIdentifier(($ = $.callee))\n ) {\n update.getId = t.cloneNode($);\n update.getterDeclared = true;\n } else {\n update.getId = prop.scope.generateUidIdentifier(`get_${name}`);\n }\n } else if (prop.node.kind === \"set\") {\n const { params } = prop.node;\n const { body } = prop.node.body;\n let $: t.Node;\n if (\n // If we have\n // set #foo(val) { _some_fn(this, val); }\n // we can use _some_fn directly.\n body.length === 1 &&\n t.isExpressionStatement(($ = body[0])) &&\n t.isCallExpression(($ = $.expression)) &&\n $.arguments.length === 2 &&\n t.isThisExpression($.arguments[0]) &&\n t.isIdentifier($.arguments[1], {\n name: (params[0] as t.Identifier).name,\n }) &&\n t.isIdentifier(($ = $.callee))\n ) {\n update.setId = t.cloneNode($);\n update.setterDeclared = true;\n } else {\n update.setId = prop.scope.generateUidIdentifier(`set_${name}`);\n }\n } else if (prop.node.kind === \"method\") {\n update.methodId = prop.scope.generateUidIdentifier(name);\n }\n }\n privateNamesMap.set(name, update);\n }\n }\n return privateNamesMap;\n}\n\nexport function buildPrivateNamesNodes(\n privateNamesMap: PrivateNamesMap,\n privateFieldsAsProperties: boolean,\n privateFieldsAsSymbols: boolean,\n state: File,\n) {\n const initNodes: t.Statement[] = [];\n\n const injectedIds = new Set<string>();\n\n for (const [name, value] of privateNamesMap) {\n // - When the privateFieldsAsProperties assumption is enabled,\n // both static and instance fields are transpiled using a\n // secret non-enumerable property. Hence, we also need to generate that\n // key (using the classPrivateFieldLooseKey helper).\n // - When the privateFieldsAsSymbols assumption is enabled,\n // both static and instance fields are transpiled using a\n // unique Symbol to define a non-enumerable property.\n // - In spec mode, only instance fields need a \"private name\" initializer\n // because static fields are directly assigned to a variable in the\n // buildPrivateStaticFieldInitSpec function.\n const { static: isStatic, method: isMethod, getId, setId } = value;\n const isGetterOrSetter = getId || setId;\n const id = t.cloneNode(value.id);\n\n let init: t.Expression;\n\n if (privateFieldsAsProperties) {\n init = t.callExpression(state.addHelper(\"classPrivateFieldLooseKey\"), [\n t.stringLiteral(name),\n ]);\n } else if (privateFieldsAsSymbols) {\n init = t.callExpression(t.identifier(\"Symbol\"), [t.stringLiteral(name)]);\n } else if (!isStatic) {\n if (injectedIds.has(id.name)) continue;\n injectedIds.add(id.name);\n\n init = t.newExpression(\n t.identifier(\n isMethod &&\n (process.env.BABEL_8_BREAKING ||\n !isGetterOrSetter ||\n newHelpers(state))\n ? \"WeakSet\"\n : \"WeakMap\",\n ),\n [],\n );\n }\n\n if (init) {\n if (!privateFieldsAsSymbols) {\n annotateAsPure(init);\n }\n initNodes.push(template.statement.ast`var ${id} = ${init}`);\n }\n }\n\n return initNodes;\n}\n\nexport interface PrivateNameVisitorState<V> {\n privateNamesMap: PrivateNamesMapGeneric<V>;\n redeclared?: string[];\n}\n\n// Traverses the class scope, handling private name references. If an inner\n// class redeclares the same private name, it will hand off traversal to the\n// restricted visitor (which doesn't traverse the inner class's inner scope).\nexport function privateNameVisitorFactory<S, V>(\n visitor: Visitor<PrivateNameVisitorState<V & PrivateNameMetadata> & S>,\n) {\n // Traverses the outer portion of a class, without touching the class's inner\n // scope, for private names.\n const nestedVisitor = visitors.environmentVisitor({ ...visitor });\n\n const privateNameVisitor: Visitor<\n PrivateNameVisitorState<V & PrivateNameMetadata> & S\n > = {\n ...visitor,\n\n Class(path) {\n const { privateNamesMap } = this;\n const body = path.get(\"body.body\");\n\n const visiblePrivateNames = new Map(privateNamesMap);\n const redeclared = [];\n for (const prop of body) {\n if (!prop.isPrivate()) continue;\n const { name } = prop.node.key.id;\n visiblePrivateNames.delete(name);\n redeclared.push(name);\n }\n\n // If the class doesn't redeclare any private fields, we can continue with\n // our overall traversal.\n if (!redeclared.length) {\n return;\n }\n\n // This class redeclares some private field. We need to process the outer\n // environment with access to all the outer privates, then we can process\n // the inner environment with only the still-visible outer privates.\n path.get(\"body\").traverse(nestedVisitor, {\n ...this,\n redeclared,\n });\n path.traverse(privateNameVisitor, {\n ...this,\n privateNamesMap: visiblePrivateNames,\n });\n\n // We'll eventually hit this class node again with the overall Class\n // Features visitor, which'll process the redeclared privates.\n path.skipKey(\"body\");\n },\n };\n\n return privateNameVisitor;\n}\n\ninterface PrivateNameState {\n privateNamesMap: PrivateNamesMap;\n classRef: t.Identifier;\n file: File;\n noDocumentAll: boolean;\n noUninitializedPrivateFieldAccess: boolean;\n innerBinding?: t.Identifier;\n}\n\nconst privateNameVisitor = privateNameVisitorFactory<\n HandlerState<PrivateNameState> & PrivateNameState,\n PrivateNameMetadata\n>({\n PrivateName(path, { noDocumentAll }) {\n const { privateNamesMap, redeclared } = this;\n const { node, parentPath } = path;\n\n if (\n !parentPath.isMemberExpression({ property: node }) &&\n !parentPath.isOptionalMemberExpression({ property: node })\n ) {\n return;\n }\n const { name } = node.id;\n if (!privateNamesMap.has(name)) return;\n if (redeclared?.includes(name)) return;\n\n this.handle(parentPath, noDocumentAll);\n },\n});\n\n// rename all bindings that shadows innerBinding\nfunction unshadow(\n name: string,\n scope: Scope,\n innerBinding: t.Identifier | undefined,\n) {\n // in some cases, scope.getBinding(name) === undefined\n // so we check hasBinding to avoid keeping looping\n // see: https://github.com/babel/babel/pull/13656#discussion_r686030715\n while (\n scope?.hasBinding(name) &&\n !scope.bindingIdentifierEquals(name, innerBinding)\n ) {\n scope.rename(name);\n scope = scope.parent;\n }\n}\n\nexport function buildCheckInRHS(\n rhs: t.Expression,\n file: File,\n inRHSIsObject?: boolean,\n) {\n if (inRHSIsObject || !file.availableHelper?.(\"checkInRHS\")) return rhs;\n return t.callExpression(file.addHelper(\"checkInRHS\"), [rhs]);\n}\n\nconst privateInVisitor = privateNameVisitorFactory<\n {\n classRef: t.Identifier;\n file: File;\n innerBinding?: t.Identifier;\n privateFieldsAsProperties: boolean;\n },\n PrivateNameMetadata\n>({\n BinaryExpression(path, { file }) {\n const { operator, left, right } = path.node;\n if (operator !== \"in\") return;\n if (!t.isPrivateName(left)) return;\n\n const { privateFieldsAsProperties, privateNamesMap, redeclared } = this;\n\n const { name } = left.id;\n\n if (!privateNamesMap.has(name)) return;\n if (redeclared?.includes(name)) return;\n\n // if there are any local variable shadowing classRef, unshadow it\n // see #12960\n unshadow(this.classRef.name, path.scope, this.innerBinding);\n\n if (privateFieldsAsProperties) {\n const { id } = privateNamesMap.get(name);\n path.replaceWith(template.expression.ast`\n Object.prototype.hasOwnProperty.call(${buildCheckInRHS(\n right,\n file,\n )}, ${t.cloneNode(id)})\n `);\n return;\n }\n\n const { id, static: isStatic } = privateNamesMap.get(name);\n\n if (isStatic) {\n path.replaceWith(\n template.expression.ast`${buildCheckInRHS(\n right,\n file,\n )} === ${t.cloneNode(this.classRef)}`,\n );\n return;\n }\n\n path.replaceWith(\n template.expression.ast`${t.cloneNode(id)}.has(${buildCheckInRHS(\n right,\n file,\n )})`,\n );\n },\n});\n\ninterface Receiver {\n receiver(\n this: HandlerState<PrivateNameState> & PrivateNameState,\n member: NodePath<t.MemberExpression | t.OptionalMemberExpression>,\n ): t.Expression;\n}\n\nfunction readOnlyError(file: File, name: string) {\n return t.callExpression(file.addHelper(\"readOnlyError\"), [\n t.stringLiteral(`#${name}`),\n ]);\n}\n\nfunction writeOnlyError(file: File, name: string) {\n if (\n !process.env.BABEL_8_BREAKING &&\n !file.availableHelper(\"writeOnlyError\")\n ) {\n console.warn(\n `@babel/helpers is outdated, update it to silence this warning.`,\n );\n return t.buildUndefinedNode();\n }\n return t.callExpression(file.addHelper(\"writeOnlyError\"), [\n t.stringLiteral(`#${name}`),\n ]);\n}\n\nfunction buildStaticPrivateFieldAccess<N extends t.Expression>(\n expr: N,\n noUninitializedPrivateFieldAccess: boolean,\n) {\n if (noUninitializedPrivateFieldAccess) return expr;\n return t.memberExpression(expr, t.identifier(\"_\"));\n}\n\nfunction autoInherits<\n Member extends { node: t.Node },\n Result extends t.Node,\n Fn extends (member: Member, ...args: unknown[]) => Result,\n>(fn: Fn): Fn {\n return function (this: ThisParameterType<Fn>, member) {\n return t.inherits(fn.apply(this, arguments as any), member.node);\n } as Fn;\n}\n\nconst privateNameHandlerSpec: Handler<PrivateNameState & Receiver> & Receiver =\n {\n memoise(member, count) {\n const { scope } = member;\n const { object } = member.node as { object: t.Expression };\n\n const memo = scope.maybeGenerateMemoised(object);\n if (!memo) {\n return;\n }\n\n this.memoiser.set(object, memo, count);\n },\n\n receiver(member) {\n const { object } = member.node as { object: t.Expression };\n\n if (this.memoiser.has(object)) {\n return t.cloneNode(this.memoiser.get(object));\n }\n\n return t.cloneNode(object);\n },\n\n get: autoInherits(function (member) {\n const {\n classRef,\n privateNamesMap,\n file,\n innerBinding,\n noUninitializedPrivateFieldAccess,\n } = this;\n const privateName = member.node.property as t.PrivateName;\n const { name } = privateName.id;\n const {\n id,\n static: isStatic,\n method: isMethod,\n methodId,\n getId,\n setId,\n } = privateNamesMap.get(name);\n const isGetterOrSetter = getId || setId;\n\n const cloneId = (id: t.Identifier) =>\n t.inherits(t.cloneNode(id), privateName);\n\n if (isStatic) {\n // if there are any local variable shadowing classRef, unshadow it\n // see #12960\n unshadow(classRef.name, member.scope, innerBinding);\n\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n // NOTE: This package has a peerDependency on @babel/core@^7.0.0, but these\n // helpers have been introduced in @babel/helpers@7.1.0.\n const helperName =\n isMethod && !isGetterOrSetter\n ? \"classStaticPrivateMethodGet\"\n : \"classStaticPrivateFieldSpecGet\";\n\n return t.callExpression(file.addHelper(helperName), [\n this.receiver(member),\n t.cloneNode(classRef),\n cloneId(id),\n ]);\n }\n\n const receiver = this.receiver(member);\n const skipCheck =\n t.isIdentifier(receiver) && receiver.name === classRef.name;\n\n if (!isMethod) {\n if (skipCheck) {\n return buildStaticPrivateFieldAccess(\n cloneId(id),\n noUninitializedPrivateFieldAccess,\n );\n }\n\n return buildStaticPrivateFieldAccess(\n t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n cloneId(id),\n ]),\n noUninitializedPrivateFieldAccess,\n );\n }\n\n if (getId) {\n if (skipCheck) {\n return t.callExpression(cloneId(getId), [receiver]);\n }\n return t.callExpression(file.addHelper(\"classPrivateGetter\"), [\n t.cloneNode(classRef),\n receiver,\n cloneId(getId),\n ]);\n }\n\n if (setId) {\n const err = t.buildUndefinedNode(); // TODO: writeOnlyError(file, name)\n if (skipCheck) return err;\n return t.sequenceExpression([\n t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n ]),\n err,\n ]);\n }\n\n if (skipCheck) return cloneId(id);\n return t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n cloneId(id),\n ]);\n }\n\n if (isMethod) {\n if (isGetterOrSetter) {\n if (!getId) {\n return t.sequenceExpression([\n this.receiver(member),\n writeOnlyError(file, name),\n ]);\n }\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldGet\"), [\n this.receiver(member),\n cloneId(id),\n ]);\n }\n return t.callExpression(file.addHelper(\"classPrivateGetter\"), [\n t.cloneNode(id),\n this.receiver(member),\n cloneId(getId),\n ]);\n }\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateMethodGet\"), [\n this.receiver(member),\n t.cloneNode(id),\n cloneId(methodId),\n ]);\n }\n return t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(id),\n this.receiver(member),\n cloneId(methodId),\n ]);\n }\n if (process.env.BABEL_8_BREAKING || newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldGet2\"), [\n cloneId(id),\n this.receiver(member),\n ]);\n }\n\n return t.callExpression(file.addHelper(\"classPrivateFieldGet\"), [\n this.receiver(member),\n cloneId(id),\n ]);\n }),\n\n boundGet(member) {\n this.memoise(member, 1);\n\n return t.callExpression(\n t.memberExpression(this.get(member), t.identifier(\"bind\")),\n [this.receiver(member)],\n );\n },\n\n set: autoInherits(function (member, value) {\n const {\n classRef,\n privateNamesMap,\n file,\n noUninitializedPrivateFieldAccess,\n } = this;\n const privateName = member.node.property as t.PrivateName;\n const { name } = privateName.id;\n const {\n id,\n static: isStatic,\n method: isMethod,\n setId,\n getId,\n } = privateNamesMap.get(name);\n const isGetterOrSetter = getId || setId;\n\n const cloneId = (id: t.Identifier) =>\n t.inherits(t.cloneNode(id), privateName);\n\n if (isStatic) {\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n const helperName =\n isMethod && !isGetterOrSetter\n ? \"classStaticPrivateMethodSet\"\n : \"classStaticPrivateFieldSpecSet\";\n\n return t.callExpression(file.addHelper(helperName), [\n this.receiver(member),\n t.cloneNode(classRef),\n cloneId(id),\n value,\n ]);\n }\n\n const receiver = this.receiver(member);\n const skipCheck =\n t.isIdentifier(receiver) && receiver.name === classRef.name;\n\n if (isMethod && !setId) {\n const err = readOnlyError(file, name);\n if (skipCheck) return t.sequenceExpression([value, err]);\n return t.sequenceExpression([\n value,\n t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n ]),\n readOnlyError(file, name),\n ]);\n }\n\n if (setId) {\n if (skipCheck) {\n return t.callExpression(t.cloneNode(setId), [receiver, value]);\n }\n return t.callExpression(file.addHelper(\"classPrivateSetter\"), [\n t.cloneNode(classRef),\n cloneId(setId),\n receiver,\n value,\n ]);\n }\n return t.assignmentExpression(\n \"=\",\n buildStaticPrivateFieldAccess(\n cloneId(id),\n noUninitializedPrivateFieldAccess,\n ),\n skipCheck\n ? value\n : t.callExpression(file.addHelper(\"assertClassBrand\"), [\n t.cloneNode(classRef),\n receiver,\n value,\n ]),\n );\n }\n if (isMethod) {\n if (setId) {\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldSet\"), [\n this.receiver(member),\n cloneId(id),\n value,\n ]);\n }\n return t.callExpression(file.addHelper(\"classPrivateSetter\"), [\n t.cloneNode(id),\n cloneId(setId),\n this.receiver(member),\n value,\n ]);\n }\n return t.sequenceExpression([\n this.receiver(member),\n value,\n readOnlyError(file, name),\n ]);\n }\n\n if (process.env.BABEL_8_BREAKING || newHelpers(file)) {\n return t.callExpression(file.addHelper(\"classPrivateFieldSet2\"), [\n cloneId(id),\n this.receiver(member),\n value,\n ]);\n }\n\n return t.callExpression(file.addHelper(\"classPrivateFieldSet\"), [\n this.receiver(member),\n cloneId(id),\n value,\n ]);\n }),\n\n destructureSet(member) {\n const {\n classRef,\n privateNamesMap,\n file,\n noUninitializedPrivateFieldAccess,\n } = this;\n const privateName = member.node.property as t.PrivateName;\n const { name } = privateName.id;\n const {\n id,\n static: isStatic,\n method: isMethod,\n setId,\n } = privateNamesMap.get(name);\n\n const cloneId = (id: t.Identifier) =>\n t.inherits(t.cloneNode(id), privateName);\n\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n if (isStatic) {\n try {\n // classStaticPrivateFieldDestructureSet was introduced in 7.13.10\n // eslint-disable-next-line no-var\n var helper = file.addHelper(\n \"classStaticPrivateFieldDestructureSet\",\n );\n } catch {\n throw new Error(\n \"Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \\n\" +\n \"please update @babel/helpers to the latest version.\",\n );\n }\n return t.memberExpression(\n t.callExpression(helper, [\n this.receiver(member),\n t.cloneNode(classRef),\n cloneId(id),\n ]),\n t.identifier(\"value\"),\n );\n }\n\n return t.memberExpression(\n t.callExpression(file.addHelper(\"classPrivateFieldDestructureSet\"), [\n this.receiver(member),\n cloneId(id),\n ]),\n t.identifier(\"value\"),\n );\n }\n\n if (isMethod && !setId) {\n return t.memberExpression(\n t.sequenceExpression([\n // @ts-ignore(Babel 7 vs Babel 8) member.node.object is not t.Super\n member.node.object,\n readOnlyError(file, name),\n ]),\n t.identifier(\"_\"),\n );\n }\n\n if (isStatic && !isMethod) {\n const getCall = this.get(member);\n if (\n !noUninitializedPrivateFieldAccess ||\n !t.isCallExpression(getCall)\n ) {\n return getCall;\n }\n const ref = getCall.arguments.pop();\n getCall.arguments.push(template.expression.ast`(_) => ${ref} = _`);\n return t.memberExpression(\n t.callExpression(file.addHelper(\"toSetter\"), [getCall]),\n t.identifier(\"_\"),\n );\n }\n\n const setCall = this.set(member, t.identifier(\"_\"));\n if (\n !t.isCallExpression(setCall) ||\n !t.isIdentifier(setCall.arguments[setCall.arguments.length - 1], {\n name: \"_\",\n })\n ) {\n throw member.buildCodeFrameError(\n \"Internal Babel error while compiling this code. This is a Babel bug. \" +\n \"Please report it at https://github.com/babel/babel/issues.\",\n );\n }\n\n // someHelper(foo, bar, _) -> someHelper, [foo, bar]\n // aFn.call(foo, bar, _) -> aFn, [bar], foo\n let args: t.Expression[];\n if (\n t.isMemberExpression(setCall.callee, { computed: false }) &&\n t.isIdentifier(setCall.callee.property) &&\n setCall.callee.property.name === \"call\"\n ) {\n args = [\n // @ts-ignore(Babel 7 vs Babel 8) member.node.object is not t.Super\n setCall.callee.object,\n t.arrayExpression(\n // Remove '_'\n (setCall.arguments as t.Expression[]).slice(1, -1),\n ),\n setCall.arguments[0] as t.Expression,\n ];\n } else {\n args = [\n setCall.callee as t.Expression,\n t.arrayExpression(\n // Remove '_'\n (setCall.arguments as t.Expression[]).slice(0, -1),\n ),\n ];\n }\n\n return t.memberExpression(\n t.callExpression(file.addHelper(\"toSetter\"), args),\n t.identifier(\"_\"),\n );\n },\n\n call(member, args: (t.Expression | t.SpreadElement)[]) {\n // The first access (the get) should do the memo assignment.\n this.memoise(member, 1);\n\n return optimiseCall(this.get(member), this.receiver(member), args, false);\n },\n\n optionalCall(member, args: (t.Expression | t.SpreadElement)[]) {\n this.memoise(member, 1);\n\n return optimiseCall(this.get(member), this.receiver(member), args, true);\n },\n\n delete() {\n throw new Error(\n \"Internal Babel error: deleting private elements is a parsing error.\",\n );\n },\n };\n\nconst privateNameHandlerLoose: Handler<PrivateNameState> = {\n get(member) {\n const { privateNamesMap, file } = this;\n const { object } = member.node;\n const { name } = (member.node.property as t.PrivateName).id;\n\n return template.expression`BASE(REF, PROP)[PROP]`({\n BASE: file.addHelper(\"classPrivateFieldLooseBase\"),\n REF: t.cloneNode(object),\n PROP: t.cloneNode(privateNamesMap.get(name).id),\n });\n },\n\n set() {\n // noop\n throw new Error(\"private name handler with loose = true don't need set()\");\n },\n\n boundGet(member) {\n return t.callExpression(\n t.memberExpression(this.get(member), t.identifier(\"bind\")),\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n [t.cloneNode(member.node.object as t.Expression)],\n );\n },\n\n simpleSet(member) {\n return this.get(member);\n },\n\n destructureSet(member) {\n return this.get(member);\n },\n\n call(member, args) {\n return t.callExpression(this.get(member), args);\n },\n\n optionalCall(member, args) {\n return t.optionalCallExpression(this.get(member), args, true);\n },\n\n delete() {\n throw new Error(\n \"Internal Babel error: deleting private elements is a parsing error.\",\n );\n },\n};\n\nexport function transformPrivateNamesUsage(\n ref: t.Identifier,\n path: NodePath<t.Class>,\n privateNamesMap: PrivateNamesMap,\n {\n privateFieldsAsProperties,\n noUninitializedPrivateFieldAccess,\n noDocumentAll,\n innerBinding,\n }: {\n privateFieldsAsProperties: boolean;\n noUninitializedPrivateFieldAccess: boolean;\n noDocumentAll: boolean;\n innerBinding: t.Identifier;\n },\n state: File,\n) {\n if (!privateNamesMap.size) return;\n\n const body = path.get(\"body\");\n const handler = privateFieldsAsProperties\n ? privateNameHandlerLoose\n : privateNameHandlerSpec;\n\n memberExpressionToFunctions<PrivateNameState>(body, privateNameVisitor, {\n privateNamesMap,\n classRef: ref,\n file: state,\n ...handler,\n noDocumentAll,\n noUninitializedPrivateFieldAccess,\n innerBinding,\n });\n body.traverse(privateInVisitor, {\n privateNamesMap,\n classRef: ref,\n file: state,\n privateFieldsAsProperties,\n innerBinding,\n });\n}\n\nfunction buildPrivateFieldInitLoose(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateProperty>,\n privateNamesMap: PrivateNamesMap,\n) {\n const { id } = privateNamesMap.get(prop.node.key.id.name);\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${t.cloneNode(id)}, {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ${value}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n}\n\nfunction buildPrivateInstanceFieldInitSpec(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateProperty>,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const { id } = privateNamesMap.get(prop.node.key.id.name);\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateFieldInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`${t.cloneNode(id)}.set(${ref}, {\n // configurable is always false for private elements\n // enumerable is always false for private elements\n writable: true,\n value: ${value},\n })` as t.ExpressionStatement,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateFieldInitSpec\");\n return inheritLoc(\n inheritPropComments(\n t.expressionStatement(\n t.callExpression(helper, [\n t.thisExpression(),\n inheritLoc(t.cloneNode(id), prop.node.key),\n process.env.BABEL_8_BREAKING || newHelpers(state)\n ? value\n : template.expression.ast`{ writable: true, value: ${value} }`,\n ]),\n ),\n prop,\n ),\n prop.node,\n );\n}\n\nfunction buildPrivateStaticFieldInitSpec(\n prop: NodePath<t.ClassPrivateProperty>,\n privateNamesMap: PrivateNamesMap,\n noUninitializedPrivateFieldAccess: boolean,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n\n const value = noUninitializedPrivateFieldAccess\n ? prop.node.value\n : template.expression.ast`{\n _: ${prop.node.value || t.buildUndefinedNode()}\n }`;\n\n return inheritPropComments(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.cloneNode(privateName.id), value),\n ]),\n prop,\n );\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var buildPrivateStaticFieldInitSpecOld = function (\n prop: NodePath<t.ClassPrivateProperty>,\n privateNamesMap: PrivateNamesMap,\n ) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, getId, setId, initAdded } = privateName;\n const isGetterOrSetter = getId || setId;\n\n if (!prop.isProperty() && (initAdded || !isGetterOrSetter)) return;\n\n if (isGetterOrSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n var ${t.cloneNode(id)} = {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n }\n `,\n prop,\n );\n }\n\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n return inheritPropComments(\n template.statement.ast`\n var ${t.cloneNode(id)} = {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ${value}\n };\n `,\n prop,\n );\n };\n}\n\nfunction buildPrivateMethodInitLoose(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateMethod>,\n privateNamesMap: PrivateNamesMap,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { methodId, id, getId, setId, initAdded } = privateName;\n if (initAdded) return;\n\n if (methodId) {\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n value: ${methodId.name}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n }\n const isGetterOrSetter = getId || setId;\n if (isGetterOrSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n }\n}\n\nfunction buildPrivateInstanceMethodInitSpec(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateMethod>,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n\n if (privateName.initAdded) return;\n\n if (!process.env.BABEL_8_BREAKING && !newHelpers(state)) {\n const isGetterOrSetter = privateName.getId || privateName.setId;\n if (isGetterOrSetter) {\n return buildPrivateAccessorInitialization(\n ref,\n prop,\n privateNamesMap,\n state,\n );\n }\n }\n\n return buildPrivateInstanceMethodInitialization(\n ref,\n prop,\n privateNamesMap,\n state,\n );\n}\n\nfunction buildPrivateAccessorInitialization(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateMethod>,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, getId, setId } = privateName;\n\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateFieldInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`\n ${id}.set(${ref}, {\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n });\n ` as t.ExpressionStatement,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateFieldInitSpec\");\n return inheritLoc(\n inheritPropComments(\n template.statement.ast`${helper}(\n ${t.thisExpression()},\n ${t.cloneNode(id)},\n {\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n },\n )` as t.ExpressionStatement,\n prop,\n ),\n prop.node,\n );\n}\n\nfunction buildPrivateInstanceMethodInitialization(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateMethod>,\n privateNamesMap: PrivateNamesMap,\n state: File,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id } = privateName;\n\n if (!process.env.BABEL_8_BREAKING) {\n if (!state.availableHelper(\"classPrivateMethodInitSpec\")) {\n return inheritPropComments(\n template.statement.ast`${id}.add(${ref})` as t.ExpressionStatement,\n prop,\n );\n }\n }\n\n const helper = state.addHelper(\"classPrivateMethodInitSpec\");\n return inheritPropComments(\n template.statement.ast`${helper}(\n ${t.thisExpression()},\n ${t.cloneNode(id)}\n )` as t.ExpressionStatement,\n prop,\n );\n}\n\nfunction buildPublicFieldInitLoose(\n ref: t.Expression,\n prop: NodePath<t.ClassProperty>,\n) {\n const { key, computed } = prop.node;\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(ref, key, computed || t.isLiteral(key)),\n value,\n ),\n ),\n prop,\n );\n}\n\nfunction buildPublicFieldInitSpec(\n ref: t.Expression,\n prop: NodePath<t.ClassProperty>,\n state: File,\n) {\n const { key, computed } = prop.node;\n const value = prop.node.value || prop.scope.buildUndefinedNode();\n\n return inheritPropComments(\n t.expressionStatement(\n t.callExpression(state.addHelper(\"defineProperty\"), [\n ref,\n computed || t.isLiteral(key)\n ? key\n : t.stringLiteral((key as t.Identifier).name),\n value,\n ]),\n ),\n prop,\n );\n}\n\nfunction buildPrivateStaticMethodInitLoose(\n ref: t.Expression,\n prop: NodePath<t.ClassPrivateMethod>,\n state: File,\n privateNamesMap: PrivateNamesMap,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const { id, methodId, getId, setId, initAdded } = privateName;\n\n if (initAdded) return;\n\n const isGetterOrSetter = getId || setId;\n if (isGetterOrSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},\n set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}\n })\n `,\n prop,\n );\n }\n\n return inheritPropComments(\n template.statement.ast`\n Object.defineProperty(${ref}, ${id}, {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n value: ${methodId.name}\n });\n `,\n prop,\n );\n}\n\nfunction buildPrivateMethodDeclaration(\n file: File,\n prop: NodePath<t.ClassPrivateMethod>,\n privateNamesMap: PrivateNamesMap,\n privateFieldsAsSymbolsOrProperties = false,\n) {\n const privateName = privateNamesMap.get(prop.node.key.id.name);\n const {\n id,\n methodId,\n getId,\n setId,\n getterDeclared,\n setterDeclared,\n static: isStatic,\n } = privateName;\n const { params, body, generator, async } = prop.node;\n const isGetter = getId && params.length === 0;\n const isSetter = setId && params.length > 0;\n\n if ((isGetter && getterDeclared) || (isSetter && setterDeclared)) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n initAdded: true,\n });\n return null;\n }\n\n if (\n (process.env.BABEL_8_BREAKING || newHelpers(file)) &&\n (isGetter || isSetter) &&\n !privateFieldsAsSymbolsOrProperties\n ) {\n const scope = prop.get(\"body\").scope;\n const thisArg = scope.generateUidIdentifier(\"this\");\n const state: ReplaceThisState = {\n thisRef: thisArg,\n argumentsPath: [],\n };\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n prop.traverse(thisContextVisitor, state);\n if (state.argumentsPath.length) {\n const argumentsId = scope.generateUidIdentifier(\"arguments\");\n scope.push({\n id: argumentsId,\n init: template.expression.ast`[].slice.call(arguments, 1)`,\n });\n for (const path of state.argumentsPath) {\n path.replaceWith(t.cloneNode(argumentsId));\n }\n }\n\n params.unshift(t.cloneNode(thisArg));\n }\n\n let declId = methodId;\n\n if (isGetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n getterDeclared: true,\n initAdded: true,\n });\n declId = getId;\n } else if (isSetter) {\n privateNamesMap.set(prop.node.key.id.name, {\n ...privateName,\n setterDeclared: true,\n initAdded: true,\n });\n declId = setId;\n } else if (isStatic && !privateFieldsAsSymbolsOrProperties) {\n declId = id;\n }\n\n return inheritPropComments(\n t.functionDeclaration(\n t.cloneNode(declId),\n // @ts-expect-error params for ClassMethod has TSParameterProperty\n params,\n body,\n generator,\n async,\n ),\n prop,\n );\n}\n\ntype ReplaceThisState = {\n thisRef: t.Identifier;\n needsClassRef?: boolean;\n innerBinding?: t.Identifier | null;\n argumentsPath?: NodePath<t.Identifier>[];\n};\n\ntype ReplaceInnerBindingReferenceState = ReplaceThisState;\n\nconst thisContextVisitor = visitors.environmentVisitor<ReplaceThisState>({\n Identifier(path, state) {\n if (state.argumentsPath && path.node.name === \"arguments\") {\n state.argumentsPath.push(path);\n }\n },\n UnaryExpression(path) {\n // Replace `delete this` with `true`\n const { node } = path;\n if (node.operator === \"delete\") {\n const argument = skipTransparentExprWrapperNodes(node.argument);\n if (t.isThisExpression(argument)) {\n path.replaceWith(t.booleanLiteral(true));\n }\n }\n },\n ThisExpression(path, state) {\n state.needsClassRef = true;\n path.replaceWith(t.cloneNode(state.thisRef));\n },\n MetaProperty(path) {\n const { node, scope } = path;\n // if there are `new.target` in static field\n // we should replace it with `undefined`\n if (node.meta.name === \"new\" && node.property.name === \"target\") {\n path.replaceWith(scope.buildUndefinedNode());\n }\n },\n});\n\nconst innerReferencesVisitor: Visitor<ReplaceInnerBindingReferenceState> = {\n ReferencedIdentifier(path, state) {\n if (\n path.scope.bindingIdentifierEquals(path.node.name, state.innerBinding)\n ) {\n state.needsClassRef = true;\n path.node.name = state.thisRef.name;\n }\n },\n};\n\nfunction replaceThisContext(\n path: PropPath,\n ref: t.Identifier,\n innerBindingRef: t.Identifier | null,\n) {\n const state: ReplaceThisState = {\n thisRef: ref,\n needsClassRef: false,\n innerBinding: innerBindingRef,\n };\n if (!path.isMethod()) {\n // replace `this` in property initializers and static blocks\n path.traverse(thisContextVisitor, state);\n }\n\n // todo: use innerBinding.referencePaths to avoid full traversal\n if (\n innerBindingRef != null &&\n state.thisRef?.name &&\n state.thisRef.name !== innerBindingRef.name\n ) {\n path.traverse(innerReferencesVisitor, state);\n }\n\n return state.needsClassRef;\n}\n\nexport type PropNode =\n | t.ClassProperty\n | t.ClassPrivateMethod\n | t.ClassPrivateProperty\n | t.StaticBlock;\nexport type PropPath = NodePath<PropNode>;\n\nfunction isNameOrLength({ key, computed }: t.ClassProperty) {\n if (key.type === \"Identifier\") {\n return !computed && (key.name === \"name\" || key.name === \"length\");\n }\n if (key.type === \"StringLiteral\") {\n return key.value === \"name\" || key.value === \"length\";\n }\n return false;\n}\n\n/**\n * Inherit comments from class members. This is a reduced version of\n * t.inheritsComments: the trailing comments are not inherited because\n * for most class members except the last one, their trailing comments are\n * the next sibling's leading comments.\n *\n * @template T transformed class member type\n * @param {T} node transformed class member\n * @param {PropPath} prop class member\n * @returns transformed class member type with comments inherited\n */\nfunction inheritPropComments<T extends t.Node>(node: T, prop: PropPath) {\n t.inheritLeadingComments(node, prop.node);\n t.inheritInnerComments(node, prop.node);\n return node;\n}\n\nfunction inheritLoc<T extends t.Node>(node: T, original: t.Node) {\n node.start = original.start;\n node.end = original.end;\n node.loc = original.loc;\n return node;\n}\n\n/**\n * ClassRefFlag records the requirement of the class binding reference.\n *\n * @enum {number}\n */\nconst enum ClassRefFlag {\n None,\n /**\n * When this flag is enabled, the binding reference can be the class id,\n * if exists, or the uid identifier generated for class expression. The\n * reference is safe to be consumed by [[Define]].\n */\n ForDefine = 1 << 0,\n /**\n * When this flag is enabled, the reference must be a uid, because the outer\n * class binding can be mutated by user codes.\n * E.g.\n * class C { static p = C }; const oldC = C; C = null; oldC.p;\n * we must memoize class `C` before defining the property `p`.\n */\n ForInnerBinding = 1 << 1,\n}\n\nexport function buildFieldsInitNodes(\n ref: t.Identifier | null,\n superRef: t.Expression | undefined,\n props: PropPath[],\n privateNamesMap: PrivateNamesMap,\n file: File,\n setPublicClassFields: boolean,\n privateFieldsAsSymbolsOrProperties: boolean,\n noUninitializedPrivateFieldAccess: boolean,\n constantSuper: boolean,\n innerBindingRef: t.Identifier | null,\n) {\n let classRefFlags = ClassRefFlag.None;\n let injectSuperRef: t.Identifier;\n const staticNodes: t.Statement[] = [];\n const instanceNodes: t.ExpressionStatement[] = [];\n let lastInstanceNodeReturnsThis = false;\n // These nodes are pure and can be moved to the closest statement position\n const pureStaticNodes: t.FunctionDeclaration[] = [];\n let classBindingNode: t.ExpressionStatement | null = null;\n\n const getSuperRef = t.isIdentifier(superRef)\n ? () => superRef\n : () => {\n injectSuperRef ??=\n props[0].scope.generateUidIdentifierBasedOnNode(superRef);\n return injectSuperRef;\n };\n\n const classRefForInnerBinding =\n ref ??\n props[0].scope.generateUidIdentifier(innerBindingRef?.name || \"Class\");\n ref ??= t.cloneNode(innerBindingRef);\n\n for (const prop of props) {\n if (prop.isClassProperty()) {\n ts.assertFieldTransformed(prop);\n }\n\n // @ts-expect-error: TS doesn't infer that prop.node is not a StaticBlock\n const isStatic = !t.isStaticBlock?.(prop.node) && prop.node.static;\n const isInstance = !isStatic;\n const isPrivate = prop.isPrivate();\n const isPublic = !isPrivate;\n const isField = prop.isProperty();\n const isMethod = !isField;\n const isStaticBlock = prop.isStaticBlock?.();\n\n if (isStatic) classRefFlags |= ClassRefFlag.ForDefine;\n\n if (isStatic || (isMethod && isPrivate) || isStaticBlock) {\n new ReplaceSupers({\n methodPath: prop,\n constantSuper,\n file: file,\n refToPreserve: innerBindingRef,\n getSuperRef,\n getObjectRef() {\n classRefFlags |= ClassRefFlag.ForInnerBinding;\n if (isStatic || isStaticBlock) {\n return classRefForInnerBinding;\n } else {\n return t.memberExpression(\n classRefForInnerBinding,\n t.identifier(\"prototype\"),\n );\n }\n },\n }).replace();\n\n const replaced = replaceThisContext(\n prop,\n classRefForInnerBinding,\n innerBindingRef,\n );\n if (replaced) {\n classRefFlags |= ClassRefFlag.ForInnerBinding;\n }\n }\n\n lastInstanceNodeReturnsThis = false;\n\n // TODO(ts): there are so many `ts-expect-error` inside cases since\n // ts can not infer type from pre-computed values (or a case test)\n // even change `isStaticBlock` to `t.isStaticBlock(prop)` will not make prop\n // a `NodePath<t.StaticBlock>`\n // this maybe a bug for ts\n switch (true) {\n case isStaticBlock: {\n const blockBody = prop.node.body;\n // We special-case the single expression case to avoid the iife, since\n // it's common.\n if (blockBody.length === 1 && t.isExpressionStatement(blockBody[0])) {\n staticNodes.push(inheritPropComments(blockBody[0], prop));\n } else {\n staticNodes.push(\n t.inheritsComments(\n template.statement.ast`(() => { ${blockBody} })()`,\n prop.node,\n ),\n );\n }\n break;\n }\n case isStatic &&\n isPrivate &&\n isField &&\n privateFieldsAsSymbolsOrProperties:\n staticNodes.push(\n buildPrivateFieldInitLoose(t.cloneNode(ref), prop, privateNamesMap),\n );\n break;\n case isStatic &&\n isPrivate &&\n isField &&\n !privateFieldsAsSymbolsOrProperties:\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n staticNodes.push(\n buildPrivateStaticFieldInitSpecOld(prop, privateNamesMap),\n );\n } else {\n staticNodes.push(\n buildPrivateStaticFieldInitSpec(\n prop,\n privateNamesMap,\n noUninitializedPrivateFieldAccess,\n ),\n );\n }\n break;\n case isStatic && isPublic && isField && setPublicClassFields:\n // Functions always have non-writable .name and .length properties,\n // so we must always use [[Define]] for them.\n // It might still be possible to a computed static fields whose resulting\n // key is \"name\" or \"length\", but the assumption is telling us that it's\n // not going to happen.\n if (!isNameOrLength(prop.node)) {\n staticNodes.push(buildPublicFieldInitLoose(t.cloneNode(ref), prop));\n break;\n }\n // falls through\n case isStatic && isPublic && isField && !setPublicClassFields:\n staticNodes.push(\n buildPublicFieldInitSpec(t.cloneNode(ref), prop, file),\n );\n break;\n case isInstance &&\n isPrivate &&\n isField &&\n privateFieldsAsSymbolsOrProperties:\n instanceNodes.push(\n buildPrivateFieldInitLoose(t.thisExpression(), prop, privateNamesMap),\n );\n break;\n case isInstance &&\n isPrivate &&\n isField &&\n !privateFieldsAsSymbolsOrProperties:\n instanceNodes.push(\n buildPrivateInstanceFieldInitSpec(\n t.thisExpression(),\n prop,\n privateNamesMap,\n file,\n ),\n );\n break;\n case isInstance &&\n isPrivate &&\n isMethod &&\n privateFieldsAsSymbolsOrProperties:\n instanceNodes.unshift(\n buildPrivateMethodInitLoose(\n t.thisExpression(),\n prop,\n privateNamesMap,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isInstance &&\n isPrivate &&\n isMethod &&\n !privateFieldsAsSymbolsOrProperties:\n instanceNodes.unshift(\n buildPrivateInstanceMethodInitSpec(\n t.thisExpression(),\n prop,\n privateNamesMap,\n file,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isStatic &&\n isPrivate &&\n isMethod &&\n !privateFieldsAsSymbolsOrProperties:\n if (!process.env.BABEL_8_BREAKING && !newHelpers(file)) {\n staticNodes.unshift(\n // @ts-expect-error checked in switch\n buildPrivateStaticFieldInitSpecOld(prop, privateNamesMap),\n );\n }\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isStatic &&\n isPrivate &&\n isMethod &&\n privateFieldsAsSymbolsOrProperties:\n staticNodes.unshift(\n buildPrivateStaticMethodInitLoose(\n t.cloneNode(ref),\n prop,\n file,\n privateNamesMap,\n ),\n );\n pureStaticNodes.push(\n buildPrivateMethodDeclaration(\n file,\n prop,\n privateNamesMap,\n privateFieldsAsSymbolsOrProperties,\n ),\n );\n break;\n case isInstance && isPublic && isField && setPublicClassFields:\n instanceNodes.push(buildPublicFieldInitLoose(t.thisExpression(), prop));\n break;\n case isInstance && isPublic && isField && !setPublicClassFields:\n lastInstanceNodeReturnsThis = true;\n instanceNodes.push(\n buildPublicFieldInitSpec(t.thisExpression(), prop, file),\n );\n break;\n default:\n throw new Error(\"Unreachable.\");\n }\n }\n\n if (classRefFlags & ClassRefFlag.ForInnerBinding && innerBindingRef != null) {\n classBindingNode = t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(classRefForInnerBinding),\n t.cloneNode(innerBindingRef),\n ),\n );\n }\n\n return {\n staticNodes: staticNodes.filter(Boolean),\n instanceNodes: instanceNodes.filter(Boolean),\n lastInstanceNodeReturnsThis,\n pureStaticNodes: pureStaticNodes.filter(Boolean),\n classBindingNode,\n wrapClass(path: NodePath<t.Class>) {\n for (const prop of props) {\n // Delete leading comments so that they don't get attached as\n // trailing comments of the previous sibling.\n // When transforming props, we explicitly attach their leading\n // comments to the transformed node with `inheritPropComments`\n // above.\n prop.node.leadingComments = null;\n prop.remove();\n }\n\n if (injectSuperRef) {\n path.scope.push({ id: t.cloneNode(injectSuperRef) });\n path.set(\n \"superClass\",\n t.assignmentExpression(\"=\", injectSuperRef, path.node.superClass),\n );\n }\n\n if (classRefFlags !== ClassRefFlag.None) {\n if (path.isClassExpression()) {\n path.scope.push({ id: ref });\n path.replaceWith(\n t.assignmentExpression(\"=\", t.cloneNode(ref), path.node),\n );\n } else {\n if (innerBindingRef == null) {\n // export anonymous class declaration\n path.node.id = ref;\n }\n if (classBindingNode != null) {\n path.scope.push({ id: classRefForInnerBinding });\n }\n }\n }\n\n return path;\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,kCAAA,GAAAH,OAAA;AAKA,IAAAI,6BAAA,GAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,wCAAA,GAAAN,OAAA;AAEA,IAAAO,EAAA,GAAAP,OAAA;AAkBmC;EAEjC,IAAIQ,UAAU,GAAIC,IAAU,IAAK;IAAA;IAS/B,OAAOA,IAAI,CA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