printer-notifications/node_modules/jiti/dist/babel.js

1849 lines
1.6 MiB
JavaScript
Raw Normal View History

2023-11-13 21:10:04 +00:00
(()=>{var __webpack_modules__={"./node_modules/.pnpm/@ampproject+remapping@2.2.1/node_modules/@ampproject/remapping/dist/remapping.umd.js":function(module,__unused_webpack_exports,__webpack_require__){module.exports=function(traceMapping,genMapping){"use strict";const SOURCELESS_MAPPING=SegmentObject("",-1,-1,"",null),EMPTY_SOURCES=[];function SegmentObject(source,line,column,name,content){return{source,line,column,name,content}}function Source(map,sources,source,content){return{map,sources,source,content}}function MapSource(map,sources){return Source(map,sources,"",null)}function OriginalSource(source,content){return Source(null,EMPTY_SOURCES,source,content)}function traceMappings(tree){const gen=new genMapping.GenMapping({file:tree.map.file}),{sources:rootSources,map}=tree,rootNames=map.names,rootMappings=traceMapping.decodedMappings(map);for(let i=0;i<rootMappings.length;i++){const segments=rootMappings[i];for(let j=0;j<segments.length;j++){const segment=segments[j],genCol=segment[0];let traced=SOURCELESS_MAPPING;if(1!==segment.length&&(traced=originalPositionFor(rootSources[segment[1]],segment[2],segment[3],5===segment.length?rootNames[segment[4]]:""),null==traced))continue;const{column,line,name,content,source}=traced;genMapping.maybeAddSegment(gen,i,genCol,source,line,column,name),source&&null!=content&&genMapping.setSourceContent(gen,source,content)}}return gen}function originalPositionFor(source,line,column,name){if(!source.map)return SegmentObject(source.source,line,column,name,source.content);const segment=traceMapping.traceSegment(source.map,line,column);return null==segment?null:1===segment.length?SOURCELESS_MAPPING:originalPositionFor(source.sources[segment[1]],segment[2],segment[3],5===segment.length?source.map.names[segment[4]]:name)}function asArray(value){return Array.isArray(value)?value:[value]}function buildSourceMapTree(input,loader){const maps=asArray(input).map((m=>new traceMapping.TraceMap(m,""))),map=maps.pop();for(let i=0;i<maps.length;i++)if(maps[i].sources.length>1)throw new Error(`Transformation map ${i} must have exactly one source file.\nDid you specify these with the most recent transformation maps first?`);let tree=build(map,loader,"",0);for(let i=maps.length-1;i>=0;i--)tree=MapSource(maps[i],[tree]);return tree}function build(map,loader,importer,importerDepth){const{resolvedSources,sourcesContent}=map,depth=importerDepth+1;return MapSource(map,resolvedSources.map(((sourceFile,i)=>{const ctx={importer,depth,source:sourceFile||"",content:void 0},sourceMap=loader(ctx.source,ctx),{source,content}=ctx;return sourceMap?build(new traceMapping.TraceMap(sourceMap,source),loader,source,depth):OriginalSource(source,void 0!==content?content:sourcesContent?sourcesContent[i]:null)})))}class SourceMap{constructor(map,options){const out=options.decodedMappings?genMapping.toDecodedMap(map):genMapping.toEncodedMap(map);this.version=out.version,this.file=out.file,this.mappings=out.mappings,this.names=out.names,this.sourceRoot=out.sourceRoot,this.sources=out.sources,options.excludeContent||(this.sourcesContent=out.sourcesContent)}toString(){return JSON.stringify(this)}}function remapping(input,loader,options){const opts="object"==typeof options?options:{excludeContent:!!options,decodedMappings:!1},tree=buildSourceMapTree(input,loader);return new SourceMap(traceMappings(tree),opts)}return remapping}(__webpack_require__("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.20/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"),__webpack_require__("./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.3/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"))},"./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/config/files lazy recursive":module=>{function webpackEmptyAsyncContext(req){return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}))}webpackEmptyAsyncContext.keys=()=>[],webpackEmptyAsyncContext.resolve=webpackEmptyAsyncContext,webpackEmptyAsyncContext.id="./node_modules/.pnpm/@babel+core@7.23.2/node_modul
(function (root, factory) {
if (typeof define === "function" && define.amd) {
define(AMD_ARGUMENTS, factory);
} else if (typeof exports === "object") {
factory(COMMON_ARGUMENTS);
} else {
factory(BROWSER_ARGUMENTS);
}
})(UMD_ROOT, function (FACTORY_PARAMETERS) {
FACTORY_BODY
});
`(replacements);function buildGlobal(allowlist){const namespace=identifier("babelHelpers"),body=[],container=functionExpression(null,[identifier("global")],blockStatement(body)),tree=program([expressionStatement(callExpression(container,[conditionalExpression(binaryExpression("===",unaryExpression("typeof",identifier("global")),stringLiteral("undefined")),identifier("self"),identifier("global"))]))]);return body.push(variableDeclaration("var",[variableDeclarator(namespace,assignmentExpression("=",memberExpression(identifier("global"),namespace),objectExpression([])))])),buildHelpers(body,namespace,allowlist),tree}function buildModule(allowlist){const body=[],refs=buildHelpers(body,null,allowlist);return body.unshift(exportNamedDeclaration(null,Object.keys(refs).map((name=>exportSpecifier(cloneNode(refs[name]),identifier(name)))))),program(body,[],"module")}function buildUmd(allowlist){const namespace=identifier("babelHelpers"),body=[];return body.push(variableDeclaration("var",[variableDeclarator(namespace,identifier("global"))])),buildHelpers(body,namespace,allowlist),program([buildUmdWrapper({FACTORY_PARAMETERS:identifier("global"),BROWSER_ARGUMENTS:assignmentExpression("=",memberExpression(identifier("root"),namespace),objectExpression([])),COMMON_ARGUMENTS:identifier("exports"),AMD_ARGUMENTS:arrayExpression([stringLiteral("exports")]),FACTORY_BODY:body,UMD_ROOT:identifier("this")})])}function buildVar(allowlist){const namespace=identifier("babelHelpers"),body=[];body.push(variableDeclaration("var",[variableDeclarator(namespace,objectExpression([]))]));const tree=program(body);return buildHelpers(body,namespace,allowlist),body.push(expressionStatement(namespace)),tree}function buildHelpers(body,namespace,allowlist){const getHelperReference=name=>namespace?memberExpression(namespace,identifier(name)):identifier(`_${name}`),refs={};return helpers().list.forEach((function(name){if(allowlist&&allowlist.indexOf(name)<0)return;const ref=refs[name]=getHelperReference(name);helpers().ensure(name,_file.default);const{nodes}=helpers().get(name,getHelperReference,ref);body.push(...nodes)})),refs}},"./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/transform-ast.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.transformFromAst=void 0,exports.transformFromAstAsync=function(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.async)(...args)},exports.transformFromAstSync=function(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(...args)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/config/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/transformation/index.js"),_rewriteStackTrace=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js");const transformFromAstRunner=_gensync()((function*(ast,code,opts){const config=yield*(0,_index.default)(opts);if(null===config)return null;if(!ast)throw new Error("No AST given");return yield*(0,_index2.run)(config,code,ast)}));exports.transformFromAst=function(ast,code,optsOrCallback,maybeCallback){let opts,callback;if("function"==typeof optsOrCallback?(callback=optsOrCallback,opts=void 0):(opts=optsOrCallback,callback=maybeCallback),void 0===callback)return(0,_rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(ast,code,opts);(0,_rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.errback)(ast,code,opts,callback)}},"./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/transform-file.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1
${function(file){return file.addHelper("decorate")}(file)}(
${classDecorators||_core.types.nullLiteral()},
function (${initializeId}, ${superClass?_core.types.cloneNode(superId):null}) {
${node}
return { F: ${_core.types.cloneNode(node.id)}, d: ${definitions} };
},
${superClass}
)
`;isStrict||wrapperCall.arguments[1].body.directives.push(_core.types.directive(_core.types.directiveLiteral("use strict")));let replacement=wrapperCall,classPathDesc="arguments.1.body.body.0";isDeclaration&&(replacement=_core.template.statement.ast`let ${ref} = ${wrapperCall}`,classPathDesc="declarations.0.init."+classPathDesc);return{instanceNodes:[_core.template.statement.ast`${_core.types.cloneNode(initializeId)}(this)`],wrapClass:path=>(path.replaceWith(replacement),path.get(classPathDesc))}},exports.hasDecorators=function(node){return hasOwnDecorators(node)||node.body.body.some(hasOwnDecorators)},exports.hasOwnDecorators=hasOwnDecorators;var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/index.js"),_helperReplaceSupers=__webpack_require__("./node_modules/.pnpm/@babel+helper-replace-supers@7.22.20_@babel+core@7.23.2/node_modules/@babel/helper-replace-supers/lib/index.js"),_helperFunctionName=__webpack_require__("./node_modules/.pnpm/@babel+helper-function-name@7.23.0/node_modules/@babel/helper-function-name/lib/index.js");function hasOwnDecorators(node){var _node$decorators;return!(null==(_node$decorators=node.decorators)||!_node$decorators.length)}function prop(key,value){return value?_core.types.objectProperty(_core.types.identifier(key),value):null}function takeDecorators(node){let result;return node.decorators&&node.decorators.length>0&&(result=_core.types.arrayExpression(node.decorators.map((decorator=>decorator.expression)))),node.decorators=void 0,result}function getKey(node){return node.computed?node.key:_core.types.isIdentifier(node.key)?_core.types.stringLiteral(node.key.name):_core.types.stringLiteral(String(node.key.value))}},"./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.22.15_@babel+core@7.23.2/node_modules/@babel/helper-create-class-features-plugin/lib/features.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FEATURES=void 0,exports.enableFeature=function(file,feature,loose){hasFeature(file,feature)&&!canIgnoreLoose(file,feature)||(file.set(featuresKey,file.get(featuresKey)|feature),"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error"===loose?(setLoose(file,feature,!0),file.set(looseLowPriorityKey,file.get(looseLowPriorityKey)|feature)):"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"===loose?(setLoose(file,feature,!1),file.set(looseLowPriorityKey,file.get(looseLowPriorityKey)|feature)):setLoose(file,feature,loose));let resolvedLoose,higherPriorityPluginName;for(const[mask,name]of featuresSameLoose){if(!hasFeature(file,mask))continue;const loose=isLoose(file,mask);if(!canIgnoreLoose(file,mask)){if(resolvedLoose===!loose)throw new Error("'loose' mode configuration must be the same for @babel/plugin-transform-class-properties, @babel/plugin-transform-private-methods and @babel/plugin-transform-private-property-in-object (when they are enabled).");resolvedLoose=loose,higherPriorityPluginName=name}}if(void 0!==resolvedLoose)for(const[mask,name]of featuresSameLoose)hasFeature(file,mask)&&isLoose(file,mask)!==resolvedLoose&&(setLoose(file,mask,resolvedLoose),console.warn(`Though the "loose" option was set to "${!resolvedLoose}" in your @babel/preset-env config, it will not be used for ${name} since the "loose" mode option was set to "${resolvedLoose}" for ${higherPriorityPluginName}.\nThe "loose" option must be the same for @babel/plugin-transform-class-properties, @babel/plugin-transform-private-methods and @babel/plugin-transform-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding\n\t["${name}", { "loose": ${resolvedLoose} }]\nto the "plugins" section of your Babel config.`))},exports.isLoose=isLoose,exports.shouldTransform=function(path,file){let decoratorPath=null,publicFieldPath=null,privateFieldPath=null,privateMethodPath=null,staticBlockPath=null;(0,_decorators.hasOwnDecorators)(path.node)&&(decoratorPath=path.get("decorators.
Object.prototype.hasOwnProperty.call(${buildCheckInRHS(right,file)}, ${_core.types.cloneNode(id)})
`)}const{id,static:isStatic}=privateNamesMap.get(name);isStatic?path.replaceWith(_core.template.expression.ast`${buildCheckInRHS(right,file)} === ${_core.types.cloneNode(this.classRef)}`):path.replaceWith(_core.template.expression.ast`${_core.types.cloneNode(id)}.has(${buildCheckInRHS(right,file)})`)}}),privateNameHandlerSpec={memoise(member,count){const{scope}=member,{object}=member.node,memo=scope.maybeGenerateMemoised(object);memo&&this.memoiser.set(object,memo,count)},receiver(member){const{object}=member.node;return this.memoiser.has(object)?_core.types.cloneNode(this.memoiser.get(object)):_core.types.cloneNode(object)},get(member){const{classRef,privateNamesMap,file,innerBinding}=this,{name}=member.node.property.id,{id,static:isStatic,method:isMethod,methodId,getId,setId}=privateNamesMap.get(name),isAccessor=getId||setId;if(isStatic){const helperName=isMethod&&!isAccessor?"classStaticPrivateMethodGet":"classStaticPrivateFieldSpecGet";return unshadow(classRef.name,member.scope,innerBinding),_core.types.callExpression(file.addHelper(helperName),[this.receiver(member),_core.types.cloneNode(classRef),_core.types.cloneNode(id)])}if(isMethod){if(isAccessor){if(!getId&&setId){if(file.availableHelper("writeOnlyError"))return _core.types.sequenceExpression([this.receiver(member),_core.types.callExpression(file.addHelper("writeOnlyError"),[_core.types.stringLiteral(`#${name}`)])]);console.warn("@babel/helpers is outdated, update it to silence this warning.")}return _core.types.callExpression(file.addHelper("classPrivateFieldGet"),[this.receiver(member),_core.types.cloneNode(id)])}return _core.types.callExpression(file.addHelper("classPrivateMethodGet"),[this.receiver(member),_core.types.cloneNode(id),_core.types.cloneNode(methodId)])}return _core.types.callExpression(file.addHelper("classPrivateFieldGet"),[this.receiver(member),_core.types.cloneNode(id)])},boundGet(member){return this.memoise(member,1),_core.types.callExpression(_core.types.memberExpression(this.get(member),_core.types.identifier("bind")),[this.receiver(member)])},set(member,value){const{classRef,privateNamesMap,file}=this,{name}=member.node.property.id,{id,static:isStatic,method:isMethod,setId,getId}=privateNamesMap.get(name);if(isStatic){const helperName=isMethod&&!(getId||setId)?"classStaticPrivateMethodSet":"classStaticPrivateFieldSpecSet";return _core.types.callExpression(file.addHelper(helperName),[this.receiver(member),_core.types.cloneNode(classRef),_core.types.cloneNode(id),value])}return isMethod?setId?_core.types.callExpression(file.addHelper("classPrivateFieldSet"),[this.receiver(member),_core.types.cloneNode(id),value]):_core.types.sequenceExpression([this.receiver(member),value,_core.types.callExpression(file.addHelper("readOnlyError"),[_core.types.stringLiteral(`#${name}`)])]):_core.types.callExpression(file.addHelper("classPrivateFieldSet"),[this.receiver(member),_core.types.cloneNode(id),value])},destructureSet(member){const{classRef,privateNamesMap,file}=this,{name}=member.node.property.id,{id,static:isStatic}=privateNamesMap.get(name);if(isStatic){try{var helper=file.addHelper("classStaticPrivateFieldDestructureSet")}catch(_unused){throw new Error("Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \nplease update @babel/helpers to the latest version.")}return _core.types.memberExpression(_core.types.callExpression(helper,[this.receiver(member),_core.types.cloneNode(classRef),_core.types.cloneNode(id)]),_core.types.identifier("value"))}return _core.types.memberExpression(_core.types.callExpression(file.addHelper("classPrivateFieldDestructureSet"),[this.receiver(member),_core.types.cloneNode(id)]),_core.types.identifier("value"))},call(member,args){return this.memoise(member,1),(0,_helperOptimiseCallExpression.default)(this.get(member),this.receiver(member),args,!1)},optionalCall(member,args){return this.memoise(member,1),(0,_helperOptimiseCallExpression.default)(this.get(member),this.receiver(member),args,!0)},delete(){throw new Error("Internal Babel error: deleting private elements is a parsing error.")}},private
Object.defineProperty(${ref}, ${_core.types.cloneNode(id)}, {
// configurable is false by default
// enumerable is false by default
writable: true,
value: ${value}
});
`,prop)}function buildPrivateInstanceFieldInitSpec(ref,prop,privateNamesMap,state){const{id}=privateNamesMap.get(prop.node.key.id.name),value=prop.node.value||prop.scope.buildUndefinedNode();if(!state.availableHelper("classPrivateFieldInitSpec"))return inheritPropComments(_core.template.statement.ast`${_core.types.cloneNode(id)}.set(${ref}, {
// configurable is always false for private elements
// enumerable is always false for private elements
writable: true,
value: ${value},
})`,prop);const helper=state.addHelper("classPrivateFieldInitSpec");return inheritPropComments(_core.template.statement.ast`${helper}(
${_core.types.thisExpression()},
${_core.types.cloneNode(id)},
{
writable: true,
value: ${value}
},
)`,prop)}function buildPrivateStaticFieldInitSpec(prop,privateNamesMap){const privateName=privateNamesMap.get(prop.node.key.id.name),{id,getId,setId,initAdded}=privateName,isAccessor=getId||setId;if(!prop.isProperty()&&(initAdded||!isAccessor))return;if(isAccessor)return privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{initAdded:!0})),inheritPropComments(_core.template.statement.ast`
var ${_core.types.cloneNode(id)} = {
// configurable is false by default
// enumerable is false by default
// writable is false by default
get: ${getId?getId.name:prop.scope.buildUndefinedNode()},
set: ${setId?setId.name:prop.scope.buildUndefinedNode()}
}
`,prop);const value=prop.node.value||prop.scope.buildUndefinedNode();return inheritPropComments(_core.template.statement.ast`
var ${_core.types.cloneNode(id)} = {
// configurable is false by default
// enumerable is false by default
writable: true,
value: ${value}
};
`,prop)}function buildPrivateMethodInitLoose(ref,prop,privateNamesMap){const privateName=privateNamesMap.get(prop.node.key.id.name),{methodId,id,getId,setId,initAdded}=privateName;if(initAdded)return;if(methodId)return inheritPropComments(_core.template.statement.ast`
Object.defineProperty(${ref}, ${id}, {
// configurable is false by default
// enumerable is false by default
// writable is false by default
value: ${methodId.name}
});
`,prop);return getId||setId?(privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{initAdded:!0})),inheritPropComments(_core.template.statement.ast`
Object.defineProperty(${ref}, ${id}, {
// configurable is false by default
// enumerable is false by default
// writable is false by default
get: ${getId?getId.name:prop.scope.buildUndefinedNode()},
set: ${setId?setId.name:prop.scope.buildUndefinedNode()}
});
`,prop)):void 0}function buildPrivateInstanceMethodInitSpec(ref,prop,privateNamesMap,state){const privateName=privateNamesMap.get(prop.node.key.id.name),{getId,setId,initAdded}=privateName;if(initAdded)return;return getId||setId?function(ref,prop,privateNamesMap,state){const privateName=privateNamesMap.get(prop.node.key.id.name),{id,getId,setId}=privateName;if(privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{initAdded:!0})),!state.availableHelper("classPrivateFieldInitSpec"))return inheritPropComments(_core.template.statement.ast`
${id}.set(${ref}, {
get: ${getId?getId.name:prop.scope.buildUndefinedNode()},
set: ${setId?setId.name:prop.scope.buildUndefinedNode()}
});
`,prop);const helper=state.addHelper("classPrivateFieldInitSpec");return inheritPropComments(_core.template.statement.ast`${helper}(
${_core.types.thisExpression()},
${_core.types.cloneNode(id)},
{
get: ${getId?getId.name:prop.scope.buildUndefinedNode()},
set: ${setId?setId.name:prop.scope.buildUndefinedNode()}
},
)`,prop)}(ref,prop,privateNamesMap,state):function(ref,prop,privateNamesMap,state){const privateName=privateNamesMap.get(prop.node.key.id.name),{id}=privateName;if(!state.availableHelper("classPrivateMethodInitSpec"))return inheritPropComments(_core.template.statement.ast`${id}.add(${ref})`,prop);const helper=state.addHelper("classPrivateMethodInitSpec");return inheritPropComments(_core.template.statement.ast`${helper}(
${_core.types.thisExpression()},
${_core.types.cloneNode(id)}
)`,prop)}(ref,prop,privateNamesMap,state)}function buildPublicFieldInitLoose(ref,prop){const{key,computed}=prop.node,value=prop.node.value||prop.scope.buildUndefinedNode();return inheritPropComments(_core.types.expressionStatement(_core.types.assignmentExpression("=",_core.types.memberExpression(ref,key,computed||_core.types.isLiteral(key)),value)),prop)}function buildPublicFieldInitSpec(ref,prop,state){const{key,computed}=prop.node,value=prop.node.value||prop.scope.buildUndefinedNode();return inheritPropComments(_core.types.expressionStatement(_core.types.callExpression(state.addHelper("defineProperty"),[ref,computed||_core.types.isLiteral(key)?key:_core.types.stringLiteral(key.name),value])),prop)}function buildPrivateStaticMethodInitLoose(ref,prop,state,privateNamesMap){const privateName=privateNamesMap.get(prop.node.key.id.name),{id,methodId,getId,setId,initAdded}=privateName;if(initAdded)return;return getId||setId?(privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{initAdded:!0})),inheritPropComments(_core.template.statement.ast`
Object.defineProperty(${ref}, ${id}, {
// configurable is false by default
// enumerable is false by default
// writable is false by default
get: ${getId?getId.name:prop.scope.buildUndefinedNode()},
set: ${setId?setId.name:prop.scope.buildUndefinedNode()}
})
`,prop)):inheritPropComments(_core.template.statement.ast`
Object.defineProperty(${ref}, ${id}, {
// configurable is false by default
// enumerable is false by default
// writable is false by default
value: ${methodId.name}
});
`,prop)}function buildPrivateMethodDeclaration(prop,privateNamesMap,privateFieldsAsProperties=!1){const privateName=privateNamesMap.get(prop.node.key.id.name),{id,methodId,getId,setId,getterDeclared,setterDeclared,static:isStatic}=privateName,{params,body,generator,async}=prop.node,isGetter=getId&&!getterDeclared&&0===params.length,isSetter=setId&&!setterDeclared&&params.length>0;let declId=methodId;return isGetter?(privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{getterDeclared:!0})),declId=getId):isSetter?(privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{setterDeclared:!0})),declId=setId):isStatic&&!privateFieldsAsProperties&&(declId=id),inheritPropComments(_core.types.functionDeclaration(_core.types.cloneNode(declId),params,body,generator,async),prop)}const thisContextVisitor=_core.traverse.visitors.merge([{UnaryExpression(path){const{node}=path;if("delete"===node.operator){const argument=(0,_helperSkipTransparentExpressionWrappers.skipTransparentExprWrapperNodes)(node.argument);_core.types.isThisExpression(argument)&&path.replaceWith(_core.types.booleanLiteral(!0))}},ThisExpression(path,state){state.needsClassRef=!0,path.replaceWith(_core.types.cloneNode(state.classRef))},MetaProperty(path){const{node,scope}=path;"new"===node.meta.name&&"target"===node.property.name&&path.replaceWith(scope.buildUndefinedNode())}},_helperEnvironmentVisitor.default]),innerReferencesVisitor={ReferencedIdentifier(path,state){path.scope.bindingIdentifierEquals(path.node.name,state.innerBinding)&&(state.needsClassRef=!0,path.node.name=state.classRef.name)}};function replaceThisContext(path,ref,innerBindingRef){var _state$classRef;const state={classRef:ref,needsClassRef:!1,innerBinding:innerBindingRef};return path.isMethod()||path.traverse(thisContextVisitor,state),null!=innerBindingRef&&null!=(_state$classRef=state.classRef)&&_state$classRef.name&&state.classRef.name!==innerBindingRef.name&&path.traverse(innerReferencesVisitor,state),state.needsClassRef}function isNameOrLength({key,computed}){return"Identifier"===key.type?!computed&&("name"===key.name||"length"===key.name):"StringLiteral"===key.type&&("name"===key.value||"length"===key.value)}function inheritPropComments(node,prop){return _core.types.inheritLeadingComments(node,prop.node),_core.types.inheritInnerComments(node,prop.node),node}},"./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.22.15_@babel+core@7.23.2/node_modules/@babel/helper-create-class-features-plugin/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"FEATURES",{enumerable:!0,get:function(){return _features.FEATURES}}),Object.defineProperty(exports,"buildCheckInRHS",{enumerable:!0,get:function(){return _fields.buildCheckInRHS}}),exports.createClassFeaturePlugin=function({name,feature,loose,manipulateOptions,api,inherits}){null!=api||(api={assumption:()=>{}});const setPublicClassFields=api.assumption("setPublicClassFields"),privateFieldsAsSymbols=api.assumption("privateFieldsAsSymbols"),privateFieldsAsProperties=api.assumption("privateFieldsAsProperties"),constantSuper=api.assumption("constantSuper"),noDocumentAll=api.assumption("noDocumentAll");if(privateFieldsAsProperties&&privateFieldsAsSymbols)throw new Error('Cannot enable both the "privateFieldsAsProperties" and "privateFieldsAsSymbols" assumptions as the same time.');const privateFieldsAsSymbolsOrProperties=privateFieldsAsProperties||privateFieldsAsSymbols;if(!0===loose){const explicit=[];void 0!==setPublicClassFields&&explicit.push('"setPublicClassFields"'),void 0!==privateFieldsAsProperties&&explicit.push('"privateFieldsAsProperties"'),void 0!==privateFieldsAsSymbols&&explicit.push('"privateFieldsAsSymbols"'),0!==explicit.length&&console.warn(`[${name}]: You are using the "loose: true" option and you are explicitly setting a value for the ${explicit.join(" and ")} assumption${explicit.length>1?"s":""}. The "loose" option can cause incompatibilities with the other class features
Promise.resolve().then(() => ${builder(specifier)})
`:builder(specifier);const specifierToString=_core.types.isTemplateLiteral(specifier)?_core.types.identifier("specifier"):_core.types.templateLiteral([_core.types.templateElement({raw:""}),_core.types.templateElement({raw:""})],[_core.types.identifier("specifier")]);return deferToThen?_core.template.expression.ast`
(specifier =>
new Promise(r => r(${specifierToString}))
.then(s => ${builder(_core.types.identifier("s"))})
)(${specifier})
`:wrapWithPromise?_core.template.expression.ast`
(specifier =>
new Promise(r => r(${builder(specifierToString)}))
)(${specifier})
`:_core.template.expression.ast`
(specifier => ${builder(specifierToString)})(${specifier})
`};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/index.js");exports.getDynamicImportSource=function(node){const[source]=node.arguments;return _core.types.isStringLiteral(source)||_core.types.isTemplateLiteral(source)?source:_core.template.expression.ast`\`\${${source}}\``}},"./node_modules/.pnpm/@babel+helper-module-transforms@7.23.0_@babel+core@7.23.2/node_modules/@babel/helper-module-transforms/lib/get-module-name.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=getModuleName;{const originalGetModuleName=getModuleName;exports.default=getModuleName=function(rootOpts,pluginOpts){var _pluginOpts$moduleId,_pluginOpts$moduleIds,_pluginOpts$getModule,_pluginOpts$moduleRoo;return originalGetModuleName(rootOpts,{moduleId:null!=(_pluginOpts$moduleId=pluginOpts.moduleId)?_pluginOpts$moduleId:rootOpts.moduleId,moduleIds:null!=(_pluginOpts$moduleIds=pluginOpts.moduleIds)?_pluginOpts$moduleIds:rootOpts.moduleIds,getModuleId:null!=(_pluginOpts$getModule=pluginOpts.getModuleId)?_pluginOpts$getModule:rootOpts.getModuleId,moduleRoot:null!=(_pluginOpts$moduleRoo=pluginOpts.moduleRoot)?_pluginOpts$moduleRoo:rootOpts.moduleRoot})}}function getModuleName(rootOpts,pluginOpts){const{filename,filenameRelative=filename,sourceRoot=pluginOpts.moduleRoot}=rootOpts,{moduleId,moduleIds=!!moduleId,getModuleId,moduleRoot=sourceRoot}=pluginOpts;if(!moduleIds)return null;if(null!=moduleId&&!getModuleId)return moduleId;let moduleName=null!=moduleRoot?moduleRoot+"/":"";if(filenameRelative){const sourceRootReplacer=null!=sourceRoot?new RegExp("^"+sourceRoot+"/?"):"";moduleName+=filenameRelative.replace(sourceRootReplacer,"").replace(/\.(\w*?)$/,"")}return moduleName=moduleName.replace(/\\/g,"/"),getModuleId&&getModuleId(moduleName)||moduleName}},"./node_modules/.pnpm/@babel+helper-module-transforms@7.23.0_@babel+core@7.23.2/node_modules/@babel/helper-module-transforms/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"buildDynamicImport",{enumerable:!0,get:function(){return _dynamicImport.buildDynamicImport}}),exports.buildNamespaceInitStatements=function(metadata,sourceMetadata,constantReexports=!1,wrapReference=Lazy.wrapReference){var _wrapReference;const statements=[],srcNamespaceId=identifier(sourceMetadata.name);for(const localName of sourceMetadata.importsNamespace)localName!==sourceMetadata.name&&statements.push(_core.template.statement`var NAME = SOURCE;`({NAME:localName,SOURCE:cloneNode(srcNamespaceId)}));const srcNamespace=null!=(_wrapReference=wrapReference(srcNamespaceId,sourceMetadata.wrap))?_wrapReference:srcNamespaceId;constantReexports&&statements.push(...buildReexportsFromMeta(metadata,sourceMetadata,!0,wrapReference));for(const exportName of sourceMetadata.reexportNamespace)statements.push((_core.types.isIdentifier(srcNamespace)?_core.template.statement`EXPORTS.NAME = NAMESPACE;`:_core.template.statement`
Object.defineProperty(EXPORTS, "NAME", {
enumerable: true,
get: function() {
return NAMESPACE;
}
});
`)({EXPORTS:metadata.exportName,NAME:exportName,NAMESPACE:cloneNode(srcNamespace)}));if(sourceMetadata.reexportAll){const statement=function(metadata,namespace,constantReexports){return(constantReexports?_core.template.statement`
Object.keys(NAMESPACE).forEach(function(key) {
if (key === "default" || key === "__esModule") return;
VERIFY_NAME_LIST;
if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
EXPORTS[key] = NAMESPACE[key];
});
`:_core.template.statement`
Object.keys(NAMESPACE).forEach(function(key) {
if (key === "default" || key === "__esModule") return;
VERIFY_NAME_LIST;
if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
Object.defineProperty(EXPORTS, key, {
enumerable: true,
get: function() {
return NAMESPACE[key];
},
});
});
`)({NAMESPACE:namespace,EXPORTS:metadata.exportName,VERIFY_NAME_LIST:metadata.exportNameListName?_core.template`
if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;
`({EXPORTS_LIST:metadata.exportNameListName}):null})}(metadata,cloneNode(srcNamespace),constantReexports);statement.loc=sourceMetadata.reexportAll.loc,statements.push(statement)}return statements},exports.ensureStatementsHoisted=function(statements){statements.forEach((header=>{header._blockHoist=3}))},Object.defineProperty(exports,"getModuleName",{enumerable:!0,get:function(){return _getModuleName.default}}),Object.defineProperty(exports,"hasExports",{enumerable:!0,get:function(){return _normalizeAndLoadMetadata.hasExports}}),Object.defineProperty(exports,"isModule",{enumerable:!0,get:function(){return _helperModuleImports.isModule}}),Object.defineProperty(exports,"isSideEffectImport",{enumerable:!0,get:function(){return _normalizeAndLoadMetadata.isSideEffectImport}}),exports.rewriteModuleStatementsAndPrepareHeader=function(path,{exportName,strict,allowTopLevelThis,strictMode,noInterop,importInterop=noInterop?"none":"babel",lazy,getWrapperPayload=Lazy.toGetWrapperPayload(null!=lazy&&lazy),wrapReference=Lazy.wrapReference,esNamespaceOnly,filename,constantReexports=arguments[1].loose,enumerableModuleMeta=arguments[1].loose,noIncompleteNsImportDetection}){(0,_normalizeAndLoadMetadata.validateImportInteropOption)(importInterop),_assert((0,_helperModuleImports.isModule)(path),"Cannot process module statements in a script"),path.node.sourceType="script";const meta=(0,_normalizeAndLoadMetadata.default)(path,exportName,{importInterop,initializeReexports:constantReexports,getWrapperPayload,esNamespaceOnly,filename});allowTopLevelThis||(0,_rewriteThis.default)(path);if((0,_rewriteLiveReferences.default)(path,meta,wrapReference),!1!==strictMode){const hasStrict=path.node.directives.some((directive=>"use strict"===directive.value.value));hasStrict||path.unshiftContainer("directives",directive(directiveLiteral("use strict")))}const headers=[];(0,_normalizeAndLoadMetadata.hasExports)(meta)&&!strict&&headers.push(function(metadata,enumerableModuleMeta=!1){return(enumerableModuleMeta?_core.template.statement`
EXPORTS.__esModule = true;
`:_core.template.statement`
Object.defineProperty(EXPORTS, "__esModule", {
value: true,
});
`)({EXPORTS:metadata.exportName})}(meta,enumerableModuleMeta));const nameList=function(programPath,metadata){const exportedVars=Object.create(null);for(const data of metadata.local.values())for(const name of data.names)exportedVars[name]=!0;let hasReexport=!1;for(const data of metadata.source.values()){for(const exportName of data.reexports.keys())exportedVars[exportName]=!0;for(const exportName of data.reexportNamespace)exportedVars[exportName]=!0;hasReexport=hasReexport||!!data.reexportAll}if(!hasReexport||0===Object.keys(exportedVars).length)return null;const name=programPath.scope.generateUidIdentifier("exportNames");return delete exportedVars.default,{name:name.name,statement:variableDeclaration("var",[variableDeclarator(name,valueToNode(exportedVars))])}}(path,meta);nameList&&(meta.exportNameListName=nameList.name,headers.push(nameList.statement));return headers.push(...function(programPath,metadata,wrapReference,constantReexports=!1,noIncompleteNsImportDetection=!1){const initStatements=[];for(const[localName,data]of metadata.local)if("import"===data.kind);else if("hoisted"===data.kind)initStatements.push([data.names[0],buildInitStatement(metadata,data.names,identifier(localName))]);else if(!noIncompleteNsImportDetection)for(const exportName of data.names)initStatements.push([exportName,null]);for(const data of metadata.source.values()){if(!constantReexports){const reexportsStatements=buildReexportsFromMeta(metadata,data,!1,wrapReference),reexports=[...data.reexports.keys()];for(let i=0;i<reexportsStatements.length;i++)initStatements.push([reexports[i],reexportsStatements[i]])}if(!noIncompleteNsImportDetection)for(const exportName of data.reexportNamespace)initStatements.push([exportName,null])}initStatements.sort((([a],[b])=>a<b?-1:b<a?1:0));const results=[];if(noIncompleteNsImportDetection)for(const[,initStatement]of initStatements)results.push(initStatement);else{const chunkSize=100;for(let i=0;i<initStatements.length;i+=chunkSize){let uninitializedExportNames=[];for(let j=0;j<chunkSize&&i+j<initStatements.length;j++){const[exportName,initStatement]=initStatements[i+j];null!==initStatement?(uninitializedExportNames.length>0&&(results.push(buildInitStatement(metadata,uninitializedExportNames,programPath.scope.buildUndefinedNode())),uninitializedExportNames=[]),results.push(initStatement)):uninitializedExportNames.push(exportName)}uninitializedExportNames.length>0&&results.push(buildInitStatement(metadata,uninitializedExportNames,programPath.scope.buildUndefinedNode()))}}return results}(path,meta,wrapReference,constantReexports,noIncompleteNsImportDetection)),{meta,headers}},Object.defineProperty(exports,"rewriteThis",{enumerable:!0,get:function(){return _rewriteThis.default}}),exports.wrapInterop=function(programPath,expr,type){if("none"===type)return null;if("node-namespace"===type)return callExpression(programPath.hub.addHelper("interopRequireWildcard"),[expr,booleanLiteral(!0)]);if("node-default"===type)return null;let helper;if("default"===type)helper="interopRequireDefault";else{if("namespace"!==type)throw new Error(`Unknown interop: ${type}`);helper="interopRequireWildcard"}return callExpression(programPath.hub.addHelper(helper),[expr])};var _assert=__webpack_require__("assert"),_core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/index.js"),_helperModuleImports=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-imports@7.22.15/node_modules/@babel/helper-module-imports/lib/index.js"),_rewriteThis=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.23.0_@babel+core@7.23.2/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js"),_rewriteLiveReferences=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.23.0_@babel+core@7.23.2/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js"),_normalizeAndLoadMetadata=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.23.0_@babel+core@7.23.2/node_modules/@babel/helper-module-transforms/lib/normalize-and-lo
Object.defineProperty(EXPORTS, "EXPORT_NAME", {
enumerable: true,
get: function() {
return NAMESPACE_IMPORT;
},
});
`};function buildReexportsFromMeta(meta,metadata,constantReexports,wrapReference){var _wrapReference2;let namespace=identifier(metadata.name);namespace=null!=(_wrapReference2=wrapReference(namespace,metadata.wrap))?_wrapReference2:namespace;const{stringSpecifiers}=meta;return Array.from(metadata.reexports,(([exportName,importName])=>{let NAMESPACE_IMPORT=cloneNode(namespace);"default"===importName&&"node-default"===metadata.interop||(NAMESPACE_IMPORT=stringSpecifiers.has(importName)?memberExpression(NAMESPACE_IMPORT,stringLiteral(importName),!0):memberExpression(NAMESPACE_IMPORT,identifier(importName)));const astNodes={EXPORTS:meta.exportName,EXPORT_NAME:exportName,NAMESPACE_IMPORT};return constantReexports||isIdentifier(NAMESPACE_IMPORT)?stringSpecifiers.has(exportName)?ReexportTemplate.constantComputed(astNodes):ReexportTemplate.constant(astNodes):ReexportTemplate.spec(astNodes)}))}const InitTemplate={computed:_core.template.expression`EXPORTS["NAME"] = VALUE`,default:_core.template.expression`EXPORTS.NAME = VALUE`};function buildInitStatement(metadata,exportNames,initExpr){const{stringSpecifiers,exportName:EXPORTS}=metadata;return expressionStatement(exportNames.reduce(((acc,exportName)=>{const params={EXPORTS,NAME:exportName,VALUE:acc};return stringSpecifiers.has(exportName)?InitTemplate.computed(params):InitTemplate.default(params)}),initExpr))}},"./node_modules/.pnpm/@babel+helper-module-transforms@7.23.0_@babel+core@7.23.2/node_modules/@babel/helper-module-transforms/lib/lazy-modules.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.toGetWrapperPayload=function(lazy){return(source,metadata)=>{if(!1===lazy)return null;if((0,_normalizeAndLoadMetadata.isSideEffectImport)(metadata)||metadata.reexportAll)return null;if(!0===lazy)return/\./.test(source)?null:"lazy";if(Array.isArray(lazy))return-1===lazy.indexOf(source)?null:"lazy";if("function"==typeof lazy)return lazy(source)?"lazy":null;throw new Error(".lazy must be a boolean, string array, or function")}},exports.wrapReference=function(ref,payload){return"lazy"===payload?_core.types.callExpression(ref,[]):null};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/index.js"),_normalizeAndLoadMetadata=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.23.0_@babel+core@7.23.2/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js")},"./node_modules/.pnpm/@babel+helper-module-transforms@7.23.0_@babel+core@7.23.2/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(programPath,exportName,{importInterop,initializeReexports=!1,getWrapperPayload,esNamespaceOnly=!1,filename}){exportName||(exportName=programPath.scope.generateUidIdentifier("exports").name);const stringSpecifiers=new Set;!function(programPath){programPath.get("body").forEach((child=>{child.isExportDefaultDeclaration()&&(0,_helperSplitExportDeclaration.default)(child)}))}(programPath);const{local,sources,hasExports}=function(programPath,{getWrapperPayload,initializeReexports},stringSpecifiers){const localData=function(programPath,initializeReexports,stringSpecifiers){const bindingKindLookup=new Map;programPath.get("body").forEach((child=>{let kind;if(child.isImportDeclaration())kind="import";else{if(child.isExportDefaultDeclaration()&&(child=child.get("declaration")),child.isExportNamedDeclaration())if(child.node.declaration)child=child.get("declaration");else if(initializeReexports&&child.node.source&&child.get("source").isStringLiteral())return void child.get("specifiers").forEach((spec=>{assertExportSpecifier(spec),bindingKindLookup.set(spec.get("local").node.name,"block")}));if(child.isFunctionDeclaration())kind="hoisted";else if(child.isClassDeclaration())kind="block";else if(child.isVariableDeclaration({kind:"var"}))kind="var";else{if(!child.isVar
(function() {
throw new Error('"' + '${localName}' + '" is read-only.');
})()
`,rewriteReferencesVisitor={ReferencedIdentifier(path){const{seen,buildImportReference,scope,imported,requeueInParent}=this;if(seen.has(path.node))return;seen.add(path.node);const localName=path.node.name,importData=imported.get(localName);if(importData){if(function(path){do{switch(path.parent.type){case"TSTypeAnnotation":case"TSTypeAliasDeclaration":case"TSTypeReference":case"TypeAnnotation":case"TypeAlias":return!0;case"ExportSpecifier":return"type"===path.parentPath.parent.exportKind;default:if(path.parentPath.isStatement()||path.parentPath.isExpression())return!1}}while(path=path.parentPath)}(path))throw path.buildCodeFrameError(`Cannot transform the imported binding "${localName}" since it's also used in a type annotation. Please strip type annotations using @babel/preset-typescript or @babel/preset-flow.`);const localBinding=path.scope.getBinding(localName);if(scope.getBinding(localName)!==localBinding)return;const ref=buildImportReference(importData,path.node);if(ref.loc=path.node.loc,(path.parentPath.isCallExpression({callee:path.node})||path.parentPath.isOptionalCallExpression({callee:path.node})||path.parentPath.isTaggedTemplateExpression({tag:path.node}))&&isMemberExpression(ref))path.replaceWith(sequenceExpression([numericLiteral(0),ref]));else if(path.isJSXIdentifier()&&isMemberExpression(ref)){const{object,property}=ref;path.replaceWith(jsxMemberExpression(jsxIdentifier(object.name),jsxIdentifier(property.name)))}else path.replaceWith(ref);requeueInParent(path),path.skip()}},UpdateExpression(path){const{scope,seen,imported,exported,requeueInParent,buildImportReference}=this;if(seen.has(path.node))return;seen.add(path.node);const arg=path.get("argument");if(arg.isMemberExpression())return;const update=path.node;if(arg.isIdentifier()){const localName=arg.node.name;if(scope.getBinding(localName)!==path.scope.getBinding(localName))return;const exportedNames=exported.get(localName),importData=imported.get(localName);if((null==exportedNames?void 0:exportedNames.length)>0||importData)if(importData)path.replaceWith(assignmentExpression(update.operator[0]+"=",buildImportReference(importData,arg.node),buildImportThrow(localName)));else if(update.prefix)path.replaceWith(buildBindingExportAssignmentExpression(this.metadata,exportedNames,cloneNode(update),path.scope));else{const ref=scope.generateDeclaredUidIdentifier(localName);path.replaceWith(sequenceExpression([assignmentExpression("=",cloneNode(ref),cloneNode(update)),buildBindingExportAssignmentExpression(this.metadata,exportedNames,identifier(localName),path.scope),cloneNode(ref)]))}}requeueInParent(path),path.skip()},AssignmentExpression:{exit(path){const{scope,seen,imported,exported,requeueInParent,buildImportReference}=this;if(seen.has(path.node))return;seen.add(path.node);const left=path.get("left");if(!left.isMemberExpression())if(left.isIdentifier()){const localName=left.node.name;if(scope.getBinding(localName)!==path.scope.getBinding(localName))return;const exportedNames=exported.get(localName),importData=imported.get(localName);if((null==exportedNames?void 0:exportedNames.length)>0||importData){_assert("="===path.node.operator,"Path was not simplified");const assignment=path.node;importData&&(assignment.left=buildImportReference(importData,left.node),assignment.right=sequenceExpression([assignment.right,buildImportThrow(localName)])),path.replaceWith(buildBindingExportAssignmentExpression(this.metadata,exportedNames,assignment,path.scope)),requeueInParent(path)}}else{const ids=left.getOuterBindingIdentifiers(),programScopeIds=Object.keys(ids).filter((localName=>scope.getBinding(localName)===path.scope.getBinding(localName))),id=programScopeIds.find((localName=>imported.has(localName)));id&&(path.node.right=sequenceExpression([path.node.right,buildImportThrow(id)]));const items=[];if(programScopeIds.forEach((localName=>{const exportedNames=exported.get(localName)||[];exportedNames.length>0&&items.push(buildBindingExportAssignmentExpression(this.metadata,exportedNames,identifier(localName),path.scope))})),items.length>0){let node=sequenceExpression(items
function () { throw new ReferenceError("'delete super[expr]' is invalid"); }()
`]):_core.template.expression.ast`
function () { throw new ReferenceError("'delete super.prop' is invalid"); }()
`}},looseHandlers=Object.assign({},specHandlers,{prop(superMember){const{property}=superMember.node;return this.memoiser.has(property)?cloneNode(this.memoiser.get(property)):cloneNode(property)},get(superMember){const{isStatic,getSuperRef}=this,{computed}=superMember.node,prop=this.prop(superMember);let object;var _getSuperRef,_getSuperRef2;isStatic?object=null!=(_getSuperRef=getSuperRef())?_getSuperRef:memberExpression(identifier("Function"),identifier("prototype")):object=memberExpression(null!=(_getSuperRef2=getSuperRef())?_getSuperRef2:identifier("Object"),identifier("prototype"));return memberExpression(object,prop,computed)},set(superMember,value){const{computed}=superMember.node,prop=this.prop(superMember);return assignmentExpression("=",memberExpression(thisExpression(),prop,computed),value)},destructureSet(superMember){const{computed}=superMember.node,prop=this.prop(superMember);return memberExpression(thisExpression(),prop,computed)},call(superMember,args){return(0,_helperOptimiseCallExpression.default)(this.get(superMember),thisExpression(),args,!1)},optionalCall(superMember,args){return(0,_helperOptimiseCallExpression.default)(this.get(superMember),thisExpression(),args,!0)}});exports.default=class{constructor(opts){var _opts$constantSuper;const path=opts.methodPath;this.methodPath=path,this.isDerivedConstructor=path.isClassMethod({kind:"constructor"})&&!!opts.superRef,this.isStatic=path.isObjectMethod()||path.node.static||(null==path.isStaticBlock?void 0:path.isStaticBlock()),this.isPrivateMethod=path.isPrivate()&&path.isMethod(),this.file=opts.file,this.constantSuper=null!=(_opts$constantSuper=opts.constantSuper)?_opts$constantSuper:opts.isLoose,this.opts=opts}getObjectRef(){return cloneNode(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){return this.opts.superRef?cloneNode(this.opts.superRef):this.opts.getSuperRef?cloneNode(this.opts.getSuperRef()):void 0}replace(){this.opts.refToPreserve&&this.methodPath.traverse(unshadowSuperBindingVisitor,{refName:this.opts.refToPreserve.name});const handler=this.constantSuper?looseHandlers:specHandlers;(0,_helperMemberExpressionToFunctions.default)(this.methodPath,visitor,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this),boundGet:handler.get},handler))}}},"./node_modules/.pnpm/@babel+helper-simple-access@7.22.5/node_modules/@babel/helper-simple-access/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(path,bindingNames){var _arguments$;path.traverse(simpleAssignmentVisitor,{scope:path.scope,bindingNames,seen:new WeakSet,includeUpdateExpression:null==(_arguments$=arguments[2])||_arguments$})};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.23.0/node_modules/@babel/types/lib/index.js");const{LOGICAL_OPERATORS,assignmentExpression,binaryExpression,cloneNode,identifier,logicalExpression,numericLiteral,sequenceExpression,unaryExpression}=_t,simpleAssignmentVisitor={AssignmentExpression:{exit(path){const{scope,seen,bindingNames}=this;if("="===path.node.operator)return;if(seen.has(path.node))return;seen.add(path.node);const left=path.get("left");if(!left.isIdentifier())return;const localName=left.node.name;if(!bindingNames.has(localName))return;if(scope.getBinding(localName)!==path.scope.getBinding(localName))return;const operator=path.node.operator.slice(0,-1);LOGICAL_OPERATORS.includes(operator)?path.replaceWith(logicalExpression(operator,path.node.left,assignmentExpression("=",cloneNode(path.node.left),path.node.right))):(path.node.right=binaryExpression(operator,cloneNode(path.node.left),path.node.right),path.node.operator="=")}}};simpleAssignmentVisitor.UpdateExpression={exit(path){if(!this.includeUpdateExpression)return;const{scope,bindingNames}=this,arg=path.get("argument");if(!arg.isIdentifier())return;const localName=arg.node.na
export default function _AwaitValue(value) {
this.wrapped = value;
}
`,helpers.wrapAsyncGenerator=helper("7.0.0-beta.0")`
import AsyncGenerator from "AsyncGenerator";
export default function _wrapAsyncGenerator(fn) {
return function () {
return new AsyncGenerator(fn.apply(this, arguments));
};
}
`,helpers.asyncToGenerator=helper("7.0.0-beta.0")`
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
export default function _asyncToGenerator(fn) {
return function () {
var self = this, args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
`,helpers.classCallCheck=helper("7.0.0-beta.0")`
export default function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
`,helpers.createClass=helper("7.0.0-beta.0")`
import toPropertyKey from "toPropertyKey";
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i ++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
}
}
export default function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", { writable: false });
return Constructor;
}
`,helpers.defineEnumerableProperties=helper("7.0.0-beta.0")`
export default function _defineEnumerableProperties(obj, descs) {
for (var key in descs) {
var desc = descs[key];
desc.configurable = desc.enumerable = true;
if ("value" in desc) desc.writable = true;
Object.defineProperty(obj, key, desc);
}
// Symbols are not enumerated over by for-in loops. If native
// Symbols are available, fetch all of the descs object's own
// symbol properties and define them on our target object too.
if (Object.getOwnPropertySymbols) {
var objectSymbols = Object.getOwnPropertySymbols(descs);
for (var i = 0; i < objectSymbols.length; i++) {
var sym = objectSymbols[i];
var desc = descs[sym];
desc.configurable = desc.enumerable = true;
if ("value" in desc) desc.writable = true;
Object.defineProperty(obj, sym, desc);
}
}
return obj;
}
`,helpers.defaults=helper("7.0.0-beta.0")`
export default function _defaults(obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = Object.getOwnPropertyDescriptor(defaults, key);
if (value && value.configurable && obj[key] === undefined) {
Object.defineProperty(obj, key, value);
}
}
return obj;
}
`,helpers.defineProperty=helper("7.0.0-beta.0")`
import toPropertyKey from "toPropertyKey";
export default function _defineProperty(obj, key, value) {
key = toPropertyKey(key);
// Shortcircuit the slow defineProperty path when possible.
// We are trying to avoid issues where setters defined on the
// prototype cause side effects under the fast path of simple
// assignment. By checking for existence of the property with
// the in operator, we can optimize most of this overhead away.
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
`,helpers.extends=helper("7.0.0-beta.0")`
export default function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
`,helpers.objectSpread=helper("7.0.0-beta.0")`
import defineProperty from "defineProperty";
export default function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = (arguments[i] != null) ? Object(arguments[i]) : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === 'function') {
ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function(sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function(key) {
defineProperty(target, key, source[key]);
});
}
return target;
}
`,helpers.inherits=helper("7.0.0-beta.0")`
import setPrototypeOf from "setPrototypeOf";
export default function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
// We can't use defineProperty to set the prototype in a single step because it
// doesn't work in Chrome <= 36. https://github.com/babel/babel/issues/14056
// V8 bug: https://bugs.chromium.org/p/v8/issues/detail?id=3334
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
Object.defineProperty(subClass, "prototype", { writable: false });
if (superClass) setPrototypeOf(subClass, superClass);
}
`,helpers.inheritsLoose=helper("7.0.0-beta.0")`
import setPrototypeOf from "setPrototypeOf";
export default function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
setPrototypeOf(subClass, superClass);
}
`,helpers.getPrototypeOf=helper("7.0.0-beta.0")`
export default function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf
? Object.getPrototypeOf.bind()
: function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
`,helpers.setPrototypeOf=helper("7.0.0-beta.0")`
export default function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf
? Object.setPrototypeOf.bind()
: function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
`,helpers.isNativeReflectConstruct=helper("7.9.0")`
export default function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
// core-js@3
if (Reflect.construct.sham) return false;
// Proxy can't be polyfilled. Every browser implemented
// proxies before or at the same time as Reflect.construct,
// so if they support Proxy they also support Reflect.construct.
if (typeof Proxy === "function") return true;
// Since Reflect.construct can't be properly polyfilled, some
// implementations (e.g. core-js@2) don't set the correct internal slots.
// Those polyfills don't allow us to subclass built-ins, so we need to
// use our fallback implementation.
try {
// If the internal slots aren't set, this throws an error similar to
// TypeError: this is not a Boolean object.
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
return true;
} catch (e) {
return false;
}
}
`,helpers.construct=helper("7.0.0-beta.0")`
import setPrototypeOf from "setPrototypeOf";
import isNativeReflectConstruct from "isNativeReflectConstruct";
export default function _construct(Parent, args, Class) {
if (isNativeReflectConstruct()) {
_construct = Reflect.construct.bind();
} else {
// NOTE: If Parent !== Class, the correct __proto__ is set *after*
// calling the constructor.
_construct = function _construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) setPrototypeOf(instance, Class.prototype);
return instance;
};
}
// Avoid issues with Class being present but undefined when it wasn't
// present in the original call.
return _construct.apply(null, arguments);
}
`,helpers.isNativeFunction=helper("7.0.0-beta.0")`
export default function _isNativeFunction(fn) {
// Note: This function returns "true" for core-js functions.
try {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
} catch (e) {
// Firefox 31 throws when "toString" is applied to an HTMLElement
return typeof fn === "function";
}
}
`,helpers.wrapNativeSuper=helper("7.0.0-beta.0")`
import getPrototypeOf from "getPrototypeOf";
import setPrototypeOf from "setPrototypeOf";
import isNativeFunction from "isNativeFunction";
import construct from "construct";
export default function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
_wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !isNativeFunction(Class)) return Class;
if (typeof Class !== "function") {
throw new TypeError("Super expression must either be null or a function");
}
if (typeof _cache !== "undefined") {
if (_cache.has(Class)) return _cache.get(Class);
_cache.set(Class, Wrapper);
}
function Wrapper() {
return construct(Class, arguments, getPrototypeOf(this).constructor)
}
Wrapper.prototype = Object.create(Class.prototype, {
constructor: {
value: Wrapper,
enumerable: false,
writable: true,
configurable: true,
}
});
return setPrototypeOf(Wrapper, Class);
}
return _wrapNativeSuper(Class)
}
`,helpers.instanceof=helper("7.0.0-beta.0")`
export default function _instanceof(left, right) {
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
return !!right[Symbol.hasInstance](left);
} else {
return left instanceof right;
}
}
`,helpers.interopRequireDefault=helper("7.0.0-beta.0")`
export default function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
`,helpers.newArrowCheck=helper("7.0.0-beta.0")`
export default function _newArrowCheck(innerThis, boundThis) {
if (innerThis !== boundThis) {
throw new TypeError("Cannot instantiate an arrow function");
}
}
`,helpers.objectDestructuringEmpty=helper("7.0.0-beta.0")`
export default function _objectDestructuringEmpty(obj) {
if (obj == null) throw new TypeError("Cannot destructure " + obj);
}
`,helpers.objectWithoutPropertiesLoose=helper("7.0.0-beta.0")`
export default 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];
}
return target;
}
`,helpers.objectWithoutProperties=helper("7.0.0-beta.0")`
import objectWithoutPropertiesLoose from "objectWithoutPropertiesLoose";
export default function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = objectWithoutPropertiesLoose(source, excluded);
var key, i;
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
`,helpers.assertThisInitialized=helper("7.0.0-beta.0")`
export default function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
`,helpers.possibleConstructorReturn=helper("7.0.0-beta.0")`
import assertThisInitialized from "assertThisInitialized";
export default function _possibleConstructorReturn(self, call) {
if (call && (typeof call === "object" || typeof call === "function")) {
return call;
} else if (call !== void 0) {
throw new TypeError("Derived constructors may only return object or undefined");
}
return assertThisInitialized(self);
}
`,helpers.createSuper=helper("7.9.0")`
import getPrototypeOf from "getPrototypeOf";
import isNativeReflectConstruct from "isNativeReflectConstruct";
import possibleConstructorReturn from "possibleConstructorReturn";
export default function _createSuper(Derived) {
var hasNativeReflectConstruct = isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = getPrototypeOf(Derived), result;
if (hasNativeReflectConstruct) {
// NOTE: This doesn't work if this.__proto__.constructor has been modified.
var NewTarget = getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return possibleConstructorReturn(this, result);
}
}
`,helpers.superPropBase=helper("7.0.0-beta.0")`
import getPrototypeOf from "getPrototypeOf";
export default function _superPropBase(object, property) {
// Yes, this throws if object is null to being with, that's on purpose.
while (!Object.prototype.hasOwnProperty.call(object, property)) {
object = getPrototypeOf(object);
if (object === null) break;
}
return object;
}
`,helpers.get=helper("7.0.0-beta.0")`
import superPropBase from "superPropBase";
export default function _get() {
if (typeof Reflect !== "undefined" && Reflect.get) {
_get = Reflect.get.bind();
} else {
_get = function _get(target, property, receiver) {
var base = superPropBase(target, property);
if (!base) return;
var desc = Object.getOwnPropertyDescriptor(base, property);
if (desc.get) {
// STEP 3. If receiver is not present, then set receiver to target.
return desc.get.call(arguments.length < 3 ? target : receiver);
}
return desc.value;
};
}
return _get.apply(this, arguments);
}
`,helpers.set=helper("7.0.0-beta.0")`
import superPropBase from "superPropBase";
import defineProperty from "defineProperty";
function set(target, property, value, receiver) {
if (typeof Reflect !== "undefined" && Reflect.set) {
set = Reflect.set;
} else {
set = function set(target, property, value, receiver) {
var base = superPropBase(target, property);
var desc;
if (base) {
desc = Object.getOwnPropertyDescriptor(base, property);
if (desc.set) {
desc.set.call(receiver, value);
return true;
} else if (!desc.writable) {
// Both getter and non-writable fall into this.
return false;
}
}
// Without a super that defines the property, spec boils down to
// "define on receiver" for some reason.
desc = Object.getOwnPropertyDescriptor(receiver, property);
if (desc) {
if (!desc.writable) {
// Setter, getter, and non-writable fall into this.
return false;
}
desc.value = value;
Object.defineProperty(receiver, property, desc);
} else {
// Avoid setters that may be defined on Sub's prototype, but not on
// the instance.
defineProperty(receiver, property, value);
}
return true;
};
}
return set(target, property, value, receiver);
}
export default function _set(target, property, value, receiver, isStrict) {
var s = set(target, property, value, receiver || target);
if (!s && isStrict) {
throw new TypeError('failed to set property');
}
return value;
}
`,helpers.taggedTemplateLiteral=helper("7.0.0-beta.0")`
export default function _taggedTemplateLiteral(strings, raw) {
if (!raw) { raw = strings.slice(0); }
return Object.freeze(Object.defineProperties(strings, {
raw: { value: Object.freeze(raw) }
}));
}
`,helpers.taggedTemplateLiteralLoose=helper("7.0.0-beta.0")`
export default function _taggedTemplateLiteralLoose(strings, raw) {
if (!raw) { raw = strings.slice(0); }
strings.raw = raw;
return strings;
}
`,helpers.readOnlyError=helper("7.0.0-beta.0")`
export default function _readOnlyError(name) {
throw new TypeError("\\"" + name + "\\" is read-only");
}
`,helpers.writeOnlyError=helper("7.12.13")`
export default function _writeOnlyError(name) {
throw new TypeError("\\"" + name + "\\" is write-only");
}
`,helpers.classNameTDZError=helper("7.0.0-beta.0")`
export default function _classNameTDZError(name) {
throw new ReferenceError("Class \\"" + name + "\\" cannot be referenced in computed property keys.");
}
`,helpers.temporalUndefined=helper("7.0.0-beta.0")`
// This function isn't mean to be called, but to be used as a reference.
// We can't use a normal object because it isn't hoisted.
export default function _temporalUndefined() {}
`,helpers.tdz=helper("7.5.5")`
export default function _tdzError(name) {
throw new ReferenceError(name + " is not defined - temporal dead zone");
}
`,helpers.temporalRef=helper("7.0.0-beta.0")`
import undef from "temporalUndefined";
import err from "tdz";
export default function _temporalRef(val, name) {
return val === undef ? err(name) : val;
}
`,helpers.slicedToArray=helper("7.0.0-beta.0")`
import arrayWithHoles from "arrayWithHoles";
import iterableToArrayLimit from "iterableToArrayLimit";
import unsupportedIterableToArray from "unsupportedIterableToArray";
import nonIterableRest from "nonIterableRest";
export default function _slicedToArray(arr, i) {
return (
arrayWithHoles(arr) ||
iterableToArrayLimit(arr, i) ||
unsupportedIterableToArray(arr, i) ||
nonIterableRest()
);
}
`,helpers.slicedToArrayLoose=helper("7.0.0-beta.0")`
import arrayWithHoles from "arrayWithHoles";
import iterableToArrayLimitLoose from "iterableToArrayLimitLoose";
import unsupportedIterableToArray from "unsupportedIterableToArray";
import nonIterableRest from "nonIterableRest";
export default function _slicedToArrayLoose(arr, i) {
return (
arrayWithHoles(arr) ||
iterableToArrayLimitLoose(arr, i) ||
unsupportedIterableToArray(arr, i) ||
nonIterableRest()
);
}
`,helpers.toArray=helper("7.0.0-beta.0")`
import arrayWithHoles from "arrayWithHoles";
import iterableToArray from "iterableToArray";
import unsupportedIterableToArray from "unsupportedIterableToArray";
import nonIterableRest from "nonIterableRest";
export default function _toArray(arr) {
return (
arrayWithHoles(arr) ||
iterableToArray(arr) ||
unsupportedIterableToArray(arr) ||
nonIterableRest()
);
}
`,helpers.toConsumableArray=helper("7.0.0-beta.0")`
import arrayWithoutHoles from "arrayWithoutHoles";
import iterableToArray from "iterableToArray";
import unsupportedIterableToArray from "unsupportedIterableToArray";
import nonIterableSpread from "nonIterableSpread";
export default function _toConsumableArray(arr) {
return (
arrayWithoutHoles(arr) ||
iterableToArray(arr) ||
unsupportedIterableToArray(arr) ||
nonIterableSpread()
);
}
`,helpers.arrayWithoutHoles=helper("7.0.0-beta.0")`
import arrayLikeToArray from "arrayLikeToArray";
export default function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return arrayLikeToArray(arr);
}
`,helpers.arrayWithHoles=helper("7.0.0-beta.0")`
export default function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
`,helpers.maybeArrayLike=helper("7.9.0")`
import arrayLikeToArray from "arrayLikeToArray";
export default function _maybeArrayLike(next, arr, i) {
if (arr && !Array.isArray(arr) && typeof arr.length === "number") {
var len = arr.length;
return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len);
}
return next(arr, i);
}
`,helpers.iterableToArray=helper("7.0.0-beta.0")`
export default function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
`,helpers.unsupportedIterableToArray=helper("7.9.0")`
import arrayLikeToArray from "arrayLikeToArray";
export default function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
return arrayLikeToArray(o, minLen);
}
`,helpers.arrayLikeToArray=helper("7.9.0")`
export default function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
`,helpers.nonIterableSpread=helper("7.0.0-beta.0")`
export default function _nonIterableSpread() {
throw new TypeError(
"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
`,helpers.nonIterableRest=helper("7.0.0-beta.0")`
export default function _nonIterableRest() {
throw new TypeError(
"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
`,helpers.createForOfIteratorHelper=helper("7.9.0")`
import unsupportedIterableToArray from "unsupportedIterableToArray";
// s: start (create the iterator)
// n: next
// e: error (called whenever something throws)
// f: finish (always called at the end)
export default function _createForOfIteratorHelper(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (!it) {
// Fallback for engines without symbol support
if (
Array.isArray(o) ||
(it = unsupportedIterableToArray(o)) ||
(allowArrayLike && o && typeof o.length === "number")
) {
if (it) o = it;
var i = 0;
var F = function(){};
return {
s: F,
n: function() {
if (i >= o.length) return { done: true };
return { done: false, value: o[i++] };
},
e: function(e) { throw e; },
f: F,
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var normalCompletion = true, didErr = false, err;
return {
s: function() {
it = it.call(o);
},
n: function() {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function(e) {
didErr = true;
err = e;
},
f: function() {
try {
if (!normalCompletion && it.return != null) it.return();
} finally {
if (didErr) throw err;
}
}
};
}
`,helpers.createForOfIteratorHelperLoose=helper("7.9.0")`
import unsupportedIterableToArray from "unsupportedIterableToArray";
export default function _createForOfIteratorHelperLoose(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (it) return (it = it.call(o)).next.bind(it);
// Fallback for engines without symbol support
if (
Array.isArray(o) ||
(it = unsupportedIterableToArray(o)) ||
(allowArrayLike && o && typeof o.length === "number")
) {
if (it) o = it;
var i = 0;
return function() {
if (i >= o.length) return { done: true };
return { done: false, value: o[i++] };
}
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
`,helpers.skipFirstGeneratorNext=helper("7.0.0-beta.0")`
export default function _skipFirstGeneratorNext(fn) {
return function () {
var it = fn.apply(this, arguments);
it.next();
return it;
}
}
`,helpers.toPrimitive=helper("7.1.5")`
export default function _toPrimitive(
input,
hint /*: "default" | "string" | "number" | void */
) {
if (typeof input !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if (typeof res !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
`,helpers.toPropertyKey=helper("7.1.5")`
import toPrimitive from "toPrimitive";
export default function _toPropertyKey(arg) {
var key = toPrimitive(arg, "string");
return typeof key === "symbol" ? key : String(key);
}
`,helpers.initializerWarningHelper=helper("7.0.0-beta.0")`
export default function _initializerWarningHelper(descriptor, context){
throw new Error(
'Decorating class property failed. Please ensure that ' +
'transform-class-properties is enabled and runs after the decorators transform.'
);
}
`,helpers.initializerDefineProperty=helper("7.0.0-beta.0")`
export default function _initializerDefineProperty(target, property, descriptor, context){
if (!descriptor) return;
Object.defineProperty(target, property, {
enumerable: descriptor.enumerable,
configurable: descriptor.configurable,
writable: descriptor.writable,
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,
});
}
`,helpers.applyDecoratedDescriptor=helper("7.0.0-beta.0")`
export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context){
var desc = {};
Object.keys(descriptor).forEach(function(key){
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;
if ('value' in desc || desc.initializer){
desc.writable = true;
}
desc = decorators.slice().reverse().reduce(function(desc, decorator){
return decorator(target, property, desc) || desc;
}, desc);
if (context && desc.initializer !== void 0){
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}
if (desc.initializer === void 0){
Object.defineProperty(target, property, desc);
desc = null;
}
return desc;
}
`,helpers.classPrivateFieldLooseKey=helper("7.0.0-beta.0")`
var id = 0;
export default function _classPrivateFieldKey(name) {
return "__private_" + (id++) + "_" + name;
}
`,helpers.classPrivateFieldLooseBase=helper("7.0.0-beta.0")`
export default function _classPrivateFieldBase(receiver, privateKey) {
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
throw new TypeError("attempted to use private field on non-instance");
}
return receiver;
}
`,helpers.classPrivateFieldGet=helper("7.0.0-beta.0")`
import classApplyDescriptorGet from "classApplyDescriptorGet";
import classExtractFieldDescriptor from "classExtractFieldDescriptor";
export default function _classPrivateFieldGet(receiver, privateMap) {
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get");
return classApplyDescriptorGet(receiver, descriptor);
}
`,helpers.classPrivateFieldSet=helper("7.0.0-beta.0")`
import classApplyDescriptorSet from "classApplyDescriptorSet";
import classExtractFieldDescriptor from "classExtractFieldDescriptor";
export default function _classPrivateFieldSet(receiver, privateMap, value) {
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
classApplyDescriptorSet(receiver, descriptor, value);
return value;
}
`,helpers.classPrivateFieldDestructureSet=helper("7.4.4")`
import classApplyDescriptorDestructureSet from "classApplyDescriptorDestructureSet";
import classExtractFieldDescriptor from "classExtractFieldDescriptor";
export default function _classPrivateFieldDestructureSet(receiver, privateMap) {
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
return classApplyDescriptorDestructureSet(receiver, descriptor);
}
`,helpers.classExtractFieldDescriptor=helper("7.13.10")`
export default function _classExtractFieldDescriptor(receiver, privateMap, action) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to " + action + " private field on non-instance");
}
return privateMap.get(receiver);
}
`,helpers.classStaticPrivateFieldSpecGet=helper("7.0.2")`
import classApplyDescriptorGet from "classApplyDescriptorGet";
import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
import classCheckPrivateStaticFieldDescriptor from "classCheckPrivateStaticFieldDescriptor";
export default function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
classCheckPrivateStaticAccess(receiver, classConstructor);
classCheckPrivateStaticFieldDescriptor(descriptor, "get");
return classApplyDescriptorGet(receiver, descriptor);
}
`,helpers.classStaticPrivateFieldSpecSet=helper("7.0.2")`
import classApplyDescriptorSet from "classApplyDescriptorSet";
import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
import classCheckPrivateStaticFieldDescriptor from "classCheckPrivateStaticFieldDescriptor";
export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
classCheckPrivateStaticAccess(receiver, classConstructor);
classCheckPrivateStaticFieldDescriptor(descriptor, "set");
classApplyDescriptorSet(receiver, descriptor, value);
return value;
}
`,helpers.classStaticPrivateMethodGet=helper("7.3.2")`
import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
export default function _classStaticPrivateMethodGet(receiver, classConstructor, method) {
classCheckPrivateStaticAccess(receiver, classConstructor);
return method;
}
`,helpers.classStaticPrivateMethodSet=helper("7.3.2")`
export default function _classStaticPrivateMethodSet() {
throw new TypeError("attempted to set read only static private field");
}
`,helpers.classApplyDescriptorGet=helper("7.13.10")`
export default function _classApplyDescriptorGet(receiver, descriptor) {
if (descriptor.get) {
return descriptor.get.call(receiver);
}
return descriptor.value;
}
`,helpers.classApplyDescriptorSet=helper("7.13.10")`
export default function _classApplyDescriptorSet(receiver, descriptor, value) {
if (descriptor.set) {
descriptor.set.call(receiver, value);
} else {
if (!descriptor.writable) {
// This should only throw in strict mode, but class bodies are
// always strict and private fields can only be used inside
// class bodies.
throw new TypeError("attempted to set read only private field");
}
descriptor.value = value;
}
}
`,helpers.classApplyDescriptorDestructureSet=helper("7.13.10")`
export default function _classApplyDescriptorDestructureSet(receiver, descriptor) {
if (descriptor.set) {
if (!("__destrObj" in descriptor)) {
descriptor.__destrObj = {
set value(v) {
descriptor.set.call(receiver, v)
},
};
}
return descriptor.__destrObj;
} else {
if (!descriptor.writable) {
// This should only throw in strict mode, but class bodies are
// always strict and private fields can only be used inside
// class bodies.
throw new TypeError("attempted to set read only private field");
}
return descriptor;
}
}
`,helpers.classStaticPrivateFieldDestructureSet=helper("7.13.10")`
import classApplyDescriptorDestructureSet from "classApplyDescriptorDestructureSet";
import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
import classCheckPrivateStaticFieldDescriptor from "classCheckPrivateStaticFieldDescriptor";
export default function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) {
classCheckPrivateStaticAccess(receiver, classConstructor);
classCheckPrivateStaticFieldDescriptor(descriptor, "set");
return classApplyDescriptorDestructureSet(receiver, descriptor);
}
`,helpers.classCheckPrivateStaticAccess=helper("7.13.10")`
export default function _classCheckPrivateStaticAccess(receiver, classConstructor) {
if (receiver !== classConstructor) {
throw new TypeError("Private static access of wrong provenance");
}
}
`,helpers.classCheckPrivateStaticFieldDescriptor=helper("7.13.10")`
export default function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {
if (descriptor === undefined) {
throw new TypeError("attempted to " + action + " private static field before its declaration");
}
}
`,helpers.decorate=helper("7.1.5")`
import toArray from "toArray";
import toPropertyKey from "toPropertyKey";
// These comments are stripped by @babel/template
/*::
type PropertyDescriptor =
| {
value: any,
writable: boolean,
configurable: boolean,
enumerable: boolean,
}
| {
get?: () => any,
set?: (v: any) => void,
configurable: boolean,
enumerable: boolean,
};
type FieldDescriptor ={
writable: boolean,
configurable: boolean,
enumerable: boolean,
};
type Placement = "static" | "prototype" | "own";
type Key = string | symbol; // PrivateName is not supported yet.
type ElementDescriptor =
| {
kind: "method",
key: Key,
placement: Placement,
descriptor: PropertyDescriptor
}
| {
kind: "field",
key: Key,
placement: Placement,
descriptor: FieldDescriptor,
initializer?: () => any,
};
// This is exposed to the user code
type ElementObjectInput = ElementDescriptor & {
[@@toStringTag]?: "Descriptor"
};
// This is exposed to the user code
type ElementObjectOutput = ElementDescriptor & {
[@@toStringTag]?: "Descriptor"
extras?: ElementDescriptor[],
finisher?: ClassFinisher,
};
// This is exposed to the user code
type ClassObject = {
[@@toStringTag]?: "Descriptor",
kind: "class",
elements: ElementDescriptor[],
};
type ElementDecorator = (descriptor: ElementObjectInput) => ?ElementObjectOutput;
type ClassDecorator = (descriptor: ClassObject) => ?ClassObject;
type ClassFinisher = <A, B>(cl: Class<A>) => Class<B>;
// Only used by Babel in the transform output, not part of the spec.
type ElementDefinition =
| {
kind: "method",
value: any,
key: Key,
static?: boolean,
decorators?: ElementDecorator[],
}
| {
kind: "field",
value: () => any,
key: Key,
static?: boolean,
decorators?: ElementDecorator[],
};
declare function ClassFactory<C>(initialize: (instance: C) => void): {
F: Class<C>,
d: ElementDefinition[]
}
*/
/*::
// Various combinations with/without extras and with one or many finishers
type ElementFinisherExtras = {
element: ElementDescriptor,
finisher?: ClassFinisher,
extras?: ElementDescriptor[],
};
type ElementFinishersExtras = {
element: ElementDescriptor,
finishers: ClassFinisher[],
extras: ElementDescriptor[],
};
type ElementsFinisher = {
elements: ElementDescriptor[],
finisher?: ClassFinisher,
};
type ElementsFinishers = {
elements: ElementDescriptor[],
finishers: ClassFinisher[],
};
*/
/*::
type Placements = {
static: Key[],
prototype: Key[],
own: Key[],
};
*/
// ClassDefinitionEvaluation (Steps 26-*)
export default function _decorate(
decorators /*: ClassDecorator[] */,
factory /*: ClassFactory */,
superClass /*: ?Class<*> */,
mixins /*: ?Array<Function> */,
) /*: Class<*> */ {
var api = _getDecoratorsApi();
if (mixins) {
for (var i = 0; i < mixins.length; i++) {
api = mixins[i](api);
}
}
var r = factory(function initialize(O) {
api.initializeInstanceElements(O, decorated.elements);
}, superClass);
var decorated = api.decorateClass(
_coalesceClassElements(r.d.map(_createElementDescriptor)),
decorators,
);
api.initializeClassElements(r.F, decorated.elements);
return api.runClassFinishers(r.F, decorated.finishers);
}
function _getDecoratorsApi() {
_getDecoratorsApi = function() {
return api;
};
var api = {
elementsDefinitionOrder: [["method"], ["field"]],
// InitializeInstanceElements
initializeInstanceElements: function(
/*::<C>*/ O /*: C */,
elements /*: ElementDescriptor[] */,
) {
["method", "field"].forEach(function(kind) {
elements.forEach(function(element /*: ElementDescriptor */) {
if (element.kind === kind && element.placement === "own") {
this.defineClassElement(O, element);
}
}, this);
}, this);
},
// InitializeClassElements
initializeClassElements: function(
/*::<C>*/ F /*: Class<C> */,
elements /*: ElementDescriptor[] */,
) {
var proto = F.prototype;
["method", "field"].forEach(function(kind) {
elements.forEach(function(element /*: ElementDescriptor */) {
var placement = element.placement;
if (
element.kind === kind &&
(placement === "static" || placement === "prototype")
) {
var receiver = placement === "static" ? F : proto;
this.defineClassElement(receiver, element);
}
}, this);
}, this);
},
// DefineClassElement
defineClassElement: function(
/*::<C>*/ receiver /*: C | Class<C> */,
element /*: ElementDescriptor */,
) {
var descriptor /*: PropertyDescriptor */ = element.descriptor;
if (element.kind === "field") {
var initializer = element.initializer;
descriptor = {
enumerable: descriptor.enumerable,
writable: descriptor.writable,
configurable: descriptor.configurable,
value: initializer === void 0 ? void 0 : initializer.call(receiver),
};
}
Object.defineProperty(receiver, element.key, descriptor);
},
// DecorateClass
decorateClass: function(
elements /*: ElementDescriptor[] */,
decorators /*: ClassDecorator[] */,
) /*: ElementsFinishers */ {
var newElements /*: ElementDescriptor[] */ = [];
var finishers /*: ClassFinisher[] */ = [];
var placements /*: Placements */ = {
static: [],
prototype: [],
own: [],
};
elements.forEach(function(element /*: ElementDescriptor */) {
this.addElementPlacement(element, placements);
}, this);
elements.forEach(function(element /*: ElementDescriptor */) {
if (!_hasDecorators(element)) return newElements.push(element);
var elementFinishersExtras /*: ElementFinishersExtras */ = this.decorateElement(
element,
placements,
);
newElements.push(elementFinishersExtras.element);
newElements.push.apply(newElements, elementFinishersExtras.extras);
finishers.push.apply(finishers, elementFinishersExtras.finishers);
}, this);
if (!decorators) {
return { elements: newElements, finishers: finishers };
}
var result /*: ElementsFinishers */ = this.decorateConstructor(
newElements,
decorators,
);
finishers.push.apply(finishers, result.finishers);
result.finishers = finishers;
return result;
},
// AddElementPlacement
addElementPlacement: function(
element /*: ElementDescriptor */,
placements /*: Placements */,
silent /*: boolean */,
) {
var keys = placements[element.placement];
if (!silent && keys.indexOf(element.key) !== -1) {
throw new TypeError("Duplicated element (" + element.key + ")");
}
keys.push(element.key);
},
// DecorateElement
decorateElement: function(
element /*: ElementDescriptor */,
placements /*: Placements */,
) /*: ElementFinishersExtras */ {
var extras /*: ElementDescriptor[] */ = [];
var finishers /*: ClassFinisher[] */ = [];
for (
var decorators = element.decorators, i = decorators.length - 1;
i >= 0;
i--
) {
// (inlined) RemoveElementPlacement
var keys = placements[element.placement];
keys.splice(keys.indexOf(element.key), 1);
var elementObject /*: ElementObjectInput */ = this.fromElementDescriptor(
element,
);
var elementFinisherExtras /*: ElementFinisherExtras */ = this.toElementFinisherExtras(
(0, decorators[i])(elementObject) /*: ElementObjectOutput */ ||
elementObject,
);
element = elementFinisherExtras.element;
this.addElementPlacement(element, placements);
if (elementFinisherExtras.finisher) {
finishers.push(elementFinisherExtras.finisher);
}
var newExtras /*: ElementDescriptor[] | void */ =
elementFinisherExtras.extras;
if (newExtras) {
for (var j = 0; j < newExtras.length; j++) {
this.addElementPlacement(newExtras[j], placements);
}
extras.push.apply(extras, newExtras);
}
}
return { element: element, finishers: finishers, extras: extras };
},
// DecorateConstructor
decorateConstructor: function(
elements /*: ElementDescriptor[] */,
decorators /*: ClassDecorator[] */,
) /*: ElementsFinishers */ {
var finishers /*: ClassFinisher[] */ = [];
for (var i = decorators.length - 1; i >= 0; i--) {
var obj /*: ClassObject */ = this.fromClassDescriptor(elements);
var elementsAndFinisher /*: ElementsFinisher */ = this.toClassDescriptor(
(0, decorators[i])(obj) /*: ClassObject */ || obj,
);
if (elementsAndFinisher.finisher !== undefined) {
finishers.push(elementsAndFinisher.finisher);
}
if (elementsAndFinisher.elements !== undefined) {
elements = elementsAndFinisher.elements;
for (var j = 0; j < elements.length - 1; j++) {
for (var k = j + 1; k < elements.length; k++) {
if (
elements[j].key === elements[k].key &&
elements[j].placement === elements[k].placement
) {
throw new TypeError(
"Duplicated element (" + elements[j].key + ")",
);
}
}
}
}
}
return { elements: elements, finishers: finishers };
},
// FromElementDescriptor
fromElementDescriptor: function(
element /*: ElementDescriptor */,
) /*: ElementObject */ {
var obj /*: ElementObject */ = {
kind: element.kind,
key: element.key,
placement: element.placement,
descriptor: element.descriptor,
};
var desc = {
value: "Descriptor",
configurable: true,
};
Object.defineProperty(obj, Symbol.toStringTag, desc);
if (element.kind === "field") obj.initializer = element.initializer;
return obj;
},
// ToElementDescriptors
toElementDescriptors: function(
elementObjects /*: ElementObject[] */,
) /*: ElementDescriptor[] */ {
if (elementObjects === undefined) return;
return toArray(elementObjects).map(function(elementObject) {
var element = this.toElementDescriptor(elementObject);
this.disallowProperty(elementObject, "finisher", "An element descriptor");
this.disallowProperty(elementObject, "extras", "An element descriptor");
return element;
}, this);
},
// ToElementDescriptor
toElementDescriptor: function(
elementObject /*: ElementObject */,
) /*: ElementDescriptor */ {
var kind = String(elementObject.kind);
if (kind !== "method" && kind !== "field") {
throw new TypeError(
'An element descriptor\\'s .kind property must be either "method" or' +
' "field", but a decorator created an element descriptor with' +
' .kind "' +
kind +
'"',
);
}
var key = toPropertyKey(elementObject.key);
var placement = String(elementObject.placement);
if (
placement !== "static" &&
placement !== "prototype" &&
placement !== "own"
) {
throw new TypeError(
'An element descriptor\\'s .placement property must be one of "static",' +
' "prototype" or "own", but a decorator created an element descriptor' +
' with .placement "' +
placement +
'"',
);
}
var descriptor /*: PropertyDescriptor */ = elementObject.descriptor;
this.disallowProperty(elementObject, "elements", "An element descriptor");
var element /*: ElementDescriptor */ = {
kind: kind,
key: key,
placement: placement,
descriptor: Object.assign({}, descriptor),
};
if (kind !== "field") {
this.disallowProperty(elementObject, "initializer", "A method descriptor");
} else {
this.disallowProperty(
descriptor,
"get",
"The property descriptor of a field descriptor",
);
this.disallowProperty(
descriptor,
"set",
"The property descriptor of a field descriptor",
);
this.disallowProperty(
descriptor,
"value",
"The property descriptor of a field descriptor",
);
element.initializer = elementObject.initializer;
}
return element;
},
toElementFinisherExtras: function(
elementObject /*: ElementObject */,
) /*: ElementFinisherExtras */ {
var element /*: ElementDescriptor */ = this.toElementDescriptor(
elementObject,
);
var finisher /*: ClassFinisher */ = _optionalCallableProperty(
elementObject,
"finisher",
);
var extras /*: ElementDescriptors[] */ = this.toElementDescriptors(
elementObject.extras,
);
return { element: element, finisher: finisher, extras: extras };
},
// FromClassDescriptor
fromClassDescriptor: function(
elements /*: ElementDescriptor[] */,
) /*: ClassObject */ {
var obj = {
kind: "class",
elements: elements.map(this.fromElementDescriptor, this),
};
var desc = { value: "Descriptor", configurable: true };
Object.defineProperty(obj, Symbol.toStringTag, desc);
return obj;
},
// ToClassDescriptor
toClassDescriptor: function(
obj /*: ClassObject */,
) /*: ElementsFinisher */ {
var kind = String(obj.kind);
if (kind !== "class") {
throw new TypeError(
'A class descriptor\\'s .kind property must be "class", but a decorator' +
' created a class descriptor with .kind "' +
kind +
'"',
);
}
this.disallowProperty(obj, "key", "A class descriptor");
this.disallowProperty(obj, "placement", "A class descriptor");
this.disallowProperty(obj, "descriptor", "A class descriptor");
this.disallowProperty(obj, "initializer", "A class descriptor");
this.disallowProperty(obj, "extras", "A class descriptor");
var finisher = _optionalCallableProperty(obj, "finisher");
var elements = this.toElementDescriptors(obj.elements);
return { elements: elements, finisher: finisher };
},
// RunClassFinishers
runClassFinishers: function(
constructor /*: Class<*> */,
finishers /*: ClassFinisher[] */,
) /*: Class<*> */ {
for (var i = 0; i < finishers.length; i++) {
var newConstructor /*: ?Class<*> */ = (0, finishers[i])(constructor);
if (newConstructor !== undefined) {
// NOTE: This should check if IsConstructor(newConstructor) is false.
if (typeof newConstructor !== "function") {
throw new TypeError("Finishers must return a constructor.");
}
constructor = newConstructor;
}
}
return constructor;
},
disallowProperty: function(obj, name, objectType) {
if (obj[name] !== undefined) {
throw new TypeError(objectType + " can't have a ." + name + " property.");
}
}
};
return api;
}
// ClassElementEvaluation
function _createElementDescriptor(
def /*: ElementDefinition */,
) /*: ElementDescriptor */ {
var key = toPropertyKey(def.key);
var descriptor /*: PropertyDescriptor */;
if (def.kind === "method") {
descriptor = {
value: def.value,
writable: true,
configurable: true,
enumerable: false,
};
} else if (def.kind === "get") {
descriptor = { get: def.value, configurable: true, enumerable: false };
} else if (def.kind === "set") {
descriptor = { set: def.value, configurable: true, enumerable: false };
} else if (def.kind === "field") {
descriptor = { configurable: true, writable: true, enumerable: true };
}
var element /*: ElementDescriptor */ = {
kind: def.kind === "field" ? "field" : "method",
key: key,
placement: def.static
? "static"
: def.kind === "field"
? "own"
: "prototype",
descriptor: descriptor,
};
if (def.decorators) element.decorators = def.decorators;
if (def.kind === "field") element.initializer = def.value;
return element;
}
// CoalesceGetterSetter
function _coalesceGetterSetter(
element /*: ElementDescriptor */,
other /*: ElementDescriptor */,
) {
if (element.descriptor.get !== undefined) {
other.descriptor.get = element.descriptor.get;
} else {
other.descriptor.set = element.descriptor.set;
}
}
// CoalesceClassElements
function _coalesceClassElements(
elements /*: ElementDescriptor[] */,
) /*: ElementDescriptor[] */ {
var newElements /*: ElementDescriptor[] */ = [];
var isSameElement = function(
other /*: ElementDescriptor */,
) /*: boolean */ {
return (
other.kind === "method" &&
other.key === element.key &&
other.placement === element.placement
);
};
for (var i = 0; i < elements.length; i++) {
var element /*: ElementDescriptor */ = elements[i];
var other /*: ElementDescriptor */;
if (
element.kind === "method" &&
(other = newElements.find(isSameElement))
) {
if (
_isDataDescriptor(element.descriptor) ||
_isDataDescriptor(other.descriptor)
) {
if (_hasDecorators(element) || _hasDecorators(other)) {
throw new ReferenceError(
"Duplicated methods (" + element.key + ") can't be decorated.",
);
}
other.descriptor = element.descriptor;
} else {
if (_hasDecorators(element)) {
if (_hasDecorators(other)) {
throw new ReferenceError(
"Decorators can't be placed on different accessors with for " +
"the same property (" +
element.key +
").",
);
}
other.decorators = element.decorators;
}
_coalesceGetterSetter(element, other);
}
} else {
newElements.push(element);
}
}
return newElements;
}
function _hasDecorators(element /*: ElementDescriptor */) /*: boolean */ {
return element.decorators && element.decorators.length;
}
function _isDataDescriptor(desc /*: PropertyDescriptor */) /*: boolean */ {
return (
desc !== undefined &&
!(desc.value === undefined && desc.writable === undefined)
);
}
function _optionalCallableProperty /*::<T>*/(
obj /*: T */,
name /*: $Keys<T> */,
) /*: ?Function */ {
var value = obj[name];
if (value !== undefined && typeof value !== "function") {
throw new TypeError("Expected '" + name + "' to be a function");
}
return value;
}
`,helpers.classPrivateMethodGet=helper("7.1.6")`
export default function _classPrivateMethodGet(receiver, privateSet, fn) {
if (!privateSet.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return fn;
}
`,helpers.checkPrivateRedeclaration=helper("7.14.1")`
export default function _checkPrivateRedeclaration(obj, privateCollection) {
if (privateCollection.has(obj)) {
throw new TypeError("Cannot initialize the same private elements twice on an object");
}
}
`,helpers.classPrivateFieldInitSpec=helper("7.14.1")`
import checkPrivateRedeclaration from "checkPrivateRedeclaration";
export default function _classPrivateFieldInitSpec(obj, privateMap, value) {
checkPrivateRedeclaration(obj, privateMap);
privateMap.set(obj, value);
}
`,helpers.classPrivateMethodInitSpec=helper("7.14.1")`
import checkPrivateRedeclaration from "checkPrivateRedeclaration";
export default function _classPrivateMethodInitSpec(obj, privateSet) {
checkPrivateRedeclaration(obj, privateSet);
privateSet.add(obj);
}
`,helpers.classPrivateMethodSet=helper("7.1.6")`
export default function _classPrivateMethodSet() {
throw new TypeError("attempted to reassign private method");
}
`,helpers.identity=helper("7.17.0")`
export default function _identity(x) {
return x;
}
`,helpers.nullishReceiverError=helper("7.22.6")`
export default function _nullishReceiverError(r) {
throw new TypeError("Cannot set property of null or undefined.");
}
`},"./node_modules/.pnpm/@babel+helpers@7.23.2/node_modules/@babel/helpers/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.ensure=function(name,newFileClass){FileClass||(FileClass=newFileClass),loadHelper(name)},exports.get=get,exports.getDependencies=function(name){return loadHelper(name).getDependencies()},exports.list=void 0,exports.minVersion=function(name){return loadHelper(name).minVersion};var _traverse=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.23.2/node_modules/@babel/traverse/lib/index.js"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.23.0/node_modules/@babel/types/lib/index.js"),_helpers=__webpack_require__("./node_modules/.pnpm/@babel+helpers@7.23.2/node_modules/@babel/helpers/lib/helpers.js");const{assignmentExpression,cloneNode,expressionStatement,file,identifier}=_t;function makePath(path){const parts=[];for(;path.parentPath;path=path.parentPath)parts.push(path.key),path.inList&&parts.push(path.listKey);return parts.reverse().join(".")}let FileClass;function getHelperMetadata(file){const globals=new Set,localBindingNames=new Set,dependencies=new Map;let exportName,exportPath;const exportBindingAssignments=[],importPaths=[],importBindingsReferences=[],dependencyVisitor={ImportDeclaration(child){const name=child.node.source.value;if(!_helpers.default[name])throw child.buildCodeFrameError(`Unknown helper ${name}`);if(1!==child.get("specifiers").length||!child.get("specifiers.0").isImportDefaultSpecifier())throw child.buildCodeFrameError("Helpers can only import a default value");const bindingIdentifier=child.node.specifiers[0].local;dependencies.set(bindingIdentifier,name),importPaths.push(makePath(child))},ExportDefaultDeclaration(child){const decl=child.get("declaration");if(!decl.isFunctionDeclaration()||!decl.node.id)throw decl.buildCodeFrameError("Helpers can only export named function declarations");exportName=decl.node.id.name,exportPath=makePath(child)},ExportAllDeclaration(child){throw child.buildCodeFrameError("Helpers can only export default")},ExportNamedDeclaration(child){throw child.buildCodeFrameError("Helpers can only export default")},Statement(child){child.isImportDeclaration()||child.isExportDeclaration()||child.skip()}},referenceVisitor={Program(path){const bindings=path.scope.getAllBindings();Object.keys(bindings).forEach((name=>{name!==exportName&&(dependencies.has(bindings[name].identifier)||localBindingNames.add(name))}))},ReferencedIdentifier(child){const name=child.node.name,binding=child.scope.getBinding(name);binding?dependencies.has(binding.identifier)&&importBindingsReferences.push(makePath(child)):globals.add(name)},AssignmentExpression(child){const left=child.get("left");if(!(exportName in left.getBindingIdentifiers()))return;if(!left.isIdentifier())throw left.buildCodeFrameError("Only simple assignments to exports are allowed in helpers");const binding=child.scope.getBinding(exportName);null!=binding&&binding.scope.path.isProgram()&&exportBindingAssignments.push(makePath(child))}};if((0,_traverse.default)(file.ast,dependencyVisitor,file.scope),(0,_traverse.default)(file.ast,referenceVisitor,file.scope),!exportPath)throw new Error("Helpers must have a default export.");return exportBindingAssignments.reverse(),{globals:Array.from(globals),localBindingNames:Array.from(localBindingNames),dependencies,exportBindingAssignments,exportPath,exportName,importBindingsReferences,importPaths}}const helperData=Object.create(null);function loadHelper(name){if(!helperData[name]){const helper=_helpers.default[name];if(!helper)throw Object.assign(new ReferenceError(`Unknown helper ${name}`),{code:"BABEL_HELPER_UNKNOWN",helper:name});const fn=()=>{if(!FileClass){const fakeFile={ast:file(helper.ast()),path:null};return(0,_traverse.default)(fakeFile.ast,{Program:path=>(fakeFile.path=path).stop()}),fakeFile}return new FileClass({filename:`babel-helper://${name}`},{ast:file(helper.ast()),code:"[internal Babel helper code]",inputMap:null})};let met
class extends ${state.addHelper("identity")} {}
`;staticsClass.body.body=[_core.types.staticBlock([_core.types.toStatement(originalClass,!0)||_core.types.expressionStatement(originalClass)]),...statics];const constructorBody=[],newExpr=_core.types.newExpression(staticsClass,[]);staticBlocks.length>0&&constructorBody.push(...staticBlocks.map(staticBlockToIIFE)),classInitCall&&(classInitInjected=!0,constructorBody.push(classInitCall)),constructorBody.length>0?(constructorBody.unshift(_core.types.callExpression(_core.types.super(),[_core.types.cloneNode(classIdLocal)])),staticsClass.body.body.push(_core.types.classMethod("constructor",_core.types.identifier("constructor"),[],_core.types.blockStatement([_core.types.expressionStatement(_core.types.sequenceExpression(constructorBody))])))):newExpr.arguments.push(_core.types.cloneNode(classIdLocal)),path.replaceWith(newExpr)}}!classInitInjected&&classInitCall&&path.node.body.body.push(_core.types.staticBlock([_core.types.expressionStatement(classInitCall)]));let{superClass}=originalClass;if(superClass&&"2023-05"===version){const id=path.scope.maybeGenerateMemoised(superClass);id&&(originalClass.superClass=_core.types.assignmentExpression("=",id,superClass),superClass=id)}return originalClass.body.body.unshift(_core.types.staticBlock([_core.types.expressionStatement(createLocalsAssignment(elementLocals,classLocals,elementDecorations,_core.types.arrayExpression(classDecorations),_core.types.numericLiteral(classDecorationsFlag),needsInstancePrivateBrandCheck?lastInstancePrivateName:null,_core.types.cloneNode(superClass),state,version)),requiresStaticInit&&_core.types.expressionStatement(_core.types.callExpression(_core.types.cloneNode(staticInitLocal),[_core.types.thisExpression()]))].filter(Boolean))),path.insertBefore(assignments.map((expr=>_core.types.expressionStatement(expr)))),path.scope.crawl(),path}(path,state,constantSuper,version);newPath&&VISITED.add(newPath)}}}};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/index.js"),_pluginSyntaxDecorators=__webpack_require__("./node_modules/.pnpm/@babel+plugin-syntax-decorators@7.22.10_@babel+core@7.23.2/node_modules/@babel/plugin-syntax-decorators/lib/index.js"),_helperReplaceSupers=__webpack_require__("./node_modules/.pnpm/@babel+helper-replace-supers@7.22.20_@babel+core@7.23.2/node_modules/@babel/helper-replace-supers/lib/index.js"),_helperSplitExportDeclaration=__webpack_require__("./node_modules/.pnpm/@babel+helper-split-export-declaration@7.22.6/node_modules/@babel/helper-split-export-declaration/lib/index.js");function incrementId(id,idx=id.length-1){if(-1===idx)return void id.unshift(65);const current=id[idx];90===current?id[idx]=97:122===current?(id[idx]=65,incrementId(id,idx-1)):id[idx]=current+1}function generateClassProperty(key,value,isStatic){return"PrivateName"===key.type?_core.types.classPrivateProperty(key,value,void 0,isStatic):_core.types.classProperty(key,value,void 0,void 0,isStatic)}function addProxyAccessorsFor(className,element,originalKey,targetKey,version,isComputed=!1){const{static:isStatic}=element.node,thisArg="2023-05"===version&&isStatic?className:_core.types.thisExpression(),getterBody=_core.types.blockStatement([_core.types.returnStatement(_core.types.memberExpression(_core.types.cloneNode(thisArg),_core.types.cloneNode(targetKey)))]),setterBody=_core.types.blockStatement([_core.types.expressionStatement(_core.types.assignmentExpression("=",_core.types.memberExpression(_core.types.cloneNode(thisArg),_core.types.cloneNode(targetKey)),_core.types.identifier("v")))]);let getter,setter;"PrivateName"===originalKey.type?(getter=_core.types.classPrivateMethod("get",_core.types.cloneNode(originalKey),[],getterBody,isStatic),setter=_core.types.classPrivateMethod("set",_core.types.cloneNode(originalKey),[_core.types.identifier("v")],setterBody,isStatic)):(getter=_core.types.classMethod("get",_core.types.cloneNode(originalKey),[],getterBody,isComputed,isStatic),setter=_core.types.classMethod("set",_core.types.cloneNode(originalKey),[_core.types.identifier("v")],setterBody,isComputed,isStatic)),elem
function () {
return this.${_core.types.cloneNode(targetKey)};
}
`,_core.template.expression.ast`
function (value) {
this.${_core.types.cloneNode(targetKey)} = value;
}
`]:[_core.template.expression.ast`
o => o.${_core.types.cloneNode(targetKey)}
`,_core.template.expression.ast`
(o, v) => o.${_core.types.cloneNode(targetKey)} = v
`]}const FIELD=0,ACCESSOR=1,METHOD=2,GETTER=3,SETTER=4,STATIC_OLD_VERSION=5,STATIC=8,DECORATORS_HAVE_THIS=16;function getElementKind(element){switch(element.node.type){case"ClassProperty":case"ClassPrivateProperty":return FIELD;case"ClassAccessorProperty":return ACCESSOR;case"ClassMethod":case"ClassPrivateMethod":return"get"===element.node.kind?GETTER:"set"===element.node.kind?SETTER:METHOD}}function isDecoratorInfo(info){return"decorators"in info}function filteredOrderedDecoratorInfo(info){const filtered=info.filter(isDecoratorInfo);return[...filtered.filter((el=>el.isStatic&&el.kind>=ACCESSOR&&el.kind<=SETTER)),...filtered.filter((el=>!el.isStatic&&el.kind>=ACCESSOR&&el.kind<=SETTER)),...filtered.filter((el=>el.isStatic&&el.kind===FIELD)),...filtered.filter((el=>!el.isStatic&&el.kind===FIELD))]}function generateDecorationList(decorators,decoratorsThis,version){const decsCount=decorators.length,hasOneThis=decoratorsThis.some(Boolean),decs=[];for(let i=0;i<decsCount;i++)"2023-05"===version&&hasOneThis&&decs.push(decoratorsThis[i]||_core.types.unaryExpression("void",_core.types.numericLiteral(0))),decs.push(decorators[i]);return{hasThis:hasOneThis,decs}}function addCallAccessorsFor(element,key,getId,setId){element.insertAfter(_core.types.classPrivateMethod("get",_core.types.cloneNode(key),[],_core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(_core.types.cloneNode(getId),[_core.types.thisExpression()]))]))),element.insertAfter(_core.types.classPrivateMethod("set",_core.types.cloneNode(key),[_core.types.identifier("v")],_core.types.blockStatement([_core.types.expressionStatement(_core.types.callExpression(_core.types.cloneNode(setId),[_core.types.thisExpression(),_core.types.identifier("v")]))])))}function isNotTsParameter(node){return"TSParameterProperty"!==node.type}function movePrivateAccessor(element,key,methodLocalVar,isStatic){let params,block;"set"===element.node.kind?(params=[_core.types.identifier("v")],block=[_core.types.expressionStatement(_core.types.callExpression(methodLocalVar,[_core.types.thisExpression(),_core.types.identifier("v")]))]):(params=[],block=[_core.types.returnStatement(_core.types.callExpression(methodLocalVar,[_core.types.thisExpression()]))]),element.replaceWith(_core.types.classPrivateMethod(element.node.kind,_core.types.cloneNode(key),params,_core.types.blockStatement(block),isStatic))}function isClassDecoratableElementPath(path){const{type}=path;return"TSDeclareMethod"!==type&&"TSIndexSignature"!==type&&"StaticBlock"!==type}function staticBlockToIIFE(block){return _core.types.callExpression(_core.types.arrowFunctionExpression([],_core.types.blockStatement(block.body)),[])}function createLocalsAssignment(elementLocals,classLocals,elementDecorations,classDecorations,classDecorationsFlag,maybePrivateBranName,superClass,state,version){let lhs,rhs;const args=[_core.types.thisExpression(),elementDecorations,classDecorations];if("2021-12"===version||"2022-03"===version&&!state.availableHelper("applyDecs2203R")){const lhs=_core.types.arrayPattern([...elementLocals,...classLocals]),rhs=_core.types.callExpression(state.addHelper("2021-12"===version?"applyDecs":"applyDecs2203"),args);return _core.types.assignmentExpression("=",lhs,rhs)}return"2023-05"===version?((maybePrivateBranName||superClass||0!==classDecorationsFlag.value)&&args.push(classDecorationsFlag),maybePrivateBranName?args.push(_core.template.expression.ast`
_ => ${_core.types.cloneNode(maybePrivateBranName)} in _
`):superClass&&args.push(_core.types.unaryExpression("void",_core.types.numericLiteral(0))),superClass&&args.push(superClass),rhs=_core.types.callExpression(state.addHelper("applyDecs2305"),args)):"2023-01"===version?(maybePrivateBranName&&args.push(_core.template.expression.ast`
_ => ${_core.types.cloneNode(maybePrivateBranName)} in _
`),rhs=_core.types.callExpression(state.addHelper("applyDecs2301"),args)):rhs=_core.types.callExpression(state.addHelper("applyDecs2203R"),args),elementLocals.length>0?classLocals.length>0?lhs=_core.types.objectPattern([_core.types.objectProperty(_core.types.identifier("e"),_core.types.arrayPattern(elementLocals)),_core.types.objectProperty(_core.types.identifier("c"),_core.types.arrayPattern(classLocals))]):(lhs=_core.types.arrayPattern(elementLocals),rhs=_core.types.memberExpression(rhs,_core.types.identifier("e"),!1,!1)):(lhs=_core.types.arrayPattern(classLocals),rhs=_core.types.memberExpression(rhs,_core.types.identifier("c"),!1,!1)),_core.types.assignmentExpression("=",lhs,rhs)}},"./node_modules/.pnpm/@babel+plugin-proposal-decorators@7.23.2_@babel+core@7.23.2/node_modules/@babel/plugin-proposal-decorators/lib/transformer-legacy.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/index.js");const buildClassDecorator=_core.template.statement("\n DECORATOR(CLASS_REF = INNER) || CLASS_REF;\n"),buildClassPrototype=(0,_core.template)("\n CLASS_REF.prototype;\n"),buildGetDescriptor=(0,_core.template)("\n Object.getOwnPropertyDescriptor(TARGET, PROPERTY);\n"),buildGetObjectInitializer=(0,_core.template)("\n (TEMP = Object.getOwnPropertyDescriptor(TARGET, PROPERTY), (TEMP = TEMP ? TEMP.value : undefined), {\n enumerable: true,\n configurable: true,\n writable: true,\n initializer: function(){\n return TEMP;\n }\n })\n"),WARNING_CALLS=new WeakSet;function applyEnsureOrdering(path){const identDecorators=(path.isClass()?[path,...path.get("body.body")]:path.get("properties")).reduce(((acc,prop)=>acc.concat(prop.node.decorators||[])),[]).filter((decorator=>!_core.types.isIdentifier(decorator.expression)));if(0!==identDecorators.length)return _core.types.sequenceExpression(identDecorators.map((decorator=>{const expression=decorator.expression,id=decorator.expression=path.scope.generateDeclaredUidIdentifier("dec");return _core.types.assignmentExpression("=",id,expression)})).concat([path.node]))}function hasClassDecorators(classNode){var _classNode$decorators;return!(null==(_classNode$decorators=classNode.decorators)||!_classNode$decorators.length)}function hasMethodDecorators(body){return body.some((node=>{var _node$decorators;return null==(_node$decorators=node.decorators)?void 0:_node$decorators.length}))}function applyTargetDecorators(path,state,decoratedProps){const name=path.scope.generateDeclaredUidIdentifier(path.isClass()?"class":"obj"),exprs=decoratedProps.reduce((function(acc,node){let decorators=[];if(null!=node.decorators&&(decorators=node.decorators,node.decorators=null),0===decorators.length)return acc;if(node.computed)throw path.buildCodeFrameError("Computed method/property decorators are not yet supported.");const property=_core.types.isLiteral(node.key)?node.key:_core.types.stringLiteral(node.key.name),target=path.isClass()&&!node.static?buildClassPrototype({CLASS_REF:name}).expression:name;if(_core.types.isClassProperty(node,{static:!1})){const descriptor=path.scope.generateDeclaredUidIdentifier("descriptor"),initializer=node.value?_core.types.functionExpression(null,[],_core.types.blockStatement([_core.types.returnStatement(node.value)])):_core.types.nullLiteral();node.value=_core.types.callExpression(state.addHelper("initializerWarningHelper"),[descriptor,_core.types.thisExpression()]),WARNING_CALLS.add(node.value),acc.push(_core.types.assignmentExpression("=",_core.types.cloneNode(descriptor),_core.types.callExpression(state.addHelper("applyDecoratedDescriptor"),[_core.types.cloneNode(target),_core.types.cloneNode(property),_core.types.arrayExpression(decorators.map((dec=>_core.types.cloneNode(dec.expression)))),_core.types.objectExpression([_core.types.objectProperty(_core.types.identifier("configurable"),_core.types.booleanLiteral(!0)),_core.typ
(function(){
throw new Error(
"The CommonJS '" + "${localName}" + "' variable is not available in ES6 modules." +
"Consider setting setting sourceType:script or sourceType:unambiguous in your " +
"Babel config for this file.");
})()
`,moduleExportsVisitor={ReferencedIdentifier(path){const localName=path.node.name;if("module"!==localName&&"exports"!==localName)return;const localBinding=path.scope.getBinding(localName);this.scope.getBinding(localName)!==localBinding||path.parentPath.isObjectProperty({value:path.node})&&path.parentPath.parentPath.isObjectPattern()||path.parentPath.isAssignmentExpression({left:path.node})||path.isAssignmentExpression({left:path.node})||path.replaceWith(getAssertion(localName))},UpdateExpression(path){const arg=path.get("argument");if(!arg.isIdentifier())return;const localName=arg.node.name;if("module"!==localName&&"exports"!==localName)return;const localBinding=path.scope.getBinding(localName);this.scope.getBinding(localName)===localBinding&&path.replaceWith(_core.types.assignmentExpression(path.node.operator[0]+"=",arg.node,getAssertion(localName)))},AssignmentExpression(path){const left=path.get("left");if(left.isIdentifier()){const localName=left.node.name;if("module"!==localName&&"exports"!==localName)return;const localBinding=path.scope.getBinding(localName);if(this.scope.getBinding(localName)!==localBinding)return;const right=path.get("right");right.replaceWith(_core.types.sequenceExpression([right.node,getAssertion(localName)]))}else if(left.isPattern()){const ids=left.getOuterBindingIdentifiers(),localName=Object.keys(ids).filter((localName=>("module"===localName||"exports"===localName)&&this.scope.getBinding(localName)===path.scope.getBinding(localName)))[0];if(localName){const right=path.get("right");right.replaceWith(_core.types.sequenceExpression([right.node,getAssertion(localName)]))}}}};return{name:"transform-modules-commonjs",pre(){this.file.set("@babel/plugin-transform-modules-*","commonjs"),lazy&&(0,_hooks.defineCommonJSHook)(this.file,(0,_lazy.lazyImportsHook)(lazy))},visitor:{["CallExpression"+(api.types.importExpression?"|ImportExpression":"")](path){if(!this.file.has("@babel/plugin-proposal-dynamic-import"))return;if(path.isCallExpression()&&!_core.types.isImport(path.node.callee))return;let{scope}=path;do{scope.rename("require")}while(scope=scope.parent);(0,_dynamicImport.transformDynamicImport)(path,noInterop,this.file)},Program:{exit(path,state){if(!(0,_helperModuleTransforms.isModule)(path))return;path.scope.rename("exports"),path.scope.rename("module"),path.scope.rename("require"),path.scope.rename("__filename"),path.scope.rename("__dirname"),allowCommonJSExports||((0,_helperSimpleAccess.default)(path,new Set(["module","exports"]),!1),path.traverse(moduleExportsVisitor,{scope:path.scope}));let moduleName=(0,_helperModuleTransforms.getModuleName)(this.file.opts,options);moduleName&&(moduleName=_core.types.stringLiteral(moduleName));const hooks=(0,_hooks.makeInvokers)(this.file),{meta,headers}=(0,_helperModuleTransforms.rewriteModuleStatementsAndPrepareHeader)(path,{exportName:"exports",constantReexports,enumerableModuleMeta,strict,strictMode,allowTopLevelThis,noInterop,importInterop,wrapReference:hooks.wrapReference,getWrapperPayload:hooks.getWrapperPayload,esNamespaceOnly:"string"==typeof state.filename&&/\.mjs$/.test(state.filename)?mjsStrictNamespace:strictNamespace,noIncompleteNsImportDetection,filename:this.file.opts.filename});for(const[source,metadata]of meta.source){const loadExpr=_core.types.callExpression(_core.types.identifier("require"),[_core.types.stringLiteral(source)]);let header;if((0,_helperModuleTransforms.isSideEffectImport)(metadata)){if(lazy&&"function"===metadata.wrap)throw new Error("Assertion failure");header=_core.types.expressionStatement(loadExpr)}else{const init=(0,_helperModuleTransforms.wrapInterop)(path,loadExpr,metadata.interop)||loadExpr;if(metadata.wrap){const res=hooks.buildRequireWrapper(metadata.name,init,metadata.wrap,metadata.referenced);if(!1===res)continue;header=res}null!=header||(header=_core.template.statement.ast`
var ${metadata.name} = ${init};
`)}header.loc=metadata.loc,headers.push(header),headers.push(...(0,_helperModuleTransforms.buildNamespaceInitStatements)(meta,metadata,constantReexports,hooks.wrapReference))}(0,_helperModuleTransforms.ensureStatementsHoisted)(headers),path.unshiftContainer("body",headers),path.get("body").forEach((path=>{-1!==headers.indexOf(path.node)&&path.isVariableDeclaration()&&path.scope.registerDeclaration(path)}))}}}}}));exports.default=_default},"./node_modules/.pnpm/@babel+plugin-transform-modules-commonjs@7.23.0_@babel+core@7.23.2/node_modules/@babel/plugin-transform-modules-commonjs/lib/lazy.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.lazyImportsHook=void 0;var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/index.js"),_helperModuleTransforms=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.23.0_@babel+core@7.23.2/node_modules/@babel/helper-module-transforms/lib/index.js");exports.lazyImportsHook=lazy=>({name:"@babel/plugin-transform-modules-commonjs/lazy",version:"7.23.0",getWrapperPayload:(source,metadata)=>(0,_helperModuleTransforms.isSideEffectImport)(metadata)||metadata.reexportAll?null:!0===lazy?/\./.test(source)?null:"lazy/function":Array.isArray(lazy)?-1===lazy.indexOf(source)?null:"lazy/function":"function"==typeof lazy?lazy(source)?"lazy/function":null:void 0,buildRequireWrapper(name,init,payload,referenced){if("lazy/function"===payload)return!!referenced&&_core.template.statement.ast`
function ${name}() {
const data = ${init};
${name} = function(){ return data; };
return data;
}
`},wrapReference(ref,payload){if("lazy/function"===payload)return _core.types.callExpression(ref,[])}})},"./node_modules/.pnpm/@babel+plugin-transform-nullish-coalescing-operator@7.22.11_@babel+core@7.23.2/node_modules/@babel/plugin-transform-nullish-coalescing-operator/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.22.5/node_modules/@babel/helper-plugin-utils/lib/index.js"),_core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/index.js"),_default=(0,_helperPluginUtils.declare)(((api,{loose=!1})=>{var _api$assumption;api.assertVersion(7);const noDocumentAll=null!=(_api$assumption=api.assumption("noDocumentAll"))?_api$assumption:loose;return{name:"transform-nullish-coalescing-operator",inherits:__webpack_require__("./node_modules/.pnpm/@babel+plugin-syntax-nullish-coalescing-operator@7.8.3_@babel+core@7.23.2/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/lib/index.js").Z,visitor:{LogicalExpression(path){const{node,scope}=path;if("??"!==node.operator)return;let ref,assignment;if(scope.isStatic(node.left))ref=node.left,assignment=_core.types.cloneNode(node.left);else{if(scope.path.isPattern())return void path.replaceWith(_core.template.statement.ast`(() => ${path.node})()`);ref=scope.generateUidIdentifierBasedOnNode(node.left),scope.push({id:_core.types.cloneNode(ref)}),assignment=_core.types.assignmentExpression("=",ref,node.left)}path.replaceWith(_core.types.conditionalExpression(noDocumentAll?_core.types.binaryExpression("!=",assignment,_core.types.nullLiteral()):_core.types.logicalExpression("&&",_core.types.binaryExpression("!==",assignment,_core.types.nullLiteral()),_core.types.binaryExpression("!==",_core.types.cloneNode(ref),scope.buildUndefinedNode())),_core.types.cloneNode(ref),node.right))}}}}));exports.default=_default},"./node_modules/.pnpm/@babel+plugin-transform-optional-chaining@7.23.0_@babel+core@7.23.2/node_modules/@babel/plugin-transform-optional-chaining/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.22.5/node_modules/@babel/helper-plugin-utils/lib/index.js"),core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.23.2/node_modules/@babel/core/lib/index.js"),helperSkipTransparentExpressionWrappers=__webpack_require__("./node_modules/.pnpm/@babel+helper-skip-transparent-expression-wrappers@7.22.5/node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js");function willPathCastToBoolean(path){const maybeWrapped=findOutermostTransparentParent(path),{node,parentPath}=maybeWrapped;if(parentPath.isLogicalExpression()){const{operator,right}=parentPath.node;if("&&"===operator||"||"===operator||"??"===operator&&node===right)return willPathCastToBoolean(parentPath)}if(parentPath.isSequenceExpression()){const{expressions}=parentPath.node;return expressions[expressions.length-1]!==node||willPathCastToBoolean(parentPath)}return parentPath.isConditional({test:node})||parentPath.isUnaryExpression({operator:"!"})||parentPath.isLoop({test:node})}function findOutermostTransparentParent(path){let maybeWrapped=path;return path.findParent((p=>{if(!helperSkipTransparentExpressionWrappers.isTransparentExprWrapper(p.node))return!0;maybeWrapped=p})),maybeWrapped}const last=arr=>arr[arr.length-1];function isSimpleMemberExpression(expression){return expression=helperSkipTransparentExpressionWrappers.skipTransparentExprWrapperNodes(expression),core.types.isIdentifier(expression)||core.types.isSuper(expression)||core.types.isMemberExpression(expression)&&!expression.computed&&isSimpleMemberExpression(expression.object)}const NULLISH_CHECK=core.template.expression("%%check%% === null || %%ref%% === void 0"),NULLISH_CHECK_NO_DDA=core.template.expression("%%check%%
this.${t.cloneNode(id)} = ${t.cloneNode(id)}`),paramPath.replaceWith(paramPath.get("parameter")),scope.registerBinding("param",paramPath)}}(0,_helperCreateClassFeaturesPlugin.injectInitialization)(classPath,path,assigns)}};return{name:"transform-typescript",inherits:_pluginSyntaxTypescript.default,visitor:{Pattern:visitPattern,Identifier:visitPattern,RestElement:visitPattern,Program:{enter(path,state){const{file}=state;let fileJsxPragma=null,fileJsxPragmaFrag=null;const programScope=path.scope;if(GLOBAL_TYPES.has(programScope)||GLOBAL_TYPES.set(programScope,new Set),file.ast.comments)for(const comment of file.ast.comments){const jsxMatches=JSX_PRAGMA_REGEX.exec(comment.value);jsxMatches&&(jsxMatches[1]?fileJsxPragmaFrag=jsxMatches[2]:fileJsxPragma=jsxMatches[2])}let pragmaImportName=fileJsxPragma||jsxPragma;pragmaImportName&&([pragmaImportName]=pragmaImportName.split("."));let pragmaFragImportName=fileJsxPragmaFrag||jsxPragmaFrag;pragmaFragImportName&&([pragmaFragImportName]=pragmaFragImportName.split("."));for(let stmt of path.get("body"))if(stmt.isImportDeclaration()){if(NEEDS_EXPLICIT_ESM.has(state.file.ast.program)||NEEDS_EXPLICIT_ESM.set(state.file.ast.program,!0),"type"===stmt.node.importKind){for(const specifier of stmt.node.specifiers)registerGlobalType(programScope,specifier.local.name);stmt.remove();continue}const importsToRemove=new Set,specifiersLength=stmt.node.specifiers.length,isAllSpecifiersElided=()=>specifiersLength>0&&specifiersLength===importsToRemove.size;for(const specifier of stmt.node.specifiers)if("ImportSpecifier"===specifier.type&&"type"===specifier.importKind){registerGlobalType(programScope,specifier.local.name);const binding=stmt.scope.getBinding(specifier.local.name);binding&&importsToRemove.add(binding.path)}if(onlyRemoveTypeImports)NEEDS_EXPLICIT_ESM.set(path.node,!1);else{if(0===stmt.node.specifiers.length){NEEDS_EXPLICIT_ESM.set(path.node,!1);continue}for(const specifier of stmt.node.specifiers){const binding=stmt.scope.getBinding(specifier.local.name);binding&&!importsToRemove.has(binding.path)&&(isImportTypeOnly({binding,programPath:path,pragmaImportName,pragmaFragImportName})?importsToRemove.add(binding.path):NEEDS_EXPLICIT_ESM.set(path.node,!1))}}if(isAllSpecifiersElided()&&!onlyRemoveTypeImports)stmt.remove();else for(const importPath of importsToRemove)importPath.remove()}else if(stmt.isExportDeclaration()&&(stmt=stmt.get("declaration")),stmt.isVariableDeclaration({declare:!0}))for(const name of Object.keys(stmt.getBindingIdentifiers()))registerGlobalType(programScope,name);else(stmt.isTSTypeAliasDeclaration()||stmt.isTSDeclareFunction()&&stmt.get("id").isIdentifier()||stmt.isTSInterfaceDeclaration()||stmt.isClassDeclaration({declare:!0})||stmt.isTSEnumDeclaration({declare:!0})||stmt.isTSModuleDeclaration({declare:!0})&&stmt.get("id").isIdentifier())&&registerGlobalType(programScope,stmt.node.id.name)},exit(path){"module"===path.node.sourceType&&NEEDS_EXPLICIT_ESM.get(path.node)&&path.pushContainer("body",t.exportNamedDeclaration())}},ExportNamedDeclaration(path,state){if(NEEDS_EXPLICIT_ESM.has(state.file.ast.program)||NEEDS_EXPLICIT_ESM.set(state.file.ast.program,!0),"type"!==path.node.exportKind)if(path.node.source&&path.node.specifiers.length>0&&path.node.specifiers.every((specifier=>"ExportSpecifier"===specifier.type&&"type"===specifier.exportKind)))path.remove();else if(!path.node.source&&path.node.specifiers.length>0&&path.node.specifiers.every((specifier=>t.isExportSpecifier(specifier)&&isGlobalType(path,specifier.local.name))))path.remove();else{if(t.isTSModuleDeclaration(path.node.declaration)){const namespace=path.node.declaration,{id}=namespace;if(t.isIdentifier(id))if(path.scope.hasOwnBinding(id.name))path.replaceWith(namespace);else{const[newExport]=path.replaceWithMultiple([t.exportNamedDeclaration(t.variableDeclaration("let",[t.variableDeclarator(t.cloneNode(id))])),namespace]);path.scope.registerDeclaration(newExport)}}NEEDS_EXPLICIT_ESM.set(state.file.ast.program,!1)}else path.remove()},ExportAllDeclaration(path){"type"===path.node.exportKind&&path.remo
${_core.types.cloneNode(memberExpr)} ||
(${_core.types.cloneNode(memberExpr)} = ${fallthroughValue})
`}return _core.template.statement.ast`
(function (${_core.types.identifier(name)}) {
${namespaceTopLevel}
})(${realName} || (${_core.types.cloneNode(realName)} = ${fallthroughValue}));
`}},"./node_modules/.pnpm/@babel+preset-typescript@7.23.2_@babel+core@7.23.2/node_modules/@babel/preset-typescript/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.22.5/node_modules/@babel/helper-plugin-utils/lib/index.js"),transformTypeScript=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.22.15_@babel+core@7.23.2/node_modules/@babel/plugin-transform-typescript/lib/index.js");__webpack_require__("./node_modules/.pnpm/@babel+plugin-syntax-jsx@7.22.5_@babel+core@7.23.2/node_modules/@babel/plugin-syntax-jsx/lib/index.js");var transformModulesCommonJS=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-modules-commonjs@7.23.0_@babel+core@7.23.2/node_modules/@babel/plugin-transform-modules-commonjs/lib/index.js"),helperValidatorOption=__webpack_require__("./node_modules/.pnpm/@babel+helper-validator-option@7.22.15/node_modules/@babel/helper-validator-option/lib/index.js");function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var transformTypeScript__default=_interopDefault(transformTypeScript),transformModulesCommonJS__default=_interopDefault(transformModulesCommonJS);const v=new helperValidatorOption.OptionValidator("@babel/preset-typescript");var pluginRewriteTSImports=helperPluginUtils.declare((function({types:t}){return{name:"preset-typescript/plugin-rewrite-ts-imports",visitor:{"ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration"({node}){const{source}=node;"value"===(t.isImportDeclaration(node)?node.importKind:node.exportKind)&&source&&/[\\/]/.test(source.value)&&(source.value=source.value.replace(/(\.[mc]?)ts$/,"$1js").replace(/\.tsx$/,".js"))}}}})),index=helperPluginUtils.declarePreset(((api,opts)=>{api.assertVersion(7);const{allExtensions,ignoreExtensions,allowNamespaces,disallowAmbiguousJSXLike,isTSX,jsxPragma,jsxPragmaFrag,onlyRemoveTypeImports,optimizeConstEnums,rewriteImportExtensions}=function(options={}){let{allowNamespaces=!0,jsxPragma,onlyRemoveTypeImports}=options;const TopLevelOptions_ignoreExtensions="ignoreExtensions",TopLevelOptions_disallowAmbiguousJSXLike="disallowAmbiguousJSXLike",TopLevelOptions_jsxPragmaFrag="jsxPragmaFrag",TopLevelOptions_optimizeConstEnums="optimizeConstEnums",TopLevelOptions_rewriteImportExtensions="rewriteImportExtensions",TopLevelOptions_allExtensions="allExtensions",TopLevelOptions_isTSX="isTSX",jsxPragmaFrag=v.validateStringOption(TopLevelOptions_jsxPragmaFrag,options.jsxPragmaFrag,"React.Fragment");var allExtensions=v.validateBooleanOption(TopLevelOptions_allExtensions,options.allExtensions,!1),isTSX=v.validateBooleanOption(TopLevelOptions_isTSX,options.isTSX,!1);isTSX&&v.invariant(allExtensions,"isTSX:true requires allExtensions:true");const ignoreExtensions=v.validateBooleanOption(TopLevelOptions_ignoreExtensions,options.ignoreExtensions,!1),disallowAmbiguousJSXLike=v.validateBooleanOption(TopLevelOptions_disallowAmbiguousJSXLike,options.disallowAmbiguousJSXLike,!1);disallowAmbiguousJSXLike&&v.invariant(allExtensions,"disallowAmbiguousJSXLike:true requires allExtensions:true");const normalized={ignoreExtensions,allowNamespaces,disallowAmbiguousJSXLike,jsxPragma,jsxPragmaFrag,onlyRemoveTypeImports,optimizeConstEnums:v.validateBooleanOption(TopLevelOptions_optimizeConstEnums,options.optimizeConstEnums,!1),rewriteImportExtensions:v.validateBooleanOption(TopLevelOptions_rewriteImportExtensions,options.rewriteImportExtensions,!1)};return normalized.allExtensions=allExtensions,normalized.isTSX=isTSX,normalized}(opts),pluginOptions=disallowAmbiguousJSXLike=>({allowDeclareFields:opts.allowDeclareFields,allowNamespaces,disallowAmbiguousJSXLike,jsxPragma,jsxPragmaFrag,onlyRemoveTypeImports,optimizeConstEnums}),getPlugins=(isTSX,disallowAmbiguousJSXLike)=>[[transformTypeScript__default.default,Object.assign({isTSX},pluginOptions(disallowAmbiguousJSXLike))]];return{plugins:rewriteImportExtensions?[pluginRewriteTSImports]:[],overrides:all