System.register(["@babel/core","@babel/template"],function(m){"use strict";var r;return{setters:[null,function(a){r=a.default}],execute:function(){m("default",u);function a(t,i,e=[]){const n=[...c,...e];if(t.isIdentifier(i)&&n.includes(i.name))return!0;if(t.isMemberExpression(i)){const{property:o}=i;if(t.isIdentifier(o)&&n.includes(o.name))return!0}return!1}const c=["atom","atomFamily","atomWithDefault","atomWithObservable","atomWithReducer","atomWithReset","atomWithStorage","freezeAtom","loadable","selectAtom","splitAtom","unwrap","atomWithMachine","atomWithImmer","atomWithProxy","atomWithQuery","atomWithMutation","atomWithSubscription","atomWithStore","atomWithHash","atomWithLocation","focusAtom","atomWithValidate","validateAtoms","atomWithCache","atomWithRecoilValue"],d=r.default||r;function u({types:t},i){return{visitor:{ExportDefaultDeclaration(e,n){const{node:o}=e;if(t.isCallExpression(o.declaration)&&a(t,o.declaration.callee,i==null?void 0:i.customAtomNames)){const l=(n.filename||"unknown").replace(/\.\w+$/,"");let s=l.split("/").pop();s==="index"&&(s=l.slice(0,-6).split("/").pop()||"unknown");const f=d(`
          const %%atomIdentifier%% = %%atom%%;
          export default %%atomIdentifier%%
          `)({atomIdentifier:t.identifier(s),atom:o.declaration});e.replaceWithMultiple(f)}},VariableDeclarator(e){t.isIdentifier(e.node.id)&&t.isCallExpression(e.node.init)&&a(t,e.node.init.callee,i==null?void 0:i.customAtomNames)&&e.parentPath.insertAfter(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(t.identifier(e.node.id.name),t.identifier("debugLabel")),t.stringLiteral(e.node.id.name))))}}}}}}});
