prettier 3.8.0 → 3.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/plugins/estree.js CHANGED
@@ -35,7 +35,7 @@ $1 $2
35
35
 
36
36
  `)+i}function zc(e){if(!ce(e))return!1;let t=`*${e.value}*`.split(`
37
37
  `);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var ds=new WeakMap;function Zc(e){return ds.has(e)||ds.set(e,zc(e)),ds.get(e)}var wo=Zc;function _o(e,t){let r=e.node;if(At(r))return t.originalText.slice(w(r),I(r)).trimEnd();if(wo(r))return el(r);if(ce(r))return["/*",qe(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function el(e){let t=e.value.split(`
38
- `);return["/*",L(E,t.map((r,n)=>n===0?r.trimEnd():" "+(n<t.length-1?r.trim():r.trimStart()))),"*/"]}function Cs(e,t){if(e.isRoot)return!1;let{node:r,key:n,parent:s}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&sl(r)&&xr(e))return!0;if(tl(r))return!1;if(r.type==="Identifier"){if(r.extra?.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r.name)||n==="left"&&(r.name==="async"&&!s.await||r.name==="let")&&s.type==="ForOfStatement")return!0;if(r.name==="let"){let i=e.findAncestor(o=>o.type==="ForOfStatement")?.left;if(i&&ye(i,o=>o===r))return!0}if(n==="object"&&r.name==="let"&&s.type==="MemberExpression"&&s.computed&&!s.optional){let i=e.findAncestor(u=>u.type==="ExpressionStatement"||u.type==="ForStatement"||u.type==="ForInStatement"),o=i?i.type==="ExpressionStatement"?i.expression:i.type==="ForStatement"?i.init:i.left:void 0;if(o&&ye(o,u=>u===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let i=e.findAncestor(o=>!Ae(o));if(i!==s&&i.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let i=e.findAncestor(o=>o.type==="ExpressionStatement")?.expression;if(i&&ye(i,o=>o===r))return!0}if(r.type==="ObjectExpression"){let i=e.findAncestor(o=>o.type==="ArrowFunctionExpression")?.body;if(i&&i.type!=="SequenceExpression"&&i.type!=="AssignmentExpression"&&ye(i,o=>o===r))return!0}switch(s.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&R(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return Mo(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"&&!ol(r))return!0;break;case"TypeAnnotation":if(e.match(void 0,void 0,(i,o)=>o==="returnType"&&i.type==="ArrowFunctionExpression")&&nl(r))return!0;break;case"BinaryExpression":if(n==="left"&&(s.operator==="in"||s.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(n==="init"&&e.match(void 0,void 0,(i,o)=>o==="declarations"&&i.type==="VariableDeclaration",(i,o)=>o==="left"&&i.type==="ForInStatement"))return!0;break}switch(r.type){case"UpdateExpression":if(s.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&s.operator==="+"||r.operator==="--"&&s.operator==="-");case"UnaryExpression":switch(s.type){case"UnaryExpression":return r.operator===s.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&s.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(s.type==="UpdateExpression"||r.operator==="in"&&rl(e))return!0;if(r.operator==="|>"&&r.extra?.parenthesized){let i=e.grandparent;if(i.type==="BinaryExpression"&&i.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Ae(r);case"ConditionalExpression":return Ae(r)||yi(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(r.type==="TSTypeAssertion"||Ae(r));case"LogicalExpression":if(r.type==="LogicalExpression")return s.operator!==r.operator;case"BinaryExpression":{let{operator:i,type:o}=r;if(!i&&o!=="TSTypeAssertion")return!0;let u=yr(i),p=s.operator,c=yr(p);return!!(c>u||n==="right"&&c===u||c===u&&!dr(p,i)||c<u&&i==="%"&&(p==="+"||p==="-")||Ti(p))}default:return!1}case"SequenceExpression":return s.type!=="ForStatement";case"YieldExpression":if(s.type==="AwaitExpression"||s.type==="TSTypeAssertion")return!0;case"AwaitExpression":switch(s.type){case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"SpreadElement":case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"ConditionalExpression":return n==="test";case"BinaryExpression":return!(!r.argument&&s.operator==="|>");default:return!1}case"TSFunctionType":if(e.match(i=>i.type==="TSFunctionType",(i,o)=>o==="typeAnnotation"&&i.type==="TSTypeAnnotation",(i,o)=>o==="returnType"&&i.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":case"ConditionalTypeAnnotation":if(n==="extendsType"&&Ue(r)&&s.type===r.type||n==="checkType"&&Ue(s))return!0;if(n==="extendsType"&&s.type==="TSConditionalType"){let{typeAnnotation:i}=r.returnType||r.typeAnnotation;if(i.type==="TSTypePredicate"&&i.typeAnnotation&&(i=i.typeAnnotation.typeAnnotation),i.type==="TSInferType"&&i.typeParameter.constraint)return!0}case"TSUnionType":case"TSIntersectionType":if(Se(s)||xt(s))return!0;case"TSInferType":if(r.type==="TSInferType"){if(s.type==="TSRestType")return!1;if(n==="types"&&(s.type==="TSUnionType"||s.type==="TSIntersectionType")&&r.typeParameter.type==="TSTypeParameter"&&r.typeParameter.constraint)return!0}case"TSTypeOperator":return s.type==="TSArrayType"||s.type==="TSOptionalType"||s.type==="TSRestType"||n==="objectType"&&s.type==="TSIndexedAccessType"||s.type==="TSTypeOperator"||s.type==="TSTypeAnnotation"&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return n==="objectType"&&s.type==="TSIndexedAccessType"||n==="elementType"&&s.type==="TSArrayType";case"TypeOperator":return s.type==="ArrayTypeAnnotation"||s.type==="NullableTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType")||s.type==="TypeOperator";case"TypeofTypeAnnotation":return n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType")||n==="elementType"&&s.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return s.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return s.type==="TypeOperator"||s.type==="KeyofTypeAnnotation"||s.type==="ArrayTypeAnnotation"||s.type==="NullableTypeAnnotation"||s.type==="IntersectionTypeAnnotation"||s.type==="UnionTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return s.type==="ArrayTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"ComponentTypeAnnotation":case"FunctionTypeAnnotation":{if(r.type==="ComponentTypeAnnotation"&&(r.rendersType===null||r.rendersType===void 0))return!1;if(e.match(void 0,(o,u)=>u==="typeAnnotation"&&o.type==="TypeAnnotation",(o,u)=>u==="returnType"&&o.type==="ArrowFunctionExpression")||e.match(void 0,(o,u)=>u==="typeAnnotation"&&o.type==="TypePredicate",(o,u)=>u==="typeAnnotation"&&o.type==="TypeAnnotation",(o,u)=>u==="returnType"&&o.type==="ArrowFunctionExpression"))return!0;let i=s.type==="NullableTypeAnnotation"?e.grandparent:s;return i.type==="UnionTypeAnnotation"||i.type==="IntersectionTypeAnnotation"||i.type==="ArrayTypeAnnotation"||n==="objectType"&&(i.type==="IndexedAccessType"||i.type==="OptionalIndexedAccessType")||n==="checkType"&&s.type==="ConditionalTypeAnnotation"||n==="extendsType"&&s.type==="ConditionalTypeAnnotation"&&r.returnType?.type==="InferTypeAnnotation"&&r.returnType?.typeParameter.bound||i.type==="NullableTypeAnnotation"||s.type==="FunctionTypeParam"&&s.name===null&&K(r).some(o=>o.typeAnnotation?.type==="NullableTypeAnnotation")}case"OptionalIndexedAccessType":return n==="objectType"&&s.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof r.value=="string"&&s.type==="ExpressionStatement"&&typeof s.directive!="string"){let i=e.grandparent;return i.type==="Program"||i.type==="BlockStatement"}return n==="object"&&J(s)&&Ce(r);case"AssignmentExpression":return!((n==="init"||n==="update")&&s.type==="ForStatement"||n==="expression"&&r.left.type!=="ObjectPattern"&&s.type==="ExpressionStatement"||n==="key"&&s.type==="TSPropertySignature"||s.type==="AssignmentExpression"||n==="expressions"&&s.type==="SequenceExpression"&&e.match(void 0,void 0,(i,o)=>(o==="init"||o==="update")&&i.type==="ForStatement")||n==="value"&&s.type==="Property"&&e.match(void 0,void 0,(i,o)=>o==="properties"&&i.type==="ObjectPattern")||s.type==="NGChainedExpression"||n==="node"&&s.type==="JsExpressionRoot");case"ConditionalExpression":switch(s.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"ConditionalExpression":return t.experimentalTernaries?!1:n==="test";case"MemberExpression":case"OptionalMemberExpression":return n==="object";default:return!1}case"FunctionExpression":switch(s.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(s.type){case"BinaryExpression":return s.operator!=="|>"||r.extra?.parenthesized;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":case"MatchExpressionCase":return!0;case"TSInstantiationExpression":return n==="expression";case"ConditionalExpression":return n==="test";default:return!1}case"ClassExpression":switch(s.type){case"NewExpression":return n==="callee";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(il(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")){let i=r;for(;i;)switch(i.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":i=i.object;break;case"TaggedTemplateExpression":i=i.tag;break;case"TSNonNullExpression":i=i.expression;break;default:return!1}}return!1;case"BindExpression":return n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")||n==="object"&&J(s);case"NGPipeExpression":return!(s.type==="NGRoot"||s.type==="NGMicrosyntaxExpression"||s.type==="ObjectProperty"&&!r.extra?.parenthesized||q(s)||n==="arguments"&&M(s)||n==="right"&&s.type==="NGPipeExpression"||n==="property"&&s.type==="MemberExpression"||s.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return n==="callee"||n==="left"&&s.type==="BinaryExpression"&&s.operator==="<"||!q(s)&&s.type!=="ArrowFunctionExpression"&&s.type!=="AssignmentExpression"&&s.type!=="AssignmentPattern"&&s.type!=="BinaryExpression"&&s.type!=="NewExpression"&&s.type!=="ConditionalExpression"&&s.type!=="ExpressionStatement"&&s.type!=="JsExpressionRoot"&&s.type!=="JSXAttribute"&&s.type!=="JSXElement"&&s.type!=="JSXExpressionContainer"&&s.type!=="JSXFragment"&&s.type!=="LogicalExpression"&&!M(s)&&!Oe(s)&&s.type!=="ReturnStatement"&&s.type!=="ThrowStatement"&&s.type!=="TypeCastExpression"&&s.type!=="VariableDeclarator"&&s.type!=="YieldExpression"&&s.type!=="MatchExpressionCase";case"TSInstantiationExpression":return n==="object"&&J(s);case"MatchOrPattern":return s.type==="MatchAsPattern"}return!1}var tl=k(["BlockStatement","BreakStatement","ComponentDeclaration","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareComponent","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareHook","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareNamespace","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","HookDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function rl(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if(n?.type==="ForStatement"&&n.init===r)return!0;r=n}return!1}function nl(e){return Er(e,t=>t.type==="ObjectTypeAnnotation"&&Er(t,r=>r.type==="FunctionTypeAnnotation"))}function sl(e){return se(e)}function xr(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if(r==="arguments"&&e.isLast)return e.callParent(xr);break;case"ObjectProperty":if(r==="value")return e.callParent(()=>e.key==="properties"&&e.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return e.callParent(xr);break;case"ConditionalExpression":if(r==="alternate")return e.callParent(xr);break;case"UnaryExpression":if(t.prefix)return e.callParent(xr);break}return!1}function Mo(e,t){let{node:r,parent:n}=e;return r.type==="FunctionExpression"||r.type==="ClassExpression"?n.type==="ExportDefaultDeclaration"||!Cs(e,t):!Xt(r)||n.type!=="ExportDefaultDeclaration"&&Cs(e,t)?!1:e.call(()=>Mo(e,t),...Rr(r))}function il(e){return!!(e.match(void 0,(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(t=>t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(t=>t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(void 0,(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(void 0,(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(t=>t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&(t.type==="CallExpression"||t.type==="NewExpression"))||e.match(t=>t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&t.type==="CallExpression")||e.match(t=>t.type==="CallExpression"||t.type==="MemberExpression",(t,r)=>r==="expression"&&t.type==="ChainExpression")&&(e.match(void 0,void 0,(t,r)=>r==="callee"&&(t.type==="CallExpression"&&!t.optional||t.type==="NewExpression")||r==="object"&&t.type==="MemberExpression"&&!t.optional)||e.match(void 0,void 0,(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&t.type==="CallExpression"))||e.match(t=>t.type==="CallExpression"||t.type==="MemberExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&t.type==="CallExpression"))}function As(e){return e.type==="Identifier"?!0:J(e)?!e.computed&&!e.optional&&e.property.type==="Identifier"&&As(e.object):!1}function ol(e){return e.type==="ChainExpression"&&(e=e.expression),As(e)||M(e)&&!e.optional&&As(e.callee)}var ge=Cs;function ul(e,t){let r=t-1;r=ze(e,r,{backwards:!0}),r=Ze(e,r,{backwards:!0}),r=ze(e,r,{backwards:!0});let n=Ze(e,r,{backwards:!0});return r!==n}var No=ul;var al=()=>!0;function Ts(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function pl(e,t){let r=e.node,n=[Ts(e,t)],{printer:s,originalText:i,locStart:o,locEnd:u}=t;if(s.isBlockComment?.(r)){let y=Z(i,u(r))?Z(i,o(r),{backwards:!0})?E:A:" ";n.push(y)}else n.push(E);let c=Ze(i,ze(i,u(r)));return c!==!1&&Z(i,c)&&n.push(E),n}function cl(e,t,r){let n=e.node,s=Ts(e,t),{printer:i,originalText:o,locStart:u}=t,p=i.isBlockComment?.(n);if(r?.hasLineSuffix&&!r?.isBlock||Z(o,u(n),{backwards:!0})){let c=No(o,u(n));return{doc:as([E,c?E:"",s]),isBlock:p,hasLineSuffix:!0}}return!p||r?.hasLineSuffix?{doc:[as([" ",s]),ke],isBlock:p,hasLineSuffix:!0}:{doc:[" ",s],isBlock:p,hasLineSuffix:!1}}function v(e,t,r={}){let{node:n}=e;if(!R(n?.comments))return"";let{indent:s=!1,marker:i,filter:o=al}=r,u=[];if(e.each(({node:c})=>{c.leading||c.trailing||c.marker!==i||!o(c)||u.push(Ts(e,t))},"comments"),u.length===0)return"";let p=L(E,u);return s?m([E,p]):p}function Mt(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(p=>!n.has(p)).length===0)return{leading:"",trailing:""};let i=[],o=[],u;return e.each(()=>{let p=e.node;if(n?.has(p))return;let{leading:c,trailing:y}=p;c?i.push(pl(e,t)):y&&(u=cl(e,t,u),o.push(u.doc))},"comments"),{leading:i,trailing:o}}function De(e,t,r){let{leading:n,trailing:s}=Mt(e,r);return!n&&!s?t:Ar(t,i=>[n,i,s])}var Et=class extends Error{name="ArgExpansionBailout"};function Ke(e,t,r,n,s){let i=e.node,o=K(i),u=s&&i.typeParameters?r("typeParameters"):"";if(o.length===0)return[u,"(",v(e,t,{filter:d=>_e(t.originalText,I(d))===")"}),")"];let{parent:p}=e,c=It(p),y=jo(i),D=[];if(gi(e,(d,b)=>{let B=b===o.length-1;B&&i.rest&&D.push("..."),D.push(r()),!B&&(D.push(","),c||y?D.push(" "):oe(o[b],t)?D.push(E,E):D.push(A))}),n&&!ml(e)){if(ne(u)||ne(D))throw new Et;return l([_t(u),"(",_t(D),")"])}let F=o.every(d=>!R(d.decorators));return y&&F?[u,"(",...D,")"]:c?[u,"(",...D,")"]:(Gr(p)||Fi(p)||p.type==="TypeAlias"||p.type==="UnionTypeAnnotation"||p.type==="IntersectionTypeAnnotation"||p.type==="FunctionTypeAnnotation"&&p.returnType===i)&&o.length===1&&o[0].name===null&&i.this!==o[0]&&o[0].typeAnnotation&&i.typeParameters===null&&Vt(o[0].typeAnnotation)&&!i.rest?t.arrowParens==="always"||i.type==="HookTypeAnnotation"?["(",...D,")"]:D:[u,"(",m([f,...D]),P(!xi(i)&&ie(t,"all")?",":""),f,")"]}function jo(e){if(!e)return!1;let t=K(e);if(t.length!==1)return!1;let[r]=t;return!T(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&Je(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&Je(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||se(r.right)&&r.right.properties.length===0||q(r.right)&&r.right.elements.length===0))}function ll(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function lt(e,t){let r=ll(e);if(!r)return!1;let n=e.typeParameters?.params;if(n){if(n.length>1)return!1;if(n.length===1){let s=n[0];if(s.constraint||s.default)return!1}}return K(e).length===1&&(Je(r)||ne(t))}function ml(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function vo(e){let t=K(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}function Nt(e,t){return(t==="params"||t==="this"||t==="rest")&&jo(e)}function X(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":M(t)||J(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function sn(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var Dl=k(["DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function Q(e){let{node:t}=e;return t.declare||Dl(t)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var fl=k(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Zt({node:e}){return e.abstract||fl(e)?"abstract ":""}function Ft(e,t,r){return e.type==="EmptyStatement"?T(e,x.Leading)?[" ",t]:t:e.type==="BlockStatement"||r?[" ",t]:m([A,t])}function jt(e){return e.accessibility?e.accessibility+" ":""}var yl=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,El=e=>yl.test(e),Ro=El;function Fl(e){return e.length===1?e:e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u,"$1").replace(/^([+-])?\./u,"$10.").replace(/(\.\d+?)0+(?=e|$)/u,"$1").replace(/\.(?=e|$)/u,"")}var dt=Fl;var dl=0;function on(e,t,r){let{node:n,parent:s,grandparent:i,key:o}=e,u=o!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),p=n.operator==="|>"&&e.root.extra?.__isUsingHackPipeline,c=xs(e,t,r,!1,u);if(u)return c;if(p)return l(c);if(o==="callee"&&(M(s)||s.type==="NewExpression")||s.type==="UnaryExpression"||J(s)&&!s.computed)return l([m([f,...c]),f]);let y=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&i.type==="JSXAttribute"||n.operator!=="|"&&s.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&i.type==="NGMicrosyntax"&&i.body.length===1)||n===s.body&&s.type==="ArrowFunctionExpression"||n!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&i.type!=="ReturnStatement"&&i.type!=="ThrowStatement"&&!M(i)&&i.type!=="NewExpression"||s.type==="TemplateLiteral"||Al(e),D=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||Oe(s),F=Te(n.left)&&dr(n.operator,n.left.operator);if(y||er(n)&&!F||!er(n)&&D)return l(c);if(c.length===0)return"";let C=H(n.right),d=c.findIndex(S=>typeof S!="string"&&!Array.isArray(S)&&S.type===Fe),b=c.slice(0,d===-1?1:d+1),B=c.slice(b.length,C?-1:void 0),O=Symbol("logicalChain-"+ ++dl),h=l([...b,m(B)],{id:O});if(!C)return h;let g=N(0,c,-1);return l([h,yt(g,{groupId:O})])}function xs(e,t,r,n,s){let{node:i}=e;if(!Te(i))return[l(r())];let o=[];dr(i.operator,i.left.operator)?o=e.call(()=>xs(e,t,r,!0,s),"left"):o.push(l(r("left")));let u=er(i),p=i.right.type==="ChainExpression"?i.right.expression:i.right,c=(i.operator==="|>"||i.type==="NGPipeExpression"||Cl(e,t))&&!Ee(t.originalText,p),D=!T(p,x.Leading,Hr)&&Ee(t.originalText,p),F=i.type==="NGPipeExpression"?"|":i.operator,C=i.type==="NGPipeExpression"&&i.arguments.length>0?l(m([f,": ",L([A,": "],e.map(()=>xe(2,l(r())),"arguments"))])):"",d;if(u)d=[F,Ee(t.originalText,p)?m([A,r("right"),C]):[" ",r("right"),C]];else{let g=F==="|>"&&e.root.extra?.__isUsingHackPipeline?e.call(()=>xs(e,t,r,!0,s),"right"):r("right");if(t.experimentalOperatorPosition==="start"){let S="";if(D)switch(We(g)){case Be:S=g.splice(0,1)[0];break;case Pe:S=g.contents.splice(0,1)[0];break}d=[A,S,F," ",g,C]}else d=[c?A:"",F,c?" ":A,g,C]}let{parent:b}=e,B=T(i.left,x.Trailing|x.Line);if((B||!(s&&i.type==="LogicalExpression")&&b.type!==i.type&&i.left.type!==i.type&&i.right.type!==i.type)&&(d=l(d,{shouldBreak:B})),t.experimentalOperatorPosition==="start"?o.push(u||D?" ":"",d):o.push(c?"":" ",d),n&&T(i)){let h=Qt(De(e,o,t));return h.type===Me?h.parts:Array.isArray(h)?h:[h]}return o}function er(e){return e.type!=="LogicalExpression"?!1:!!(se(e.right)&&e.right.properties.length>0||q(e.right)&&e.right.elements.length>0||H(e.right))}var Jo=e=>e.type==="BinaryExpression"&&e.operator==="|";function Cl(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&Jo(e.node)&&!e.hasAncestor(r=>!Jo(r)&&r.type!=="JsExpressionRoot")}function Al(e){if(e.key!=="arguments")return!1;let{parent:t}=e;if(!(M(t)&&!t.optional&&t.arguments.length===1))return!1;let{callee:r}=t;return r.type==="Identifier"&&r.name==="Boolean"}function un(e,t,r){let{node:n}=e,{parent:s}=e,i=s.type!=="TypeParameterInstantiation"&&(!Ue(s)||!t.experimentalTernaries)&&s.type!=="TSTypeParameterInstantiation"&&s.type!=="GenericTypeAnnotation"&&s.type!=="TSTypeReference"&&s.type!=="TSTypeAssertion"&&s.type!=="TupleTypeAnnotation"&&s.type!=="TSTupleType"&&!(s.type==="FunctionTypeParam"&&!s.name&&e.grandparent.this!==s)&&!((Cr(s)||s.type==="VariableDeclarator")&&Ee(t.originalText,n))&&!(Cr(s)&&T(s.id,x.Trailing|x.Line)),o=gs(n),u=e.map(()=>{let C=r();return o||(C=xe(2,C)),De(e,C,t)},"types"),p="",c="";if(Yr(e)&&({leading:p,trailing:c}=Mt(e,t)),o)return[p,L(" | ",u),c];let y=i&&!Ee(t.originalText,n),D=[P([y?A:"","| "]),L([A,"| "],u)];if(ge(e,t))return[p,l([m(D),f]),c];let F=[p,l(D)];return(s.type==="TupleTypeAnnotation"||s.type==="TSTupleType")&&s[s.type==="TupleTypeAnnotation"&&s.types?"types":"elementTypes"].length>1?[l([m([P(["(",f]),F]),f,P(")")]),c]:[l(i?m(F):F),c]}var Tl=k(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),xl=k(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);function gs(e){let{types:t}=e;if(t.some(n=>T(n)))return!1;let r=t.find(n=>xl(n));return r?t.every(n=>n===r||Tl(n)):!1}function Go(e){return Vt(e)||Je(e)?!0:Se(e)?gs(e):!1}var gl=new WeakSet;function G(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let s=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let i=e.call(Wo,r);(i==="=>"||i===":"&&T(n,x.Leading))&&(s=!0),gl.add(n)}return s?[" ",t(r)]:t(r)}var Wo=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareHook")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function an(e,t,r){let n=Wo(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function hl(e,t,r,n){let{node:s}=e,i=s.inexact?"...":"";return T(s,x.Dangling)?l([r,i,v(e,t,{indent:!0}),f,n]):[r,i,n]}function tr(e,t,r){let{node:n}=e,s=[],i="[",o="]",u=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",p=n[u];if(p.length===0)s.push(hl(e,t,i,o));else{let c=N(0,p,-1),y=c?.type!=="RestElement"&&!n.inexact,D=c===null,F=Symbol("array"),C=!t.__inJestEach&&p.length>1&&p.every((B,O,h)=>{let g=B?.type;if(!q(B)&&!se(B))return!1;let S=h[O+1];if(S&&g!==S.type)return!1;let j=q(B)?"elements":"properties";return B[j]&&B[j].length>1}),d=hs(n,t),b=y?D?",":ie(t)?d?P(",","",{groupId:F}):P(","):"":"";s.push(l([i,m([f,d?Bl(e,t,r,b):[Sl(e,t,r,u,n.inexact),b],v(e,t)]),f,o],{shouldBreak:C,id:F}))}return s.push(X(e),G(e,r)),s}function hs(e,t){return q(e)&&e.elements.length>0&&e.elements.every(r=>r&&(Ce(r)||Xn(r)&&!T(r.argument))&&!T(r,x.Trailing|x.Line,n=>!Z(t.originalText,w(n),{backwards:!0})))}function qo({node:e},{originalText:t}){let r=I(e);if(r===w(e))return!1;let{length:n}=t;for(;r<n&&t[r]!==",";)r=qt(t,Ut(t,r+1));return Yt(t,r)}function Sl(e,t,r,n,s){let i=[];return e.each(({node:o,isLast:u})=>{i.push(o?l(r()):""),(!u||s)&&i.push([",",A,o&&qo(e,t)?f:""])},n),s&&i.push("..."),i}function Bl(e,t,r,n){let s=[];return e.each(({isLast:i,next:o})=>{s.push([r(),i?n:","]),i||s.push(qo(e,t)?[E,E]:T(o,x.Leading|x.Line)?E:A)},"elements"),zr(s)}function bl(e,t,r){let{node:n}=e,s=le(n);if(s.length===0)return["(",v(e,t),")"];let i=s.length-1;if(Il(s)){let D=["("];return $t(e,(F,C)=>{D.push(r()),C!==i&&D.push(", ")}),D.push(")"),D}let o=!1,u=[];$t(e,({node:D},F)=>{let C=r();F===i||(oe(D,t)?(o=!0,C=[C,",",E,E]):C=[C,",",A]),u.push(C)});let p=!t.parser.startsWith("__ng_")&&n.type!=="ImportExpression"&&n.type!=="TSImportType"&&n.type!=="TSExternalModuleReference"&&ie(t,"all")?",":"";function c(){return l(["(",m([A,...u]),p,A,")"],{shouldBreak:!0})}if(o||e.parent.type!=="Decorator"&&Ai(s))return c();if(kl(s)){let D=u.slice(1);if(D.some(ne))return c();let F;try{F=r(Kn(n,0),{expandFirstArg:!0})}catch(C){if(C instanceof Et)return c();throw C}return ne(F)?[ke,nt([["(",l(F,{shouldBreak:!0}),", ",...D,")"],c()])]:nt([["(",F,", ",...D,")"],["(",l(F,{shouldBreak:!0}),", ",...D,")"],c()])}if(Pl(s,u,t)){let D=u.slice(0,-1);if(D.some(ne))return c();let F;try{F=r(Kn(n,-1),{expandLastArg:!0})}catch(C){if(C instanceof Et)return c();throw C}return ne(F)?[ke,nt([["(",...D,l(F,{shouldBreak:!0}),")"],c()])]:nt([["(",...D,F,")"],["(",...D,l(F,{shouldBreak:!0}),")"],c()])}let y=["(",m([f,...u]),P(p),f,")"];return Ur(e)?y:l(y,{shouldBreak:u.some(ne)||o})}function gr(e,t=!1){return se(e)&&(e.properties.length>0||T(e))||q(e)&&(e.elements.length>0||T(e))||e.type==="TSTypeAssertion"&&gr(e.expression)||Ae(e)&&gr(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||Ll(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&gr(e.body,!0)||se(e.body)||q(e.body)||!t&&(M(e.body)||e.body.type==="ConditionalExpression")||H(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function Pl(e,t,r){let n=N(0,e,-1);if(e.length===1){let i=N(0,t,-1);if(i.label?.embed&&i.label?.hug!==!1)return!0}let s=N(0,e,-2);return!T(n,x.Leading)&&!T(n,x.Trailing)&&gr(n)&&(!s||s.type!==n.type)&&(e.length!==2||s.type!=="ArrowFunctionExpression"||!q(n))&&!(e.length>1&&hs(n,r))}function kl(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&Ol(r)?!0:!T(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&Yo(r)&&!gr(r)}function Yo(e){if(e.type==="ParenthesizedExpression")return Yo(e.expression);if(Ae(e)||e.type==="TypeCastExpression"){let{typeAnnotation:t}=e;if(t.type==="TypeAnnotation"&&(t=t.typeAnnotation),t.type==="TSArrayType"&&(t=t.elementType,t.type==="TSArrayType"&&(t=t.elementType)),t.type==="GenericTypeAnnotation"||t.type==="TSTypeReference"){let r=t.type==="GenericTypeAnnotation"?t.typeParameters:t.typeArguments;r?.params.length===1&&(t=r.params[0])}return Vt(t)&&Re(e.expression,1)}return Dt(e)&&le(e).length>1?!1:Te(e)?Re(e.left,1)&&Re(e.right,1):Vn(e)||Re(e)}function Il(e){return e.length===2?Uo(e,0):e.length===3?e[0].type==="Identifier"&&Uo(e,1):!1}function Uo(e,t){let r=e[t],n=e[t+1];return r.type==="ArrowFunctionExpression"&&K(r).length===0&&r.body.type==="BlockStatement"&&n.type==="ArrayExpression"&&!e.some(s=>T(s))}function Ll(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||T(e,x.Dangling))}function Ol(e){if(!(e.type==="ObjectExpression"&&e.properties.length===1))return!1;let[t]=e.properties;return Oe(t)?!t.computed&&(t.key.type==="Identifier"&&t.key.name==="type"||V(t.key)&&t.key.value==="type")&&V(t.value)&&t.value.value==="module":!1}var hr=bl;function Ho(e,t,r){return[r("object"),l(m([f,Ss(e,t,r)]))]}function Ss(e,t,r){return["::",r("callee")]}var wl=e=>((e.type==="ChainExpression"||e.type==="TSNonNullExpression")&&(e=e.expression),M(e)&&le(e).length>0);function _l(e){let{node:t,ancestors:r}=e;for(let n of r){if(!(J(n)&&n.object===t||n.type==="TSNonNullExpression"&&n.expression===t))return n.type==="NewExpression"&&n.callee===t;t=n}return!1}function Xo(e,t,r){let n=r("object"),s=Bs(e,t,r),{node:i}=e,o=e.findAncestor(c=>!(J(c)||c.type==="TSNonNullExpression")),u=e.findAncestor(c=>!(c.type==="ChainExpression"||c.type==="TSNonNullExpression")),p=o.type==="BindExpression"||o.type==="AssignmentExpression"&&o.left.type!=="Identifier"||_l(e)||i.computed||i.object.type==="Identifier"&&i.property.type==="Identifier"&&!J(u)||(u.type==="AssignmentExpression"||u.type==="VariableDeclarator")&&(wl(i.object)||n.label?.memberChain);return pt(n.label,[n,p?s:l(m([f,s]))])}function Bs(e,t,r){let n=r("property"),{node:s}=e,i=X(e);return s.computed?!s.property||Ce(s.property)?[i,"[",n,"]"]:l([i,"[",m([f,n]),f,"]"]):[i,".",n]}function Vo(e,t,r){if(e.node.type==="ChainExpression")return e.call(()=>Vo(e,t,r),"expression");let n=(e.parent.type==="ChainExpression"?e.grandparent:e.parent).type==="ExpressionStatement",s=[];function i(_){let{originalText:re}=t,ae=at(re,I(_));return re.charAt(ae)===")"?ae!==!1&&Yt(re,ae+1):oe(_,t)}function o(){let{node:_}=e;if(_.type==="ChainExpression")return e.call(o,"expression");if(M(_)&&(Tt(_.callee)||M(_.callee))){let re=i(_);s.unshift({node:_,hasTrailingEmptyLine:re,printed:[De(e,[X(e),r("typeArguments"),hr(e,t,r)],t),re?E:""]}),e.call(o,"callee")}else Tt(_)?(s.unshift({node:_,needsParens:ge(e,t),printed:De(e,J(_)?Bs(e,t,r):Ss(e,t,r),t)}),e.call(o,"object")):_.type==="TSNonNullExpression"?(s.unshift({node:_,printed:De(e,"!",t)}),e.call(o,"expression")):s.unshift({node:_,printed:r()})}let{node:u}=e;s.unshift({node:u,printed:[X(e),r("typeArguments"),hr(e,t,r)]}),u.callee&&e.call(o,"callee");let p=[],c=[s[0]],y=1;for(;y<s.length&&(s[y].node.type==="TSNonNullExpression"||M(s[y].node)||J(s[y].node)&&s[y].node.computed&&Ce(s[y].node.property));++y)c.push(s[y]);if(!M(s[0].node))for(;y+1<s.length&&(Tt(s[y].node)&&Tt(s[y+1].node));++y)c.push(s[y]);p.push(c),c=[];let D=!1;for(;y<s.length;++y){if(D&&Tt(s[y].node)){if(s[y].node.computed&&Ce(s[y].node.property)){c.push(s[y]);continue}p.push(c),c=[],D=!1}(M(s[y].node)||s[y].node.type==="ImportExpression")&&(D=!0),c.push(s[y]),T(s[y].node,x.Trailing)&&(p.push(c),c=[],D=!1)}c.length>0&&p.push(c);function F(_){return/^[A-Z]|^[$_]+$/u.test(_)}function C(_){return _.length<=t.tabWidth}function d(_){let re=_[1][0]?.node.computed;if(_[0].length===1){let it=_[0][0].node;return it.type==="ThisExpression"||it.type==="Identifier"&&(F(it.name)||n&&C(it.name)||re)}let ae=N(0,_[0],-1).node;return J(ae)&&ae.property.type==="Identifier"&&(F(ae.property.name)||re)}let b=p.length>=2&&!T(p[1][0].node)&&d(p);function B(_){let re=_.map(ae=>ae.printed);return _.length>0&&N(0,_,-1).needsParens?["(",...re,")"]:re}function O(_){return _.length===0?"":m([E,L(E,_.map(B))])}let h=p.map(B),g=h,S=b?3:2,j=p.flat(),U=j.slice(1,-1).some(_=>T(_.node,x.Leading))||j.slice(0,-1).some(_=>T(_.node,x.Trailing))||p[S]&&T(p[S][0].node,x.Leading);if(p.length<=S&&!U&&!p.some(_=>N(0,_,-1).hasTrailingEmptyLine))return Ur(e)?g:l(g);let fe=N(0,p[b?1:0],-1).node,Y=!M(fe)&&i(fe),z=[B(p[0]),b?p.slice(1,2).map(B):"",Y?E:"",O(p.slice(b?2:1))],ee=s.map(({node:_})=>_).filter(M);function Ie(){let _=N(0,N(0,p,-1),-1).node,re=N(0,h,-1);return M(_)&&ne(re)&&ee.slice(0,-1).some(ae=>ae.arguments.some(Ht))}let st;return U||ee.length>2&&ee.some(_=>!_.arguments.every(re=>Re(re)))||h.slice(0,-1).some(ne)||Ie()?st=l(z):st=[ne(g)||Y?ke:"",nt([g,z])],pt({memberChain:!0},st)}var $o=Vo;function vt(e,t,r){let{node:n}=e,s=n.type==="NewExpression",i=X(e),o=le(n),u=n.type!=="TSImportType"&&n.typeArguments?r("typeArguments"):"",p=o.length===1&&Wr(o[0],t.originalText);if(p||Nl(e)||jl(e)||It(n,e.parent)){let D=[];if($t(e,()=>{D.push(r())}),!(p&&D[0].label?.embed))return[s?"new ":"",Ko(e,r),i,u,"(",L(", ",D),")"]}let c=n.type==="ImportExpression"||n.type==="TSImportType"||n.type==="TSExternalModuleReference";if(!c&&!s&&Tt(n.callee)&&!e.call(()=>ge(e,t),"callee",...n.callee.type==="ChainExpression"?["expression"]:[]))return $o(e,t,r);let y=[s?"new ":"",Ko(e,r),i,u,hr(e,t,r)];return c||M(n.callee)?l(y):y}function Ko(e,t){let{node:r}=e;return r.type==="ImportExpression"?`import${r.phase?`.${r.phase}`:""}`:r.type==="TSImportType"?"import":r.type==="TSExternalModuleReference"?"require":t("callee")}var Ml=["require","require.resolve","require.resolve.paths","import.meta.resolve"];function Nl(e){let{node:t}=e;if(!(t.type==="ImportExpression"||t.type==="TSImportType"||t.type==="TSExternalModuleReference"||t.type==="CallExpression"&&!t.optional&&Pt(t.callee,Ml)))return!1;let r=le(t);return r.length===1&&V(r[0])&&!T(r[0])}function jl(e){let{node:t}=e;if(t.type!=="CallExpression"||t.optional||t.callee.type!=="Identifier")return!1;let r=le(t);return t.callee.name==="require"?(r.length===1&&V(r[0])||r.length>1)&&!T(r[0]):t.callee.name==="define"&&e.parent.type==="ExpressionStatement"?r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&V(r[0])&&r[1].type==="ArrayExpression":!1}function ht(e,t,r,n,s,i){let o=vl(e,t,r,n,i),u=i?r(i,{assignmentLayout:o}):"";switch(o){case"break-after-operator":return l([l(n),s,l(m([A,u]))]);case"never-break-after-operator":return l([l(n),s," ",u]);case"fluid":{let p=Symbol("assignment");return l([l(n),s,l(m(A),{id:p}),je,yt(u,{groupId:p})])}case"break-lhs":return l([n,s," ",l(u)]);case"chain":return[l(n),s,A,u];case"chain-tail":return[l(n),s,m([A,u])];case"chain-tail-arrow-chain":return[l(n),s,u];case"only-left":return n}}function Zo(e,t,r){let{node:n}=e;return ht(e,t,r,r("left"),[" ",n.operator],"right")}function eu(e,t,r){return ht(e,t,r,r("id")," =","init")}function vl(e,t,r,n,s){let{node:i}=e,o=i[s];if(!o)return"only-left";let u=!pn(o);if(e.match(pn,tu,F=>!u||F.type!=="ExpressionStatement"&&F.type!=="VariableDeclaration"))return u?o.type==="ArrowFunctionExpression"&&o.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!u&&pn(o.right)||Ee(t.originalText,o))return"break-after-operator";if(i.type==="ImportAttribute"||o.type==="CallExpression"&&o.callee.name==="require"||t.parser==="json5"||t.parser==="jsonc"||t.parser==="json")return"never-break-after-operator";let y=Vi(n);if(Jl(i)||ql(i)||bs(i)&&y)return"break-lhs";let D=Ul(i,n,t);return e.call(()=>Rl(e,t,r,D),s)?"break-after-operator":Gl(i)?"break-lhs":!y&&(D||o.type==="TemplateLiteral"||o.type==="TaggedTemplateExpression"||Ei(o)||Ce(o)||o.type==="ClassExpression")?"never-break-after-operator":"fluid"}function Rl(e,t,r,n){let s=e.node;if(Te(s)&&!er(s))return!0;switch(s.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries&&!Xl(s))break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:c}=s;return Te(c)&&!er(c)}let{consequent:u,alternate:p}=s;return u.type==="ConditionalExpression"||p.type==="ConditionalExpression"}case"ClassExpression":return R(s.decorators)}if(n)return!1;let i=s,o=[];for(;;)if(i.type==="UnaryExpression"||i.type==="AwaitExpression"||i.type==="YieldExpression"&&i.argument!==null)i=i.argument,o.push("argument");else if(i.type==="TSNonNullExpression")i=i.expression,o.push("expression");else break;return!!(V(i)||e.call(()=>ru(e,t,r),...o))}function Jl(e){if(tu(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>Oe(r)&&(!r.shorthand||r.value?.type==="AssignmentPattern"))}return!1}function pn(e){return e.type==="AssignmentExpression"}function tu(e){return pn(e)||e.type==="VariableDeclarator"}function Gl(e){let t=Wl(e);if(R(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}function Wl(e){if(Cr(e))return e.typeParameters?.params}function ql(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=Qo(t.typeAnnotation);return R(r)&&r.length>1&&r.some(n=>R(Qo(n))||n.type==="TSConditionalType")}function bs(e){return e.type==="VariableDeclarator"&&e.init?.type==="ArrowFunctionExpression"}function Qo(e){let t;switch(e.type){case"GenericTypeAnnotation":t=e.typeParameters;break;case"TSTypeReference":t=e.typeArguments;break}return t?.params}function ru(e,t,r,n=!1){let{node:s}=e,i=()=>ru(e,t,r,!0);if(s.type==="ChainExpression"||s.type==="TSNonNullExpression")return e.call(i,"expression");if(M(s)){if(vt(e,t,r).label?.memberChain)return!1;let u=le(s);return!(u.length===0||u.length===1&&Fr(u[0],t))||Yl(s,r)?!1:e.call(i,"callee")}return J(s)?e.call(i,"object"):n&&(s.type==="Identifier"||s.type==="ThisExpression")}function Ul(e,t,r){return Oe(e)?(t=Qt(t),typeof t=="string"&&ot(t)<r.tabWidth+3):!1}function Yl(e,t){let r=Hl(e);if(R(r)){if(r.length>1)return!0;if(r.length===1){let s=r[0];if(Se(s)||xt(s)||s.type==="TSTypeLiteral"||s.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(ne(t(n)))return!0}return!1}function Hl(e){return(e.typeParameters??e.typeArguments)?.params}function zo(e){switch(e.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":return!!e.typeParameters;case"TSTypeReference":return!!e.typeArguments;default:return!1}}function Xl(e){return zo(e.checkType)||zo(e.extendsType)}var cn=new WeakMap;function su(e){return/^(?:\d+|\d+\.\d+)$/u.test(e)}function nu(e,t){return t.parser==="json"||t.parser==="jsonc"||!V(e.key)||ut(pe(e.key),t).slice(1,-1)!==e.key.value?!1:!!(Ro(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||(t.parser==="typescript"||t.parser==="oxc-ts")&&e.type==="PropertyDefinition")||su(e.key.value)&&String(Number(e.key.value))===e.key.value&&e.type!=="ImportAttribute"&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="oxc"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function Vl(e,t){let{key:r}=e.node;return(r.type==="Identifier"||Ce(r)&&su(dt(pe(r)))&&String(r.value)===dt(pe(r))&&!(t.parser==="typescript"||t.parser==="babel-ts"||t.parser==="oxc-ts"))&&(t.parser==="json"||t.parser==="jsonc"||t.quoteProps==="consistent"&&cn.get(e.parent))}function Ct(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:s}=e,{key:i}=n;if(t.quoteProps==="consistent"&&!cn.has(s)){let o=e.siblings.some(u=>!u.computed&&V(u.key)&&!nu(u,t));cn.set(s,o)}if(Vl(e,t)){let o=ut(JSON.stringify(i.type==="Identifier"?i.name:i.value.toString()),t);return e.call(()=>De(e,o,t),"key")}return nu(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!cn.get(s))?e.call(()=>De(e,/^\d/u.test(i.value)?dt(i.value):i.value,t),"key"):r("key")}function ln(e,t,r){let{node:n}=e;return n.shorthand?r("value"):ht(e,t,r,Ct(e,t,r),":","value")}var $l=({node:e,key:t,parent:r})=>t==="value"&&e.type==="FunctionExpression"&&(r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="MethodDefinition"||r.type==="TSAbstractMethodDefinition"||r.type==="TSDeclareMethod"||r.type==="Property"&&mt(r));function mn(e,t,r,n){if($l(e))return Dn(e,t,r);let{node:s}=e,i=!1;if((s.type==="FunctionDeclaration"||s.type==="FunctionExpression")&&n?.expandLastArg){let{parent:y}=e;M(y)&&(le(y).length>1||K(s).every(D=>D.type==="Identifier"&&!D.typeAnnotation))&&(i=!0)}let o=[Q(e),s.async?"async ":"",`function${s.generator?"*":""} `,s.id?r("id"):""],u=Ke(e,t,r,i),p=rr(e,r),c=lt(s,p);return o.push(r("typeParameters"),l([c?l(u):u,p]),s.body?" ":"",r("body")),t.semi&&(s.declare||!s.body)&&o.push(";"),o}function Sr(e,t,r){let{node:n}=e,{kind:s}=n,i=n.value||n,o=[];return!s||s==="init"||s==="method"||s==="constructor"?i.async&&o.push("async "):(Le(s==="get"||s==="set"),o.push(s," ")),i.generator&&o.push("*"),o.push(Ct(e,t,r),n.optional?"?":"",n===i?Dn(e,t,r):r("value")),o}function Dn(e,t,r){let{node:n}=e,s=Ke(e,t,r),i=rr(e,r),o=vo(n),u=lt(n,i),p=[r("typeParameters"),l([o?l(s,{shouldBreak:!0}):u?l(s):s,i])];return n.body?p.push(" ",r("body")):p.push(t.semi?";":""),p}function Kl(e){let t=K(e);return t.length===1&&!e.typeParameters&&!T(e,x.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!T(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function fn(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return Kl(r)}return!1}function rr(e,t){let{node:r}=e,s=[G(e,t,"returnType")];return r.predicate&&s.push(t("predicate")),s}function iu(e,t,r){let{node:n}=e,s=[];if(n.argument){let u=r("argument");Ql(t,n.argument)?u=["(",m([E,u]),E,")"]:(Te(n.argument)||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(u=l([P("("),m([f,u]),f,P(")")])),s.push(" ",u)}let i=T(n,x.Dangling),o=t.semi&&i&&T(n,x.Last|x.Line);return o&&s.push(";"),i&&s.push(" ",v(e,t)),!o&&t.semi&&s.push(";"),s}function ou(e,t,r){return["return",iu(e,t,r)]}function uu(e,t,r){return["throw",iu(e,t,r)]}function Ql(e,t){if(Ee(e.originalText,t)||T(t,x.Leading,r=>ue(e.originalText,w(r),I(r)))&&!H(t))return!0;if(Xt(t)){let r=t,n;for(;n=Di(r);)if(r=n,Ee(e.originalText,r))return!0}return!1}function au(e,t){if(t.semi||ks(e,t)||Ls(e,t)||Is(e,t))return!1;let{node:r,key:n,parent:s}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(s.type==="Program"||s.type==="BlockStatement"||s.type==="StaticBlock"||s.type==="TSModuleBlock")||n==="consequent"&&s.type==="SwitchCase")&&e.call(()=>pu(e,t),"expression"))}function pu(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!fn(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:s}=r;if(n&&(s==="+"||s==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(H(r))return!0}return ge(e,t)?!0:Xt(r)?e.call(()=>pu(e,t),...Rr(r)):!1}var Ps=({node:e,parent:t})=>e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1&&(Array.isArray(t.directives)&&t.directives.length===0||!t.directives);function ks(e,t){return(t.parentParser==="markdown"||t.parentParser==="mdx")&&Ps(e)&&H(e.node.expression)}function Is(e,t){return t.__isHtmlInlineEventHandler&&Ps(e)}function Ls(e,t){return(t.parser==="__vue_event_binding"||t.parser==="__vue_ts_event_binding")&&Ps(e)}var Os=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},Qe=Os;function ws(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var _s=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let s=0;s<t.length&&r.has(t.charAt(s));s++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let s=t.length-1;s>=0&&r.has(t.charAt(s));s--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#e.has(N(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${ws([...this.#e].join(""))}]+`,s=new RegExp(r?`(${n})`:n,"u");return t.split(s)}hasWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=this.#e;return Array.prototype.every.call(t,n=>r.has(n))}#t(t){let r=Number.POSITIVE_INFINITY;for(let n of t.split(`
38
+ `);return["/*",L(E,t.map((r,n)=>n===0?r.trimEnd():" "+(n<t.length-1?r.trim():r.trimStart()))),"*/"]}function Cs(e,t){if(e.isRoot)return!1;let{node:r,key:n,parent:s}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&sl(r)&&xr(e))return!0;if(tl(r))return!1;if(r.type==="Identifier"){if(r.extra?.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r.name)||n==="left"&&(r.name==="async"&&!s.await||r.name==="let")&&s.type==="ForOfStatement")return!0;if(r.name==="let"){let i=e.findAncestor(o=>o.type==="ForOfStatement")?.left;if(i&&ye(i,o=>o===r))return!0}if(n==="object"&&r.name==="let"&&s.type==="MemberExpression"&&s.computed&&!s.optional){let i=e.findAncestor(u=>u.type==="ExpressionStatement"||u.type==="ForStatement"||u.type==="ForInStatement"),o=i?i.type==="ExpressionStatement"?i.expression:i.type==="ForStatement"?i.init:i.left:void 0;if(o&&ye(o,u=>u===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let i=e.findAncestor(o=>!Ae(o));if(i!==s&&i.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let i=e.findAncestor(o=>o.type==="ExpressionStatement")?.expression;if(i&&ye(i,o=>o===r))return!0}if(r.type==="ObjectExpression"){let i=e.findAncestor(o=>o.type==="ArrowFunctionExpression")?.body;if(i&&i.type!=="SequenceExpression"&&i.type!=="AssignmentExpression"&&ye(i,o=>o===r))return!0}switch(s.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&R(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return Mo(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"&&!ol(r))return!0;break;case"TypeAnnotation":if(e.match(void 0,void 0,(i,o)=>o==="returnType"&&i.type==="ArrowFunctionExpression")&&nl(r))return!0;break;case"BinaryExpression":if(n==="left"&&(s.operator==="in"||s.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(n==="init"&&e.match(void 0,void 0,(i,o)=>o==="declarations"&&i.type==="VariableDeclaration",(i,o)=>o==="left"&&i.type==="ForInStatement"))return!0;break}switch(r.type){case"UpdateExpression":if(s.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&s.operator==="+"||r.operator==="--"&&s.operator==="-");case"UnaryExpression":switch(s.type){case"UnaryExpression":return r.operator===s.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&s.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(s.type==="UpdateExpression"||r.operator==="in"&&rl(e))return!0;if(r.operator==="|>"&&r.extra?.parenthesized){let i=e.grandparent;if(i.type==="BinaryExpression"&&i.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Ae(r);case"ConditionalExpression":return Ae(r)||yi(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(r.type==="TSTypeAssertion"||Ae(r));case"LogicalExpression":if(r.type==="LogicalExpression")return s.operator!==r.operator;case"BinaryExpression":{let{operator:i,type:o}=r;if(!i&&o!=="TSTypeAssertion")return!0;let u=yr(i),p=s.operator,c=yr(p);return!!(c>u||n==="right"&&c===u||c===u&&!dr(p,i)||c<u&&i==="%"&&(p==="+"||p==="-")||Ti(p))}default:return!1}case"SequenceExpression":return s.type!=="ForStatement";case"YieldExpression":if(s.type==="AwaitExpression"||s.type==="TSTypeAssertion")return!0;case"AwaitExpression":switch(s.type){case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"SpreadElement":case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"ConditionalExpression":return n==="test";case"BinaryExpression":return!(!r.argument&&s.operator==="|>");default:return!1}case"TSFunctionType":if(e.match(i=>i.type==="TSFunctionType",(i,o)=>o==="typeAnnotation"&&i.type==="TSTypeAnnotation",(i,o)=>o==="returnType"&&i.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":case"ConditionalTypeAnnotation":if(n==="extendsType"&&Ue(r)&&s.type===r.type||n==="checkType"&&Ue(s))return!0;if(n==="extendsType"&&s.type==="TSConditionalType"){let{typeAnnotation:i}=r.returnType||r.typeAnnotation;if(i.type==="TSTypePredicate"&&i.typeAnnotation&&(i=i.typeAnnotation.typeAnnotation),i.type==="TSInferType"&&i.typeParameter.constraint)return!0}case"TSUnionType":case"TSIntersectionType":if(Se(s)||xt(s))return!0;case"TSInferType":if(r.type==="TSInferType"){if(s.type==="TSRestType")return!1;if(n==="types"&&(s.type==="TSUnionType"||s.type==="TSIntersectionType")&&r.typeParameter.type==="TSTypeParameter"&&r.typeParameter.constraint)return!0}case"TSTypeOperator":return s.type==="TSArrayType"||s.type==="TSOptionalType"||s.type==="TSRestType"||n==="objectType"&&s.type==="TSIndexedAccessType"||s.type==="TSTypeOperator"||s.type==="TSTypeAnnotation"&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return n==="objectType"&&s.type==="TSIndexedAccessType"||n==="elementType"&&s.type==="TSArrayType";case"TypeOperator":return s.type==="ArrayTypeAnnotation"||s.type==="NullableTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType")||s.type==="TypeOperator";case"TypeofTypeAnnotation":return n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType")||n==="elementType"&&s.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return s.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return s.type==="TypeOperator"||s.type==="KeyofTypeAnnotation"||s.type==="ArrayTypeAnnotation"||s.type==="NullableTypeAnnotation"||s.type==="IntersectionTypeAnnotation"||s.type==="UnionTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return s.type==="ArrayTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"ComponentTypeAnnotation":case"FunctionTypeAnnotation":{if(r.type==="ComponentTypeAnnotation"&&(r.rendersType===null||r.rendersType===void 0))return!1;if(e.match(void 0,(o,u)=>u==="typeAnnotation"&&o.type==="TypeAnnotation",(o,u)=>u==="returnType"&&o.type==="ArrowFunctionExpression")||e.match(void 0,(o,u)=>u==="typeAnnotation"&&o.type==="TypePredicate",(o,u)=>u==="typeAnnotation"&&o.type==="TypeAnnotation",(o,u)=>u==="returnType"&&o.type==="ArrowFunctionExpression"))return!0;let i=s.type==="NullableTypeAnnotation"?e.grandparent:s;return i.type==="UnionTypeAnnotation"||i.type==="IntersectionTypeAnnotation"||i.type==="ArrayTypeAnnotation"||n==="objectType"&&(i.type==="IndexedAccessType"||i.type==="OptionalIndexedAccessType")||n==="checkType"&&s.type==="ConditionalTypeAnnotation"||n==="extendsType"&&s.type==="ConditionalTypeAnnotation"&&r.returnType?.type==="InferTypeAnnotation"&&r.returnType?.typeParameter.bound||i.type==="NullableTypeAnnotation"||s.type==="FunctionTypeParam"&&s.name===null&&K(r).some(o=>o.typeAnnotation?.type==="NullableTypeAnnotation")}case"OptionalIndexedAccessType":return n==="objectType"&&s.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof r.value=="string"&&s.type==="ExpressionStatement"&&typeof s.directive!="string"){let i=e.grandparent;return i.type==="Program"||i.type==="BlockStatement"}return n==="object"&&J(s)&&Ce(r);case"AssignmentExpression":return!((n==="init"||n==="update")&&s.type==="ForStatement"||n==="expression"&&r.left.type!=="ObjectPattern"&&s.type==="ExpressionStatement"||n==="key"&&s.type==="TSPropertySignature"||s.type==="AssignmentExpression"||n==="expressions"&&s.type==="SequenceExpression"&&e.match(void 0,void 0,(i,o)=>(o==="init"||o==="update")&&i.type==="ForStatement")||n==="value"&&s.type==="Property"&&e.match(void 0,void 0,(i,o)=>o==="properties"&&i.type==="ObjectPattern")||s.type==="NGChainedExpression"||n==="node"&&s.type==="JsExpressionRoot");case"ConditionalExpression":switch(s.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"ConditionalExpression":return t.experimentalTernaries?!1:n==="test";case"MemberExpression":case"OptionalMemberExpression":return n==="object";default:return!1}case"FunctionExpression":switch(s.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(s.type){case"BinaryExpression":return s.operator!=="|>"||r.extra?.parenthesized;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":case"MatchExpressionCase":return!0;case"TSInstantiationExpression":return n==="expression";case"ConditionalExpression":return n==="test";default:return!1}case"ClassExpression":switch(s.type){case"NewExpression":return n==="callee";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(il(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")){let i=r;for(;i;)switch(i.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":i=i.object;break;case"TaggedTemplateExpression":i=i.tag;break;case"TSNonNullExpression":i=i.expression;break;default:return!1}}return!1;case"BindExpression":return n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")||n==="object"&&J(s);case"NGPipeExpression":return!(s.type==="NGRoot"||s.type==="NGMicrosyntaxExpression"||s.type==="ObjectProperty"&&!r.extra?.parenthesized||q(s)||n==="arguments"&&M(s)||n==="right"&&s.type==="NGPipeExpression"||n==="property"&&s.type==="MemberExpression"||s.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return n==="callee"||n==="left"&&s.type==="BinaryExpression"&&s.operator==="<"||!q(s)&&s.type!=="ArrowFunctionExpression"&&s.type!=="AssignmentExpression"&&s.type!=="AssignmentPattern"&&s.type!=="BinaryExpression"&&s.type!=="NewExpression"&&s.type!=="ConditionalExpression"&&s.type!=="ExpressionStatement"&&s.type!=="JsExpressionRoot"&&s.type!=="JSXAttribute"&&s.type!=="JSXElement"&&s.type!=="JSXExpressionContainer"&&s.type!=="JSXFragment"&&s.type!=="LogicalExpression"&&!M(s)&&!Oe(s)&&s.type!=="ReturnStatement"&&s.type!=="ThrowStatement"&&s.type!=="TypeCastExpression"&&s.type!=="VariableDeclarator"&&s.type!=="YieldExpression"&&s.type!=="MatchExpressionCase";case"TSInstantiationExpression":return n==="object"&&J(s);case"MatchOrPattern":return s.type==="MatchAsPattern"}return!1}var tl=k(["BlockStatement","BreakStatement","ComponentDeclaration","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareComponent","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareHook","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareNamespace","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","HookDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function rl(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if(n?.type==="ForStatement"&&n.init===r)return!0;r=n}return!1}function nl(e){return Er(e,t=>t.type==="ObjectTypeAnnotation"&&Er(t,r=>r.type==="FunctionTypeAnnotation"))}function sl(e){return se(e)}function xr(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if(r==="arguments"&&e.isLast)return e.callParent(xr);break;case"ObjectProperty":if(r==="value")return e.callParent(()=>e.key==="properties"&&e.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return e.callParent(xr);break;case"ConditionalExpression":if(r==="alternate")return e.callParent(xr);break;case"UnaryExpression":if(t.prefix)return e.callParent(xr);break}return!1}function Mo(e,t){let{node:r,parent:n}=e;return r.type==="FunctionExpression"||r.type==="ClassExpression"?n.type==="ExportDefaultDeclaration"||!Cs(e,t):!Xt(r)||n.type!=="ExportDefaultDeclaration"&&Cs(e,t)?!1:e.call(()=>Mo(e,t),...Rr(r))}function il(e){return!!(e.match(void 0,(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(t=>t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(t=>t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(void 0,(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(void 0,(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="tag"&&t.type==="TaggedTemplateExpression")||e.match(t=>t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&(t.type==="CallExpression"||t.type==="NewExpression"))||e.match(t=>t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&t.type==="CallExpression")||e.match(t=>t.type==="CallExpression"||t.type==="MemberExpression",(t,r)=>r==="expression"&&t.type==="ChainExpression")&&(e.match(void 0,void 0,(t,r)=>r==="callee"&&(t.type==="CallExpression"&&!t.optional||t.type==="NewExpression")||r==="object"&&t.type==="MemberExpression"&&!t.optional)||e.match(void 0,void 0,(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&t.type==="CallExpression"))||e.match(t=>t.type==="CallExpression"||t.type==="MemberExpression",(t,r)=>r==="expression"&&t.type==="TSNonNullExpression",(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="object"&&t.type==="MemberExpression"||r==="callee"&&t.type==="CallExpression"))}function As(e){return e.type==="Identifier"?!0:J(e)?!e.computed&&!e.optional&&e.property.type==="Identifier"&&As(e.object):!1}function ol(e){return e.type==="ChainExpression"&&(e=e.expression),As(e)||M(e)&&!e.optional&&As(e.callee)}var ge=Cs;function ul(e,t){let r=t-1;r=ze(e,r,{backwards:!0}),r=Ze(e,r,{backwards:!0}),r=ze(e,r,{backwards:!0});let n=Ze(e,r,{backwards:!0});return r!==n}var No=ul;var al=()=>!0;function Ts(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function pl(e,t){let r=e.node,n=[Ts(e,t)],{printer:s,originalText:i,locStart:o,locEnd:u}=t;if(s.isBlockComment?.(r)){let y=Z(i,u(r))?Z(i,o(r),{backwards:!0})?E:A:" ";n.push(y)}else n.push(E);let c=Ze(i,ze(i,u(r)));return c!==!1&&Z(i,c)&&n.push(E),n}function cl(e,t,r){let n=e.node,s=Ts(e,t),{printer:i,originalText:o,locStart:u}=t,p=i.isBlockComment?.(n);if(r?.hasLineSuffix&&!r?.isBlock||Z(o,u(n),{backwards:!0})){let c=No(o,u(n));return{doc:as([E,c?E:"",s]),isBlock:p,hasLineSuffix:!0}}return!p||r?.hasLineSuffix?{doc:[as([" ",s]),ke],isBlock:p,hasLineSuffix:!0}:{doc:[" ",s],isBlock:p,hasLineSuffix:!1}}function v(e,t,r={}){let{node:n}=e;if(!R(n?.comments))return"";let{indent:s=!1,marker:i,filter:o=al}=r,u=[];if(e.each(({node:c})=>{c.leading||c.trailing||c.marker!==i||!o(c)||u.push(Ts(e,t))},"comments"),u.length===0)return"";let p=L(E,u);return s?m([E,p]):p}function Mt(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(p=>!n.has(p)).length===0)return{leading:"",trailing:""};let i=[],o=[],u;return e.each(()=>{let p=e.node;if(n?.has(p))return;let{leading:c,trailing:y}=p;c?i.push(pl(e,t)):y&&(u=cl(e,t,u),o.push(u.doc))},"comments"),{leading:i,trailing:o}}function De(e,t,r){let{leading:n,trailing:s}=Mt(e,r);return!n&&!s?t:Ar(t,i=>[n,i,s])}var Et=class extends Error{name="ArgExpansionBailout"};function Ke(e,t,r,n,s){let i=e.node,o=K(i),u=s&&i.typeParameters?r("typeParameters"):"";if(o.length===0)return[u,"(",v(e,t,{filter:d=>_e(t.originalText,I(d))===")"}),")"];let{parent:p}=e,c=It(p),y=jo(i),D=[];if(gi(e,(d,b)=>{let B=b===o.length-1;B&&i.rest&&D.push("..."),D.push(r()),!B&&(D.push(","),c||y?D.push(" "):oe(o[b],t)?D.push(E,E):D.push(A))}),n&&!ml(e)){if(ne(u)||ne(D))throw new Et;return l([_t(u),"(",_t(D),")"])}let F=o.every(d=>!R(d.decorators));return y&&F?[u,"(",...D,")"]:c?[u,"(",...D,")"]:(Gr(p)||Fi(p)||p.type==="TypeAlias"||p.type==="UnionTypeAnnotation"||p.type==="IntersectionTypeAnnotation"||p.type==="FunctionTypeAnnotation"&&p.returnType===i)&&o.length===1&&o[0].name===null&&i.this!==o[0]&&o[0].typeAnnotation&&i.typeParameters===null&&Vt(o[0].typeAnnotation)&&!i.rest?t.arrowParens==="always"||i.type==="HookTypeAnnotation"?["(",...D,")"]:D:[u,"(",m([f,...D]),P(!xi(i)&&ie(t,"all")&&e.root.type!=="NGRoot"?",":""),f,")"]}function jo(e){if(!e)return!1;let t=K(e);if(t.length!==1)return!1;let[r]=t;return!T(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&Je(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&Je(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||se(r.right)&&r.right.properties.length===0||q(r.right)&&r.right.elements.length===0))}function ll(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function lt(e,t){let r=ll(e);if(!r)return!1;let n=e.typeParameters?.params;if(n){if(n.length>1)return!1;if(n.length===1){let s=n[0];if(s.constraint||s.default)return!1}}return K(e).length===1&&(Je(r)||ne(t))}function ml(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function vo(e){let t=K(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}function Nt(e,t){return(t==="params"||t==="this"||t==="rest")&&jo(e)}function X(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":M(t)||J(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function sn(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var Dl=k(["DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function Q(e){let{node:t}=e;return t.declare||Dl(t)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var fl=k(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Zt({node:e}){return e.abstract||fl(e)?"abstract ":""}function Ft(e,t,r){return e.type==="EmptyStatement"?T(e,x.Leading)?[" ",t]:t:e.type==="BlockStatement"||r?[" ",t]:m([A,t])}function jt(e){return e.accessibility?e.accessibility+" ":""}var yl=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,El=e=>yl.test(e),Ro=El;function Fl(e){return e.length===1?e:e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u,"$1").replace(/^([+-])?\./u,"$10.").replace(/(\.\d+?)0+(?=e|$)/u,"$1").replace(/\.(?=e|$)/u,"")}var dt=Fl;var dl=0;function on(e,t,r){let{node:n,parent:s,grandparent:i,key:o}=e,u=o!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),p=n.operator==="|>"&&e.root.extra?.__isUsingHackPipeline,c=xs(e,t,r,!1,u);if(u)return c;if(p)return l(c);if(o==="callee"&&(M(s)||s.type==="NewExpression")||s.type==="UnaryExpression"||J(s)&&!s.computed)return l([m([f,...c]),f]);let y=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&i.type==="JSXAttribute"||n.operator!=="|"&&s.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&i.type==="NGMicrosyntax"&&i.body.length===1)||n===s.body&&s.type==="ArrowFunctionExpression"||n!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&i.type!=="ReturnStatement"&&i.type!=="ThrowStatement"&&!M(i)&&i.type!=="NewExpression"||s.type==="TemplateLiteral"||Al(e),D=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||Oe(s),F=Te(n.left)&&dr(n.operator,n.left.operator);if(y||er(n)&&!F||!er(n)&&D)return l(c);if(c.length===0)return"";let C=H(n.right),d=c.findIndex(S=>typeof S!="string"&&!Array.isArray(S)&&S.type===Fe),b=c.slice(0,d===-1?1:d+1),B=c.slice(b.length,C?-1:void 0),O=Symbol("logicalChain-"+ ++dl),h=l([...b,m(B)],{id:O});if(!C)return h;let g=N(0,c,-1);return l([h,yt(g,{groupId:O})])}function xs(e,t,r,n,s){let{node:i}=e;if(!Te(i))return[l(r())];let o=[];dr(i.operator,i.left.operator)?o=e.call(()=>xs(e,t,r,!0,s),"left"):o.push(l(r("left")));let u=er(i),p=i.right.type==="ChainExpression"?i.right.expression:i.right,c=(i.operator==="|>"||i.type==="NGPipeExpression"||Cl(e,t))&&!Ee(t.originalText,p),D=!T(p,x.Leading,Hr)&&Ee(t.originalText,p),F=i.type==="NGPipeExpression"?"|":i.operator,C=i.type==="NGPipeExpression"&&i.arguments.length>0?l(m([f,": ",L([A,": "],e.map(()=>xe(2,l(r())),"arguments"))])):"",d;if(u)d=[F,Ee(t.originalText,p)?m([A,r("right"),C]):[" ",r("right"),C]];else{let g=F==="|>"&&e.root.extra?.__isUsingHackPipeline?e.call(()=>xs(e,t,r,!0,s),"right"):r("right");if(t.experimentalOperatorPosition==="start"){let S="";if(D)switch(We(g)){case Be:S=g.splice(0,1)[0];break;case Pe:S=g.contents.splice(0,1)[0];break}d=[A,S,F," ",g,C]}else d=[c?A:"",F,c?" ":A,g,C]}let{parent:b}=e,B=T(i.left,x.Trailing|x.Line);if((B||!(s&&i.type==="LogicalExpression")&&b.type!==i.type&&i.left.type!==i.type&&i.right.type!==i.type)&&(d=l(d,{shouldBreak:B})),t.experimentalOperatorPosition==="start"?o.push(u||D?" ":"",d):o.push(c?"":" ",d),n&&T(i)){let h=Qt(De(e,o,t));return h.type===Me?h.parts:Array.isArray(h)?h:[h]}return o}function er(e){return e.type!=="LogicalExpression"?!1:!!(se(e.right)&&e.right.properties.length>0||q(e.right)&&e.right.elements.length>0||H(e.right))}var Jo=e=>e.type==="BinaryExpression"&&e.operator==="|";function Cl(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&Jo(e.node)&&!e.hasAncestor(r=>!Jo(r)&&r.type!=="JsExpressionRoot")}function Al(e){if(e.key!=="arguments")return!1;let{parent:t}=e;if(!(M(t)&&!t.optional&&t.arguments.length===1))return!1;let{callee:r}=t;return r.type==="Identifier"&&r.name==="Boolean"}function un(e,t,r){let{node:n}=e,{parent:s}=e,i=s.type!=="TypeParameterInstantiation"&&(!Ue(s)||!t.experimentalTernaries)&&s.type!=="TSTypeParameterInstantiation"&&s.type!=="GenericTypeAnnotation"&&s.type!=="TSTypeReference"&&s.type!=="TSTypeAssertion"&&s.type!=="TupleTypeAnnotation"&&s.type!=="TSTupleType"&&!(s.type==="FunctionTypeParam"&&!s.name&&e.grandparent.this!==s)&&!((Cr(s)||s.type==="VariableDeclarator")&&Ee(t.originalText,n))&&!(Cr(s)&&T(s.id,x.Trailing|x.Line)),o=gs(n),u=e.map(()=>{let C=r();return o||(C=xe(2,C)),De(e,C,t)},"types"),p="",c="";if(Yr(e)&&({leading:p,trailing:c}=Mt(e,t)),o)return[p,L(" | ",u),c];let y=i&&!Ee(t.originalText,n),D=[P([y?A:"","| "]),L([A,"| "],u)];if(ge(e,t))return[p,l([m(D),f]),c];let F=[p,l(D)];return(s.type==="TupleTypeAnnotation"||s.type==="TSTupleType")&&s[s.type==="TupleTypeAnnotation"&&s.types?"types":"elementTypes"].length>1?[l([m([P(["(",f]),F]),f,P(")")]),c]:[l(i?m(F):F),c]}var Tl=k(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),xl=k(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);function gs(e){let{types:t}=e;if(t.some(n=>T(n)))return!1;let r=t.find(n=>xl(n));return r?t.every(n=>n===r||Tl(n)):!1}function Go(e){return Vt(e)||Je(e)?!0:Se(e)?gs(e):!1}var gl=new WeakSet;function G(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let s=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let i=e.call(Wo,r);(i==="=>"||i===":"&&T(n,x.Leading))&&(s=!0),gl.add(n)}return s?[" ",t(r)]:t(r)}var Wo=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareHook")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function an(e,t,r){let n=Wo(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function hl(e,t,r,n){let{node:s}=e,i=s.inexact?"...":"";return T(s,x.Dangling)?l([r,i,v(e,t,{indent:!0}),f,n]):[r,i,n]}function tr(e,t,r){let{node:n}=e,s=[],i="[",o="]",u=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",p=n[u];if(p.length===0)s.push(hl(e,t,i,o));else{let c=N(0,p,-1),y=c?.type!=="RestElement"&&!n.inexact,D=c===null,F=Symbol("array"),C=!t.__inJestEach&&p.length>1&&p.every((B,O,h)=>{let g=B?.type;if(!q(B)&&!se(B))return!1;let S=h[O+1];if(S&&g!==S.type)return!1;let j=q(B)?"elements":"properties";return B[j]&&B[j].length>1}),d=hs(n,t),b=y?D?",":ie(t)?d?P(",","",{groupId:F}):P(","):"":"";s.push(l([i,m([f,d?Bl(e,t,r,b):[Sl(e,t,r,u,n.inexact),b],v(e,t)]),f,o],{shouldBreak:C,id:F}))}return s.push(X(e),G(e,r)),s}function hs(e,t){return q(e)&&e.elements.length>0&&e.elements.every(r=>r&&(Ce(r)||Xn(r)&&!T(r.argument))&&!T(r,x.Trailing|x.Line,n=>!Z(t.originalText,w(n),{backwards:!0})))}function qo({node:e},{originalText:t}){let r=I(e);if(r===w(e))return!1;let{length:n}=t;for(;r<n&&t[r]!==",";)r=qt(t,Ut(t,r+1));return Yt(t,r)}function Sl(e,t,r,n,s){let i=[];return e.each(({node:o,isLast:u})=>{i.push(o?l(r()):""),(!u||s)&&i.push([",",A,o&&qo(e,t)?f:""])},n),s&&i.push("..."),i}function Bl(e,t,r,n){let s=[];return e.each(({isLast:i,next:o})=>{s.push([r(),i?n:","]),i||s.push(qo(e,t)?[E,E]:T(o,x.Leading|x.Line)?E:A)},"elements"),zr(s)}function bl(e,t,r){let{node:n}=e,s=le(n);if(s.length===0)return["(",v(e,t),")"];let i=s.length-1;if(Il(s)){let D=["("];return $t(e,(F,C)=>{D.push(r()),C!==i&&D.push(", ")}),D.push(")"),D}let o=!1,u=[];$t(e,({node:D},F)=>{let C=r();F===i||(oe(D,t)?(o=!0,C=[C,",",E,E]):C=[C,",",A]),u.push(C)});let p=!t.parser.startsWith("__ng_")&&n.type!=="ImportExpression"&&n.type!=="TSImportType"&&n.type!=="TSExternalModuleReference"&&ie(t,"all")?",":"";function c(){return l(["(",m([A,...u]),p,A,")"],{shouldBreak:!0})}if(o||e.parent.type!=="Decorator"&&Ai(s))return c();if(kl(s)){let D=u.slice(1);if(D.some(ne))return c();let F;try{F=r(Kn(n,0),{expandFirstArg:!0})}catch(C){if(C instanceof Et)return c();throw C}return ne(F)?[ke,nt([["(",l(F,{shouldBreak:!0}),", ",...D,")"],c()])]:nt([["(",F,", ",...D,")"],["(",l(F,{shouldBreak:!0}),", ",...D,")"],c()])}if(Pl(s,u,t)){let D=u.slice(0,-1);if(D.some(ne))return c();let F;try{F=r(Kn(n,-1),{expandLastArg:!0})}catch(C){if(C instanceof Et)return c();throw C}return ne(F)?[ke,nt([["(",...D,l(F,{shouldBreak:!0}),")"],c()])]:nt([["(",...D,F,")"],["(",...D,l(F,{shouldBreak:!0}),")"],c()])}let y=["(",m([f,...u]),P(p),f,")"];return Ur(e)?y:l(y,{shouldBreak:u.some(ne)||o})}function gr(e,t=!1){return se(e)&&(e.properties.length>0||T(e))||q(e)&&(e.elements.length>0||T(e))||e.type==="TSTypeAssertion"&&gr(e.expression)||Ae(e)&&gr(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||Ll(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&gr(e.body,!0)||se(e.body)||q(e.body)||!t&&(M(e.body)||e.body.type==="ConditionalExpression")||H(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function Pl(e,t,r){let n=N(0,e,-1);if(e.length===1){let i=N(0,t,-1);if(i.label?.embed&&i.label?.hug!==!1)return!0}let s=N(0,e,-2);return!T(n,x.Leading)&&!T(n,x.Trailing)&&gr(n)&&(!s||s.type!==n.type)&&(e.length!==2||s.type!=="ArrowFunctionExpression"||!q(n))&&!(e.length>1&&hs(n,r))}function kl(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&Ol(r)?!0:!T(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&Yo(r)&&!gr(r)}function Yo(e){if(e.type==="ParenthesizedExpression")return Yo(e.expression);if(Ae(e)||e.type==="TypeCastExpression"){let{typeAnnotation:t}=e;if(t.type==="TypeAnnotation"&&(t=t.typeAnnotation),t.type==="TSArrayType"&&(t=t.elementType,t.type==="TSArrayType"&&(t=t.elementType)),t.type==="GenericTypeAnnotation"||t.type==="TSTypeReference"){let r=t.type==="GenericTypeAnnotation"?t.typeParameters:t.typeArguments;r?.params.length===1&&(t=r.params[0])}return Vt(t)&&Re(e.expression,1)}return Dt(e)&&le(e).length>1?!1:Te(e)?Re(e.left,1)&&Re(e.right,1):Vn(e)||Re(e)}function Il(e){return e.length===2?Uo(e,0):e.length===3?e[0].type==="Identifier"&&Uo(e,1):!1}function Uo(e,t){let r=e[t],n=e[t+1];return r.type==="ArrowFunctionExpression"&&K(r).length===0&&r.body.type==="BlockStatement"&&n.type==="ArrayExpression"&&!e.some(s=>T(s))}function Ll(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||T(e,x.Dangling))}function Ol(e){if(!(e.type==="ObjectExpression"&&e.properties.length===1))return!1;let[t]=e.properties;return Oe(t)?!t.computed&&(t.key.type==="Identifier"&&t.key.name==="type"||V(t.key)&&t.key.value==="type")&&V(t.value)&&t.value.value==="module":!1}var hr=bl;function Ho(e,t,r){return[r("object"),l(m([f,Ss(e,t,r)]))]}function Ss(e,t,r){return["::",r("callee")]}var wl=e=>((e.type==="ChainExpression"||e.type==="TSNonNullExpression")&&(e=e.expression),M(e)&&le(e).length>0);function _l(e){let{node:t,ancestors:r}=e;for(let n of r){if(!(J(n)&&n.object===t||n.type==="TSNonNullExpression"&&n.expression===t))return n.type==="NewExpression"&&n.callee===t;t=n}return!1}function Xo(e,t,r){let n=r("object"),s=Bs(e,t,r),{node:i}=e,o=e.findAncestor(c=>!(J(c)||c.type==="TSNonNullExpression")),u=e.findAncestor(c=>!(c.type==="ChainExpression"||c.type==="TSNonNullExpression")),p=o.type==="BindExpression"||o.type==="AssignmentExpression"&&o.left.type!=="Identifier"||_l(e)||i.computed||i.object.type==="Identifier"&&i.property.type==="Identifier"&&!J(u)||(u.type==="AssignmentExpression"||u.type==="VariableDeclarator")&&(wl(i.object)||n.label?.memberChain);return pt(n.label,[n,p?s:l(m([f,s]))])}function Bs(e,t,r){let n=r("property"),{node:s}=e,i=X(e);return s.computed?!s.property||Ce(s.property)?[i,"[",n,"]"]:l([i,"[",m([f,n]),f,"]"]):[i,".",n]}function Vo(e,t,r){if(e.node.type==="ChainExpression")return e.call(()=>Vo(e,t,r),"expression");let n=(e.parent.type==="ChainExpression"?e.grandparent:e.parent).type==="ExpressionStatement",s=[];function i(_){let{originalText:re}=t,ae=at(re,I(_));return re.charAt(ae)===")"?ae!==!1&&Yt(re,ae+1):oe(_,t)}function o(){let{node:_}=e;if(_.type==="ChainExpression")return e.call(o,"expression");if(M(_)&&(Tt(_.callee)||M(_.callee))){let re=i(_);s.unshift({node:_,hasTrailingEmptyLine:re,printed:[De(e,[X(e),r("typeArguments"),hr(e,t,r)],t),re?E:""]}),e.call(o,"callee")}else Tt(_)?(s.unshift({node:_,needsParens:ge(e,t),printed:De(e,J(_)?Bs(e,t,r):Ss(e,t,r),t)}),e.call(o,"object")):_.type==="TSNonNullExpression"?(s.unshift({node:_,printed:De(e,"!",t)}),e.call(o,"expression")):s.unshift({node:_,printed:r()})}let{node:u}=e;s.unshift({node:u,printed:[X(e),r("typeArguments"),hr(e,t,r)]}),u.callee&&e.call(o,"callee");let p=[],c=[s[0]],y=1;for(;y<s.length&&(s[y].node.type==="TSNonNullExpression"||M(s[y].node)||J(s[y].node)&&s[y].node.computed&&Ce(s[y].node.property));++y)c.push(s[y]);if(!M(s[0].node))for(;y+1<s.length&&(Tt(s[y].node)&&Tt(s[y+1].node));++y)c.push(s[y]);p.push(c),c=[];let D=!1;for(;y<s.length;++y){if(D&&Tt(s[y].node)){if(s[y].node.computed&&Ce(s[y].node.property)){c.push(s[y]);continue}p.push(c),c=[],D=!1}(M(s[y].node)||s[y].node.type==="ImportExpression")&&(D=!0),c.push(s[y]),T(s[y].node,x.Trailing)&&(p.push(c),c=[],D=!1)}c.length>0&&p.push(c);function F(_){return/^[A-Z]|^[$_]+$/u.test(_)}function C(_){return _.length<=t.tabWidth}function d(_){let re=_[1][0]?.node.computed;if(_[0].length===1){let it=_[0][0].node;return it.type==="ThisExpression"||it.type==="Identifier"&&(F(it.name)||n&&C(it.name)||re)}let ae=N(0,_[0],-1).node;return J(ae)&&ae.property.type==="Identifier"&&(F(ae.property.name)||re)}let b=p.length>=2&&!T(p[1][0].node)&&d(p);function B(_){let re=_.map(ae=>ae.printed);return _.length>0&&N(0,_,-1).needsParens?["(",...re,")"]:re}function O(_){return _.length===0?"":m([E,L(E,_.map(B))])}let h=p.map(B),g=h,S=b?3:2,j=p.flat(),U=j.slice(1,-1).some(_=>T(_.node,x.Leading))||j.slice(0,-1).some(_=>T(_.node,x.Trailing))||p[S]&&T(p[S][0].node,x.Leading);if(p.length<=S&&!U&&!p.some(_=>N(0,_,-1).hasTrailingEmptyLine))return Ur(e)?g:l(g);let fe=N(0,p[b?1:0],-1).node,Y=!M(fe)&&i(fe),z=[B(p[0]),b?p.slice(1,2).map(B):"",Y?E:"",O(p.slice(b?2:1))],ee=s.map(({node:_})=>_).filter(M);function Ie(){let _=N(0,N(0,p,-1),-1).node,re=N(0,h,-1);return M(_)&&ne(re)&&ee.slice(0,-1).some(ae=>ae.arguments.some(Ht))}let st;return U||ee.length>2&&ee.some(_=>!_.arguments.every(re=>Re(re)))||h.slice(0,-1).some(ne)||Ie()?st=l(z):st=[ne(g)||Y?ke:"",nt([g,z])],pt({memberChain:!0},st)}var $o=Vo;function vt(e,t,r){let{node:n}=e,s=n.type==="NewExpression",i=X(e),o=le(n),u=n.type!=="TSImportType"&&n.typeArguments?r("typeArguments"):"",p=o.length===1&&Wr(o[0],t.originalText);if(p||Nl(e)||jl(e)||It(n,e.parent)){let D=[];if($t(e,()=>{D.push(r())}),!(p&&D[0].label?.embed))return[s?"new ":"",Ko(e,r),i,u,"(",L(", ",D),")"]}let c=n.type==="ImportExpression"||n.type==="TSImportType"||n.type==="TSExternalModuleReference";if(!c&&!s&&Tt(n.callee)&&!e.call(()=>ge(e,t),"callee",...n.callee.type==="ChainExpression"?["expression"]:[]))return $o(e,t,r);let y=[s?"new ":"",Ko(e,r),i,u,hr(e,t,r)];return c||M(n.callee)?l(y):y}function Ko(e,t){let{node:r}=e;return r.type==="ImportExpression"?`import${r.phase?`.${r.phase}`:""}`:r.type==="TSImportType"?"import":r.type==="TSExternalModuleReference"?"require":t("callee")}var Ml=["require","require.resolve","require.resolve.paths","import.meta.resolve"];function Nl(e){let{node:t}=e;if(!(t.type==="ImportExpression"||t.type==="TSImportType"||t.type==="TSExternalModuleReference"||t.type==="CallExpression"&&!t.optional&&Pt(t.callee,Ml)))return!1;let r=le(t);return r.length===1&&V(r[0])&&!T(r[0])}function jl(e){let{node:t}=e;if(t.type!=="CallExpression"||t.optional||t.callee.type!=="Identifier")return!1;let r=le(t);return t.callee.name==="require"?(r.length===1&&V(r[0])||r.length>1)&&!T(r[0]):t.callee.name==="define"&&e.parent.type==="ExpressionStatement"?r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&V(r[0])&&r[1].type==="ArrayExpression":!1}function ht(e,t,r,n,s,i){let o=vl(e,t,r,n,i),u=i?r(i,{assignmentLayout:o}):"";switch(o){case"break-after-operator":return l([l(n),s,l(m([A,u]))]);case"never-break-after-operator":return l([l(n),s," ",u]);case"fluid":{let p=Symbol("assignment");return l([l(n),s,l(m(A),{id:p}),je,yt(u,{groupId:p})])}case"break-lhs":return l([n,s," ",l(u)]);case"chain":return[l(n),s,A,u];case"chain-tail":return[l(n),s,m([A,u])];case"chain-tail-arrow-chain":return[l(n),s,u];case"only-left":return n}}function Zo(e,t,r){let{node:n}=e;return ht(e,t,r,r("left"),[" ",n.operator],"right")}function eu(e,t,r){return ht(e,t,r,r("id")," =","init")}function vl(e,t,r,n,s){let{node:i}=e,o=i[s];if(!o)return"only-left";let u=!pn(o);if(e.match(pn,tu,F=>!u||F.type!=="ExpressionStatement"&&F.type!=="VariableDeclaration"))return u?o.type==="ArrowFunctionExpression"&&o.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!u&&pn(o.right)||Ee(t.originalText,o))return"break-after-operator";if(i.type==="ImportAttribute"||o.type==="CallExpression"&&o.callee.name==="require"||t.parser==="json5"||t.parser==="jsonc"||t.parser==="json")return"never-break-after-operator";let y=Vi(n);if(Jl(i)||ql(i)||bs(i)&&y)return"break-lhs";let D=Ul(i,n,t);return e.call(()=>Rl(e,t,r,D),s)?"break-after-operator":Gl(i)?"break-lhs":!y&&(D||o.type==="TemplateLiteral"||o.type==="TaggedTemplateExpression"||Ei(o)||Ce(o)||o.type==="ClassExpression")?"never-break-after-operator":"fluid"}function Rl(e,t,r,n){let s=e.node;if(Te(s)&&!er(s))return!0;switch(s.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries&&!Xl(s))break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:c}=s;return Te(c)&&!er(c)}let{consequent:u,alternate:p}=s;return u.type==="ConditionalExpression"||p.type==="ConditionalExpression"}case"ClassExpression":return R(s.decorators)}if(n)return!1;let i=s,o=[];for(;;)if(i.type==="UnaryExpression"||i.type==="AwaitExpression"||i.type==="YieldExpression"&&i.argument!==null)i=i.argument,o.push("argument");else if(i.type==="TSNonNullExpression")i=i.expression,o.push("expression");else break;return!!(V(i)||e.call(()=>ru(e,t,r),...o))}function Jl(e){if(tu(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>Oe(r)&&(!r.shorthand||r.value?.type==="AssignmentPattern"))}return!1}function pn(e){return e.type==="AssignmentExpression"}function tu(e){return pn(e)||e.type==="VariableDeclarator"}function Gl(e){let t=Wl(e);if(R(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}function Wl(e){if(Cr(e))return e.typeParameters?.params}function ql(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=Qo(t.typeAnnotation);return R(r)&&r.length>1&&r.some(n=>R(Qo(n))||n.type==="TSConditionalType")}function bs(e){return e.type==="VariableDeclarator"&&e.init?.type==="ArrowFunctionExpression"}function Qo(e){let t;switch(e.type){case"GenericTypeAnnotation":t=e.typeParameters;break;case"TSTypeReference":t=e.typeArguments;break}return t?.params}function ru(e,t,r,n=!1){let{node:s}=e,i=()=>ru(e,t,r,!0);if(s.type==="ChainExpression"||s.type==="TSNonNullExpression")return e.call(i,"expression");if(M(s)){if(vt(e,t,r).label?.memberChain)return!1;let u=le(s);return!(u.length===0||u.length===1&&Fr(u[0],t))||Yl(s,r)?!1:e.call(i,"callee")}return J(s)?e.call(i,"object"):n&&(s.type==="Identifier"||s.type==="ThisExpression")}function Ul(e,t,r){return Oe(e)?(t=Qt(t),typeof t=="string"&&ot(t)<r.tabWidth+3):!1}function Yl(e,t){let r=Hl(e);if(R(r)){if(r.length>1)return!0;if(r.length===1){let s=r[0];if(Se(s)||xt(s)||s.type==="TSTypeLiteral"||s.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(ne(t(n)))return!0}return!1}function Hl(e){return(e.typeParameters??e.typeArguments)?.params}function zo(e){switch(e.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":return!!e.typeParameters;case"TSTypeReference":return!!e.typeArguments;default:return!1}}function Xl(e){return zo(e.checkType)||zo(e.extendsType)}var cn=new WeakMap;function su(e){return/^(?:\d+|\d+\.\d+)$/u.test(e)}function nu(e,t){return t.parser==="json"||t.parser==="jsonc"||!V(e.key)||ut(pe(e.key),t).slice(1,-1)!==e.key.value?!1:!!(Ro(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||(t.parser==="typescript"||t.parser==="oxc-ts")&&e.type==="PropertyDefinition")||su(e.key.value)&&String(Number(e.key.value))===e.key.value&&e.type!=="ImportAttribute"&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="oxc"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function Vl(e,t){let{key:r}=e.node;return(r.type==="Identifier"||Ce(r)&&su(dt(pe(r)))&&String(r.value)===dt(pe(r))&&!(t.parser==="typescript"||t.parser==="babel-ts"||t.parser==="oxc-ts"))&&(t.parser==="json"||t.parser==="jsonc"||t.quoteProps==="consistent"&&cn.get(e.parent))}function Ct(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:s}=e,{key:i}=n;if(t.quoteProps==="consistent"&&!cn.has(s)){let o=e.siblings.some(u=>!u.computed&&V(u.key)&&!nu(u,t));cn.set(s,o)}if(Vl(e,t)){let o=ut(JSON.stringify(i.type==="Identifier"?i.name:i.value.toString()),t);return e.call(()=>De(e,o,t),"key")}return nu(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!cn.get(s))?e.call(()=>De(e,/^\d/u.test(i.value)?dt(i.value):i.value,t),"key"):r("key")}function ln(e,t,r){let{node:n}=e;return n.shorthand?r("value"):ht(e,t,r,Ct(e,t,r),":","value")}var $l=({node:e,key:t,parent:r})=>t==="value"&&e.type==="FunctionExpression"&&(r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="MethodDefinition"||r.type==="TSAbstractMethodDefinition"||r.type==="TSDeclareMethod"||r.type==="Property"&&mt(r));function mn(e,t,r,n){if($l(e))return Dn(e,t,r);let{node:s}=e,i=!1;if((s.type==="FunctionDeclaration"||s.type==="FunctionExpression")&&n?.expandLastArg){let{parent:y}=e;M(y)&&(le(y).length>1||K(s).every(D=>D.type==="Identifier"&&!D.typeAnnotation))&&(i=!0)}let o=[Q(e),s.async?"async ":"",`function${s.generator?"*":""} `,s.id?r("id"):""],u=Ke(e,t,r,i),p=rr(e,r),c=lt(s,p);return o.push(r("typeParameters"),l([c?l(u):u,p]),s.body?" ":"",r("body")),t.semi&&(s.declare||!s.body)&&o.push(";"),o}function Sr(e,t,r){let{node:n}=e,{kind:s}=n,i=n.value||n,o=[];return!s||s==="init"||s==="method"||s==="constructor"?i.async&&o.push("async "):(Le(s==="get"||s==="set"),o.push(s," ")),i.generator&&o.push("*"),o.push(Ct(e,t,r),n.optional?"?":"",n===i?Dn(e,t,r):r("value")),o}function Dn(e,t,r){let{node:n}=e,s=Ke(e,t,r),i=rr(e,r),o=vo(n),u=lt(n,i),p=[r("typeParameters"),l([o?l(s,{shouldBreak:!0}):u?l(s):s,i])];return n.body?p.push(" ",r("body")):p.push(t.semi?";":""),p}function Kl(e){let t=K(e);return t.length===1&&!e.typeParameters&&!T(e,x.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!T(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function fn(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return Kl(r)}return!1}function rr(e,t){let{node:r}=e,s=[G(e,t,"returnType")];return r.predicate&&s.push(t("predicate")),s}function iu(e,t,r){let{node:n}=e,s=[];if(n.argument){let u=r("argument");Ql(t,n.argument)?u=["(",m([E,u]),E,")"]:(Te(n.argument)||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(u=l([P("("),m([f,u]),f,P(")")])),s.push(" ",u)}let i=T(n,x.Dangling),o=t.semi&&i&&T(n,x.Last|x.Line);return o&&s.push(";"),i&&s.push(" ",v(e,t)),!o&&t.semi&&s.push(";"),s}function ou(e,t,r){return["return",iu(e,t,r)]}function uu(e,t,r){return["throw",iu(e,t,r)]}function Ql(e,t){if(Ee(e.originalText,t)||T(t,x.Leading,r=>ue(e.originalText,w(r),I(r)))&&!H(t))return!0;if(Xt(t)){let r=t,n;for(;n=Di(r);)if(r=n,Ee(e.originalText,r))return!0}return!1}function au(e,t){if(t.semi||ks(e,t)||Ls(e,t)||Is(e,t))return!1;let{node:r,key:n,parent:s}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(s.type==="Program"||s.type==="BlockStatement"||s.type==="StaticBlock"||s.type==="TSModuleBlock")||n==="consequent"&&s.type==="SwitchCase")&&e.call(()=>pu(e,t),"expression"))}function pu(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!fn(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:s}=r;if(n&&(s==="+"||s==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(H(r))return!0}return ge(e,t)?!0:Xt(r)?e.call(()=>pu(e,t),...Rr(r)):!1}var Ps=({node:e,parent:t})=>e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1&&(Array.isArray(t.directives)&&t.directives.length===0||!t.directives);function ks(e,t){return(t.parentParser==="markdown"||t.parentParser==="mdx")&&Ps(e)&&H(e.node.expression)}function Is(e,t){return t.__isHtmlInlineEventHandler&&Ps(e)}function Ls(e,t){return(t.parser==="__vue_event_binding"||t.parser==="__vue_ts_event_binding")&&Ps(e)}var Os=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},Qe=Os;function ws(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var _s=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let s=0;s<t.length&&r.has(t.charAt(s));s++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let s=t.length-1;s>=0&&r.has(t.charAt(s));s--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#e.has(N(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${ws([...this.#e].join(""))}]+`,s=new RegExp(r?`(${n})`:n,"u");return t.split(s)}hasWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=this.#e;return Array.prototype.every.call(t,n=>r.has(n))}#t(t){let r=Number.POSITIVE_INFINITY;for(let n of t.split(`
39
39
  `)){if(n.length===0)continue;let s=this.getLeadingWhitespaceCount(n);if(s===0)return 0;n.length!==s&&s<r&&(r=s)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
40
40
  `).map(n=>n.slice(r)).join(`
41
41
  `)}},cu=_s;var yn=new cu(`