@pobammer-ts/small-rules 2.16.1 → 2.17.0

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/dist/index.js CHANGED
@@ -53,17 +53,43 @@
53
53
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
54
54
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55
55
  * SOFTWARE.
56
+ *
57
+ * eslint-plugin-roblox-ts <https://github.com/roblox-ts/eslint-plugin-roblox-ts>
58
+ * Copyright (c) 2025-PRESENT roblox-ts
59
+ * SPDX-License-Identifier: MIT
60
+ *
61
+ * MIT License
62
+ *
63
+ * Copyright (c) 2025-PRESENT roblox-ts
64
+ *
65
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
66
+ * of this software and associated documentation files (the "Software"), to deal
67
+ * in the Software without restriction, including without limitation the rights
68
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
69
+ * copies of the Software, and to permit persons to whom the Software is
70
+ * furnished to do so, subject to the following conditions:
71
+ *
72
+ * The above copyright notice and this permission notice shall be included in all
73
+ * copies or substantial portions of the Software.
74
+ *
75
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
76
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
77
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
78
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
79
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
80
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
81
+ * SOFTWARE.
56
82
  */
57
- import{definePlugin as e}from"oxlint-plugin-utilities";import{Predicate as t,String as n}from"effect";import r from"ignore";import i from"node:path";import{parse as a}from"yuku-parser";import{cwd as o}from"node:process";import{type as s}from"arktype";import{Minimatch as c,minimatch as l}from"minimatch";import{existsSync as u,readFileSync as d,readdirSync as f}from"node:fs";import{ResolverFactory as p}from"oxc-resolver";function m(e){let t=e;for(;;)switch(t.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:t=t.expression;break;default:return t}}function h(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function g(e){return e.computed?e.property.type===`Literal`&&t.isString(e.property.value)?e.property.value:void 0:e.property.type===`Identifier`?e.property.name:void 0}function _(e,t){let n=e;for(;n!==null;){let e=n.set.get(t);if(e!==void 0)return e;n=n.upper}}function ee(e,t){for(let n of t.childScopes)e.push(n)}function te(e,t){let n=[e.getScope(e.ast)];for(let e of n){ee(n,e);for(let n of e.variables)t(n)}}function v(e,t,n){let r=e.getScope(t);for(;r!==null;){let e=r.set.get(n);if(e!==void 0&&e.defs.length>0)return!0;r=r.upper}return!1}function ne(e,t){let[n]=t.range;for(;n>0;){let t=e[n-1];if(t===` `||t===` `){--n;continue}break}let[,r]=t.range,i=r;for(;i<e.length;){let t=e[i];if(t===`
58
- `||t===`\r`){i+=1;continue}break}return[n,i]}function re(e,t){if(e.getCommentsInside(t).length>0)return!0;let n=t.loc.start.line,r=t.loc.end.line;for(let r of e.getCommentsBefore(t)){let e=r.loc.end.line;if(e===n||e===n-1)return!0}for(let n of e.getCommentsAfter(t)){let e=n.loc.start.line;if(e===r||e===r+1)return!0}return!1}function y(e,t,n){let r=`https://docs.howmanysmall.com/small-rules/rules/${t}/${e}/`;return n.meta===void 0?{...n}:{...n,meta:{...n.meta,docs:{...n.meta.docs,url:r}}}}const ie=/^[A-Z]/v,b=new Set([`end`,`loc`,`parent`,`range`,`start`,`type`]);function x(e){return t.isObject(e)&&t.isString(e.type)}function ae(e){return b.has(e)}function S(e){return ie.test(e)}function C(e){return e.type===`VariableDeclarator`}function oe(e){return se(e.typeAnnotation)?e.typeAnnotation:void 0}function se(e){return t.isObject(e)&&`type`in e&&e.type===`TSTypeAnnotation`}function ce(e,t){return e.type===`Identifier`&&e.name===t}function le(e){if(!(e.type!==`MemberExpression`||e.computed||e.object.type!==`Identifier`||e.property.type!==`Identifier`))return{objectName:e.object.name,propertyName:e.property.name}}function ue(e,t,n,r){return e.callee.type===`Identifier`?t.has(e.callee.name):e.callee.type!==`MemberExpression`||e.callee.object.type!==`Identifier`?!1:n.has(e.callee.object.name)&&g(e.callee)===r}function de(e,t,n){return ue(e,t,n,`useMemo`)}function fe({imported:e}){return e.type===`Identifier`?e.name:e.value}function w(e){return e.type===`Identifier`&&t.isString(e.name)}function T(e){return e.type===`Identifier`}function pe(e){return e.type===`JSXIdentifier`&&`name`in e}function me(e){return e.type===`JSXOpeningElement`}function he(e){return e.type===`ImportDeclaration`}function ge(e){return e.type===`Literal`&&t.isString(e.value)}function _e(e){return e.type===`CallExpression`}function ve(e){return e.type===`ImportSpecifier`}function ye(e){return e.type===`ExportSpecifier`}function E(e){return e.type===`Property`}function D(e){return e.type===`MemberExpression`}function be(e){return e.type===`AssignmentExpression`}function xe(e){return e.type===`UnaryExpression`}function Se(e){return e.type===`BinaryExpression`}function Ce(e){return e.type===`LogicalExpression`}function we(e){return e.type===`ConditionalExpression`}function Te(e){return e.type===`SequenceExpression`}function Ee(e){return e.type===`MethodDefinition`||e.type===`TSAbstractMethodDefinition`}function De(e){return e.type===`PropertyDefinition`||e.type===`TSAbstractPropertyDefinition`}function Oe(e){return e.type===`ImportDefaultSpecifier`}function ke(e){return e.type===`ImportNamespaceSpecifier`}function Ae(e){return e.type===`VariableDeclaration`}function je(e){return e.type===`ExportNamedDeclaration`}function Me(e){return e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function O(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionExpression`}function k(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function Ne(e,t){return ce(e.callee,t)}function Pe(e){return e.type===`ClassDeclaration`||e.type===`ClassExpression`}function Fe(e){return e.type===`TSPropertySignature`}function Ie(e){return e.type===`Literal`}function Le(e){return e.type===`ArrowFunctionExpression`}function Re(e){return Me(e)||Le(e)}function ze(e){return e.type===`TSQualifiedName`}function Be(e){return e.type===`Literal`&&t.isNumber(e.value)}function Ve(e){return e.type===`NewExpression`}function He(e){return e.type===`ArrayExpression`}function Ue(e){return e.type===`ObjectExpression`}function We(e){return e.type===`ObjectPattern`}function Ge(e){return e.type===`TemplateLiteral`}function Ke(e){return e.type===`ExpressionStatement`}function qe(e){return e.type===`TSTypeAssertion`}function Je(e){return e.type===`TSAsExpression`}function Ye(e){return e.type===`AssignmentPattern`}function Xe(e){return e.type===`ThisExpression`}function Ze(e){if(!_e(e)||e.optional)return!1;let{callee:t}=e;if(!T(t)||t.name!==`require`||e.arguments.length!==1)return!1;let[n]=e.arguments;return n!==void 0&&ge(n)}function Qe(e){return e.type===`Identifier`}function $e(e){return e.type!==`PrivateIdentifier`}function et(e){return Je(e)||qe(e)}function tt(e){return e.type===`TSTypeReference`}function nt({typeAnnotation:e}){return tt(e)&&e.typeName.type===`Identifier`&&e.typeName.name===`const`}function rt(e){return Ue(e)&&e.properties.length===0}function it(e){let t=e,{parent:n}=e;for(;n.type===`ParenthesizedExpression`&&n.expression===t;)t=n,{parent:n}=n;return!et(n)||n.expression!==t}function at(e){let t=0,n=!1,r=e;for(;et(r);)t+=1,n||=!nt(r),r=h(r.expression);return t>1&&n}const ot=y(`no-chained-type-assertions`,`anti-slop`,{createOnce(e){function t(t){!it(t)||!at(t)||e.report({messageId:`chained`,node:t})}return{TSAsExpression:t,TSTypeAssertion:t}},meta:{docs:{description:`Disallow chained TypeScript as and angle-bracket assertions, including parenthesized chains.`,recommended:!0},messages:{chained:`This assertion chain discards type evidence. Keep the original precise type, or parse untrusted input at its boundary before narrowing it.`},type:`problem`}});function st(e){let t=h(e);return t.type===`ConditionalExpression`&&(rt(t.consequent)||rt(t.alternate))}const ct=y(`no-conditional-empty-object-spread`,`anti-slop`,{createOnce(e){return{SpreadElement(t){t.parent.type!==`ObjectExpression`||!st(t.argument)||e.report({messageId:`avoid`,node:t})}}},meta:{docs:{description:`Disallow object spreads that conditionally spread an empty object to omit fields.`,recommended:!0},messages:{avoid:`This conditional spread hides property omission behind an empty object. Build the object in separate statements and add the property only when present.`},type:`suggestion`}}),lt=new Set([`NonNullable`,`Omit`,`Partial`,`Pick`,`PropertyKey`,`Readonly`,`Record`,`Required`]),ut=new Set([`NonNullable`,`Partial`,`Readonly`,`Required`]),dt=`open dictionary`;function ft(e){return e.type===`ExportNamedDeclaration`||e.type===`ExportDefaultDeclaration`?e.declaration??void 0:e}function pt(e,t){for(let n of e.specifiers)lt.has(n.local.name)&&t.add(n.local.name)}function mt(e,t,n){let{name:r}=e.id;t.has(r)?n.add(r):t.set(r,e),lt.has(r)&&n.add(r)}function ht(e,t,n){let{name:r}=e.id,i=t.get(r)??[];i.push(e),t.set(r,i),lt.has(r)&&n.add(r)}function gt(e,t,n,r){if(e!==void 0)switch(e.type){case`ClassDeclaration`:case`FunctionDeclaration`:e.id!==null&&lt.has(e.id.name)&&r.add(e.id.name);return;case`ImportDeclaration`:pt(e,r);return;case`TSEnumDeclaration`:lt.has(e.id.name)&&r.add(e.id.name);return;case`TSInterfaceDeclaration`:ht(e,n,r);return;case`TSTypeAliasDeclaration`:mt(e,t,r)}}function _t(e){let t=new Map,n=new Map,r=new Set;for(let i of e.body)gt(ft(i),t,n,r);return{aliases:t,interfaces:n,shadowedBuiltIns:r}}function vt(e){return e.typeName.type===`Identifier`?e.typeName.name:void 0}function A(e,t){return lt.has(e)&&!t.shadowedBuiltIns.has(e)}function j(e){let t=e;for(;t.type===`TSParenthesizedType`||t.type===`TSTypeOperator`&&t.operator===`readonly`;)t=t.typeAnnotation;return t}function yt(e,t){let n=j(e);return n.type===`TSTypeReference`&&vt(n)===t&&(n.typeArguments?.params.length??0)===0}function bt(e){return j(e).type===`TSNeverKeyword`}function xt(e){return e.type===`TSPropertySignature`&&e.optional&&e.typeAnnotation!==null&&bt(e.typeAnnotation.typeAnnotation)}function St(e){return e.members.length===0||e.members.every(xt)}function Ct(e){if(e.length!==1)return!1;let[t]=e;return t?.extends.length===0&&(t.body.body.length===0||t.body.body.every(xt))}function wt(e,t){let n=e,r=``;for(;;){let e=j(n);if(e.type!==`TSTypeReference`)return n;let i=vt(e);if(i===void 0||i===r)return n;let a=t.get(i);if(a===void 0)return n;r=i,n=a}}function Tt(e,t,n){let r=e.typeParameters?.params??[],i=t.typeArguments?.params??[],a=new Map(n);for(let[e,t]of r.entries()){let n=i[e]??t.default??void 0;if(n===void 0)return;a.set(t.name.name,wt(n,a))}return a}function Et(e,t,n,r){for(let i of e)if(kt(i,t,n,r)!==void 0)return`union`}function Dt(e,t,n,r){let i,a=e.length>0;for(let o of e){let e=kt(o,t,n,r);if(e===`any`)return`any`;e===void 0?a=!1:i??=e}return a?i:void 0}function Ot(e,t,n,r){let i=vt(e);if(i===void 0)return;let a=n.get(i);if(a!==void 0)return yt(a,i)?void 0:kt(a,t,n,r);if(ut.has(i)&&A(i,t)){let i=e.typeArguments?.params[0];return i===void 0?void 0:kt(i,t,n,r)}let o=t.interfaces.get(i);if(o!==void 0)return Ct(o)?`empty-object`:void 0;let s=t.aliases.get(i);if(s===void 0||r.has(i))return;let c=Tt(s,e,n);if(c!==void 0)return kt(s.typeAnnotation,t,c,new Set([...r,i]))}function kt(e,t,n,r){let i=j(e);return i.type===`TSUnknownKeyword`?`unknown`:i.type===`TSAnyKeyword`?`any`:i.type===`TSObjectKeyword`?`object`:i.type===`TSTypeLiteral`&&St(i)?`empty-object`:i.type===`TSUnionType`?Et(i.types,t,n,r):i.type===`TSIntersectionType`?Dt(i.types,t,n,r):i.type===`TSTypeReference`?Ot(i,t,n,r):void 0}function At(e){return e===null?void 0:e.typeAnnotation}function jt(e,t){let n=[];for(let r of e.members){if(r.type!==`TSIndexSignature`)continue;let e=At(r.typeAnnotation);e!==void 0&&n.push({substitutions:t,type:e})}return n}function Mt(e,t,n,r,i){if(ut.has(t)&&A(t,n)){let t=e.typeArguments?.params[0];return t===void 0?[]:Ft(t,n,r,i)}if(t===`Record`&&A(t,n)){let t=e.typeArguments?.params[1];return t===void 0?[]:[{substitutions:r,type:t}]}if((t===`Pick`||t===`Omit`)&&A(t,n)){let t=e.typeArguments?.params[0];return t===void 0?[]:Ft(t,n,r,i)}}function Nt(e,t,n,r){let i=vt(e);if(i===void 0)return[];let a=n.get(i);if(a!==void 0)return yt(a,i)?[]:Ft(a,t,n,r);let o=Mt(e,i,t,n,r);if(o!==void 0)return o;let s=t.aliases.get(i);if(s===void 0||r.has(i))return[];let c=Tt(s,e,n);if(c===void 0)return[];let l=new Set([...r,i]);return Ft(s.typeAnnotation,t,c,l)}function Pt(e,t,n,r){let i=j(e);return i.type===`TSTypeLiteral`?jt(i,n):i.type===`TSMappedType`?i.typeAnnotation===null?[]:[{substitutions:n,type:i.typeAnnotation}]:i.type===`TSTypeReference`?Nt(i,t,n,r):[]}function Ft(e,t,n,r){return Pt(e,t,n,r)}function It(e,t){let n=kt(e,t,new Map,new Set);return n===void 0?void 0:{kind:`unsafe-dictionary`,unsafeValue:n}}function Lt(e,t){let n=Pt(e,t,new Map,new Set);for(let e of n){let n=kt(e.type,t,e.substitutions,new Set);if(n!==void 0)return{kind:`unsafe-dictionary`,unsafeValue:n}}}function Rt(e,t,n,r){return Pt(e,t,n,r).length>0}function zt(e,t){let n=vt(e);if(n===void 0)return;if(ut.has(n)&&A(n,t)){let n=e.typeArguments?.params[0];return n===void 0?void 0:Bt(n,t)}if(n===`Record`&&A(n,t))return{kind:dt};let r=t.aliases.get(n);if(r===void 0)return;let i=Tt(r,e,new Map);if(i!==void 0)return(r.typeParameters?.params.length??0)>0?Rt(r.typeAnnotation,t,i,new Set([n]))?{kind:`generic container`}:void 0:Wt(r.typeAnnotation,t,i,new Set([n]))}function Bt(e,t){let n=j(e);return n.type===`TSUnknownKeyword`?{kind:`unknown`}:n.type===`TSObjectKeyword`?{kind:`object`}:n.type===`TSTypeLiteral`?n.members.some(e=>e.type===`TSIndexSignature`)?{kind:dt}:n.members.length>0?{kind:`anonymous object`}:void 0:n.type===`TSMappedType`?{kind:dt}:n.type===`TSTypeReference`?zt(n,t):void 0}function Vt(e,t,n){let r=j(e);if(r.type===`TSStringKeyword`||r.type===`TSNumberKeyword`||r.type===`TSSymbolKeyword`)return!0;if(r.type===`TSUnionType`)return r.types.every(e=>Ht(e,t,n));if(r.type!==`TSTypeReference`)return!1;let i=vt(r);if(i===void 0)return!1;let a=n.get(i);return a!==void 0&&!yt(a,i)?Ht(a,t,n):i===`PropertyKey`&&A(i,t)}function Ht(e,t,n){return Vt(e,t,n)}function Ut(e,t,n,r){let i=vt(e);if(i===void 0)return;let a=n.get(i);if(a!==void 0)return yt(a,i)?void 0:Gt(a,t,n,r);if(ut.has(i)&&A(i,t)){let i=e.typeArguments?.params[0];return i===void 0?void 0:Gt(i,t,n,r)}if(i===`Record`&&A(i,t))return{kind:dt};let o=t.aliases.get(i);if(o===void 0||r.has(i))return;let s=Tt(o,e,n);if(s===void 0)return;let c=new Set([...r,i]);return Gt(o.typeAnnotation,t,s,c)}function Wt(e,t,n,r){let i=j(e);return i.type===`TSUnknownKeyword`?{kind:`unknown`}:i.type===`TSObjectKeyword`?{kind:`object`}:i.type===`TSTypeLiteral`?i.members.some(e=>e.type===`TSIndexSignature`)?{kind:dt}:void 0:i.type===`TSMappedType`?Vt(i.constraint,t,n)?{kind:dt}:void 0:i.type===`TSTypeReference`?Ut(i,t,n,r):void 0}function Gt(e,t,n,r){return Wt(e,t,n,r)}function Kt(e){let t=e;for(;t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSTypeAssertion`||t.type===`TSNonNullExpression`||t.type===`TSSatisfiesExpression`;)t=t.expression;return t.type===`ObjectExpression`||t.type===`ArrayExpression`||t.type===`ArrowFunctionExpression`||t.type===`ClassExpression`||t.type===`FunctionExpression`||t.type===`NewExpression`||t.type===`Literal`||t.type===`TemplateLiteral`||t.type===`UnaryExpression`}function qt(e,t){return _(e.getScope(t),t.name)}function Jt(e){if(e.defs.length!==1)return;let[t]=e.defs;if(t?.type!==`Variable`)return;let{node:n}=t;return n.type===`VariableDeclarator`?n:void 0}function Yt(e,t){return t.parent.type===`VariableDeclaration`&&t.parent.kind===`const`&&e.references.every(e=>e.init||!e.isWrite())}function Xt(e,t,n=new Set){let r=t;for(;;){if(Kt(r))return!0;let t=m(r);if(t.type!==`Identifier`)return!1;let i=qt(e,t);if(i===void 0||n.has(i))return!1;let a=Jt(i);if(a===void 0)return!1;let{init:o}=a;if(o===null||!Yt(i,a))return!1;n.add(i),r=o}}function Zt(e,t){if(e!=null)return Bt(e.typeAnnotation,t)}function Qt(e){let t=e.parent;for(;t!==null&&t.type!==`Program`;){if(t.type===`ArrowFunctionExpression`||t.type===`FunctionDeclaration`||t.type===`FunctionExpression`)return t;t=t.parent}}function $t(e,t){return t.type===`Identifier`||t.type===`PrivateIdentifier`?t.name:t.type===`Literal`?String(t.value):e.getText(t)}function en(e,t){if(t===void 0)return`anonymous function`;if(t.id!==null)return t.id.name;let{parent:n}=t;return n.type===`VariableDeclarator`&&n.id.type===`Identifier`?n.id.name:n.type===`MethodDefinition`?$t(e,n.key):`anonymous function`}function tn(e){let t=an(e);return t.type===`ObjectExpression`&&t.properties.length===0}function nn(e){return e.kind===`open dictionary`||e.kind===`generic container`}function rn(e){let t=e.parent;for(;t?.type===`ParenthesizedExpression`;)t=t.parent;return t?.type===`TSAsExpression`||t?.type===`TSTypeAssertion`}function an(e){let t=e;for(;t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`||t.type===`TSNonNullExpression`;)t=t.expression;return t}const on=y(`no-known-value-widening`,`anti-slop`,{createOnce(e){let t;function n(t,n,r){n!==void 0&&(nn(n)&&tn(t)||Xt(e.sourceCode,t)&&e.report({data:{subject:r,target:n.kind},messageId:`widening`,node:t}))}function r(e){return t===void 0?void 0:Zt(e,t)}return{ArrowFunctionExpression(t){t.body.type!==`BlockStatement`&&n(t.body,r(t.returnType),`return value of \`${en(e.sourceCode,t)}\``)},AssignmentExpression(t){if(t.operator!==`=`||t.left.type!==`Identifier`)return;let i=qt(e.sourceCode,t.left);if(i===void 0)return;let a=Jt(i)?.id;a?.type===`Identifier`&&n(t.right,r(a.typeAnnotation),`binding \`${a.name}\``)},Program(e){t=_t(e)},PropertyDefinition(t){t.value!==null&&n(t.value,r(t.typeAnnotation),`property \`${$t(e.sourceCode,t.key)}\``)},ReturnStatement(t){if(t.argument===null)return;let i=Qt(t);n(t.argument,r(i?.returnType),`return value of \`${en(e.sourceCode,i)}\``)},TSAsExpression(e){t===void 0||rn(e)||n(e.expression,Bt(e.typeAnnotation,t),`assertion`)},TSTypeAssertion(e){t!==void 0&&(rn(e)||n(e.expression,Bt(e.typeAnnotation,t),`assertion`))},VariableDeclarator(e){e.init!==null&&e.id.type===`Identifier`&&n(e.init,r(e.id.typeAnnotation),`binding \`${e.id.name}\``)}}},meta:{docs:{description:`Disallow syntactically established values from flowing into explicitly broad or anonymous target types that discard useful evidence.`,recommended:!0},messages:{widening:"The explicit {{target}} type on {{subject}} discards known type evidence. Keep inference, validate with `satisfies`, or use a named owner contract."},type:`problem`}}),sn=new Set([`doMock`,`mock`,`unstable_mockModule`]);function cn(e,t){return _(e.getScope(t),t.name)}function ln(e){return e.defs.some(e=>{if(e.type!==`ImportBinding`||e.parent?.type!==`ImportDeclaration`||e.node.type!==`ImportSpecifier`)return!1;let t=e.node.imported.type===`Identifier`?e.node.imported.name:e.node.imported.value;return e.parent.source.value===`vitest`&&t===`vi`||e.parent.source.value===`@jest/globals`&&t===`jest`})}function un(e,t){if(t.type!==`Identifier`)return!1;if((t.name===`vi`||t.name===`jest`)&&e.isGlobalReference(t))return!0;let n=cn(e,t);return n===void 0?t.name===`vi`||t.name===`jest`:n.defs.length===0||ln(n)}function dn(e,n){return!(`property`in n)||!(`object`in n)||!(`computed`in n)||!un(e,n.object)?!1:n.computed?n.property.type===`Literal`&&t.isString(n.property.value)&&sn.has(n.property.value):n.property.type===`Identifier`&&sn.has(n.property.name)}const fn=y(`no-module-mocking`,`anti-slop`,{createOnce(e){return{CallExpression(t){t.callee.type!==`Super`&&t.callee.type!==`V8IntrinsicExpression`&&dn(e.sourceCode,t.callee)&&e.report({messageId:`moduleMock`,node:t})}}},meta:{docs:{description:`Disallow Vitest and Jest module mocking; tests must replace dependencies through real interfaces.`,recommended:!0},messages:{moduleMock:`Replace module mocking with dependency injection through a real interface, service layer, or faithful test implementation.`},type:`problem`}});function pn(e,t){if(x(e)){t.push(e);return}if(Array.isArray(e))for(let n of e)x(n)&&t.push(n)}function mn(e,t,n){let r=t[e.type];if(r===void 0)return;let i=new Set(r);for(let[t,r]of Object.entries(e))i.has(t)&&pn(r,n)}function hn(e,t,n){let r=[e];for(;r.length>0;){let e=[];for(let i of r)i.type===`TSInferType`&&n.add(i.typeParameter.name.name),mn(i,t,e);r=e}}function gn(e,t){if(!(`typeParameters`in e))return;let n=e.typeParameters?.params;if(n!==void 0)for(let e of n)t.add(e.name.name)}function _n(e,t,n){e.type===`TSMappedType`&&(t===e.nameType||t===e.typeAnnotation)&&n.add(e.key.name)}function vn(e,t,n,r){e.type===`TSConditionalType`&&t===e.trueType&&hn(e.extendsType,n,r)}function yn(e,t){let n=new Set,r=e,i=e;for(;i.type!==`Program`;)gn(i,n),_n(i,r,n),vn(i,r,t,n),r=i,i=i.parent;return n}function bn(e){let t=e;for(;t.type===`TSParameterProperty`||t.type===`RestElement`;){if(t.type===`TSParameterProperty`){t=t.parameter;continue}if(t.typeAnnotation?.type===`TSTypeAnnotation`)return t.typeAnnotation;t=t.argument}return t.type===`AssignmentPattern`?t.typeAnnotation??t.left.typeAnnotation??void 0:t.typeAnnotation??void 0}function xn(e,t,n){return e.type===`Identifier`?e.name:n.slice(0,n.length-(t.range[1]-t.range[0])).trimEnd()}function Sn(e){if(!(e.type!==`TSTypeReference`||e.typeName.type!==`Identifier`||(e.typeArguments?.params.length??0)>0))return e.typeName.name}function Cn(e,t){if(e.type===`TSParenthesizedType`)return t.push(e.typeAnnotation),!0;if(e.type===`TSUnionType`){for(let n of e.types)t.push(n);return!0}return!1}const wn=y(`no-object-parameters`,`anti-slop`,{createOnce(e){let t=new Map;function n(e,n,r,i){let a=Sn(e);if(a===void 0||r.has(a)||n.has(a))return;r.add(a);let o=t.get(a);o!==void 0&&i.push(o)}function r(e,t){let r=new Set,i=[e];for(;i.length>0;){let e=[];for(let a of i){if(a.type===`TSObjectKeyword`)return!0;Cn(a,e)||n(a,t,r,e)}i=e}return!1}function i(t){let n=yn(t,e.sourceCode.visitorKeys);for(let i of t.params){let t=bn(i);t?.type!==`TSTypeAnnotation`||!r(t.typeAnnotation,n)||e.report({data:{parameter:xn(i,t,e.sourceCode.getText(i))},messageId:`objectParameter`,node:t.typeAnnotation})}}return{ArrowFunctionExpression:i,FunctionDeclaration:i,FunctionExpression:i,Program(e){t.clear();for(let n of e.body){let e=n.type===`ExportNamedDeclaration`?n.declaration:n;e?.type===`TSTypeAliasDeclaration`&&(e.typeParameters?.params.length??0)===0&&t.set(e.id.name,e.typeAnnotation)}},TSCallSignatureDeclaration:i,TSConstructorType:i,TSConstructSignatureDeclaration:i,TSDeclareFunction:i,TSEmptyBodyFunctionExpression:i,TSFunctionType:i,TSMethodSignature:i}},meta:{docs:{description:`Disallow object function parameters; inputs must use an owner-provided type and be parsed at their boundary.`,recommended:!0},messages:{objectParameter:"Parameter `{{parameter}}` uses the broad `object` type. Accept a named owner type; parse external input at its boundary before calling this function."},type:`problem`}});function Tn(e,t){return _(e.getScope(t),t.name)}function En(e,t){if(t.type!==`Identifier`||t.name!==`Reflect`)return!1;if(e.isGlobalReference(t))return!0;let n=Tn(e,t);return n===void 0||n.defs.length===0}function Dn(e,t,n){return!(`property`in t)||!(`object`in t)||!(`computed`in t)||!En(e,t.object)?!1:t.computed?t.property.type===`Literal`&&t.property.value===n:t.property.type===`Identifier`&&t.property.name===n}const On=y(`no-reflect-apply`,`anti-slop`,{createOnce(e){return{CallExpression(t){t.callee.type!==`Super`&&t.callee.type!==`V8IntrinsicExpression`&&Dn(e.sourceCode,t.callee,`apply`)&&e.report({messageId:`reflectApply`,node:t})}}},meta:{docs:{description:`Disallow Reflect.apply; call typed functions directly or model dynamic dispatch behind an interface.`,recommended:!0},messages:{reflectApply:"Replace `Reflect.apply` with a typed function call. Model dynamic dispatch behind a named interface."},type:`problem`}}),kn=y(`no-reflect-get`,`anti-slop`,{createOnce(e){return{CallExpression(t){t.callee.type!==`Super`&&t.callee.type!==`V8IntrinsicExpression`&&Dn(e.sourceCode,t.callee,`get`)&&e.report({messageId:`reflectGet`,node:t})}}},meta:{docs:{description:`Disallow Reflect.get; use typed property access or parse dynamic input into a domain type.`,recommended:!0},messages:{reflectGet:"Replace `Reflect.get` with typed property access. Parse dynamic input into a named domain type before reading it."},type:`problem`}});function An(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function jn(e){let t=e.parent;for(;t!==null&&t.type!==`Program`;){if(An(t))return t.returnType?.typeAnnotation.type===`TSTypePredicate`;t=t.parent}return!1}const Mn=y(`no-runtime-typeof`,`anti-slop`,{createOnce(e){return{UnaryExpression(n){let[r]=e.options,i=t.isObject(r)&&r.allowInTypeGuards;n.operator===`typeof`&&(!i||!jn(n))&&e.report({messageId:`runtimeTypeof`,node:n})}}},meta:{defaultOptions:[{allowInTypeGuards:!1}],docs:{description:`Disallow runtime typeof checks; external values must be decoded into meaningful types at their I/O boundary.`,recommended:!0},messages:{runtimeTypeof:"A `typeof` check narrows a representation without establishing its contract. Parse input at its I/O boundary, then branch on the domain value."},schema:[{additionalProperties:!1,properties:{allowInTypeGuards:{default:!1,description:"Allow `typeof` inside functions whose return type is a type predicate (`value is T`) or an assertion predicate (`asserts value is T`).",type:`boolean`}},type:`object`}],type:`problem`}});function Nn(e){return e.toLowerCase().includes(`shape`)}const Pn=y(`no-shape-in-symbol-names`,`anti-slop`,{createOnce(e){function t(t){Nn(t.name)&&e.report({data:{name:t.name},messageId:`forbiddenSymbolName`,node:t})}return{Identifier:t,JSXIdentifier:t,PrivateIdentifier:t}},meta:{docs:{description:`Disallow the case-insensitive substring "shape" in JavaScript, TypeScript, private, and JSX symbol names.`,recommended:!0},messages:{forbiddenSymbolName:`Rename symbol "{{name}}" for its domain role; "shape" describes structure rather than ownership.`},type:`problem`}});function Fn(e){return e.typeAnnotation??void 0}function In(e){let t=e;for(;;){if(t.type===`TSParameterProperty`){t=t.parameter;continue}if(t.type===`RestElement`){if(t.typeAnnotation)return t.typeAnnotation;t=t.argument;continue}return t.type===`AssignmentPattern`?t.typeAnnotation??Fn(t.left):Fn(t)}}function Ln(e,t){let n=e;for(;;){if(n.type===`TSParameterProperty`){n=n.parameter;continue}if(n.type===`AssignmentPattern`){n=n.left;continue}if(n.type===`RestElement`){n=n.argument;continue}return n.type===`Identifier`?n.name:t.slice(0,t.trimEnd().lastIndexOf(`:`)).trimEnd()}}function Rn(e){let t=e.returnType?.typeAnnotation;if(t?.type===`TSTypePredicate`)return t.parameterName.type===`Identifier`?t.parameterName.name:void 0}const zn=y(`no-unknown-parameters`,`anti-slop`,{createOnce(e){function t(t){let n=Rn(t);for(let r of t.params){let t=In(r);if(t?.typeAnnotation.type!==`TSUnknownKeyword`)continue;let i=Ln(r,e.sourceCode.getText(r));i!==`cause`&&i!==n&&e.report({data:{parameter:i},messageId:`unknownParameter`,node:t.typeAnnotation})}}return{ArrowFunctionExpression:t,FunctionDeclaration:t,FunctionExpression:t,TSCallSignatureDeclaration:t,TSConstructorType:t,TSConstructSignatureDeclaration:t,TSDeclareFunction:t,TSEmptyBodyFunctionExpression:t,TSFunctionType:t,TSMethodSignature:t}},meta:{docs:{description:"Disallow explicitly unknown function parameters except `cause` and the parameter named by a type predicate; decode unknown input at its I/O boundary instead.",recommended:!0},messages:{unknownParameter:"Parameter `{{parameter}}` leaves input unparsed. Accept a named domain type; run the expected schema or parser at the I/O boundary before calling this function."},type:`problem`}});function Bn(e,t){switch(e.type){case`TSParenthesizedType`:return t.push(e.typeAnnotation),!0;case`TSUnionType`:for(let n of e.types)t.push(n);return!0;default:return!1}}function Vn(e,t,n,r,i){if(e.typeName.type!==`Identifier`)return;let{name:a}=e.typeName;if(a===`Promise`||a===`PromiseLike`){let t=e.typeArguments?.params[0];t!==void 0&&i.push(t);return}if((e.typeArguments?.params.length??0)>0||n.has(a)||r.has(a))return;let o=t.get(a);o===void 0||o.typeParameters||(r.add(a),i.push(o.typeAnnotation))}function Hn(e,t,n,r,i){return e.type===`TSUnknownKeyword`||(Bn(e,i)||e.type===`TSTypeReference`&&Vn(e,t,n,r,i),!1)}function Un(e,t,n){let r=[e],i=[],a=new Set;for(;;){for(let e of r)if(Hn(e,t,n,a,i))return!0;if(i.length===0)return!1;let e=r;r=i,i=e,i.splice(0)}}const Wn=y(`no-unknown-returns`,`anti-slop`,{createOnce(e){let t=new Map;function n(n){let r=n.returnType;if(!r)return;let i=yn(n,e.sourceCode.visitorKeys);Un(r.typeAnnotation,t,i)&&e.report({messageId:`unknownReturn`,node:r.typeAnnotation})}return{ArrowFunctionExpression:n,FunctionDeclaration:n,FunctionExpression:n,Program(e){t.clear();for(let n of e.body){let e=n.type===`ExportNamedDeclaration`?n.declaration:n;e?.type===`TSTypeAliasDeclaration`&&t.set(e.id.name,e)}},TSCallSignatureDeclaration:n,TSConstructorType:n,TSConstructSignatureDeclaration:n,TSDeclareFunction:n,TSEmptyBodyFunctionExpression:n,TSFunctionType:n,TSMethodSignature:n}},meta:{docs:{description:`Disallow functions whose explicit return contract is unknown or Promise<unknown>.`,recommended:!0},messages:{unknownReturn:"This function exposes `unknown` to its caller. Parse the value at its boundary and return a named domain type."},type:`problem`}});function Gn(e){let t=e;for(;t.type===`TSParenthesizedType`;)t=t.typeAnnotation;return t}function Kn(e){let t=Gn(e);if(t.type===`TSTypeReference`&&t.typeName.type===`Identifier`)return(t.typeArguments?.params.length??0)===0?t.typeName.name:void 0}const qn=y(`no-unknown-type-aliases`,`anti-slop`,{createOnce(e){let t=new Map;function n(e){let n=new Set,r=e;for(;;){if(r=Gn(r),r.type===`TSUnknownKeyword`)return!0;let e=Kn(r);if(e===void 0||n.has(e))return!1;let i=t.get(e);if(i===void 0||i.typeParameters)return!1;n.add(e),r=i.typeAnnotation}}return{Program(r){t.clear();for(let e of r.body){let n=e.type===`ExportNamedDeclaration`?e.declaration:e;n?.type===`TSTypeAliasDeclaration`&&t.set(n.id.name,n)}for(let r of t.values())n(r.typeAnnotation)&&e.report({data:{alias:r.id.name},messageId:`unknownAlias`,node:r.id})}}},meta:{docs:{description:`Disallow type aliases whose resolved type is unknown; unknown must remain visible at an allowed boundary.`,recommended:!0},messages:{unknownAlias:"Type alias `{{alias}}` hides `unknown`. Keep `unknown` explicit at the parsing boundary or on an allowed `cause` field; otherwise use the parsed owner type."},type:`problem`}});function Jn(e,t){if(e.type!==`TSTypeReference`||(e.typeArguments?.params.length??0)>0||e.typeName.type!==`Identifier`||!t.aliases.has(e.typeName.name))return!1;let n=e.parent;for(;n.type!==`Program`;){if(n.type===`TSTypeAliasDeclaration`)return!1;n=n.parent}return!0}function Yn(e,t){if(Jn(e,t))return;let n=Lt(e,t);if(n===void 0)return;let r=e.parent;for(;r.type!==`Program`;){let e;if((r.type===`TSMappedType`||r.type===`TSTypeLiteral`||r.type===`TSTypeReference`)&&(e=Lt(r,t)),e!==void 0)return;r=r.parent}return n}const Xn=y(`no-unsafe-dictionary-type`,`anti-slop`,{createOnce(e){let t;function n(n){if(t===void 0)return;let r=Yn(n,t);r!==void 0&&e.report({data:{value:r.unsafeValue},messageId:`unsafeDictionary`,node:n})}return{Program(e){t=_t(e)},TSIndexSignature(n){if(t===void 0||n.parent.type===`TSTypeLiteral`)return;let r=It(n.typeAnnotation.typeAnnotation,t);r!==void 0&&e.report({data:{value:r.unsafeValue},messageId:`unsafeDictionary`,node:n})},TSMappedType:n,TSTypeLiteral:n,TSTypeReference:n}},meta:{docs:{description:`Disallow object-dictionary contracts whose direct value type is unknown, any, object, {}, or a union/alias containing one of those escape hatches.`,recommended:!0},messages:{unsafeDictionary:`This dictionary's {{value}} value type gives callers no concrete value contract. Use an owner/schema-derived value type; parse external payloads before insertion.`},type:`problem`}}),Zn=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`TSDeclareFunction`,`TSEmptyBodyFunctionExpression`]);function Qn(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function $n(e){let t=e;for(;t.type===`TSParenthesizedType`;)t=t.typeAnnotation;return t}function er(e){return e.typeName.type===`Identifier`?e.typeName.name:void 0}function tr(e){let t=$n(e);return t.type===`TSAnyKeyword`||t.type===`TSUnknownKeyword`}function nr(e){let t=$n(e);return t.type===`TSNumberKeyword`||t.type===`TSStringKeyword`||t.type===`TSSymbolKeyword`?!0:t.type===`TSUnionType`?t.types.every(nr):t.type===`TSTypeReference`&&er(t)===`PropertyKey`}function rr(e){let t=$n(e);if(t.type===`TSTypeReference`){if(er(t)===`Readonly`){let[e]=t.typeArguments?.params??[];return e!==void 0&&rr(e)}if(er(t)!==`Record`)return!1;let e=t.typeArguments?.params??[];return e.length===2&&e[0]!==void 0&&e[1]!==void 0&&nr(e[0])&&tr(e[1])}if(t.type!==`TSTypeLiteral`||t.members.length!==1)return!1;let[n]=t.members;if(n?.type!==`TSIndexSignature`||n.parameters.length!==1)return!1;let[r]=n.parameters;return r!==void 0&&nr(r.typeAnnotation.typeAnnotation)&&tr(n.typeAnnotation.typeAnnotation)}function ir(e){let t=$n(e);return t.type===`TSAnyKeyword`||t.type===`TSUnknownKeyword`?`top`:t.type===`TSObjectKeyword`?`object`:rr(t)?`record`:void 0}function ar(e){return Qn(e.expression)}function or(e){let t=Qn(e);return t.type===`TSAsExpression`||t.type===`TSTypeAssertion`?t:void 0}function sr(e,t){return e.slice(t.range[0],t.range[1]).replaceAll(/\s+/gu,``)}function cr(e,t,n){return t!==void 0&&sr(e,$n(t))===sr(e,$n(n))}function lr(e){let t=$n(e);switch(t.type){case`TSArrayType`:case`TSConstructorType`:case`TSFunctionType`:case`TSMappedType`:case`TSObjectKeyword`:case`TSTupleType`:return!0;case`TSIntersectionType`:return t.types.every(lr);case`TSTypeLiteral`:return t.members.length>0;case`TSTypeOperator`:return t.operator===`readonly`&&lr(t.typeAnnotation);default:return!1}}function ur(e){let t=$n(e);if(t.type===`TSTypeLiteral`)return t.members.some(e=>e.type!==`TSIndexSignature`);if(t.type!==`TSTypeReference`)return!1;if(er(t)===`Readonly`){let[e]=t.typeArguments?.params??[];return e!==void 0&&ur(e)}if(er(t)!==`Record`)return!1;let n=t.typeArguments?.params??[];return n.length===2&&n[1]!==void 0&&!tr(n[1])}function dr(e){let t=e.parent??void 0;for(;t!==void 0&&t.type!==`Program`;){if(Zn.has(t.type))return t;t=t.parent}}function fr(e,t){return _(e.getScope(t),t.name)}function pr(e){for(let t of e.defs)if(t.type===`Variable`&&t.node.type===`VariableDeclarator`)return t.node}function mr(e){return e.references.some(e=>e.isWrite()&&!e.init)}function hr(e){return e.typeAnnotation??void 0}function gr(e){let t=Qn(e);if(t.type===`TSAsExpression`||t.type===`TSTypeAssertion`)return ir(t.typeAnnotation)===void 0?{type:t.typeAnnotation}:void 0;if(t.type===`Literal`||t.type===`TemplateLiteral`||t.type===`ArrayExpression`||t.type===`ArrowFunctionExpression`||t.type===`ClassExpression`||t.type===`FunctionExpression`||t.type===`NewExpression`||t.type===`ObjectExpression`)return{type:void 0}}function _r(e,t){let n=e.typeAnnotation?.typeAnnotation;if(n!==void 0&&dr(e)===t&&ir(n)===void 0)return{type:n}}function vr(e,t){let n=pr(e);if(n!==void 0&&!(n.parent.type!==`VariableDeclaration`||n.parent.kind!==`const`||n.init===null||mr(e)||dr(n)!==t))return n.init}function yr(e,t,n,r){let i=t,a=new Set(r);for(;;){let t=gr(i);if(t!==void 0)return t;let r=Qn(i);if(r.type!==`Identifier`)return;let o=fr(e,r);if(o===void 0||a.has(o))return;let s=o.identifiers.find(e=>e.typeAnnotation!==null&&e.typeAnnotation!==void 0);if(s!==void 0)return _r(s,n);let c=vr(o,n);if(c===void 0)return;a.add(o),i=c}}function br(e,t){let n=pr(t);if(n===void 0)return;let r=n.id;if(n.parent.type!==`VariableDeclaration`||n.parent.kind!==`const`||r.type!==`Identifier`||n.init===null||mr(t))return;let i=dr(n),a=hr(r)?.typeAnnotation,o=or(n.init),s=o===void 0?void 0:ir(o.typeAnnotation),c=(a===void 0?void 0:ir(a))??s;if(c===void 0)return;let l=yr(e,o!==void 0&&s!==void 0?ar(o):n.init,i,new Set([t]));if(l!==void 0)return{boundary:i,broadKind:c,declaredAt:n.range[1],evidence:l}}function xr(e,t,n,r){return ir(r)===void 0?t===`top`||cr(e,n.type,r)?!0:t===`object`?lr(r):ur(r):!1}const Sr=y(`no-widen-then-assert`,`anti-slop`,{createOnce(e){function t(t){let{sourceCode:n}=e,r=ar(t);if(r.type!==`Identifier`)return;let i=fr(n,r);if(i===void 0)return;let a=br(n,i);a===void 0||t.range[0]<=a.declaredAt||dr(t)!==a.boundary||!xr(n.text,a.broadKind,a.evidence,t.typeAnnotation)||e.report({data:{name:r.name},messageId:`widenThenAssert`,node:t})}return{TSAsExpression:t,TSTypeAssertion:t}},meta:{docs:{description:`Disallow local const flows that explicitly widen a known value before asserting the widened binding to a narrower type.`,recommended:!0},messages:{widenThenAssert:`Binding "{{name}}" discards type evidence and later recreates it with an assertion. Keep the precise type from initialization through use; parse boundary input once.`},type:`problem`}}),Cr=new Set([`ExpressionStatement`,`PropertyDefinition`,`ReturnStatement`,`ThrowStatement`,`VariableDeclaration`]),wr=/\bSAFETY\s*:/u,Tr=/^oxlint-disable(?:-(?:next-)?line)?(?:\s|$)/u,Er=/\s-{2,}\s/u,Dr=/\s/u;function Or(e){return e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`}const kr=/[\s,]+/u;function Ar(e){let t=e.value.trim();if(!Tr.test(t))return!1;let n=t.split(Er),[r]=n,i=n[1]?.trim();if(r===void 0||i===void 0)return!1;let a=r.search(Dr),o=a===-1?``:r.slice(a);for(let e of o.split(kr))if(e===`typescript/no-unsafe-type-assertion`)return!0;return!1}function jr(e){return wr.test(e.value)||Ar(e)}function Mr(e,t){let n=t;for(;;){if(e.getCommentsBefore(n).some(jr))return!0;if(Cr.has(n.type)||n.parent.type===`Program`)return!1;n=n.parent}}const Nr=y(`require-safety-comment-for-type-assertion`,`anti-slop`,{createOnce(e){function t(t){Or(t)||Mr(e.sourceCode,t)||e.report({messageId:`missingSafetyComment`,node:t})}return{TSAsExpression:t,TSTypeAssertion:t}},meta:{docs:{description:`Require a nearby SAFETY comment (or a described Oxlint suppression of typescript/no-unsafe-type-assertion) for every TypeScript type assertion except const assertions.`,recommended:!0},messages:{missingSafetyComment:"This type assertion has no `SAFETY:` justification. State the checked invariant immediately before the assertion or its containing statement, or add a described `oxlint-disable-next-line typescript/no-unsafe-type-assertion` directive."},type:`problem`}}),Pr=`eslint-disable`,Fr=`eslint-disable-line`,Ir=`eslint-disable-next-line`,Lr=`eslint-enable`,Rr=`oxlint-disable`,zr=`oxlint-disable-line`,Br=`oxlint-disable-next-line`,Vr=`oxlint-enable`,Hr=/^(?:eslint|oxlint)-disable-(?:next-)?line$/u,Ur=/[\s,]+/gu,Wr=/\s/u,Gr=new Set([Pr,Fr,Ir,Rr,zr,Br]),Kr=new Set([...Gr,Lr,Vr]),qr=new Set([`eslint`,`eslint-env`,Pr,Fr,Ir,Lr,`exported`,`global`,`globals`,`oxlint`,`oxlint-env`,Rr,zr,Br,Vr]);function Jr(e){return Gr.has(e)}function Yr(e){return Kr.has(e)}function Xr(e,n){if(!t.isObject(e))return;let r=e[n];if(r===void 0||!Array.isArray(r))return;let i=[],a=0;for(let e of r){if(!t.isString(e))return;i[a++]=e}return i}function Zr(e){if(!t.isString(e.value))return;let n=Qr(e.value);if(n!==void 0&&!(!Hr.test(n.kind)&&e.type===`Line`||e.loc.start.line!==e.loc.end.line&&(n.kind===Fr||n.kind===zr)))return{comment:e,description:n.description,kind:n.kind,value:n.value}}function Qr(e){let{description:t,text:n}=ei(e),r=n.search(Wr),i=r===-1?n:n.slice(0,r);if(qr.has(i))return{description:t,kind:i,value:r===-1?``:n.slice(r).trim()}}const $r=/\s-{2,}\s/u;function ei(e){let[t,n]=e.split($r);return t===void 0?{description:void 0,text:``}:{description:n?.trim(),text:t.trim()}}function ti(e,t){return e.line<t.line||e.line===t.line&&e.column<=t.column}function ni(e){return{end:e.end,start:{column:0,line:e.start.line}}}const ri=/\r\n|[\r\n\u2028\u2029]/u;function ii(e,n){if(n===void 0)return ni(e.loc);if(!t.isString(e.value))return e.loc;let r=e.value.split(ri),[i]=r;if(i===void 0)return e.loc;let a=RegExp(`([\\s,]|^)${si(n)}(?:[\\s,]|$)`,`u`),o=e.loc.start,s=a.exec(i);if(s!==null){let[,t]=s;return t===void 0?e.loc:{end:{column:2+o.column+s.index+t.length+n.length,line:o.line},start:{column:2+o.column+s.index+t.length,line:o.line}}}for(let e=1;e<r.length;e+=1){let t=r[e];if(t===void 0)continue;let i=a.exec(t);if(i!==null){let[,t]=i;if(t===void 0)continue;return{end:{column:i.index+t.length+n.length,line:o.line+e},start:{column:i.index+t.length,line:o.line+e}}}}return e.loc}const ai=/[|\\{}()[\]^$+*?.]/gu,oi=String.raw`\$&`;function si(e){return e.replaceAll(ai,oi)}function ci(e){let t={areas:[],duplicateDisableDirectives:[],numberOfRelatedDisableDirectives:new Map,unusedEnableDirectives:[]};for(let n of e.getAllComments()){let e=Zr(n);if(e===void 0)continue;let{kind:r}=e;if(!Yr(r))continue;let{start:i}=n.loc,a=e.value!==void 0&&e.value!==``?e.value.split(Ur):void 0;switch(r){case Pr:case Rr:li(t,n,i,a,`block`);break;case Fr:case zr:{let{line:e}=i;li(t,n,{column:0,line:e},a,`line`),ui(t,n,{column:-1,line:e+1},a,`line`);break}case Ir:case Br:{let{line:e}=i;li(t,n,{column:0,line:e+1},a,`line`),ui(t,n,{column:-1,line:e+2},a,`line`);break}case Lr:case Vr:ui(t,n,i,a,`block`)}}return t}function li(e,t,n,r,i){if(r===void 0){mi(e.areas,void 0,n)!==void 0&&e.duplicateDisableDirectives.push({comment:t,ruleId:void 0}),e.areas.push({comment:t,end:void 0,kind:i,ruleId:void 0,start:n});return}for(let a of r)mi(e.areas,a,n)!==void 0&&e.duplicateDisableDirectives.push({comment:t,ruleId:a}),e.areas.push({comment:t,end:void 0,kind:i,ruleId:a,start:n})}function ui(e,t,n,r,i){let a=new Set;if(r===void 0){di(e.areas,n,i,void 0,a)||pi(e,t,void 0),e.numberOfRelatedDisableDirectives.set(t,a.size);return}for(let o of r)di(e.areas,n,i,o,a)||pi(e,t,o);e.numberOfRelatedDisableDirectives.set(t,a.size)}function di(e,t,n,r,i){let a=!1;for(let o=e.length-1;o>=0;--o){let s=e[o];s===void 0||!fi(s,n,r)||(i.add(s.comment),s.end=t,a=!0)}return a}function fi(e,t,n){return e.end!==void 0||e.kind!==t?!1:n===void 0||e.ruleId===n}function pi(e,t,n){e.unusedEnableDirectives.push({comment:t,ruleId:n})}function mi(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];if(i!==void 0&&(i.ruleId===void 0||i.ruleId===t)&&ti(i.start,n)&&(i.end===void 0||ti(n,i.end)))return i}}const hi=y(`directive-disable-enable-pair`,`general`,{create(e){let[t]=e.options,n=t?.allowWholeFile===!0,r=ci(e.sourceCode),[i]=e.sourceCode.ast.tokens;if(n&&i===void 0)return{};for(let t of r.areas)t.end===void 0&&(n&&i!==void 0&&ti(t.start,i.loc.start)||e.report({data:{ruleId:t.ruleId??``},loc:ii(t.comment,t.ruleId),messageId:t.ruleId===void 0?`missingPair`:`missingRulePair`}));return{}},meta:{docs:{description:"Require a matching enable comment for every `oxlint-disable` or `eslint-disable` block directive."},messages:{missingPair:`Requires 'eslint-enable' directive.`,missingRulePair:`Requires 'eslint-enable' directive for '{{ruleId}}'.`},schema:[{additionalProperties:!1,properties:{allowWholeFile:{description:`Allow a disable directive that covers the entire file.`,type:`boolean`}},type:`object`}],type:`suggestion`}}),gi=y(`directive-no-aggregating-enable`,`general`,{create(e){let t=ci(e.sourceCode);for(let[n,r]of t.numberOfRelatedDisableDirectives)r>1&&e.report({data:{kind:`eslint-enable`},loc:ni(n.loc),messageId:`aggregatingEnable`});return{}},meta:{docs:{description:"Disallow aggregating `oxlint-enable` or `eslint-enable` comments across multiple disable directives."},messages:{aggregatingEnable:`'{{kind}}' comment enables rules for multiple disable directives. Please move '{{kind}}' after each disable directive.`},schema:[],type:`suggestion`}}),_i=y(`directive-no-duplicate-disable`,`general`,{create(e){let t=ci(e.sourceCode);for(let n of t.duplicateDisableDirectives)e.report({data:{ruleId:n.ruleId??``},loc:ii(n.comment,n.ruleId),messageId:n.ruleId===void 0?`duplicate`:`duplicateRule`});return{}},meta:{docs:{description:"Disallow duplicate `oxlint-disable` or `eslint-disable` comments."},messages:{duplicate:`ESLint rules have been disabled already.`,duplicateRule:`'{{ruleId}}' rule has been disabled already.`},schema:[],type:`problem`}}),vi=y(`directive-no-restricted-disable`,`general`,{create(e){let t=ci(e.sourceCode),n=e.options;if(n.length===0)return{};let i=r();for(let e of n)i.add(e);for(let r of t.areas)(r.ruleId===void 0||i.ignores(r.ruleId))&&e.report({data:{ruleId:r.ruleId??String(n)},loc:ii(r.comment,r.ruleId),messageId:`disallow`});return{}},meta:{docs:{description:"Disallow `oxlint-disable` or `eslint-disable` comments for configured rules."},messages:{disallow:`Disabling '{{ruleId}}' is not allowed.`},schema:{items:{type:`string`},type:`array`,uniqueItems:!0},type:`suggestion`}}),yi=y(`directive-no-unlimited-disable`,`general`,{create(e){for(let t of e.sourceCode.getAllComments()){let n=Zr(t);if(n===void 0)continue;let{kind:r}=n;Jr(r)&&(n.value===void 0||n.value===``)&&e.report({data:{kind:r},loc:ni(n.comment.loc),messageId:`unexpected`})}return{}},meta:{docs:{description:"Disallow `oxlint-disable` or `eslint-disable` comments without rule names."},messages:{unexpected:`Unexpected unlimited '{{kind}}' comment. Specify some rule names to disable.`},schema:[],type:`suggestion`}}),bi=y(`directive-no-unused-enable`,`general`,{create(e){let t=ci(e.sourceCode);for(let n of t.unusedEnableDirectives)e.report({data:{kind:`eslint-enable`,ruleId:n.ruleId??``},loc:ii(n.comment,n.ruleId),messageId:n.ruleId===void 0?`unused`:`unusedRule`});return{}},meta:{docs:{description:"Disallow unused `oxlint-enable` or `eslint-enable` comments."},messages:{unused:`Unused '{{kind}}' comment. No reported rules are disabled.`,unusedRule:`'{{ruleId}}' rule is disabled but never reported. Please remove unnecessary '{{kind}}' comment.`},schema:[],type:`suggestion`}}),xi=y(`directive-no-use`,`general`,{create(e){let t=new Set(Xr(e.options[0],`allow`));for(let n of e.sourceCode.getAllComments()){let r=Zr(n);r===void 0||n.type===`Line`||t.has(r.kind)||e.report({loc:ni(r.comment.loc),messageId:`disallow`})}return{}},meta:{docs:{description:`Disallow block ESLint/Oxlint directive comments.`},messages:{disallow:`Unexpected ESLint directive comment.`},schema:[{additionalProperties:!1,properties:{allow:{description:`Directive kinds that are still allowed in block comments.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`suggestion`}}),Si=/\s-{2,}\s/u,Ci=/^(?<kind>oxlint-disable|oxlint-enable)(?:\s|$)/u,wi=y(`directive-require-description`,`general`,{create(e){let n=new Set(Xr(e.options[0],`ignore`));function r(r){let i=Zr(r);if(i!==void 0){let{kind:t}=i;if(!Yr(t)||n.has(t)||i.description!==void 0)return;e.report({data:{kind:t},loc:i.comment.loc,messageId:`missingDescription`});return}if(r.type!==`Line`||!t.isString(r.value))return;let a=r.value.trim(),o=Ci.exec(a);if(o===null)return;let s=o.groups?.kind;s===void 0||!Yr(s)||n.has(s)||Si.test(a)||e.report({data:{kind:s},loc:r.loc,messageId:`missingDescription`})}for(let t of e.sourceCode.getAllComments())r(t);return{}},meta:{docs:{description:"Require descriptions for `oxlint` and `eslint` disable/enable directives."},messages:{missingDescription:`Missing description for '{{kind}}' comment.`},schema:[{additionalProperties:!1,properties:{ignore:{description:`Directive kinds that do not require a description.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`suggestion`}});function Ti(e){return t.isString(e)&&e.length>0}function M(e){if(!Array.isArray(e))return!1;for(let n of e)if(!t.isString(n))return!1;return!0}function Ei(e){if(!t.isObject(e))return!1;for(let n of Object.values(e))if(!t.isString(n))return!1;return!0}function Di(e){return t.isNumber(e)&&!Number.isNaN(e)}const Oi=[`makeSynchronous`,`workerize`],ki=[`@isolated`],Ai=new Set([`browser`,`chrome`]),ji=new Set([`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`MethodDefinition`,`Property`,`VariableDeclaration`,`VariableDeclarator`]),Mi=new Set([`FunctionDeclaration`,`FunctionExpression`]),Ni=new Set([`ClassDeclaration`,`ClassExpression`]),Pi=/(?:\*\s*)*/u;function Fi(e){if(e===!0||e===`writable`||e===`writeable`)return`writable`;if(e===!1||e===`off`)return`off`;if(e===`readonly`||e===`readable`)return`readonly`}function Ii(e){if(!t.isObject(e))return{comments:ki.map(n.toLowerCase),functions:new Set(Oi),overrideGlobals:new Map,selectors:[]};let r=M(e.comments)?e.comments.map(n.toLowerCase):ki.map(n.toLowerCase),i=M(e.functions)?new Set(e.functions):new Set(Oi),a=M(e.selectors)?e.selectors:[],o=new Map;if(t.isObject(e.overrideGlobals))for(let[t,n]of Object.entries(e.overrideGlobals)){let e=Fi(n);e!==void 0&&o.set(t,e)}return{comments:r,functions:i,overrideGlobals:o,selectors:a}}function Li(e){return k(e)}function Ri(e){if((e.type===`Property`||e.type===`MethodDefinition`)&&!(e.computed&&e.key.type!==`Literal`)){if(e.key.type===`Identifier`)return e.key.name;if(e.key.type===`Literal`&&t.isString(e.key.value))return e.key.value}}function zi(e,t,n){return e.callee.type!==`MemberExpression`||e.callee.computed||e.callee.optional||e.callee.object.type!==`Identifier`||e.callee.object.name!==t?!1:g(e.callee)===n}function Bi(e){let{parent:t}=e;if(t?.type===`CallExpression`&&t.arguments[0]===e){if(zi(t,`browser`,`execute`))return`callee of method named "browser.execute"`;if(zi(t,`page`,`evaluate`))return`callee of method named "page.evaluate"`}}function Vi(e){if(e.callee.type!==`MemberExpression`||e.callee.computed||e.callee.optional||g(e.callee)!==`executeScript`)return;let t=e.callee.object;if(!(t.type!==`MemberExpression`||t.computed||t.optional)&&g(t)===`scripting`&&!(t.object.type!==`Identifier`||!Ai.has(t.object.name)))return t.object.name}function Hi(e){let t=e.parent;if(t?.type!==`Property`||t.kind!==`init`||t.value!==e||Ri(t)!==`func`)return;let n=t.parent;if(n.type!==`ObjectExpression`)return;let r=n.parent;if(r.type!==`CallExpression`||r.arguments[0]!==n)return;let i=Vi(r);if(i!==void 0)return`property "func" passed to "${i}.scripting.executeScript"`}function Ui(e,t){for(let n of e.arguments)if(n===t)return!0;return!1}function Wi(e,t){if(t.size===0)return;let{parent:n}=e;if(!(n?.type!==`CallExpression`||!Ui(n,e))&&!(n.callee.type!==`Identifier`||!t.has(n.callee.name)))return`callee of function named ${JSON.stringify(n.callee.name)}`}function Gi(e,t){return t===null||!ji.has(t.type)?!1:t.type===`Property`||t.type===`MethodDefinition`?t.value===e:!0}function Ki(e){return e.replace(Pi,``).trim().toLowerCase()}function qi(e,t){let n=t;for(;;){let t=e.getCommentsBefore(n).at(-1);if(t!==void 0)return t.value;let{parent:r}=n;if(r===null||!Gi(n,r))return;n=r}}function Ji(e,t,n){if(n.length===0)return;let r=qi(e,t);if(r===void 0)return;let i=Ki(r);for(let e of n)if(i===e||i.startsWith(`${e} - `)||i.startsWith(`${e} -- `))return`follows comment ${JSON.stringify(e)}`}function Yi(e,t,n){return Ji(e,t,n.comments)??Wi(t,n.functions)??Bi(t)??Hi(t)}function Xi({parent:e}){return e!==null&&(e.type===`TSTypeReference`||e.type===`TSTypeQuery`)}function Zi(e,t){let n=e;for(;n!==null;){if(n===t)return!0;n=n.upper}return!1}function Qi(e,{resolved:t}){return t?.scope===void 0||!Zi(t.scope,e)}function $i(e){let t=[],n=[e];for(let r of n){ee(n,r);for(let n of r.references)Qi(e,n)&&t.push(n)}return t}function ea(e,t,n){let{identifier:r}=t,{name:i}=r,a=n.overrideGlobals.get(i);if(a!==void 0)return a===`off`?`off`:t.resolved!==null&&!e.isGlobalReference(r)?void 0:a;if(e.isGlobalReference(r))return`readonly`}function ta(e,t,n,r){let i=e.sourceCode.getScope(t);for(let t of $i(i)){let{identifier:i}=t;if(Xi(i))continue;let a=ea(e.sourceCode,t,r),o=n;if(a!==void 0&&a!==`off`){if(t.isReadOnly()||a===`writable`)continue;o=`${n} (global variable is not writable)`}e.report({data:{name:i.name,reason:o},messageId:`externallyScopedVariable`,node:i})}}function na(e,n,r){let i=e.visitorKeys[n.type]??[];for(let e of i){if(!t.isObject(n))break;let i=n[e];if(Array.isArray(i))for(let e of i)x(e)&&r.push(e);else x(i)&&r.push(i)}}function ra(e,t){if(e.type===`ClassDeclaration`||e.type===`ClassExpression`){e.superClass!==null&&t.push(e.superClass);for(let n of e.body.body)`computed`in n&&n.computed&&t.push(n.key)}}function ia(e,t,n){return e===t?!1:Mi.has(e.type)?!0:Ni.has(e.type)?(ra(e,n),!0):!1}function aa(e,t,n){let r=[t];for(let i of r)if(!ia(i,t,r)){if(i.type===`ThisExpression`){e.report({data:{reason:n},messageId:`thisExpression`,node:i});continue}if(i.type===`Super`){e.report({data:{reason:n},messageId:`super`,node:i});continue}na(e.sourceCode,i,r)}}function oa(e,t,n,r,i){i.has(t)||(i.add(t),ta(e,t,n,r),aa(e,t,n))}const sa=y(`isolated-functions`,`general`,{create(e){let t=Ii(e.options[0]),n=new WeakSet;function r(r){if(!Li(r))return;let i=Yi(e.sourceCode,r,t);i!==void 0&&oa(e,r,i,t,n)}let i={ArrowFunctionExpression:r,FunctionDeclaration:r,FunctionExpression:r};for(let r of t.selectors){let a=`matches selector ${JSON.stringify(r)}`;Object.assign(i,{[r]:r=>{Li(r)&&oa(e,r,a,t,n)}})}return i},meta:{docs:{description:`Prevent usage of variables from outside the scope of isolated functions.`,recommended:!0},messages:{externallyScopedVariable:`Variable {{name}} not defined in scope of isolated function. Function is isolated because: {{reason}}.`,super:"Unexpected `super` in isolated function. Function is isolated because: {{reason}}.",thisExpression:"Unexpected `this` in isolated function. Function is isolated because: {{reason}}."},schema:[{additionalProperties:!1,properties:{comments:{description:`Comment patterns that mark a function as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0},functions:{description:`Function names that mark argument callbacks as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0},overrideGlobals:{additionalProperties:{anyOf:[{type:`boolean`},{enum:[`off`,`readonly`,`writable`,`writeable`],type:`string`}]},description:`Override which global variables are allowed inside isolated scopes.`,type:`object`},selectors:{description:`AST selectors that mark matched function nodes as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`problem`}}),ca=/^set[A-Z]/u;function N({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`&&e.property.type===`Identifier`)return e.property.name}function la(e){return ca.test(e)}function ua(e){let[t]=e.arguments;return t?.type===`ArrowFunctionExpression`||t?.type===`FunctionExpression`?t:void 0}function da(e,t){let n=[e];for(let e of n)t(e),pa(e,n)}function fa(e,t){let n=[e];for(let e of n){t(e);for(let t of Object.values(e))ga(t,e,n)}}function pa(e,t){for(let[n,r]of Object.entries(e))ae(n)||ma(r,e,t)}function ma(e,t,n){if(e!=null&&e!==t.parent){if(Array.isArray(e)){ha(e,t,n);return}x(e)&&n.push(e)}}function ha(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];i!==t.parent&&x(i)&&n.push(i)}}function ga(e,t,n){if(Array.isArray(e)){for(let r of e)ga(r,t,n);return}e===t.parent||!x(e)||n.push(e)}function _a({key:e}){if(e.type===`Identifier`)return e.name;if(e.type===`Literal`&&t.isString(e.value))return e.value}function va({value:e}){if(e.type===`Identifier`)return e;if(e.type===`AssignmentPattern`&&e.left.type===`Identifier`)return e.left}function ya(e){let t=0;return da(e,e=>{e.type===`CallExpression`&&e.callee.type===`Identifier`&&la(e.callee.name)&&(t+=1)}),t}function ba(e,t,n,r,i){if(t===void 0)return 0;if(t.type===`SpreadElement`)return 3;let a=m(t);return a.type===`ArrayExpression`?a.elements.length===0?1:i(e,a,n,r)?2:3:3}const xa=new Set([`catch`,`finally`,`then`]);function Sa(e){let t=new Set;for(let n of e.body)n.type!==`MethodDefinition`||n.kind!==`method`||!n.value.async||n.key.type===`Identifier`&&t.add(n.key.name);return t}function Ca(e){return e.callee.type!==`MemberExpression`||e.callee.property.type!==`Identifier`?!1:xa.has(e.callee.property.name)}function wa({callee:e}){let t=m(e);return O(t)&&t.async}function Ta({callee:e},t){if(e.type===`MemberExpression`&&e.object.type===`ThisExpression`&&e.property.type===`Identifier`)return t.has(e.property.name)?e.property.name:void 0}function Ea(e){let{parent:t}=e;return t?.type!==`AssignmentExpression`||t.right!==e?!1:t.left.type===`MemberExpression`&&t.left.object.type===`ThisExpression`}function Da(e){let{parent:t}=e;if(t?.type===`VariableDeclarator`&&t.init===e)return t.id.type===`Identifier`?t.id.name:void 0}function Oa(e){return!O(e)||e.parent.type===`ParenthesizedExpression`&&e.parent.parent.type===`CallExpression`&&e.parent.parent.callee===e.parent?!1:e.parent.type!==`CallExpression`||e.parent.callee!==e}function ka(e,t){let n=e;for(;n!==t;){let{parent:e}=n;if(e===null)return!1;if(Oa(e))return!0;n=e}return!1}function Aa(e,t){let n=Ta(e,t);if(n===void 0||Ea(e))return;if(e.parent.type===`ExpressionStatement`)return{data:{methodName:n},messageId:`unhandledAsyncCall`,node:e};let r=Da(e);if(r!==void 0)return{data:{variableName:r},messageId:`orphanedPromise`,node:e}}function ja(e,t){let n=[],r=0;function i(i){if(i!==e&&ka(i,e))return;if(i.type===`AwaitExpression`){n[r++]={messageId:`awaitInConstructor`,node:i};return}if(i.type!==`CallExpression`)return;Ca(i)&&(n[r++]={messageId:`promiseChainInConstructor`,node:i}),wa(i)&&(n[r++]={messageId:`asyncIifeInConstructor`,node:i});let a=Aa(i,t);a!==void 0&&(n[r++]=a)}return fa(e,i),n}const Ma=y(`no-async-constructor`,`general`,{create(e){function t(t){e.report({data:t.data,messageId:t.messageId,node:t.node})}return{"MethodDefinition[kind='constructor']"(e){if(e.value.type!==`FunctionExpression`||e.value.body?.type!==`BlockStatement`||e.parent.type!==`ClassBody`)return;let n=Sa(e.parent),r=e.value.body,i=ja(r,n);for(let e of i)t(e)}}},meta:{docs:{description:`Disallow asynchronous operations inside class constructors. Constructors return immediately, so async work causes race conditions, unhandled rejections, and incomplete object states.`},messages:{asyncIifeInConstructor:`Refactor this asynchronous operation outside of the constructor. Async IIFEs create unhandled promises and incomplete object state.`,awaitInConstructor:`Refactor this asynchronous operation outside of the constructor. Using 'await' in a constructor causes the class to be instantiated before the async operation completes.`,orphanedPromise:`Refactor this asynchronous operation outside of the constructor. Promise assigned to '{{variableName}}' is never consumed - errors will be silently swallowed.`,promiseChainInConstructor:`Refactor this asynchronous operation outside of the constructor. Promise chains (.then/.catch/.finally) in constructors lead to race conditions.`,unhandledAsyncCall:`Refactor this asynchronous operation outside of the constructor. Calling async method '{{methodName}}' without handling its result creates uncontrolled async behavior.`},schema:[],type:`problem`}});function Na(e,t){let n=e.scan(t);return n===0?0:1-(1-e.probability)**n}function Pa(e,t){let n=0;for(let r of e){let e=Na(r,t);n=1-(1-n)*(1-e)}return n}function Fa(e,t){return Pa(e,t)>=.9}function Ia(e,t){return t.some(t=>Fa(e,t))}function La(e){return{probability:e,scan(e){for(let t=0;t<e.length-1;t+=1){let n=e.charAt(t),r=e.charAt(t+1);if(n===n.toLowerCase()&&r===r.toUpperCase()&&r!==r.toLowerCase())return 1}return 0}}}const Ra=/\s+/gu;function za(e,t){if(t===``)return e.length+1;let n=0,r=0;for(;r<=e.length-t.length;){let i=e.indexOf(t,r);if(i===-1)break;n+=1,r=i+t.length}return n}function Ba(e,n){let r=n.map(e=>t.isString(e)?{pattern:e,type:`string`}:{pattern:new RegExp(e.source,`gu`),type:`regexp`});return{probability:e,scan(e){let t=e.replace(Ra,``),n=0;for(let e of r){if(e.type===`string`){n+=za(t,e.pattern);continue}e.pattern.lastIndex=0;let r=t.match(e.pattern);r&&(n+=r.length)}return n}}}const Va=/\s/u;function Ha(e,t){let n=new Set(t);return{probability:e,scan(e){for(let t=e.length-1;t>=0;--t){let r=e.charAt(t);if(n.has(r))return 1;if(!Va.test(r)&&r!==`*`&&r!==`/`)return 0}return 0}}}const Ua=/[ \t(),{}]/u;function Wa(e,t){let n=new Set(t);return{probability:e,scan(e){let t=e.split(Ua),r=0;for(let e of t)n.has(e)&&(r+=1);return r}}}const Ga=`public.abstract.class.implements.extends.return.throw.private.protected.enum.continue.assert.boolean.this.instanceof.interface.static.void.super.true.case:.let.const.var.async.await.break.yield.typeof.import.export`.split(`.`),Ka=[`++`,`||`,`&&`,`===`,`?.`,`??`],qa=[`for(`,`if(`,`while(`,`catch(`,`switch(`,`try{`,`else{`,`this.`,`window.`,/;\s+\/\//u,`import '`,`import "`,`require(`],Ja=[`}`,`;`,`{`];function Ya(){return[Ha(.95,Ja),Wa(.7,Ka),Wa(.3,Ga),Ba(.95,qa),La(.5)]}const Xa=new Set([`BreakStatement`,`ContinueStatement`,`LabeledStatement`]),Za=new Map([[`.jsx`,`jsx`],[`.tsx`,`tsx`]]);function Qa(e){return Xa.has(e.type)}function $a(e){return{comments:e,value:e.map(({value:e})=>e).join(`
83
+ import{definePlugin as e}from"oxlint-plugin-utilities";import{Predicate as t,String as n}from"effect";import r from"ignore";import i from"node:path";import{parse as a}from"yuku-parser";import{cwd as o}from"node:process";import{type as s}from"arktype";import{Minimatch as c,minimatch as l}from"minimatch";import{existsSync as u,readFileSync as d,readdirSync as f}from"node:fs";import{ResolverFactory as p}from"oxc-resolver";function m(e){let t=e;for(;;)switch(t.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:t=t.expression;break;default:return t}}function h(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function g(e){return e.computed?e.property.type===`Literal`&&t.isString(e.property.value)?e.property.value:void 0:e.property.type===`Identifier`?e.property.name:void 0}function _(e,t){let n=e;for(;n!==null;){let e=n.set.get(t);if(e!==void 0)return e;n=n.upper}}function ee(e,t){for(let n of t.childScopes)e.push(n)}function te(e,t){let n=[e.getScope(e.ast)];for(let e of n){ee(n,e);for(let n of e.variables)t(n)}}function v(e,t,n){let r=e.getScope(t);for(;r!==null;){let e=r.set.get(n);if(e!==void 0&&e.defs.length>0)return!0;r=r.upper}return!1}function y(e,t){let[n]=t.range;for(;n>0;){let t=e[n-1];if(t===` `||t===` `){--n;continue}break}let[,r]=t.range,i=r;for(;i<e.length;){let t=e[i];if(t===`
84
+ `||t===`\r`){i+=1;continue}break}return[n,i]}function ne(e,t){if(e.getCommentsInside(t).length>0)return!0;let n=t.loc.start.line,r=t.loc.end.line;for(let r of e.getCommentsBefore(t)){let e=r.loc.end.line;if(e===n||e===n-1)return!0}for(let n of e.getCommentsAfter(t)){let e=n.loc.start.line;if(e===r||e===r+1)return!0}return!1}function b(e,t,n){let r=`https://docs.howmanysmall.com/small-rules/rules/${t}/${e}/`;return n.meta===void 0?{...n}:{...n,meta:{...n.meta,docs:{...n.meta.docs,url:r}}}}const re=/^[A-Z]/v,x=new Set([`end`,`loc`,`parent`,`range`,`start`,`type`]);function S(e){return t.isObject(e)&&t.isString(e.type)}function ie(e){return x.has(e)}function C(e){return re.test(e)}function w(e){return e.type===`VariableDeclarator`}function ae(e){return oe(e.typeAnnotation)?e.typeAnnotation:void 0}function oe(e){return t.isObject(e)&&`type`in e&&e.type===`TSTypeAnnotation`}function se(e,t){return e.type===`Identifier`&&e.name===t}function ce(e){if(!(e.type!==`MemberExpression`||e.computed||e.object.type!==`Identifier`||e.property.type!==`Identifier`))return{objectName:e.object.name,propertyName:e.property.name}}function le(e,t,n,r){return e.callee.type===`Identifier`?t.has(e.callee.name):e.callee.type!==`MemberExpression`||e.callee.object.type!==`Identifier`?!1:n.has(e.callee.object.name)&&g(e.callee)===r}function ue(e,t,n){return le(e,t,n,`useMemo`)}function de({imported:e}){return e.type===`Identifier`?e.name:e.value}function T(e){return e.type===`Identifier`&&t.isString(e.name)}function E(e){return e.type===`Identifier`}function fe(e){return e.type===`JSXIdentifier`&&`name`in e}function pe(e){return e.type===`JSXOpeningElement`}function me(e){return e.type===`ImportDeclaration`}function he(e){return e.type===`Literal`&&t.isString(e.value)}function ge(e){return e.type===`CallExpression`}function _e(e){return e.type===`ImportSpecifier`}function ve(e){return e.type===`ExportSpecifier`}function D(e){return e.type===`Property`}function O(e){return e.type===`MemberExpression`}function ye(e){return e.type===`AssignmentExpression`}function be(e){return e.type===`UnaryExpression`}function xe(e){return e.type===`BinaryExpression`}function Se(e){return e.type===`LogicalExpression`}function Ce(e){return e.type===`ConditionalExpression`}function we(e){return e.type===`SequenceExpression`}function Te(e){return e.type===`MethodDefinition`||e.type===`TSAbstractMethodDefinition`}function Ee(e){return e.type===`PropertyDefinition`||e.type===`TSAbstractPropertyDefinition`}function De(e){return e.type===`ImportDefaultSpecifier`}function Oe(e){return e.type===`ImportNamespaceSpecifier`}function ke(e){return e.type===`VariableDeclaration`}function Ae(e){return e.type===`ExportNamedDeclaration`}function je(e){return e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function k(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionExpression`}function A(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function Me(e,t){return se(e.callee,t)}function Ne(e){return e.type===`ClassDeclaration`||e.type===`ClassExpression`}function Pe(e){return e.type===`TSPropertySignature`}function Fe(e){return e.type===`Literal`}function Ie(e){return e.type===`ArrowFunctionExpression`}function Le(e){return je(e)||Ie(e)}function Re(e){return e.type===`TSQualifiedName`}function ze(e){return e.type===`Literal`&&t.isNumber(e.value)}function Be(e){return e.type===`NewExpression`}function Ve(e){return e.type===`ArrayExpression`}function He(e){return e.type===`ObjectExpression`}function Ue(e){return e.type===`ObjectPattern`}function We(e){return e.type===`TemplateLiteral`}function Ge(e){return e.type===`ExpressionStatement`}function Ke(e){return e.type===`TSTypeAssertion`}function qe(e){return e.type===`TSAsExpression`}function Je(e){return e.type===`AssignmentPattern`}function Ye(e){return e.type===`ThisExpression`}function Xe(e){if(!ge(e)||e.optional)return!1;let{callee:t}=e;if(!E(t)||t.name!==`require`||e.arguments.length!==1)return!1;let[n]=e.arguments;return n!==void 0&&he(n)}function Ze(e){return e.type===`Identifier`}function Qe(e){return e.type!==`PrivateIdentifier`}function $e(e){return qe(e)||Ke(e)}function et(e){return e.type===`TSTypeReference`}function tt({typeAnnotation:e}){return et(e)&&e.typeName.type===`Identifier`&&e.typeName.name===`const`}function nt(e){return He(e)&&e.properties.length===0}function rt(e){let t=e,{parent:n}=e;for(;n.type===`ParenthesizedExpression`&&n.expression===t;)t=n,{parent:n}=n;return!$e(n)||n.expression!==t}function it(e){let t=0,n=!1,r=e;for(;$e(r);)t+=1,n||=!tt(r),r=h(r.expression);return t>1&&n}const at=b(`no-chained-type-assertions`,`anti-slop`,{createOnce(e){function t(t){!rt(t)||!it(t)||e.report({messageId:`chained`,node:t})}return{TSAsExpression:t,TSTypeAssertion:t}},meta:{docs:{description:`Disallow chained TypeScript as and angle-bracket assertions, including parenthesized chains.`,recommended:!0},messages:{chained:`This assertion chain discards type evidence. Keep the original precise type, or parse untrusted input at its boundary before narrowing it.`},type:`problem`}});function ot(e){let t=h(e);return t.type===`ConditionalExpression`&&(nt(t.consequent)||nt(t.alternate))}const st=b(`no-conditional-empty-object-spread`,`anti-slop`,{createOnce(e){return{SpreadElement(t){t.parent.type!==`ObjectExpression`||!ot(t.argument)||e.report({messageId:`avoid`,node:t})}}},meta:{docs:{description:`Disallow object spreads that conditionally spread an empty object to omit fields.`,recommended:!0},messages:{avoid:`This conditional spread hides property omission behind an empty object. Build the object in separate statements and add the property only when present.`},type:`suggestion`}}),ct=new Set([`NonNullable`,`Omit`,`Partial`,`Pick`,`PropertyKey`,`Readonly`,`Record`,`Required`]),lt=new Set([`NonNullable`,`Partial`,`Readonly`,`Required`]),ut=`open dictionary`;function dt(e){return e.type===`ExportNamedDeclaration`||e.type===`ExportDefaultDeclaration`?e.declaration??void 0:e}function ft(e,t){for(let n of e.specifiers)ct.has(n.local.name)&&t.add(n.local.name)}function pt(e,t,n){let{name:r}=e.id;t.has(r)?n.add(r):t.set(r,e),ct.has(r)&&n.add(r)}function mt(e,t,n){let{name:r}=e.id,i=t.get(r)??[];i.push(e),t.set(r,i),ct.has(r)&&n.add(r)}function ht(e,t,n,r){if(e!==void 0)switch(e.type){case`ClassDeclaration`:case`FunctionDeclaration`:e.id!==null&&ct.has(e.id.name)&&r.add(e.id.name);return;case`ImportDeclaration`:ft(e,r);return;case`TSEnumDeclaration`:ct.has(e.id.name)&&r.add(e.id.name);return;case`TSInterfaceDeclaration`:mt(e,n,r);return;case`TSTypeAliasDeclaration`:pt(e,t,r)}}function gt(e){let t=new Map,n=new Map,r=new Set;for(let i of e.body)ht(dt(i),t,n,r);return{aliases:t,interfaces:n,shadowedBuiltIns:r}}function _t(e){return e.typeName.type===`Identifier`?e.typeName.name:void 0}function j(e,t){return ct.has(e)&&!t.shadowedBuiltIns.has(e)}function vt(e){let t=e;for(;t.type===`TSParenthesizedType`||t.type===`TSTypeOperator`&&t.operator===`readonly`;)t=t.typeAnnotation;return t}function yt(e,t){let n=vt(e);return n.type===`TSTypeReference`&&_t(n)===t&&(n.typeArguments?.params.length??0)===0}function bt(e){return vt(e).type===`TSNeverKeyword`}function xt(e){return e.type===`TSPropertySignature`&&e.optional&&e.typeAnnotation!==null&&bt(e.typeAnnotation.typeAnnotation)}function St(e){return e.members.length===0||e.members.every(xt)}function Ct(e){if(e.length!==1)return!1;let[t]=e;return t?.extends.length===0&&(t.body.body.length===0||t.body.body.every(xt))}function wt(e,t){let n=e,r=``;for(;;){let e=vt(n);if(e.type!==`TSTypeReference`)return n;let i=_t(e);if(i===void 0||i===r)return n;let a=t.get(i);if(a===void 0)return n;r=i,n=a}}function Tt(e,t,n){let r=e.typeParameters?.params??[],i=t.typeArguments?.params??[],a=new Map(n);for(let[e,t]of r.entries()){let n=i[e]??t.default??void 0;if(n===void 0)return;a.set(t.name.name,wt(n,a))}return a}function Et(e,t,n,r){for(let i of e)if(kt(i,t,n,r)!==void 0)return`union`}function Dt(e,t,n,r){let i,a=e.length>0;for(let o of e){let e=kt(o,t,n,r);if(e===`any`)return`any`;e===void 0?a=!1:i??=e}return a?i:void 0}function Ot(e,t,n,r){let i=_t(e);if(i===void 0)return;let a=n.get(i);if(a!==void 0)return yt(a,i)?void 0:kt(a,t,n,r);if(lt.has(i)&&j(i,t)){let i=e.typeArguments?.params[0];return i===void 0?void 0:kt(i,t,n,r)}let o=t.interfaces.get(i);if(o!==void 0)return Ct(o)?`empty-object`:void 0;let s=t.aliases.get(i);if(s===void 0||r.has(i))return;let c=Tt(s,e,n);if(c!==void 0)return kt(s.typeAnnotation,t,c,new Set([...r,i]))}function kt(e,t,n,r){let i=vt(e);return i.type===`TSUnknownKeyword`?`unknown`:i.type===`TSAnyKeyword`?`any`:i.type===`TSObjectKeyword`?`object`:i.type===`TSTypeLiteral`&&St(i)?`empty-object`:i.type===`TSUnionType`?Et(i.types,t,n,r):i.type===`TSIntersectionType`?Dt(i.types,t,n,r):i.type===`TSTypeReference`?Ot(i,t,n,r):void 0}function At(e){return e===null?void 0:e.typeAnnotation}function jt(e,t){let n=[];for(let r of e.members){if(r.type!==`TSIndexSignature`)continue;let e=At(r.typeAnnotation);e!==void 0&&n.push({substitutions:t,type:e})}return n}function Mt(e,t,n,r,i){if(lt.has(t)&&j(t,n)){let t=e.typeArguments?.params[0];return t===void 0?[]:Ft(t,n,r,i)}if(t===`Record`&&j(t,n)){let t=e.typeArguments?.params[1];return t===void 0?[]:[{substitutions:r,type:t}]}if((t===`Pick`||t===`Omit`)&&j(t,n)){let t=e.typeArguments?.params[0];return t===void 0?[]:Ft(t,n,r,i)}}function Nt(e,t,n,r){let i=_t(e);if(i===void 0)return[];let a=n.get(i);if(a!==void 0)return yt(a,i)?[]:Ft(a,t,n,r);let o=Mt(e,i,t,n,r);if(o!==void 0)return o;let s=t.aliases.get(i);if(s===void 0||r.has(i))return[];let c=Tt(s,e,n);if(c===void 0)return[];let l=new Set([...r,i]);return Ft(s.typeAnnotation,t,c,l)}function Pt(e,t,n,r){let i=vt(e);return i.type===`TSTypeLiteral`?jt(i,n):i.type===`TSMappedType`?i.typeAnnotation===null?[]:[{substitutions:n,type:i.typeAnnotation}]:i.type===`TSTypeReference`?Nt(i,t,n,r):[]}function Ft(e,t,n,r){return Pt(e,t,n,r)}function It(e,t){let n=kt(e,t,new Map,new Set);return n===void 0?void 0:{kind:`unsafe-dictionary`,unsafeValue:n}}function Lt(e,t){let n=Pt(e,t,new Map,new Set);for(let e of n){let n=kt(e.type,t,e.substitutions,new Set);if(n!==void 0)return{kind:`unsafe-dictionary`,unsafeValue:n}}}function Rt(e,t,n,r){return Pt(e,t,n,r).length>0}function zt(e,t){let n=_t(e);if(n===void 0)return;if(lt.has(n)&&j(n,t)){let n=e.typeArguments?.params[0];return n===void 0?void 0:Bt(n,t)}if(n===`Record`&&j(n,t))return{kind:ut};let r=t.aliases.get(n);if(r===void 0)return;let i=Tt(r,e,new Map);if(i!==void 0)return(r.typeParameters?.params.length??0)>0?Rt(r.typeAnnotation,t,i,new Set([n]))?{kind:`generic container`}:void 0:Wt(r.typeAnnotation,t,i,new Set([n]))}function Bt(e,t){let n=vt(e);return n.type===`TSUnknownKeyword`?{kind:`unknown`}:n.type===`TSObjectKeyword`?{kind:`object`}:n.type===`TSTypeLiteral`?n.members.some(e=>e.type===`TSIndexSignature`)?{kind:ut}:n.members.length>0?{kind:`anonymous object`}:void 0:n.type===`TSMappedType`?{kind:ut}:n.type===`TSTypeReference`?zt(n,t):void 0}function Vt(e,t,n){let r=vt(e);if(r.type===`TSStringKeyword`||r.type===`TSNumberKeyword`||r.type===`TSSymbolKeyword`)return!0;if(r.type===`TSUnionType`)return r.types.every(e=>Ht(e,t,n));if(r.type!==`TSTypeReference`)return!1;let i=_t(r);if(i===void 0)return!1;let a=n.get(i);return a!==void 0&&!yt(a,i)?Ht(a,t,n):i===`PropertyKey`&&j(i,t)}function Ht(e,t,n){return Vt(e,t,n)}function Ut(e,t,n,r){let i=_t(e);if(i===void 0)return;let a=n.get(i);if(a!==void 0)return yt(a,i)?void 0:Gt(a,t,n,r);if(lt.has(i)&&j(i,t)){let i=e.typeArguments?.params[0];return i===void 0?void 0:Gt(i,t,n,r)}if(i===`Record`&&j(i,t))return{kind:ut};let o=t.aliases.get(i);if(o===void 0||r.has(i))return;let s=Tt(o,e,n);if(s===void 0)return;let c=new Set([...r,i]);return Gt(o.typeAnnotation,t,s,c)}function Wt(e,t,n,r){let i=vt(e);return i.type===`TSUnknownKeyword`?{kind:`unknown`}:i.type===`TSObjectKeyword`?{kind:`object`}:i.type===`TSTypeLiteral`?i.members.some(e=>e.type===`TSIndexSignature`)?{kind:ut}:void 0:i.type===`TSMappedType`?Vt(i.constraint,t,n)?{kind:ut}:void 0:i.type===`TSTypeReference`?Ut(i,t,n,r):void 0}function Gt(e,t,n,r){return Wt(e,t,n,r)}function Kt(e){let t=e;for(;t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSTypeAssertion`||t.type===`TSNonNullExpression`||t.type===`TSSatisfiesExpression`;)t=t.expression;return t.type===`ObjectExpression`||t.type===`ArrayExpression`||t.type===`ArrowFunctionExpression`||t.type===`ClassExpression`||t.type===`FunctionExpression`||t.type===`NewExpression`||t.type===`Literal`||t.type===`TemplateLiteral`||t.type===`UnaryExpression`}function qt(e,t){return _(e.getScope(t),t.name)}function Jt(e){if(e.defs.length!==1)return;let[t]=e.defs;if(t?.type!==`Variable`)return;let{node:n}=t;return n.type===`VariableDeclarator`?n:void 0}function Yt(e,t){return t.parent.type===`VariableDeclaration`&&t.parent.kind===`const`&&e.references.every(e=>e.init||!e.isWrite())}function Xt(e,t,n=new Set){let r=t;for(;;){if(Kt(r))return!0;let t=m(r);if(t.type!==`Identifier`)return!1;let i=qt(e,t);if(i===void 0||n.has(i))return!1;let a=Jt(i);if(a===void 0)return!1;let{init:o}=a;if(o===null||!Yt(i,a))return!1;n.add(i),r=o}}function Zt(e,t){if(e!=null)return Bt(e.typeAnnotation,t)}function Qt(e){let t=e.parent;for(;t!==null&&t.type!==`Program`;){if(t.type===`ArrowFunctionExpression`||t.type===`FunctionDeclaration`||t.type===`FunctionExpression`)return t;t=t.parent}}function $t(e,t){return t.type===`Identifier`||t.type===`PrivateIdentifier`?t.name:t.type===`Literal`?String(t.value):e.getText(t)}function en(e,t){if(t===void 0)return`anonymous function`;if(t.id!==null)return t.id.name;let{parent:n}=t;return n.type===`VariableDeclarator`&&n.id.type===`Identifier`?n.id.name:n.type===`MethodDefinition`?$t(e,n.key):`anonymous function`}function tn(e){let t=an(e);return t.type===`ObjectExpression`&&t.properties.length===0}function nn(e){return e.kind===`open dictionary`||e.kind===`generic container`}function rn(e){let t=e.parent;for(;t?.type===`ParenthesizedExpression`;)t=t.parent;return t?.type===`TSAsExpression`||t?.type===`TSTypeAssertion`}function an(e){let t=e;for(;t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`||t.type===`TSNonNullExpression`;)t=t.expression;return t}const on=b(`no-known-value-widening`,`anti-slop`,{createOnce(e){let t;function n(t,n,r){n!==void 0&&(nn(n)&&tn(t)||Xt(e.sourceCode,t)&&e.report({data:{subject:r,target:n.kind},messageId:`widening`,node:t}))}function r(e){return t===void 0?void 0:Zt(e,t)}return{ArrowFunctionExpression(t){t.body.type!==`BlockStatement`&&n(t.body,r(t.returnType),`return value of \`${en(e.sourceCode,t)}\``)},AssignmentExpression(t){if(t.operator!==`=`||t.left.type!==`Identifier`)return;let i=qt(e.sourceCode,t.left);if(i===void 0)return;let a=Jt(i)?.id;a?.type===`Identifier`&&n(t.right,r(a.typeAnnotation),`binding \`${a.name}\``)},Program(e){t=gt(e)},PropertyDefinition(t){t.value!==null&&n(t.value,r(t.typeAnnotation),`property \`${$t(e.sourceCode,t.key)}\``)},ReturnStatement(t){if(t.argument===null)return;let i=Qt(t);n(t.argument,r(i?.returnType),`return value of \`${en(e.sourceCode,i)}\``)},TSAsExpression(e){t===void 0||rn(e)||n(e.expression,Bt(e.typeAnnotation,t),`assertion`)},TSTypeAssertion(e){t!==void 0&&(rn(e)||n(e.expression,Bt(e.typeAnnotation,t),`assertion`))},VariableDeclarator(e){e.init!==null&&e.id.type===`Identifier`&&n(e.init,r(e.id.typeAnnotation),`binding \`${e.id.name}\``)}}},meta:{docs:{description:`Disallow syntactically established values from flowing into explicitly broad or anonymous target types that discard useful evidence.`,recommended:!0},messages:{widening:"The explicit {{target}} type on {{subject}} discards known type evidence. Keep inference, validate with `satisfies`, or use a named owner contract."},type:`problem`}}),sn=new Set([`doMock`,`mock`,`unstable_mockModule`]);function cn(e,t){return _(e.getScope(t),t.name)}function ln(e){return e.defs.some(e=>{if(e.type!==`ImportBinding`||e.parent?.type!==`ImportDeclaration`||e.node.type!==`ImportSpecifier`)return!1;let t=e.node.imported.type===`Identifier`?e.node.imported.name:e.node.imported.value;return e.parent.source.value===`vitest`&&t===`vi`||e.parent.source.value===`@jest/globals`&&t===`jest`})}function un(e,t){if(t.type!==`Identifier`)return!1;if((t.name===`vi`||t.name===`jest`)&&e.isGlobalReference(t))return!0;let n=cn(e,t);return n===void 0?t.name===`vi`||t.name===`jest`:n.defs.length===0||ln(n)}function dn(e,n){return!(`property`in n)||!(`object`in n)||!(`computed`in n)||!un(e,n.object)?!1:n.computed?n.property.type===`Literal`&&t.isString(n.property.value)&&sn.has(n.property.value):n.property.type===`Identifier`&&sn.has(n.property.name)}const fn=b(`no-module-mocking`,`anti-slop`,{createOnce(e){return{CallExpression(t){t.callee.type!==`Super`&&t.callee.type!==`V8IntrinsicExpression`&&dn(e.sourceCode,t.callee)&&e.report({messageId:`moduleMock`,node:t})}}},meta:{docs:{description:`Disallow Vitest and Jest module mocking; tests must replace dependencies through real interfaces.`,recommended:!0},messages:{moduleMock:`Replace module mocking with dependency injection through a real interface, service layer, or faithful test implementation.`},type:`problem`}});function pn(e,t){if(S(e)){t.push(e);return}if(Array.isArray(e))for(let n of e)S(n)&&t.push(n)}function mn(e,t,n){let r=t[e.type];if(r===void 0)return;let i=new Set(r);for(let[t,r]of Object.entries(e))i.has(t)&&pn(r,n)}function hn(e,t,n){let r=[e];for(;r.length>0;){let e=[];for(let i of r)i.type===`TSInferType`&&n.add(i.typeParameter.name.name),mn(i,t,e);r=e}}function gn(e,t){if(!(`typeParameters`in e))return;let n=e.typeParameters?.params;if(n!==void 0)for(let e of n)t.add(e.name.name)}function _n(e,t,n){e.type===`TSMappedType`&&(t===e.nameType||t===e.typeAnnotation)&&n.add(e.key.name)}function vn(e,t,n,r){e.type===`TSConditionalType`&&t===e.trueType&&hn(e.extendsType,n,r)}function yn(e,t){let n=new Set,r=e,i=e;for(;i.type!==`Program`;)gn(i,n),_n(i,r,n),vn(i,r,t,n),r=i,i=i.parent;return n}function bn(e){let t=e;for(;t.type===`TSParameterProperty`||t.type===`RestElement`;){if(t.type===`TSParameterProperty`){t=t.parameter;continue}if(t.typeAnnotation?.type===`TSTypeAnnotation`)return t.typeAnnotation;t=t.argument}return t.type===`AssignmentPattern`?t.typeAnnotation??t.left.typeAnnotation??void 0:t.typeAnnotation??void 0}function xn(e,t,n){return e.type===`Identifier`?e.name:n.slice(0,n.length-(t.range[1]-t.range[0])).trimEnd()}function Sn(e){if(!(e.type!==`TSTypeReference`||e.typeName.type!==`Identifier`||(e.typeArguments?.params.length??0)>0))return e.typeName.name}function Cn(e,t){if(e.type===`TSParenthesizedType`)return t.push(e.typeAnnotation),!0;if(e.type===`TSUnionType`){for(let n of e.types)t.push(n);return!0}return!1}const wn=b(`no-object-parameters`,`anti-slop`,{createOnce(e){let t=new Map;function n(e,n,r,i){let a=Sn(e);if(a===void 0||r.has(a)||n.has(a))return;r.add(a);let o=t.get(a);o!==void 0&&i.push(o)}function r(e,t){let r=new Set,i=[e];for(;i.length>0;){let e=[];for(let a of i){if(a.type===`TSObjectKeyword`)return!0;Cn(a,e)||n(a,t,r,e)}i=e}return!1}function i(t){let n=yn(t,e.sourceCode.visitorKeys);for(let i of t.params){let t=bn(i);t?.type!==`TSTypeAnnotation`||!r(t.typeAnnotation,n)||e.report({data:{parameter:xn(i,t,e.sourceCode.getText(i))},messageId:`objectParameter`,node:t.typeAnnotation})}}return{ArrowFunctionExpression:i,FunctionDeclaration:i,FunctionExpression:i,Program(e){t.clear();for(let n of e.body){let e=n.type===`ExportNamedDeclaration`?n.declaration:n;e?.type===`TSTypeAliasDeclaration`&&(e.typeParameters?.params.length??0)===0&&t.set(e.id.name,e.typeAnnotation)}},TSCallSignatureDeclaration:i,TSConstructorType:i,TSConstructSignatureDeclaration:i,TSDeclareFunction:i,TSEmptyBodyFunctionExpression:i,TSFunctionType:i,TSMethodSignature:i}},meta:{docs:{description:`Disallow object function parameters; inputs must use an owner-provided type and be parsed at their boundary.`,recommended:!0},messages:{objectParameter:"Parameter `{{parameter}}` uses the broad `object` type. Accept a named owner type; parse external input at its boundary before calling this function."},type:`problem`}});function Tn(e,t){return _(e.getScope(t),t.name)}function En(e,t){if(t.type!==`Identifier`||t.name!==`Reflect`)return!1;if(e.isGlobalReference(t))return!0;let n=Tn(e,t);return n===void 0||n.defs.length===0}function Dn(e,t,n){return!(`property`in t)||!(`object`in t)||!(`computed`in t)||!En(e,t.object)?!1:t.computed?t.property.type===`Literal`&&t.property.value===n:t.property.type===`Identifier`&&t.property.name===n}const On=b(`no-reflect-apply`,`anti-slop`,{createOnce(e){return{CallExpression(t){t.callee.type!==`Super`&&t.callee.type!==`V8IntrinsicExpression`&&Dn(e.sourceCode,t.callee,`apply`)&&e.report({messageId:`reflectApply`,node:t})}}},meta:{docs:{description:`Disallow Reflect.apply; call typed functions directly or model dynamic dispatch behind an interface.`,recommended:!0},messages:{reflectApply:"Replace `Reflect.apply` with a typed function call. Model dynamic dispatch behind a named interface."},type:`problem`}}),kn=b(`no-reflect-get`,`anti-slop`,{createOnce(e){return{CallExpression(t){t.callee.type!==`Super`&&t.callee.type!==`V8IntrinsicExpression`&&Dn(e.sourceCode,t.callee,`get`)&&e.report({messageId:`reflectGet`,node:t})}}},meta:{docs:{description:`Disallow Reflect.get; use typed property access or parse dynamic input into a domain type.`,recommended:!0},messages:{reflectGet:"Replace `Reflect.get` with typed property access. Parse dynamic input into a named domain type before reading it."},type:`problem`}});function An(e){return e.type===`ArrowFunctionExpression`||e.type===`FunctionDeclaration`||e.type===`FunctionExpression`}function jn(e){let t=e.parent;for(;t!==null&&t.type!==`Program`;){if(An(t))return t.returnType?.typeAnnotation.type===`TSTypePredicate`;t=t.parent}return!1}const Mn=b(`no-runtime-typeof`,`anti-slop`,{createOnce(e){return{UnaryExpression(n){let[r]=e.options,i=t.isObject(r)&&r.allowInTypeGuards;n.operator===`typeof`&&(!i||!jn(n))&&e.report({messageId:`runtimeTypeof`,node:n})}}},meta:{defaultOptions:[{allowInTypeGuards:!1}],docs:{description:`Disallow runtime typeof checks; external values must be decoded into meaningful types at their I/O boundary.`,recommended:!0},messages:{runtimeTypeof:"A `typeof` check narrows a representation without establishing its contract. Parse input at its I/O boundary, then branch on the domain value."},schema:[{additionalProperties:!1,properties:{allowInTypeGuards:{default:!1,description:"Allow `typeof` inside functions whose return type is a type predicate (`value is T`) or an assertion predicate (`asserts value is T`).",type:`boolean`}},type:`object`}],type:`problem`}});function Nn(e){return e.toLowerCase().includes(`shape`)}const Pn=b(`no-shape-in-symbol-names`,`anti-slop`,{createOnce(e){function t(t){Nn(t.name)&&e.report({data:{name:t.name},messageId:`forbiddenSymbolName`,node:t})}return{Identifier:t,JSXIdentifier:t,PrivateIdentifier:t}},meta:{docs:{description:`Disallow the case-insensitive substring "shape" in JavaScript, TypeScript, private, and JSX symbol names.`,recommended:!0},messages:{forbiddenSymbolName:`Rename symbol "{{name}}" for its domain role; "shape" describes structure rather than ownership.`},type:`problem`}});function Fn(e){return e.typeAnnotation??void 0}function In(e){let t=e;for(;;){if(t.type===`TSParameterProperty`){t=t.parameter;continue}if(t.type===`RestElement`){if(t.typeAnnotation)return t.typeAnnotation;t=t.argument;continue}return t.type===`AssignmentPattern`?t.typeAnnotation??Fn(t.left):Fn(t)}}function Ln(e,t){let n=e;for(;;){if(n.type===`TSParameterProperty`){n=n.parameter;continue}if(n.type===`AssignmentPattern`){n=n.left;continue}if(n.type===`RestElement`){n=n.argument;continue}return n.type===`Identifier`?n.name:t.slice(0,t.trimEnd().lastIndexOf(`:`)).trimEnd()}}function Rn(e){let t=e.returnType?.typeAnnotation;if(t?.type===`TSTypePredicate`)return t.parameterName.type===`Identifier`?t.parameterName.name:void 0}const zn=b(`no-unknown-parameters`,`anti-slop`,{createOnce(e){function t(t){let n=Rn(t);for(let r of t.params){let t=In(r);if(t?.typeAnnotation.type!==`TSUnknownKeyword`)continue;let i=Ln(r,e.sourceCode.getText(r));i!==`cause`&&i!==n&&e.report({data:{parameter:i},messageId:`unknownParameter`,node:t.typeAnnotation})}}return{ArrowFunctionExpression:t,FunctionDeclaration:t,FunctionExpression:t,TSCallSignatureDeclaration:t,TSConstructorType:t,TSConstructSignatureDeclaration:t,TSDeclareFunction:t,TSEmptyBodyFunctionExpression:t,TSFunctionType:t,TSMethodSignature:t}},meta:{docs:{description:"Disallow explicitly unknown function parameters except `cause` and the parameter named by a type predicate; decode unknown input at its I/O boundary instead.",recommended:!0},messages:{unknownParameter:"Parameter `{{parameter}}` leaves input unparsed. Accept a named domain type; run the expected schema or parser at the I/O boundary before calling this function."},type:`problem`}});function Bn(e,t){switch(e.type){case`TSParenthesizedType`:return t.push(e.typeAnnotation),!0;case`TSUnionType`:for(let n of e.types)t.push(n);return!0;default:return!1}}function Vn(e,t,n,r,i){if(e.typeName.type!==`Identifier`)return;let{name:a}=e.typeName;if(a===`Promise`||a===`PromiseLike`){let t=e.typeArguments?.params[0];t!==void 0&&i.push(t);return}if((e.typeArguments?.params.length??0)>0||n.has(a)||r.has(a))return;let o=t.get(a);o===void 0||o.typeParameters||(r.add(a),i.push(o.typeAnnotation))}function Hn(e,t,n,r,i){return e.type===`TSUnknownKeyword`||(Bn(e,i)||e.type===`TSTypeReference`&&Vn(e,t,n,r,i),!1)}function Un(e,t,n){let r=[e],i=[],a=new Set;for(;;){for(let e of r)if(Hn(e,t,n,a,i))return!0;if(i.length===0)return!1;let e=r;r=i,i=e,i.splice(0)}}const Wn=b(`no-unknown-returns`,`anti-slop`,{createOnce(e){let t=new Map;function n(n){let r=n.returnType;if(!r)return;let i=yn(n,e.sourceCode.visitorKeys);Un(r.typeAnnotation,t,i)&&e.report({messageId:`unknownReturn`,node:r.typeAnnotation})}return{ArrowFunctionExpression:n,FunctionDeclaration:n,FunctionExpression:n,Program(e){t.clear();for(let n of e.body){let e=n.type===`ExportNamedDeclaration`?n.declaration:n;e?.type===`TSTypeAliasDeclaration`&&t.set(e.id.name,e)}},TSCallSignatureDeclaration:n,TSConstructorType:n,TSConstructSignatureDeclaration:n,TSDeclareFunction:n,TSEmptyBodyFunctionExpression:n,TSFunctionType:n,TSMethodSignature:n}},meta:{docs:{description:`Disallow functions whose explicit return contract is unknown or Promise<unknown>.`,recommended:!0},messages:{unknownReturn:"This function exposes `unknown` to its caller. Parse the value at its boundary and return a named domain type."},type:`problem`}});function Gn(e){let t=e;for(;t.type===`TSParenthesizedType`;)t=t.typeAnnotation;return t}function Kn(e){let t=Gn(e);if(t.type===`TSTypeReference`&&t.typeName.type===`Identifier`)return(t.typeArguments?.params.length??0)===0?t.typeName.name:void 0}const qn=b(`no-unknown-type-aliases`,`anti-slop`,{createOnce(e){let t=new Map;function n(e){let n=new Set,r=e;for(;;){if(r=Gn(r),r.type===`TSUnknownKeyword`)return!0;let e=Kn(r);if(e===void 0||n.has(e))return!1;let i=t.get(e);if(i===void 0||i.typeParameters)return!1;n.add(e),r=i.typeAnnotation}}return{Program(r){t.clear();for(let e of r.body){let n=e.type===`ExportNamedDeclaration`?e.declaration:e;n?.type===`TSTypeAliasDeclaration`&&t.set(n.id.name,n)}for(let r of t.values())n(r.typeAnnotation)&&e.report({data:{alias:r.id.name},messageId:`unknownAlias`,node:r.id})}}},meta:{docs:{description:`Disallow type aliases whose resolved type is unknown; unknown must remain visible at an allowed boundary.`,recommended:!0},messages:{unknownAlias:"Type alias `{{alias}}` hides `unknown`. Keep `unknown` explicit at the parsing boundary or on an allowed `cause` field; otherwise use the parsed owner type."},type:`problem`}});function Jn(e,t){if(e.type!==`TSTypeReference`||(e.typeArguments?.params.length??0)>0||e.typeName.type!==`Identifier`||!t.aliases.has(e.typeName.name))return!1;let n=e.parent;for(;n.type!==`Program`;){if(n.type===`TSTypeAliasDeclaration`)return!1;n=n.parent}return!0}function Yn(e,t){if(Jn(e,t))return;let n=Lt(e,t);if(n===void 0)return;let r=e.parent;for(;r.type!==`Program`;){let e;if((r.type===`TSMappedType`||r.type===`TSTypeLiteral`||r.type===`TSTypeReference`)&&(e=Lt(r,t)),e!==void 0)return;r=r.parent}return n}const Xn=b(`no-unsafe-dictionary-type`,`anti-slop`,{createOnce(e){let t;function n(n){if(t===void 0)return;let r=Yn(n,t);r!==void 0&&e.report({data:{value:r.unsafeValue},messageId:`unsafeDictionary`,node:n})}return{Program(e){t=gt(e)},TSIndexSignature(n){if(t===void 0||n.parent.type===`TSTypeLiteral`)return;let r=It(n.typeAnnotation.typeAnnotation,t);r!==void 0&&e.report({data:{value:r.unsafeValue},messageId:`unsafeDictionary`,node:n})},TSMappedType:n,TSTypeLiteral:n,TSTypeReference:n}},meta:{docs:{description:`Disallow object-dictionary contracts whose direct value type is unknown, any, object, {}, or a union/alias containing one of those escape hatches.`,recommended:!0},messages:{unsafeDictionary:`This dictionary's {{value}} value type gives callers no concrete value contract. Use an owner/schema-derived value type; parse external payloads before insertion.`},type:`problem`}}),Zn=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`TSDeclareFunction`,`TSEmptyBodyFunctionExpression`]);function Qn(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function $n(e){let t=e;for(;t.type===`TSParenthesizedType`;)t=t.typeAnnotation;return t}function er(e){return e.typeName.type===`Identifier`?e.typeName.name:void 0}function tr(e){let t=$n(e);return t.type===`TSAnyKeyword`||t.type===`TSUnknownKeyword`}function nr(e){let t=$n(e);return t.type===`TSNumberKeyword`||t.type===`TSStringKeyword`||t.type===`TSSymbolKeyword`?!0:t.type===`TSUnionType`?t.types.every(nr):t.type===`TSTypeReference`&&er(t)===`PropertyKey`}function rr(e){let t=$n(e);if(t.type===`TSTypeReference`){if(er(t)===`Readonly`){let[e]=t.typeArguments?.params??[];return e!==void 0&&rr(e)}if(er(t)!==`Record`)return!1;let e=t.typeArguments?.params??[];return e.length===2&&e[0]!==void 0&&e[1]!==void 0&&nr(e[0])&&tr(e[1])}if(t.type!==`TSTypeLiteral`||t.members.length!==1)return!1;let[n]=t.members;if(n?.type!==`TSIndexSignature`||n.parameters.length!==1)return!1;let[r]=n.parameters;return r!==void 0&&nr(r.typeAnnotation.typeAnnotation)&&tr(n.typeAnnotation.typeAnnotation)}function ir(e){let t=$n(e);return t.type===`TSAnyKeyword`||t.type===`TSUnknownKeyword`?`top`:t.type===`TSObjectKeyword`?`object`:rr(t)?`record`:void 0}function ar(e){return Qn(e.expression)}function or(e){let t=Qn(e);return t.type===`TSAsExpression`||t.type===`TSTypeAssertion`?t:void 0}function sr(e,t){return e.slice(t.range[0],t.range[1]).replaceAll(/\s+/gu,``)}function cr(e,t,n){return t!==void 0&&sr(e,$n(t))===sr(e,$n(n))}function lr(e){let t=$n(e);switch(t.type){case`TSArrayType`:case`TSConstructorType`:case`TSFunctionType`:case`TSMappedType`:case`TSObjectKeyword`:case`TSTupleType`:return!0;case`TSIntersectionType`:return t.types.every(lr);case`TSTypeLiteral`:return t.members.length>0;case`TSTypeOperator`:return t.operator===`readonly`&&lr(t.typeAnnotation);default:return!1}}function ur(e){let t=$n(e);if(t.type===`TSTypeLiteral`)return t.members.some(e=>e.type!==`TSIndexSignature`);if(t.type!==`TSTypeReference`)return!1;if(er(t)===`Readonly`){let[e]=t.typeArguments?.params??[];return e!==void 0&&ur(e)}if(er(t)!==`Record`)return!1;let n=t.typeArguments?.params??[];return n.length===2&&n[1]!==void 0&&!tr(n[1])}function dr(e){let t=e.parent??void 0;for(;t!==void 0&&t.type!==`Program`;){if(Zn.has(t.type))return t;t=t.parent}}function fr(e,t){return _(e.getScope(t),t.name)}function pr(e){for(let t of e.defs)if(t.type===`Variable`&&t.node.type===`VariableDeclarator`)return t.node}function mr(e){return e.references.some(e=>e.isWrite()&&!e.init)}function hr(e){return e.typeAnnotation??void 0}function gr(e){let t=Qn(e);if(t.type===`TSAsExpression`||t.type===`TSTypeAssertion`)return ir(t.typeAnnotation)===void 0?{type:t.typeAnnotation}:void 0;if(t.type===`Literal`||t.type===`TemplateLiteral`||t.type===`ArrayExpression`||t.type===`ArrowFunctionExpression`||t.type===`ClassExpression`||t.type===`FunctionExpression`||t.type===`NewExpression`||t.type===`ObjectExpression`)return{type:void 0}}function _r(e,t){let n=e.typeAnnotation?.typeAnnotation;if(n!==void 0&&dr(e)===t&&ir(n)===void 0)return{type:n}}function vr(e,t){let n=pr(e);if(n!==void 0&&!(n.parent.type!==`VariableDeclaration`||n.parent.kind!==`const`||n.init===null||mr(e)||dr(n)!==t))return n.init}function yr(e,t,n,r){let i=t,a=new Set(r);for(;;){let t=gr(i);if(t!==void 0)return t;let r=Qn(i);if(r.type!==`Identifier`)return;let o=fr(e,r);if(o===void 0||a.has(o))return;let s=o.identifiers.find(e=>e.typeAnnotation!==null&&e.typeAnnotation!==void 0);if(s!==void 0)return _r(s,n);let c=vr(o,n);if(c===void 0)return;a.add(o),i=c}}function br(e,t){let n=pr(t);if(n===void 0)return;let r=n.id;if(n.parent.type!==`VariableDeclaration`||n.parent.kind!==`const`||r.type!==`Identifier`||n.init===null||mr(t))return;let i=dr(n),a=hr(r)?.typeAnnotation,o=or(n.init),s=o===void 0?void 0:ir(o.typeAnnotation),c=(a===void 0?void 0:ir(a))??s;if(c===void 0)return;let l=yr(e,o!==void 0&&s!==void 0?ar(o):n.init,i,new Set([t]));if(l!==void 0)return{boundary:i,broadKind:c,declaredAt:n.range[1],evidence:l}}function xr(e,t,n,r){return ir(r)===void 0?t===`top`||cr(e,n.type,r)?!0:t===`object`?lr(r):ur(r):!1}const Sr=b(`no-widen-then-assert`,`anti-slop`,{createOnce(e){function t(t){let{sourceCode:n}=e,r=ar(t);if(r.type!==`Identifier`)return;let i=fr(n,r);if(i===void 0)return;let a=br(n,i);a===void 0||t.range[0]<=a.declaredAt||dr(t)!==a.boundary||!xr(n.text,a.broadKind,a.evidence,t.typeAnnotation)||e.report({data:{name:r.name},messageId:`widenThenAssert`,node:t})}return{TSAsExpression:t,TSTypeAssertion:t}},meta:{docs:{description:`Disallow local const flows that explicitly widen a known value before asserting the widened binding to a narrower type.`,recommended:!0},messages:{widenThenAssert:`Binding "{{name}}" discards type evidence and later recreates it with an assertion. Keep the precise type from initialization through use; parse boundary input once.`},type:`problem`}}),Cr=new Set([`ExpressionStatement`,`PropertyDefinition`,`ReturnStatement`,`ThrowStatement`,`VariableDeclaration`]),wr=/\bSAFETY\s*:/u,Tr=/^oxlint-disable(?:-(?:next-)?line)?(?:\s|$)/u,Er=/\s-{2,}\s/u,Dr=/\s/u;function Or(e){return e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`}const kr=/[\s,]+/u;function Ar(e){let t=e.value.trim();if(!Tr.test(t))return!1;let n=t.split(Er),[r]=n,i=n[1]?.trim();if(r===void 0||i===void 0)return!1;let a=r.search(Dr),o=a===-1?``:r.slice(a);for(let e of o.split(kr))if(e===`typescript/no-unsafe-type-assertion`)return!0;return!1}function jr(e){return wr.test(e.value)||Ar(e)}function Mr(e,t){let n=t;for(;;){if(e.getCommentsBefore(n).some(jr))return!0;if(Cr.has(n.type)||n.parent.type===`Program`)return!1;n=n.parent}}const Nr=b(`require-safety-comment-for-type-assertion`,`anti-slop`,{createOnce(e){function t(t){Or(t)||Mr(e.sourceCode,t)||e.report({messageId:`missingSafetyComment`,node:t})}return{TSAsExpression:t,TSTypeAssertion:t}},meta:{docs:{description:`Require a nearby SAFETY comment (or a described Oxlint suppression of typescript/no-unsafe-type-assertion) for every TypeScript type assertion except const assertions.`,recommended:!0},messages:{missingSafetyComment:"This type assertion has no `SAFETY:` justification. State the checked invariant immediately before the assertion or its containing statement, or add a described `oxlint-disable-next-line typescript/no-unsafe-type-assertion` directive."},type:`problem`}}),Pr=`eslint-disable`,Fr=`eslint-disable-line`,Ir=`eslint-disable-next-line`,Lr=`eslint-enable`,Rr=`oxlint-disable`,zr=`oxlint-disable-line`,Br=`oxlint-disable-next-line`,Vr=`oxlint-enable`,Hr=/^(?:eslint|oxlint)-disable-(?:next-)?line$/u,Ur=/[\s,]+/gu,Wr=/\s/u,Gr=new Set([Pr,Fr,Ir,Rr,zr,Br]),Kr=new Set([...Gr,Lr,Vr]),qr=new Set([`eslint`,`eslint-env`,Pr,Fr,Ir,Lr,`exported`,`global`,`globals`,`oxlint`,`oxlint-env`,Rr,zr,Br,Vr]);function Jr(e){return Gr.has(e)}function Yr(e){return Kr.has(e)}function Xr(e,n){if(!t.isObject(e))return;let r=e[n];if(r===void 0||!Array.isArray(r))return;let i=[],a=0;for(let e of r){if(!t.isString(e))return;i[a++]=e}return i}function Zr(e){if(!t.isString(e.value))return;let n=Qr(e.value);if(n!==void 0&&!(!Hr.test(n.kind)&&e.type===`Line`||e.loc.start.line!==e.loc.end.line&&(n.kind===Fr||n.kind===zr)))return{comment:e,description:n.description,kind:n.kind,value:n.value}}function Qr(e){let{description:t,text:n}=ei(e),r=n.search(Wr),i=r===-1?n:n.slice(0,r);if(qr.has(i))return{description:t,kind:i,value:r===-1?``:n.slice(r).trim()}}const $r=/\s-{2,}\s/u;function ei(e){let[t,n]=e.split($r);return t===void 0?{description:void 0,text:``}:{description:n?.trim(),text:t.trim()}}function ti(e,t){return e.line<t.line||e.line===t.line&&e.column<=t.column}function ni(e){return{end:e.end,start:{column:0,line:e.start.line}}}const ri=/\r\n|[\r\n\u2028\u2029]/u;function ii(e,n){if(n===void 0)return ni(e.loc);if(!t.isString(e.value))return e.loc;let r=e.value.split(ri),[i]=r;if(i===void 0)return e.loc;let a=RegExp(`([\\s,]|^)${si(n)}(?:[\\s,]|$)`,`u`),o=e.loc.start,s=a.exec(i);if(s!==null){let[,t]=s;return t===void 0?e.loc:{end:{column:2+o.column+s.index+t.length+n.length,line:o.line},start:{column:2+o.column+s.index+t.length,line:o.line}}}for(let e=1;e<r.length;e+=1){let t=r[e];if(t===void 0)continue;let i=a.exec(t);if(i!==null){let[,t]=i;if(t===void 0)continue;return{end:{column:i.index+t.length+n.length,line:o.line+e},start:{column:i.index+t.length,line:o.line+e}}}}return e.loc}const ai=/[|\\{}()[\]^$+*?.]/gu,oi=String.raw`\$&`;function si(e){return e.replaceAll(ai,oi)}function ci(e){let t={areas:[],duplicateDisableDirectives:[],numberOfRelatedDisableDirectives:new Map,unusedEnableDirectives:[]};for(let n of e.getAllComments()){let e=Zr(n);if(e===void 0)continue;let{kind:r}=e;if(!Yr(r))continue;let{start:i}=n.loc,a=e.value!==void 0&&e.value!==``?e.value.split(Ur):void 0;switch(r){case Pr:case Rr:li(t,n,i,a,`block`);break;case Fr:case zr:{let{line:e}=i;li(t,n,{column:0,line:e},a,`line`),ui(t,n,{column:-1,line:e+1},a,`line`);break}case Ir:case Br:{let{line:e}=i;li(t,n,{column:0,line:e+1},a,`line`),ui(t,n,{column:-1,line:e+2},a,`line`);break}case Lr:case Vr:ui(t,n,i,a,`block`)}}return t}function li(e,t,n,r,i){if(r===void 0){mi(e.areas,void 0,n)!==void 0&&e.duplicateDisableDirectives.push({comment:t,ruleId:void 0}),e.areas.push({comment:t,end:void 0,kind:i,ruleId:void 0,start:n});return}for(let a of r)mi(e.areas,a,n)!==void 0&&e.duplicateDisableDirectives.push({comment:t,ruleId:a}),e.areas.push({comment:t,end:void 0,kind:i,ruleId:a,start:n})}function ui(e,t,n,r,i){let a=new Set;if(r===void 0){di(e.areas,n,i,void 0,a)||pi(e,t,void 0),e.numberOfRelatedDisableDirectives.set(t,a.size);return}for(let o of r)di(e.areas,n,i,o,a)||pi(e,t,o);e.numberOfRelatedDisableDirectives.set(t,a.size)}function di(e,t,n,r,i){let a=!1;for(let o=e.length-1;o>=0;--o){let s=e[o];s===void 0||!fi(s,n,r)||(i.add(s.comment),s.end=t,a=!0)}return a}function fi(e,t,n){return e.end!==void 0||e.kind!==t?!1:n===void 0||e.ruleId===n}function pi(e,t,n){e.unusedEnableDirectives.push({comment:t,ruleId:n})}function mi(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];if(i!==void 0&&(i.ruleId===void 0||i.ruleId===t)&&ti(i.start,n)&&(i.end===void 0||ti(n,i.end)))return i}}const hi=b(`directive-disable-enable-pair`,`general`,{create(e){let[t]=e.options,n=t?.allowWholeFile===!0,r=ci(e.sourceCode),[i]=e.sourceCode.ast.tokens;if(n&&i===void 0)return{};for(let t of r.areas)t.end===void 0&&(n&&i!==void 0&&ti(t.start,i.loc.start)||e.report({data:{ruleId:t.ruleId??``},loc:ii(t.comment,t.ruleId),messageId:t.ruleId===void 0?`missingPair`:`missingRulePair`}));return{}},meta:{docs:{description:"Require a matching enable comment for every `oxlint-disable` or `eslint-disable` block directive."},messages:{missingPair:`Requires 'eslint-enable' directive.`,missingRulePair:`Requires 'eslint-enable' directive for '{{ruleId}}'.`},schema:[{additionalProperties:!1,properties:{allowWholeFile:{description:`Allow a disable directive that covers the entire file.`,type:`boolean`}},type:`object`}],type:`suggestion`}}),gi=b(`directive-no-aggregating-enable`,`general`,{create(e){let t=ci(e.sourceCode);for(let[n,r]of t.numberOfRelatedDisableDirectives)r>1&&e.report({data:{kind:`eslint-enable`},loc:ni(n.loc),messageId:`aggregatingEnable`});return{}},meta:{docs:{description:"Disallow aggregating `oxlint-enable` or `eslint-enable` comments across multiple disable directives."},messages:{aggregatingEnable:`'{{kind}}' comment enables rules for multiple disable directives. Please move '{{kind}}' after each disable directive.`},schema:[],type:`suggestion`}}),_i=b(`directive-no-duplicate-disable`,`general`,{create(e){let t=ci(e.sourceCode);for(let n of t.duplicateDisableDirectives)e.report({data:{ruleId:n.ruleId??``},loc:ii(n.comment,n.ruleId),messageId:n.ruleId===void 0?`duplicate`:`duplicateRule`});return{}},meta:{docs:{description:"Disallow duplicate `oxlint-disable` or `eslint-disable` comments."},messages:{duplicate:`ESLint rules have been disabled already.`,duplicateRule:`'{{ruleId}}' rule has been disabled already.`},schema:[],type:`problem`}}),vi=b(`directive-no-restricted-disable`,`general`,{create(e){let t=ci(e.sourceCode),n=e.options;if(n.length===0)return{};let i=r();for(let e of n)i.add(e);for(let r of t.areas)(r.ruleId===void 0||i.ignores(r.ruleId))&&e.report({data:{ruleId:r.ruleId??String(n)},loc:ii(r.comment,r.ruleId),messageId:`disallow`});return{}},meta:{docs:{description:"Disallow `oxlint-disable` or `eslint-disable` comments for configured rules."},messages:{disallow:`Disabling '{{ruleId}}' is not allowed.`},schema:{items:{type:`string`},type:`array`,uniqueItems:!0},type:`suggestion`}}),yi=b(`directive-no-unlimited-disable`,`general`,{create(e){for(let t of e.sourceCode.getAllComments()){let n=Zr(t);if(n===void 0)continue;let{kind:r}=n;Jr(r)&&(n.value===void 0||n.value===``)&&e.report({data:{kind:r},loc:ni(n.comment.loc),messageId:`unexpected`})}return{}},meta:{docs:{description:"Disallow `oxlint-disable` or `eslint-disable` comments without rule names."},messages:{unexpected:`Unexpected unlimited '{{kind}}' comment. Specify some rule names to disable.`},schema:[],type:`suggestion`}}),bi=b(`directive-no-unused-enable`,`general`,{create(e){let t=ci(e.sourceCode);for(let n of t.unusedEnableDirectives)e.report({data:{kind:`eslint-enable`,ruleId:n.ruleId??``},loc:ii(n.comment,n.ruleId),messageId:n.ruleId===void 0?`unused`:`unusedRule`});return{}},meta:{docs:{description:"Disallow unused `oxlint-enable` or `eslint-enable` comments."},messages:{unused:`Unused '{{kind}}' comment. No reported rules are disabled.`,unusedRule:`'{{ruleId}}' rule is disabled but never reported. Please remove unnecessary '{{kind}}' comment.`},schema:[],type:`suggestion`}}),xi=b(`directive-no-use`,`general`,{create(e){let t=new Set(Xr(e.options[0],`allow`));for(let n of e.sourceCode.getAllComments()){let r=Zr(n);r===void 0||n.type===`Line`||t.has(r.kind)||e.report({loc:ni(r.comment.loc),messageId:`disallow`})}return{}},meta:{docs:{description:`Disallow block ESLint/Oxlint directive comments.`},messages:{disallow:`Unexpected ESLint directive comment.`},schema:[{additionalProperties:!1,properties:{allow:{description:`Directive kinds that are still allowed in block comments.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`suggestion`}}),Si=/\s-{2,}\s/u,Ci=/^(?<kind>oxlint-disable|oxlint-enable)(?:\s|$)/u,wi=b(`directive-require-description`,`general`,{create(e){let n=new Set(Xr(e.options[0],`ignore`));function r(r){let i=Zr(r);if(i!==void 0){let{kind:t}=i;if(!Yr(t)||n.has(t)||i.description!==void 0)return;e.report({data:{kind:t},loc:i.comment.loc,messageId:`missingDescription`});return}if(r.type!==`Line`||!t.isString(r.value))return;let a=r.value.trim(),o=Ci.exec(a);if(o===null)return;let s=o.groups?.kind;s===void 0||!Yr(s)||n.has(s)||Si.test(a)||e.report({data:{kind:s},loc:r.loc,messageId:`missingDescription`})}for(let t of e.sourceCode.getAllComments())r(t);return{}},meta:{docs:{description:"Require descriptions for `oxlint` and `eslint` disable/enable directives."},messages:{missingDescription:`Missing description for '{{kind}}' comment.`},schema:[{additionalProperties:!1,properties:{ignore:{description:`Directive kinds that do not require a description.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`suggestion`}});function Ti(e){return t.isString(e)&&e.length>0}function M(e){if(!Array.isArray(e))return!1;for(let n of e)if(!t.isString(n))return!1;return!0}function Ei(e){if(!t.isObject(e))return!1;for(let n of Object.values(e))if(!t.isString(n))return!1;return!0}function Di(e){return t.isNumber(e)&&!Number.isNaN(e)}const Oi=[`makeSynchronous`,`workerize`],ki=[`@isolated`],Ai=new Set([`browser`,`chrome`]),ji=new Set([`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`MethodDefinition`,`Property`,`VariableDeclaration`,`VariableDeclarator`]),Mi=new Set([`FunctionDeclaration`,`FunctionExpression`]),Ni=new Set([`ClassDeclaration`,`ClassExpression`]),Pi=/(?:\*\s*)*/u;function Fi(e){if(e===!0||e===`writable`||e===`writeable`)return`writable`;if(e===!1||e===`off`)return`off`;if(e===`readonly`||e===`readable`)return`readonly`}function Ii(e){if(!t.isObject(e))return{comments:ki.map(n.toLowerCase),functions:new Set(Oi),overrideGlobals:new Map,selectors:[]};let r=M(e.comments)?e.comments.map(n.toLowerCase):ki.map(n.toLowerCase),i=M(e.functions)?new Set(e.functions):new Set(Oi),a=M(e.selectors)?e.selectors:[],o=new Map;if(t.isObject(e.overrideGlobals))for(let[t,n]of Object.entries(e.overrideGlobals)){let e=Fi(n);e!==void 0&&o.set(t,e)}return{comments:r,functions:i,overrideGlobals:o,selectors:a}}function Li(e){return A(e)}function Ri(e){if((e.type===`Property`||e.type===`MethodDefinition`)&&!(e.computed&&e.key.type!==`Literal`)){if(e.key.type===`Identifier`)return e.key.name;if(e.key.type===`Literal`&&t.isString(e.key.value))return e.key.value}}function zi(e,t,n){return e.callee.type!==`MemberExpression`||e.callee.computed||e.callee.optional||e.callee.object.type!==`Identifier`||e.callee.object.name!==t?!1:g(e.callee)===n}function Bi(e){let{parent:t}=e;if(t?.type===`CallExpression`&&t.arguments[0]===e){if(zi(t,`browser`,`execute`))return`callee of method named "browser.execute"`;if(zi(t,`page`,`evaluate`))return`callee of method named "page.evaluate"`}}function Vi(e){if(e.callee.type!==`MemberExpression`||e.callee.computed||e.callee.optional||g(e.callee)!==`executeScript`)return;let t=e.callee.object;if(!(t.type!==`MemberExpression`||t.computed||t.optional)&&g(t)===`scripting`&&!(t.object.type!==`Identifier`||!Ai.has(t.object.name)))return t.object.name}function Hi(e){let t=e.parent;if(t?.type!==`Property`||t.kind!==`init`||t.value!==e||Ri(t)!==`func`)return;let n=t.parent;if(n.type!==`ObjectExpression`)return;let r=n.parent;if(r.type!==`CallExpression`||r.arguments[0]!==n)return;let i=Vi(r);if(i!==void 0)return`property "func" passed to "${i}.scripting.executeScript"`}function Ui(e,t){for(let n of e.arguments)if(n===t)return!0;return!1}function Wi(e,t){if(t.size===0)return;let{parent:n}=e;if(!(n?.type!==`CallExpression`||!Ui(n,e))&&!(n.callee.type!==`Identifier`||!t.has(n.callee.name)))return`callee of function named ${JSON.stringify(n.callee.name)}`}function Gi(e,t){return t===null||!ji.has(t.type)?!1:t.type===`Property`||t.type===`MethodDefinition`?t.value===e:!0}function Ki(e){return e.replace(Pi,``).trim().toLowerCase()}function qi(e,t){let n=t;for(;;){let t=e.getCommentsBefore(n).at(-1);if(t!==void 0)return t.value;let{parent:r}=n;if(r===null||!Gi(n,r))return;n=r}}function Ji(e,t,n){if(n.length===0)return;let r=qi(e,t);if(r===void 0)return;let i=Ki(r);for(let e of n)if(i===e||i.startsWith(`${e} - `)||i.startsWith(`${e} -- `))return`follows comment ${JSON.stringify(e)}`}function Yi(e,t,n){return Ji(e,t,n.comments)??Wi(t,n.functions)??Bi(t)??Hi(t)}function Xi({parent:e}){return e!==null&&(e.type===`TSTypeReference`||e.type===`TSTypeQuery`)}function Zi(e,t){let n=e;for(;n!==null;){if(n===t)return!0;n=n.upper}return!1}function Qi(e,{resolved:t}){return t?.scope===void 0||!Zi(t.scope,e)}function $i(e){let t=[],n=[e];for(let r of n){ee(n,r);for(let n of r.references)Qi(e,n)&&t.push(n)}return t}function ea(e,t,n){let{identifier:r}=t,{name:i}=r,a=n.overrideGlobals.get(i);if(a!==void 0)return a===`off`?`off`:t.resolved!==null&&!e.isGlobalReference(r)?void 0:a;if(e.isGlobalReference(r))return`readonly`}function ta(e,t,n,r){let i=e.sourceCode.getScope(t);for(let t of $i(i)){let{identifier:i}=t;if(Xi(i))continue;let a=ea(e.sourceCode,t,r),o=n;if(a!==void 0&&a!==`off`){if(t.isReadOnly()||a===`writable`)continue;o=`${n} (global variable is not writable)`}e.report({data:{name:i.name,reason:o},messageId:`externallyScopedVariable`,node:i})}}function na(e,n,r){let i=e.visitorKeys[n.type]??[];for(let e of i){if(!t.isObject(n))break;let i=n[e];if(Array.isArray(i))for(let e of i)S(e)&&r.push(e);else S(i)&&r.push(i)}}function ra(e,t){if(e.type===`ClassDeclaration`||e.type===`ClassExpression`){e.superClass!==null&&t.push(e.superClass);for(let n of e.body.body)`computed`in n&&n.computed&&t.push(n.key)}}function ia(e,t,n){return e===t?!1:Mi.has(e.type)?!0:Ni.has(e.type)?(ra(e,n),!0):!1}function aa(e,t,n){let r=[t];for(let i of r)if(!ia(i,t,r)){if(i.type===`ThisExpression`){e.report({data:{reason:n},messageId:`thisExpression`,node:i});continue}if(i.type===`Super`){e.report({data:{reason:n},messageId:`super`,node:i});continue}na(e.sourceCode,i,r)}}function oa(e,t,n,r,i){i.has(t)||(i.add(t),ta(e,t,n,r),aa(e,t,n))}const sa=b(`isolated-functions`,`general`,{create(e){let t=Ii(e.options[0]),n=new WeakSet;function r(r){if(!Li(r))return;let i=Yi(e.sourceCode,r,t);i!==void 0&&oa(e,r,i,t,n)}let i={ArrowFunctionExpression:r,FunctionDeclaration:r,FunctionExpression:r};for(let r of t.selectors){let a=`matches selector ${JSON.stringify(r)}`;Object.assign(i,{[r]:r=>{Li(r)&&oa(e,r,a,t,n)}})}return i},meta:{docs:{description:`Prevent usage of variables from outside the scope of isolated functions.`,recommended:!0},messages:{externallyScopedVariable:`Variable {{name}} not defined in scope of isolated function. Function is isolated because: {{reason}}.`,super:"Unexpected `super` in isolated function. Function is isolated because: {{reason}}.",thisExpression:"Unexpected `this` in isolated function. Function is isolated because: {{reason}}."},schema:[{additionalProperties:!1,properties:{comments:{description:`Comment patterns that mark a function as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0},functions:{description:`Function names that mark argument callbacks as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0},overrideGlobals:{additionalProperties:{anyOf:[{type:`boolean`},{enum:[`off`,`readonly`,`writable`,`writeable`],type:`string`}]},description:`Override which global variables are allowed inside isolated scopes.`,type:`object`},selectors:{description:`AST selectors that mark matched function nodes as isolated.`,items:{type:`string`},type:`array`,uniqueItems:!0}},type:`object`}],type:`problem`}}),ca=/^set[A-Z]/u;function N({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`&&e.property.type===`Identifier`)return e.property.name}function la(e){return ca.test(e)}function ua(e){let[t]=e.arguments;return t?.type===`ArrowFunctionExpression`||t?.type===`FunctionExpression`?t:void 0}function da(e,t){let n=[e];for(let e of n)t(e),pa(e,n)}function fa(e,t){let n=[e];for(let e of n){t(e);for(let t of Object.values(e))ga(t,e,n)}}function pa(e,t){for(let[n,r]of Object.entries(e))ie(n)||ma(r,e,t)}function ma(e,t,n){if(e!=null&&e!==t.parent){if(Array.isArray(e)){ha(e,t,n);return}S(e)&&n.push(e)}}function ha(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];i!==t.parent&&S(i)&&n.push(i)}}function ga(e,t,n){if(Array.isArray(e)){for(let r of e)ga(r,t,n);return}e===t.parent||!S(e)||n.push(e)}function _a({key:e}){if(e.type===`Identifier`)return e.name;if(e.type===`Literal`&&t.isString(e.value))return e.value}function va({value:e}){if(e.type===`Identifier`)return e;if(e.type===`AssignmentPattern`&&e.left.type===`Identifier`)return e.left}function ya(e){let t=0;return da(e,e=>{e.type===`CallExpression`&&e.callee.type===`Identifier`&&la(e.callee.name)&&(t+=1)}),t}function ba(e,t,n,r,i){if(t===void 0)return 0;if(t.type===`SpreadElement`)return 3;let a=m(t);return a.type===`ArrayExpression`?a.elements.length===0?1:i(e,a,n,r)?2:3:3}const xa=new Set([`catch`,`finally`,`then`]);function Sa(e){let t=new Set;for(let n of e.body)n.type!==`MethodDefinition`||n.kind!==`method`||!n.value.async||n.key.type===`Identifier`&&t.add(n.key.name);return t}function Ca(e){return e.callee.type!==`MemberExpression`||e.callee.property.type!==`Identifier`?!1:xa.has(e.callee.property.name)}function wa({callee:e}){let t=m(e);return k(t)&&t.async}function Ta({callee:e},t){if(e.type===`MemberExpression`&&e.object.type===`ThisExpression`&&e.property.type===`Identifier`)return t.has(e.property.name)?e.property.name:void 0}function Ea(e){let{parent:t}=e;return t?.type!==`AssignmentExpression`||t.right!==e?!1:t.left.type===`MemberExpression`&&t.left.object.type===`ThisExpression`}function Da(e){let{parent:t}=e;if(t?.type===`VariableDeclarator`&&t.init===e)return t.id.type===`Identifier`?t.id.name:void 0}function Oa(e){return!k(e)||e.parent.type===`ParenthesizedExpression`&&e.parent.parent.type===`CallExpression`&&e.parent.parent.callee===e.parent?!1:e.parent.type!==`CallExpression`||e.parent.callee!==e}function ka(e,t){let n=e;for(;n!==t;){let{parent:e}=n;if(e===null)return!1;if(Oa(e))return!0;n=e}return!1}function Aa(e,t){let n=Ta(e,t);if(n===void 0||Ea(e))return;if(e.parent.type===`ExpressionStatement`)return{data:{methodName:n},messageId:`unhandledAsyncCall`,node:e};let r=Da(e);if(r!==void 0)return{data:{variableName:r},messageId:`orphanedPromise`,node:e}}function ja(e,t){let n=[],r=0;function i(i){if(i!==e&&ka(i,e))return;if(i.type===`AwaitExpression`){n[r++]={messageId:`awaitInConstructor`,node:i};return}if(i.type!==`CallExpression`)return;Ca(i)&&(n[r++]={messageId:`promiseChainInConstructor`,node:i}),wa(i)&&(n[r++]={messageId:`asyncIifeInConstructor`,node:i});let a=Aa(i,t);a!==void 0&&(n[r++]=a)}return fa(e,i),n}const Ma=b(`no-async-constructor`,`general`,{create(e){function t(t){e.report({data:t.data,messageId:t.messageId,node:t.node})}return{"MethodDefinition[kind='constructor']"(e){if(e.value.type!==`FunctionExpression`||e.value.body?.type!==`BlockStatement`||e.parent.type!==`ClassBody`)return;let n=Sa(e.parent),r=e.value.body,i=ja(r,n);for(let e of i)t(e)}}},meta:{docs:{description:`Disallow asynchronous operations inside class constructors. Constructors return immediately, so async work causes race conditions, unhandled rejections, and incomplete object states.`},messages:{asyncIifeInConstructor:`Refactor this asynchronous operation outside of the constructor. Async IIFEs create unhandled promises and incomplete object state.`,awaitInConstructor:`Refactor this asynchronous operation outside of the constructor. Using 'await' in a constructor causes the class to be instantiated before the async operation completes.`,orphanedPromise:`Refactor this asynchronous operation outside of the constructor. Promise assigned to '{{variableName}}' is never consumed - errors will be silently swallowed.`,promiseChainInConstructor:`Refactor this asynchronous operation outside of the constructor. Promise chains (.then/.catch/.finally) in constructors lead to race conditions.`,unhandledAsyncCall:`Refactor this asynchronous operation outside of the constructor. Calling async method '{{methodName}}' without handling its result creates uncontrolled async behavior.`},schema:[],type:`problem`}});function Na(e,t){let n=e.scan(t);return n===0?0:1-(1-e.probability)**n}function Pa(e,t){let n=0;for(let r of e){let e=Na(r,t);n=1-(1-n)*(1-e)}return n}function Fa(e,t){return Pa(e,t)>=.9}function Ia(e,t){return t.some(t=>Fa(e,t))}function La(e){return{probability:e,scan(e){for(let t=0;t<e.length-1;t+=1){let n=e.charAt(t),r=e.charAt(t+1);if(n===n.toLowerCase()&&r===r.toUpperCase()&&r!==r.toLowerCase())return 1}return 0}}}const Ra=/\s+/gu;function za(e,t){if(t===``)return e.length+1;let n=0,r=0;for(;r<=e.length-t.length;){let i=e.indexOf(t,r);if(i===-1)break;n+=1,r=i+t.length}return n}function Ba(e,n){let r=n.map(e=>t.isString(e)?{pattern:e,type:`string`}:{pattern:new RegExp(e.source,`gu`),type:`regexp`});return{probability:e,scan(e){let t=e.replace(Ra,``),n=0;for(let e of r){if(e.type===`string`){n+=za(t,e.pattern);continue}e.pattern.lastIndex=0;let r=t.match(e.pattern);r&&(n+=r.length)}return n}}}const Va=/\s/u;function Ha(e,t){let n=new Set(t);return{probability:e,scan(e){for(let t=e.length-1;t>=0;--t){let r=e.charAt(t);if(n.has(r))return 1;if(!Va.test(r)&&r!==`*`&&r!==`/`)return 0}return 0}}}const Ua=/[ \t(),{}]/u;function Wa(e,t){let n=new Set(t);return{probability:e,scan(e){let t=e.split(Ua),r=0;for(let e of t)n.has(e)&&(r+=1);return r}}}const Ga=`public.abstract.class.implements.extends.return.throw.private.protected.enum.continue.assert.boolean.this.instanceof.interface.static.void.super.true.case:.let.const.var.async.await.break.yield.typeof.import.export`.split(`.`),Ka=[`++`,`||`,`&&`,`===`,`?.`,`??`],qa=[`for(`,`if(`,`while(`,`catch(`,`switch(`,`try{`,`else{`,`this.`,`window.`,/;\s+\/\//u,`import '`,`import "`,`require(`],Ja=[`}`,`;`,`{`];function Ya(){return[Ha(.95,Ja),Wa(.7,Ka),Wa(.3,Ga),Ba(.95,qa),La(.5)]}const Xa=new Set([`BreakStatement`,`ContinueStatement`,`LabeledStatement`]),Za=new Map([[`.jsx`,`jsx`],[`.tsx`,`tsx`]]);function Qa(e){return Xa.has(e.type)}function $a(e){return{comments:e,value:e.map(({value:e})=>e).join(`
59
85
  `)}}const eo=Ya();function to(e,t,n){let r=e.loc.start.line,i=t.loc.start.line;if(r+1!==i)return!1;let a=n.getTokenAfter(e);return!a||a.loc.start.line>i}function no(e,t){let n=[],r=0,i=[],a=0;for(let o of e)if(o.type===`Block`)a>0&&(n[r++]=$a(i),i=[],a=0),n[r++]=$a([o]);else if(a===0)i[a++]=o;else{let e=i.at(-1);e&&to(e,o,t)?i[a++]=o:(n[r++]=$a(i),i=[o],a=1)}return a>0&&(n[r]=$a(i)),n}const ro=/\{/gu,io=/\}/gu;function ao(e){let t=(e.match(ro)??[]).length-(e.match(io)??[]).length;return t>0?e+`}`.repeat(t):t<0?`{`.repeat(-t)+e:e}function oo(e){return Ia(eo,e.split(`
60
86
  `))}function so(e){return e.type!==`ReturnStatement`&&e.type!==`ThrowStatement`?!1:e.argument?.type===`Identifier`}function co(e){return e.type===`UnaryExpression`&&(e.operator===`-`||e.operator===`+`)}function lo(e){return e.type===`Literal`&&(t.isString(e.value)||t.isNumber(e.value))}function uo(e){return t.isObject(e)&&t.isString(e.type)}function fo(e){let t=[],n=0;for(let r of e)uo(r)&&(t[n++]=r);return t}function po(e,t){if(e.type!==`ExpressionStatement`)return!1;let{expression:n}=e;return n.type===`Identifier`||n.type===`SequenceExpression`||co(n)||lo(n)||!t.trimEnd().endsWith(`;`)}function mo(e,t){if(e.length!==1)return!1;let n=e.at(0);return n?Qa(n)||so(n)||po(n,t):!1}const ho=[/'return' statement is only valid inside a function/u];function go(e){for(let t of e){let e=!1;for(let n of ho)if(n.test(t.message)){e=!0;break}if(!e)return!1}return!0}function _o(e){return(e.diagnostics.length===0||go(e.diagnostics))&&e.program.body.length>0}function vo(e,t){let n=i.extname(t),r=Za.get(n)??`js`,o=a(e,{lang:r,sourceType:`module`});if(_o(o))return o;if(n!==`.tsx`&&n!==`.jsx`){let t=a(e,{lang:`tsx`,sourceType:`module`});if(_o(t))return t}}function yo(e,t){if(!oo(e))return!1;let n=vo(e,t);return n?!mo(fo(n.program.body),e):!1}function bo(e){let t=1;for(let n of e)n===`
61
- `&&(t+=1);return t}const xo=y(`no-commented-code`,`general`,{create(e){let{maxLines:t=0}=e.options[0]??{};return{"Program:exit"(){let n=no(e.sourceCode.getAllComments(),e.sourceCode);for(let r of n){let n=r.value.trim();if(n===`}`||bo(r.value)<=t||!yo(ao(n),e.filename))continue;let i=r.comments.at(0),a=r.comments.at(-1);!i||!a||e.report({loc:{end:a.loc.end,start:i.loc.start},messageId:`commentedCode`,suggest:[{desc:`Remove this commented out code`,fix(e){return e.removeRange([i.range[0],a.range[1]])}}]})}}}},meta:{docs:{description:`Disallow commented-out code`,recommended:!1},hasSuggestions:!0,messages:{commentedCode:`Commented-out code creates confusion about intent and clutters the codebase. Version control preserves history, making dead code comments unnecessary. Delete the commented code entirely. If needed later, retrieve it from git history.`},schema:[{additionalProperties:!1,properties:{maxLines:{default:0,description:`Maximum number of lines of commented code allowed without reporting. Default 0 means any commented code triggers an error.`,type:`number`}},type:`object`}],type:`suggestion`}}),So={constant:!1},Co={constant:!1};function P(e){return{constant:!0,value:e}}function wo(e){return{constant:!0,value:e}}function To(e){let t=new Set;if(!e?.loopExitCalls)return t;for(let n of e.loopExitCalls)Ti(n)&&t.add(n);return t}function Eo(e){let t=m(e);if(t.type===`Identifier`)return t.name;if(t.type!==`MemberExpression`)return;let n=Eo(t.object);if(n===void 0||n.length===0)return;let r=g(t);if(r!==void 0&&r.length!==0)return`${n}.${r}`}function Do(e,t){if(t.size===0)return!1;let n=Eo(e.callee);return n===void 0||n.length===0?!1:t.has(n)}function Oo(e,t){for(let n of e.elements)n!==null&&t.push(n.type===`SpreadElement`?n.argument:n)}function ko(e,t){for(let n of e)t.push(n.type===`SpreadElement`?n.argument:n)}function Ao(e,t){switch(e.type){case`ArrayExpression`:Oo(e,t);break;case`AssignmentExpression`:t.push(e.right);break;case`AwaitExpression`:case`UnaryExpression`:case`UpdateExpression`:t.push(e.argument);break;case`BinaryExpression`:e.left.type!==`PrivateIdentifier`&&t.push(e.left),t.push(e.right);break;case`CallExpression`:case`NewExpression`:t.push(e.callee),ko(e.arguments,t);break;case`ConditionalExpression`:t.push(e.test,e.consequent,e.alternate);break;case`LogicalExpression`:t.push(e.left,e.right);break;case`MemberExpression`:t.push(e.object),e.computed&&t.push(e.property);break;case`SequenceExpression`:case`TemplateLiteral`:for(let n of e.expressions)t.push(n);break;case`TaggedTemplateExpression`:t.push(e.tag);for(let n of e.quasi.expressions)t.push(n);break;case`YieldExpression`:e.argument&&t.push(e.argument)}}function F(e,t){if(t.size===0)return!1;let n=[e],r=0;for(;r<n.length;){let e=n[r++];if(e===void 0)continue;let i=m(e);if(i.type===`CallExpression`&&Do(i,t))return!0;Ao(i,n)}return!1}function jo(e){let t=m(e);for(;t.type===`SequenceExpression`;){let e=t.expressions.at(-1);if(!e)return So;t=m(e)}switch(t.type){case`ArrayExpression`:return P([]);case`ArrowFunctionExpression`:case`ClassExpression`:case`FunctionExpression`:return P(!0);case`Identifier`:return t.name===`undefined`?P(void 0):t.name===`NaN`?P(NaN):t.name===`Infinity`?P(1/0):So;case`Literal`:return P(t.value);case`LogicalExpression`:return Mo(t);case`ObjectExpression`:return P({});case`TemplateLiteral`:return t.expressions.length>0?So:t.quasis.length===0?P(``):P(t.quasis[0]?.value.cooked??``);case`UnaryExpression`:return No(t);default:return So}}function Mo(e){let t=jo(e.left);return t.constant?e.operator===`&&`?t.value===!0?jo(e.right):P(t.value):e.operator===`||`?t.value===!0?P(t.value):jo(e.right):t.value===void 0?jo(e.right):P(t.value):So}function No(e){if(e.operator===`typeof`)return P(`string`);if(e.operator===`void`)return P(void 0);let n=jo(e.argument);return n.constant?e.operator===`!`?P(!n.value):e.operator===`+`&&t.isNumber(n.value)?P(n.value):e.operator===`-`&&t.isNumber(n.value)?P(-n.value):e.operator===`~`&&t.isNumber(n.value)?P(~n.value):So:So}function I(e){let t=m(e);for(;t.type===`SequenceExpression`;){let e=t.expressions.at(-1);if(!e)return Co;t=m(e)}if(t.type===`ConditionalExpression`)return Po(t);if(t.type===`LogicalExpression`)return Fo(t);let n=jo(t);return n.constant?wo(!!n.value):Co}function Po(e){let t=I(e.test);if(t.constant)return I(t.value===!0?e.consequent:e.alternate);let n=I(e.consequent),r=I(e.alternate);return n.constant&&r.constant&&n.value===r.value?n:Co}function Fo(e){let t=I(e.left);if(!t.constant)return Co;if(e.operator===`&&`)return t.value?I(e.right):wo(!1);if(e.operator===`||`)return t.value===!0?wo(!0):I(e.right);let n=jo(e.left);return n.constant?n.value===void 0?I(e.right):wo(!!n.value):Co}const Io=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function Lo(e){return Io.has(e.type)}function Ro(e,t){let n=t;for(;n!==null;){if(n.type===`LabeledStatement`&&n.label.name===e)return n.body;if(n.type===`Program`)return;n=n.parent}}function zo(e,t){if(e.label)return Ro(e.label.name,e.parent)===t;let n=e.parent;for(;n!==null;){if(n.type===`Program`||k(n)||n.type===`SwitchStatement`)return!1;if(Lo(n))return n===t;n=n.parent}return!1}function Bo(e,t){return e?e.type===`VariableDeclaration`?e.declarations.some(e=>e.init?F(e.init,t):!1):F(e,t):!1}function Vo(e,t){switch(e.type){case`DoWhileStatement`:case`WhileStatement`:return F(e.test,t);case`ForInStatement`:case`ForOfStatement`:return F(e.right,t);case`ForStatement`:return!!(Bo(e.init,t)||e.test&&F(e.test,t)||e.update&&F(e.update,t));default:return!1}}function L(e,t,n){let r=e;for(;r.type===`LabeledStatement`;)r=r.body;switch(r.type){case`BlockStatement`:return r.body.some(e=>L(e,t,n));case`BreakStatement`:return zo(r,t);case`DoWhileStatement`:case`WhileStatement`:return Ho(r,t,n);case`ExpressionStatement`:return F(r.expression,n);case`ForInStatement`:case`ForOfStatement`:return Uo(r,t,n);case`ForStatement`:return Wo(r,t,n);case`IfStatement`:return Go(r,t,n);case`ReturnStatement`:return!0;case`SwitchStatement`:return r.cases.some(e=>e.consequent.some(e=>L(e,t,n)));case`TryStatement`:return Ko(r,t,n);case`VariableDeclaration`:return r.declarations.some(e=>e.init?F(e.init,n):!1);case`WithStatement`:return qo(r,t,n);default:return!1}}function Ho(e,t,n){return F(e.test,n)?!0:L(e.body,t,n)}function Uo(e,t,n){return F(e.right,n)?!0:L(e.body,t,n)}function Wo(e,t,n){return Bo(e.init,n)||e.test&&F(e.test,n)||e.update&&F(e.update,n)?!0:L(e.body,t,n)}function Go(e,t,n){return L(e.consequent,t,n)?!0:e.alternate?L(e.alternate,t,n):!1}function Ko(e,t,n){return!!(L(e.block,t,n)||e.handler&&L(e.handler.body,t,n)||e.finalizer&&L(e.finalizer,t,n))}function qo(e,t,n){return F(e.object,n)?!0:L(e.body,t,n)}function Jo(e,t,n){return e.constant?!e.value||!Vo(t,n)&&!L(t.body,t,n):!1}const Yo=y(`no-constant-condition-with-break`,`general`,{create(e){let n=e.options?.[0],r=To(t.isObject(n)?n:void 0);function i(t){I(t).constant&&e.report({messageId:`unexpected`,node:t})}function a(t,n){Jo(I(n),t,r)&&e.report({messageId:`unexpected`,node:n})}return{ConditionalExpression(e){i(e.test)},DoWhileStatement(e){a(e,e.test)},ForStatement(e){e.test&&a(e,e.test)},IfStatement(e){i(e.test)},WhileStatement(e){a(e,e.test)}}},meta:{docs:{description:`Disallow constant conditions, but allow constant loops that include loop exits such as break, return, or configured calls.`},messages:{unexpected:`Unexpected constant condition.`},schema:[{additionalProperties:!1,properties:{loopExitCalls:{description:`Call expressions that count as intentional loop exits inside constant loops.`,items:{minLength:1,type:`string`},type:`array`}},type:`object`}],type:`problem`}}),Xo=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function Zo(e){let t=e;for(;t.type===`BlockStatement`;){let e=t.body.at(-1);if(e===void 0)return!1;t=e}return t.type===`BreakStatement`||t.type===`ContinueStatement`||t.type===`ReturnStatement`||t.type===`ThrowStatement`}function Qo(e){let t=e;for(;t.parent!==null;){if(t.type===`ArrowFunctionExpression`||t.type===`FunctionDeclaration`||t.type===`FunctionExpression`)return t;t=t.parent}return t}function $o(e,t){if(t.type===`IfStatement`){if(t.consequent===e)return{arm:`then`,complete:t.alternate!==null||Zo(t.consequent),control:t};if(t.alternate===e)return{arm:`else`,complete:!0,control:t}}else if(t.type===`ConditionalExpression`){if(t.consequent===e)return{arm:`then`,complete:!0,control:t};if(t.alternate===e)return{arm:`else`,complete:!0,control:t}}}function es(e,t){if(t.type!==`BlockStatement`&&t.type!==`SwitchCase`)return[];let n=t.type===`BlockStatement`?t.body:t.consequent,r=n.indexOf(e);if(r<=0)return[];let i=[];for(let e of n.slice(0,r))e.type===`IfStatement`&&e.alternate===null&&Zo(e.consequent)&&i.push({arm:`else`,complete:!0,control:e});return i}function ts(e,t){let n=$o(e,t);if(n!==void 0)return n;if(t.type===`LogicalExpression`&&t.right===e)return{arm:`right`,complete:!1,control:t};if(Xo.has(t.type)&&`body`in t&&t.body===e)return{arm:`body`,complete:!1,control:t};if(e.type===`SwitchCase`&&t.type===`SwitchStatement`)return{arm:`case:${e.range[0]}`,complete:!1,control:t};if(t.type===`TryStatement`){if(t.block===e)return{arm:`try`,complete:!1,control:t};if(t.handler===e)return{arm:`catch`,complete:!1,control:t}}}function ns(e,t){let n=[],r=e;for(;r!==t&&r.parent!==null;){let e=ts(r,r.parent);e!==void 0&&n.push(e);for(let e of es(r,r.parent))n.push(e);r=r.parent}return n}function rs(e,t){return e.find(e=>e.control===t)?.arm}function is(e,t){for(let n of e){let e=rs(t,n.control);if(e!==void 0&&e!==n.arm)return!1}return!0}function as(e,t){let{parent:n}=e.node;return n.type===`AssignmentExpression`?n.operator!==`=`||t.some(e=>e.isRead&&vs(n.right,e.node)):!1}function os(e,t){if(t.length!==e.length)return;let n;for(let r of e)if(rs(t,r.control)!==r.arm){if(n!==void 0)return;n=r.control}if(n!==void 0&&rs(t,n)!==void 0)return e.filter(e=>e.control!==n)}function ss(e){for(let[t,n]of e.entries())for(let[r,i]of e.entries()){if(r<=t)continue;let e=os(n,i);if(e!==void 0)return{leftIndex:t,merged:e,rightIndex:r}}}function cs(e){let t=ss(e);return t!==void 0&&(e[t.leftIndex]=t.merged,e.splice(t.rightIndex,1),t.merged.length===0||cs(e))}function ls(e,t,n){let r=e.filter(e=>rs(t,e.control)===void 0);if(r.length===0)return!0;if(r.some(e=>!e.complete))return!1;function i(e){return rs(t,e.control)}return!r.some(e=>{let t=i(e);return t!==void 0&&t!==e.arm})&&(n.push(r),cs(n))}function us(e,t){return e.isRead&&!e.isWrite||e.isWrite&&as(e,t)}function ds(e){let t=[],n=e.parent;for(;n!==null;){if(Xo.has(n.type))t.push(n);else if(n.type===`Program`||n.type===`ArrowFunctionExpression`||n.type===`FunctionDeclaration`||n.type===`FunctionExpression`)break;n=n.parent}return t}function fs(e,t){let n=ds(e.node),r=t.node.parent;for(;r!==null;){for(let e of n)if(e===r)return!0;if(r.type===`Program`||r.type===`ArrowFunctionExpression`||r.type===`FunctionDeclaration`||r.type===`FunctionExpression`)break;r=r.parent}return!1}function ps(e,t,n){return e.isRead&&!e.isWrite&&Qo(e.node)===n&&fs(t,e)}function ms(e,t,n,r,i,a){if(e.node.range[0]<=t.node.range[0])return e.node.range[0]<t.node.range[0]&&ps(e,t,n)?!0:void 0;if(Qo(e.node)!==n)return;let o=ns(e.node,n);if(is(r,o))return us(e,a)?!0:e.isWrite&&ls(o,r,i)?!1:void 0;if(ps(e,t,n))return!0}function hs(e,t){let n=Qo(e.node),r=ns(e.node,n),i=[];for(let a of t){let o=ms(a,e,n,r,i,t);if(o===!0)return!0;if(o===!1)return!1}return!1}function gs(e){return e.type===`Literal`?e.value===null||e.value===!1||e.value===!0||e.value===``||e.value===-1||e.value===0||e.value===1:e.type===`Identifier`?e.name===`undefined`:e.type===`ArrayExpression`?e.elements.length===0:e.type===`ObjectExpression`?e.properties.length===0:e.type===`UnaryExpression`?e.operator===`void`||gs(e.argument):!1}function _s(e){let t=e;for(;t.parent!==null&&t.parent.type!==`VariableDeclarator`;){if(t.parent.type===`ObjectPattern`&&t.parent.properties.some(e=>e.type===`RestElement`))return!0;t=t.parent}return!1}function vs(e,t){return e.range[0]<=t.range[0]&&e.range[1]>=t.range[1]}function ys(e,t){let n=e.node;for(;n.parent!==null;){let e=n.parent;if(e.type===`TryStatement`&&e.block===n&&[e.handler?.body,e.finalizer].filter(e=>e!=null).some(e=>t.references.some(t=>t.isRead()&&vs(e,t.identifier))))return!0;n=e}return!1}function bs(e,t){if(!e.isWrite||t.scope.block.type===`Program`||t.name.startsWith(`_`))return!1;let{parent:n}=e.node;return n.type===`AssignmentPattern`||n.type===`UpdateExpression`||n.type===`AssignmentExpression`&&n.right.type===`Literal`&&n.right.value===null||_s(e.node)||e.init&&e.writeExpression!==void 0&&gs(e.writeExpression)?!1:!ys(e,t)}function xs(e){let t=new Set(e.references.map(e=>Qo(e.identifier)));for(let n of e.defs)t.add(Qo(n.name));return e.references.some(e=>e.isRead())&&t.size>1}function Ss(e){let t=e.references.map(e=>({init:e.init,isRead:e.isRead(),isWrite:e.isWrite(),node:e.identifier,writeExpression:e.writeExpr??void 0}));for(let n of e.defs)n.type!==`Variable`||n.node.type!==`VariableDeclarator`||n.node.init===null||t.some(e=>e.node.range[0]===n.name.range[0])||t.push({init:!0,isRead:!1,isWrite:!0,node:n.name,writeExpression:n.node.init});return t.toSorted((e,t)=>e.node.range[0]-t.node.range[0])}const Cs=y(`no-dead-store`,`general`,{create(e){return{Program(){te(e.sourceCode,t=>{if(xs(t))return;let n=Ss(t);for(let r of n)!bs(r,t)||hs(r,n)||e.report({data:{name:t.name},messageId:`deadStore`,node:r.node})})}}},meta:{docs:{description:`Disallow assignments whose value is never read.`},messages:{deadStore:`The value assigned to "{{name}}" is never read.`},schema:[],type:`problem`}});function ws(e){let t=`CallExpression[callee.type="Identifier"][callee.name="${e.name}"]`;return y(e.ruleName,e.category,{create(n){return{[t](t){n.report({messageId:e.messageId,node:t})}}},meta:{docs:{description:`Use ${e.alternative} instead of ${e.name}().`},messages:{[e.messageId]:e.message.replaceAll(`{{name}}`,e.name).replaceAll(`{{alternative}}`,e.alternative)},schema:[],type:`problem`}})}const Ts=ws({name:`error`,alternative:`throw`,category:`general`,message:`Replace {{name}}(...) with {{alternative}}.`,messageId:`noError`,ruleName:`no-error`}),Es=y(`no-filter-map-chain`,`general`,{create(e){return{CallExpression(t){let n=m(t.callee);if(n.type!==`MemberExpression`||g(n)!==`map`)return;let r=m(n.object);if(r.type!==`CallExpression`)return;let i=m(r.callee);i.type===`MemberExpression`&&g(i)===`filter`&&e.report({messageId:`avoidFilterMapChain`,node:t})}}},meta:{docs:{description:`Disallow map(...) directly after filter(...).`},messages:{avoidFilterMapChain:`Do not chain map(...) directly after filter(...). Combine both operations in a single loop.`},schema:[],type:`suggestion`}}),Ds=/e/iu,Os=new Set([`!=`,`!==`,`==`,`===`]),ks=new Set([`%`,`*`,`**`,`+`,`-`]),As=new Set([`deepStrictEqual`,`notDeepStrictEqual`,`notStrictEqual`,`strictEqual`]),js=new Set([`toBe`,`toEqual`,`toStrictEqual`]),Ms=new Set([`@jest/globals`,`bun:test`,`vitest`]),Ns=new Set([`assert`,`assert/strict`,`node:assert`,`node:assert/strict`]);function Ps(e){let t=e.replaceAll(`_`,``).toLowerCase(),n=t.indexOf(`e`),r=n===-1?t:t.slice(0,n),i=n===-1?0:Number(t.slice(n+1)),a=r.indexOf(`.`),o=a===-1?0:r.length-a-1,s=r.replace(`.`,``),c=o-i,l=BigInt(s);if(l===0n||c<=0)return!0;let u=10n**BigInt(c);for(;l%5n==0n;)l/=5n,u/=5n;return u%5n!=0n}function Fs(e){if(e.type===`Literal`&&t.isNumber(e.value))return e.value;if(e.type!==`UnaryExpression`||e.operator!==`+`&&e.operator!==`-`)return;let n=e.argument.type===`Literal`?e.argument.value:void 0;if(t.isNumber(n))return e.operator===`-`?-n:n}function Is(e){let t=Fs(e);if(t!==void 0)return t;if(e.type!==`BinaryExpression`||e.left.type===`PrivateIdentifier`)return;let n=Is(e.left),r=Is(e.right);if(n!==void 0&&r!==void 0){if(e.operator===`+`)return n+r;if(e.operator===`-`)return n-r;if(e.operator===`*`)return n*r;if(e.operator===`/`)return r===0?void 0:n/r;if(e.operator===`%`)return r===0?void 0:n%r;if(e.operator===`**`)return n**r}}function Ls(e){let t=Fs(e.left),n=Fs(e.right);if(t===void 0||n===void 0||n===0||!Number.isSafeInteger(t)||!Number.isSafeInteger(n))return!1;let r=Math.abs(n);for(;r%2==0;)r/=2;return Math.abs(t)%r!==0}function Rs(e){let[t]=e.defs;if(t?.type===`Variable`&&t.node.type===`VariableDeclarator`&&t.node.init!==null&&t.parent?.type===`VariableDeclaration`&&t.parent.kind===`const`)return t.node.init}function zs(e,t,n){let r=Is(e);return r!==void 0&&Number.isSafeInteger(r)?!1:e.operator===`/`?Ls(e)||Vs(e.left,t,n)||Vs(e.right,t,n):ks.has(e.operator)&&(Vs(e.left,t,n)||Vs(e.right,t,n))}function Bs(e,t,n){let r=e;for(;;){let e=m(r);if(e!==r){r=e;continue}if(r.type!==`Identifier`)return r;let i=t.get(r);if(i===void 0||n.has(i))return;let a=Rs(i);if(a===void 0)return;n.add(i),r=a}}function Vs(e,n,r){let i=Bs(e,n,r);if(i===void 0)return!1;if(i.type===`Literal`&&t.isNumber(i.value)){let e=String(i.raw);return(e.includes(`.`)||Ds.test(e))&&!Ps(e)}return i.type===`UnaryExpression`?(i.operator===`+`||i.operator===`-`)&&Vs(i.argument,n,r):i.type===`BinaryExpression`&&Ys(i)&&zs(i,n,r)}function Hs(e){let t=new Map;return te(e,e=>{for(let n of e.references)t.set(n.identifier,e)}),t}function Us(e){return e.imported.type===`Identifier`?e.imported.name:e.imported.value}function Ws(e,t,n){let{name:r}=n.local;Ms.has(t)&&n.type===`ImportSpecifier`&&Us(n)===`expect`&&e.set(r,`expect`),Ns.has(t)&&(n.type===`ImportDefaultSpecifier`||n.type===`ImportNamespaceSpecifier`?e.set(r,`assert`):As.has(Us(n))&&e.set(r,`function`))}function Gs(e){let n=new Map;for(let r of e.body){if(r.type!==`ImportDeclaration`||!t.isString(r.source.value))continue;let e=r.source.value;for(let t of r.specifiers)Ws(n,e,t)}return n}function Ks(e,t){let n=e.arguments[t];return n===void 0||n.type===`SpreadElement`?void 0:n}function qs(e,t){if(e.callee.type===`Identifier`&&t.get(e.callee.name)===`function`){let t=Ks(e,0),n=Ks(e,1);return t===void 0||n===void 0?void 0:[t,n]}if(e.callee.type!==`MemberExpression`)return;let n=g(e.callee);if(n!==void 0&&As.has(n)&&e.callee.object.type===`Identifier`&&t.get(e.callee.object.name)===`assert`){let t=Ks(e,0),n=Ks(e,1);return t===void 0||n===void 0?void 0:[t,n]}if(n===void 0||!js.has(n))return;let r=e.callee.object;if(r.type===`MemberExpression`&&g(r)===`not`&&(r=r.object),r.type!==`CallExpression`||r.callee.type!==`Identifier`||t.get(r.callee.name)!==`expect`)return;let i=Ks(r,0),a=Ks(e,0);return i===void 0||a===void 0?void 0:[i,a]}function Js(e){let t=e.operator===`>`||e.operator===`>=`;return[{above:t,expression:e.left,threshold:e.right},{above:!t,expression:e.right,threshold:e.left}]}function Ys(e){return e.type===`BinaryExpression`&&e.left.type!==`PrivateIdentifier`}function Xs(e,t,n){return e.type===t.type&&n.getText(e).replaceAll(/\s+/gu,``)===n.getText(t).replaceAll(/\s+/gu,``)}function Zs(e,t){if(!(!Ys(e.left)||!Ys(e.right))&&!((e.operator!==`&&`||e.left.operator!==`<=`&&e.left.operator!==`>=`||e.right.operator!==`<=`&&e.right.operator!==`>=`)&&(e.operator!==`||`||e.left.operator!==`<`&&e.left.operator!==`>`||e.right.operator!==`<`&&e.right.operator!==`>`))){for(let n of Js(e.left))for(let r of Js(e.right))if(n.above!==r.above&&Xs(n.expression,r.expression,t)&&Xs(n.threshold,r.threshold,t))return[n.expression,n.threshold]}}const Qs=y(`no-floating-point-equality`,`general`,{create(e){return{Program(t){let n=Hs(e.sourceCode),r=Gs(t);function i(e){return Vs(e,n,new Set)}da(t,t=>{let n=!1;if(t.type===`BinaryExpression`&&Os.has(t.operator))n=t.left.type!==`PrivateIdentifier`&&(i(t.left)||i(t.right));else if(t.type===`LogicalExpression`){let r=Zs(t,e.sourceCode);n=r!==void 0&&(i(r[0])||i(r[1]))}else if(t.type===`SwitchCase`&&t.test!==null)n=i(t.test);else if(t.type===`CallExpression`){let e=qs(t,r);n=e!==void 0&&(i(e[0])||i(e[1]))}n&&e.report({messageId:`exactFloatComparison`,node:t})})}}},meta:{docs:{description:`Disallow exact comparisons involving inexact floating-point values.`},messages:{exactFloatComparison:`Compare floating-point results within a tolerance instead of for exact equality.`},schema:[],type:`problem`}}),$s=[`binding`];function ec(e){if(e.type===`Identifier`)return e.name;if(e.type===`AssignmentPattern`&&e.left.type===`Identifier`)return e.left.name}function tc({body:e},t){if(e.length!==1)return!1;let[n]=e;return n?.type!==`ReturnStatement`||n.argument?.type!==`Identifier`?!1:n.argument.name===t}function nc(e){if(e.params.length!==1)return;let[t]=e.params;return t===void 0?void 0:ec(t)}function rc(e){if(e.type===`ArrowFunctionExpression`){let t=nc(e);if(t===void 0)return!1;let{body:n}=e;switch(n.type){case`BlockStatement`:return tc(n,t);case`Identifier`:return n.name===t;default:return!1}}if(e.type===`FunctionExpression`){let t=nc(e);return t===void 0||e.body===null?!1:tc(e.body,t)}return!1}function ic(e){return N(e)===`joinBindings`}function ac(e){for(let t of e.defs){if(t.node.type!==`VariableDeclarator`)continue;let{init:e}=t.node;if(e?.type===`CallExpression`&&(N(e)===`useBinding`||ic(e)||e.callee.type===`MemberExpression`&&g(e.callee)===`map`))return!0}return!1}function oc(e,{object:t},n){if(t.type===`Identifier`){let r=t.name.toLowerCase();for(let e of n)if(r.includes(e.toLowerCase()))return!0;let i=_(e.getScope(t),t.name);if(i!==void 0&&ac(i))return!0}return t.type===`CallExpression`&&(t.callee.type===`MemberExpression`&&g(t.callee)===`map`||ic(t))}const sc=y(`no-identity-map`,`general`,{create(e){let{sourceCode:t}=e,[n]=e.options,r=n?.bindingPatterns??$s;return{CallExpression(n){let{callee:i}=n;if(i.type!==`MemberExpression`||i.computed||i.property.type!==`Identifier`||g(i)!==`map`||n.arguments.length!==1)return;let[a]=n.arguments;if(a===void 0||a.type===`SpreadElement`||!rc(a))return;let o=oc(t,i,r);e.report({fix(e){return e.replaceText(n,t.getText(i.object))},messageId:o?`identityBindingMap`:`identityArrayMap`,node:n})}}},meta:{docs:{description:"Disallow pointless identity `.map()` calls that return the parameter unchanged"},fixable:`code`,messages:{identityArrayMap:"Pointless identity `.map()` call on Array. Use `table.clone(array)` or `[...array]` instead.",identityBindingMap:"Pointless identity `.map()` call on Binding. Use the original binding directly."},schema:[{additionalProperties:!1,properties:{bindingPatterns:{default:[...$s],description:`Variable name patterns to recognize as Bindings (case insensitive)`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}});function cc(e){return typeof e!=`object`||!e?!1:`allowAutofix`in e?e.allowAutofix===void 0||typeof e.allowAutofix==`boolean`:!0}function lc(e){let{parent:t}=e;return t.type===`ExpressionStatement`||t.type===`ForStatement`&&t.update===e}const uc=y(`no-increment-decrement`,`general`,{create(e){let[t]=e.options,n=cc(t)&&t.allowAutofix,{sourceCode:r}=e;return{UpdateExpression(t){if(!lc(t))return;let i=r.getText(t.argument),a=t.operator===`++`?`noIncrement`:`noDecrement`;if(!n){e.report({messageId:a,node:t});return}let o=t.operator===`++`?`${i} += 1`:`${i} -= 1`;e.report({fix(e){return e.replaceText(t,o)},messageId:a,node:t})}}},meta:{docs:{description:"Disallow standalone `++` and `--` statements and for-loop update clauses.",recommended:!0},fixable:`code`,messages:{noDecrement:"Do not use standalone `--`. Use `-= 1` instead.",noIncrement:"Do not use standalone `++`. Use `+= 1` instead."},schema:[{additionalProperties:!1,properties:{allowAutofix:{default:!1,description:`Allow the fixer to replace standalone ++ and -- statements and for-loop updates.`,type:`boolean`}},type:`object`}],type:`suggestion`}}),dc=new Set([`add`,`clear`,`copyWithin`,`delete`,`fill`,`pop`,`push`,`reverse`,`set`,`shift`,`sort`,`splice`,`unshift`]),fc=new Set([`entries`,`keys`,`values`]),pc=new Set([`ArrowFunctionExpression`,`ClassDeclaration`,`ClassExpression`,`FunctionDeclaration`,`FunctionExpression`]);function mc(e){let t=e;for(;t!=null;){if(t.type===`Identifier`)return t.name;if(t.type!==`ParenthesizedExpression`&&t.type!==`TSAsExpression`&&t.type!==`TSNonNullExpression`&&t.type!==`TSSatisfiesExpression`&&t.type!==`TSTypeAssertion`)return;t=t.expression}}function hc(e){if(e.type===`ArrayPattern`)return mc(e.elements[0]??void 0)}function gc(e){if(e.left.type===`VariableDeclaration`){let[t]=e.left.declarations;return t?.id}return e.left}function _c(e){return e.left.type===`VariableDeclaration`&&e.left.kind===`const`}function vc(e){let t=m(e);if(t.type===`Identifier`)return{name:t.name,method:`direct`};if(t.type!==`CallExpression`||t.callee.type!==`MemberExpression`||t.arguments.length>0||t.callee.optional||t.callee.object.type!==`Identifier`)return;let n=g(t.callee);if(!(n===void 0||!fc.has(n)))return{name:t.callee.object.name,method:n}}function yc(e){let t=vc(e.right);if(t===void 0)return;if(!_c(e))return{addArgumentName:void 0,deleteArgumentName:void 0,iterableName:t.name,setKeyName:void 0};let n=gc(e);if(n===void 0)return;let r,i,a;return t.method===`entries`?(r=hc(n),i=r,a=r):t.method===`keys`?(i=mc(n),a=i):(r=mc(n),a=r??hc(n),i=hc(n)),{addArgumentName:r,deleteArgumentName:a,iterableName:t.name,setKeyName:i}}function bc(e,t){if(t===void 0)return!1;let[n]=e.arguments;return n!==void 0&&n.type!==`SpreadElement`&&mc(n)===t}function xc(e,t){for(let[n,r]of Object.entries(e))if(n!==`parent`&&n!==`range`&&n!==`loc`){if(Array.isArray(r))for(let e of r)x(e)&&t.push(e);else x(r)&&t.push(r)}}function Sc(e,t){let n=[],r=[e];for(let e of r)if(!pc.has(e.type)){if(e.type===`CallExpression`&&e.callee.type===`MemberExpression`){let r=g(e.callee),i=m(e.callee.object);r!==void 0&&dc.has(r)&&i.type===`Identifier`&&i.name===t&&n.push({call:e,method:r,property:e.callee.property})}xc(e,r)}return n}function Cc({call:e,method:t},n,r){return t===`delete`&&bc(e,n.deleteArgumentName)?!0:t===`add`&&bc(e,n.addArgumentName)||t===`set`&&bc(e,n.setKeyName)?!r.some(t=>t.call.range[0]<e.range[0]&&t.method===`delete`&&bc(t.call,n.deleteArgumentName)):!1}const wc=y(`no-loop-iterable-mutation`,`general`,{create(e){return{"ForOfStatement:exit"(t){if(t.await)return;let n=yc(t);if(n===void 0)return;let r=Sc(t.body,n.iterableName);for(let t of r)Cc(t,n,r)||e.report({data:{iterable:n.iterableName},messageId:`noLoopIterableMutation`,node:t.property})}}},meta:{docs:{description:`Disallow mutating a loop iterable during iteration.`,recommended:!0},messages:{noLoopIterableMutation:"Do not mutate `{{iterable}}` while iterating over it."},schema:[],type:`problem`}});function Tc(e,t){let n=t;for(;n;){if(n.set.has(e))return!0;n=n.upper}return!1}function Ec(e){let t=new Map,n=new Set;for(let n of e.keys())t.set(n,0);function r(i,a){t.set(i,1),a.push(i);let o=e.get(i)??[];for(let e of o){let i=t.get(e);if(i===1){let t=a.lastIndexOf(e);for(let e=t;e<a.length;e+=1){let t=a[e];t!==void 0&&n.add(t)}}else i===0&&r(e,a)}a.pop(),t.set(i,2)}for(let n of e.keys())t.get(n)===0&&r(n,[]);return n}const Dc=y(`no-recursive`,`general`,{create(e){let{sourceCode:t}=e,n=new Map,r=[],i=[],a=[],o=new Map;function s(e){r.push(e)}function c(){r.pop()}function l(){for(let e=r.length-1;e>=0;--e){let t=r[e];if(t!==void 0)return t}}function u(e){n.has(e)||n.set(e,new Set)}function d(){for(let e=a.length-1;e>=0;--e)if(a[e]!==void 0)return a[e]}return{ArrowFunctionExpression(){s(void 0)},"ArrowFunctionExpression:exit":c,CallExpression(e){let r=l();if(r===void 0)return;let a,s=!1;if(e.callee.type===`Identifier`?a=e.callee.name:e.callee.type===`MemberExpression`&&e.callee.object.type===`ThisExpression`&&e.callee.property.type===`Identifier`&&(a=e.callee.property.name,s=!0),a===void 0)return;let c=!1;if(s){let e=d();e!==void 0&&o.get(e)?.has(a)===!0&&(c=!0)}else{let n=t.getScope(e);c=Tc(a,n)}c&&(n.get(r)?.add(a),i.push({callee:a,caller:r,node:e}))},ClassDeclaration(e){let t=e.id?.name;t!==void 0&&!o.has(t)&&o.set(t,new Set),a.push(t)},"ClassDeclaration:exit"(){a.pop()},FunctionDeclaration(e){let t=e.id?.name;t!==void 0&&t.length>0&&u(t),s(t)},"FunctionDeclaration:exit":c,FunctionExpression(e){e.id&&u(e.id.name);let{parent:t}=e;t.type===`MethodDefinition`&&t.key.type===`Identifier`?s(t.key.name):s(void 0)},"FunctionExpression:exit":c,MethodDefinition(e){let t=d();t!==void 0&&e.key.type===`Identifier`&&(o.get(t)?.add(e.key.name),u(e.key.name))},"Program:exit"(){let t=Ec(n);if(t.size!==0)for(let n of i)t.has(n.caller)&&t.has(n.callee)&&e.report({messageId:`noRecursive`,node:n.node})},VariableDeclarator(e){e.id.type!==`Identifier`||e.init===null||e.init.type!==`FunctionExpression`&&e.init.type!==`ArrowFunctionExpression`||(u(e.id.name),s(e.id.name))},"VariableDeclarator:exit"(e){e.id.type!==`Identifier`||e.init===null||e.init.type!==`FunctionExpression`&&e.init.type!==`ArrowFunctionExpression`||c()}}},meta:{docs:{description:`Disallow recursive function calls to prevent stack overflow.`},messages:{noRecursive:`Recursion is not allowed (JPL Power of 10). Use iteration instead — a loop or explicit stack.`},schema:[{additionalProperties:!1,properties:{},type:`object`}]}}),Oc=s({"message?":`string | undefined`,object:`string`,properties:s(`string[]`).readonly()}).readonly(),kc=s({"allowFiles?":s(`string[]`).readonly().or(`undefined`),"checkComputed?":`boolean | undefined`,restrictions:Oc.array().readonly()}).readonly(),Ac={matchBase:!0},jc={dot:!0,magicalBraces:!0};function Mc(e){return e.replaceAll(`\\`,`/`)}function Nc(e){let t=Mc(e);if(!i.isAbsolute(e))return[t];let n=Mc(i.relative(o(),e));return n.length===0||n.startsWith(`..`)?[t]:[t,n]}function Pc(e,t){let n=new c(e,t),r=n.hasMagic();return{hasMagic:r,matches:r?e=>n.match(e):t=>t===e}}function Fc(e){let t=new Set,n=[],r=0;for(let i of e){let e=Pc(i,jc);e.hasMagic?n[r++]=e.matches:t.add(i)}return e=>t.has(e)||n.some(t=>t(e))}function Ic(e){return{matchesObject:Pc(e.object,jc).matches,matchesProperty:Fc(e.properties),message:e.message}}function Lc(e){let[t]=e.options;if(!kc.allows(t))return{checkComputed:!0,isAllowedFile:!1,restrictions:[]};let{allowFiles:n,checkComputed:r,restrictions:i}=t,a=Nc(e.filename),o=n?.some(e=>a.some(t=>l(t,e,Ac)))??!1;return{checkComputed:r??!0,isAllowedFile:o,restrictions:i.map(Ic)}}const Rc=y(`no-restricted-property-assignment`,`general`,{create(e){let{checkComputed:t,isAllowedFile:n,restrictions:r}=Lc(e);function i(i,a){if(n||!D(i)||!t&&i.computed||i.object.type!==`Identifier`)return;let o=g(i);if(o!==void 0){for(let t of r)if(t.matchesObject(i.object.name)&&t.matchesProperty(o)){t.message===void 0?e.report({data:{object:i.object.name,property:o},messageId:`restricted`,node:a}):e.report({data:{message:t.message},messageId:`restrictedCustom`,node:a});return}}}return{AssignmentExpression(e){i(e.left,e)},UpdateExpression(e){i(e.argument,e)}}},meta:{docs:{description:`Disallow assignment to restricted object properties.`,recommended:!0},messages:{restricted:`Assignment to '{{object}}.{{property}}' is not permitted.`,restrictedCustom:`{{message}}`},schema:[{additionalProperties:!1,properties:{allowFiles:{items:{type:`string`},type:`array`},checkComputed:{default:!0,type:`boolean`},restrictions:{items:{additionalProperties:!1,properties:{message:{type:`string`},object:{type:`string`},properties:{items:{type:`string`},minItems:1,type:`array`}},required:[`object`,`properties`],type:`object`},type:`array`}},required:[`restrictions`],type:`object`}],type:`problem`}});function zc(e){return e===!1||e===0||e===``||e==null||e===0n}function Bc(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(`null`,`object`)}const Vc=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`ClassExpression`,`FunctionExpression`,`NewExpression`,`ObjectExpression`]),Hc=new Set([`toBe`]),Uc=new Set([`toEqual`,`toStrictEqual`]),Wc=new Map([[`toBeDefined`,`defined`],[`toBeFalsy`,`falsy`],[`toBeNull`,`null`],[`toBeTruthy`,`truthy`],[`toBeUndefined`,`undefined`]]),Gc=new Set([`deepStrictEqual`,`notDeepStrictEqual`,`notStrictEqual`,`strictEqual`]),Kc=new Set([`deepEqual`,`equal`,`notDeepEqual`,`notEqual`]);function qc(e){return e.type===`Literal`&&`regex`in e||Vc.has(e.type)}function Jc(e){if(e.type===`Literal`){if(e.value===null)return{value:null};if(t.isString(e.value)||t.isNumber(e.value)||t.isBoolean(e.value)||t.isBigInt(e.value))return{value:e.value}}}function Yc(e){let t=e;for(;t.type===`ChainExpression`||t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSInstantiationExpression`||t.type===`TSNonNullExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`;)t=t.expression;return t}function Xc(e,n,r){if(n.operator===`void`)return{value:void 0};if(n.operator===`typeof`){let t=Qc(e,n.argument,r);return t===void 0?void 0:{value:Bc(t.value)}}let i=Qc(e,n.argument,r);if(i!==void 0){if(n.operator===`!`)return{value:zc(i.value)};if(t.isNumber(i.value)){if(n.operator===`+`)return{value:i.value};if(n.operator===`-`)return{value:-i.value}}}}function Zc(e,t,n){if(t.name===`undefined`)return{value:void 0};let[r]=_(e.getScope(t),t.name)?.defs??[];if(r?.type===`Variable`&&r.node.type===`VariableDeclarator`&&r.node.init!==null&&r.parent?.type===`VariableDeclaration`&&r.parent.kind===`const`)return Qc(e,r.node.init,n)}function Qc(e,t,n){let r=Yc(t);if(n.has(r))return;n.add(r);let i=Jc(r);if(i!==void 0)return i;if(r.type===`UnaryExpression`)return Xc(e,r,n);if(r.type===`Identifier`)return Zc(e,r,n)}function $c(e,t){return e===`truthy`?!zc(t):e===`falsy`?zc(t):e===`defined`?t!==void 0:e===`undefined`?t===void 0:t===null}function el(e){return e===`truthy`||e===`defined`}function tl(e,t,n){return Object.is(t,n)}function nl(e){return e.callee.type===`Identifier`&&e.callee.name===`expect`}function rl(e){if(e.callee.type!==`MemberExpression`)return;let t=e.callee.object;if(t.type===`MemberExpression`&&g(t)===`not`&&(t=t.object),!(t.type!==`CallExpression`||!nl(t)))return t}function il(e){if(e.callee.type!==`MemberExpression`)return!1;let{object:t}=e.callee;return t.type===`MemberExpression`&&g(t)===`not`}function al(e,t){let n=e.arguments[t];if(n!==void 0&&n.type!==`SpreadElement`)return Yc(n)}function ol(e,t,n,r){let i=Qc(e.sourceCode,t,new Set);if(i!==void 0&&$c(n,i.value)!==r){e.report({messageId:`issue`,node:t});return}qc(t)&&el(n)!==r&&e.report({messageId:`freshPredicate`,node:t})}function sl(e,t,n,r,i,a){if(r&&(qc(t)||qc(n))){e.report({data:{matcher:a},messageId:`freshIdentity`,node:qc(t)?t:n});return}let o=Qc(e.sourceCode,t,new Set),s=Qc(e.sourceCode,n,new Set);o!==void 0&&s!==void 0&&tl(r,o.value,s.value)!==i&&e.report({messageId:`issue`,node:t})}function cl(e,t){let n=rl(t);if(n===void 0||t.callee.type!==`MemberExpression`)return;let r=g(t.callee);if(r===void 0)return;let i=al(n,0);if(i===void 0)return;let a=il(t),o=Wc.get(r);if(o!==void 0){ol(e,i,o,a);return}let s=Hc.has(r);if(!s&&!Uc.has(r))return;let c=al(t,0);c!==void 0&&sl(e,i,c,s,a,a?`not.toEqual`:`toEqual`)}function ll(e,t){if(t.callee.type!==`MemberExpression`||t.callee.object.type!==`Identifier`||t.callee.object.name!==`assert`)return;let n=g(t.callee);if(n===void 0)return;let r=al(t,0);if(r===void 0)return;if(n===`ok`||n===`notOk`){let t=Qc(e.sourceCode,r,new Set),i=n===`ok`;t!==void 0&&!!t.value===i&&e.report({messageId:`issue`,node:r});return}let i=al(t,1);if(i===void 0)return;let a=Gc.has(n);if(!a&&!Kc.has(n))return;let o=n.startsWith(`not`);sl(e,r,i,a,o,o?`notDeepStrictEqual`:`deepStrictEqual`)}const ul=y(`no-trivial-assertions`,`general`,{create(e){return{CallExpression(t){if(rl(t)!==void 0){cl(e,t);return}ll(e,t)}}},meta:{docs:{description:`Disallow assertions that always succeed or compare against freshly created values.`,recommended:!0},messages:{freshIdentity:"Use `{{matcher}}` instead; freshly-created values are never identical to other values.",freshPredicate:`Replace this assertion; the value is freshly created here, so the result is independent of the code under test.`,issue:`Replace this assertion; it always succeeds.`},schema:[],type:`problem`}}),dl=/@(?:link|linkcode|linkplain|see)\s+\{?(?<identifier>\w+)/gu,fl=/\{@(?:link|linkcode|linkplain|see)\s+(?<identifier>\w+)/gu,pl=/[@{](?:type|typedef|param|returns?|template|augments|extends|implements)\s+(?<annotation>[^}]*)/gu,ml=/\b(?<identifier>\w+)\b/gu;function hl(e){return e.type===`ImportDefaultSpecifier`||e.type===`ImportNamespaceSpecifier`||e.type===`ImportSpecifier`}function gl(e){let t=new Set;for(let n of e)n.type===`Block`&&(_l(n.value,t),vl(n.value,t));return t}function _l(e,t){for(let n of[dl,fl])for(let r of e.matchAll(n)){let e=r.groups?.identifier;e!==void 0&&t.add(e)}}function vl(e,t){for(let n of e.matchAll(pl)){let e=n.groups?.annotation;if(e!==void 0)for(let n of e.matchAll(ml)){let e=n.groups?.identifier;e!==void 0&&t.add(e)}}}function yl(e,t,n,r){if(t.specifiers.length===1)return r.remove(t);let i=e.getTokenAfter(n);if(t.specifiers[0]===n&&i?.value===`,`){let t=e.getTokenBefore(n);if(t!==null)return[r.removeRange([t.range[1],n.range[0]]),r.remove(n),r.remove(i)]}if(i?.value===`,`)return r.removeRange([n.range[0],i.range[1]]);let a=e.getTokenBefore(n);return a?.value===`,`?r.removeRange([a.range[0],n.range[1]]):r.remove(n)}const bl=y(`no-unused-imports`,`general`,{create(e){let{sourceCode:t}=e,n=e.options[0]?.checkJSDoc??!0,r=n?gl(t.getAllComments()):new Set,i=[],a;return{ImportDeclaration(e){a??=e;for(let t of e.specifiers)hl(t)&&i.push({identifierName:t.local.name,parent:e,specifier:t})},"Program:exit"(){if(a===void 0)return;let o=t.getScope(a);for(let{identifierName:a,parent:s,specifier:c}of i){let i=o.set.get(a);i!==void 0&&i.references.length>0||n&&r.has(a)||e.report({data:{identifierName:a},fix(e){return yl(t,s,c,e)},messageId:`unusedImport`,node:c})}}}},meta:{docs:{description:`Disallow unused imports`},fixable:`code`,messages:{unusedImport:`Import '{{identifierName}}' is defined but never used.`},schema:[{additionalProperties:!1,properties:{checkJSDoc:{default:!0,description:`Check if imports are referenced in JSDoc comments`,type:`boolean`}},type:`object`}],type:`problem`}});function xl(e,t){let n=e,r=t;for(;n.type===`SequenceExpression`;){if(n.expressions.at(-1)!==r)return!1;r=n,n=n.parent}return n.type===`LogicalExpression`?n.left===r:n.type===`ConditionalExpression`?n.test===r:n.type!==`ExpressionStatement`&&n.type!==`ArrowFunctionExpression`&&n.type!==`UnaryExpression`&&n.type!==`AwaitExpression`&&n.type!==`ReturnStatement`&&n.type!==`ThrowStatement`}function Sl(e){return xl(e.parent,e)}function Cl(e){if(e.defs.length!==1)return;let[t]=e.defs;if(t!==void 0){if(t.type===`FunctionName`&&k(t.node))return t.node;if(t.type===`Variable`&&t.node.type===`VariableDeclarator`&&t.node.init!==null&&(t.node.init.type===`FunctionExpression`||t.node.init.type===`ArrowFunctionExpression`))return t.node.init}}const wl=y(`no-use-of-empty-return-value`,`general`,{create(e){let t=new Map,n=new Set,r=[];function i(e){if(r.push(e),e.async||e.generator){n.add(e);return}e.type===`ArrowFunctionExpression`&&e.expression&&n.add(e)}function a(){r.pop()}return{ArrowFunctionExpression:i,"ArrowFunctionExpression:exit":a,CallExpression(n){if(!Sl(n)||n.callee.type!==`Identifier`)return;let r=e.sourceCode.getScope(n),i=r.references.find(e=>e.identifier===n.callee)?.resolved??_(r,n.callee.name);if(i===void 0)return;let a=Cl(i);a!==void 0&&t.set(n.callee,a)},FunctionDeclaration:i,"FunctionDeclaration:exit":a,FunctionExpression:i,"FunctionExpression:exit":a,"Program:exit"(){for(let[r,i]of t)n.has(i)||e.report({data:{name:r.name},messageId:`removeUseOfOutput`,node:r})},ReturnStatement(e){if(e.argument===null)return;let t=r.at(-1);t!==void 0&&n.add(t)}}},meta:{docs:{description:`Disallow using the return value of functions that do not return anything.`,recommended:!0},messages:{removeUseOfOutput:`Remove this use of the output from "{{name}}"; "{{name}}" doesn't return anything.`},schema:[],type:`problem`}}),Tl=[`Axes`,`BrickColor`,`CFrame`,`Color3`,`ColorSequence`,`ColorSequenceKeypoint`,`DateTime`,`Enum`,`Faces`,`NumberRange`,`NumberSequence`,`NumberSequenceKeypoint`,`PathWaypoint`,`PhysicalProperties`,`Ray`,`Rect`,`Region3`,`Region3int16`,`TweenInfo`,`UDim`,`UDim2`,`Vector2`,`Vector3`,`Vector3int16`,`Vector3int32`],El=new Set([`!`,`+`,`-`,`typeof`,`void`,`~`]),Dl=new Set(`ArrayExpression.ArrowFunctionExpression.AssignmentExpression.AwaitExpression.BinaryExpression.CallExpression.ChainExpression.ClassExpression.ConditionalExpression.FunctionExpression.Identifier.ImportExpression.Literal.LogicalExpression.MemberExpression.MetaProperty.NewExpression.ObjectExpression.ParenthesizedExpression.SequenceExpression.Super.TaggedTemplateExpression.TemplateLiteral.ThisExpression.TSAsExpression.TSInstantiationExpression.TSNonNullExpression.TSSatisfiesExpression.TSTypeAssertion.UnaryExpression.UpdateExpression.YieldExpression`.split(`.`));function Ol(e){return Dl.has(e.type)}function R(e){return e.type===`module`||e.type===`global`}function z(e){for(let t of e.defs)if(t.type===`ImportBinding`)return!0;return!1}function kl(e){return e.type===`Variable`}function Al(e){if(!kl(e))return;let{node:t}=e;if(t.type!==`VariableDeclarator`)return;let{parent:n}=t;if(n.type===`VariableDeclaration`&&n.kind===`const`)return t.init??void 0}function jl(e,t){let n=_(e.getScope(t),t.name);if(!(n===void 0||!R(n.scope)))for(let e of n.defs){let t=Al(e);if(t!==void 0)return t}}function Ml(e,t){let n=_(e.getScope(t),t.name);if(n!==void 0)for(let e of n.defs){let t=Al(e);if(t!==void 0)return t}}function Nl(e,t,n){let r=m(t);if(n.has(r))return!1;if(n.add(r),r.type===`Identifier`&&r.name===`undefined`||r.type===`UnaryExpression`&&r.operator===`void`)return!0;if(r.type!==`Identifier`)return!1;let i=Ml(e,r);return i!==void 0&&Nl(e,i,n)}function Pl(e,t,n,r){return t.type===`Identifier`?!0:Ol(t)?B(e,t,n,r):!1}function Fl(e){let t=m(e);for(;t.type===`MemberExpression`;)t=m(t.object);return t.type===`Identifier`?t.name:void 0}function Il(e,t,n,r){if(r.staticCallsRequireFactories===!0){let e=Fl(t);if(e===void 0||!r.staticGlobalFactories.has(e))return!1}let i=m(t);return i.type===`Identifier`?Rl(e,i,n,r):i.type!==`MemberExpression`||!B(e,i.object,n,r)?!1:i.computed?B(e,i.property,n,r):i.property.type===`Identifier`}function Ll(e,t,n,r,i){return Il(e,n,r,i)?t.every(t=>t.type!==`SpreadElement`&&B(e,t,r,i)):!1}function B(e,t,n,r){let i=m(t);if(n.has(i))return!1;switch(n.add(i),i.type){case`ArrayExpression`:return Vl(e,i,n,r);case`BinaryExpression`:case`LogicalExpression`:return Ol(i.left)?B(e,i.left,n,r)&&B(e,i.right,n,r):!1;case`CallExpression`:return Ll(e,i.arguments,i.callee,n,r);case`ConditionalExpression`:return B(e,i.test,n,r)&&B(e,i.consequent,n,r)&&B(e,i.alternate,n,r);case`Identifier`:return Rl(e,i,n,r);case`Literal`:return!0;case`MemberExpression`:return B(e,i.object,n,r)&&(!i.computed||Pl(e,i.property,n,r));case`NewExpression`:return Ll(e,i.arguments,i.callee,n,r);case`ObjectExpression`:return Bl(e,i,n,r);case`SequenceExpression`:return i.expressions.length>0&&i.expressions.every(t=>B(e,t,n,r));case`TemplateLiteral`:return i.expressions.length===0;case`UnaryExpression`:return El.has(i.operator)&&B(e,i.argument,n,r);default:return!1}}function Rl(e,t,n,r){let i=_(e.getScope(t),t.name);if(i===void 0)return r.staticGlobalFactories.has(t.name);if(!R(i.scope))return!1;if(z(i))return!0;for(let t of i.defs){let i=Al(t);if(i!==void 0&&B(e,i,n,r))return!0}return!1}function zl(e){return e.type!==`PrivateIdentifier`&&e.type!==`Identifier`}function Bl(e,t,n,r){for(let i of t.properties)if(i.type!==`Property`||i.kind!==`init`||i.computed&&zl(i.key)&&!B(e,i.key,n,r)||!B(e,i.value,n,r))return!1;return!0}function Vl(e,{elements:t},n,r){for(let i of t)if(i===null||i.type===`SpreadElement`||!B(e,i,n,r))return!1;return!0}const Hl=/^[A-Z][A-Z0-9_]*$/u,Ul={staticGlobalFactories:new Set(Tl)},Wl=[String.raw`^Array\b`,String.raw`^Object\b`,String.raw`^Map\b`,String.raw`^Set\b`,String.raw`^WeakMap\b`,String.raw`^WeakSet\b`];function Gl(e){let t=[],n=0,r=[e];for(;r.length>0;){let e=r.pop();if(e===void 0)break;e.type!==`global`&&(t[n++]=e);for(let t of e.childScopes)r.push(t)}return t}function Kl(e){return O(e)||e.type===`ClassExpression`}const ql=new Set([`ArrayExpression`,`ObjectExpression`,`JSXElement`,`JSXFragment`]);function Jl(e,t,n){if(ql.has(e.type))return!0;if(e.type!==`CallExpression`&&e.type!==`NewExpression`)return!1;let r=n.getText(e.callee);for(let e of t)if(e.test(r))return!0;return!1}function Yl(e){return e.type===`Program`||e.type===`BlockStatement`}function Xl(e){let t=e;for(;;)switch(t.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:t=t.expression;break;case`Identifier`:return t.name;case`MemberExpression`:t=t.object;break;default:return}}function Zl(e,t){for(let n of e.elements){if(n===null)return!1;t.push(n)}return!0}function Ql(e,t,n){let r=Xl(e.callee);if(r===void 0||!t.has(r))return!1;n.push(e.callee);for(let t of e.arguments)n.push(t);return!0}function $l(e,t){for(let n of e.properties){if(n.type!==`Property`)return!1;n.computed&&t.push(n.key),t.push(n.value)}return!0}function eu(e,t,n){if(e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||e.type===`TSAsExpression`||e.type===`TSInstantiationExpression`||e.type===`TSNonNullExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSTypeAssertion`)return n.push(e.expression),!0;switch(e.type){case`ArrayExpression`:return Zl(e,n);case`BinaryExpression`:case`LogicalExpression`:return n.push(e.left,e.right),!0;case`CallExpression`:case`NewExpression`:return Ql(e,t,n);case`ConditionalExpression`:return n.push(e.test,e.consequent,e.alternate),!0;case`MemberExpression`:return n.push(e.object),e.computed&&n.push(e.property),!0;case`ObjectExpression`:return $l(e,n);case`SequenceExpression`:case`SpreadElement`:return!1;case`TemplateLiteral`:for(let t of e.expressions)n.push(t);return!0;case`UnaryExpression`:return n.push(e.argument),!0;default:return!0}}function tu(e,t){let n=[e],r=0;for(;r<n.length;){let e=n[r];if(e===void 0||(r+=1,!eu(e,t,n)))return!1}return!0}function nu(e,t){return t.type===`Literal`||B(e,t,new Set,Ul)&&tu(t,Ul.staticGlobalFactories)}function ru(e,t){let n=t;for(;n.type===`ParenthesizedExpression`;)n=n.expression;return e.getText(n)}function iu(e,t){let{parent:n}=e;if(!Yl(n))return!1;let{body:r}=n;for(let n=0;n<r.length;n+=1)if(r[n]===e)return r[n+1]===t;return!1}function au(e){let t=e.parent,n=e;for(;t!==null;){if(C(t)&&t.init===n)return t;n=t,t=t.parent}}const ou=y(`no-useless-constants`,`general`,{create(e){let{sourceCode:t}=e,[n]=e.options,r=(n?.ignoreCallPatterns??Wl).map(e=>new RegExp(e,`u`));function i(e,n){let r,i=0;for(let e of n.references)e.isReadOnly()&&(i+=1,r=e);if(i===1&&r!==void 0&&r.from===e&&t.getScope(r.identifier)===e)return r}function a(e,n){let{name:a}=n;if(!Hl.test(a))return;let[o]=n.defs;if(o?.type!==`Variable`)return;let s=o.node;if(!C(s)||!Qe(s.id)||s.init===null)return;let c=o.parent;if(c===null||!Ae(c)||c.kind!==`const`||c.declarations.length!==1||je(c.parent))return;let l=s.init;if(Kl(l)||Jl(l,r,t))return;let u=i(e,n);if(u===void 0||!Qe(u.identifier))return;let d=au(u.identifier);if(d===void 0)return;let f=d.parent;if(!(!Ae(f)||f.kind!==`const`))return{name:a,declarationNode:c,enclosingDeclaration:f,initializer:l,referenceIdentifier:u.identifier,reportNode:s.id}}function o(n){let r=[];for(let i of n.variables){let o=a(n,i);if(o===void 0)continue;let s=iu(o.declarationNode,o.enclosingDeclaration),c=nu(t,o.initializer),l=tu(o.initializer,Ul.staticGlobalFactories);if(!((s||c)&&l&&!re(t,o.declarationNode))){e.report({data:{name:o.name},messageId:`uselessConstantNoFix`,node:o.reportNode});continue}r.push({name:o.name,declarationNode:o.declarationNode,initializerText:ru(t,o.initializer),referenceIdentifier:o.referenceIdentifier,reportNode:o.reportNode})}s(r)}function s(n){let[r]=n;r!==void 0&&e.report({data:{name:r.name,names:n.map(e=>e.name).join(`, `)},fix(e){let r=[],i=0;for(let t of n)r[i++]=e.replaceText(t.referenceIdentifier,t.initializerText);for(let a of n)r[i++]=e.removeRange(ne(t.text,a.declarationNode));return r},messageId:n.length===1?`uselessConstant`:`uselessConstants`,node:r.reportNode})}return{"Program:exit"(e){let n=Gl(t.getScope(e));for(let e of n)o(e)}}},meta:{docs:{description:`Disallow constants that do not add value.`,recommended:!0},fixable:`code`,messages:{uselessConstant:`Constant '{{name}}' is only referenced once in the same scope. Inline it directly, or move it to a higher scope if reference stability is needed.`,uselessConstantNoFix:`Constant '{{name}}' is only referenced once in the same scope. It cannot be auto-inlined because the initializer is not safely movable or the declaration has attached comments. Inline it manually, or move it to a higher scope if reference stability is needed.`,uselessConstants:`Constants '{{names}}' are only referenced once in the same scope. Inline them directly, or move them to a higher scope if reference stability is needed.`},schema:[{additionalProperties:!1,properties:{ignoreCallPatterns:{default:[...Wl],description:`Regular expression patterns for call expressions that should be ignored.`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}}),su=new Set([`push`,`unshift`]),cu=new Set([`max`,`min`]),lu=`Math`;function uu(e){if(!D(e))return;let t=g(e);if(t!==void 0){if(su.has(t))return t;if(cu.has(t))return ce(e.object,lu)?`${lu}.${t}`:void 0}}const du=y(`no-variadic-spread`,`general`,{createOnce(e){return{CallExpression(t){let n=uu(t.callee);if(n!==void 0)for(let r of t.arguments)r.type===`SpreadElement`&&m(r.argument).type!==`ArrayExpression`&&e.report({data:{method:n},messageId:`noVariadicSpread`,node:r})}}},meta:{docs:{description:`Disallow spreading a potentially unbounded array into a variadic call, because every element becomes a stack-allocated argument.`},messages:{noVariadicSpread:`Spreading an array into {{method}}() passes every element as its own stack argument, so a large array throws 'RangeError: Maximum call stack size exceeded'. Iterate the array instead.`},schema:[],type:`problem`}}),fu=y(`only-type-imports`,`general`,{create(e){return{ImportDeclaration(t){t.importKind!==`type`&&e.report({messageId:`onlyTypeImports`,node:t})}}},meta:{docs:{description:`Require all imports to be type-only imports. Benchmarks cannot import non-types because the benchmarker plugin will throw an error.`,recommended:!0},messages:{onlyTypeImports:"Benchmarks must use `import type` to avoid runtime imports that break the benchmarker plugin."},schema:[],type:`problem`}});function pu(e,t){for(let n of e.elements)if(n!==null){if(n.type===`SpreadElement`)return!1;t.push(n)}return!0}function mu(e,t){for(let n of e.properties){if(n.type===`SpreadElement`||n.computed)return!1;t.push(n.value)}return!0}function hu(e,t){switch(e.type){case`ArrayExpression`:return pu(e,t);case`CallExpression`:return e.callee.type===`MemberExpression`&&(t.push(e.callee.object),!0);case`Literal`:return!0;case`MemberExpression`:return t.push(e.object),!0;case`ObjectExpression`:return mu(e,t);default:return!1}}function gu(e){if(e===void 0)return!1;let t=[e],n=0;for(;n<t.length;){let e=t[n];if(e===void 0||(n+=1,!hu(e,t)))return!1}return!0}function _u(e){let t=e;for(;t.type===`MemberExpression`;){if(t.computed&&!Ie(t.property))return!1;t=t.object}return!0}function vu(e){return e.type===`MethodDefinition`&&e.kind===`constructor`&&e.key.type===`Identifier`&&e.key.name===`constructor`}function yu(e){if(e.type!==`ExpressionStatement`)return!1;let{expression:t}=e;if(t.type!==`AssignmentExpression`)return!1;let{left:n}=t;if(n.type!==`MemberExpression`||n.object.type!==`ThisExpression`)return!1;let{property:r}=n;return(r.type===`Identifier`||Ie(r))&&gu(t.right)&&_u(n)}const bu=y(`prefer-class-properties`,`general`,{create(e){let[t]=e.options;if(t===`never`)return{PropertyDefinition(t){t.static||e.report({messageId:`unexpectedClassProperty`,node:t})}};function n(t){for(let n of t.body.body)if(!(!vu(n)||n.value.body===null))for(let t of n.value.body.body)yu(t)&&e.report({messageId:`unexpectedAssignment`,node:t.expression})}return{ClassDeclaration(e){n(e)},ClassExpression(e){n(e)}}},meta:{docs:{description:`Prefer class properties to assignment of literals in constructors.`},messages:{unexpectedAssignment:`Constructor assigns a literal value to this.property. Literals are static and known at class definition time. Move to a class property declaration: propertyName = value; at class level. This clarifies intent and reduces constructor complexity.`,unexpectedClassProperty:`Class property declarations are disabled by rule configuration (mode: 'never'). Move initialization into the constructor: this.propertyName = value; inside constructor().`},schema:[{enum:[`always`,`never`],type:`string`}],type:`suggestion`}});function xu(e){return!t.isObject(e)||!t.isNumber(e.maximumStatements)?1:e.maximumStatements}function Su(e){return e.type===`IfStatement`&&e.alternate===null}function Cu(e,t){return e.type===`ExpressionStatement`&&t===0||e.type===`BlockStatement`&&e.body.length>t}function wu(e,t){if(e.body.length!==1)return!1;let[n]=e.body;return n===void 0||!Su(n)?!1:Cu(n.consequent,t)}const Tu=y(`prefer-early-return`,`general`,{create(e){let t=xu(e.options[0]);function n(n){wu(n,t)&&e.report({messageId:`preferEarlyReturn`,node:n})}function r(e){e.body!==null&&n(e.body)}return{ArrowFunctionExpression(e){e.body.type===`BlockStatement`&&n(e.body)},FunctionDeclaration:r,FunctionExpression:r}},meta:{docs:{description:`Prefer early returns over full-body conditional wrapping.`,recommended:!0},messages:{preferEarlyReturn:`Function body is wrapped in a single conditional without an else branch. This increases nesting depth and cognitive load. Invert the condition and return early: if (!condition) return; then place the main logic at the top level.`},schema:[{additionalProperties:!1,properties:{maximumStatements:{default:1,description:`Maximum allowed statement count inside the guarded branch before reporting.`,minimum:0,type:`number`}},type:`object`}],type:`suggestion`}});function Eu(e){return e.type===`Identifier`&&(e.name===`it`||e.name===`test`)}function Du(e){if(e.callee.type!==`MemberExpression`||!Eu(e.callee.object))return!1;let t=g(e.callee);return t===`only`||t===`skip`}function Ou(e){return e.callee.type!==`MemberExpression`||!Eu(e.callee.object)?!1:g(e.callee)===`each`}function ku(e){let t=e.arguments.at(-1);return t===void 0||!Re(t)?void 0:t}function Au(e){return e.type===`DoWhileStatement`||e.type===`ForInStatement`||e.type===`ForOfStatement`||e.type===`ForStatement`||e.type===`WhileStatement`}function ju(e,t){return e.type===t.type&&e.range[0]===t.range[0]&&e.range[1]===t.range[1]}function Mu(e,t){return{hasCallback:e.hasCallback||t.hasCallback,hasIndeterminate:e.hasIndeterminate||t.hasIndeterminate,hasLoop:e.hasLoop||t.hasLoop}}function Nu(e,t){if(ju(e,t))return{hasCallback:!1,hasIndeterminate:!1,hasLoop:!1};let n={hasCallback:Re(e),hasIndeterminate:Re(e)||Au(e)||e.type===`ConditionalExpression`||e.type===`IfStatement`||e.type===`SwitchCase`||e.type===`TryStatement`&&e.handler!==null,hasLoop:Au(e)};return e.parent===null?n:Mu(n,Nu(e.parent,t))}function Pu(e){return e.callee.type===`Identifier`?Eu(e.callee):Du(e)?!0:e.callee.type===`CallExpression`&&Ou(e.callee)}function Fu(e){return Pu(e)?ku(e):void 0}function Iu({callee:e}){return e.type!==`MemberExpression`||e.object.type!==`Identifier`||e.object.name!==`expect`?!1:g(e)===`assertions`}function Lu({callee:e}){return e.type!==`MemberExpression`||e.object.type!==`Identifier`||e.object.name!==`expect`?!1:g(e)===`hasAssertions`}function Ru(e,t=[]){return e.callee.type===`Identifier`&&(e.callee.name===`expect`||t.includes(e.callee.name))}function zu(e,t=[]){let n=0,r=!1,i=!1,a=!1,o=0;return da(e,s=>{if(s.type!==`CallExpression`||!Ru(s,t))return;let c=Nu(s.parent,e);if(c.hasLoop&&(i=!0),c.hasCallback&&(r=!0),c.hasIndeterminate){a=!0,o+=1;return}n+=1}),{deterministic:n,hasExpectInCallback:r,hasExpectInLoop:i,hasIndeterminate:a,indeterminate:o}}function Bu(e){return Array.isArray(e)?e.filter(t.isString):[]}function Vu(e){return t.isObject(e)?{additionalAssertionFunctions:Bu(e.additionalAssertionFunctions),additionalExpectCallNames:Bu(e.additionalExpectCallNames),onlyFunctionsWithAsyncKeyword:e.onlyFunctionsWithAsyncKeyword,onlyFunctionsWithExpectInCallback:e.onlyFunctionsWithExpectInCallback,onlyFunctionsWithExpectInLoop:e.onlyFunctionsWithExpectInLoop}:{additionalAssertionFunctions:[],additionalExpectCallNames:[],onlyFunctionsWithAsyncKeyword:!1,onlyFunctionsWithExpectInCallback:!1,onlyFunctionsWithExpectInLoop:!1}}function Hu(e){return[...new Set([...e.additionalExpectCallNames,...e.additionalAssertionFunctions])]}function Uu(e){return e.onlyFunctionsWithAsyncKeyword||e.onlyFunctionsWithExpectInCallback||e.onlyFunctionsWithExpectInLoop}function Wu(e){return e.body??void 0}function Gu(e){let t=Wu(e);return t?.type===`BlockStatement`?t:void 0}function Ku(e,t,n,r,i,a){return n+r===0?!1:!Uu(t)||t.onlyFunctionsWithAsyncKeyword&&e.async||t.onlyFunctionsWithExpectInCallback&&i||t.onlyFunctionsWithExpectInLoop&&a}function qu(e){let t=Gu(e);if(t===void 0)return;let[n]=t.body;if(n?.type===`ExpressionStatement`&&n.expression.type===`CallExpression`)return n.expression}function Ju(e,t,n,r,i){let a=Gu(t);if(a===void 0){e.report({messageId:`haveExpectAssertions`,node:n});return}let[o]=a.body;if(i){e.report({messageId:`haveExpectAssertions`,node:n,suggest:[{fix(e){return o===void 0?e.insertTextAfterRange([a.range[0],a.range[0]+1],` expect.hasAssertions();`):e.insertTextBefore(o,`expect.hasAssertions();
62
- `)},messageId:`suggestAddingHasAssertions`}]});return}e.report({messageId:`haveExpectAssertions`,node:n,suggest:[{data:{count:String(r)},fix(e){return o===void 0?e.insertTextAfterRange([a.range[0],a.range[0]+1],` expect.assertions(${r});`):e.insertTextBefore(o,`expect.assertions(${r});\n`)},messageId:`suggestAddingAssertions`}]})}function Yu(e,t,n,r){if(Lu(t)){t.arguments.length>0&&e.report({messageId:`hasAssertionsTakesNoArguments`,node:t});return}if(!Iu(t))return;if(t.arguments.length!==1){e.report({messageId:`assertionsRequiresOneArgument`,node:t});return}let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`||!Be(i)){e.report({messageId:`assertionsRequiresNumberArgument`,node:t});return}!r&&n>0&&i.value!==n&&e.report({data:{actual:String(n),expected:String(i.value)},messageId:`wrongAssertionCount`,node:t})}const Xu=y(`prefer-expect-assertions`,`general`,{create(e){let t=Vu(e.options[0]);return{CallExpression(n){if(!Pu(n))return;let r=Fu(n);if(r===void 0)return;let i=Wu(r);if(i===void 0)return;let{deterministic:a,hasExpectInCallback:o,hasExpectInLoop:s,hasIndeterminate:c,indeterminate:l}=zu(i,Hu(t));if(!Ku(r,t,a,l,o,s))return;let u=qu(r);if(u!==void 0&&(Iu(u)||Lu(u))){if(Yu(e,u,a,c),!c&&Lu(u)&&u.arguments.length===0&&a>0){let[t]=Gu(r)?.body??[];t!==void 0&&e.report({data:{count:String(a)},fix(e){return e.replaceText(t,`expect.assertions(${a});`)},messageId:`preferAssertionsCount`,node:u})}return}Ju(e,r,n,a,c)}}},meta:{docs:{description:`Enforce expect assertion guards in tests and prefer expect.assertions(n) over expect.hasAssertions() when the count is known.`,recommended:!0},fixable:`code`,hasSuggestions:!0,messages:{assertionsRequiresNumberArgument:`This argument should be a number`,assertionsRequiresOneArgument:"`expect.assertions` expects a single argument of type number",hasAssertionsTakesNoArguments:"`expect.hasAssertions` expects no arguments",haveExpectAssertions:"Every test should have either `expect.assertions(<number of assertions>)` or `expect.hasAssertions()` as its first expression",preferAssertionsCount:"Use `expect.assertions({{count}})` instead of `expect.hasAssertions()` when the count is known",suggestAddingAssertions:"Add `expect.assertions({{count}})`",suggestAddingHasAssertions:"Add `expect.hasAssertions()`",wrongAssertionCount:`Expected {{expected}} assertions, but test has {{actual}} expect calls`},schema:[{additionalProperties:!1,properties:{additionalAssertionFunctions:{default:[],description:`Additional assertion function names counted as test assertions.`,items:{type:`string`},type:`array`},additionalExpectCallNames:{default:[],description:`Additional expect-like call names counted when checking assertion counts.`,items:{type:`string`},type:`array`},onlyFunctionsWithAsyncKeyword:{default:!1,description:`Only require assertion guards for test callbacks marked async.`,type:`boolean`},onlyFunctionsWithExpectInCallback:{default:!1,description:`Only require assertion guards when expect is called inside a nested callback.`,type:`boolean`},onlyFunctionsWithExpectInLoop:{default:!1,description:`Only require assertion guards when expect is called inside a loop.`,type:`boolean`}},type:`object`}],type:`suggestion`}}),Zu=/^[A-Z][A-Z0-9_]*$/u;function Qu(e){let{type:t}=e;if(t===`module`||t===`global`)return!0;if(e.upper?.type===`global`){let{block:t}=e.upper;if(t.type===`Program`&&t.sourceType===`script`)return!0}return!1}const $u=y(`prefer-module-scope-constants`,`general`,{create(e){let t=!1;return{VariableDeclaration(e){t=e.kind===`const`},"VariableDeclaration:exit"(){t=!1},VariableDeclarator(n){let{id:r}=n;if(!(r.type!==`Identifier`||!Zu.test(r.name))){if(!t){e.report({messageId:`mustUseConst`,node:n});return}Qu(e.sourceCode.getScope(n))||e.report({messageId:`mustBeModuleScope`,node:n})}}}},meta:{docs:{description:`Prefer screaming snake case constants at module scope or the allowed top-level wrapper scope.`},messages:{mustBeModuleScope:`You must place screaming snake case at module scope. If this is not meant to be a module-scoped variable, use camelcase instead.`,mustUseConst:"You must use `const` when defining screaming snake case variables. If this is not a constant, use camelcase instead."},schema:[],type:`suggestion`}}),ed=s(`boolean`),td=s(`string`),nd=s(`undefined`),rd=td.array().readonly(),id=s(`Record<string, string>`).readonly(),ad=`not all execution paths`;s({"alternatives?":rd.or(nd),closer:rd.or(td),opener:td,"openerAlternatives?":rd.or(nd),"platform?":`"roblox" | undefined`,"requireSync?":ed.or(nd),"yieldingFunctions?":rd.or(nd)}).readonly();const od=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]),sd=[`task.wait`,`wait`,`*.WaitForChild`,`*.*Async`];function cd(e,t){for(let n of t){let t=!1;for(let r of n)if(r.index===e.index){t=!0;break}if(!t)return!1}return!0}function ld(e,t){return t.filter(t=>t.some(({index:t})=>t===e.index))}function ud({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`){let t=e.object.type===`Identifier`?e.object.name:void 0,n=e.property.type===`Identifier`?e.property.name:void 0;if(t!==void 0&&n!==void 0)return`${t}.${n}`}}function V(e){let n=[],r=0;if(M(e.closer))for(let t of e.closer)n[r++]=t;else t.isString(e.closer)&&(n[r++]=e.closer);if(e.alternatives)for(let t of e.alternatives)n[r++]=t;return n}function dd(e){let t=[e.opener];if(e.openerAlternatives){let n=1;for(let r of e.openerAlternatives)t[n++]=r}return t}function fd(e){return e.length===0?`configured opener`:e.length===1?e[0]??`configured opener`:e.join(`' or '`)}function pd(e){return e?od.has(e.type):!1}function md(e){return e?.type===`SwitchStatement`}function hd(e,t){if(e.type!==`Identifier`)return;let n=t;for(;n;){if(n.type===`LabeledStatement`&&n.label.name===e.name)return n.body;n=n.parent??void 0}}function gd(e,t){let n=e.label?hd(e.label,e.parent):void 0;if(n)return pd(n)?n:void 0;let r=e.parent;for(;r;){if(pd(r))return r;if(t&&md(r))return;r=r.parent??void 0}}function _d(e){return gd(e,!0)}function vd(e){return gd(e,!1)}function yd(e){return{...e,loopAncestors:[...e.loopAncestors]}}const bd=y(`require-paired-calls`,`general`,{create(e){let[t]=e.options,n={allowConditionalClosers:t?.allowConditionalClosers??!1,allowMultipleOpeners:t?.allowMultipleOpeners??!0,maxNestingDepth:t?.maxNestingDepth??0,pairs:t?.pairs??[]},r={pairs:n.pairs.length===0?[{closer:`debug.profileend`,opener:`debug.profilebegin`,platform:`roblox`,requireSync:!0,yieldingFunctions:[...sd]}]:n.pairs};n.allowConditionalClosers!==void 0&&(r.allowConditionalClosers=n.allowConditionalClosers),n.allowMultipleOpeners!==void 0&&(r.allowMultipleOpeners=n.allowMultipleOpeners),n.maxNestingDepth!==void 0&&(r.maxNestingDepth=n.maxNestingDepth);let i=[],a=[],o=0,s=[],c=!1,l=!1,u=[],d=new Map,f=new Map,p=new Map;function m(e){if(p.has(e))return p.get(e)??[];let t=[],n=0;for(let i of r.pairs){if(!dd(i).includes(e))continue;let r=V(i);for(let e of r)t.includes(e)||(t[n++]=e)}return p.set(e,t),t}function h(){return u.length>0?u.at(-1):{asyncContext:!1,currentFunction:void 0,hasEarlyExit:!1,inCatch:!1,inConditional:!1,inFinally:!1,inLoop:!1,inTry:!1}}function g(e){let t=h();u.push({...t,...e})}function _(){u.pop()}function ee(e){let t=u.at(-1);t&&(u[u.length-1]={...t,...e})}function te(){return i.map(yd)}function v(e){d.set(e,te())}function ne(e,t){return r.pairs.find(n=>(t?dd(n):V(n)).includes(e))}function re(e,t){return t.platform===`roblox`&&(t.yieldingFunctions??sd).some(t=>{if(t.startsWith(`*.`)){let n=t.slice(2);return e.endsWith(`.${n}`)}return e===t})}function y(e){let t=V(e);return t.length===1?t[0]??`closer`:t.join(`' or '`)}function ie(t,n){e.report({data:{closer:y(t.config),opener:t.opener,paths:n},messageId:`unpairedOpener`,node:t.node})}function b(e){i.length=0;for(let t of e)i.push({...t})}function x(e){let t=f.get(e)??[];t.push(te()),f.set(e,t)}function ae(e,t,n){for(let i of e){let e=ld(i,t);e.length<=0||e.length>=t.length||r.allowConditionalClosers===!1&&ie(i,n)}}function S(e){(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`)&&(s.push([...i]),i.length=0,c=!1,l=!1,g({asyncContext:e.async,currentFunction:e,hasEarlyExit:!1,inCatch:!1,inConditional:!1,inFinally:!1,inLoop:!1,inTry:!1}))}function C(){if(i.length>0)for(let e of i)ie(e,`function exit`);let e=s.pop();if(e){i.length=0;for(let t of e)i.push(t)}else i.length=0;_()}function oe(e){e.type===`IfStatement`&&(g({inConditional:!0}),v(e))}function se(e){if(e.type!==`IfStatement`)return;_();let t=d.get(e),n=f.get(e);if(t&&n&&n.length>0){let r=e.alternate!==null;for(let e of n)for(let n of e)t.some(({index:e})=>e===n.index)||ie(n,`conditional branch`);if(r){ae(t,n,ad),i.length=0;for(let e of t)cd(e,n)&&i.push(e)}else b(t)}d.delete(e),f.delete(e)}function ce(e){let{parent:t}=e;if(t?.type===`IfStatement`){x(t);let e=d.get(t);if(!e)return;b(e)}}function le(e){let{parent:t}=e;t?.type===`IfStatement`&&x(t)}function ue(e){e.type===`TryStatement`&&v(e)}function de(t){if(t.type!==`TryStatement`)return;let n=d.get(t),a=f.get(t);if(t.finalizer){d.delete(t),f.delete(t);return}if(n&&a&&a.length>0){for(let t of n){let n=a.filter(e=>e.some(e=>e.index===t.index));if(n.length>0&&n.length<a.length&&r.allowConditionalClosers===!1){let n=V(t.config),r=n.length===1?n[0]??`closer`:n.join(`' or '`);e.report({data:{closer:r,opener:t.opener,paths:ad},messageId:`unpairedOpener`,node:t.node})}}i.length=0;for(let e of n)cd(e,a)&&i.push(e)}d.delete(t),f.delete(t)}function fe(){g({inTry:!0})}function w(e,t){if(e.type!==t)return;let{parent:n}=e;if(n.type===`TryStatement`){x(n);let e=d.get(n);e&&b(e)}_()}function T(e){w(e,`BlockStatement`)}function pe(){g({inCatch:!0})}function me(e){w(e,`CatchClause`)}function he(){g({inFinally:!0})}function ge(e){e.type===`SwitchStatement`&&(g({inConditional:!0}),v(e))}function _e(e){if(e.type!==`SwitchStatement`)return;_();let t=d.get(e),n=f.get(e);if(t&&n&&n.length>0){if(e.cases.some(e=>e.test===null)&&n.length===e.cases.length){ae(t,n,ad);let e=t.filter(e=>cd(e,n));i.length=0;for(let t of e)i.push(t)}else b(t)}d.delete(e),f.delete(e)}function ve(e){if(e.type!==`SwitchCase`)return;let{parent:t}=e;if(t.type===`SwitchStatement`){x(t);let e=d.get(t);if(!e)return;b(e)}}function ye(e){pd(e)&&(a.push(e),g({inLoop:!0}))}function E(){a.length>0&&a.pop(),_()}function D(t){if(ee({hasEarlyExit:!0}),!(h().inFinally||i.length===0))for(let{config:n,node:r,opener:a}of i){let i=V(n),o=i.length===1?i[0]??`closer`:i.join(`' or '`),s=t.type===`ReturnStatement`?`return`:`throw`;e.report({data:{closer:o,opener:a,paths:`${s} at line ${t.loc.start.line}`},messageId:`unpairedOpener`,node:r})}}function be(t){if(t.type!==`BreakStatement`&&t.type!==`ContinueStatement`||i.length===0)return;let n=t.type===`ContinueStatement`?vd(t):_d(t);if(n)for(let{config:r,loopAncestors:a,node:o,opener:s}of i){if(a.every(e=>e!==n))continue;let i=V(r),c=i.length===1?i[0]??`closer`:i.join(`' or '`),l=t.type===`BreakStatement`?`break`:`continue`,u=t.loc.start.line;e.report({data:{closer:c,opener:s,paths:`${l} at line ${u}`},messageId:`unpairedOpener`,node:o})}}function xe(t,n,s){let c=r.maxNestingDepth??0;c>0&&i.length>=c&&e.report({data:{max:String(c)},messageId:`maxNestingExceeded`,node:t}),r.allowMultipleOpeners===!1&&i.length>0&&i.at(-1)?.opener===n&&e.report({data:{opener:n},messageId:`multipleOpeners`,node:t});let l={config:s,index:o++,location:t.loc,loopAncestors:[...a],node:t,opener:n};i.push(l)}function Se(t,n){let r=i.findLastIndex(e=>V(e.config).includes(n));if(r===-1){if(c&&!l){l=!0;return}if(i.length===0){e.report({data:{closer:n},messageId:`unpairedCloser`,node:t});return}let r=fd(m(i.at(-1).opener));e.report({data:{closer:n,expected:r},messageId:`unexpectedCloser`,node:t});return}let a=i[r];if(a){if(r!==i.length-1){let r=i.at(-1);r&&e.report({data:{actual:r.opener,closer:n,expected:a.opener},messageId:`wrongOrder`,node:t})}i.splice(r,1)}}function Ce(t,n,r){let i=V(r.config),a=i.length===1?i[0]??`closer`:i.join(`' or '`);e.report({data:{closer:a,yieldingFunction:n},messageId:`robloxYieldViolation`,node:t})}function we(t){if(t.type===`AwaitExpression`||t.type===`YieldExpression`||t.type===`ForOfStatement`)for(let{config:n,opener:r}of i){if(n.requireSync!==!0)continue;let i=V(n),a=i.length===1?i[0]??`closer`:i.join(`' or '`),o=t.type===`YieldExpression`?`yield`:`await`;e.report({data:{asyncType:o,closer:a,opener:r},messageId:`asyncViolation`,node:t})}}function Te(e){if(e.type!==`CallExpression`)return;let t=ud(e);if(t===void 0||t===``)return;let n=ne(t,!0);if(n){xe(e,t,n);return}if(ne(t,!1)){Se(e,t);return}for(let n of i)if(re(t,n.config)){Ce(e,t,n),i.length=0,c=!0;return}}return{ArrowFunctionExpression:S,"ArrowFunctionExpression:exit":C,AwaitExpression:we,BreakStatement:be,CallExpression:Te,CatchClause:pe,"CatchClause:exit":me,ContinueStatement:be,DoWhileStatement:ye,"DoWhileStatement:exit":E,ForInStatement:ye,"ForInStatement:exit":E,ForOfStatement:e=>{e.await&&we(e),ye(e)},"ForOfStatement:exit":E,ForStatement:ye,"ForStatement:exit":E,FunctionDeclaration:S,"FunctionDeclaration:exit":C,FunctionExpression:S,"FunctionExpression:exit":C,IfStatement:oe,"IfStatement:exit":se,"IfStatement > .alternate:exit":le,"IfStatement > .consequent:exit":ce,ReturnStatement:D,"SwitchCase:exit":ve,SwitchStatement:ge,"SwitchStatement:exit":_e,ThrowStatement:D,TryStatement:ue,"TryStatement:exit":de,"TryStatement > .block":fe,"TryStatement > .block:exit":T,"TryStatement > .finalizer":he,"TryStatement > .finalizer:exit":_,WhileStatement:ye,"WhileStatement:exit":E,YieldExpression:we}},meta:{docs:{description:`Enforces balanced opener/closer function calls across all execution paths`,recommended:!1},messages:{asyncViolation:`Cannot use {{asyncType}} between '{{opener}}' and '{{closer}}' (requireSync: true)`,conditionalOpener:`Conditional opener '{{opener}}' at {{location}} may not have matching closer on all paths`,maxNestingExceeded:`Maximum nesting depth of {{max}} exceeded for paired calls`,multipleOpeners:`Multiple consecutive calls to '{{opener}}' without matching closers (allowMultipleOpeners: false)`,robloxYieldViolation:`Yielding function '{{yieldingFunction}}' auto-closes all profiles - subsequent '{{closer}}' will error`,unexpectedCloser:`Unexpected call to '{{closer}}' - expected one of: {{expected}}`,unpairedCloser:`Unexpected call to '{{closer}}' - no matching opener on stack`,unpairedOpener:`Unpaired call to '{{opener}}' - missing '{{closer}}' on {{paths}}`,wrongOrder:`Closer '{{closer}}' called out of order - expected to close '{{expected}}' but '{{actual}}' is still open`},schema:[{additionalProperties:!1,properties:{allowConditionalClosers:{default:!1,description:`Allow closer calls that appear only on some conditional paths.`,type:`boolean`},allowMultipleOpeners:{default:!0,description:`Allow repeated opener calls before matching closer calls.`,type:`boolean`},maxNestingDepth:{default:0,description:`Maximum opener nesting depth before reporting; 0 disables the limit.`,minimum:0,type:`number`},pairs:{default:[{closer:`debug.profileend`,opener:`debug.profilebegin`,platform:`roblox`,requireSync:!0,yieldingFunctions:[...sd]}],description:`Opener and closer call pairs that must stay balanced.`,items:{additionalProperties:!1,properties:{alternatives:{items:{minLength:1,type:`string`},type:`array`},closer:{oneOf:[{minLength:1,type:`string`},{items:{minLength:1,type:`string`},minItems:1,type:`array`}]},opener:{minLength:1,type:`string`},openerAlternatives:{items:{minLength:1,type:`string`},type:`array`},platform:{enum:[`roblox`],type:`string`},requireSync:{default:!1,type:`boolean`},yieldingFunctions:{items:{minLength:1,type:`string`},type:`array`}},required:[`opener`,`closer`],type:`object`},minItems:1,type:`array`}},type:`object`}],type:`problem`}});function xd(e){return t.isObject(e)&&e.metric===`statements`?`statements`:`lines`}function Sd(e,t){let n=e.consequent.length;if(n===0)return!1;let[r]=e.consequent;if(r===void 0||n===1&&r.type===`BlockStatement`)return!1;if(t===`statements`)return n>1;let i=e.consequent[n-1];return i!==void 0&&r.loc.start.line!==i.loc.end.line}const Cd=y(`require-switch-case-braces`,`general`,{create(e){let t=xd(e.options[0]);return{SwitchCase(n){if(!Sd(n,t))return;let[r]=n.consequent,i=n.consequent.at(-1);r!==void 0&&i!==void 0&&e.report({fix(e){return[e.insertTextBefore(r,`{
87
+ `&&(t+=1);return t}const xo=b(`no-commented-code`,`general`,{create(e){let{maxLines:t=0}=e.options[0]??{};return{"Program:exit"(){let n=no(e.sourceCode.getAllComments(),e.sourceCode);for(let r of n){let n=r.value.trim();if(n===`}`||bo(r.value)<=t||!yo(ao(n),e.filename))continue;let i=r.comments.at(0),a=r.comments.at(-1);!i||!a||e.report({loc:{end:a.loc.end,start:i.loc.start},messageId:`commentedCode`,suggest:[{desc:`Remove this commented out code`,fix(e){return e.removeRange([i.range[0],a.range[1]])}}]})}}}},meta:{docs:{description:`Disallow commented-out code`,recommended:!1},hasSuggestions:!0,messages:{commentedCode:`Commented-out code creates confusion about intent and clutters the codebase. Version control preserves history, making dead code comments unnecessary. Delete the commented code entirely. If needed later, retrieve it from git history.`},schema:[{additionalProperties:!1,properties:{maxLines:{default:0,description:`Maximum number of lines of commented code allowed without reporting. Default 0 means any commented code triggers an error.`,type:`number`}},type:`object`}],type:`suggestion`}}),So={constant:!1},Co={constant:!1};function P(e){return{constant:!0,value:e}}function wo(e){return{constant:!0,value:e}}function To(e){let t=new Set;if(!e?.loopExitCalls)return t;for(let n of e.loopExitCalls)Ti(n)&&t.add(n);return t}function Eo(e){let t=m(e);if(t.type===`Identifier`)return t.name;if(t.type!==`MemberExpression`)return;let n=Eo(t.object);if(n===void 0||n.length===0)return;let r=g(t);if(r!==void 0&&r.length!==0)return`${n}.${r}`}function Do(e,t){if(t.size===0)return!1;let n=Eo(e.callee);return n===void 0||n.length===0?!1:t.has(n)}function Oo(e,t){for(let n of e.elements)n!==null&&t.push(n.type===`SpreadElement`?n.argument:n)}function ko(e,t){for(let n of e)t.push(n.type===`SpreadElement`?n.argument:n)}function Ao(e,t){switch(e.type){case`ArrayExpression`:Oo(e,t);break;case`AssignmentExpression`:t.push(e.right);break;case`AwaitExpression`:case`UnaryExpression`:case`UpdateExpression`:t.push(e.argument);break;case`BinaryExpression`:e.left.type!==`PrivateIdentifier`&&t.push(e.left),t.push(e.right);break;case`CallExpression`:case`NewExpression`:t.push(e.callee),ko(e.arguments,t);break;case`ConditionalExpression`:t.push(e.test,e.consequent,e.alternate);break;case`LogicalExpression`:t.push(e.left,e.right);break;case`MemberExpression`:t.push(e.object),e.computed&&t.push(e.property);break;case`SequenceExpression`:case`TemplateLiteral`:for(let n of e.expressions)t.push(n);break;case`TaggedTemplateExpression`:t.push(e.tag);for(let n of e.quasi.expressions)t.push(n);break;case`YieldExpression`:e.argument&&t.push(e.argument)}}function F(e,t){if(t.size===0)return!1;let n=[e],r=0;for(;r<n.length;){let e=n[r++];if(e===void 0)continue;let i=m(e);if(i.type===`CallExpression`&&Do(i,t))return!0;Ao(i,n)}return!1}function jo(e){let t=m(e);for(;t.type===`SequenceExpression`;){let e=t.expressions.at(-1);if(!e)return So;t=m(e)}switch(t.type){case`ArrayExpression`:return P([]);case`ArrowFunctionExpression`:case`ClassExpression`:case`FunctionExpression`:return P(!0);case`Identifier`:return t.name===`undefined`?P(void 0):t.name===`NaN`?P(NaN):t.name===`Infinity`?P(1/0):So;case`Literal`:return P(t.value);case`LogicalExpression`:return Mo(t);case`ObjectExpression`:return P({});case`TemplateLiteral`:return t.expressions.length>0?So:t.quasis.length===0?P(``):P(t.quasis[0]?.value.cooked??``);case`UnaryExpression`:return No(t);default:return So}}function Mo(e){let t=jo(e.left);return t.constant?e.operator===`&&`?t.value===!0?jo(e.right):P(t.value):e.operator===`||`?t.value===!0?P(t.value):jo(e.right):t.value===void 0?jo(e.right):P(t.value):So}function No(e){if(e.operator===`typeof`)return P(`string`);if(e.operator===`void`)return P(void 0);let n=jo(e.argument);return n.constant?e.operator===`!`?P(!n.value):e.operator===`+`&&t.isNumber(n.value)?P(n.value):e.operator===`-`&&t.isNumber(n.value)?P(-n.value):e.operator===`~`&&t.isNumber(n.value)?P(~n.value):So:So}function I(e){let t=m(e);for(;t.type===`SequenceExpression`;){let e=t.expressions.at(-1);if(!e)return Co;t=m(e)}if(t.type===`ConditionalExpression`)return Po(t);if(t.type===`LogicalExpression`)return Fo(t);let n=jo(t);return n.constant?wo(!!n.value):Co}function Po(e){let t=I(e.test);if(t.constant)return I(t.value===!0?e.consequent:e.alternate);let n=I(e.consequent),r=I(e.alternate);return n.constant&&r.constant&&n.value===r.value?n:Co}function Fo(e){let t=I(e.left);if(!t.constant)return Co;if(e.operator===`&&`)return t.value?I(e.right):wo(!1);if(e.operator===`||`)return t.value===!0?wo(!0):I(e.right);let n=jo(e.left);return n.constant?n.value===void 0?I(e.right):wo(!!n.value):Co}const Io=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function Lo(e){return Io.has(e.type)}function Ro(e,t){let n=t;for(;n!==null;){if(n.type===`LabeledStatement`&&n.label.name===e)return n.body;if(n.type===`Program`)return;n=n.parent}}function zo(e,t){if(e.label)return Ro(e.label.name,e.parent)===t;let n=e.parent;for(;n!==null;){if(n.type===`Program`||A(n)||n.type===`SwitchStatement`)return!1;if(Lo(n))return n===t;n=n.parent}return!1}function Bo(e,t){return e?e.type===`VariableDeclaration`?e.declarations.some(e=>e.init?F(e.init,t):!1):F(e,t):!1}function Vo(e,t){switch(e.type){case`DoWhileStatement`:case`WhileStatement`:return F(e.test,t);case`ForInStatement`:case`ForOfStatement`:return F(e.right,t);case`ForStatement`:return!!(Bo(e.init,t)||e.test&&F(e.test,t)||e.update&&F(e.update,t));default:return!1}}function L(e,t,n){let r=e;for(;r.type===`LabeledStatement`;)r=r.body;switch(r.type){case`BlockStatement`:return r.body.some(e=>L(e,t,n));case`BreakStatement`:return zo(r,t);case`DoWhileStatement`:case`WhileStatement`:return Ho(r,t,n);case`ExpressionStatement`:return F(r.expression,n);case`ForInStatement`:case`ForOfStatement`:return Uo(r,t,n);case`ForStatement`:return Wo(r,t,n);case`IfStatement`:return Go(r,t,n);case`ReturnStatement`:return!0;case`SwitchStatement`:return r.cases.some(e=>e.consequent.some(e=>L(e,t,n)));case`TryStatement`:return Ko(r,t,n);case`VariableDeclaration`:return r.declarations.some(e=>e.init?F(e.init,n):!1);case`WithStatement`:return qo(r,t,n);default:return!1}}function Ho(e,t,n){return F(e.test,n)?!0:L(e.body,t,n)}function Uo(e,t,n){return F(e.right,n)?!0:L(e.body,t,n)}function Wo(e,t,n){return Bo(e.init,n)||e.test&&F(e.test,n)||e.update&&F(e.update,n)?!0:L(e.body,t,n)}function Go(e,t,n){return L(e.consequent,t,n)?!0:e.alternate?L(e.alternate,t,n):!1}function Ko(e,t,n){return!!(L(e.block,t,n)||e.handler&&L(e.handler.body,t,n)||e.finalizer&&L(e.finalizer,t,n))}function qo(e,t,n){return F(e.object,n)?!0:L(e.body,t,n)}function Jo(e,t,n){return e.constant?!e.value||!Vo(t,n)&&!L(t.body,t,n):!1}const Yo=b(`no-constant-condition-with-break`,`general`,{create(e){let n=e.options?.[0],r=To(t.isObject(n)?n:void 0);function i(t){I(t).constant&&e.report({messageId:`unexpected`,node:t})}function a(t,n){Jo(I(n),t,r)&&e.report({messageId:`unexpected`,node:n})}return{ConditionalExpression(e){i(e.test)},DoWhileStatement(e){a(e,e.test)},ForStatement(e){e.test&&a(e,e.test)},IfStatement(e){i(e.test)},WhileStatement(e){a(e,e.test)}}},meta:{docs:{description:`Disallow constant conditions, but allow constant loops that include loop exits such as break, return, or configured calls.`},messages:{unexpected:`Unexpected constant condition.`},schema:[{additionalProperties:!1,properties:{loopExitCalls:{description:`Call expressions that count as intentional loop exits inside constant loops.`,items:{minLength:1,type:`string`},type:`array`}},type:`object`}],type:`problem`}}),Xo=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]);function Zo(e){let t=e;for(;t.type===`BlockStatement`;){let e=t.body.at(-1);if(e===void 0)return!1;t=e}return t.type===`BreakStatement`||t.type===`ContinueStatement`||t.type===`ReturnStatement`||t.type===`ThrowStatement`}function Qo(e){let t=e;for(;t.parent!==null;){if(t.type===`ArrowFunctionExpression`||t.type===`FunctionDeclaration`||t.type===`FunctionExpression`)return t;t=t.parent}return t}function $o(e,t){if(t.type===`IfStatement`){if(t.consequent===e)return{arm:`then`,complete:t.alternate!==null||Zo(t.consequent),control:t};if(t.alternate===e)return{arm:`else`,complete:!0,control:t}}else if(t.type===`ConditionalExpression`){if(t.consequent===e)return{arm:`then`,complete:!0,control:t};if(t.alternate===e)return{arm:`else`,complete:!0,control:t}}}function es(e,t){if(t.type!==`BlockStatement`&&t.type!==`SwitchCase`)return[];let n=t.type===`BlockStatement`?t.body:t.consequent,r=n.indexOf(e);if(r<=0)return[];let i=[];for(let e of n.slice(0,r))e.type===`IfStatement`&&e.alternate===null&&Zo(e.consequent)&&i.push({arm:`else`,complete:!0,control:e});return i}function ts(e,t){let n=$o(e,t);if(n!==void 0)return n;if(t.type===`LogicalExpression`&&t.right===e)return{arm:`right`,complete:!1,control:t};if(Xo.has(t.type)&&`body`in t&&t.body===e)return{arm:`body`,complete:!1,control:t};if(e.type===`SwitchCase`&&t.type===`SwitchStatement`)return{arm:`case:${e.range[0]}`,complete:!1,control:t};if(t.type===`TryStatement`){if(t.block===e)return{arm:`try`,complete:!1,control:t};if(t.handler===e)return{arm:`catch`,complete:!1,control:t}}}function ns(e,t){let n=[],r=e;for(;r!==t&&r.parent!==null;){let e=ts(r,r.parent);e!==void 0&&n.push(e);for(let e of es(r,r.parent))n.push(e);r=r.parent}return n}function rs(e,t){return e.find(e=>e.control===t)?.arm}function is(e,t){for(let n of e){let e=rs(t,n.control);if(e!==void 0&&e!==n.arm)return!1}return!0}function as(e,t){let{parent:n}=e.node;return n.type===`AssignmentExpression`?n.operator!==`=`||t.some(e=>e.isRead&&vs(n.right,e.node)):!1}function os(e,t){if(t.length!==e.length)return;let n;for(let r of e)if(rs(t,r.control)!==r.arm){if(n!==void 0)return;n=r.control}if(n!==void 0&&rs(t,n)!==void 0)return e.filter(e=>e.control!==n)}function ss(e){for(let[t,n]of e.entries())for(let[r,i]of e.entries()){if(r<=t)continue;let e=os(n,i);if(e!==void 0)return{leftIndex:t,merged:e,rightIndex:r}}}function cs(e){let t=ss(e);return t!==void 0&&(e[t.leftIndex]=t.merged,e.splice(t.rightIndex,1),t.merged.length===0||cs(e))}function ls(e,t,n){let r=e.filter(e=>rs(t,e.control)===void 0);if(r.length===0)return!0;if(r.some(e=>!e.complete))return!1;function i(e){return rs(t,e.control)}return!r.some(e=>{let t=i(e);return t!==void 0&&t!==e.arm})&&(n.push(r),cs(n))}function us(e,t){return e.isRead&&!e.isWrite||e.isWrite&&as(e,t)}function ds(e){let t=[],n=e.parent;for(;n!==null;){if(Xo.has(n.type))t.push(n);else if(n.type===`Program`||n.type===`ArrowFunctionExpression`||n.type===`FunctionDeclaration`||n.type===`FunctionExpression`)break;n=n.parent}return t}function fs(e,t){let n=ds(e.node),r=t.node.parent;for(;r!==null;){for(let e of n)if(e===r)return!0;if(r.type===`Program`||r.type===`ArrowFunctionExpression`||r.type===`FunctionDeclaration`||r.type===`FunctionExpression`)break;r=r.parent}return!1}function ps(e,t,n){return e.isRead&&!e.isWrite&&Qo(e.node)===n&&fs(t,e)}function ms(e,t,n,r,i,a){if(e.node.range[0]<=t.node.range[0])return e.node.range[0]<t.node.range[0]&&ps(e,t,n)?!0:void 0;if(Qo(e.node)!==n)return;let o=ns(e.node,n);if(is(r,o))return us(e,a)?!0:e.isWrite&&ls(o,r,i)?!1:void 0;if(ps(e,t,n))return!0}function hs(e,t){let n=Qo(e.node),r=ns(e.node,n),i=[];for(let a of t){let o=ms(a,e,n,r,i,t);if(o===!0)return!0;if(o===!1)return!1}return!1}function gs(e){return e.type===`Literal`?e.value===null||e.value===!1||e.value===!0||e.value===``||e.value===-1||e.value===0||e.value===1:e.type===`Identifier`?e.name===`undefined`:e.type===`ArrayExpression`?e.elements.length===0:e.type===`ObjectExpression`?e.properties.length===0:e.type===`UnaryExpression`?e.operator===`void`||gs(e.argument):!1}function _s(e){let t=e;for(;t.parent!==null&&t.parent.type!==`VariableDeclarator`;){if(t.parent.type===`ObjectPattern`&&t.parent.properties.some(e=>e.type===`RestElement`))return!0;t=t.parent}return!1}function vs(e,t){return e.range[0]<=t.range[0]&&e.range[1]>=t.range[1]}function ys(e,t){let n=e.node;for(;n.parent!==null;){let e=n.parent;if(e.type===`TryStatement`&&e.block===n&&[e.handler?.body,e.finalizer].filter(e=>e!=null).some(e=>t.references.some(t=>t.isRead()&&vs(e,t.identifier))))return!0;n=e}return!1}function bs(e,t){if(!e.isWrite||t.scope.block.type===`Program`||t.name.startsWith(`_`))return!1;let{parent:n}=e.node;return n.type===`AssignmentPattern`||n.type===`UpdateExpression`||n.type===`AssignmentExpression`&&n.right.type===`Literal`&&n.right.value===null||_s(e.node)||e.init&&e.writeExpression!==void 0&&gs(e.writeExpression)?!1:!ys(e,t)}function xs(e){let t=new Set(e.references.map(e=>Qo(e.identifier)));for(let n of e.defs)t.add(Qo(n.name));return e.references.some(e=>e.isRead())&&t.size>1}function Ss(e){let t=e.references.map(e=>({init:e.init,isRead:e.isRead(),isWrite:e.isWrite(),node:e.identifier,writeExpression:e.writeExpr??void 0}));for(let n of e.defs)n.type!==`Variable`||n.node.type!==`VariableDeclarator`||n.node.init===null||t.some(e=>e.node.range[0]===n.name.range[0])||t.push({init:!0,isRead:!1,isWrite:!0,node:n.name,writeExpression:n.node.init});return t.toSorted((e,t)=>e.node.range[0]-t.node.range[0])}const Cs=b(`no-dead-store`,`general`,{create(e){return{Program(){te(e.sourceCode,t=>{if(xs(t))return;let n=Ss(t);for(let r of n)!bs(r,t)||hs(r,n)||e.report({data:{name:t.name},messageId:`deadStore`,node:r.node})})}}},meta:{docs:{description:`Disallow assignments whose value is never read.`},messages:{deadStore:`The value assigned to "{{name}}" is never read.`},schema:[],type:`problem`}});function ws(e){let t=`CallExpression[callee.type="Identifier"][callee.name="${e.name}"]`;return b(e.ruleName,e.category,{create(n){return{[t](t){n.report({messageId:e.messageId,node:t})}}},meta:{docs:{description:`Use ${e.alternative} instead of ${e.name}().`},messages:{[e.messageId]:e.message.replaceAll(`{{name}}`,e.name).replaceAll(`{{alternative}}`,e.alternative)},schema:[],type:`problem`}})}const Ts=ws({name:`error`,alternative:`throw`,category:`general`,message:`Replace {{name}}(...) with {{alternative}}.`,messageId:`noError`,ruleName:`no-error`}),Es=b(`no-filter-map-chain`,`general`,{create(e){return{CallExpression(t){let n=m(t.callee);if(n.type!==`MemberExpression`||g(n)!==`map`)return;let r=m(n.object);if(r.type!==`CallExpression`)return;let i=m(r.callee);i.type===`MemberExpression`&&g(i)===`filter`&&e.report({messageId:`avoidFilterMapChain`,node:t})}}},meta:{docs:{description:`Disallow map(...) directly after filter(...).`},messages:{avoidFilterMapChain:`Do not chain map(...) directly after filter(...). Combine both operations in a single loop.`},schema:[],type:`suggestion`}}),Ds=/e/iu,Os=new Set([`!=`,`!==`,`==`,`===`]),ks=new Set([`%`,`*`,`**`,`+`,`-`]),As=new Set([`deepStrictEqual`,`notDeepStrictEqual`,`notStrictEqual`,`strictEqual`]),js=new Set([`toBe`,`toEqual`,`toStrictEqual`]),Ms=new Set([`@jest/globals`,`bun:test`,`vitest`]),Ns=new Set([`assert`,`assert/strict`,`node:assert`,`node:assert/strict`]);function Ps(e){let t=e.replaceAll(`_`,``).toLowerCase(),n=t.indexOf(`e`),r=n===-1?t:t.slice(0,n),i=n===-1?0:Number(t.slice(n+1)),a=r.indexOf(`.`),o=a===-1?0:r.length-a-1,s=r.replace(`.`,``),c=o-i,l=BigInt(s);if(l===0n||c<=0)return!0;let u=10n**BigInt(c);for(;l%5n==0n;)l/=5n,u/=5n;return u%5n!=0n}function Fs(e){if(e.type===`Literal`&&t.isNumber(e.value))return e.value;if(e.type!==`UnaryExpression`||e.operator!==`+`&&e.operator!==`-`)return;let n=e.argument.type===`Literal`?e.argument.value:void 0;if(t.isNumber(n))return e.operator===`-`?-n:n}function Is(e){let t=Fs(e);if(t!==void 0)return t;if(e.type!==`BinaryExpression`||e.left.type===`PrivateIdentifier`)return;let n=Is(e.left),r=Is(e.right);if(n!==void 0&&r!==void 0){if(e.operator===`+`)return n+r;if(e.operator===`-`)return n-r;if(e.operator===`*`)return n*r;if(e.operator===`/`)return r===0?void 0:n/r;if(e.operator===`%`)return r===0?void 0:n%r;if(e.operator===`**`)return n**r}}function Ls(e){let t=Fs(e.left),n=Fs(e.right);if(t===void 0||n===void 0||n===0||!Number.isSafeInteger(t)||!Number.isSafeInteger(n))return!1;let r=Math.abs(n);for(;r%2==0;)r/=2;return Math.abs(t)%r!==0}function Rs(e){let[t]=e.defs;if(t?.type===`Variable`&&t.node.type===`VariableDeclarator`&&t.node.init!==null&&t.parent?.type===`VariableDeclaration`&&t.parent.kind===`const`)return t.node.init}function zs(e,t,n){let r=Is(e);return r!==void 0&&Number.isSafeInteger(r)?!1:e.operator===`/`?Ls(e)||Vs(e.left,t,n)||Vs(e.right,t,n):ks.has(e.operator)&&(Vs(e.left,t,n)||Vs(e.right,t,n))}function Bs(e,t,n){let r=e;for(;;){let e=m(r);if(e!==r){r=e;continue}if(r.type!==`Identifier`)return r;let i=t.get(r);if(i===void 0||n.has(i))return;let a=Rs(i);if(a===void 0)return;n.add(i),r=a}}function Vs(e,n,r){let i=Bs(e,n,r);if(i===void 0)return!1;if(i.type===`Literal`&&t.isNumber(i.value)){let e=String(i.raw);return(e.includes(`.`)||Ds.test(e))&&!Ps(e)}return i.type===`UnaryExpression`?(i.operator===`+`||i.operator===`-`)&&Vs(i.argument,n,r):i.type===`BinaryExpression`&&Ys(i)&&zs(i,n,r)}function Hs(e){let t=new Map;return te(e,e=>{for(let n of e.references)t.set(n.identifier,e)}),t}function Us(e){return e.imported.type===`Identifier`?e.imported.name:e.imported.value}function Ws(e,t,n){let{name:r}=n.local;Ms.has(t)&&n.type===`ImportSpecifier`&&Us(n)===`expect`&&e.set(r,`expect`),Ns.has(t)&&(n.type===`ImportDefaultSpecifier`||n.type===`ImportNamespaceSpecifier`?e.set(r,`assert`):As.has(Us(n))&&e.set(r,`function`))}function Gs(e){let n=new Map;for(let r of e.body){if(r.type!==`ImportDeclaration`||!t.isString(r.source.value))continue;let e=r.source.value;for(let t of r.specifiers)Ws(n,e,t)}return n}function Ks(e,t){let n=e.arguments[t];return n===void 0||n.type===`SpreadElement`?void 0:n}function qs(e,t){if(e.callee.type===`Identifier`&&t.get(e.callee.name)===`function`){let t=Ks(e,0),n=Ks(e,1);return t===void 0||n===void 0?void 0:[t,n]}if(e.callee.type!==`MemberExpression`)return;let n=g(e.callee);if(n!==void 0&&As.has(n)&&e.callee.object.type===`Identifier`&&t.get(e.callee.object.name)===`assert`){let t=Ks(e,0),n=Ks(e,1);return t===void 0||n===void 0?void 0:[t,n]}if(n===void 0||!js.has(n))return;let r=e.callee.object;if(r.type===`MemberExpression`&&g(r)===`not`&&(r=r.object),r.type!==`CallExpression`||r.callee.type!==`Identifier`||t.get(r.callee.name)!==`expect`)return;let i=Ks(r,0),a=Ks(e,0);return i===void 0||a===void 0?void 0:[i,a]}function Js(e){let t=e.operator===`>`||e.operator===`>=`;return[{above:t,expression:e.left,threshold:e.right},{above:!t,expression:e.right,threshold:e.left}]}function Ys(e){return e.type===`BinaryExpression`&&e.left.type!==`PrivateIdentifier`}function Xs(e,t,n){return e.type===t.type&&n.getText(e).replaceAll(/\s+/gu,``)===n.getText(t).replaceAll(/\s+/gu,``)}function Zs(e,t){if(!(!Ys(e.left)||!Ys(e.right))&&!((e.operator!==`&&`||e.left.operator!==`<=`&&e.left.operator!==`>=`||e.right.operator!==`<=`&&e.right.operator!==`>=`)&&(e.operator!==`||`||e.left.operator!==`<`&&e.left.operator!==`>`||e.right.operator!==`<`&&e.right.operator!==`>`))){for(let n of Js(e.left))for(let r of Js(e.right))if(n.above!==r.above&&Xs(n.expression,r.expression,t)&&Xs(n.threshold,r.threshold,t))return[n.expression,n.threshold]}}const Qs=b(`no-floating-point-equality`,`general`,{create(e){return{Program(t){let n=Hs(e.sourceCode),r=Gs(t);function i(e){return Vs(e,n,new Set)}da(t,t=>{let n=!1;if(t.type===`BinaryExpression`&&Os.has(t.operator))n=t.left.type!==`PrivateIdentifier`&&(i(t.left)||i(t.right));else if(t.type===`LogicalExpression`){let r=Zs(t,e.sourceCode);n=r!==void 0&&(i(r[0])||i(r[1]))}else if(t.type===`SwitchCase`&&t.test!==null)n=i(t.test);else if(t.type===`CallExpression`){let e=qs(t,r);n=e!==void 0&&(i(e[0])||i(e[1]))}n&&e.report({messageId:`exactFloatComparison`,node:t})})}}},meta:{docs:{description:`Disallow exact comparisons involving inexact floating-point values.`},messages:{exactFloatComparison:`Compare floating-point results within a tolerance instead of for exact equality.`},schema:[],type:`problem`}}),$s=[`binding`];function ec(e){if(e.type===`Identifier`)return e.name;if(e.type===`AssignmentPattern`&&e.left.type===`Identifier`)return e.left.name}function tc({body:e},t){if(e.length!==1)return!1;let[n]=e;return n?.type!==`ReturnStatement`||n.argument?.type!==`Identifier`?!1:n.argument.name===t}function nc(e){if(e.params.length!==1)return;let[t]=e.params;return t===void 0?void 0:ec(t)}function rc(e){if(e.type===`ArrowFunctionExpression`){let t=nc(e);if(t===void 0)return!1;let{body:n}=e;switch(n.type){case`BlockStatement`:return tc(n,t);case`Identifier`:return n.name===t;default:return!1}}if(e.type===`FunctionExpression`){let t=nc(e);return t===void 0||e.body===null?!1:tc(e.body,t)}return!1}function ic(e){return N(e)===`joinBindings`}function ac(e){for(let t of e.defs){if(t.node.type!==`VariableDeclarator`)continue;let{init:e}=t.node;if(e?.type===`CallExpression`&&(N(e)===`useBinding`||ic(e)||e.callee.type===`MemberExpression`&&g(e.callee)===`map`))return!0}return!1}function oc(e,{object:t},n){if(t.type===`Identifier`){let r=t.name.toLowerCase();for(let e of n)if(r.includes(e.toLowerCase()))return!0;let i=_(e.getScope(t),t.name);if(i!==void 0&&ac(i))return!0}return t.type===`CallExpression`&&(t.callee.type===`MemberExpression`&&g(t.callee)===`map`||ic(t))}const sc=b(`no-identity-map`,`general`,{create(e){let{sourceCode:t}=e,[n]=e.options,r=n?.bindingPatterns??$s;return{CallExpression(n){let{callee:i}=n;if(i.type!==`MemberExpression`||i.computed||i.property.type!==`Identifier`||g(i)!==`map`||n.arguments.length!==1)return;let[a]=n.arguments;if(a===void 0||a.type===`SpreadElement`||!rc(a))return;let o=oc(t,i,r);e.report({fix(e){return e.replaceText(n,t.getText(i.object))},messageId:o?`identityBindingMap`:`identityArrayMap`,node:n})}}},meta:{docs:{description:"Disallow pointless identity `.map()` calls that return the parameter unchanged"},fixable:`code`,messages:{identityArrayMap:"Pointless identity `.map()` call on Array. Use `table.clone(array)` or `[...array]` instead.",identityBindingMap:"Pointless identity `.map()` call on Binding. Use the original binding directly."},schema:[{additionalProperties:!1,properties:{bindingPatterns:{default:[...$s],description:`Variable name patterns to recognize as Bindings (case insensitive)`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}});function cc(e){return typeof e!=`object`||!e?!1:`allowAutofix`in e?e.allowAutofix===void 0||typeof e.allowAutofix==`boolean`:!0}function lc(e){let{parent:t}=e;return t.type===`ExpressionStatement`||t.type===`ForStatement`&&t.update===e}const uc=b(`no-increment-decrement`,`general`,{create(e){let[t]=e.options,n=cc(t)&&t.allowAutofix,{sourceCode:r}=e;return{UpdateExpression(t){if(!lc(t))return;let i=r.getText(t.argument),a=t.operator===`++`?`noIncrement`:`noDecrement`;if(!n){e.report({messageId:a,node:t});return}let o=t.operator===`++`?`${i} += 1`:`${i} -= 1`;e.report({fix(e){return e.replaceText(t,o)},messageId:a,node:t})}}},meta:{docs:{description:"Disallow standalone `++` and `--` statements and for-loop update clauses.",recommended:!0},fixable:`code`,messages:{noDecrement:"Do not use standalone `--`. Use `-= 1` instead.",noIncrement:"Do not use standalone `++`. Use `+= 1` instead."},schema:[{additionalProperties:!1,properties:{allowAutofix:{default:!1,description:`Allow the fixer to replace standalone ++ and -- statements and for-loop updates.`,type:`boolean`}},type:`object`}],type:`suggestion`}}),dc=new Set([`add`,`clear`,`copyWithin`,`delete`,`fill`,`pop`,`push`,`reverse`,`set`,`shift`,`sort`,`splice`,`unshift`]),fc=new Set([`entries`,`keys`,`values`]),pc=new Set([`ArrowFunctionExpression`,`ClassDeclaration`,`ClassExpression`,`FunctionDeclaration`,`FunctionExpression`]);function mc(e){let t=e;for(;t!=null;){if(t.type===`Identifier`)return t.name;if(t.type!==`ParenthesizedExpression`&&t.type!==`TSAsExpression`&&t.type!==`TSNonNullExpression`&&t.type!==`TSSatisfiesExpression`&&t.type!==`TSTypeAssertion`)return;t=t.expression}}function hc(e){if(e.type===`ArrayPattern`)return mc(e.elements[0]??void 0)}function gc(e){if(e.left.type===`VariableDeclaration`){let[t]=e.left.declarations;return t?.id}return e.left}function _c(e){return e.left.type===`VariableDeclaration`&&e.left.kind===`const`}function vc(e){let t=m(e);if(t.type===`Identifier`)return{name:t.name,method:`direct`};if(t.type!==`CallExpression`||t.callee.type!==`MemberExpression`||t.arguments.length>0||t.callee.optional||t.callee.object.type!==`Identifier`)return;let n=g(t.callee);if(!(n===void 0||!fc.has(n)))return{name:t.callee.object.name,method:n}}function yc(e){let t=vc(e.right);if(t===void 0)return;if(!_c(e))return{addArgumentName:void 0,deleteArgumentName:void 0,iterableName:t.name,setKeyName:void 0};let n=gc(e);if(n===void 0)return;let r,i,a;return t.method===`entries`?(r=hc(n),i=r,a=r):t.method===`keys`?(i=mc(n),a=i):(r=mc(n),a=r??hc(n),i=hc(n)),{addArgumentName:r,deleteArgumentName:a,iterableName:t.name,setKeyName:i}}function bc(e,t){if(t===void 0)return!1;let[n]=e.arguments;return n!==void 0&&n.type!==`SpreadElement`&&mc(n)===t}function xc(e,t){for(let[n,r]of Object.entries(e))if(n!==`parent`&&n!==`range`&&n!==`loc`){if(Array.isArray(r))for(let e of r)S(e)&&t.push(e);else S(r)&&t.push(r)}}function Sc(e,t){let n=[],r=[e];for(let e of r)if(!pc.has(e.type)){if(e.type===`CallExpression`&&e.callee.type===`MemberExpression`){let r=g(e.callee),i=m(e.callee.object);r!==void 0&&dc.has(r)&&i.type===`Identifier`&&i.name===t&&n.push({call:e,method:r,property:e.callee.property})}xc(e,r)}return n}function Cc({call:e,method:t},n,r){return t===`delete`&&bc(e,n.deleteArgumentName)?!0:t===`add`&&bc(e,n.addArgumentName)||t===`set`&&bc(e,n.setKeyName)?!r.some(t=>t.call.range[0]<e.range[0]&&t.method===`delete`&&bc(t.call,n.deleteArgumentName)):!1}const wc=b(`no-loop-iterable-mutation`,`general`,{create(e){return{"ForOfStatement:exit"(t){if(t.await)return;let n=yc(t);if(n===void 0)return;let r=Sc(t.body,n.iterableName);for(let t of r)Cc(t,n,r)||e.report({data:{iterable:n.iterableName},messageId:`noLoopIterableMutation`,node:t.property})}}},meta:{docs:{description:`Disallow mutating a loop iterable during iteration.`,recommended:!0},messages:{noLoopIterableMutation:"Do not mutate `{{iterable}}` while iterating over it."},schema:[],type:`problem`}});function Tc(e,t){let n=t;for(;n;){if(n.set.has(e))return!0;n=n.upper}return!1}function Ec(e){let t=new Map,n=new Set;for(let n of e.keys())t.set(n,0);function r(i,a){t.set(i,1),a.push(i);let o=e.get(i)??[];for(let e of o){let i=t.get(e);if(i===1){let t=a.lastIndexOf(e);for(let e=t;e<a.length;e+=1){let t=a[e];t!==void 0&&n.add(t)}}else i===0&&r(e,a)}a.pop(),t.set(i,2)}for(let n of e.keys())t.get(n)===0&&r(n,[]);return n}const Dc=b(`no-recursive`,`general`,{create(e){let{sourceCode:t}=e,n=new Map,r=[],i=[],a=[],o=new Map;function s(e){r.push(e)}function c(){r.pop()}function l(){for(let e=r.length-1;e>=0;--e){let t=r[e];if(t!==void 0)return t}}function u(e){n.has(e)||n.set(e,new Set)}function d(){for(let e=a.length-1;e>=0;--e)if(a[e]!==void 0)return a[e]}return{ArrowFunctionExpression(){s(void 0)},"ArrowFunctionExpression:exit":c,CallExpression(e){let r=l();if(r===void 0)return;let a,s=!1;if(e.callee.type===`Identifier`?a=e.callee.name:e.callee.type===`MemberExpression`&&e.callee.object.type===`ThisExpression`&&e.callee.property.type===`Identifier`&&(a=e.callee.property.name,s=!0),a===void 0)return;let c=!1;if(s){let e=d();e!==void 0&&o.get(e)?.has(a)===!0&&(c=!0)}else{let n=t.getScope(e);c=Tc(a,n)}c&&(n.get(r)?.add(a),i.push({callee:a,caller:r,node:e}))},ClassDeclaration(e){let t=e.id?.name;t!==void 0&&!o.has(t)&&o.set(t,new Set),a.push(t)},"ClassDeclaration:exit"(){a.pop()},FunctionDeclaration(e){let t=e.id?.name;t!==void 0&&t.length>0&&u(t),s(t)},"FunctionDeclaration:exit":c,FunctionExpression(e){e.id&&u(e.id.name);let{parent:t}=e;t.type===`MethodDefinition`&&t.key.type===`Identifier`?s(t.key.name):s(void 0)},"FunctionExpression:exit":c,MethodDefinition(e){let t=d();t!==void 0&&e.key.type===`Identifier`&&(o.get(t)?.add(e.key.name),u(e.key.name))},"Program:exit"(){let t=Ec(n);if(t.size!==0)for(let n of i)t.has(n.caller)&&t.has(n.callee)&&e.report({messageId:`noRecursive`,node:n.node})},VariableDeclarator(e){e.id.type!==`Identifier`||e.init===null||e.init.type!==`FunctionExpression`&&e.init.type!==`ArrowFunctionExpression`||(u(e.id.name),s(e.id.name))},"VariableDeclarator:exit"(e){e.id.type!==`Identifier`||e.init===null||e.init.type!==`FunctionExpression`&&e.init.type!==`ArrowFunctionExpression`||c()}}},meta:{docs:{description:`Disallow recursive function calls to prevent stack overflow.`},messages:{noRecursive:`Recursion is not allowed (JPL Power of 10). Use iteration instead — a loop or explicit stack.`},schema:[{additionalProperties:!1,properties:{},type:`object`}]}}),Oc=s({"message?":`string | undefined`,object:`string`,properties:s(`string[]`).readonly()}).readonly(),kc=s({"allowFiles?":s(`string[]`).readonly().or(`undefined`),"checkComputed?":`boolean | undefined`,restrictions:Oc.array().readonly()}).readonly(),Ac={matchBase:!0},jc={dot:!0,magicalBraces:!0};function Mc(e){return e.replaceAll(`\\`,`/`)}function Nc(e){let t=Mc(e);if(!i.isAbsolute(e))return[t];let n=Mc(i.relative(o(),e));return n.length===0||n.startsWith(`..`)?[t]:[t,n]}function Pc(e,t){let n=new c(e,t),r=n.hasMagic();return{hasMagic:r,matches:r?e=>n.match(e):t=>t===e}}function Fc(e){let t=new Set,n=[],r=0;for(let i of e){let e=Pc(i,jc);e.hasMagic?n[r++]=e.matches:t.add(i)}return e=>t.has(e)||n.some(t=>t(e))}function Ic(e){return{matchesObject:Pc(e.object,jc).matches,matchesProperty:Fc(e.properties),message:e.message}}function Lc(e){let[t]=e.options;if(!kc.allows(t))return{checkComputed:!0,isAllowedFile:!1,restrictions:[]};let{allowFiles:n,checkComputed:r,restrictions:i}=t,a=Nc(e.filename),o=n?.some(e=>a.some(t=>l(t,e,Ac)))??!1;return{checkComputed:r??!0,isAllowedFile:o,restrictions:i.map(Ic)}}const Rc=b(`no-restricted-property-assignment`,`general`,{create(e){let{checkComputed:t,isAllowedFile:n,restrictions:r}=Lc(e);function i(i,a){if(n||!O(i)||!t&&i.computed||i.object.type!==`Identifier`)return;let o=g(i);if(o!==void 0){for(let t of r)if(t.matchesObject(i.object.name)&&t.matchesProperty(o)){t.message===void 0?e.report({data:{object:i.object.name,property:o},messageId:`restricted`,node:a}):e.report({data:{message:t.message},messageId:`restrictedCustom`,node:a});return}}}return{AssignmentExpression(e){i(e.left,e)},UpdateExpression(e){i(e.argument,e)}}},meta:{docs:{description:`Disallow assignment to restricted object properties.`,recommended:!0},messages:{restricted:`Assignment to '{{object}}.{{property}}' is not permitted.`,restrictedCustom:`{{message}}`},schema:[{additionalProperties:!1,properties:{allowFiles:{items:{type:`string`},type:`array`},checkComputed:{default:!0,type:`boolean`},restrictions:{items:{additionalProperties:!1,properties:{message:{type:`string`},object:{type:`string`},properties:{items:{type:`string`},minItems:1,type:`array`}},required:[`object`,`properties`],type:`object`},type:`array`}},required:[`restrictions`],type:`object`}],type:`problem`}});function zc(e){return e===!1||e===0||e===``||e==null||e===0n}function Bc(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(`null`,`object`)}const Vc=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`ClassExpression`,`FunctionExpression`,`NewExpression`,`ObjectExpression`]),Hc=new Set([`toBe`]),Uc=new Set([`toEqual`,`toStrictEqual`]),Wc=new Map([[`toBeDefined`,`defined`],[`toBeFalsy`,`falsy`],[`toBeNull`,`null`],[`toBeTruthy`,`truthy`],[`toBeUndefined`,`undefined`]]),Gc=new Set([`deepStrictEqual`,`notDeepStrictEqual`,`notStrictEqual`,`strictEqual`]),Kc=new Set([`deepEqual`,`equal`,`notDeepEqual`,`notEqual`]);function qc(e){return e.type===`Literal`&&`regex`in e||Vc.has(e.type)}function Jc(e){if(e.type===`Literal`){if(e.value===null)return{value:null};if(t.isString(e.value)||t.isNumber(e.value)||t.isBoolean(e.value)||t.isBigInt(e.value))return{value:e.value}}}function Yc(e){let t=e;for(;t.type===`ChainExpression`||t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSInstantiationExpression`||t.type===`TSNonNullExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`;)t=t.expression;return t}function Xc(e,n,r){if(n.operator===`void`)return{value:void 0};if(n.operator===`typeof`){let t=Qc(e,n.argument,r);return t===void 0?void 0:{value:Bc(t.value)}}let i=Qc(e,n.argument,r);if(i!==void 0){if(n.operator===`!`)return{value:zc(i.value)};if(t.isNumber(i.value)){if(n.operator===`+`)return{value:i.value};if(n.operator===`-`)return{value:-i.value}}}}function Zc(e,t,n){if(t.name===`undefined`)return{value:void 0};let[r]=_(e.getScope(t),t.name)?.defs??[];if(r?.type===`Variable`&&r.node.type===`VariableDeclarator`&&r.node.init!==null&&r.parent?.type===`VariableDeclaration`&&r.parent.kind===`const`)return Qc(e,r.node.init,n)}function Qc(e,t,n){let r=Yc(t);if(n.has(r))return;n.add(r);let i=Jc(r);if(i!==void 0)return i;if(r.type===`UnaryExpression`)return Xc(e,r,n);if(r.type===`Identifier`)return Zc(e,r,n)}function $c(e,t){return e===`truthy`?!zc(t):e===`falsy`?zc(t):e===`defined`?t!==void 0:e===`undefined`?t===void 0:t===null}function el(e){return e===`truthy`||e===`defined`}function tl(e,t,n){return Object.is(t,n)}function nl(e){return e.callee.type===`Identifier`&&e.callee.name===`expect`}function rl(e){if(e.callee.type!==`MemberExpression`)return;let t=e.callee.object;if(t.type===`MemberExpression`&&g(t)===`not`&&(t=t.object),!(t.type!==`CallExpression`||!nl(t)))return t}function il(e){if(e.callee.type!==`MemberExpression`)return!1;let{object:t}=e.callee;return t.type===`MemberExpression`&&g(t)===`not`}function al(e,t){let n=e.arguments[t];if(n!==void 0&&n.type!==`SpreadElement`)return Yc(n)}function ol(e,t,n,r){let i=Qc(e.sourceCode,t,new Set);if(i!==void 0&&$c(n,i.value)!==r){e.report({messageId:`issue`,node:t});return}qc(t)&&el(n)!==r&&e.report({messageId:`freshPredicate`,node:t})}function sl(e,t,n,r,i,a){if(r&&(qc(t)||qc(n))){e.report({data:{matcher:a},messageId:`freshIdentity`,node:qc(t)?t:n});return}let o=Qc(e.sourceCode,t,new Set),s=Qc(e.sourceCode,n,new Set);o!==void 0&&s!==void 0&&tl(r,o.value,s.value)!==i&&e.report({messageId:`issue`,node:t})}function cl(e,t){let n=rl(t);if(n===void 0||t.callee.type!==`MemberExpression`)return;let r=g(t.callee);if(r===void 0)return;let i=al(n,0);if(i===void 0)return;let a=il(t),o=Wc.get(r);if(o!==void 0){ol(e,i,o,a);return}let s=Hc.has(r);if(!s&&!Uc.has(r))return;let c=al(t,0);c!==void 0&&sl(e,i,c,s,a,a?`not.toEqual`:`toEqual`)}function ll(e,t){if(t.callee.type!==`MemberExpression`||t.callee.object.type!==`Identifier`||t.callee.object.name!==`assert`)return;let n=g(t.callee);if(n===void 0)return;let r=al(t,0);if(r===void 0)return;if(n===`ok`||n===`notOk`){let t=Qc(e.sourceCode,r,new Set),i=n===`ok`;t!==void 0&&!!t.value===i&&e.report({messageId:`issue`,node:r});return}let i=al(t,1);if(i===void 0)return;let a=Gc.has(n);if(!a&&!Kc.has(n))return;let o=n.startsWith(`not`);sl(e,r,i,a,o,o?`notDeepStrictEqual`:`deepStrictEqual`)}const ul=b(`no-trivial-assertions`,`general`,{create(e){return{CallExpression(t){if(rl(t)!==void 0){cl(e,t);return}ll(e,t)}}},meta:{docs:{description:`Disallow assertions that always succeed or compare against freshly created values.`,recommended:!0},messages:{freshIdentity:"Use `{{matcher}}` instead; freshly-created values are never identical to other values.",freshPredicate:`Replace this assertion; the value is freshly created here, so the result is independent of the code under test.`,issue:`Replace this assertion; it always succeeds.`},schema:[],type:`problem`}}),dl=/@(?:link|linkcode|linkplain|see)\s+\{?(?<identifier>\w+)/gu,fl=/\{@(?:link|linkcode|linkplain|see)\s+(?<identifier>\w+)/gu,pl=/[@{](?:type|typedef|param|returns?|template|augments|extends|implements)\s+(?<annotation>[^}]*)/gu,ml=/\b(?<identifier>\w+)\b/gu;function hl(e){return e.type===`ImportDefaultSpecifier`||e.type===`ImportNamespaceSpecifier`||e.type===`ImportSpecifier`}function gl(e){let t=new Set;for(let n of e)n.type===`Block`&&(_l(n.value,t),vl(n.value,t));return t}function _l(e,t){for(let n of[dl,fl])for(let r of e.matchAll(n)){let e=r.groups?.identifier;e!==void 0&&t.add(e)}}function vl(e,t){for(let n of e.matchAll(pl)){let e=n.groups?.annotation;if(e!==void 0)for(let n of e.matchAll(ml)){let e=n.groups?.identifier;e!==void 0&&t.add(e)}}}function yl(e,t,n,r){if(t.specifiers.length===1)return r.remove(t);let i=e.getTokenAfter(n);if(t.specifiers[0]===n&&i?.value===`,`){let t=e.getTokenBefore(n);if(t!==null)return[r.removeRange([t.range[1],n.range[0]]),r.remove(n),r.remove(i)]}if(i?.value===`,`)return r.removeRange([n.range[0],i.range[1]]);let a=e.getTokenBefore(n);return a?.value===`,`?r.removeRange([a.range[0],n.range[1]]):r.remove(n)}const bl=b(`no-unused-imports`,`general`,{create(e){let{sourceCode:t}=e,n=e.options[0]?.checkJSDoc??!0,r=n?gl(t.getAllComments()):new Set,i=[],a;return{ImportDeclaration(e){a??=e;for(let t of e.specifiers)hl(t)&&i.push({identifierName:t.local.name,parent:e,specifier:t})},"Program:exit"(){if(a===void 0)return;let o=t.getScope(a);for(let{identifierName:a,parent:s,specifier:c}of i){let i=o.set.get(a);i!==void 0&&i.references.length>0||n&&r.has(a)||e.report({data:{identifierName:a},fix(e){return yl(t,s,c,e)},messageId:`unusedImport`,node:c})}}}},meta:{docs:{description:`Disallow unused imports`},fixable:`code`,messages:{unusedImport:`Import '{{identifierName}}' is defined but never used.`},schema:[{additionalProperties:!1,properties:{checkJSDoc:{default:!0,description:`Check if imports are referenced in JSDoc comments`,type:`boolean`}},type:`object`}],type:`problem`}});function xl(e,t){let n=e,r=t;for(;n.type===`SequenceExpression`;){if(n.expressions.at(-1)!==r)return!1;r=n,n=n.parent}return n.type===`LogicalExpression`?n.left===r:n.type===`ConditionalExpression`?n.test===r:n.type!==`ExpressionStatement`&&n.type!==`ArrowFunctionExpression`&&n.type!==`UnaryExpression`&&n.type!==`AwaitExpression`&&n.type!==`ReturnStatement`&&n.type!==`ThrowStatement`}function Sl(e){return xl(e.parent,e)}function Cl(e){if(e.defs.length!==1)return;let[t]=e.defs;if(t!==void 0){if(t.type===`FunctionName`&&A(t.node))return t.node;if(t.type===`Variable`&&t.node.type===`VariableDeclarator`&&t.node.init!==null&&(t.node.init.type===`FunctionExpression`||t.node.init.type===`ArrowFunctionExpression`))return t.node.init}}const wl=b(`no-use-of-empty-return-value`,`general`,{create(e){let t=new Map,n=new Set,r=[];function i(e){if(r.push(e),e.async||e.generator){n.add(e);return}e.type===`ArrowFunctionExpression`&&e.expression&&n.add(e)}function a(){r.pop()}return{ArrowFunctionExpression:i,"ArrowFunctionExpression:exit":a,CallExpression(n){if(!Sl(n)||n.callee.type!==`Identifier`)return;let r=e.sourceCode.getScope(n),i=r.references.find(e=>e.identifier===n.callee)?.resolved??_(r,n.callee.name);if(i===void 0)return;let a=Cl(i);a!==void 0&&t.set(n.callee,a)},FunctionDeclaration:i,"FunctionDeclaration:exit":a,FunctionExpression:i,"FunctionExpression:exit":a,"Program:exit"(){for(let[r,i]of t)n.has(i)||e.report({data:{name:r.name},messageId:`removeUseOfOutput`,node:r})},ReturnStatement(e){if(e.argument===null)return;let t=r.at(-1);t!==void 0&&n.add(t)}}},meta:{docs:{description:`Disallow using the return value of functions that do not return anything.`,recommended:!0},messages:{removeUseOfOutput:`Remove this use of the output from "{{name}}"; "{{name}}" doesn't return anything.`},schema:[],type:`problem`}}),Tl=[`Axes`,`BrickColor`,`CFrame`,`Color3`,`ColorSequence`,`ColorSequenceKeypoint`,`DateTime`,`Enum`,`Faces`,`NumberRange`,`NumberSequence`,`NumberSequenceKeypoint`,`PathWaypoint`,`PhysicalProperties`,`Ray`,`Rect`,`Region3`,`Region3int16`,`TweenInfo`,`UDim`,`UDim2`,`Vector2`,`Vector3`,`Vector3int16`,`Vector3int32`],El=new Set([`!`,`+`,`-`,`typeof`,`void`,`~`]),Dl=new Set(`ArrayExpression.ArrowFunctionExpression.AssignmentExpression.AwaitExpression.BinaryExpression.CallExpression.ChainExpression.ClassExpression.ConditionalExpression.FunctionExpression.Identifier.ImportExpression.Literal.LogicalExpression.MemberExpression.MetaProperty.NewExpression.ObjectExpression.ParenthesizedExpression.SequenceExpression.Super.TaggedTemplateExpression.TemplateLiteral.ThisExpression.TSAsExpression.TSInstantiationExpression.TSNonNullExpression.TSSatisfiesExpression.TSTypeAssertion.UnaryExpression.UpdateExpression.YieldExpression`.split(`.`));function Ol(e){return Dl.has(e.type)}function R(e){return e.type===`module`||e.type===`global`}function z(e){for(let t of e.defs)if(t.type===`ImportBinding`)return!0;return!1}function kl(e){return e.type===`Variable`}function Al(e){if(!kl(e))return;let{node:t}=e;if(t.type!==`VariableDeclarator`)return;let{parent:n}=t;if(n.type===`VariableDeclaration`&&n.kind===`const`)return t.init??void 0}function jl(e,t){let n=_(e.getScope(t),t.name);if(!(n===void 0||!R(n.scope)))for(let e of n.defs){let t=Al(e);if(t!==void 0)return t}}function Ml(e,t){let n=_(e.getScope(t),t.name);if(n!==void 0)for(let e of n.defs){let t=Al(e);if(t!==void 0)return t}}function Nl(e,t,n){let r=m(t);if(n.has(r))return!1;if(n.add(r),r.type===`Identifier`&&r.name===`undefined`||r.type===`UnaryExpression`&&r.operator===`void`)return!0;if(r.type!==`Identifier`)return!1;let i=Ml(e,r);return i!==void 0&&Nl(e,i,n)}function Pl(e,t,n,r){return t.type===`Identifier`?!0:Ol(t)?B(e,t,n,r):!1}function Fl(e){let t=m(e);for(;t.type===`MemberExpression`;)t=m(t.object);return t.type===`Identifier`?t.name:void 0}function Il(e,t,n,r){if(r.staticCallsRequireFactories===!0){let e=Fl(t);if(e===void 0||!r.staticGlobalFactories.has(e))return!1}let i=m(t);return i.type===`Identifier`?Rl(e,i,n,r):i.type!==`MemberExpression`||!B(e,i.object,n,r)?!1:i.computed?B(e,i.property,n,r):i.property.type===`Identifier`}function Ll(e,t,n,r,i){return Il(e,n,r,i)?t.every(t=>t.type!==`SpreadElement`&&B(e,t,r,i)):!1}function B(e,t,n,r){let i=m(t);if(n.has(i))return!1;switch(n.add(i),i.type){case`ArrayExpression`:return Vl(e,i,n,r);case`BinaryExpression`:case`LogicalExpression`:return Ol(i.left)?B(e,i.left,n,r)&&B(e,i.right,n,r):!1;case`CallExpression`:return Ll(e,i.arguments,i.callee,n,r);case`ConditionalExpression`:return B(e,i.test,n,r)&&B(e,i.consequent,n,r)&&B(e,i.alternate,n,r);case`Identifier`:return Rl(e,i,n,r);case`Literal`:return!0;case`MemberExpression`:return B(e,i.object,n,r)&&(!i.computed||Pl(e,i.property,n,r));case`NewExpression`:return Ll(e,i.arguments,i.callee,n,r);case`ObjectExpression`:return Bl(e,i,n,r);case`SequenceExpression`:return i.expressions.length>0&&i.expressions.every(t=>B(e,t,n,r));case`TemplateLiteral`:return i.expressions.length===0;case`UnaryExpression`:return El.has(i.operator)&&B(e,i.argument,n,r);default:return!1}}function Rl(e,t,n,r){let i=_(e.getScope(t),t.name);if(i===void 0)return r.staticGlobalFactories.has(t.name);if(!R(i.scope))return!1;if(z(i))return!0;for(let t of i.defs){let i=Al(t);if(i!==void 0&&B(e,i,n,r))return!0}return!1}function zl(e){return e.type!==`PrivateIdentifier`&&e.type!==`Identifier`}function Bl(e,t,n,r){for(let i of t.properties)if(i.type!==`Property`||i.kind!==`init`||i.computed&&zl(i.key)&&!B(e,i.key,n,r)||!B(e,i.value,n,r))return!1;return!0}function Vl(e,{elements:t},n,r){for(let i of t)if(i===null||i.type===`SpreadElement`||!B(e,i,n,r))return!1;return!0}const Hl=/^[A-Z][A-Z0-9_]*$/u,Ul={staticGlobalFactories:new Set(Tl)},Wl=[String.raw`^Array\b`,String.raw`^Object\b`,String.raw`^Map\b`,String.raw`^Set\b`,String.raw`^WeakMap\b`,String.raw`^WeakSet\b`];function Gl(e){let t=[],n=0,r=[e];for(;r.length>0;){let e=r.pop();if(e===void 0)break;e.type!==`global`&&(t[n++]=e);for(let t of e.childScopes)r.push(t)}return t}function Kl(e){return k(e)||e.type===`ClassExpression`}const ql=new Set([`ArrayExpression`,`ObjectExpression`,`JSXElement`,`JSXFragment`]);function Jl(e,t,n){if(ql.has(e.type))return!0;if(e.type!==`CallExpression`&&e.type!==`NewExpression`)return!1;let r=n.getText(e.callee);for(let e of t)if(e.test(r))return!0;return!1}function Yl(e){return e.type===`Program`||e.type===`BlockStatement`}function Xl(e){let t=e;for(;;)switch(t.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:t=t.expression;break;case`Identifier`:return t.name;case`MemberExpression`:t=t.object;break;default:return}}function Zl(e,t){for(let n of e.elements){if(n===null)return!1;t.push(n)}return!0}function Ql(e,t,n){let r=Xl(e.callee);if(r===void 0||!t.has(r))return!1;n.push(e.callee);for(let t of e.arguments)n.push(t);return!0}function $l(e,t){for(let n of e.properties){if(n.type!==`Property`)return!1;n.computed&&t.push(n.key),t.push(n.value)}return!0}function eu(e,t,n){if(e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||e.type===`TSAsExpression`||e.type===`TSInstantiationExpression`||e.type===`TSNonNullExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSTypeAssertion`)return n.push(e.expression),!0;switch(e.type){case`ArrayExpression`:return Zl(e,n);case`BinaryExpression`:case`LogicalExpression`:return n.push(e.left,e.right),!0;case`CallExpression`:case`NewExpression`:return Ql(e,t,n);case`ConditionalExpression`:return n.push(e.test,e.consequent,e.alternate),!0;case`MemberExpression`:return n.push(e.object),e.computed&&n.push(e.property),!0;case`ObjectExpression`:return $l(e,n);case`SequenceExpression`:case`SpreadElement`:return!1;case`TemplateLiteral`:for(let t of e.expressions)n.push(t);return!0;case`UnaryExpression`:return n.push(e.argument),!0;default:return!0}}function tu(e,t){let n=[e],r=0;for(;r<n.length;){let e=n[r];if(e===void 0||(r+=1,!eu(e,t,n)))return!1}return!0}function nu(e,t){return t.type===`Literal`||B(e,t,new Set,Ul)&&tu(t,Ul.staticGlobalFactories)}function ru(e,t){let n=t;for(;n.type===`ParenthesizedExpression`;)n=n.expression;return e.getText(n)}function iu(e,t){let{parent:n}=e;if(!Yl(n))return!1;let{body:r}=n;for(let n=0;n<r.length;n+=1)if(r[n]===e)return r[n+1]===t;return!1}function au(e){let t=e.parent,n=e;for(;t!==null;){if(w(t)&&t.init===n)return t;n=t,t=t.parent}}const ou=b(`no-useless-constants`,`general`,{create(e){let{sourceCode:t}=e,[n]=e.options,r=(n?.ignoreCallPatterns??Wl).map(e=>new RegExp(e,`u`));function i(e,n){let r,i=0;for(let e of n.references)e.isReadOnly()&&(i+=1,r=e);if(i===1&&r!==void 0&&r.from===e&&t.getScope(r.identifier)===e)return r}function a(e,n){let{name:a}=n;if(!Hl.test(a))return;let[o]=n.defs;if(o?.type!==`Variable`)return;let s=o.node;if(!w(s)||!Ze(s.id)||s.init===null)return;let c=o.parent;if(c===null||!ke(c)||c.kind!==`const`||c.declarations.length!==1||Ae(c.parent))return;let l=s.init;if(Kl(l)||Jl(l,r,t))return;let u=i(e,n);if(u===void 0||!Ze(u.identifier))return;let d=au(u.identifier);if(d===void 0)return;let f=d.parent;if(!(!ke(f)||f.kind!==`const`))return{name:a,declarationNode:c,enclosingDeclaration:f,initializer:l,referenceIdentifier:u.identifier,reportNode:s.id}}function o(n){let r=[];for(let i of n.variables){let o=a(n,i);if(o===void 0)continue;let s=iu(o.declarationNode,o.enclosingDeclaration),c=nu(t,o.initializer),l=tu(o.initializer,Ul.staticGlobalFactories);if(!((s||c)&&l&&!ne(t,o.declarationNode))){e.report({data:{name:o.name},messageId:`uselessConstantNoFix`,node:o.reportNode});continue}r.push({name:o.name,declarationNode:o.declarationNode,initializerText:ru(t,o.initializer),referenceIdentifier:o.referenceIdentifier,reportNode:o.reportNode})}s(r)}function s(n){let[r]=n;r!==void 0&&e.report({data:{name:r.name,names:n.map(e=>e.name).join(`, `)},fix(e){let r=[],i=0;for(let t of n)r[i++]=e.replaceText(t.referenceIdentifier,t.initializerText);for(let a of n)r[i++]=e.removeRange(y(t.text,a.declarationNode));return r},messageId:n.length===1?`uselessConstant`:`uselessConstants`,node:r.reportNode})}return{"Program:exit"(e){let n=Gl(t.getScope(e));for(let e of n)o(e)}}},meta:{docs:{description:`Disallow constants that do not add value.`,recommended:!0},fixable:`code`,messages:{uselessConstant:`Constant '{{name}}' is only referenced once in the same scope. Inline it directly, or move it to a higher scope if reference stability is needed.`,uselessConstantNoFix:`Constant '{{name}}' is only referenced once in the same scope. It cannot be auto-inlined because the initializer is not safely movable or the declaration has attached comments. Inline it manually, or move it to a higher scope if reference stability is needed.`,uselessConstants:`Constants '{{names}}' are only referenced once in the same scope. Inline them directly, or move them to a higher scope if reference stability is needed.`},schema:[{additionalProperties:!1,properties:{ignoreCallPatterns:{default:[...Wl],description:`Regular expression patterns for call expressions that should be ignored.`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}}),su=new Set([`push`,`unshift`]),cu=new Set([`max`,`min`]),lu=`Math`;function uu(e){if(!O(e))return;let t=g(e);if(t!==void 0){if(su.has(t))return t;if(cu.has(t))return se(e.object,lu)?`${lu}.${t}`:void 0}}const du=b(`no-variadic-spread`,`general`,{createOnce(e){return{CallExpression(t){let n=uu(t.callee);if(n!==void 0)for(let r of t.arguments)r.type===`SpreadElement`&&m(r.argument).type!==`ArrayExpression`&&e.report({data:{method:n},messageId:`noVariadicSpread`,node:r})}}},meta:{docs:{description:`Disallow spreading a potentially unbounded array into a variadic call, because every element becomes a stack-allocated argument.`},messages:{noVariadicSpread:`Spreading an array into {{method}}() passes every element as its own stack argument, so a large array throws 'RangeError: Maximum call stack size exceeded'. Iterate the array instead.`},schema:[],type:`problem`}}),fu=b(`only-type-imports`,`general`,{create(e){return{ImportDeclaration(t){t.importKind!==`type`&&e.report({messageId:`onlyTypeImports`,node:t})}}},meta:{docs:{description:`Require all imports to be type-only imports. Benchmarks cannot import non-types because the benchmarker plugin will throw an error.`,recommended:!0},messages:{onlyTypeImports:"Benchmarks must use `import type` to avoid runtime imports that break the benchmarker plugin."},schema:[],type:`problem`}});function pu(e,t){for(let n of e.elements)if(n!==null){if(n.type===`SpreadElement`)return!1;t.push(n)}return!0}function mu(e,t){for(let n of e.properties){if(n.type===`SpreadElement`||n.computed)return!1;t.push(n.value)}return!0}function hu(e,t){switch(e.type){case`ArrayExpression`:return pu(e,t);case`CallExpression`:return e.callee.type===`MemberExpression`&&(t.push(e.callee.object),!0);case`Literal`:return!0;case`MemberExpression`:return t.push(e.object),!0;case`ObjectExpression`:return mu(e,t);default:return!1}}function gu(e){if(e===void 0)return!1;let t=[e],n=0;for(;n<t.length;){let e=t[n];if(e===void 0||(n+=1,!hu(e,t)))return!1}return!0}function _u(e){let t=e;for(;t.type===`MemberExpression`;){if(t.computed&&!Fe(t.property))return!1;t=t.object}return!0}function vu(e){return e.type===`MethodDefinition`&&e.kind===`constructor`&&e.key.type===`Identifier`&&e.key.name===`constructor`}function yu(e){if(e.type!==`ExpressionStatement`)return!1;let{expression:t}=e;if(t.type!==`AssignmentExpression`)return!1;let{left:n}=t;if(n.type!==`MemberExpression`||n.object.type!==`ThisExpression`)return!1;let{property:r}=n;return(r.type===`Identifier`||Fe(r))&&gu(t.right)&&_u(n)}const bu=b(`prefer-class-properties`,`general`,{create(e){let[t]=e.options;if(t===`never`)return{PropertyDefinition(t){t.static||e.report({messageId:`unexpectedClassProperty`,node:t})}};function n(t){for(let n of t.body.body)if(!(!vu(n)||n.value.body===null))for(let t of n.value.body.body)yu(t)&&e.report({messageId:`unexpectedAssignment`,node:t.expression})}return{ClassDeclaration(e){n(e)},ClassExpression(e){n(e)}}},meta:{docs:{description:`Prefer class properties to assignment of literals in constructors.`},messages:{unexpectedAssignment:`Constructor assigns a literal value to this.property. Literals are static and known at class definition time. Move to a class property declaration: propertyName = value; at class level. This clarifies intent and reduces constructor complexity.`,unexpectedClassProperty:`Class property declarations are disabled by rule configuration (mode: 'never'). Move initialization into the constructor: this.propertyName = value; inside constructor().`},schema:[{enum:[`always`,`never`],type:`string`}],type:`suggestion`}});function xu(e){return!t.isObject(e)||!t.isNumber(e.maximumStatements)?1:e.maximumStatements}function Su(e){return e.type===`IfStatement`&&e.alternate===null}function Cu(e,t){return e.type===`ExpressionStatement`&&t===0||e.type===`BlockStatement`&&e.body.length>t}function wu(e,t){if(e.body.length!==1)return!1;let[n]=e.body;return n===void 0||!Su(n)?!1:Cu(n.consequent,t)}const Tu=b(`prefer-early-return`,`general`,{create(e){let t=xu(e.options[0]);function n(n){wu(n,t)&&e.report({messageId:`preferEarlyReturn`,node:n})}function r(e){e.body!==null&&n(e.body)}return{ArrowFunctionExpression(e){e.body.type===`BlockStatement`&&n(e.body)},FunctionDeclaration:r,FunctionExpression:r}},meta:{docs:{description:`Prefer early returns over full-body conditional wrapping.`,recommended:!0},messages:{preferEarlyReturn:`Function body is wrapped in a single conditional without an else branch. This increases nesting depth and cognitive load. Invert the condition and return early: if (!condition) return; then place the main logic at the top level.`},schema:[{additionalProperties:!1,properties:{maximumStatements:{default:1,description:`Maximum allowed statement count inside the guarded branch before reporting.`,minimum:0,type:`number`}},type:`object`}],type:`suggestion`}});function Eu(e){return e.type===`Identifier`&&(e.name===`it`||e.name===`test`)}function Du(e){if(e.callee.type!==`MemberExpression`||!Eu(e.callee.object))return!1;let t=g(e.callee);return t===`only`||t===`skip`}function Ou(e){return e.callee.type!==`MemberExpression`||!Eu(e.callee.object)?!1:g(e.callee)===`each`}function ku(e){let t=e.arguments.at(-1);return t===void 0||!Le(t)?void 0:t}function Au(e){return e.type===`DoWhileStatement`||e.type===`ForInStatement`||e.type===`ForOfStatement`||e.type===`ForStatement`||e.type===`WhileStatement`}function ju(e,t){return e.type===t.type&&e.range[0]===t.range[0]&&e.range[1]===t.range[1]}function Mu(e,t){return{hasCallback:e.hasCallback||t.hasCallback,hasIndeterminate:e.hasIndeterminate||t.hasIndeterminate,hasLoop:e.hasLoop||t.hasLoop}}function Nu(e,t){if(ju(e,t))return{hasCallback:!1,hasIndeterminate:!1,hasLoop:!1};let n={hasCallback:Le(e),hasIndeterminate:Le(e)||Au(e)||e.type===`ConditionalExpression`||e.type===`IfStatement`||e.type===`SwitchCase`||e.type===`TryStatement`&&e.handler!==null,hasLoop:Au(e)};return e.parent===null?n:Mu(n,Nu(e.parent,t))}function Pu(e){return e.callee.type===`Identifier`?Eu(e.callee):Du(e)?!0:e.callee.type===`CallExpression`&&Ou(e.callee)}function Fu(e){return Pu(e)?ku(e):void 0}function Iu({callee:e}){return e.type!==`MemberExpression`||e.object.type!==`Identifier`||e.object.name!==`expect`?!1:g(e)===`assertions`}function Lu({callee:e}){return e.type!==`MemberExpression`||e.object.type!==`Identifier`||e.object.name!==`expect`?!1:g(e)===`hasAssertions`}function Ru(e,t=[]){return e.callee.type===`Identifier`&&(e.callee.name===`expect`||t.includes(e.callee.name))}function zu(e,t=[]){let n=0,r=!1,i=!1,a=!1,o=0;return da(e,s=>{if(s.type!==`CallExpression`||!Ru(s,t))return;let c=Nu(s.parent,e);if(c.hasLoop&&(i=!0),c.hasCallback&&(r=!0),c.hasIndeterminate){a=!0,o+=1;return}n+=1}),{deterministic:n,hasExpectInCallback:r,hasExpectInLoop:i,hasIndeterminate:a,indeterminate:o}}function Bu(e){return Array.isArray(e)?e.filter(t.isString):[]}function Vu(e){return t.isObject(e)?{additionalAssertionFunctions:Bu(e.additionalAssertionFunctions),additionalExpectCallNames:Bu(e.additionalExpectCallNames),onlyFunctionsWithAsyncKeyword:e.onlyFunctionsWithAsyncKeyword,onlyFunctionsWithExpectInCallback:e.onlyFunctionsWithExpectInCallback,onlyFunctionsWithExpectInLoop:e.onlyFunctionsWithExpectInLoop}:{additionalAssertionFunctions:[],additionalExpectCallNames:[],onlyFunctionsWithAsyncKeyword:!1,onlyFunctionsWithExpectInCallback:!1,onlyFunctionsWithExpectInLoop:!1}}function Hu(e){return[...new Set([...e.additionalExpectCallNames,...e.additionalAssertionFunctions])]}function Uu(e){return e.onlyFunctionsWithAsyncKeyword||e.onlyFunctionsWithExpectInCallback||e.onlyFunctionsWithExpectInLoop}function Wu(e){return e.body??void 0}function Gu(e){let t=Wu(e);return t?.type===`BlockStatement`?t:void 0}function Ku(e,t,n,r,i,a){return n+r===0?!1:!Uu(t)||t.onlyFunctionsWithAsyncKeyword&&e.async||t.onlyFunctionsWithExpectInCallback&&i||t.onlyFunctionsWithExpectInLoop&&a}function qu(e){let t=Gu(e);if(t===void 0)return;let[n]=t.body;if(n?.type===`ExpressionStatement`&&n.expression.type===`CallExpression`)return n.expression}function Ju(e,t,n,r,i){let a=Gu(t);if(a===void 0){e.report({messageId:`haveExpectAssertions`,node:n});return}let[o]=a.body;if(i){e.report({messageId:`haveExpectAssertions`,node:n,suggest:[{fix(e){return o===void 0?e.insertTextAfterRange([a.range[0],a.range[0]+1],` expect.hasAssertions();`):e.insertTextBefore(o,`expect.hasAssertions();
88
+ `)},messageId:`suggestAddingHasAssertions`}]});return}e.report({messageId:`haveExpectAssertions`,node:n,suggest:[{data:{count:String(r)},fix(e){return o===void 0?e.insertTextAfterRange([a.range[0],a.range[0]+1],` expect.assertions(${r});`):e.insertTextBefore(o,`expect.assertions(${r});\n`)},messageId:`suggestAddingAssertions`}]})}function Yu(e,t,n,r){if(Lu(t)){t.arguments.length>0&&e.report({messageId:`hasAssertionsTakesNoArguments`,node:t});return}if(!Iu(t))return;if(t.arguments.length!==1){e.report({messageId:`assertionsRequiresOneArgument`,node:t});return}let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`||!ze(i)){e.report({messageId:`assertionsRequiresNumberArgument`,node:t});return}!r&&n>0&&i.value!==n&&e.report({data:{actual:String(n),expected:String(i.value)},messageId:`wrongAssertionCount`,node:t})}const Xu=b(`prefer-expect-assertions`,`general`,{create(e){let t=Vu(e.options[0]);return{CallExpression(n){if(!Pu(n))return;let r=Fu(n);if(r===void 0)return;let i=Wu(r);if(i===void 0)return;let{deterministic:a,hasExpectInCallback:o,hasExpectInLoop:s,hasIndeterminate:c,indeterminate:l}=zu(i,Hu(t));if(!Ku(r,t,a,l,o,s))return;let u=qu(r);if(u!==void 0&&(Iu(u)||Lu(u))){if(Yu(e,u,a,c),!c&&Lu(u)&&u.arguments.length===0&&a>0){let[t]=Gu(r)?.body??[];t!==void 0&&e.report({data:{count:String(a)},fix(e){return e.replaceText(t,`expect.assertions(${a});`)},messageId:`preferAssertionsCount`,node:u})}return}Ju(e,r,n,a,c)}}},meta:{docs:{description:`Enforce expect assertion guards in tests and prefer expect.assertions(n) over expect.hasAssertions() when the count is known.`,recommended:!0},fixable:`code`,hasSuggestions:!0,messages:{assertionsRequiresNumberArgument:`This argument should be a number`,assertionsRequiresOneArgument:"`expect.assertions` expects a single argument of type number",hasAssertionsTakesNoArguments:"`expect.hasAssertions` expects no arguments",haveExpectAssertions:"Every test should have either `expect.assertions(<number of assertions>)` or `expect.hasAssertions()` as its first expression",preferAssertionsCount:"Use `expect.assertions({{count}})` instead of `expect.hasAssertions()` when the count is known",suggestAddingAssertions:"Add `expect.assertions({{count}})`",suggestAddingHasAssertions:"Add `expect.hasAssertions()`",wrongAssertionCount:`Expected {{expected}} assertions, but test has {{actual}} expect calls`},schema:[{additionalProperties:!1,properties:{additionalAssertionFunctions:{default:[],description:`Additional assertion function names counted as test assertions.`,items:{type:`string`},type:`array`},additionalExpectCallNames:{default:[],description:`Additional expect-like call names counted when checking assertion counts.`,items:{type:`string`},type:`array`},onlyFunctionsWithAsyncKeyword:{default:!1,description:`Only require assertion guards for test callbacks marked async.`,type:`boolean`},onlyFunctionsWithExpectInCallback:{default:!1,description:`Only require assertion guards when expect is called inside a nested callback.`,type:`boolean`},onlyFunctionsWithExpectInLoop:{default:!1,description:`Only require assertion guards when expect is called inside a loop.`,type:`boolean`}},type:`object`}],type:`suggestion`}}),Zu=/^[A-Z][A-Z0-9_]*$/u;function Qu(e){let{type:t}=e;if(t===`module`||t===`global`)return!0;if(e.upper?.type===`global`){let{block:t}=e.upper;if(t.type===`Program`&&t.sourceType===`script`)return!0}return!1}const $u=b(`prefer-module-scope-constants`,`general`,{create(e){let t=!1;return{VariableDeclaration(e){t=e.kind===`const`},"VariableDeclaration:exit"(){t=!1},VariableDeclarator(n){let{id:r}=n;if(!(r.type!==`Identifier`||!Zu.test(r.name))){if(!t){e.report({messageId:`mustUseConst`,node:n});return}Qu(e.sourceCode.getScope(n))||e.report({messageId:`mustBeModuleScope`,node:n})}}}},meta:{docs:{description:`Prefer screaming snake case constants at module scope or the allowed top-level wrapper scope.`},messages:{mustBeModuleScope:`You must place screaming snake case at module scope. If this is not meant to be a module-scoped variable, use camelcase instead.`,mustUseConst:"You must use `const` when defining screaming snake case variables. If this is not a constant, use camelcase instead."},schema:[],type:`suggestion`}}),ed=s(`boolean`),td=s(`string`),nd=s(`undefined`),rd=td.array().readonly(),id=s(`Record<string, string>`).readonly(),ad=`not all execution paths`;s({"alternatives?":rd.or(nd),closer:rd.or(td),opener:td,"openerAlternatives?":rd.or(nd),"platform?":`"roblox" | undefined`,"requireSync?":ed.or(nd),"yieldingFunctions?":rd.or(nd)}).readonly();const od=new Set([`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`WhileStatement`]),sd=[`task.wait`,`wait`,`*.WaitForChild`,`*.*Async`];function cd(e,t){for(let n of t){let t=!1;for(let r of n)if(r.index===e.index){t=!0;break}if(!t)return!1}return!0}function ld(e,t){return t.filter(t=>t.some(({index:t})=>t===e.index))}function ud({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`){let t=e.object.type===`Identifier`?e.object.name:void 0,n=e.property.type===`Identifier`?e.property.name:void 0;if(t!==void 0&&n!==void 0)return`${t}.${n}`}}function V(e){let n=[],r=0;if(M(e.closer))for(let t of e.closer)n[r++]=t;else t.isString(e.closer)&&(n[r++]=e.closer);if(e.alternatives)for(let t of e.alternatives)n[r++]=t;return n}function dd(e){let t=[e.opener];if(e.openerAlternatives){let n=1;for(let r of e.openerAlternatives)t[n++]=r}return t}function fd(e){return e.length===0?`configured opener`:e.length===1?e[0]??`configured opener`:e.join(`' or '`)}function pd(e){return e?od.has(e.type):!1}function md(e){return e?.type===`SwitchStatement`}function hd(e,t){if(e.type!==`Identifier`)return;let n=t;for(;n;){if(n.type===`LabeledStatement`&&n.label.name===e.name)return n.body;n=n.parent??void 0}}function gd(e,t){let n=e.label?hd(e.label,e.parent):void 0;if(n)return pd(n)?n:void 0;let r=e.parent;for(;r;){if(pd(r))return r;if(t&&md(r))return;r=r.parent??void 0}}function _d(e){return gd(e,!0)}function vd(e){return gd(e,!1)}function yd(e){return{...e,loopAncestors:[...e.loopAncestors]}}const bd=b(`require-paired-calls`,`general`,{create(e){let[t]=e.options,n={allowConditionalClosers:t?.allowConditionalClosers??!1,allowMultipleOpeners:t?.allowMultipleOpeners??!0,maxNestingDepth:t?.maxNestingDepth??0,pairs:t?.pairs??[]},r={pairs:n.pairs.length===0?[{closer:`debug.profileend`,opener:`debug.profilebegin`,platform:`roblox`,requireSync:!0,yieldingFunctions:[...sd]}]:n.pairs};n.allowConditionalClosers!==void 0&&(r.allowConditionalClosers=n.allowConditionalClosers),n.allowMultipleOpeners!==void 0&&(r.allowMultipleOpeners=n.allowMultipleOpeners),n.maxNestingDepth!==void 0&&(r.maxNestingDepth=n.maxNestingDepth);let i=[],a=[],o=0,s=[],c=!1,l=!1,u=[],d=new Map,f=new Map,p=new Map;function m(e){if(p.has(e))return p.get(e)??[];let t=[],n=0;for(let i of r.pairs){if(!dd(i).includes(e))continue;let r=V(i);for(let e of r)t.includes(e)||(t[n++]=e)}return p.set(e,t),t}function h(){return u.length>0?u.at(-1):{asyncContext:!1,currentFunction:void 0,hasEarlyExit:!1,inCatch:!1,inConditional:!1,inFinally:!1,inLoop:!1,inTry:!1}}function g(e){let t=h();u.push({...t,...e})}function _(){u.pop()}function ee(e){let t=u.at(-1);t&&(u[u.length-1]={...t,...e})}function te(){return i.map(yd)}function v(e){d.set(e,te())}function y(e,t){return r.pairs.find(n=>(t?dd(n):V(n)).includes(e))}function ne(e,t){return t.platform===`roblox`&&(t.yieldingFunctions??sd).some(t=>{if(t.startsWith(`*.`)){let n=t.slice(2);return e.endsWith(`.${n}`)}return e===t})}function b(e){let t=V(e);return t.length===1?t[0]??`closer`:t.join(`' or '`)}function re(t,n){e.report({data:{closer:b(t.config),opener:t.opener,paths:n},messageId:`unpairedOpener`,node:t.node})}function x(e){i.length=0;for(let t of e)i.push({...t})}function S(e){let t=f.get(e)??[];t.push(te()),f.set(e,t)}function ie(e,t,n){for(let i of e){let e=ld(i,t);e.length<=0||e.length>=t.length||r.allowConditionalClosers===!1&&re(i,n)}}function C(e){(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`)&&(s.push([...i]),i.length=0,c=!1,l=!1,g({asyncContext:e.async,currentFunction:e,hasEarlyExit:!1,inCatch:!1,inConditional:!1,inFinally:!1,inLoop:!1,inTry:!1}))}function w(){if(i.length>0)for(let e of i)re(e,`function exit`);let e=s.pop();if(e){i.length=0;for(let t of e)i.push(t)}else i.length=0;_()}function ae(e){e.type===`IfStatement`&&(g({inConditional:!0}),v(e))}function oe(e){if(e.type!==`IfStatement`)return;_();let t=d.get(e),n=f.get(e);if(t&&n&&n.length>0){let r=e.alternate!==null;for(let e of n)for(let n of e)t.some(({index:e})=>e===n.index)||re(n,`conditional branch`);if(r){ie(t,n,ad),i.length=0;for(let e of t)cd(e,n)&&i.push(e)}else x(t)}d.delete(e),f.delete(e)}function se(e){let{parent:t}=e;if(t?.type===`IfStatement`){S(t);let e=d.get(t);if(!e)return;x(e)}}function ce(e){let{parent:t}=e;t?.type===`IfStatement`&&S(t)}function le(e){e.type===`TryStatement`&&v(e)}function ue(t){if(t.type!==`TryStatement`)return;let n=d.get(t),a=f.get(t);if(t.finalizer){d.delete(t),f.delete(t);return}if(n&&a&&a.length>0){for(let t of n){let n=a.filter(e=>e.some(e=>e.index===t.index));if(n.length>0&&n.length<a.length&&r.allowConditionalClosers===!1){let n=V(t.config),r=n.length===1?n[0]??`closer`:n.join(`' or '`);e.report({data:{closer:r,opener:t.opener,paths:ad},messageId:`unpairedOpener`,node:t.node})}}i.length=0;for(let e of n)cd(e,a)&&i.push(e)}d.delete(t),f.delete(t)}function de(){g({inTry:!0})}function T(e,t){if(e.type!==t)return;let{parent:n}=e;if(n.type===`TryStatement`){S(n);let e=d.get(n);e&&x(e)}_()}function E(e){T(e,`BlockStatement`)}function fe(){g({inCatch:!0})}function pe(e){T(e,`CatchClause`)}function me(){g({inFinally:!0})}function he(e){e.type===`SwitchStatement`&&(g({inConditional:!0}),v(e))}function ge(e){if(e.type!==`SwitchStatement`)return;_();let t=d.get(e),n=f.get(e);if(t&&n&&n.length>0){if(e.cases.some(e=>e.test===null)&&n.length===e.cases.length){ie(t,n,ad);let e=t.filter(e=>cd(e,n));i.length=0;for(let t of e)i.push(t)}else x(t)}d.delete(e),f.delete(e)}function _e(e){if(e.type!==`SwitchCase`)return;let{parent:t}=e;if(t.type===`SwitchStatement`){S(t);let e=d.get(t);if(!e)return;x(e)}}function ve(e){pd(e)&&(a.push(e),g({inLoop:!0}))}function D(){a.length>0&&a.pop(),_()}function O(t){if(ee({hasEarlyExit:!0}),!(h().inFinally||i.length===0))for(let{config:n,node:r,opener:a}of i){let i=V(n),o=i.length===1?i[0]??`closer`:i.join(`' or '`),s=t.type===`ReturnStatement`?`return`:`throw`;e.report({data:{closer:o,opener:a,paths:`${s} at line ${t.loc.start.line}`},messageId:`unpairedOpener`,node:r})}}function ye(t){if(t.type!==`BreakStatement`&&t.type!==`ContinueStatement`||i.length===0)return;let n=t.type===`ContinueStatement`?vd(t):_d(t);if(n)for(let{config:r,loopAncestors:a,node:o,opener:s}of i){if(a.every(e=>e!==n))continue;let i=V(r),c=i.length===1?i[0]??`closer`:i.join(`' or '`),l=t.type===`BreakStatement`?`break`:`continue`,u=t.loc.start.line;e.report({data:{closer:c,opener:s,paths:`${l} at line ${u}`},messageId:`unpairedOpener`,node:o})}}function be(t,n,s){let c=r.maxNestingDepth??0;c>0&&i.length>=c&&e.report({data:{max:String(c)},messageId:`maxNestingExceeded`,node:t}),r.allowMultipleOpeners===!1&&i.length>0&&i.at(-1)?.opener===n&&e.report({data:{opener:n},messageId:`multipleOpeners`,node:t});let l={config:s,index:o++,location:t.loc,loopAncestors:[...a],node:t,opener:n};i.push(l)}function xe(t,n){let r=i.findLastIndex(e=>V(e.config).includes(n));if(r===-1){if(c&&!l){l=!0;return}if(i.length===0){e.report({data:{closer:n},messageId:`unpairedCloser`,node:t});return}let r=fd(m(i.at(-1).opener));e.report({data:{closer:n,expected:r},messageId:`unexpectedCloser`,node:t});return}let a=i[r];if(a){if(r!==i.length-1){let r=i.at(-1);r&&e.report({data:{actual:r.opener,closer:n,expected:a.opener},messageId:`wrongOrder`,node:t})}i.splice(r,1)}}function Se(t,n,r){let i=V(r.config),a=i.length===1?i[0]??`closer`:i.join(`' or '`);e.report({data:{closer:a,yieldingFunction:n},messageId:`robloxYieldViolation`,node:t})}function Ce(t){if(t.type===`AwaitExpression`||t.type===`YieldExpression`||t.type===`ForOfStatement`)for(let{config:n,opener:r}of i){if(n.requireSync!==!0)continue;let i=V(n),a=i.length===1?i[0]??`closer`:i.join(`' or '`),o=t.type===`YieldExpression`?`yield`:`await`;e.report({data:{asyncType:o,closer:a,opener:r},messageId:`asyncViolation`,node:t})}}function we(e){if(e.type!==`CallExpression`)return;let t=ud(e);if(t===void 0||t===``)return;let n=y(t,!0);if(n){be(e,t,n);return}if(y(t,!1)){xe(e,t);return}for(let n of i)if(ne(t,n.config)){Se(e,t,n),i.length=0,c=!0;return}}return{ArrowFunctionExpression:C,"ArrowFunctionExpression:exit":w,AwaitExpression:Ce,BreakStatement:ye,CallExpression:we,CatchClause:fe,"CatchClause:exit":pe,ContinueStatement:ye,DoWhileStatement:ve,"DoWhileStatement:exit":D,ForInStatement:ve,"ForInStatement:exit":D,ForOfStatement:e=>{e.await&&Ce(e),ve(e)},"ForOfStatement:exit":D,ForStatement:ve,"ForStatement:exit":D,FunctionDeclaration:C,"FunctionDeclaration:exit":w,FunctionExpression:C,"FunctionExpression:exit":w,IfStatement:ae,"IfStatement:exit":oe,"IfStatement > .alternate:exit":ce,"IfStatement > .consequent:exit":se,ReturnStatement:O,"SwitchCase:exit":_e,SwitchStatement:he,"SwitchStatement:exit":ge,ThrowStatement:O,TryStatement:le,"TryStatement:exit":ue,"TryStatement > .block":de,"TryStatement > .block:exit":E,"TryStatement > .finalizer":me,"TryStatement > .finalizer:exit":_,WhileStatement:ve,"WhileStatement:exit":D,YieldExpression:Ce}},meta:{docs:{description:`Enforces balanced opener/closer function calls across all execution paths`,recommended:!1},messages:{asyncViolation:`Cannot use {{asyncType}} between '{{opener}}' and '{{closer}}' (requireSync: true)`,conditionalOpener:`Conditional opener '{{opener}}' at {{location}} may not have matching closer on all paths`,maxNestingExceeded:`Maximum nesting depth of {{max}} exceeded for paired calls`,multipleOpeners:`Multiple consecutive calls to '{{opener}}' without matching closers (allowMultipleOpeners: false)`,robloxYieldViolation:`Yielding function '{{yieldingFunction}}' auto-closes all profiles - subsequent '{{closer}}' will error`,unexpectedCloser:`Unexpected call to '{{closer}}' - expected one of: {{expected}}`,unpairedCloser:`Unexpected call to '{{closer}}' - no matching opener on stack`,unpairedOpener:`Unpaired call to '{{opener}}' - missing '{{closer}}' on {{paths}}`,wrongOrder:`Closer '{{closer}}' called out of order - expected to close '{{expected}}' but '{{actual}}' is still open`},schema:[{additionalProperties:!1,properties:{allowConditionalClosers:{default:!1,description:`Allow closer calls that appear only on some conditional paths.`,type:`boolean`},allowMultipleOpeners:{default:!0,description:`Allow repeated opener calls before matching closer calls.`,type:`boolean`},maxNestingDepth:{default:0,description:`Maximum opener nesting depth before reporting; 0 disables the limit.`,minimum:0,type:`number`},pairs:{default:[{closer:`debug.profileend`,opener:`debug.profilebegin`,platform:`roblox`,requireSync:!0,yieldingFunctions:[...sd]}],description:`Opener and closer call pairs that must stay balanced.`,items:{additionalProperties:!1,properties:{alternatives:{items:{minLength:1,type:`string`},type:`array`},closer:{oneOf:[{minLength:1,type:`string`},{items:{minLength:1,type:`string`},minItems:1,type:`array`}]},opener:{minLength:1,type:`string`},openerAlternatives:{items:{minLength:1,type:`string`},type:`array`},platform:{enum:[`roblox`],type:`string`},requireSync:{default:!1,type:`boolean`},yieldingFunctions:{items:{minLength:1,type:`string`},type:`array`}},required:[`opener`,`closer`],type:`object`},minItems:1,type:`array`}},type:`object`}],type:`problem`}});function xd(e){return t.isObject(e)&&e.metric===`statements`?`statements`:`lines`}function Sd(e,t){let n=e.consequent.length;if(n===0)return!1;let[r]=e.consequent;if(r===void 0||n===1&&r.type===`BlockStatement`)return!1;if(t===`statements`)return n>1;let i=e.consequent[n-1];return i!==void 0&&r.loc.start.line!==i.loc.end.line}const Cd=b(`require-switch-case-braces`,`general`,{create(e){let t=xd(e.options[0]);return{SwitchCase(n){if(!Sd(n,t))return;let[r]=n.consequent,i=n.consequent.at(-1);r!==void 0&&i!==void 0&&e.report({fix(e){return[e.insertTextBefore(r,`{
63
89
  `),e.insertTextAfter(i,`
64
- }`)]},messageId:`wrapCaseBody`,node:r})}}},meta:{docs:{description:`Require braces around switch case bodies selected by line span or statement count.`},fixable:`code`,messages:{wrapCaseBody:`Wrap this switch case body in braces.`},schema:[{additionalProperties:!1,properties:{metric:{default:`lines`,description:`Whether to report cases by line span or by statement count.`,enum:[`lines`,`statements`],type:`string`}},type:`object`}],type:`problem`}});function wd(e){let t=e.parent;for(;t!==null;){switch(t.type){case`ArrowFunctionExpression`:return Td(t);case`FunctionDeclaration`:return t.id?.name;case`FunctionExpression`:return t.id?t.id.name:Td(t)}t=t.parent}}function Td({parent:e}){if(e?.type===`VariableDeclarator`&&e.id.type===`Identifier`)return e.id.name;if(e?.type===`PropertyDefinition`||e?.type===`MethodDefinition`){if(e.key.type===`PrivateIdentifier`)return`#${e.key.name}`;if(e.key.type===`Identifier`)return e.key.name}}function Ed(e){let t=e.parent;for(;t!==null;){switch(t.type){case`ArrowFunctionExpression`:return t.parent.type===`PropertyDefinition`&&t.parent.parent.type===`ClassBody`;case`FunctionDeclaration`:return!1;case`FunctionExpression`:return(t.parent.type===`MethodDefinition`||t.parent.type===`PropertyDefinition`)&&t.parent.parent.type===`ClassBody`}t=t.parent}return!1}function Dd(e,t,n){try{let r=e.getScope(t),i=new Set(r.variables.map(e=>e.name)),a=t.parent;for(;a!==null;)a.type===`CatchClause`&&a.param?.type===`Identifier`&&i.add(a.param.name),a=a.parent;if(!i.has(n))return n;for(let e=2;e<100;e+=1){let t=`${n}${e}`;if(!i.has(t))return t}}catch{}return n}function Od(e,t){try{let n=e.getScope(t);for(;n!==null;){let e=n.set.get(t.name);if(e!==void 0){let t=e.defs.find(e=>e.type===`ImportBinding`);return t?.parent?.type===`ImportDeclaration`?t.parent.source.value:void 0}n=n.upper}}catch{}}function kd(e,t){try{let n=e.getScope(t);for(;n!==null;){if(n.set.has(t.name))return!0;n=n.upper}}catch{}return!1}function Ad(e,n){return t.isString(e)?n===e:(Array.isArray(e.name)?e.name:[e.name]).includes(n)}function jd(e,n,r,i){if(!Ad(i,r.name))return!1;if(t.isString(i))return!0;switch(i.from){case`file`:return kd(e,r)&&Od(e,r)===void 0?i.path===void 0?!0:n===`<input>`||n===`<text>`?!1:n.endsWith(i.path):!1;case`library`:return e.isGlobalReference(r);case`package`:return Od(e,r)===i.package;case void 0:return!0;default:return!1}}function Md(e,t,n,r){return r.some(r=>jd(e,t,n,r))}const Nd=y(`require-throw-error-capture`,`general`,{create(e){let{sourceCode:t}=e,n=e.options[0]?.allow??[],r=e.physicalFilename??`<input>`;return{ThrowStatement(i){let{argument:a}=i;if(a.type!==`NewExpression`)return;let{callee:o}=a;if(o.type!==`Identifier`||!o.name.endsWith(`Error`)||Md(t,r,o,n))return;let s=wd(i);if(s===void 0)return;let c=Ed(i)?`this.${s}`:s;e.report({fix(e){let n=Dd(t,i,`error`),r=[`const ${n} = ${t.getText(a)};`,`Error.captureStackTrace(${n}, ${c});`,`throw ${n};`].join(`
65
- `);return i.parent.type===`BlockStatement`?e.replaceText(i,r):e.replaceText(i,`{\n${r}\n}`)},messageId:`missingCaptureStackTrace`,node:i})}}},meta:{docs:{description:`Require 'Error.captureStackTrace' before directly throwing new Error instances in named functions.`,recommended:!1},fixable:`code`,messages:{missingCaptureStackTrace:`Call 'Error.captureStackTrace' on this error before throwing it so the stack trace points to the throw site.`},schema:[{additionalProperties:!1,properties:{allow:{description:`Error classes that do not need Error.captureStackTrace`,items:{anyOf:[{type:`string`},{additionalProperties:!1,properties:{name:{anyOf:[{type:`string`},{items:{type:`string`},type:`array`}],description:`Name(s) of the error class`},from:{description:`Where the error class is declared`,enum:[`file`,`library`,`package`],type:`string`},package:{description:`Package the error class is imported from (required when from is 'package')`,type:`string`},path:{description:`Optional file path filter for file specifiers (matched against the end of the file path)`,type:`string`}},required:[`name`],type:`object`}]},type:`array`}},type:`object`}],type:`suggestion`}});function Pd(e){return e.includes(`u`)||e.includes(`v`)}function Fd(e,t){return e.type===`Identifier`&&e.name===t}function Id(e){if(!(e.type!==`Literal`||!t.isString(e.value)))return e.value}function Ld(e){return e.type!==`SpreadElement`}const Rd=y(`require-unicode-regex`,`general`,{createOnce(e){return{CallExpression(t){if(!Fd(t.callee,`regex`))return;if(t.arguments.length<2){e.report({messageId:`requireUnicodeFlag`,node:t});return}let[,n]=t.arguments;if(n===void 0||!Ld(n))return;let r=Id(n);r!==void 0&&!Pd(r)&&e.report({messageId:`requireUnicodeFlag`,node:t})}}},meta:{docs:{description:`Require the 'u' or 'v' unicode flag on calls named regex().`},messages:{requireUnicodeFlag:`Missing the 'u' or 'v' unicode flag on this regex() call. Use the unicode flag to avoid silently creating invalid regex patterns.`},schema:[],type:`problem`}});function zd(e,t){let n=[],r=0,i=e;for(;;){if(i.type===`TSParenthesizedType`){i=i.typeAnnotation;continue}if(i.type===`TSArrayType`){n[r++]=`Array`,i=i.elementType;continue}if(i.type===`TSTypeOperator`&&i.operator===`readonly`&&i.typeAnnotation.type===`TSArrayType`){n[r++]=`ReadonlyArray`,i=i.typeAnnotation.elementType;continue}let e=t.getText(i);for(let t=n.length-1;t>=0;--t)e=`${n[t]}<${e}>`;return e}}function Bd({parent:e}){let t=e.type===`TSParenthesizedType`?e.parent:e;return(t.type!==`TSRestType`||t.parent.type!==`TSTupleType`)&&t.type!==`TSTupleType`&&t.type!==`TSArrayType`&&(t.type!==`TSTypeOperator`||t.operator!==`readonly`)}const Vd=y(`array-type-generic`,`naming`,{createOnce(e){function t(t){e.report({fix(n){return n.replaceText(t,zd(t,e.sourceCode))},messageId:`useGenericArrayType`,node:t})}return{TSArrayType(e){Bd(e)&&t(e)},TSTypeOperator(e){e.operator===`readonly`&&e.typeAnnotation.type===`TSArrayType`&&Bd(e)&&t(e)}}},meta:{docs:{description:`Disallow bracket array type syntax and require Array<T> / ReadonlyArray<T>.`},fixable:`code`,messages:{useGenericArrayType:`Bracket array type syntax is not allowed. Use Array<T> or ReadonlyArray<T> generic syntax.`},schema:[],type:`problem`}}),Hd=new Map([[`omit`,{originalName:`Omit`,replacementName:`Except`}]]);function Ud(e){let n=new Map(Hd);if(!t.isObject(e)||!(`bannedTypes`in e))return n;let{bannedTypes:r}=e;if(M(r)){for(let e of r)n.set(e.toLowerCase(),{originalName:e,replacementName:void 0});return n}if(Ei(r))for(let[e,t]of Object.entries(r))n.set(e.toLowerCase(),{originalName:e,replacementName:t});return n}function Wd(e){if(e.type===`Identifier`)return e.name;if(e.type===`TSQualifiedName`)return e.right.name}const Gd=y(`ban-types`,`naming`,{create(e){let[t]=e.options,n=Ud(t);return{TSTypeReference(t){let r=Wd(t.typeName);if(r===void 0)return;let i=n.get(r.toLowerCase());if(i!==void 0){if(i.replacementName!==void 0&&i.replacementName!==``){e.report({data:{replacementName:i.replacementName,typeName:i.originalName},messageId:`bannedTypeWithReplacement`,node:t.typeName});return}e.report({data:{typeName:i.originalName},messageId:`bannedType`,node:t.typeName})}}}},meta:{docs:{description:`Ban configured TypeScript utility types, defaulting to Omit in favor of Except.`},messages:{bannedType:`Type '{{typeName}}' is banned by project configuration. Use the project-preferred alternative for this type.`,bannedTypeWithReplacement:`Type '{{typeName}}' is banned. Use '{{replacementName}}' instead.`},schema:[{additionalProperties:!1,properties:{bannedTypes:{default:{Omit:`Except`},description:`Array of banned type names or an object mapping banned type names to preferred replacement names.`,oneOf:[{items:{type:`string`},type:`array`},{additionalProperties:{type:`string`},type:`object`}]}},type:`object`}],type:`problem`}}),Kd=new Map([[`backGround`,`background`],[`callBack`,`callback`],[`checkBox`,`checkbox`],[`clipBoard`,`clipboard`],[`codeBase`,`codebase`],[`dataBase`,`database`],[`downLoad`,`download`],[`feedBack`,`feedback`],[`foreGround`,`foreground`],[`frameWork`,`framework`],[`headLine`,`headline`],[`keyBoard`,`keyboard`],[`keyFrame`,`keyframe`],[`lifeCycle`,`lifecycle`],[`metaData`,`metadata`],[`midPoint`,`midpoint`],[`nameSpace`,`namespace`],[`overRide`,`override`],[`passWord`,`password`],[`payLoad`,`payload`],[`placeHolder`,`placeholder`],[`preView`,`preview`],[`screenShot`,`screenshot`],[`sideBar`,`sidebar`],[`subClass`,`subclass`],[`subDirectory`,`subdirectory`],[`subDomain`,`subdomain`],[`subMenu`,`submenu`],[`subProcess`,`subprocess`],[`subString`,`substring`],[`subTree`,`subtree`],[`subType`,`subtype`],[`subTitle`,`subtitle`],[`timeOut`,`timeout`],[`timeStamp`,`timestamp`],[`toolBar`,`toolbar`],[`toolKit`,`toolkit`],[`toolTip`,`tooltip`],[`touchScreen`,`touchscreen`],[`unSubscribe`,`unsubscribe`],[`underScore`,`underscore`],[`upLoad`,`upload`],[`userName`,`username`],[`viewPort`,`viewport`],[`webCam`,`webcam`],[`webHook`,`webhook`],[`webSite`,`website`],[`weekEnd`,`weekend`],[`whiteSpace`,`whitespace`],[`wildCard`,`wildcard`],[`workFlow`,`workflow`],[`workSpace`,`workspace`]]),qd=/[\\^$.*+?()[\]{}|]/gu,Jd=String.raw`(?=$|[\d_$]|\p{Uppercase_Letter})`;function Yd(e){return e.replaceAll(qd,String.raw`\$&`)}function Xd(e){let t=e.at(0);return t===void 0?e:`${t.toUpperCase()}${e.slice(1)}`}function Zd(e){let t=e.at(0);return t===void 0?e:`${t.toLowerCase()}${e.slice(1)}`}function Qd(e){return e===e.toUpperCase()}function $d(e){let t=e.at(0);return t?.toUpperCase()===t&&t!==void 0}function ef(e){if(e.size===0)return;let t=[],n=[];for(let r of e.keys())t.push(Yd(r)),n.push(Yd(Xd(r)));return RegExp(`(?:^(?:${t.join(`|`)})|(?:${n.join(`|`)}))${Jd}`,`gu`)}function tf(e,n){let r=new Map(n?Kd:void 0);if(!t.isObject(e))return r;for(let[n,i]of Object.entries(e)){if(i===!1){r.delete(n);continue}t.isString(i)&&i.length>0&&r.set(n,i)}return r}function nf(e){let n=t.isObject(e)?e:{},r=n.extendDefaultReplacements!==!1,i=tf(n.replacements,r),a=new Set;if(t.isObject(n.allowList))for(let e of Object.keys(n.allowList))a.add(e);return{allowList:a,checkProperties:n.checkProperties===!0,checkShorthandProperties:n.checkShorthandProperties===!0,checkVariables:n.checkVariables!==!1,replacementRegExp:ef(i),replacements:i}}function rf(e,t){let n=t.get(e)??t.get(Zd(e));if(n!==void 0)return $d(e)?Xd(n):Zd(n)}function af(e,{allowList:t,replacementRegExp:n,replacements:r}){if(n===void 0||Qd(e)||t.has(e))return;n.lastIndex=0;let i=e.replaceAll(n,e=>rf(e,r)??e);return i===e?void 0:i}function of(e){let{parent:t}=e;return t?.type===`Property`&&t.shorthand&&t.value===e}function sf(e){let{parent:t}=e;return t===null?!1:t.type===`Property`&&t.key===e&&!t.computed||t.type===`PropertyDefinition`&&t.key===e&&!t.computed||t.type===`MethodDefinition`&&t.key===e&&!t.computed}const cf=y(`consistent-compound-words`,`naming`,{create(e){let t=nf(e.options[0]);function n(n,r){let i=af(r,t);i!==void 0&&e.report({data:{name:r,replacement:i},messageId:`error`,node:n})}return{Identifier(e){!t.checkProperties||e.name===`__proto__`||e.parent.type===`ExportSpecifier`||!sf(e)||n(e,e.name)},"Program:exit"(){t.checkVariables&&te(e.sourceCode,e=>{if(e.defs.length===0)return;let[r]=e.defs;r===void 0||!t.checkShorthandProperties&&of(r.name)||n(r.name,e.name)})}}},meta:{docs:{description:`Enforce consistent spelling of compound words in identifiers.`,recommended:!1},messages:{error:"Prefer `{{replacement}}` over `{{name}}`.",rename:"Rename to `{{replacement}}`."},schema:[{additionalProperties:!1,properties:{allowList:{additionalProperties:{enum:[!0]},type:`object`},checkProperties:{type:`boolean`},checkShorthandProperties:{type:`boolean`},checkVariables:{type:`boolean`},extendDefaultReplacements:{type:`boolean`},replacements:{additionalProperties:{anyOf:[{enum:[!1]},{minLength:1,type:`string`}]},type:`object`}},type:`object`}],type:`suggestion`}}),lf=/\.spec\.(?:ts|tsx)$/u,uf=y(`no-spec-file-extension`,`naming`,{createOnce(e){return{Program(t){let{filename:n}=e;n.length===0||!lf.test(n)||e.report({messageId:`noSpecFileExtension`,node:t})}}},meta:{docs:{description:`Disallow the .spec.{ts,tsx} file extension for test files. Use .test.{ts,tsx} instead.`,recommended:!0},messages:{noSpecFileExtension:`Test files must use .test.ts or .test.tsx instead of .spec.ts or .spec.tsx. Rename this file to use the .test extension.`},schema:[],type:`problem`}});function df(e){return e>=`0`&&e<=`9`}function ff(e){return e>=`a`&&e<=`z`}function pf(e){return e>=`A`&&e<=`Z`}function mf(e){return df(e)||ff(e)||pf(e)}function hf(e,t,n){return df(e)!==df(t)||ff(e)&&pf(t)?!0:pf(e)&&pf(t)&&n!==void 0&&ff(n)}function gf(e,t){let n=0;for(let r=1;r<t.length;r+=1){let i=r+1<t.length?t.charAt(r+1):void 0;hf(t.charAt(r-1),t.charAt(r),i)&&(e.push(t.slice(n,r)),n=r)}e.push(t.slice(n))}function _f(e){let t=[],n;for(let r=0;r<e.length;r+=1){if(mf(e.charAt(r))){n??=r;continue}let i=e.codePointAt(r);if(i===void 0||i>127)return;n!==void 0&&(gf(t,e.slice(n,r)),n=void 0)}return n!==void 0&&gf(t,e.slice(n)),t}function vf(e){let t=_f(e);if(t===void 0)return;let n=``;for(let e of t)e.length!==0&&(n+=`${e.slice(0,1).toUpperCase()}${e.slice(1).toLowerCase()}`);return n}const yf=/^\d/u;function bf(e){if(e.id.type===`Identifier`)return e.id.name;if(!(e.id.type!==`Literal`||!t.isString(e.id.value)))return yf.test(e.id.value)?void 0:e.id.value}const xf=y(`prefer-pascal-case-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration(t){let n=t.id.name,r=vf(n);r!==void 0&&r!==n&&e.report({data:{identifier:n},messageId:`notPascalCase`,node:t.id})},TSEnumMember(t){let n=bf(t);if(n===void 0)return;let r=vf(n);r!==void 0&&r!==n&&e.report({data:{identifier:n},messageId:`notPascalCase`,node:t.id})}}},meta:{docs:{description:`Enforce PascalCase names for enums and enum members.`,recommended:!0},messages:{notPascalCase:`Enum '{{ identifier }}' uses non-standard casing. TypeScript convention requires PascalCase for enum names and members to distinguish them from variables (camelCase) and constants (UPPER_CASE). Rename to PascalCase: capitalize first letter of each word, no underscores.`},schema:[],type:`suggestion`}}),Sf=new Set([`alumni`,`axes`,`cacti`,`children`,`criteria`,`data`,`dice`,`feet`,`fungi`,`geese`,`indices`,`matrices`,`media`,`men`,`mice`,`octopi`,`people`,`phenomena`,`teeth`,`vertices`,`women`]),Cf=new Set([`alias`,`analysis`,`axis`,`basis`,`business`,`class`,`crisis`,`glass`,`news`,`series`,`species`,`status`,`thesis`]),wf=new Set([`args`,`components`,`controllers`,`dto`,`dtos`,`entries`,`enums`,`hooks`,`items`,`keys`,`models`,`options`,`orders`,`pages`,`parameters`,`params`,`props`,`repositories`,`services`,`settings`,`types`,`values`,`vo`,`vos`]),Tf=/[A-Z]+(?![a-z])|[A-Z]?[a-z]+|\d+/gu,Ef=/^[A-Z]{2,}[sS]?$/u;function Df(e){let t=[],n=0;for(let r of e.split(`_`)){let e=r.match(Tf);if(e!==null)for(let r of e)t[n++]=r}return t}const Of=/^\d+$/u;function kf(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(!(n===void 0||Of.test(n)))return{lowercased:n.toLowerCase(),original:n}}}const Af=/[sS]$/u,jf=/(?:ches|shes|xes|zes)$/u;function Mf(e,t){return Sf.has(e)||wf.has(e)?!0:Cf.has(e)?!1:Ef.test(t)&&Af.test(t)||e.endsWith(`ies`)||e.endsWith(`ves`)||jf.test(e)||e.endsWith(`s`)&&!e.endsWith(`ss`)&&!e.endsWith(`us`)&&!e.endsWith(`is`)}function Nf(e){if(Ef.test(e)&&Af.test(e))return!0;let t=kf(Df(e));return t!==void 0&&Mf(t.lowercased,t.original)}const Pf=y(`prefer-singular-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration({id:t}){let{name:n}=t;Nf(n)&&e.report({data:{name:n},messageId:`notSingular`,node:t})}}},meta:{docs:{description:`Prefer singular naming for enums.`,recommended:!0},messages:{notSingular:`Enum name "{{name}}" should be singular.`},schema:[],type:`suggestion`}}),Ff=`replace`,If=`suggestion`,Lf=`A more descriptive name will do too.`,Rf={args:`parameters`,char:`character`,dt:`deltaTime`,plr:`player`},zf=[`char`],Bf={acc:{accumulator:!0},arg:{argument:!0},args:{arguments:!0},arr:{array:!0},attr:{attribute:!0},attrs:{attributes:!0},btn:{button:!0},cb:{callback:!0},char:{character:!0},conf:{config:!0},ctx:{context:!0},cur:{current:!0},curr:{current:!0},db:{database:!0},def:{defer:!0,deferred:!0,define:!0,definition:!0},dest:{destination:!0},dev:{development:!0},dir:{direction:!0,directory:!0},dirs:{directories:!0},dist:{distance:!0},doc:{document:!0},docs:{documentation:!0,documents:!0},dst:{daylightSavingTime:!0,destination:!0,distribution:!0},dt:{dateTime:!0,deltaTime:!0},e:{error:!0,event:!0},el:{element:!0},elem:{element:!0},elems:{elements:!0},env:{environment:!0},envs:{environments:!0},err:{error:!0},ev:{event:!0},evt:{event:!0},ext:{extension:!0},exts:{extensions:!0},fn:{func:!0,function:!0},func:{function:!0},i:{index:!0},idx:{index:!0},impl:{implementation:!0},j:{index:!0},len:{length:!0},lib:{library:!0},mod:{module:!0},msg:{message:!0},num:{number:!0},obj:{object:!0},opts:{options:!0},param:{parameter:!0},params:{parameters:!0},pkg:{package:!0},plr:{player:!0},prev:{previous:!0},prod:{production:!0},prop:{property:!0},props:{properties:!0},rel:{related:!0,relationship:!0,relative:!0},req:{request:!0},res:{resource:!0,response:!0,result:!0},ret:{returnValue:!0},retval:{returnValue:!0},sep:{separator:!0},src:{source:!0},stdDev:{standardDeviation:!0},str:{string:!0},tbl:{table:!0},temp:{temporary:!0},tit:{title:!0},tmp:{temporary:!0},util:{utility:!0},utils:{utilities:!0},val:{value:!0},var:{variable:!0},vars:{variables:!0},ver:{version:!0}},Vf={defaultProps:!0,devDependencies:!0,EmberENV:!0,getDerivedStateFromProps:!0,getInitialProps:!0,getServerSideProps:!0,getStaticProps:!0,iOS:!0,obj:!0,propTypes:!0,setupFilesAfterEnv:!0},Hf=[`i18n`,`l10n`],Uf=/(?=[A-Z])|(?<=[_.-])/u,Wf=new Set(`any.as.boolean.break.case.catch.class.const.constructor.continue.debugger.declare.default.delete.do.else.enum.export.extends.false.finally.for.from.function.get.if.implements.import.in.instanceof.interface.let.module.new.null.number.of.package.private.protected.public.require.return.set.static.string.super.switch.symbol.this.throw.true.try.type.typeof.var.void.while.with.yield`.split(`.`)),Gf=/^[A-Za-z]+$/u;function Kf(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95}function qf(e){return e<192?Kf(e):e>=12289&&e<=55295?!0:e<=767?e!==215&&e!==247:e<=8191?e>=880&&e!==894:e<=8591?e>=8204&&e<=8205||e>=8304:e<=12271?e>=11264:e<=64255?e>=63744:e<=65023?e>=64512:e<=65279?e>=65136:e<=65370?e>=65313&&e<=65338||e>=65345:e>=65382&&e<=65500}function Jf(e){return!!(qf(e)||e>=48&&e<=57||e===8204||e===8205||e>=768&&e<=865||e>=8240&&e<=8266)}function Yf(e){if(e.length===0||Wf.has(e))return!1;let t=e.codePointAt(0);if(t===void 0||!qf(t))return!1;let n=t>65535?2:1;for(;n<e.length;){let t=e.codePointAt(n);if(t===void 0||!Jf(t))return!1;n+=t>65535?2:1}return!0}function Xf(e){let t=[e],n=1;for(let r of e.childScopes){let e=Xf(r);for(let r of e)t[n++]=r}return t}function Zf(e,t){return t.every(t=>_(t,e)===void 0)}function Qf(e,t,n){let r=e;if(!(!Yf(r)&&(r+=`_`,!Yf(r)))){for(;!Zf(r,t)||!n(r,t);)r+=`_`;return r}}function $f(e){let t=new Set;for(let n of e.identifiers)t.add(n);for(let{identifier:n}of e.references)t.add(n);return[...t]}function ep(e,t){return e.range[0]===t.range[0]&&e.range[1]===t.range[1]}function tp(e){let{parent:t}=e;return!ve(t)||t.local!==e?!1:ep(t.local,t.imported)}function np(e){let{parent:t}=e;return!ye(t)||t.local!==e?!1:ep(t.local,t.exported)}function rp(e){if(!w(e))return!1;let{parent:t}=e;return E(t)&&t.shorthand&&t.value===e}function ip(e){if(!w(e))return!1;let{parent:t}=e;if(!Ye(t)||t.left!==e)return!1;let n=t.parent;return E(n)?n.shorthand:!1}function ap(e){if(!w(e))return!1;let{parent:t}=e;if(Oe(t)&&t.local===e||ke(t)&&t.local===e)return!0;if(ve(t)&&t.local===e){let{imported:e}=t;if(T(e)&&e.name==="default")return!0}return C(t)&&t.id===e&&t.init!==null&&Ze(t.init)}function op(e){if(!w(e))return!1;let{parent:t}=e;if(C(t)&&t.id===e){let e=t.parent;return Ae(e)?je(e.parent):!1}return Me(t)&&t.id===e||Pe(t)&&t.id===e||t.type===`TSTypeAliasDeclaration`&&t.id===e?je(t.parent):!1}function sp(e){return $f(e).every(e=>!op(e)&&!pe(e))}function cp(e,t,n){if(w(e))return rp(e)||ip(e)?n.replaceText(e,`${e.name}: ${t}`):tp(e)?n.replaceText(e,`${e.name} as ${t}`):np(e)?n.replaceText(e,`${t} as ${e.name}`):n.replaceText(e,t)}function lp(e,t,n){let r=[],i=0;for(let a of $f(e)){let e=cp(a,t,n);e!==void 0&&(r[i++]=e)}return r}function up(e){if(!w(e))return!1;let{parent:t}=e;if(D(t)&&t.property===e&&!t.computed){let e=t.parent;if(be(e)&&e.left===t)return!0}return E(t)&&t.key===e&&!t.computed&&!t.shorthand&&(Ue(t.parent)||We(t.parent))||Fe(t)&&t.key===e&&!t.computed||ye(t)&&t.exported===e&&t.local!==e?!0:(Ee(t)||De(t))&&t.key===e&&!t.computed}function dp(e){if(!w(e))return!1;let{parent:t}=e;return E(t)&&t.key===e&&!t.computed&&!t.shorthand&&(Ue(t.parent)||We(t.parent))}function fp(e){if(e.type===`ImportBinding`){let{parent:t}=e;if(t!==null&&he(t)&&ge(t.source))return t.source.value}else if(e.type===`Variable`){let{node:t}=e;if(C(t)&&t.init!==null&&Ze(t.init)){let[e]=t.init.arguments;if(e!==void 0&&ge(e))return e.value}}}function pp(e){let t=fp(e);return t!==void 0&&!t.includes(`node_modules`)&&(t.startsWith(`.`)||t.startsWith(`/`))}function mp(e,t){return e===!1?!1:e!==`internal`||pp(t)}function hp(e){return e.defs.length===1&&e.defs[0]?.type===`ClassName`}const gp=/^(?:[#$./]|[~@]\/)/u;function _p(e){return!gp.test(e)}function vp(e){if(e?.type!==`ImportBinding`)return!1;let{parent:t}=e;return t===null||!he(t)||!ge(t.source)?!1:_p(t.source.value)}function yp(e){let t=e;for(;t.type===`TSQualifiedName`;)t=t.left;return t.type===`Identifier`?t:void 0}function bp(e,t){return xp(e,t,new Set)}function xp(e,t,n){let r=e;for(;r.type===`TSIndexedAccessType`;)r=r.objectType;if(r.type===`TSImportType`)return _p(r.source.value);if(r.type===`TSTypeReference`){let e=yp(r.typeName);return e!==void 0&&Sp(e.name,t.getScope(e),r.typeArguments,t,n)}return r.type===`TSUnionType`||r.type===`TSIntersectionType`?r.types.some(e=>xp(e,t,n)):!1}function Sp(e,t,n,r,i){let a=_(t,e)?.defs[0];if(vp(a))return!0;if(a===void 0)return n!==null&&n.params.some(e=>xp(e,r,i));let o=a.node;return o.type===`TSTypeAliasDeclaration`?!i.has(o)&&(i.add(o),xp(o.typeAnnotation,r,i)):o.type===`TSInterfaceDeclaration`&&o.extends.some(e=>Cp(e,r,i))}function Cp(e,t,n){let r=Tp(e.expression);return r===void 0||!w(r)?!1:Sp(r.name,t.getScope(r),e.typeArguments,t,n)}function wp(e){let{parent:t}=e;if(C(t)&&t.init===e)return oe(t.id)?.typeAnnotation;if((t.type===`TSAsExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`)&&t.expression===e)return t.typeAnnotation}function Tp(e){let t=e;for(;;){if(T(t))return t;if(D(t)){t=t.object;continue}if(ze(t)){t=t.left;continue}return}}function Ep(e,t){let{parent:n}=e,r;if(D(n)&&n.property===e&&!n.computed?r=n.object:ze(n)&&n.right===e&&(r=n.left),r===void 0)return!1;let i=T(r)?r:Tp(r);return i===void 0||!w(i)?!1:_(t.getScope(e),i.name)?.defs[0]?.type===`ImportBinding`}function Dp(e,t){let n=e.parent;if(!_e(n))return!1;let{callee:r}=n;if(!T(r))return!1;let i=_(t.getScope(r),r.name)?.defs[0];return vp(i)}function Op(e,t){if(Ep(e,t))return!0;if(!dp(e))return!1;let n=e.parent.parent;if(n===null||!Ue(n))return!1;let r=wp(n);return r!==void 0&&bp(r,t)||Dp(n,t)}function kp(e,t,n){return e?t:n}const Ap=/[.+^${}()|[\]\\]/gu,jp=/^\/(?<first>.+)\/(?<second>[dgimsuvy]*)$/u,Mp=new WeakMap,Np=new WeakMap;function Pp(e){return t.isObject(e)}function Fp(e){return e===e.toUpperCase()}function Ip(e){return Fp(e.charAt(0))}function Lp(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Rp(e){return e.charAt(0).toLowerCase()+e.slice(1)}function zp(e){return e.includes(`u`)||e.includes(`v`)?e:`${e}u`}function Bp(e){return e===void 0?3:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:3}function Vp(e,t,n){return e===3||t===3||e===2||t===2?e!==t:e===0&&t===1||e===1&&t===1&&n===0}function Hp(e){if(e.length<2)return[e];let t=[],n=0,r=Bp(e.codePointAt(0));for(let i=1;i<e.length;i+=1){let a=Bp(e.codePointAt(i)),o=Bp(e.codePointAt(i+1));Vp(r,a,o)&&(t.push(e.slice(n,i)),n=i),r=a}return t.push(e.slice(n)),t}const Up=/\$\d+/gu;function Wp(e){let t=e.match(Up);if(t===null)return 0;let n=0;for(let e of t){let t=Math.trunc(Number(e.slice(1)));t>n&&(n=t)}return n}function Gp(e){let t=Wp(e);if(t===0)return[];let n=Array.from({length:t});for(let e=1;e<=t;e+=1)n[e-1]=RegExp(`\\$${e}`,`gu`);return n}function Kp(e){let t=[],n=[],r=0;for(let[i,a]of e)a&&(t[r]=Rp(i),n[r]=Lp(i),r+=1);return{lowerFirst:t.toSorted((e,t)=>e.localeCompare(t)),upperFirst:n.toSorted((e,t)=>e.localeCompare(t))}}function qp(e,t){if(e.startsWith(`/`)){let n=jp.exec(e);if(n?.groups!==void 0)return{matcher:{original:e,pattern:RegExp(`^${n.groups.first}$`,zp(n.groups.second??``)),replacement:t,replacementPatterns:Gp(t)},type:`pattern`}}if(e.includes(`*`)||e.includes(`?`)){let n=e.replaceAll(Ap,String.raw`\$&`).replaceAll(`*`,`(.*)`).replaceAll(`?`,`(.)`),r=0,i=t.replaceAll(`*`,()=>`$${++r}`);return{matcher:{original:e,pattern:RegExp(`^${n}$`,`u`),replacement:i,replacementPatterns:Gp(i)},type:`pattern`}}return{original:e,replacement:t,type:`exact`}}function Jp(e,t){let n=t.exactMatchers.get(e);if(n!==void 0)return{matchedWord:e,replacement:n,shorthand:e};for(let n of t.matchers){let t=e.match(n.pattern);if(t===null)continue;let r=n.replacement,i=1;for(let e of n.replacementPatterns)r=r.replaceAll(e,t[i]??``),i+=1;return{matchedWord:e,replacement:r,shorthand:n.original}}}function Yp(e,t){if(t.ignoreExact.has(e))return!0;for(let n of t.ignoreMatchers)if(n.pattern.test(e))return!0;return!1}function Xp(e,n){return e===`internal`||t.isBoolean(e)?e:n}function Zp(e){if(!t.isObject(e))return;let n={};for(let[r,i]of Object.entries(e))t.isBoolean(i)&&(n[r]=i);return n}function Qp(e,n){return t.isBoolean(e)?e:n}function $p(e){let t=Pp(e)?e:void 0,n=Zp(t?.allowList),r=kp(Qp(t?.extendDefaultAllowList,!0),n===void 0?Vf:{...Vf,...n},n??{});return new Map(Object.entries(r))}function em(e){if(!t.isObject(e))return new Map;let n=new Map;for(let[r,i]of Object.entries(e)){if(i===!1){n.set(r,!1);continue}if(!t.isObject(i))continue;let e={};for(let[n,r]of Object.entries(i))t.isBoolean(r)&&(e[n]=r);n.set(r,e)}return n}function tm(e){let t=Pp(e)?e:void 0,n=Qp(t?.extendDefaultReplacements,!0),r=em(t?.replacements),i=new Set([...Object.keys(Bf),...r.keys()]),a=[];for(let e of i){let t=r.get(e),i=n?Bf[e]??{}:{},o=t===!1?{}:kp(t===void 0,i,{...i,...t}),s=new Map(Object.entries(o));Mp.set(s,Kp(s)),a.push([e,s])}return new Map(a)}function nm(e){let n=Pp(e)?e:void 0,r=[];for(let e of Hf)r.push(e);if(Array.isArray(n?.ignore))for(let e of n.ignore)(t.isString(e)||e instanceof RegExp)&&r.push(e);return r.map(e=>e instanceof RegExp?e:new RegExp(e,`u`))}function rm(e){let t=Pp(e)?e:void 0,n=new Set(zf);if(!M(t?.allowPropertyAccess))return n;for(let e of t.allowPropertyAccess)n.add(e);return n}function im(e){let t=Pp(e)?e:void 0,n=new Map,r=new Set,i=[],a=[],o=Ei(t?.shorthands)?t.shorthands:{},s={...Rf,...o};for(let[e,t]of Object.entries(s)){let r=qp(e,t);r.type===`exact`?n.set(r.original,r.replacement):a.push(r.matcher)}if(M(t?.ignoreShorthands))for(let e of t.ignoreShorthands){let t=qp(e,``);t.type===`exact`?r.add(t.original):i.push(t.matcher)}return{exactMatchers:n,ignoredIdentifiers:new Map,ignoreExact:r,ignoreMatchers:i,matchers:a,replacementsByIdentifier:new Map}}function am(e){let t=Pp(e)?e:void 0;return{allowList:$p(t),allowPropertyAccess:rm(t),checkDefaultAndNamespaceImports:Xp(t?.checkDefaultAndNamespaceImports,`internal`),checkFilenames:Qp(t?.checkFilenames,!0),checkProperties:Qp(t?.checkProperties,!1),checkShorthandImports:Xp(t?.checkShorthandImports,`internal`),checkShorthandProperties:Qp(t?.checkShorthandProperties,!0),checkVariables:Qp(t?.checkVariables,!0),ignore:nm(t),nameReplacements:new Map,replacements:tm(t),shorthandConfiguration:im(t)}}function om(e){return{...e,nameReplacements:new Map,shorthandConfiguration:{...e.shorthandConfiguration,ignoredIdentifiers:new Map,replacementsByIdentifier:new Map}}}function sm(e){if(!Pp(e))return am(void 0);let t=Np.get(e);if(t!==void 0)return om(t);let n=am(e);return Np.set(e,n),om(n)}function cm(e,t){if(Fp(e)||t.allowList.get(e)===!0)return[];let n=t.replacements.get(Rp(e))??t.replacements.get(e)??t.replacements.get(Lp(e));if(n===void 0)return[];let r=Mp.get(n);return r===void 0?[]:Ip(e)?r.upperFirst:r.lowerFirst}function lm(e,t){let n=t.replacementsByIdentifier.get(e);if(n!==void 0)return n===!1?void 0:n;if(e.length===0)return;let r=Hp(e),i=[];for(let e of r){let n=Jp(e,t);n!==void 0&&i.push(n)}if(i.length===0){t.replacementsByIdentifier.set(e,!1);return}let a=``,o=0;for(let e of r){let t=i[o];if(t?.matchedWord===e){a+=t.replacement,o+=1;continue}a+=e}let s={matches:i,replaced:a};return t.replacementsByIdentifier.set(e,s),s}function um(e,t){let n=t.ignoredIdentifiers.get(e);if(n!==void 0)return n;let r=Yp(e,t);if(!r){let n=lm(e,t);r=n!==void 0&&n.matches.length>0&&n.matches.every(e=>Yp(e.matchedWord,t))}return t.ignoredIdentifiers.set(e,r),r}function dm(e,t,n){if(n.has(e))return!0;for(let e of t.matches)if(!n.has(e.matchedWord))return!1;return t.matches.length>0}function fm(e,t,n=3){let r=`${n}\0${e}`,i=t.nameReplacements.get(r);if(i!==void 0)return i;let a=pm(e,t,n);return t.nameReplacements.set(r,a),a}function pm(e,t,n){if(t.allowList.get(e)===!0||t.ignore.some(t=>t.test(e)))return{total:0};let r=lm(e,t.shorthandConfiguration);if(r!==void 0)return um(e,t.shorthandConfiguration)?{total:0}:{samples:[r.replaced],total:1};if(Fp(e))return{total:0};let i=cm(e,t);if(i.length>0)return{samples:i.slice(0,n),total:i.length};let a=e.split(Uf).filter(Boolean),o=!1,s=[],c=0;for(let e of a){let n=cm(e,t);if(n.length>0){o=!0,s[c++]=n;continue}s[c++]=[e]}if(!o)return{total:0};let l=s.reduce((e,t)=>e*t.length,1);return{samples:mm(s,l,n).map(e=>e.join(``)),total:l}}function mm(e,t,n){let r=Math.min(t,n),i=Array.from({length:r},(t,n)=>{let r=n,i=[];for(let t=e.length-1;t>=0;--t){let n=e[t]??[],a=r%n.length;r=(r-a)/n.length;let o=n[a];o!==void 0&&i.unshift(o)}return i});for(let e of i)for(let t=e.length-1;t>0;--t){let n=e[t]??``;Gf.test(n)&&e[t-1]?.endsWith(n)===!0&&e.splice(t,1)}return i}function hm(e,t){let n=t.replacements.get(e);if(n===void 0)return!1;let r=Mp.get(n);return r!==void 0&&r.lowerFirst.length>0}function gm(e,{samples:t=[],total:n},r){if(n===1)return{data:{discouragedName:e,nameTypeText:r,replacement:t[0]??``},messageId:Ff};let i=t.map(e=>`\`${e}\``).join(`, `),a=n-t.length;return a>0&&(i+=`, ... (${a>99?`99+`:a} more omitted)`),{data:{discouragedName:e,nameTypeText:r,replacementsText:i},messageId:If}}function _m(e){return function(t,n){return n.every(n=>{let r=e.get(n);return r===void 0||!r.has(t)})}}function vm(e){let{parent:t}=e;return D(t)&&t.property===e&&!t.computed||ze(t)&&t.right===e}function ym(e,t,n,r){r({...gm(e.name,{samples:[t],total:1},n?`property`:`variable`),node:e})}function bm(e,t,n){return ap(t)&&!mp(n.checkDefaultAndNamespaceImports,e)||tp(t)&&!mp(n.checkShorthandImports,e)?!0:!n.checkShorthandProperties&&rp(t)}function xm(e){if(e.name!==`plr`)return;let[t]=e.defs;if(t?.type!==`Variable`||!C(t.node)||t.node.init===null)return;let{init:n}=t.node;if(D(n)&&!n.computed&&T(n.object)&&n.object.name===`Players`&&T(n.property)&&n.property.name===`LocalPlayer`)return`localPlayer`}function Sm(e,t,n,r){let i=[],a=0,o=0;for(let s of e){let e=Qf(s,t,n);if(e!==void 0){if(e!==s&&hm(s,r)){o+=1;continue}e.length>0&&(i[a++]=e)}}return{droppedDiscouraged:o,safeSamples:i}}function Cm(e,t,n){let r=e.type===`Variable`&&C(e.node)&&e.node.init===null,i=e.type===`Parameter`&&t.scope.type===`function`&&t.scope.block.type===`ArrowFunctionExpression`,a=r||i;return(e,t)=>!(!n(e,t)||a&&e===`arguments`)}function wm(e,t,n,r,i,a,o){for(let e of i)a.has(e)||a.set(e,new Set),a.get(e)?.add(r);e({...t,fix(e){return lp(n,r,e)},node:o})}function Tm(e,n,r,i,a){let[o]=e.defs;if(o===void 0)return;let s=o.name;if(!T(s)||bm(o,s,n))return;let c=Cm(o,e,i),l=xm(e),u=l===void 0?fm(e.name,n):{samples:[l],total:1};if(u.total===0||!u.samples)return;let{references:d}=e,f=[...d.map(e=>e.from),e.scope],{droppedDiscouraged:p,safeSamples:m}=Sm(u.samples,f,c,n),h=m.length>0?m:u.samples,g=t.isNumber(u.samples.length)&&u.samples.length===u.total?Math.max(0,u.total-p):u.total,_=e.name===`fn`&&g>1?h.map(e=>e===`function_`?`function`:e):h,ee=gm(s.name,{samples:_,total:g},`variable`);if(g===1&&m.length===1&&sp(e)){let[t]=m;if(t!==void 0){wm(a,ee,e,t,f,r,s);return}}a({...ee,node:s})}function Em(e,t){if(!hp(e)){t(e);return}if(e.scope.type===`class`){let[n]=e.defs;if(n===void 0){t(e);return}let r=n.name;if(!T(r)){t(e);return}t(e)}}function Dm(e,t){for(let n of Xf(e))for(let e of n.variables)Em(e,t)}function Om(e,t,n,r){let i=up(e),a=vm(e);!i&&!a||Op(e,r)||km(e,i,a,t,n)||!i||!t.checkProperties||Am(e,t,n)}function km(e,t,n,r,i){let a=lm(e.name,r.shorthandConfiguration);return a===void 0||!t&&!n?!1:(um(e.name,r.shorthandConfiguration)||!r.checkShorthandProperties||n&&dm(e.name,a,r.allowPropertyAccess)||ym(e,a.replaced,!0,i),!0)}function Am(e,t,n){let r=fm(e.name,t);if(r.total===0)return;let i=gm(e.name,r,`property`),a=jm(e,r.samples);if(a!==void 0){n({...i,fix(t){return t.replaceText(e,a)},node:e});return}n({...i,node:e})}function jm(e,t){if(t?.length!==1||!dp(e))return;let[n]=t,{parent:r}=e;if(n!==void 0&&E(r)&&ge(r.value)&&Yf(n))return n}const Mm=y(`prevent-abbreviations`,`naming`,{create(e){let t=sm(e.options[0]),n=e.physicalFilename,r=new WeakMap,i=_m(r),{sourceCode:a}=e;function o(n){Tm(n,t,r,i,e.report)}return{Identifier(n){!w(n)||n.name===`__proto__`||Om(n,t,e.report,a)},JSXOpeningElement({name:n}){if(!t.checkVariables||!pe(n)||!Ip(n.name))return;let r=fm(n.name,t);if(r.total===0)return;let i=gm(n.name,r,`variable`);e.report({...i,node:n})},"Program:exit"(r){if(n!==`<input>`&&n!==`<text>`&&t.checkFilenames){let i=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`)),a=n.slice(i+1),o=a.lastIndexOf(`.`),s=o===-1?``:a.slice(o),c=fm(o===-1?a:a.slice(0,o),t);if(c.total>0&&c.samples){let t=c.samples.map(e=>`${e}${s}`);e.report({...gm(a,{samples:t,total:c.total},`filename`),node:r})}}t.checkVariables&&Dm(a.getScope(r),o)}}},meta:{docs:{description:`Prevent abbreviations.`,recommended:!1},fixable:`code`,messages:{[Ff]:`The {{nameTypeText}} \`{{discouragedName}}\` should be named \`{{replacement}}\`. ${Lf}`,[If]:`Please rename the {{nameTypeText}} \`{{discouragedName}}\`. Suggested names are: {{replacementsText}}. ${Lf}`},schema:[{additionalProperties:!1,properties:{allowList:{additionalProperties:{type:`boolean`},default:Vf,defaultLabel:`default allow list`,description:`Names that should be allowed even when they match a discouraged abbreviation.`,type:`object`},allowPropertyAccess:{default:zf,description:`Property names that may keep abbreviated member access.`,items:{type:`string`},type:`array`},checkDefaultAndNamespaceImports:{default:`internal`,description:`Whether default and namespace import local names should be checked.`,enum:[!1,!0,`internal`]},checkFilenames:{default:!0,description:`Whether file names should be checked for abbreviations.`,type:`boolean`},checkProperties:{default:!1,description:`Whether object, member, and JSX property names should be checked.`,type:`boolean`},checkShorthandImports:{default:`internal`,description:`Whether renamed shorthand imports should be checked.`,enum:[!1,!0,`internal`]},checkShorthandProperties:{default:!0,description:`Whether shorthand object property names should be checked.`,type:`boolean`},checkVariables:{default:!0,description:`Whether variable, function, class, and component names should be checked.`,type:`boolean`},extendDefaultAllowList:{default:!0,description:`Merge configured allowList entries with the default allow list.`,type:`boolean`},extendDefaultReplacements:{default:!0,description:`Merge configured replacements with the default replacement map.`,type:`boolean`},ignore:{default:Hf,description:`Names or regular expression patterns that should be ignored.`,items:{type:`string`},type:`array`},ignoreShorthands:{default:[],description:`Shorthand names that should not be reported.`,items:{type:`string`},type:`array`},replacements:{additionalProperties:{oneOf:[{enum:[!1]},{additionalProperties:{type:`boolean`},type:`object`}]},default:Bf,defaultLabel:`default replacement map`,description:`Replacement suggestions for discouraged names.`,type:`object`},shorthands:{additionalProperties:{type:`string`},default:Rf,defaultLabel:`default shorthands`,description:`Shorthand names and the full names they should expand to.`,type:`object`}},type:`object`}],type:`suggestion`}});function Nm({parent:e}){if(e.type!==`ObjectExpression`)return!1;let{parent:t}=e;return t.type===`TSSatisfiesExpression`?!0:t.type===`CallExpression`||t.type===`NewExpression`?t.arguments.some(t=>t===e):!1}const Pm=y(`require-async-suffix`,`naming`,{create(e){let t=e.options[0]?.except,n=t===void 0?new Set:new Set(t);function r(t){t.name.endsWith(`Async`)||n.has(t.name)||e.report({messageId:`missingAsyncSuffix`,node:t})}return{FunctionDeclaration(e){!e.async||e.id===null||r(e.id)},MethodDefinition(e){!e.value.async||e.key.type!==`Identifier`||e.override===!0||r(e.key)},Property(e){!e.method||e.value.type!==`FunctionExpression`||!e.value.async||e.key.type!==`Identifier`||Nm(e)||r(e.key)},PropertyDefinition(e){(e.value?.type===`ArrowFunctionExpression`||e.value?.type===`FunctionExpression`)&&(!e.value.async||e.key.type!==`Identifier`||e.override===!0||r(e.key))},VariableDeclarator(e){e.id.type===`Identifier`&&(e.init?.type===`ArrowFunctionExpression`||e.init?.type===`FunctionExpression`)&&e.init.async&&r(e.id)}}},meta:{docs:{description:`Require async function names to end with Async.`},messages:{missingAsyncSuffix:`Async functions must have names that end with Async.`},schema:[{additionalProperties:!1,properties:{except:{items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}}),Fm=new Set([`FC`,`FunctionComponent`,`VFC`,`VoidFunctionComponent`]);function Im(e){if(e.type===`Identifier`&&Fm.has(e.name))return e.name;if(e.type===`TSQualifiedName`&&Fm.has(e.right.name))return e.right.name}function Lm(e){let{typeAnnotation:t}=e.id;return se(t)?t:void 0}const Rm=y(`ban-react-fc`,`react`,{createOnce(e){return{VariableDeclarator(t){let n=Lm(t);if(n===void 0)return;let r=n.typeAnnotation;r.type===`TSTypeReference`&&Im(r.typeName)!==void 0&&t.init?.type===`ArrowFunctionExpression`&&e.report({messageId:`banReactFC`,node:t})}}},meta:{docs:{description:`Ban React.FC and similar component type annotations. Use explicit function declarations instead.`},messages:{banReactFC:"Avoid React.FC/FunctionComponent/VFC/VoidFunctionComponent types. They break debug information and profiling. Use explicit function declarations instead: `function Component(props: Props) { ... }`"},schema:[],type:`problem`}}),zm={default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`};function Bm(e){return e===`roblox-ts`||e===`standard`}const Vm=new Set([`react`,`react-dom`]),Hm=new Set([`@rbxts/react`,`@rbxts/roact`]);function Um(e){return e===`standard`?Vm:Hm}function Wm(e){return Um(H(e))}function Gm(e,t){return t.has(e.source.value)}function Km(e,t,n,r){if(Gm(e,t))for(let t of e.specifiers){if(t.type===`ImportDefaultSpecifier`||t.type===`ImportNamespaceSpecifier`){n.add(t.local.name);continue}let e=fe(t);e!==void 0&&r(e,t.local.name)}}function H(e){return!t.isObject(e)||e.environment!==`standard`?`roblox-ts`:`standard`}function qm(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function Jm(e,t){if(e.type!==`ImportBinding`)return!1;let n=qm(e.node);return n!==void 0&&t.has(n.source.value)}function Ym(e,t,n){if(e===void 0)return!1;for(let r of e.defs)if(Jm(r,n)&&r.node.type===`ImportSpecifier`&&fe(r.node)===t)return!0;return!1}function Xm(e,t){if(e===void 0)return!1;for(let n of e.defs)if(Jm(n,t)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0;return!1}function Zm(e,{callee:t},n,r){if(t.type===`Identifier`){let i=_(e.getScope(t),t.name);return i!==void 0&&i.defs.some(e=>{if(e.type!==`ImportBinding`||e.node.type!==`ImportSpecifier`)return!1;let t=qm(e.node);if(t===void 0||!r.has(t.source.value))return!1;let i=fe(e.node);return i!==void 0&&n.has(i)})}return t.type!==`MemberExpression`||t.computed||t.object.type!==`Identifier`||t.property.type!==`Identifier`?!1:Xm(_(e.getScope(t.object),t.object.name),r)&&n.has(t.property.name)}const Qm=new Map([[`useEffect`,1],[`useInsertionEffect`,1],[`useLayoutEffect`,1]]),$m=new Set([`useCallback`,`useMemo`]),eh=new Set([`useBinding`,`useRef`]),th=new Set([`useReducer`,`useState`,`useTransition`]),nh=new Set([...eh,...th]),rh=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`ClassExpression`,`FunctionExpression`,`NewExpression`,`ObjectExpression`]);function ih(e){return e===`aggressive`||e===`definite`||e===`moderate`}function ah(e,t){if(!(e.computed||e.object.type!==`Identifier`||!t.has(e.object.name)))return e.property.type===`Identifier`?e.property.name:void 0}function oh(e){let t=m(e);for(;t.type===`MemberExpression`;)t=m(t.object);return t.type===`Identifier`?t:void 0}function sh(e){return rh.has(e.type)}function ch(e){if(e!==null){if(e.type===`Identifier`)return e.name;if(e.type===`AssignmentPattern`&&e.left.type===`Identifier`)return e.left.name;if(e.type===`RestElement`&&e.argument.type===`Identifier`)return e.argument.name}}function lh(e,t,n){let r=e.elements[n];return r!=null&&ch(r)===t}function uh(e){return e.scope.type===`module`||e.scope.type===`global`}function dh(e,n){if(!(!(`hooks`in e)||!Array.isArray(e.hooks)))for(let r of e.hooks){if(!t.isObject(r)||!(`name`in r)||!t.isString(r.name))continue;let e=`dependenciesIndex`in r&&t.isNumber(r.dependenciesIndex)?r.dependenciesIndex:1;n.set(r.name,e)}}const fh=y(`memoized-effect-dependencies`,`react`,{create(e){let[n]=e.options,r=t.isObject(n)?n:{},i=`mode`in r&&ih(r.mode)?r.mode:`definite`,a=`environment`in r&&Bm(r.environment)?r.environment:`roblox-ts`,o=new Map(Qm);dh(r,o);let s=Um(a),c=new Set,l=new Map,u=new Set,d=new Map,f=new WeakMap,p=new WeakMap,h=new WeakMap,{sourceCode:g}=e;function _(e){let t=f.get(e);if(t!==void 0)return t;let n=g.getScope(e);return f.set(e,n),n}function ee(e){let t=_(e),n=p.get(t);if(n===void 0)n=new Map,p.set(t,n);else if(n.has(e.name))return n.get(e.name);let r=t;for(;r!==null;){let t=r.set.get(e.name);if(t!==void 0)return n.set(e.name,t),t;r=r.upper}n.set(e.name,void 0)}function te({callee:e}){if(e.type===`Identifier`)return u.has(e.name);if(e.type===`MemberExpression`){let t=ah(e,c);return t!==void 0&&$m.has(t)}return!1}function v({callee:e}){if(e.type===`Identifier`){let t=d.get(e.name);return t===void 0?void 0:eh.has(t)?`whole`:th.has(t)?`index1`:void 0}if(e.type===`MemberExpression`){let t=ah(e,c);if(t===void 0)return;if(eh.has(t))return`whole`;if(th.has(t))return`index1`}}function ne(e,t){if(e.type===`Parameter`)return`unknown`;if(e.type===`ImportBinding`)return`memoized`;let{node:n}=e;if(n.type===`FunctionDeclaration`||n.type===`ClassDeclaration`)return`unmemoized`;if(n.type!==`VariableDeclarator`)return`unknown`;let r=n.parent;if(r.type===`VariableDeclaration`&&r.kind!==`const`)return i===`definite`?`unknown`:`unmemoized`;let a=n.init===null?void 0:m(n.init);return a===void 0?`unknown`:sh(a)?`unmemoized`:a.type===`CallExpression`?re(a,n.id,t):`unknown`}function re(e,t,n){if(te(e))return`memoized`;let r=v(e);return r===`whole`||r===`index1`&&t.type===`ArrayPattern`&&lh(t,n,1)?`memoized`:i===`definite`?`unknown`:`unmemoized`}function y(e){let t=h.get(e);if(t!==void 0)return t;if(uh(e))return h.set(e,`memoized`),`memoized`;let n=!1;for(let t of e.defs){let r=ne(t,e.name);if(r===`unmemoized`)return h.set(e,`unmemoized`),`unmemoized`;r===`memoized`&&(n=!0)}let r=n?`memoized`:`unknown`;return i===`aggressive`&&r!==`memoized`&&(r=`unmemoized`),h.set(e,r),r}function ie(e){let t=m(e);if(sh(t))return`unmemoized`;if(t.type===`CallExpression`)return i===`definite`?`unknown`:`unmemoized`;let n=oh(t);if(n===void 0)return`unknown`;let r=ee(n);return r===void 0?`unknown`:y(r)}function b({callee:e}){if(e.type===`Identifier`)return l.get(e.name);if(e.type===`MemberExpression`){let t=ah(e,c);return t===void 0?void 0:o.get(t)}}return{CallExpression(t){let n=b(t);if(n===void 0)return;let r=t.arguments[n];if(r?.type===`ArrayExpression`)for(let t of r.elements){if(t===null)continue;if(t.type===`SpreadElement`){if(i===`definite`)continue;let n=t.argument,r=g.getText(n);e.report({data:{name:r},messageId:`unmemoizedDependency`,node:n});continue}if(ie(t)!==`unmemoized`)continue;let n=g.getText(t);e.report({data:{name:n},messageId:`unmemoizedDependency`,node:t})}},ImportDeclaration(e){Km(e,s,c,(e,t)=>{if(o.has(e)){let n=o.get(e);l.set(t,n??1)}$m.has(e)&&u.add(t),nh.has(e)&&d.set(t,e)})}}},meta:{docs:{description:`Flags effect dependencies that are not memoized. Unmemoized dependencies can cause unnecessary re-renders or infinite loops.`},messages:{unmemoizedDependency:`{{name}} is not memoized. Wrap it in useMemo/useCallback or move it to module scope.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:Array.from(Qm,([e,t])=>({name:e,dependenciesIndex:t})),description:`Effect hooks checked by default; configured entries are added to this set.`,items:{additionalProperties:!1,properties:{name:{description:`The name of the hook`,type:`string`},dependenciesIndex:{description:`Index of the dependencies array for validation`,type:`number`}},required:[`name`],type:`object`},type:`array`},mode:{default:`definite`,description:`Strictness for memoization detection: definite (only obvious), moderate (unknown calls and non-const), aggressive (any non-module).`,enum:[`aggressive`,`definite`,`moderate`],type:`string`}},type:`object`}],type:`problem`}}),ph=new Set([`ArrayExpression`,`ObjectExpression`,`Property`,`SequenceExpression`]),mh=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`]),hh=new WeakMap;function gh(e){let{ast:t}=e,n=hh.get(t);if(n!==void 0)return n;let r=_h(e);return hh.set(t,r),r}function _h(e){let t={referenceByIdentifier:new Map,sourceCode:e,traversalByRoot:new WeakMap};Sh(t);let n=[],r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap;return Ch(t,n),{callExpressions:n,getArgumentUpstreamReferences(e){let n=i.get(e);return n===void 0&&(n=jh(t,e),i.set(e,n)),n},getCallExpression(e){if(o.has(e))return o.get(e);let t=Ah(e);return o.set(e,t),t},getDescendantCallExpressions(e){return vh(t,e).callExpressions},getDescendantIfStatements(e){return vh(t,e).ifStatements},getDownstreamReferences(e){return vh(t,e).references},getReference(e){return t.referenceByIdentifier.get(e)},getSynchronousCallChain(e){let n=a.get(e);return n===void 0&&(n=Nh(t,e),a.set(e,n)),n},getUpstreamReferences(e){let n=r.get(e);return n===void 0&&(n=Oh(t,e),r.set(e,n)),n},isSynchronousWithin:Mh}}function vh(e,t){let n=e.traversalByRoot.get(t);return n===void 0&&(n={callExpressions:[],ifStatements:[],references:[]},yh(e,t,n),e.traversalByRoot.set(t,n)),n}function yh(e,t,n){let r=[t];for(;r.length>0;){let i=r.pop();if(i===void 0)break;if(Eh(i)){let t=Dh(e,i);t!==void 0&&n.references.push(t)}xh(i,t,n),Th(e,i,r,!1)}}function bh(e,t,n){let r=[t];for(;r.length>0;){let i=r.pop();if(i===void 0)break;if(Eh(i)){let t=Dh(e,i);t!==void 0&&n.references.push(t)}xh(i,t,n),Th(e,i,r,!0)}}function xh(e,t,n){e!==t&&(e.type===`CallExpression`?n.callExpressions.push(e):e.type===`IfStatement`&&n.ifStatements.push(e))}function Sh(e){let t={callExpressions:[],ifStatements:[],references:[]};bh(e,e.sourceCode.ast,t);for(let n of t.references)Eh(n.identifier)&&e.referenceByIdentifier.set(n.identifier,n)}function Ch(e,t){bh(e,e.sourceCode.ast,{callExpressions:t,ifStatements:[],references:[]})}function wh(e,t){if(Array.isArray(e)){for(let n=e.length-1;n>=0;--n){let r=e[n];x(r)&&t.push(r)}return}x(e)&&t.push(e)}function Th(e,t,n,r){let i=new Set(e.sourceCode.visitorKeys[t.type]);for(let[e,a]of Object.entries(t))!i.has(e)||e===`arguments`&&!r||wh(a,n)}function Eh(e){return e.type===`Identifier`}function Dh(e,t){return e.sourceCode.getScope(t).references.find(e=>e.identifier===t)}function Oh(e,t){let n=[],r=new Set,i=0;return kh(e,t,e=>{n[i++]=e},r),n}function kh(e,t,n,r){if(r.has(t))return;let i=n(t);if(r.add(t),i===!1)return;let a=t.resolved?.defs??[];for(let t of a){if(t.type===`ImportBinding`||t.type===`Parameter`)continue;let i=Ph(t);if(i!==void 0)for(let t of vh(e,i).references)kh(e,t,n,r)}}function Ah(e){let t=e.identifier.parent;for(;;){if(t.type===`CallExpression`){let n=e.identifier;for(;n.parent.type===`MemberExpression`;)n=n.parent;if(t.callee===n)return t}else if(t.type===`MemberExpression`){t=t.parent;continue}return}}function jh(e,t){let n=[];for(let r of Oh(e,t)){let t=Ah(r);if(t!==void 0){for(let r of t.arguments)if(x(r))for(let t of vh(e,r).references)for(let r of Oh(e,t))n.push(r)}}return n}function Mh(e,t){let n=e;for(;n!==t;){if(n.type===`AwaitExpression`||n.type===`UnaryExpression`&&n.operator===`void`||mh.has(n.type))return!1;let{parent:e}=n;if(e===null)return!1;n=e}return!0}function Nh(e,t){function n(e){let t=e;for(;t!=null;){if(mh.has(t.type))return t;t=t.parent}}function r(e){let t=e.identifier;for(;;){let e=t.parent;if(e===null)return!1;if(e.type===`VariableDeclarator`&&e.init===t)return!0;if(ph.has(e.type)){t=e;continue}return!1}}let i=[];return kh(e,t,e=>{let t=Ah(e),a=n(t);if(t!==void 0&&a!==void 0&&Mh(t,a))i.push(e);else if(r(e))i.push(e);else return!1},new Set),i}function Ph(e){if(`init`in e.node)return e.node.init??void 0;if(`body`in e.node){let{body:t}=e.node;return x(t)?t:void 0}}const Fh=new Set([`forwardRef`,`memo`]),Ih=`useEffect`,Lh=`useState`,Rh=`useRef`,zh=new WeakMap;function U(e,t){let{ast:n}=e,r=zh.get(n);r===void 0&&(r=new Map,zh.set(n,r));let i=r.get(t);if(i!==void 0)return i;let a=Bh(e,t);return r.set(t,a),a}function Bh(e,t){let n=gh(e),r={environment:t,reactSources:Vh(t),scope:n,sourceCode:e},i=[];for(let e of n.callExpressions){if(!Hh(r,e))continue;let t=Uh(r,e);t!==void 0&&i.push(t)}return{effects:i,findEnclosingReactNode(e){return Sg(r,e)},getComponentName(e){return Cg(e)},getStateName(e){return yg(r,e)},getUseStateDeclaration(e){return bg(r,e)},isConstant(e){return pg(e)},isCustomHook(e){return Zh(e)},isProp(e){return fg(r,e)},isPropCall(e){return _g(r,e)},isRefCall(e){return vg(r,e)},isRefCurrent(e){return hg(e)},isState(e){return cg(r,e)},isStateCall(e){return gg(r,e)},isStateSetter(e){return lg(r,e)},scope:n}}function Vh(e){return e===`standard`?new Set([`react`,`react-dom`]):new Set([`@rbxts/react`,`@rbxts/roact`])}function Hh(e,t){return eg(e,t)?Zm(e.sourceCode,t,new Set([Ih]),e.reactSources):!1}function Uh(e,t){let n=Wh(e,t);if(n===void 0)return;let r=e.scope.getDownstreamReferences(n),i=Gh(e,t);return{cleanup:Kh(n),dependencyReferences:i,functionNode:n,functionReferences:r,node:t}}function Wh(e,t){let[n]=t.arguments;if(n?.type===`ArrowFunctionExpression`||n?.type===`FunctionExpression`)return n;if(n?.type!==`Identifier`)return;let r=e.scope.getReference(n)?.resolved?.defs[0];if(r===void 0)return;let i=qh(r.node);if(i!==void 0)return i.type===`ArrowFunctionExpression`||i.type===`FunctionExpression`||i.type===`BlockStatement`?i:void 0}function Gh(e,t){let[,n]=t.arguments;if(n?.type===`ArrayExpression`)return e.scope.getDownstreamReferences(n)}function Kh(e){if(e.type!==`ArrowFunctionExpression`&&e.type!==`FunctionExpression`||e.body?.type!==`BlockStatement`)return;let{body:t}=e.body;for(let e=t.length-1;e>=0;--e){let n=t[e];if(n?.type===`ReturnStatement`&&n.argument!==null)return n}}function qh(e){if(`init`in e)return e.init??void 0;if(`body`in e){let{body:t}=e;return Tg(t)?t:void 0}}function Jh(e){let t=e.charAt(0);return t===t.toUpperCase()}function Yh(e){return e.type!==`FunctionDeclaration`&&(e.type!==`VariableDeclarator`||e.init?.type!==`ArrowFunctionExpression`&&e.init?.type!==`CallExpression`)||e.id?.type!==`Identifier`?!1:Jh(e.id.name)}function Xh(e,t){function n(e){if(e.type!==`VariableDeclarator`||e.init?.type!==`CallExpression`||e.init.callee.type!==`Identifier`||Fh.has(e.init.callee.name))return!1;let[t]=e.init.arguments;return t?.type===`ArrowFunctionExpression`||t?.type===`FunctionExpression`}function r(t){if(t.type!==`VariableDeclarator`)return!1;let{id:n}=t;return n.type===`Identifier`?ng(e,n)?.references.some(e=>{let{parent:t}=e.identifier;return t.type!==`CallExpression`||t.arguments.every(t=>t!==e.identifier)?!1:t.callee.type===`Identifier`&&!Fh.has(t.callee.name)})??!1:!1}return Yh(t)&&(n(t)||r(t))}function Zh(e){if(e.type!==`FunctionDeclaration`&&(e.type!==`VariableDeclarator`||e.init===null||e.init.type!==`ArrowFunctionExpression`&&e.init.type!==`FunctionExpression`)||e.id?.type!==`Identifier`)return!1;let{name:t}=e.id,n=t.charAt(3);return t.startsWith(`use`)&&t.length>3&&n===n.toUpperCase()}function Qh(e,t){if(t.type===`MemberExpression`&&tg(e,t,Lh))return!0;if(t.type!==`Identifier`)return!1;let{parent:n}=t;return n.type===`MemberExpression`&&tg(e,n,Lh)||t.name===Lh?!0:og(e,t,Lh)}function $h(e,t){if(t.type===`MemberExpression`)return tg(e,t,Rh);if(t.type!==`Identifier`)return!1;let{parent:n}=t;return n.type===`MemberExpression`&&tg(e,n,Rh)||t.name===Rh?!0:og(e,t,Rh)}function eg(e,t){return t.type===`CallExpression`?t.callee.type===`Identifier`?t.callee.name===Ih||og(e,t.callee,Ih):t.callee.type===`MemberExpression`&&tg(e,t.callee,Ih):!1}function tg(e,t,n){return t.computed||t.object.type!==`Identifier`||t.property.type!==`Identifier`?!1:t.object.name===`React`&&t.property.name===n||t.property.name===n&&sg(e,t.object)}function ng(e,t){if(t.type!==`Identifier`)return;let{name:n}=t,r=e.sourceCode.getScope(t);for(;r!==null;){let e=r.set.get(n);if(e!==void 0)return e;r=r.upper}}function rg(e,t,n){if(e===void 0)return!1;for(let r of e.defs)if(ig(r,t,n))return!0;return!1}function ig(e,t,n){if(e.type!==`ImportBinding`)return!1;let r=e.node.parent;if(r?.type!==`ImportDeclaration`||!n.has(r.source.value)||e.node.type!==`ImportSpecifier`)return!1;let{imported:i}=e.node;return i.type===`Identifier`&&i.name===t||i.type===`Literal`&&i.value===t}function ag(e,t){if(e===void 0)return!1;for(let n of e.defs){if(n.type!==`ImportBinding`)continue;let e=n.node.parent;if(e?.type===`ImportDeclaration`&&t.has(e.source.value)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0}return!1}function og(e,t,n){return t.type===`Identifier`&&rg(ng(e,t),n,e.reactSources)}function sg(e,t){return ag(ng(e,t),e.reactSources)}function cg(e,t){let n=ug(e,t);if(n===void 0)return!1;let[r]=n;return r?.type===`Identifier`&&r.name===t.identifier.name}function lg(e,t){let n=ug(e,t);if(n===void 0)return!1;let[,r]=n;return r?.type===`Identifier`&&r.name===t.identifier.name}function ug(e,t){let n=t.resolved?.defs.find(t=>dg(e,t.node));if(n?.node.type!==`VariableDeclarator`||n.node.id.type!==`ArrayPattern`)return;let{elements:r}=n.node.id;return r.length!==1&&r.length!==2?void 0:r}function dg(e,t){return t.type===`VariableDeclarator`&&t.init?.type===`CallExpression`&&Qh(e,t.init.callee)&&t.id.type===`ArrayPattern`}function fg(e,t){return t.resolved?.defs.some(t=>{if(t.type!==`Parameter`)return!1;let n=xg(t.node);return Yh(n)&&!Xh(e,n)||Zh(n)})??!1}function pg(e){return(e.resolved?.defs??[]).some(e=>{if(e.node.type!==`VariableDeclarator`)return!1;let{init:t}=e.node;return t?.type===`Literal`||t?.type===`TemplateLiteral`||t?.type===`ArrayExpression`||t?.type===`ObjectExpression`})}function mg(e,t){return t.resolved?.defs.some(t=>t.node.type!==`VariableDeclarator`||t.node.init?.type!==`CallExpression`?!1:$h(e,t.node.init.callee))??!1}function hg(e){let{parent:t}=e.identifier;return t.type===`MemberExpression`&&t.property.type===`Identifier`&&t.property.name===`current`}function gg(e,t){return e.scope.getSynchronousCallChain(t).some(t=>lg(e,t))}function _g(e,t){return e.scope.getSynchronousCallChain(t).some(t=>fg(e,t))}function vg(e,t){return e.scope.getSynchronousCallChain(t).some(t=>hg(t)||mg(e,t))}function yg(e,t){let n=bg(e,t);if(n?.id.type!==`ArrayPattern`)return;let[r,i]=n.id.elements,a=r?.type===`Identifier`?r.name:void 0,o=i?.type===`Identifier`?i.name:void 0;return a??o}function bg(e,t){let n=e.scope.getUpstreamReferences(t).find(t=>Qh(e,t.identifier))?.identifier;if(n===void 0)return;let r=n;for(;r.type!==`VariableDeclarator`;){let e=r.parent;if(e===null)return;r=e}return r}function xg(e){if(e.type!==`ArrowFunctionExpression`)return e;let{parent:t}=e;return t.type===`CallExpression`?t.parent:t}function Sg(e,t){if(t==null)return;if(Yh(t)||Xh(e,t)||Zh(t))return wg(t);let{parent:n}=t;return n===null?void 0:Sg(e,n)}function Cg(e){if(e===void 0||e.type!==`FunctionDeclaration`&&e.type!==`VariableDeclarator`)return;if(e.type===`FunctionDeclaration`){let{id:t}=e;return t===null?void 0:t.name}let t=e.id;if(t!==null&&t.type===`Identifier`)return t.name}function wg(e){return e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`VariableDeclarator`?e:void 0}function Tg(e){return typeof e==`object`&&!!e&&`type`in e}function Eg(e,t){let n=[],r=0,i=t.dependencyReferences??[];for(let t of i)for(let i of e.scope.getUpstreamReferences(t))e.isProp(i)&&(n[r++]=i);return n}function Dg(e,t,n,r){for(let i of n.functionReferences){if(!t.scope.isSynchronousWithin(i.identifier,n.functionNode)||!t.isStateCall(i))continue;let a=t.scope.getCallExpression(i);if(a===void 0||t.scope.getArgumentUpstreamReferences(i).some(t.isProp))continue;let o=t.getStateName(i);o!==void 0&&e.report({data:{props:r.map(e=>`"${e.identifier.name}"`).join(` and `),state:o},messageId:`avoidAdjustingStateWhenAPropChanges`,node:a})}}const Og=y(`no-adjust-state-on-prop-change`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects){if(t.dependencyReferences===void 0)continue;let r=Eg(n,t);r.length!==0&&Dg(e,n,t,r)}}}},meta:{docs:{description:`Disallow adjusting state in an effect when a prop changes.`,recommended:!0},messages:{avoidAdjustingStateWhenAPropChanges:`Avoid adjusting state when a prop changes. Instead, adjust "{{state}}" directly during render when {{props}} changes, or refactor your state to avoid this need entirely.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}}),kg=new Set([`useAsyncEffect`,`useEffect`,`useInsertionEffect`,`useLayoutEffect`,`useMountEffect`,`useReactiveEffect`,`useUnmountEffect`,`useUpdateEffect`]),Ag=y(`no-cascading-set-state`,`react`,{create(e){return{CallExpression(t){let n=N(t);if(n===void 0||!kg.has(n))return;let r=ua(t);if(r===void 0)return;let i=ya(r);i<3||e.report({data:{count:String(i)},messageId:`cascadingSetState`,node:t})}}},meta:{docs:{description:`Disallow effect hooks with many cascading state updates.`,recommended:!0},messages:{cascadingSetState:`{{count}} setState calls in a single useEffect — consider using useReducer or deriving state`},type:`problem`}});function jg(e,t,n,r){for(let i of n.functionReferences){if(!t.scope.isSynchronousWithin(i.identifier,n.functionNode)||!t.isStateCall(i))continue;let a=t.scope.getCallExpression(i);if(a===void 0)continue;let o=t.scope.getArgumentUpstreamReferences(i).some(e=>t.isState(e));if(!r||o)continue;let s=t.getStateName(i);s!==void 0&&e.report({data:{state:s},messageId:`avoidChainingStateUpdates`,node:a})}}const Mg=y(`no-chain-state-updates`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects){if(t.cleanup!==void 0||t.dependencyReferences===void 0)continue;let r=t.dependencyReferences.flatMap(e=>n.scope.getUpstreamReferences(e)).some(e=>n.isState(e));jg(e,n,t,r)}}}},meta:{docs:{description:`Disallow chaining state changes in an effect.`,recommended:!0},messages:{avoidChainingStateUpdates:`Avoid chaining state changes. When possible, update "{{state}}" along with other relevant state simultaneously.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function Ng(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isStateCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=t.getStateName(r);a!==void 0&&t.scope.getArgumentUpstreamReferences(r).some(e=>t.isState(e)||t.isProp(e))&&e.report({data:{state:a},messageId:`avoidDerivedState`,node:i})}}const Pg=y(`no-derived-state`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects)t.cleanup===void 0&&t.dependencyReferences!==void 0&&Ng(e,n,t)}}},meta:{docs:{description:`Disallow storing derived state in an effect.`,recommended:!0},messages:{avoidDerivedState:`Avoid storing derived state. Instead, compute "{{state}}" directly during render.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function Fg(e,t,n){for(let r of t.scope.getDescendantIfStatements(n.functionNode))if(r.alternate===null)for(let n of t.scope.getDownstreamReferences(r.test)){let r=t.scope.getUpstreamReferences(n),{name:i}=n.identifier;r.some(e=>t.isState(e))&&e.report({data:{name:i},messageId:`avoidEventHandler`,node:n.identifier}),r.some(e=>t.isProp(e))&&e.report({data:{name:i},messageId:`avoidPropHandler`,node:n.identifier})}}const Ig=y(`no-event-handler`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects)t.cleanup===void 0&&Fg(e,n,t)}}},meta:{docs:{description:`Disallow using state and an effect as an event handler.`,recommended:!0},messages:{avoidEventHandler:`Avoid using state and effects as an event handler. Instead, call the code that uses "{{name}}" directly when the event occurs.`,avoidPropHandler:`Avoid using props and effects as an event handler. Instead, move the code that uses "{{name}}" to the parent component.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function Lg(e,t){return t.functionReferences.filter(n=>e.scope.isSynchronousWithin(n.identifier,t.functionNode)?e.isStateCall(n):!1)}function Rg(e,t){let n=[...e.scope.getDownstreamReferences(t)];for(let r of e.scope.getDescendantCallExpressions(t))for(let t of r.arguments)for(let r of e.scope.getDownstreamReferences(t))n.push(r);return n}function zg(e,t){let n=new Set;for(let r of t)for(let t of e.scope.getUpstreamReferences(r)){let e=t.resolved;e!=null&&(Hg(e)||n.add(e))}return n}function Bg(e,t,n,r){for(let i of n){if(!t.scope.getUpstreamReferences(i).some(e=>{let t=e.resolved;return t!=null&&r.has(t)}))continue;let n=t.scope.getCallExpression(i);if(n===void 0)continue;let a=t.getStateName(i);a!==void 0&&e.report({data:{state:a},messageId:`avoidExternalStoreSubscription`,node:n})}}const Vg=y(`no-external-store-subscription`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects){if(t.cleanup===void 0||t.cleanup.argument===null)continue;let r=Lg(n,t);if(r.length===0)continue;let i=Rg(n,t.cleanup.argument),a=zg(n,i);Bg(e,n,r,a)}}}},meta:{docs:{description:`Disallow subscribing to an external store in an effect.`,recommended:!0},messages:{avoidExternalStoreSubscription:`Avoid using an effect to subscribe to an external store. Instead, use "useSyncExternalStore" to manage "{{state}}".`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function Hg(e){return e.defs.some(e=>e.type===`ImportBinding`)}const Ug=/^[A-Z]/u;function W(e){return Ug.test(e)}const Wg=new Set([`%`,`*`,`**`,`+`,`-`,`/`]);function Gg(e){return e.type===`FunctionDeclaration`&&e.id!==null&&W(e.id.name)}function Kg(e){return e.type===`CallExpression`?e.callee.type===`Identifier`?e.callee.name===`memo`:e.callee.type===`MemberExpression`&&e.callee.object.type===`Identifier`&&e.callee.object.name===`React`&&e.callee.property.type===`Identifier`&&e.callee.property.name===`memo`:!1}function qg({callee:e}){return e.type===`Identifier`?e.name===`forwardRef`||e.name===`memo`:e.type===`MemberExpression`&&e.object.type===`Identifier`&&e.object.name===`React`&&e.property.type===`Identifier`&&(e.property.name===`forwardRef`||e.property.name===`memo`)}function Jg({name:e}){return e.type===`JSXIdentifier`?e.name:e.name.name}function Yg(e,t){for(let n of e.openingElement.attributes)if(n.type===`JSXAttribute`&&n.name.type===`JSXIdentifier`&&n.name.name===t)return!0;return!1}function Xg(e,t){switch(e.type){case`BinaryExpression`:return Wg.has(e.operator)?(t.push(e.right,e.left),!0):!1;case`Identifier`:case`Literal`:return!0;case`MemberExpression`:return!e.computed&&(t.push(e.object),!0);case`ParenthesizedExpression`:return t.push(e.expression),!0;case`TemplateLiteral`:return e.expressions.length===0;case`UnaryExpression`:return t.push(e.argument),!0;default:return!1}}function Zg(e){let t=[e];for(;t.length>0;){let e=t.pop();if(e===void 0)break;if(!Xg(e,t))return!1}return!0}function Qg(e,n){return e?.type===`CallExpression`&&e.callee.type===`Identifier`&&(t.isString(n)?e.callee.name===n:n.has(e.callee.name))}function $g(e){return e.type===`VariableDeclarator`&&e.id.type===`Identifier`&&W(e.id.name)&&e.init!==null&&(e.init.type===`ArrowFunctionExpression`||e.init.type===`FunctionExpression`)}function e_(e){return e.loc.end.line-e.loc.start.line+1}function t_(e){if(!(e.type!==`FunctionDeclaration`||!Gg(e)||e.id===null||e.body===null)&&!(!x(e.id)||!(`name`in e.id)||!t.isString(e.id.name)))return{name:e.id.name,body:e.body,nameNode:e.id}}function n_(e){if(e.type!==`VariableDeclarator`||!$g(e)||e.init===null||!(`name`in e.id)||!t.isString(e.id.name)||e.init.type!==`ArrowFunctionExpression`&&e.init.type!==`FunctionExpression`||!x(e.init.body))return;let{name:n}=e.id;return{name:n,body:e.init.body,nameNode:e.id}}const r_=y(`no-giant-component`,`react`,{create(e){function t(t,n,r){let i=e_(r);i<=300||e.report({data:{name:n,lineCount:String(i)},messageId:`giantComponent`,node:t})}return{FunctionDeclaration(e){let n=t_(e);n!==void 0&&t(n.nameNode,n.name,n.body)},VariableDeclarator(e){let n=n_(e);n!==void 0&&t(n.nameNode,n.name,n.body)}}},meta:{docs:{description:`Report React components whose bodies exceed 300 lines.`,recommended:!0},messages:{giantComponent:`Component "{{name}}" is {{lineCount}} lines — consider breaking it into smaller focused components`},type:`problem`}}),i_=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`]),a_=`maxDestructuredProps`;function o_(e){if(e.type===`FunctionDeclaration`&&e.id!==null&&S(e.id.name))return e.id.name;if(e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`&&S(t.id.name))return t.id.name;if(t.type===`Property`&&t.key.type===`Identifier`&&S(t.key.name)||t.type===`MethodDefinition`&&t.key.type===`Identifier`&&S(t.key.name))return t.key.name}}function s_(e){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`&&S(t.id.name))return t.id.name;if(t.type===`AssignmentExpression`&&t.left.type===`Identifier`&&S(t.left.name))return t.left.name;let n;if(t.type===`ExportDefaultDeclaration`&&e.arguments.length>0){let[t]=e.arguments;t?.type===`FunctionExpression`&&t.id&&S(t.id.name)&&(n=t.id.name)}return n}function c_(e){if(!Re(e))return;let[t]=e.params;if(!t)return;let n;if(t.type===`ObjectPattern`&&(n=t),t.type===`AssignmentPattern`&&t.left.type===`ObjectPattern`&&(n=t.left),!n)return;let r=0;for(let e of n.properties)e.type===`Property`&&(r+=1);return r}function l_(e,t){return t?.type===`TSLiteralType`}function u_(e,t){if(!Re(e)||e.body===null)return{maxJsxDepth:0,nullLiterals:[],stateHookCount:0};let n=0,r=0,i=[],a=0;return da(e.body,o=>{if(!(o!==e&&i_.has(o.type))){if(o.type===`JSXElement`||o.type===`JSXFragment`){a+=1,a>n&&(n=a);return}if(o.type===`CallExpression`){let e=N(o);e!==void 0&&e.length>0&&t.has(e)&&(r+=1)}o.type===`Literal`&&o.value===null&&!l_(o,o.parent)&&i.push(o)}}),{maxJsxDepth:n,nullLiterals:i,stateHookCount:r}}function d_(e){let t={enforceTargetLines:!0,ignoreComponents:[],maxDestructuredProperties:5,maxLines:200,maxStateHooks:5,maxTsxNesting:3,stateHooks:[`useState`,`useReducer`,`useBinding`],targetLines:120},n=e??{};return{enforceTargetLines:n.enforceTargetLines??t.enforceTargetLines,ignoreComponents:n.ignoreComponents??t.ignoreComponents,maxDestructuredProperties:n[a_]??t.maxDestructuredProperties,maxLines:n.maxLines??t.maxLines,maxStateHooks:n.maxStateHooks??t.maxStateHooks,maxTsxNesting:n.maxTsxNesting??t.maxTsxNesting,stateHooks:n.stateHooks??t.stateHooks,targetLines:n.targetLines??t.targetLines}}const f_=`tooManyProps`,p_=y(`no-god-components`,`react`,{create(e){let n=d_(e.options[0]),r=new Set(n.ignoreComponents),i=new Set(n.stateHooks),a=new WeakSet;function o(o,s){if(r.has(s)||a.has(o))return;a.add(o);let c=o.loc,l=c.end.line-c.start.line+1;l>n.maxLines?e.report({data:{name:s,lines:String(l),max:String(n.maxLines),target:String(n.targetLines)},messageId:`exceedsMaxLines`,node:o}):n.enforceTargetLines&&l>n.targetLines&&e.report({data:{name:s,lines:String(l),max:String(n.maxLines),target:String(n.targetLines)},messageId:`exceedsTargetLines`,node:o});let u=c_(o);t.isNumber(u)&&u>n.maxDestructuredProperties&&e.report({data:{name:s,count:String(u),max:String(n.maxDestructuredProperties)},messageId:f_,node:o});let d=u_(o,i);d.maxJsxDepth>n.maxTsxNesting&&e.report({data:{name:s,depth:String(d.maxJsxDepth),max:String(n.maxTsxNesting)},messageId:`tsxNestingTooDeep`,node:o}),d.stateHookCount>n.maxStateHooks&&e.report({data:{name:s,count:String(d.stateHookCount),hooks:n.stateHooks.join(`, `),max:String(n.maxStateHooks)},messageId:`tooManyStateHooks`,node:o});for(let t of d.nullLiterals)e.report({messageId:`nullLiteral`,node:t})}function s(e){let t=o_(e);t!==void 0&&t.length!==0&&o(e,t)}return{ArrowFunctionExpression:s,CallExpression(e){if(!qg(e))return;let[t]=e.arguments;if(!t||t.type!==`FunctionExpression`&&t.type!==`ArrowFunctionExpression`)return;let n=s_(e),r=o_(t),i=n??r;i!==void 0&&i.length!==0&&o(t,i)},FunctionDeclaration(e){e.type===`FunctionDeclaration`&&s(e)},FunctionExpression(e){e.type===`FunctionExpression`&&s(e)}}},meta:{docs:{description:`Enforce React component size and complexity limits inspired by the 'Refactor God Component' checklist.`,recommended:!1},messages:{exceedsMaxLines:`Component '{{name}}' is {{lines}} lines; max allowed is {{max}}. Split into smaller components/hooks.`,exceedsTargetLines:`Component '{{name}}' is {{lines}} lines; target is {{target}} (max {{max}}). Consider extracting hooks/components.`,nullLiteral:"Avoid `null` in components; use `undefined` instead.",[f_]:`Component '{{name}}' destructures {{count}} props; max allowed is {{max}}. Group props or split the component.`,tooManyStateHooks:`Component '{{name}}' has {{count}} state hooks ({{hooks}}); max allowed is {{max}}. Extract cohesive state into a custom hook.`,tsxNestingTooDeep:`Component '{{name}}' has TSX nesting depth {{depth}}; max allowed is {{max}}. Extract child components.`},schema:[{additionalProperties:!1,properties:{enforceTargetLines:{default:!0,description:`Whether to report when exceeding targetLines (soft limit).`,type:`boolean`},ignoreComponents:{default:[],description:`Component names to ignore.`,items:{type:`string`},type:`array`},[a_]:{default:5,description:`Maximum number of destructured props in a component parameter.`,type:`number`},maxLines:{default:200,description:`Hard maximum lines for a component.`,type:`number`},maxStateHooks:{default:5,description:`Maximum number of stateful hook calls in a component.`,type:`number`},maxTsxNesting:{default:3,description:`Maximum JSX/TSX nesting depth in a component.`,type:`number`},stateHooks:{default:[`useState`,`useReducer`,`useBinding`],description:`Hook names to count toward state complexity.`,items:{type:`string`},type:`array`},targetLines:{default:120,description:`Soft target lines for a component.`,type:`number`}},type:`object`}],type:`problem`}});function m_(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isStateCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=t.getStateName(r);if(a===void 0)continue;let o=`undefined`,[s]=i.arguments;s!==void 0&&(o=e.sourceCode.getText(s)),e.report({data:{arguments:o,state:a},messageId:`avoidInitializingState`,node:i})}}const h_=y(`no-initialize-state`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects)t.dependencyReferences!==void 0&&t.dependencyReferences.every(n.isStateSetter)&&m_(e,n,t)}}},meta:{docs:{description:`Disallow initializing state in an effect.`,recommended:!0},messages:{avoidInitializingState:`Avoid initializing state in an effect. Instead, initialize "{{state}}"'s "useState()" with "{{arguments}}". For SSR hydration, prefer "useSyncExternalStore".`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function g_(e){return e.name.type===`JSXIdentifier`?e.name.name:void 0}function __(e){switch(e.type){case`ArrayExpression`:return`array`;case`ArrowFunctionExpression`:case`FunctionExpression`:return`function`;case`JSXElement`:case`JSXFragment`:return`JSX`;case`ObjectExpression`:return`object`;default:return}}const v_=y(`no-inline-property-on-memo-component`,`react`,{create(e){let t=new Set;return{JSXAttribute(n){if(n.value?.type!==`JSXExpressionContainer`||n.value.expression.type===`JSXEmptyExpression`)return;let r=n.parent;if(!me(r))return;let i=g_(r);if(i===void 0||!t.has(i))return;let a=__(n.value.expression);a!==void 0&&e.report({data:{name:i,type:a},messageId:`inlineProperty`,node:n.value.expression})},VariableDeclarator(e){e.id.type===`Identifier`&&e.init!==null&&Kg(e.init)&&t.add(e.id.name)}}},meta:{docs:{description:`Prevent inline properties from being passed to memoized components.`,recommended:!0},messages:{inlineProperty:`Inline {{type}} passed to memoized component "{{name}}" — new references cause unnecessary re-renders`},type:`problem`}});function y_(e){return e.parent.type===`ExpressionStatement`?!0:e.parent.type!==`UnaryExpression`||e.parent.operator!==`void`?!1:e.parent.parent.type===`ExpressionStatement`}function b_(e,t,n,r){if(Gm(e,t))for(let t of e.specifiers){if(t.type===`ImportSpecifier`){ce(t.imported,`useMemo`)&&n.add(t.local.name);continue}r.add(t.local.name)}}const x_=new Set([`Instance`]);function S_(e){let n=t.isObject(e)&&M(e.constructors)?new Set(e.constructors):x_,r=t.isObject(e)&&e.environment===`standard`?`standard`:`roblox-ts`,i=t.isObject(e)?e.maxHelperTraceDepth:void 0;return{constructors:n,environment:r,maxHelperTraceDepth:Di(i)&&Number.isInteger(i)&&i>=0?i:4}}function C_(e){return e?.type===`CallExpression`}function w_(e,t,n){let r=e.parent;for(;r!==null;){if(O(r)){let{parent:e}=r;if(C_(e)&&e.arguments[0]===r){if(!de(e,t,n)){r=e.parent;continue}return!0}}r=r.parent}return!1}function T_(e,t,n,r,i){let a=r.get(e);if(a!==void 0)return a;if(i.has(e))return new Set;i.add(e);let o=new Set;for(let a of e.defs){let e=E_(a,t,n,r,i);for(let t of e)o.add(t)}return i.delete(e),r.set(e,o),o}function E_(e,t,n,r,i){if(e.type===`FunctionName`)return D_(e.node,n);if(e.type!==`Variable`)return new Set;let{node:a}=e;if(a.type!==`VariableDeclarator`||a.init===null)return new Set;let o=m(a.init);if(O(o))return O_(o,n);if(o.type!==`Identifier`)return new Set;let s=_(t.getScope(o),o.name);return s===void 0?new Set:T_(s,t,n,r,i)}function D_(e,t){return e.type===`FunctionDeclaration`?O_(e,t):new Set}function O_(e,t){let n=t.get(e)?.id;return n===void 0?new Set:new Set([n])}function k_(e,t,n,r){let i=_(t.getScope(e),e.name);return i===void 0?new Set:T_(i,t,n,r,new Set)}function A_(e,t,n,r){for(let i of t.values())for(let t of i.callIdentifiers){let a=k_(t,e,n,r);for(let e of a)i.callees.add(e)}}function j_(e,t,n){let r=new Set(e),i=[];for(let t of e)i.push({depth:0,functionId:t});let a=0;for(;a<i.length;){let e=i[a];if(a+=1,e===void 0||e.depth>=n)continue;let o=t.get(e.functionId);if(o!==void 0)for(let t of o.callees)r.has(t)||(r.add(t),i.push({depth:e.depth+1,functionId:t}))}return r}function M_(e,t,n,r,i){let a=new Set;for(let e of t){let t=r.get(e)?.id;t!==void 0&&a.add(t)}for(let t of n){let n=k_(t,e,r,i);for(let e of n)a.add(e)}return a}const N_=y(`no-new-instance-in-use-memo`,`react`,{create(e){let t=S_(e.options[0]);if(t.constructors.size===0)return{};let n=Um(t.environment),r=new Set,i=new Set,a=new Map,o=new Map,s=[],c=[],l=[],u=[],d=new Map,f=0;function p(e){let t=a.get(e);if(t!==void 0)return t;let n={id:f,callees:new Set,callIdentifiers:[]};return f+=1,a.set(e,n),o.set(n.id,n),n}function m(e){let t=s.at(-1);if(t===void 0)return;let n=o.get(t);n!==void 0&&n.callIdentifiers.push(e)}function h(e){s.push(p(e).id)}function g(){s.pop()}return{ArrowFunctionExpression:h,"ArrowFunctionExpression:exit":g,CallExpression(e){if(e.callee.type===`Identifier`&&m(e.callee),!de(e,r,i))return;let[t]=e.arguments;if(t!==void 0){if(t.type===`Identifier`){l.push(t);return}O(t)&&u.push(t)}},FunctionDeclaration:h,"FunctionDeclaration:exit":g,FunctionExpression:h,"FunctionExpression:exit":g,ImportDeclaration(e){b_(e,n,r,i)},NewExpression(e){if(e.callee.type!==`Identifier`)return;let n=e.callee.name;t.constructors.has(n)&&c.push({constructorName:n,containingFunctionId:s.at(-1),isLexicallyInsideUseMemo:w_(e,r,i),node:e})},"Program:exit"(){A_(e.sourceCode,o,a,d);let n=j_(M_(e.sourceCode,u,l,a,d),o,t.maxHelperTraceDepth);for(let t of c)!(t.containingFunctionId!==void 0&&n.has(t.containingFunctionId))&&!t.isLexicallyInsideUseMemo||e.report({data:{constructorName:t.constructorName},messageId:`noNewInUseMemo`,node:t.node})}}},meta:{docs:{description:`Disallow configured constructor calls (default: new Instance) inside React useMemo callbacks.`},messages:{noNewInUseMemo:"Avoid creating '{{constructorName}}' with `new` inside useMemo. Create it outside the memo callback or use an effect/ref pattern."},schema:[{additionalProperties:!1,properties:{constructors:{default:[...x_],description:`Constructor identifiers that should be disallowed inside useMemo callbacks.`,items:{type:`string`},type:`array`},environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},maxHelperTraceDepth:{default:4,description:`Maximum depth for tracing local helper function calls from useMemo callbacks. 0 disables helper traversal.`,minimum:0,type:`integer`}},type:`object`}],type:`problem`}});function P_(e,t){let n=[];for(let r of e.scope.getArgumentUpstreamReferences(t)){if(e.scope.getUpstreamReferences(r).length!==1)continue;let{identifier:t}=r;R_(t)||e.isProp(r)||z_(t)||e.isRefCurrent(r)||e.isConstant(r)||n.push(r)}return n}function F_(e,t,n){let r=e.getComponentName(t);return r!==void 0&&r!==``?`"${r}"`:n?`this custom hook`:`this component`}function I_(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isPropCall(r)||t.isRefCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=P_(t,r);if(a.length===0)continue;let o=t.findEnclosingReactNode(n.node),s=o!==void 0&&t.isCustomHook(o);e.report({data:{name:F_(t,o,s),data:a.map(e=>`"${e.identifier.name}"`).join(` and `)},messageId:s?`avoidPassingDataToParentInHook`:`avoidPassingDataToParentInComponent`,node:i})}}const L_=y(`no-pass-data-to-parent`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects)t.cleanup===void 0&&I_(e,n,t)}}},meta:{docs:{description:`Disallow passing data to parents in an effect.`,recommended:!0},messages:{avoidPassingDataToParentInComponent:`Avoid passing data to parents in an effect. Instead, fetch "{{data}}" in the parent and pass it down to {{name}} as a prop.`,avoidPassingDataToParentInHook:`Avoid passing data to parents in an effect. Instead, return "{{data}}" from {{name}}.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function R_(e){return e.type!==`Identifier`&&e.type!==`MemberExpression`?!1:e.type===`Identifier`?e.name===`useState`:e.object.type===`Identifier`&&e.object.name===`React`&&e.property.type===`Identifier`&&e.property.name===`useState`}function z_(e){return e.type!==`Identifier`&&e.type!==`MemberExpression`?!1:e.type===`Identifier`?e.name===`useRef`:e.object.type===`Identifier`&&e.object.name===`React`&&e.property.type===`Identifier`&&e.property.name===`useRef`}function B_(e,t,n){let r=e.getComponentName(t);return r!==void 0&&r!==``?`"${r}"`:n?`this custom hook`:`this component`}function V_(e){return e.map(e=>`"${e.identifier.name}"`).join(` and `)}function H_(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isPropCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=t.scope.getArgumentUpstreamReferences(r).filter(e=>t.isState(e));if(a.length===0)continue;let o=t.findEnclosingReactNode(n.node),s=o!==void 0&&t.isCustomHook(o);e.report({data:{name:B_(t,o,s),state:V_(a)},messageId:s?`avoidPassingLiveStateToParentInHook`:`avoidPassingLiveStateToParentInComponent`,node:i})}}const U_=y(`no-pass-live-state-to-parent`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects)H_(e,n,t)}}},meta:{docs:{description:`Disallow passing live state to parents in an effect.`,recommended:!0},messages:{avoidPassingLiveStateToParentInComponent:`Avoid passing live state to parents in an effect. Instead, lift "{{state}}" to the parent and pass it down to {{name}} as a prop.`,avoidPassingLiveStateToParentInHook:`Avoid passing live state to parents in an effect. Instead, return "{{state}}" from {{name}}.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}}),W_=new Set([`JSXElement`,`ReactElement`,`ReactNode`]),G_=new Set([`ChainExpression`,`ParenthesizedExpression`,`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]),K_=/^use[A-Z]/u;function q_(e){return K_.test(e)}function J_(e){if(e?.type!==`TSTypeReference`)return!1;let{typeName:t}=e;return t.type===`Identifier`?W_.has(t.name):t.type===`TSQualifiedName`&&W_.has(t.right.name)}function Y_({returnType:e}){return e?.typeAnnotation??void 0}function X_(e){if(e.type===`ArrowFunctionExpression`&&(e.body.type===`JSXElement`||e.body.type===`JSXFragment`))return!0;if(e.body===null)return!1;let t=!1;return fa(e.body,e=>{if(t||e.type!==`ReturnStatement`)return;let{argument:n}=e;n!==null&&(n.type===`JSXElement`||n.type===`JSXFragment`)&&(t=!0)}),t}function Z_({parent:e}){return e.type===`CallExpression`||e.type===`JSXExpressionContainer`||e.type===`ArrayExpression`}function Q_(e){if(e.parent?.type===`VariableDeclarator`&&e.parent.id.type===`Identifier`)return e.parent.id.name}function $_(e){return e.type===`Identifier`?e.name:void 0}function ev(e){let t=e;for(;t!==void 0&&G_.has(t.type);)t=t.parent??void 0;return t}function tv(e){let t=ev(e.parent??void 0);return t?.type===`Property`&&iv(t.value)===e}function nv(e){let t=ev(e.parent??void 0);return t?.type===`JSXExpressionContainer`&&t.parent.type===`JSXAttribute`&&iv(t.expression)===e}function rv(e){let t=ev(e.parent??void 0);return t?.type===`CallExpression`&&t.arguments.some(t=>iv(t)===e)}function iv(e){let t=e;for(;av(t);)t=t.expression;return t}function av(e){return G_.has(e.type)}function ov(e,t){if(t.type===`FunctionDeclaration`){let n=e.getDeclaredVariables(t);return n.length>0?n[0]:void 0}let{parent:n}=t;if(n.type!==`VariableDeclarator`)return;let r=e.getDeclaredVariables(n);return r.length>0?r[0]:void 0}function sv(e,t){let n=ov(t,e);if(n===void 0)return!1;let r=!1;for(let e of n.references)if(!e.isWrite()&&(r=!0,!tv(e.identifier)&&!nv(e.identifier)&&!rv(e.identifier)))return!1;return r}const cv=y(`no-render-helper-functions`,`react`,{create(e){let t=0;function n(t,n){e.report({data:{functionName:n},messageId:`noRenderHelper`,node:t})}function r(e){return e===void 0||W(e)||q_(e)}function i(t,i){let a=$_(i.id);if(r(a)||sv(t,e.sourceCode))return;let o=oe(i.id),s=o!==void 0&&J_(o.typeAnnotation),c=J_(Y_(t));a!==void 0&&(s||c||X_(t))&&n(i,a)}function a(e){let t=e.type===`FunctionExpression`?e.id?.name:void 0;if(r(t))return;let i=J_(Y_(e));t!==void 0&&(i||X_(e))&&n(e,t)}function o(e){let{parent:n}=e,r=Q_(e);if(r!==void 0&&W(r)){--t;return}if(!(t>0||Z_(e))){if(n.type===`VariableDeclarator`){i(e,n);return}n.type===`ReturnStatement`&&a(e)}}return{ArrowFunctionExpression(e){let n=Q_(e);n!==void 0&&W(n)&&(t+=1)},"ArrowFunctionExpression:exit":o,FunctionDeclaration({id:e}){e!==null&&W(e.name)&&(t+=1)},"FunctionDeclaration:exit"(r){if(r.id===null)return;let i=r.id.name;if(W(i)){--t;return}t>0||q_(i)||sv(r,e.sourceCode)||(J_(Y_(r))||X_(r))&&n(r,i)},FunctionExpression(e){let n=Q_(e);n!==void 0&&W(n)&&(t+=1)},"FunctionExpression:exit":o}},meta:{docs:{description:`Disallow non-component functions that return JSX or React elements.`},messages:{noRenderHelper:`Convert render helper '{{functionName}}' to a React component. Functions that return JSX should be PascalCase components, not camelCase helpers.`},schema:[],type:`suggestion`}}),lv=y(`no-reset-all-state-on-property-change`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t),{sourceCode:r}=e;return{Program(){for(let t of n.effects){if(t.dependencyReferences===void 0)continue;let i=n.findEnclosingReactNode(t.node);if(i!==void 0&&n.isCustomHook(i))continue;let a=uv(r,n,t.functionReferences,t.dependencyReferences,t.node);a!==void 0&&e.report({data:{prop:a.identifier.name},messageId:`avoidResettingAllStateWhenAPropChanges`,node:t.node})}}}},meta:{docs:{description:`Disallow resetting all state in an effect when a prop changes.`,recommended:!0},messages:{avoidResettingAllStateWhenAPropChanges:`Avoid resetting all state when a prop changes. Instead, if "{{prop}}" is a key, pass it as "key" so React will reset the component's state.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function uv(e,t,n,r,i){let a=n.filter(e=>t.isStateCall(e));if(a.length>0&&a.every(n=>dv(e,t,n))&&a.length===pv(t,t.findEnclosingReactNode(i)))return r.flatMap(e=>t.scope.getUpstreamReferences(e)).find(e=>t.isProp(e))}function dv(e,t,n){let r=t.scope.getCallExpression(n);if(r===void 0)return!1;let[i]=r.arguments,a=t.getUseStateDeclaration(n);if(a?.init?.type!==`CallExpression`)return!1;let[o]=a.init.arguments;return fv(i)&&fv(o)?!0:i===void 0||o===void 0?!1:e.getText(i)===e.getText(o)}function fv(e){return e===void 0||e.type===`Identifier`&&e.name===`undefined`}function pv(e,t){let n=t;for(;n!==void 0;){if(n.type===`VariableDeclarator`&&n.init?.type===`CallExpression`){let[e]=n.init.arguments;if(e===void 0||e.type!==`ArrowFunctionExpression`&&e.type!==`FunctionExpression`)return 0;n=e;continue}return e.scope.getDescendantCallExpressions(n).filter(({callee:e})=>{if(e.type!==`Identifier`&&e.type!==`MemberExpression`)return!1;if(e.type===`MemberExpression`){if(e.computed||e.object.type!==`Identifier`||e.property.type!==`Identifier`||e.object.name!==`React`||e.property.name!==`useState`)return!1}else if(e.name!==`useState`)return!1;return!0}).length}return 0}const mv=`Fragment`;function hv(e,{callee:t},n){return t.type===`Identifier`?Ym(_(e.getScope(t),t.name),`createElement`,n):t.type!==`MemberExpression`||t.computed||g(t)!==`createElement`||t.object.type!==`Identifier`?!1:Xm(_(e.getScope(t.object),t.object.name),n)}function gv(e){return e.type===`Literal`&&t.isString(e.value)}function _v(e,t){if(z(e))return S(t)||t===mv;if(!R(e.scope)||t!==mv&&!S(t))return!1;for(let t of e.defs){if(t.type===`FunctionName`||t.type===`ClassName`)return!0;if(t.type!==`Variable`||t.node.type!==`VariableDeclarator`)continue;let e=t.node.init??void 0;if(e!==void 0&&(O(e)||e.type===`ClassExpression`))return!0}return!1}function vv(e,t,n){let r=_(e.getScope(t),t.name);return Ym(r,mv,n)?!0:r!==void 0&&_v(r,t.name)}function yv(e){let t=e;for(;;){if(t.computed)return;if(t.object.type===`Identifier`)return t.object;if(t.object.type!==`MemberExpression`)return;t=t.object}}function bv(e){if(e.computed)return;let t=g(e);if(t!==void 0)return e.object.type===`MemberExpression`&&bv(e.object)===void 0?void 0:t}function xv(e,t,n){let r=yv(t);if(r===void 0)return!1;let i=bv(t);if(i===void 0)return!1;let a=_(e.getScope(r),r.name);return i===mv&&Xm(a,n)?!0:a===void 0||!z(a)?!1:S(i)}function Sv(e,t,n){return t.type===`SpreadElement`?!1:gv(t)?!0:t.type===`Identifier`?vv(e,t,n):t.type===`MemberExpression`&&xv(e,t,n)}const Cv=y(`no-static-react-create-element`,`react`,{create(e){let t=Wm(e.options[0]),{sourceCode:n}=e;return{CallExpression(r){if(!hv(n,r,t))return;let[i]=r.arguments;i!==void 0&&Sv(n,i,t)&&e.report({messageId:`useJsx`,node:r})}}},meta:{docs:{description:`Require JSX for static React.createElement calls.`,recommended:!0},messages:{useJsx:`Use JSX instead of static React.createElement calls.`},schema:[{additionalProperties:!1,properties:{environment:zm},type:`object`}],type:`problem`}}),wv=y(`no-underscore-react-props`,`react`,{createOnce(e){return{JSXAttribute(t){t.name.type!==`JSXIdentifier`||!t.name.name.startsWith(`_`)||e.report({data:{propName:t.name.name},messageId:`noUnderscoreReactProperty`,node:t.name})}}},meta:{docs:{description:`Ban React property names that begin with an underscore in JSX.`},messages:{noUnderscoreReactProperty:`React prop '{{propName}}' starts with '_'. Remove the leading underscore from the prop name.`},schema:[],type:`problem`}}),Tv=y(`no-unused-use-memo`,`react`,{create(e){let t=new Set,n=new Set,r=Wm(e.options[0]);return{CallExpression(r){!de(r,t,n)||!y_(r)||e.report({messageId:`unusedUseMemo`,node:r})},ImportDeclaration(e){b_(e,r,t,n)}}},meta:{docs:{description:`Disallow standalone useMemo calls that ignore the memoized value.`,recommended:!0},messages:{unusedUseMemo:`useMemo results must be used. Standalone useMemo calls add overhead without preserving a value.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`problem`}});function Ev(e){if(e.body===null)return;if(e.body.type!==`BlockStatement`)return e.body;if(e.body.body.length!==1)return;let[t]=e.body.body;if(t?.type===`ReturnStatement`)return t.argument??void 0}const Dv=y(`no-use-memo-simple-expression`,`react`,{create(e){return{CallExpression(t){if(!Qg(t,`useMemo`))return;let n=ua(t);if(n===void 0)return;let r=Ev(n);r===void 0||!Zg(r)||e.report({messageId:`simpleMemo`,node:t})}}},meta:{docs:{description:`Disallow useMemo for expressions that are already trivial to compute.`,recommended:!0},messages:{simpleMemo:`useMemo wrapping a trivially cheap expression - memo overhead exceeds the computation`},type:`problem`}}),Ov=[`useEffect`,`useLayoutEffect`,`useInsertionEffect`],kv=[`on`],Av=[`useRef`],jv=[`useState`,`useReducer`];function Mv(e){return e===void 0?{environment:`roblox-ts`,hooks:new Set(Ov),propertyCallbackPrefixes:new Set(kv),refHooks:new Set(Av),reportAdjustState:!0,reportDerivedState:!0,reportDuplicateDeps:!0,reportEffectChain:!0,reportEmptyEffect:!0,reportEventFlag:!0,reportEventSpecificLogic:!0,reportExternalStore:!0,reportInitializeState:!0,reportLogOnly:!0,reportMixedDerivedState:!0,reportNotifyParent:!0,reportPassRefToParent:!0,reportResetState:!0,stateHooks:new Set(jv)}:{environment:Bm(e.environment)?e.environment:`roblox-ts`,hooks:new Set(M(e.hooks)?e.hooks:Ov),propertyCallbackPrefixes:new Set(M(e.propertyCallbackPrefixes)?e.propertyCallbackPrefixes:kv),refHooks:new Set(M(e.refHooks)?e.refHooks:Av),reportAdjustState:e.reportAdjustState??!0,reportDerivedState:e.reportDerivedState??!0,reportDuplicateDeps:e.reportDuplicateDeps??!0,reportEffectChain:e.reportEffectChain??!0,reportEmptyEffect:e.reportEmptyEffect??!0,reportEventFlag:e.reportEventFlag??!0,reportEventSpecificLogic:e.reportEventSpecificLogic??!0,reportExternalStore:e.reportExternalStore??!0,reportInitializeState:e.reportInitializeState??!0,reportLogOnly:e.reportLogOnly??!0,reportMixedDerivedState:e.reportMixedDerivedState??!0,reportNotifyParent:e.reportNotifyParent??!0,reportPassRefToParent:e.reportPassRefToParent??!0,reportResetState:e.reportResetState??!0,stateHooks:new Set(M(e.stateHooks)?e.stateHooks:jv)}}function Nv(e){if(!(e.type!==`MemberExpression`||e.computed||e.property.type!==`Identifier`))return e.property.name}function Pv({callee:e},t,n,r){if(e.type===`Identifier`)return t.has(e.name);let i=le(e);return i!==void 0&&n.has(i.objectName)&&r.has(i.propertyName)}function Fv(e){if((e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)&&e.id!==null)return e.id.name;let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`)return t.id.name;if(`key`in t&&(!(`computed`in t)||!t.computed)&&x(t.key)&&t.key.type===`Identifier`)return t.key.name}function Iv(e){return Ti(e)&&e.startsWith(`use`)}function Lv(e){if(e.type===`ReturnStatement`)return e.argument===null;if(e.type!==`BlockStatement`||e.body.length!==1)return!1;let[t]=e.body;return t?.type===`ReturnStatement`&&t.argument===null}function Rv(e,t){if(`body`in e&&x(e.body)){if(e.body.type===`BlockStatement`)for(let n of e.body.body)t.push(n);else t.push(e.body)}}function zv(e,t){if(e.type===`BlockStatement`){for(let n of e.body)t.push(n);return}if(e.type===`IfStatement`){t.push(e.consequent),e.alternate!==null&&t.push(e.alternate);return}if(e.type===`DoWhileStatement`||e.type===`ForInStatement`||e.type===`ForOfStatement`||e.type===`ForStatement`||e.type===`LabeledStatement`||e.type===`WhileStatement`||e.type===`WithStatement`){Rv(e,t);return}if(e.type===`SwitchStatement`){for(let n of e.cases)for(let e of n.consequent)t.push(e);return}if(e.type===`TryStatement`){for(let n of e.block.body)t.push(n);if(e.handler!==null)for(let n of e.handler.body.body)t.push(n);if(e.finalizer!==null)for(let n of e.finalizer.body)t.push(n)}}function Bv(e){let t=[...e.body];for(;t.length>0;){let e=t.pop();if(e!==void 0)switch(e.type){case`ArrowFunctionExpression`:continue;case`FunctionDeclaration`:continue;case`FunctionExpression`:continue;case`ReturnStatement`:if(e.argument!==null)return!0;continue;case`BlockStatement`:case`DoWhileStatement`:case`ForInStatement`:case`ForOfStatement`:case`ForStatement`:case`IfStatement`:case`LabeledStatement`:case`SwitchStatement`:case`TryStatement`:case`WhileStatement`:case`WithStatement`:zv(e,t);continue;default:continue}}return!1}function Vv(e){if(e.length===0)return e;let[t]=e;return t?.type!==`IfStatement`||t.alternate!==null||!Lv(t.consequent)?e:e.slice(1)}function Hv(e){return e.type===`ChainExpression`?e.expression:e}function G(e){if(e.type!==`ExpressionStatement`)return;let t=Hv(e.expression);return t.type===`CallExpression`?t:void 0}function Uv(e,t){return e.callee.type===`Identifier`&&t.has(e.callee.name)}function Wv(e){return e.type===`Literal`&&e.value===!1}function Gv(e){return e.type===`Literal`||e.type===`UnaryExpression`&&e.operator===`void`&&e.argument.type===`Literal`&&e.argument.value===0}function Kv(e){return e.type===`ArrayExpression`&&e.elements.length===0}function qv(e){return e.type===`ObjectExpression`&&e.properties.length===0}function Jv(e){if(e.type===`Literal`){let{value:t}=e;return t===``||t===0||t===!1||t===null}return Gv(e)||Kv(e)||qv(e)}function Yv(e,t){let n=G(e);if(n?.callee.type!==`Identifier`)return;let r=t.get(n.callee.name);if(r===void 0||n.arguments.length!==1)return;let[i]=n.arguments;if(!(i===void 0||!Wv(i)))return r}function Xv(e,t){let n=G(e);if(!(n===void 0||Uv(n,t)))return n}function Zv(e,t){return e.type===`UnaryExpression`&&e.operator===`!`&&e.argument.type===`Identifier`&&e.argument.name===t}function Qv(e,t){return e.type===`Identifier`&&e.name===t}function K(e){return e.type===`BlockStatement`?e.body:[e]}function $v(e,t,n){let[r,i,a]=e;if(i===void 0||a===void 0||r?.type!==`IfStatement`||r.alternate!==null)return;let o=Yv(i,t),s=Yv(a,t),c=Lv(r.consequent);if(o!==void 0&&s===void 0)return!c||!Zv(r.test,o)||Xv(a,n)===void 0?void 0:o;if(s!==void 0&&o===void 0&&!(!c||!Zv(r.test,s)))return Xv(i,n)===void 0?void 0:s}function ey(e,t,n){if(e.type!==`IfStatement`||e.alternate!==null)return;let r=K(e.consequent),[i,a]=r;if(i===void 0||a===void 0||r.length!==2)return;let o=Yv(i,t),s=Yv(a,t);if(o!==void 0&&s===void 0)return Qv(e.test,o)?Xv(a,n)===void 0?void 0:o:void 0;if(s!==void 0&&o===void 0&&Qv(e.test,s))return Xv(i,n)===void 0?void 0:s}function ty(e,t,n){if(e.length===3)return $v(e,t,n);if(e.length===1){let[r]=e;return r===void 0?void 0:ey(r,t,n)}}const ny=new Set([`ArrayExpression`,`BinaryExpression`,`CallExpression`,`ChainExpression`,`ConditionalExpression`,`Identifier`,`LogicalExpression`,`MemberExpression`,`ObjectExpression`,`PrivateIdentifier`,`TemplateLiteral`,`UnaryExpression`]);function ry(e){return ny.has(e.type)}function iy(e,t){for(let n of e.elements)n!==null&&n.type!==`SpreadElement`&&t.push(n)}function ay(e,t){t.push(e.callee);for(let n of e.arguments)n.type!==`SpreadElement`&&t.push(n)}function oy(e,t){t.push(e.object),e.computed||t.push(e.property)}function sy(e,t){for(let n of e.properties)n.type===`Property`&&t.push(n.value)}function cy(e,t){switch(e.type){case`ArrayExpression`:iy(e,t);break;case`BinaryExpression`:case`LogicalExpression`:t.push(e.left,e.right);break;case`CallExpression`:ay(e,t);break;case`ChainExpression`:t.push(e.expression);break;case`ConditionalExpression`:t.push(e.test,e.consequent,e.alternate);break;case`MemberExpression`:oy(e,t);break;case`ObjectExpression`:sy(e,t);break;case`TemplateLiteral`:for(let n of e.expressions)t.push(n);break;case`UnaryExpression`:t.push(e.argument)}}function ly(e){let t=[e],n=new Set;for(;t.length>0;){let e=t.pop();if(!(e===void 0||n.has(e))){if(n.add(e),e.type===`Identifier`)return!0;cy(e,t)}}return!1}function uy(e,t){let n=0;for(let r of e){if(r.type===`IfStatement`){if(r.alternate!==null)return;let e=uy(K(r.consequent),t);if(e===void 0||e===0)return;n+=e;continue}let e=G(r);if(e===void 0||!t(e))return;n+=1}return n>0?n:void 0}function dy(e,t){return uy(e,e=>Uv(e,t)?e.arguments.some(e=>e.type!==`SpreadElement`&&ly(e)):!1)}function fy(e,t,n){return uy(e,e=>gy(e,t,n))}function py(e,t){for(let n of t)if(e.startsWith(n))return!0;return!1}function my(e){return e.type===`AssignmentPattern`?e.left:e}function hy(e,t,n,r){let i={functionId:n,isCustomHook:r,propertyCallbackIdentifiers:new Set,propertyObjectName:void 0},[a]=e.params;if(a===void 0)return i;let o=my(a);if(o.type===`Identifier`)return i.propertyObjectName=o.name,i;if(o.type!==`ObjectPattern`)return i;for(let e of o.properties){if(e.type!==`Property`)continue;let n=_a(e);if(n===void 0||!py(n,t))continue;let r=va(e);r!==void 0&&i.propertyCallbackIdentifiers.add(r.name)}return i}function gy({callee:e},t,n){if(e.type===`Identifier`)return t.propertyCallbackIdentifiers.has(e.name);let r=le(e);return r!==void 0&&t.propertyObjectName!==void 0&&r.objectName===t.propertyObjectName&&py(r.propertyName,n)}function _y(e,t){let[,n]=e.arguments;if(n?.type!==`ArrayExpression`)return!1;for(let e of n.elements)if(e?.type===`Identifier`&&e.name===t)return!0;return!1}function vy(e){let t=new Set,[,n]=e.arguments;if(n?.type!==`ArrayExpression`)return t;for(let e of n.elements)e?.type===`Identifier`&&t.add(e.name);return t}function yy(e){let[,t]=e.arguments;return t===void 0||t.type===`ArrayExpression`&&t.elements.length===0}function by(e,t){if(e.length===0)return!1;for(let n of e){if(n.type===`IfStatement`){if(n.alternate!==null||!by(K(n.consequent),t))return!1;continue}if(!t(n))return!1}return!0}function xy(e,t){let n=new Set;for(let r of e){if(r.type===`IfStatement`){let e=K(r.consequent);for(let r of xy(e,t))n.add(r);continue}let e=G(r);e!==void 0&&Uv(e,t)&&e.callee.type===`Identifier`&&n.add(e.callee.name)}return n}function Sy({callee:e},t){if(e.type===`Identifier`)return t.has(e.name);let n=le(e);return n!==void 0&&t.has(n.objectName)}function Cy(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(Cy(K(r.consequent),t,n))return!0;continue}let e=G(r);if(e!==void 0&&!Uv(e,t)&&!Sy(e,n))return!0}return!1}function wy(e,t,n){return by(e,e=>{let r=G(e);if(r===void 0||!Uv(r,t)||r.arguments.length!==1)return!1;let[i]=r.arguments;return i!==void 0&&n(i)})}function Ty(e){return e.type===`Literal`&&e.value!==null&&!t.isObject(e.value)||Kv(e)||qv(e)}function Ey(e,t){return wy(e,t,Jv)}function Dy(e,t){return wy(e,t,Ty)}function Oy(e){return by(e,e=>{let t=G(e);return t!==void 0&&le(t.callee)?.objectName===`console`})}const ky=new Set([`addEventListener`,`addListener`,`on`,`subscribe`]);function Ay(e){return e.some(e=>{let t=G(e);if(t===void 0)return!1;let n=Nv(t.callee);return n!==void 0&&ky.has(n)})}function jy(e,t){return e.type===`MemberExpression`&&!e.computed&&e.object.type===`Identifier`&&e.property.type===`Identifier`&&e.property.name===`current`&&t.has(e.object.name)}function My(e,t,n){return e.callee.type===`Identifier`&&n.has(e.callee.name)&&e.arguments.some(e=>jy(e,t))}function Ny(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(Ny(K(r.consequent),t,n))return!0;continue}let e=G(r);if(e!==void 0&&My(e,t,n))return!0}return!1}function Py(e){let t=new Set,n=new Set,r=ry(e)?[e]:[];for(;r.length>0;){let e=r.pop();if(!(e===void 0||n.has(e))){if(n.add(e),e.type===`Identifier`){t.add(e.name);continue}ry(e)&&cy(e,r)}}return t}function Fy(e){return e.alternate===null?[]:e.alternate.type===`BlockStatement`?e.alternate.body:[e.alternate]}function Iy(e,t,n){return[...Py(e.test)].some(e=>n.has(e)&&!t.has(e))}function Ly(e,t){return e.some(e=>{let n=G(e);return n!==void 0&&Uv(n,t)})}function Ry(e,t,n,r){for(let i of e)if(i.type===`IfStatement`&&(Iy(i,n,r)&&Ly(K(i.consequent),t)||Ry(Fy(i),t,n,r)))return!0;return!1}const zy=new Set([`alert`,`confirm`,`display`,`hide`,`log`,`navigate`,`notify`,`post`,`prompt`,`redirect`,`report`,`send`,`show`,`submit`,`track`]);function By(e){let t=e.toLowerCase();for(let e of zy)if(t.startsWith(e))return!0;return!1}function Vy(e,t){let n=G(e);return n===void 0||Uv(n,t)?!1:n.callee.type===`Identifier`?By(n.callee.name):n.callee.type!==`MemberExpression`||n.callee.computed||n.callee.property.type!==`Identifier`?!1:By(n.callee.property.name)}function Hy(e,t){return[...Py(e.test)].some(e=>t.has(e))}function Uy(e,t,n){for(let r of e)if(r.type===`IfStatement`&&(Hy(r,n)&&K(r.consequent).some(e=>Vy(e,t))||r.alternate!==null&&Uy(Fy(r),t,n)))return!0;return!1}function Wy(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Gy(e,t){return`${e}:${t}`}function Ky(e){if(e.body?.type===`BlockStatement`)return e.body}function qy(e){return e.body.type===`BlockStatement`}function Jy(e){return e.body!==null}const Yy=new Set(`addEventListener.addListener.alert.analytics.cancelAnimationFrame.clearInterval.clearTimeout.confirm.debug.delete.error.fetch.get.info.log.navigate.navigateTo.notify.observe.patch.post.prompt.put.redirect.removeEventListener.removeListener.report.requestAnimationFrame.send.setInterval.setTimeout.showNotification.submit.subscribe.track.unobserve.unsubscribe.warn`.split(`.`)),Xy=[`fetch`,`send`,`post`,`track`],Zy=new Set([`addEventListener`,`addListener`,`cancelAnimationFrame`,`catch`,`clearInterval`,`clearTimeout`,`finally`,`observe`,`removeEventListener`,`removeListener`,`requestAnimationFrame`,`setInterval`,`setTimeout`,`subscribe`,`then`,`unobserve`,`unsubscribe`]),Qy=[`log`,`fetch`,`send`,`track`,`report`,`show`,`navigate`,`submit`,`post`,`notify`];function $y(e){for(let t of Qy)if(e.startsWith(t))return!0;return!1}function eb(e){return e.object.type===`Identifier`&&e.object.name===`console`&&e.property.type===`Identifier`&&(e.property.name===`log`||e.property.name===`warn`||e.property.name===`error`||e.property.name===`info`||e.property.name===`debug`)}function tb(e){for(let t of Xy)if(e.startsWith(t))return!0;return Zy.has(e)}function nb(e,t,n){let{callee:r}=e;return Uv(e,t)?!1:r.type===`Identifier`?n.has(r.name)?!1:Yy.has(r.name)||$y(r.name):r.type!==`MemberExpression`||r.computed||r.property.type!==`Identifier`||r.object.type===`Identifier`&&n.has(r.object.name)?!1:eb(r)||tb(r.property.name)}function rb(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(rb(K(r.consequent),t,n))return!0;continue}let e=G(r);if(e!==void 0&&nb(e,t,n))return!0}return!1}const ib=y(`no-useless-use-effect`,`react`,{create(e){let t=Mv(e.options[0]),n=Um(t.environment),r=new Set,i=new Set,a=new Set,o=new Set,s=new Set,c=new Map,l=new Set,u=new Set,d=[],f=1,p=new Map,m=[];function h(e){return Pv(e,i,r,t.hooks)}function g(e){return Pv(e,a,r,t.stateHooks)}function _(e){return Pv(e,l,r,t.refHooks)}function ee(e){if(e.init?.type!==`CallExpression`||!g(e.init)||e.id.type!==`ArrayPattern`)return;let{elements:t}=e.id;if(t.length<2)return;let[,n]=t;if(n==null||n.type!==`Identifier`)return;o.add(n.name);let[r]=t;r?.type===`Identifier`&&(s.add(r.name),c.set(n.name,r.name))}function te(e){e.init?.type!==`CallExpression`||!_(e.init)||e.id.type!==`Identifier`||u.add(e.id.name)}function v(e){e.id.type===`Identifier`&&e.init!==null&&(e.init.type===`FunctionExpression`||e.init.type===`ArrowFunctionExpression`)&&p.set(e.id.name,e.init)}function ne(e){let n=f;f+=1;let r=Fv(e);d.push(hy(e,t.propertyCallbackPrefixes,n,Iv(r))),e.type===`FunctionDeclaration`&&e.id!==null&&p.set(e.id.name,e)}function re(){d.pop()}function y(e){return!t.reportMixedDerivedState||e.setterCalls.size===0||!e.hasNonSetter||e.hasReturnCleanup?!1:!rb(e.statements,o,e.functionContext?.propertyCallbackIdentifiers??new Set)}function ie(e){let{coreStatements:n,dependencyIdentifiers:r,functionContext:i,hasNonSetter:a,hasReturnCleanup:l,node:d,statements:f}=e,p=t.reportEventFlag?ty(f,c,o):void 0,m=[...r].some(e=>!s.has(e)&&!o.has(e));return[[t.reportEmptyEffect&&(f.length===0||f[0]!==void 0&&Lv(f[0])),`emptyEffect`],[t.reportInitializeState&&yy(d)&&Dy(f,o),`initializeState`],[t.reportResetState&&Ey(f,o)&&m,`resetState`],[p!==void 0&&_y(d,p),`eventFlag`],[t.reportEventSpecificLogic&&Uy(f,o,s),`eventSpecificLogic`],[t.reportAdjustState&&Ry(f,o,s,r)&&!a,`adjustState`],[t.reportDerivedState&&dy(n,o)!==void 0,`derivedState`],[y(e),`mixedDerivedState`],[t.reportPassRefToParent&&i!==void 0&&Ny(f,u,i.propertyCallbackIdentifiers),`passRefToParent`],[t.reportNotifyParent&&i!==void 0&&!i.isCustomHook&&fy(n,i,t.propertyCallbackPrefixes)!==void 0,`notifyParent`],[t.reportExternalStore&&Ay(f)&&l,`externalStore`],[t.reportLogOnly&&Oy(f),`logOnly`]].find(([e])=>e)?.[1]}function b(t,n,r){let i=d.at(-1),a=Vv(n),s=vy(t),c=xy(n,o),l=Cy(n,o,i?.propertyCallbackIdentifiers??new Set),u=r!==void 0&&Bv(r);m.push({depIdentifiers:s,hasNonSetterSideEffect:l,hasReturnWithCleanup:u,node:t,ownerFunctionId:i?.functionId??0,setterCalls:c,statements:n});let f=ie({coreStatements:a,dependencyIdentifiers:s,functionContext:i,hasNonSetter:l,hasReturnCleanup:u,node:t,setterCalls:c,statements:n});f!==void 0&&e.report({messageId:f,node:t})}function x(){if(!t.reportEffectChain)return;let n=ae();for(let t of m)if(!(t.hasNonSetterSideEffect||t.hasReturnWithCleanup))for(let r of t.depIdentifiers){let i=Gy(t.ownerFunctionId,r),a=n.get(i);if(a!==void 0&&S(a)){e.report({messageId:`effectChain`,node:t.node});return}}}function ae(){let e=new Map;for(let[t,n]of m.entries())for(let r of n.setterCalls){let i=c.get(r);if(i===void 0)continue;let a=Gy(n.ownerFunctionId,i),o=e.get(a);o===void 0&&(o=new Set,e.set(a,o)),o.add(t)}return e}function S(e){return e.size!==0&&[...e].every(e=>{let t=m[e];return t!==void 0&&!t.hasNonSetterSideEffect&&!t.hasReturnWithCleanup})}function C(){if(!t.reportDuplicateDeps||m.length<2)return;let e=new Set;for(let t=0;t<m.length;t+=1){if(e.has(t))continue;let n=oe(t,e);n.length<2||se(n,e)}}function oe(e,t){let n=m[e];if(n===void 0||n.depIdentifiers.size===0)return[];let r=[e];for(let i=e+1;i<m.length;i+=1){let e=m[i];t.has(i)||e!==void 0&&e.ownerFunctionId===n.ownerFunctionId&&Wy(n.depIdentifiers,e.depIdentifiers)&&r.push(i)}return r}function se(t,n){for(let r of t){n.add(r);let t=m[r];t!==void 0&&e.report({messageId:`duplicateDeps`,node:t.node})}}function ce(e,t){let n=p.get(t);if(n===void 0||n.async)return;let r=Ky(n);r!==void 0&&b(e,r.body.filter(e=>e.type!==`EmptyStatement`),r)}function le(e,t){if(!t.async){if(t.type===`ArrowFunctionExpression`){if(!qy(t))return;b(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body);return}Jy(t)&&b(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body)}}return{ArrowFunctionExpression:ne,"ArrowFunctionExpression:exit":re,CallExpression(e){if(!h(e))return;let[t]=e.arguments;if(t!==void 0){if(t.type===`Identifier`){ce(e,t.name);return}Re(t)&&le(e,t)}},FunctionDeclaration:ne,"FunctionDeclaration:exit":re,FunctionExpression:ne,"FunctionExpression:exit":re,ImportDeclaration(e){Km(e,n,r,(e,n)=>{t.hooks.has(e)&&i.add(n),t.stateHooks.has(e)&&a.add(n),t.refHooks.has(e)&&l.add(n)})},"Program:exit"(){x(),C()},VariableDeclarator(e){ee(e),te(e),v(e)}}},meta:{docs:{description:`Disallow empty effects, duplicate dependencies, effect chains, log-only effects, derived state, external-store state sync, state initialization, reset effects, parent notifications, parent ref callbacks, and event side effects routed through state.`},messages:{adjustState:`This effect adjusts state when a prop changes. Adjust the state directly during rendering or restructure to avoid this need.`,derivedState:`This effect only derives state from properties or state. Compute the value during rendering instead of useEffect.`,duplicateDeps:`Multiple effects have identical dependency arrays. Combine them into a single effect for better performance.`,effectChain:`This effect is part of a chain of effects that only derive state from other effects. Consolidate the logic into event handlers or compute during rendering.`,emptyEffect:`This effect has an empty body and should be removed.`,eventFlag:`This effect only reacts to a state flag. Call the side effect directly in the event handler instead of toggling state.`,eventSpecificLogic:`This effect runs event-specific logic based on state. Move this logic to the event handler that triggers the state change.`,externalStore:"This effect subscribes to an external store and syncs to state. Use `useSyncExternalStore` instead.",initializeState:`This effect initializes state with a constant value. Pass the value as the useState initializer instead.`,logOnly:`This effect only contains console.log calls. Remove it (debug leftover) or move the logging to an event handler.`,mixedDerivedState:`This effect contains state setter calls that derive values from props or state mixed with other operations. Extract the setter calls and compute values during rendering.`,notifyParent:`This effect only notifies a parent via a property callback. Call the callback in the event handler instead of useEffect.`,passRefToParent:"This effect passes a ref to a parent callback. Use `forwardRef` or `useImperativeHandle` instead.",resetState:"This effect resets state when a prop changes. Pass a `key` prop to the component instead to reset all state automatically."},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:[...Ov],description:`Effect hook names checked for avoidable effect patterns.`,items:{type:`string`},type:`array`},propertyCallbackPrefixes:{default:[...kv],description:`Property name prefixes treated as event callback props.`,items:{type:`string`},type:`array`},refHooks:{default:[...Av],description:`Ref hook names that return mutable ref objects.`,items:{type:`string`},type:`array`},reportAdjustState:{default:!0,description:`Report effects that only adjust state after render.`,type:`boolean`},reportDerivedState:{default:!0,description:`Report effects that copy derived values into state.`,type:`boolean`},reportDuplicateDeps:{default:!0,description:`Report duplicate entries in effect dependency arrays.`,type:`boolean`},reportEffectChain:{default:!0,description:`Report effects that only trigger another effect through state.`,type:`boolean`},reportEmptyEffect:{default:!0,description:`Report effects whose callback body is empty.`,type:`boolean`},reportEventFlag:{default:!0,description:`Report effects that react to event flags stored in state.`,type:`boolean`},reportEventSpecificLogic:{default:!0,description:`Report effects that move event-specific logic out of the event callback.`,type:`boolean`},reportExternalStore:{default:!0,description:`Report effects that mirror external store values into local state.`,type:`boolean`},reportInitializeState:{default:!0,description:`Report effects that only initialize state after mount.`,type:`boolean`},reportLogOnly:{default:!0,description:`Report effects that only log values.`,type:`boolean`},reportMixedDerivedState:{default:!0,description:`Report effects that mix derived-state updates with other work.`,type:`boolean`},reportNotifyParent:{default:!0,description:`Report effects that only notify a parent through a callback prop.`,type:`boolean`},reportPassRefToParent:{default:!0,description:`Report effects that only pass a ref value to a parent callback.`,type:`boolean`},reportResetState:{default:!0,description:`Report effects that reset local state when inputs change.`,type:`boolean`},stateHooks:{default:[...jv],description:`State hook names that return [value, setter] pairs.`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}});function ab(e){return!t.isObject(e)||!t.isString(e.dependencyMode)?`non-updating`:e.dependencyMode===`empty-or-omitted`||e.dependencyMode===`aggressive`?e.dependencyMode:`non-updating`}function ob(e){let n=t.isObject(e)&&M(e.staticGlobalFactories)?e.staticGlobalFactories:Tl;return{dependencyMode:ab(e),environment:H(e),staticGlobalFactories:new Set(n)}}function sb(e){return{staticGlobalFactories:e.staticGlobalFactories}}function cb(e){let t=ua(e);if(t===void 0)return;let{body:n}=t;if(n===null)return;if(n.type!==`BlockStatement`)return n;if(n.body.length!==1)return;let[r]=n.body;return r?.type===`ReturnStatement`?r.argument??void 0:void 0}function lb(e,t){switch(t.dependencyMode){case`aggressive`:return!0;case`empty-or-omitted`:return e===0||e===1;case`non-updating`:return e===0||e===1||e===2;default:{let e=Error(`Unknown dependency mode: ${String(t.dependencyMode)}`);throw Error.captureStackTrace(e,lb),e}}}const ub=y(`no-useless-use-memo`,`react`,{create(e){let t=ob(e.options[0]),n=sb(t),r=Um(t.environment),i=new Set,a=new Set;return{CallExpression(r){if(!de(r,i,a)||y_(r)||r.arguments.length===0)return;let o=cb(r);if(o===void 0)return;let s=new Set;B(e.sourceCode,o,s,n)&&lb(ba(e.sourceCode,r.arguments[1],s,n,Vl),t)&&e.report({messageId:`uselessUseMemo`,node:r})},ImportDeclaration(e){b_(e,r,i,a)}}},meta:{docs:{description:`Disallow useMemo calls that only wrap values static enough to live at module scope.`},messages:{uselessUseMemo:`useMemo is wrapping a static value. Move the value to module scope instead of paying hook overhead for no runtime benefit.`},schema:[{additionalProperties:!1,properties:{dependencyMode:{default:`non-updating`,description:`Dependency-array mode used to decide whether a memoized value is static.`,enum:[`empty-or-omitted`,`aggressive`,`non-updating`],type:`string`},environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},staticGlobalFactories:{default:Tl,description:`Global constructors and factories whose calls are treated as static values.`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}}),db=[`useSpring`];function fb(e){let t=!1,n=!1;for(let r of e.properties)if(!(r.type!==`Property`||r.computed||r.key.type!==`Identifier`)&&(r.key.name===`from`&&(t=!0),r.key.name===`to`&&(n=!0),t&&n))return!0;return!1}function pb(e,t,n){let r=m(t);if(r.type===`ObjectExpression`)return n(r);if(r.type!==`Identifier`)return!1;let i=_(e.getScope(r),r.name);if(i===void 0||!R(i.scope)||z(i))return!1;for(let e of i.defs){let t=Al(e);if(t===void 0)continue;let r=m(t);if(r.type===`ObjectExpression`&&n(r))return!0}return!1}function mb(e,t){return pb(e,t,fb)}function hb(e,t,n,r){let i={staticGlobalFactories:r.staticGlobalFactories};return pb(e,t,t=>Bl(e,t,n,i))}function gb(e,t){return e===0||e===2||e===1&&t.treatEmptyDepsAsViolation}function _b({callee:e},t){if(e.type===`Identifier`)return t.springHooks.has(e.name);if(e.type===`MemberExpression`&&!e.computed){let{property:n}=e;if(n.type===`Identifier`)return t.springHooks.has(n.name)}return!1}const vb=y(`no-useless-use-spring`,`react`,{create(e){let[t]=e.options,n={springHooks:new Set(t?.springHooks??db),staticGlobalFactories:new Set(t?.staticGlobalFactories??Tl),treatEmptyDepsAsViolation:t?.treatEmptyDepsAsViolation??!0};return{CallExpression(t){if(!_b(t,n)||t.arguments.length===0)return;let[r]=t.arguments;if(r===void 0||r.type===`SpreadElement`)return;let i=new Set;if(!hb(e.sourceCode,r,i,n)||mb(e.sourceCode,r))return;let a=t.arguments.length>1?t.arguments[1]:void 0;gb(ba(e.sourceCode,a,i,n,Vl),n)&&e.report({messageId:`uselessSpring`,node:t})}}},meta:{docs:{description:`Disallow useSpring hooks whose config and dependencies are entirely static`},messages:{uselessSpring:`useSpring call has only static inputs and non-updating dependencies; replace it with a constant or remove the hook.`},schema:[{additionalProperties:!1,default:{springHooks:[...db],staticGlobalFactories:[...Tl],treatEmptyDepsAsViolation:!0},properties:{springHooks:{default:[...db],description:`Hook identifiers that should be treated as spring hooks`,items:{type:`string`},type:`array`},staticGlobalFactories:{default:[...Tl],description:`Global factory identifiers that are treated as static constructors`,items:{type:`string`},type:`array`},treatEmptyDepsAsViolation:{default:!0,description:`Treat static config with an empty dependency array as a violation`,type:`boolean`}},type:`object`}],type:`suggestion`}});function yb(e){if(!R(e.scope))return!1;for(let t of e.defs){if(t.type!==`Variable`)continue;let e=t.node;if(e.type!==`VariableDeclarator`)continue;let n=e.parent;if(n.type===`VariableDeclaration`&&n.kind===`const`)return!0}return!1}function bb(e,t){let n=_(e.getScope(t),t.name);return n===void 0?!1:z(n)||yb(n)}function xb(e,t){let n=_(e.getScope(t),t.name);return n===void 0?!1:z(n)||R(n.scope)}function Sb(e,t){let n=t;for(;n.type===`MemberExpression`;){if(n.computed)return!1;n=m(n.object)}return n.type===`Identifier`&&xb(e,n)}function Cb(e,t){let n=m(t);switch(n.type){case`Identifier`:return bb(e,n);case`Literal`:return!0;case`MemberExpression`:return Sb(e,n);case`TemplateLiteral`:return n.expressions.length===0;case`UnaryExpression`:return n.operator===`-`&&m(n.argument).type===`Literal`;default:return!1}}function wb(e,t){for(let n of t.properties)if(n.type!==`Property`||n.kind!==`init`||n.computed||!Cb(e,n.value))return!1;return!0}function Tb(e,t){if(t.id.type!==`ArrayPattern`||t.init?.type!==`CallExpression`||N(t.init)!==`useReducer`)return;let n=t.id.elements[1];if(n!=null&&n.type===`Identifier`)return _(e.getScope(n),n.name)}function Eb(e){let t=e;for(;t!==void 0;){if(t.type===`Program`)return t;t=t.parent}}function Db(e,t,n,r,i){let a=`const ${r} = ${t.getText(n)};`,{body:o}=i,s;for(let e of o){if(e.type===`ImportDeclaration`){s=e;continue}break}if(s!==void 0)return e.insertTextAfter(s,`\n\n${a}`);let[c]=o;return c===void 0?e.insertTextAfterRange([i.range[0],i.range[1]],a):e.insertTextBefore(c,`${a}\n\n`)}const Ob=y(`prefer-constant-dispatch`,`react`,{create(e){let t=new Set,{sourceCode:n}=e,r=0;return{CallExpression(i){if(i.callee.type!==`Identifier`)return;let a=_(n.getScope(i.callee),i.callee.name);if(a===void 0||!t.has(a))return;let[o]=i.arguments;if(o===void 0||o.type===`SpreadElement`)return;let s=m(o);if(s.type!==`ObjectExpression`||!wb(n,s))return;let c=Eb(s);if(c===void 0)return;let l=`PREFER_CONSTANT_ACTION_${r}`;r+=1,e.report({messageId:`preferConstantDispatch`,node:s,suggest:[{desc:`Extract to module constant \`${l}\``,fix(e){return[Db(e,n,s,l,c),e.replaceText(s,l)]}}]})},VariableDeclarator(e){let r=Tb(n,e);r!==void 0&&t.add(r)}}},meta:{docs:{description:`Disallow inline useReducer action objects that could be module-level constants.`,recommended:!0},hasSuggestions:!0,messages:{preferConstantDispatch:`Move this inline useReducer action object to a module-level constant.`},schema:[],type:`suggestion`}}),kb=new p({extensions:[`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.cjs`,`.json`,`.node`]}),Ab={found:!1};function jb(e,t){if(!e.startsWith(`.`))return Ab;let{path:n}=kb.sync(i.dirname(t),e);return n===void 0||n===``?Ab:{found:!0,path:n}}const Mb=new Set([`.js`,`.jsx`,`.ts`,`.tsx`]),Nb=new Set([`.git`,`.next`,`.turbo`,`__fixtures__`,`__mocks__`,`__tests__`,`coverage`,`dist`,`documentation`,`example`,`examples`,`fixture`,`fixtures`,`node_modules`,`opensrc`,`stories`,`story`,`test`,`tests`]),Pb=/\bexport\s+default\b/u,Fb=/\/index$/u,Ib=/\.(?:[cm]?jsx?|tsx?)$/u,Lb=new Map,Rb=new Map,zb=new Map,Bb=/[.*+?^${}()|[\]\\]/gu,Vb=String.raw`\$&`;function Hb(e){return e.replaceAll(Bb,Vb)}const Ub=new Map;function Wb(e){return e.includes(`u`)||e.includes(`v`)?e:`${e}u`}function Gb(e,t){let n=`${t}:${e}`,r=Ub.get(n);if(r!==void 0)return r;let i=new RegExp(e,Wb(t));if(Ub.size>=64){let e=Ub.keys().next().value;e!==void 0&&Ub.delete(e)}return Ub.set(n,i),i}function Kb(e){return e.replaceAll(`\\`,`/`)}function qb(e){let t=Rb.get(e);if(t!==void 0)return t;let n=d(e,`utf8`);return Rb.set(e,n),n}function Jb(e,t){let n=Hb(t);return Gb(`\\bexport\\s+(?:const|function|class)\\s+${n}\\b`,`u`).test(e)||Gb(`\\bexport\\s*\\{[^}]*\\b${n}\\b[^}]*\\}`,`u`).test(e)?`named`:Pb.test(e)&&Gb(`\\b${n}\\b`,`u`).test(e)?`default`:void 0}function Yb(e,t){for(let n of t)if(!Gb(`\\b${Hb(n)}\\b`,`u`).test(e))return!1;return!0}function Xb(e){let t=zb.get(e);if(t!==void 0)return t;let n=e;for(;;){if(u(i.join(n,`package.json`))||u(i.join(n,`tsconfig.json`)))return zb.set(e,n),n;let t=i.dirname(n);if(t===n){zb.set(e,void 0);return}n=t}}function Zb(e){let t=Lb.get(e);if(t!==void 0)return t;let n=new Map;function r(e){let t=f(e,{withFileTypes:!0});for(let a of t){let t=a.name.toLowerCase();if(a.name.startsWith(`.`)&&a.name!==`.storybook`||Nb.has(t))continue;let o=i.join(e,a.name);if(a.isDirectory()){r(o);continue}let s=i.extname(a.name);if(!Mb.has(s)||a.name.endsWith(`.d.ts`))continue;let c=i.basename(a.name,s).toLowerCase(),l=n.get(c);l===void 0?n.set(c,[o]):l.push(o)}}r(e);let a=new Map;for(let[e,t]of n)a.set(e,t);return Lb.set(e,a),a}function Qb(e,t){let n=Kb(i.relative(i.dirname(e),t));return n=n.replace(Ib,``),n=n.replace(Fb,``),n.startsWith(`.`)||(n=`./${n}`),n}function $b(e){let t=Xb(i.dirname(e)),n=Kb(t===void 0?e:i.relative(t,e));for(let e of n.split(`/`))if(Nb.has(e.toLowerCase()))return!0;return!1}function ex(e,t){if($b(e))return{importStyle:void 0,matches:!1};let n=i.extname(e);if(!Mb.has(n)||e.endsWith(`.d.ts`))return{importStyle:void 0,matches:!1};let r=i.basename(e,n).toLowerCase();if(!t.fileNames.map(e=>e.toLowerCase()).includes(r))return{importStyle:void 0,matches:!1};let a=qb(e);if(!Gb(`\\b${Hb(t.componentName)}\\b`,`u`).test(a)||t.markers!==void 0&&!Yb(a,t.markers))return{importStyle:void 0,matches:!1};let o=Jb(a,t.componentName);return o===void 0?{importStyle:void 0,matches:!1}:{importStyle:o,matches:!0}}function tx(e,n,r){let i=e.source.value;if(!t.isString(i)||!i.startsWith(`.`)||n.length===0)return{importStyle:void 0,matches:!1};let a=jb(i,n);return a.found?ex(a.path,r):{importStyle:void 0,matches:!1}}function nx(e,t,n,r){if(t.matches)for(let t of e.specifiers){if(t.type===`ImportDefaultSpecifier`){r.add(t.local.name);continue}if(t.type!==`ImportSpecifier`)continue;let{imported:e}=t;(e.type===`Identifier`?e.name:e.value)===n&&r.add(t.local.name)}}function rx(e,t){let n=Xb(i.dirname(e));if(n===void 0)return{found:!1};let r=Zb(n),a=new Set;for(let e of t.fileNames){let t=r.get(e.toLowerCase())??[];for(let e of t)a.add(e)}let o=[...a].filter(e=>ex(e,t).matches);if(o.length!==1)return{found:!1};let[s]=o;if(s===void 0)return{found:!1};let c=ex(s,t);return{found:!0,importSource:Qb(e,s),importStyle:c.importStyle,path:s}}const ix={componentName:`ContextStack`,fileNames:[`context-stack`],markers:[`providers`]},ax=new Set([`.jsx`,`.tsx`]);function ox(e){return e.openingElement.name.type===`JSXMemberExpression`&&e.openingElement.name.property.name===`Provider`}function sx(e){return e.children.filter(e=>e.type===`JSXText`?e.value.trim().length>0:e.type!==`JSXExpressionContainer`||e.expression.type!==`JSXEmptyExpression`)}function cx(e){let{parent:t}=e;if(t.type!==`JSXElement`||!ox(t))return!1;let n=sx(t);return n.length===1&&n[0]===e}function lx(e){if(!ox(e))return;let t=[e],n=e;for(;;){let e=sx(n);if(e.length!==1)break;let[r]=e;if(r?.type!==`JSXElement`||!ox(r))break;t.push(r),n=r}return t.length>1?t:void 0}function ux(e,t){let n=!1;for(let r of e.children){if(r===t){n=!0;continue}if(r.type!==`JSXText`||r.value.trim()!==``)return!1}return n}function dx(e){let t=0;for(let n of e){let r=e[t+1];if(r===void 0){t+=1;continue}if(!ux(n,r))return!1;t+=1}return!0}function fx(e,t){let n=t.getText(e.openingElement);return e.openingElement.selfClosing?n:n.endsWith(`>`)?`${n.slice(0,-1)} />`:void 0}function px(e,t,n){let r=[];for(let e of t){let t=fx(e,n);if(t===void 0)return;r.push(t)}let i=t.at(-1);if(i===void 0||i.closingElement===null)return;let a=n.text.slice(i.openingElement.range[1],i.closingElement.range[0]);return`<${e} providers={[${r.join(`, `)}]}>${a}</${e}>`}const mx=y(`prefer-context-stack`,`react`,{create(e){let{filename:t,sourceCode:n}=e,r=t===``?{found:!1}:rx(t,ix),a=t!==``&&ex(t,ix).matches,o=new Set;return{ImportDeclaration(e){nx(e,tx(e,t,ix),ix.componentName,o)},JSXElement(s){if(a||cx(s))return;let c=lx(s);if(c===void 0||o.size===0&&!r.found)return;let l=ax.has(i.extname(t))&&o.size===1&&dx(c),[u]=o,d=l&&u!==void 0?px(u,c,n):void 0;if(d!==void 0){e.report({fix:e=>e.replaceText(s,d),messageId:`preferContextStack`,node:s});return}e.report({messageId:`preferContextStack`,node:s})}}},meta:{docs:{description:`Prefer a local ContextStack component over directly nesting multiple context providers.`},fixable:`code`,messages:{preferContextStack:"Use the local `ContextStack` component instead of nesting multiple context providers directly."},schema:[],type:`suggestion`}}),hx=/^use[A-Z]/v;function gx(e,t){if(e===void 0)return!1;for(let n of e.defs)if(Jm(n,t)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0;return!1}function _x(e){return t.isObject(e)?{allowedHooks:new Set(M(e.allowedHooks)?e.allowedHooks:[])}:{allowedHooks:new Set}}const vx=y(`prefer-direct-hook-imports`,`react`,{create(e){let t=Wm(e.options[0]),{allowedHooks:n}=_x(e.options[0]),{sourceCode:r}=e;return{CallExpression(i){let{callee:a}=i;if(a.type!==`MemberExpression`||a.computed||a.object.type!==`Identifier`||a.property.type!==`Identifier`)return;let o=a.property.name;hx.test(o)&&(n.has(o)||gx(_(r.getScope(a.object),a.object.name),t)&&e.report({data:{hookName:o},messageId:`preferDirectHookImport`,node:i}))}}},meta:{docs:{description:`Prefer importing React hooks directly instead of calling them via the React namespace.`,recommended:!0},messages:{preferDirectHookImport:"Import `{{hookName}}` directly instead of calling `React.{{hookName}}`."},schema:[{additionalProperties:!1,properties:{allowedHooks:{description:`Hook names that are allowed to be called via React namespace.`,items:{type:`string`},type:`array`},environment:zm},type:`object`}],type:`suggestion`}});function yx(e){if(!t.isObject(e)||!(`additionalHoistableComponents`in e))return new Set;let{additionalHoistableComponents:n}=e;return M(n)?new Set(n):new Set}function bx(e){if(!t.isObject(e)||!(`additionalStaticFactories`in e))return new Set;let{additionalStaticFactories:n}=e;return M(n)?new Set(n):new Set}function xx(e){let t=e;for(;t.type===`JSXMemberExpression`;)t=t.object;return t.type===`JSXIdentifier`?t.name:void 0}function Sx(e,t,n){let r=_(e.sourceCode.getScope(t),n);if(r===void 0||!R(r.scope))return!1;if(z(r))return!0;for(let e of r.defs)if(e.type===`FunctionName`||e.type===`ClassName`||Al(e)!==void 0)return!0;return!1}function Cx(e,t,n){let r=_(e.sourceCode.getScope(t),n);return r!==void 0&&z(r)}function wx(e,t,n,r){let{name:i}=t.openingElement;if(i.type===`JSXIdentifier`){let e=i.name.charAt(0);if(e!==``&&e===e.toLowerCase())return!0}let a=xx(i);if(a===void 0)return!1;let o=_(e.sourceCode.getScope(t),a),s=i.type===`JSXMemberExpression`;return n.has(a)?o===void 0?!s:s?Cx(e,t,a):Sx(e,t,a):r===`standard`?s?Cx(e,t,a):Sx(e,t,a):!1}function Tx(e,t,n,r,i){if(i===`roblox-ts`&&t.name.type===`JSXIdentifier`&&(t.name.name===`Event`||t.name.name===`Change`))return!1;let{value:a}=t;return a===null||a.type===`Literal`?!0:a.type!==`JSXExpressionContainer`||a.expression.type===`JSXEmptyExpression`?!1:Nl(e.sourceCode,a.expression,new Set)?i===`standard`:B(e.sourceCode,a.expression,n,r)}function Ex(e,t,n,r,i){for(let a of t.attributes)if(a.type===`JSXSpreadAttribute`||!Tx(e,a,new Set(n),r,i))return!1;return!0}function Dx(e,t,n,r,i,a){if(t.type===`JSXText`)return a===`standard`||t.value.trim().length===0;if(t.type===`JSXElement`||t.type===`JSXFragment`)return kx(e,t,new Set(n),r,i,a);if(t.type!==`JSXExpressionContainer`)return!1;if(t.expression.type===`JSXEmptyExpression`)return!0;if(t.expression.type===`JSXElement`||t.expression.type===`JSXFragment`)return kx(e,t.expression,new Set(n),r,i,a);if(t.expression.type===`Identifier`){let o=jl(e.sourceCode,t.expression);if(o!==void 0){let t=m(o);if(t.type===`JSXElement`||t.type===`JSXFragment`)return kx(e,t,new Set(n),r,i,a)}}return B(e.sourceCode,t.expression,new Set(n),i)}function Ox(e,t,n,r,i,a){for(let o of t.children)if(!Dx(e,o,new Set(n),r,i,a))return!1;return!0}function kx(e,t,n,r,i,a){return!n.has(t)&&(n.add(t),(t.type===`JSXFragment`||wx(e,t,r,a)&&Ex(e,t.openingElement,n,i,a))&&Ox(e,t,n,r,i,a))}function Ax(e,t,n,r,i){let{parent:a}=t;for(;a.type!==`Program`;){if((a.type===`JSXElement`||a.type===`JSXFragment`)&&kx(e,a,new Set,n,r,i))return!0;({parent:a}=a)}return!1}function jx(e,t){switch(e.type){case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return e.expression===t;default:return!1}}function Mx(e,t){return e.type===`JSXElement`||e.type===`JSXFragment`||e.type===`JSXExpressionContainer`&&e.expression===t}function Nx(e,t){if(jx(e,t)||Mx(e,t))return!0;switch(e.type){case`ArrayExpression`:case`ObjectExpression`:return!0;case`Property`:return e.value===t;default:return!1}}function Px(e,t){let n=t,{parent:r}=n;for(;Nx(r,n);){n=r;let{parent:e}=n;if(e===null)return!1;r=e}if(r.type!==`VariableDeclarator`||r.id.type!==`Identifier`||r.init!==n||r.parent.type!==`VariableDeclaration`||r.parent.kind!==`const`)return!1;let i=_(e.sourceCode.getScope(n),r.id.name);return i!==void 0&&R(i.scope)}function Fx(e,t){let n=e.sourceCode.getText(t);e.report({data:{elementText:n},messageId:`hoistableJsxElement`,node:t})}const Ix=y(`prefer-hoisted-jsx-elements`,`react`,{create(e){let[t]=e.options,n=yx(t),r=bx(t),i=H(t),a={staticCallsRequireFactories:!0,staticGlobalFactories:new Set([...i===`roblox-ts`?Tl:[],...r])};function o(t){kx(e,t,new Set,n,a,i)&&(Px(e,t)||Ax(e,t,n,a,i)||Fx(e,t))}return{JSXElement:o,JSXFragment:o}},meta:{docs:{description:`Prefer extracting static JSX elements to module-level constants.`},messages:{hoistableJsxElement:"Extract `{{elementText}}` to a shared module-level const — this JSX element is fully static and identical elements should reuse the same const."},schema:[{additionalProperties:!1,properties:{additionalHoistableComponents:{description:`Additional component names that can be hoisted to module-level constants.`,items:{type:`string`},type:`array`},additionalStaticFactories:{description:`Additional factory functions whose return values are considered static.`,items:{type:`string`},type:`array`},environment:zm},type:`object`}],type:`suggestion`}}),Lx={staticGlobalFactories:new Set(Tl)};function Rx({value:e}){if(e?.type===`JSXExpressionContainer`&&e.expression.type!==`JSXEmptyExpression`)return e.expression}function zx(e){if(e.type===`JSXElement`||e.type===`JSXFragment`||e.type===`JSXExpressionContainer`||e.type===`ParenthesizedExpression`||e.type===`ArrayExpression`)return e}function Bx(e,t,n,r){if(n.id.type!==`Identifier`||n.init!==r)return!1;let i=_(e.sourceCode.getScope(t),n.id.name);return i!==void 0&&R(i.scope)}function Vx(e,t){let n=t;for(;;){let{parent:r}=n;if(r===null)return!1;if(r.type===`VariableDeclarator`)return Bx(e,t,r,n);let i=zx(r);if(i===void 0)return!1;n=i}}function Hx(e,t){let n=e.sourceCode.getText(t);e.report({data:{objectText:n},messageId:`hoistableObjectProp`,node:t})}function Ux(e,t){if(t.properties.some(e=>e.type===`Property`&&e.computed))return;let n=new Set;if(B(e.sourceCode,t,n,Lx)){Hx(e,t);return}for(let n of t.properties){if(n.type!==`Property`)continue;let t=m(n.value);t.type===`ObjectExpression`&&Ux(e,t)}}const Wx=y(`prefer-hoisted-jsx-object-properties`,`react`,{create(e){return{JSXAttribute(t){let n=Rx(t);if(n===void 0)return;let r=m(n);if(r.type!==`ObjectExpression`)return;let i=t.parent;if(i.type!==`JSXOpeningElement`)return;let a=i.parent;a.type===`JSXElement`&&Vx(e,a)||Ux(e,r)}}},meta:{docs:{description:`Prefer extracting inline JSX object props to module-level constants when the entire object is statically hoistable.`},messages:{hoistableObjectProp:"Extract `{{objectText}}` to a module-level const — this inline JSX prop object is fully static and causes unnecessary reference churn on every render."},schema:[],type:`suggestion`}}),Gx={componentName:`Portal`,fileNames:[`portal`],markers:[`target`]},Kx=new Set([`@rbxts/react-roblox`,`react-dom`]),qx=new Set([`.jsx`,`.tsx`]);function Jx(e){return e.type===`ImportBinding`}function Yx(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function Xx(e){if(e===void 0)return!1;for(let t of e.defs){if(!Jx(t)||t.node.type!==`ImportSpecifier`)continue;let e=Yx(t.node);if(e===void 0||!Kx.has(e.source.value))continue;let{imported:n}=t.node;if(n.type===`Identifier`&&n.name===`createPortal`)return!0}return!1}function Zx(e){if(e===void 0)return!1;for(let t of e.defs){if(!Jx(t)||t.node.type!==`ImportNamespaceSpecifier`)continue;let e=Yx(t.node);if(e!==void 0&&Kx.has(e.source.value))return!0}return!1}function Qx(e,{callee:t}){return t.type===`Identifier`?Xx(_(e.getScope(t),t.name)):t.type!==`MemberExpression`||t.computed||t.property.type!==`Identifier`||t.property.name!==`createPortal`||t.object.type!==`Identifier`?!1:Zx(_(e.getScope(t.object),t.object.name))}function $x(e,t){return e.type===`JSXElement`||e.type===`JSXFragment`?t.getText(e):`{${t.getText(e)}}`}function eS(e,t,n){if(t.arguments.length!==2)return;let[r,i]=t.arguments;if(r===void 0||i===void 0)return;let a=$x(r,n);return`<${e} target={${n.getText(i)}}>${a}</${e}>`}const tS=y(`prefer-local-portal-component`,`react`,{create(e){let{filename:t,sourceCode:n}=e,r=t===``?{found:!1}:rx(t,Gx),a=t!==``&&ex(t,Gx).matches,o=new Set;return{CallExpression(s){if(a||!Qx(n,s)||s.arguments.length!==2||!(o.size>0||r.found))return;let c=qx.has(i.extname(t))&&o.size===1,[l]=o,u=c&&l!==void 0?eS(l,s,n):void 0;if(u!==void 0){e.report({fix:e=>e.replaceText(s,u),messageId:`preferPortalComponent`,node:s});return}e.report({messageId:`preferPortalComponent`,node:s})},ImportDeclaration(e){nx(e,tx(e,t,Gx),Gx.componentName,o)}}},meta:{docs:{description:`Prefer a local Portal component over direct createPortal calls when the project already defines one.`},fixable:`code`,messages:{preferPortalComponent:"Use the local `Portal` component instead of calling `createPortal` directly."},schema:[],type:`suggestion`}}),nS=new Set([`end`,`loc`,`parent`,`range`,`start`]),rS=new Set([`.jsx`,`.tsx`]),iS=new Set([`PaddingBottom`,`PaddingLeft`,`PaddingRight`,`PaddingTop`]),aS={componentName:`DirectionalPadding`,fileNames:[`directional-padding`],markers:[`horizontal`,`vertical`]},oS={componentName:`EqualPadding`,fileNames:[`equal-padding`],markers:[`padding`]};function sS(e){return t.isObject(e)}function cS(e,t){return Object.is(e,t)?!0:lS(e)?Array.isArray(t)&&uS(e,t):Array.isArray(t)||!sS(e)||!sS(t)?!1:dS(e,t)}function lS(e){return Array.isArray(e)}function uS(e,t){if(e.length!==t.length)return!1;let n=0;for(let r of e)if(!cS(r,t[n++]))return!1;return!0}function dS(e,t){let n=Object.entries(e).filter(([e])=>!nS.has(e)),r=Object.entries(t).filter(([e])=>!nS.has(e));if(n.length!==r.length)return!1;for(let[e,r]of n)if(!(e in t)||!cS(r,t[e]))return!1;return!0}function fS(e){for(let t of e.children)if((t.type!==`JSXText`||t.value.trim()!==``)&&(t.type!==`JSXExpressionContainer`||t.expression.type!==`JSXEmptyExpression`))return!0;return!1}function pS({value:e}){if(e!==null){if(e.type===`JSXExpressionContainer`)switch(e.expression.type){case`JSXElement`:case`JSXEmptyExpression`:case`JSXFragment`:return;default:return m(e.expression)}return e.type===`Literal`?e:void 0}}function mS(e){let t=new Map;for(let n of e.attributes){if(n.type===`JSXSpreadAttribute`||n.name.type!==`JSXIdentifier`)return;let e=n.name.name;if(!iS.has(e)||t.has(e)||n.value===null)return;t.set(e,n)}let n=t.get(`PaddingBottom`),r=t.get(`PaddingLeft`),i=t.get(`PaddingRight`),a=t.get(`PaddingTop`);if(n!==void 0&&r!==void 0&&i!==void 0&&a!==void 0)return{paddingBottom:n,paddingLeft:r,paddingRight:i,paddingTop:a}}function hS({value:e},t){if(e!==null)switch(e.type){case`JSXExpressionContainer`:case`Literal`:return t.getText(e);default:return}}function gS(e,t,n,r){let i=hS(n.paddingTop,r);if(i===void 0)return;if(t===`preferEqualPadding`)return`<${e} padding=${i} />`;let a=hS(n.paddingLeft,r);if(a!==void 0)return`<${e} horizontal=${i} vertical=${a} />`}function _S(e){let t=pS(e.paddingBottom),n=pS(e.paddingLeft),r=pS(e.paddingRight),i=pS(e.paddingTop);if(t===void 0||n===void 0||r===void 0||i===void 0)return;if(cS(i,t)&&cS(i,n)&&cS(i,r))return`preferEqualPadding`;let a=cS(i,t),o=cS(n,r);return a&&o?`preferDirectionalPadding`:void 0}function vS(e){return e.type===`JSXIdentifier`}const yS=y(`prefer-padding-components`,`react`,{create(e){let{filename:t}=e,n=t===``?{found:!1}:rx(t,aS),r=t===``?{found:!1}:rx(t,oS),a=t!==``&&ex(t,aS).matches,o=t!==``&&ex(t,oS).matches,s=new Set,c=new Set;return{ImportDeclaration(e){let n=tx(e,t,aS),r=tx(e,t,oS);nx(e,n,aS.componentName,s),nx(e,r,oS.componentName,c)},JSXElement(l){if(fS(l))return;let{openingElement:u}=l;if(!vS(u.name)||u.name.name!==`uipadding`)return;let d=mS(u);if(d===void 0)return;let f=_S(d);if(f===void 0||(f===`preferEqualPadding`?o:a))return;let p=f===`preferEqualPadding`?c:s,m=f===`preferEqualPadding`?r:n;if(p.size===0&&!m.found)return;let h=rS.has(i.extname(t))&&p.size===1,[g]=[...p],_=h&&g!==void 0?gS(g,f,d,e.sourceCode):void 0;if(_!==void 0){e.report({fix(e){return e.replaceText(l,_)},messageId:f,node:l});return}e.report({messageId:f,node:l})}}},meta:{docs:{description:`Prefer local EqualPadding and DirectionalPadding components over matching <uipadding /> declarations.`},fixable:`code`,messages:{preferDirectionalPadding:"Use the local `DirectionalPadding` component when horizontal and vertical padding already match.",preferEqualPadding:"Use the local `EqualPadding` component when all four padding values already match."},schema:[],type:`suggestion`}});function bS(e){return e.type===`JSXElement`||e.type===`JSXFragment`}function xS(e,t,n){return e.type===`Super`||t.type===`Super`?e.type===`Super`&&t.type===`Super`:q(e,t,n)}function SS(e,t,n){return e.type===`SpreadElement`||t.type===`SpreadElement`?e.type!==`SpreadElement`||t.type!==`SpreadElement`?!1:q(e.argument,t.argument,n):q(e,t,n)}function CS(e,t,n){return e.type===`PrivateIdentifier`||t.type===`PrivateIdentifier`?e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`&&e.name===t.name:q(e,t,n)}function q(e,t,n){let r=m(e),i=m(t);if(r.type!==i.type)return!1;switch(r.type){case`BinaryExpression`:return i.type===`BinaryExpression`&&wS(r,i,n);case`CallExpression`:return i.type===`CallExpression`&&TS(r,i,n);case`Identifier`:return i.type===`Identifier`&&r.name===i.name;case`Literal`:return i.type===`Literal`&&r.value===i.value;case`LogicalExpression`:return i.type===`LogicalExpression`&&ES(r,i,n);case`MemberExpression`:return i.type===`MemberExpression`&&DS(r,i,n);case`ThisExpression`:return i.type===`ThisExpression`;case`UnaryExpression`:return i.type===`UnaryExpression`&&r.operator===i.operator&&q(r.argument,i.argument,n);default:return n.getText(r)===n.getText(i)}}function wS(e,t,n){return e.operator===t.operator&&CS(e.left,t.left,n)&&CS(e.right,t.right,n)}function TS(e,t,n){if(e.optional!==t.optional||!xS(e.callee,t.callee,n)||e.arguments.length!==t.arguments.length)return!1;for(let r=0;r<e.arguments.length;r+=1){let i=e.arguments[r],a=t.arguments[r];if(i===void 0||a===void 0||!SS(i,a,n))return!1}return!0}function ES(e,t,n){return e.operator===t.operator&&q(e.left,t.left,n)&&q(e.right,t.right,n)}function DS(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!xS(e.object,t.object,n)?!1:e.computed?CS(e.property,t.property,n):OS(e.property,t.property)}function OS(e,t){return(e.type===`Identifier`&&t.type===`Identifier`||e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`)&&e.name===t.name}function kS(e){let t=m(e);if(t.type===`UnaryExpression`&&t.operator===`!`)return m(t.argument)}function AS(e){let t=m(e);if(t.type===`BinaryExpression`&&(t.operator===`===`||t.operator===`!==`))return{left:t.left,operator:t.operator,right:t.right}}function jS(e){let t=m(e);return t.type===`Identifier`||t.type===`ThisExpression`||t.type===`Literal`}function MS(e){return $e(e)&&jS(e)}function NS(e,t,n){let r=kS(e);if(r&&q(r,t,n))return{isFixSafe:jS(r)};let i=kS(t);if(i&&q(i,e,n))return{isFixSafe:jS(i)};let a=AS(e),o=AS(t);if(!a||!o||!(a.operator===`===`&&o.operator===`!==`||a.operator===`!==`&&o.operator===`===`))return;let s=CS(a.left,o.left,n)&&CS(a.right,o.right,n),c=CS(a.left,o.right,n)&&CS(a.right,o.left,n);if(!(!s&&!c))return{isFixSafe:MS(a.left)&&MS(a.right)&&MS(o.left)&&MS(o.right)}}function PS(e){return e.type===`JSXText`&&e.value.trim()===``}function FS(e){if(e.type===`JSXExpressionContainer`&&e.expression.type!==`JSXEmptyExpression`&&e.expression.type===`LogicalExpression`&&e.expression.operator===`&&`&&bS(e.expression.right))return{condition:e.expression.left,logical:e.expression,node:e,renderBranch:e.expression.right}}const IS=y(`prefer-ternary-conditional-rendering`,`react`,{create(e){let{sourceCode:t}=e;function n(e,t){let n=t;for(;n<e.length;){let t=e[n];if(t===void 0||!PS(t))break;n+=1}let r=e[n];return r===void 0?void 0:FS(r)}function r(n,r){let i=NS(n.condition,r.condition,t);if(i!==void 0){if(i.isFixSafe){e.report({fix(e){let i=`{${t.getText(n.condition)} ? ${t.getText(n.renderBranch)} : ${t.getText(r.renderBranch)}}`;return e.replaceTextRange([n.node.range[0],r.node.range[1]],i)},messageId:`preferTernaryConditionalRendering`,node:n.logical});return}e.report({messageId:`preferTernaryConditionalRendering`,node:n.logical})}}function i(e){for(let t=0;t<e.length;t+=1){let i=e[t];if(i===void 0)continue;let a=FS(i);if(a===void 0)continue;let o=n(e,t+1);o!==void 0&&r(a,o)}}return{JSXElement(e){i(e.children)},JSXFragment(e){i(e.children)}}},meta:{docs:{description:`Prefer ternary expressions over complementary JSX && branches.`},fixable:`code`,messages:{preferTernaryConditionalRendering:`Use a single ternary expression instead of complementary JSX && branches.`},schema:[],type:`suggestion`}});function LS(e,t,n){if(t.type!==`BlockStatement`)return;let r=0;for(let e of t.body)if(e.type===`VariableDeclaration`)for(let t of e.declarations)Qg(t.init,`useState`)&&(r+=1);r<5||e.report({data:{componentName:n,useStateCount:String(r)},messageId:`excessiveUseState`,node:t})}const RS=y(`prefer-use-reducer`,`react`,{create(e){return{FunctionDeclaration(t){t.id===null||!W(t.id.name)||`body`in t&&t.body&&LS(e,t.body,t.id.name)},VariableDeclarator(t){!$g(t)||!t.init||`body`in t.init&&t.init.body&&`name`in t.id&&LS(e,t.init.body,t.id.name)}}},meta:{docs:{description:`Suggest using useReducer for related state updates instead of multiple useState calls.`,recommended:!0},messages:{excessiveUseState:`Component "{{componentName}}" has {{useStateCount}} useState calls — consider useReducer for related state`},type:`problem`}}),zS=/^use[A-Z0-9].*$/u;function BS(e){return zS.test(e)}function VS(e){if(e.id!==null)return e.id.name}function HS(e){return e.id.type===`Identifier`?e.id.name:void 0}function US(e){let t=VS(e);return t!==void 0&&BS(t)}function WS({parent:e}){if(e.type!==`VariableDeclarator`)return!1;let t=HS(e);return t!==void 0&&BS(t)}function GS(e,t){let n=e.get(t);if(n!==void 0&&n.length!==0)return n.at(-1)}function KS(e){for(let t=e.defs.length-1;t>=0;--t){let n=e.defs[t];if(n?.node.type===`VariableDeclarator`&&n.node.init?.type===`ArrayExpression`)return n.node.init}}function qS(e){for(let t=e.defs.length-1;t>=0;--t){let n=e.defs[t];if(n?.node.type===`VariableDeclarator`&&n.node.init?.type===`ObjectExpression`)return!0}return!1}function JS(e,t,n,r){let i=_(e.getScope(t),n);if(i!==void 0){let e=KS(i);if(e!==void 0)return e}return GS(r,n)}function YS(e,t,n){if(e.argument.type===`Identifier`){let r=JS(t,e,e.argument.name,n);return r===void 0?1:XS(r,t,n)}return e.argument.type===`ArrayExpression`?XS(e.argument,t,n):1}function XS(e,t,n){let r=0;for(let i of e.elements){if(i===null){r+=1;continue}if(i.type===`SpreadElement`){r+=YS(i,t,n);continue}r+=1}return r}function ZS(e,t){let n=_(e.getScope(t),t.name);return n!==void 0&&qS(n)}function QS(e){let t=HS(e);if(t!==void 0&&e.init?.type===`ArrayExpression`)return{name:t,init:e.init}}function $S(e,t){let n=QS(e);if(n===void 0)return;let{name:r,init:i}=n,a=t.get(r)??[];a.push(i),t.set(r,a)}function eC(e,t){let n=QS(e);if(n===void 0)return;let{name:r}=n,i=t.get(r);i!==void 0&&i.length!==0&&(i.pop(),i.length===0&&t.delete(r))}const tC=y(`react-hooks-strict-return`,`react`,{create(e){let{sourceCode:t}=e,n=new Map,r=0;function i(e){US(e)&&(r+=1)}function a(e){US(e)&&--r}function o(e){WS(e)&&(r+=1)}function s(e){WS(e)&&--r}function c(t){e.report({data:{count:`2`},messageId:`tooManyReturnValues`,node:t})}function l(e){if(r!==0&&e.argument!==null&&e.argument.type!==`ObjectExpression`){if(e.argument.type===`Identifier`){if(ZS(t,e.argument))return;let r=JS(t,e,e.argument.name,n);if(r===void 0)return;XS(r,t,n)>2&&c(e);return}e.argument.type===`ArrayExpression`&&XS(e.argument,t,n)>2&&c(e)}}return{ArrowFunctionExpression:o,"ArrowFunctionExpression:exit":s,FunctionDeclaration:i,"FunctionDeclaration:exit":a,FunctionExpression:i,"FunctionExpression:exit":a,ReturnStatement:l,VariableDeclarator(e){$S(e,n)},"VariableDeclarator:exit"(e){eC(e,n)}}},meta:{docs:{description:`Restrict React hooks to object returns or short tuples.`},messages:{tooManyReturnValues:`Hook returns more than {{count}} values. Return an object with named properties instead.`},schema:[],type:`suggestion`}}),nC=[{name:`useEffect`,allowAsync:!1},{name:`useLayoutEffect`,allowAsync:!1},{name:`useInsertionEffect`,allowAsync:!1}];function rC(e){return t.isObject(e)&&t.isString(e.name)&&typeof e.allowAsync==`boolean`}function iC(e){let n=t.isObject(e)&&e.sloptor,r=t.isObject(e)&&e.inlineFunctionDeclarations;if(!t.isObject(e))return{environment:`roblox-ts`,hooks:nC,inlineFunctionDeclarations:r,sloptor:n};let i=Bm(e.environment)?e.environment:`roblox-ts`,a=e.hooks;if(!Array.isArray(a))return{environment:i,hooks:nC,inlineFunctionDeclarations:r,sloptor:n};let o=[];for(let e of a)rC(e)&&o.push(e);return o.length===0?{environment:i,hooks:nC,inlineFunctionDeclarations:r,sloptor:n}:{environment:i,hooks:o,inlineFunctionDeclarations:r,sloptor:n}}function aC(e){for(let t of e.defs){let{node:e}=t;if(e.type===`FunctionDeclaration`)return{isAsync:e.async,node:e,type:`function-declaration`};if(e.type===`VariableDeclarator`){if(e.init===null)continue;if(e.init.type===`ArrowFunctionExpression`)return{isAsync:e.init.async,node:e.init,type:`arrow`};if(e.init.type===`FunctionExpression`)return{isAsync:e.init.async,node:e.init,type:`function-expression`}}}}function oC(e,t){let n=_(e.getScope(t),t.name);if(n===void 0)return!1;for(let e of n.defs){let{node:t}=e;if(t.type!==`VariableDeclarator`||t.init?.type!==`CallExpression`)continue;let n=N(t.init);if(n===`useCallback`||n===`useMemo`)return!0}return!1}function sC(e,t,n){if(t.references.length!==1)return!1;let r=n.parent.type;return r===`ExportNamedDeclaration`||r===`ExportDefaultDeclaration`?!1:!re(e,n)}const cC=y(`require-named-effect-functions`,`react`,{create(e){let{environment:t,hooks:n,inlineFunctionDeclarations:r,sloptor:i}=iC(e.options[0]),a=new Map(n.map(e=>[e.name,e.allowAsync])),o=new Set(a.keys()),s=t===`roblox-ts`&&!i;function c(e){return a.get(e)??!1}function l(t,n,r){e.report({data:{hook:t},messageId:r,node:n})}function u(t,n,r){let i=_(e.sourceCode.getScope(r),r.name);if(i===void 0){oC(e.sourceCode,r)&&l(t,n,`identifierReferencesCallback`);return}let a=aC(i);if(a===void 0){oC(e.sourceCode,r)&&l(t,n,`identifierReferencesCallback`);return}d(t,n,r,a,i)}function d(e,t,n,i,a){if(i.type===`arrow`){i.isAsync&&!c(e)?l(e,t,`identifierReferencesAsyncArrow`):i.isAsync||l(e,t,`identifierReferencesArrow`);return}if(i.type===`function-expression`){f(e,t,i.node);return}i.isAsync?c(e)||l(e,t,`identifierReferencesAsyncFunction`):!s&&r&&p(e,t,n,i.node,a)}function f(e,t,n){n.id===null?l(e,t,`anonymousFunction`):s&&l(e,t,`functionExpression`)}function p(t,n,r,i,a){e.report({data:{hook:t},fix(t){let n=[t.replaceText(r,e.sourceCode.getText(i))];return sC(e.sourceCode,a,i)&&n.push(t.removeRange(ne(e.sourceCode.text,i))),n},messageId:`identifierReferencesFunctionDeclaration`,node:n})}function m(e,t,n){let r=n.id!==null;r&&n.async?l(e,t,`asyncFunctionExpression`):r&&s?l(e,t,`functionExpression`):!r&&n.async?l(e,t,`asyncAnonymousFunction`):r||l(e,t,`anonymousFunction`)}return{CallExpression(e){let t=N(e);if(t===void 0||!o.has(t))return;let[n]=e.arguments;if(n!==void 0){if(n.type===`Identifier`){u(t,e,n);return}if(n.type===`ArrowFunctionExpression`){n.async?l(t,e,`asyncArrowFunction`):l(t,e,`arrowFunction`);return}n.type===`FunctionExpression`&&m(t,e,n)}}}},meta:{docs:{description:`Enforce named effect functions for better debuggability. Prevents inline arrow functions in useEffect and similar hooks.`,recommended:!1},fixable:`code`,messages:{anonymousFunction:`Anonymous function passed to {{hook}}. debug.info returns empty string for anonymous functions, making stack traces useless for debugging. Extract to: function effectName() { ... } then pass effectName.`,arrowFunction:`Arrow function passed to {{hook}}. Arrow functions have no debug name and create new instances each render. Extract to: function effectName() { ... } then pass effectName.`,asyncAnonymousFunction:`Async anonymous function in {{hook}}. Two issues: (1) no debug name makes stack traces useless, (2) async effects require cancellation logic for unmount. Extract to: async function effectName() { ... } with cleanup.`,asyncArrowFunction:`Async arrow function in {{hook}}. Two issues: (1) arrow functions have no debug name, (2) async effects require cancellation logic. Extract to: async function effectName() { ... } with cleanup.`,asyncFunctionDeclaration:`Async function declaration passed to {{hook}}. Async effects require cancellation logic to handle component unmount. Implement cleanup or set allowAsync: true if cancellation is handled.`,asyncFunctionExpression:`Async function expression in {{hook}}. Async effects require cancellation logic for unmount. Extract to a named async function declaration with cleanup, then pass the reference.`,functionExpression:`Function expression passed to {{hook}}. Function expressions create new instances each render, breaking referential equality. Extract to: function effectName() { ... } at module or component top-level.`,identifierReferencesArrow:`{{hook}} receives identifier pointing to arrow function. Arrow functions have no debug name and lack referential stability. Convert to: function effectName() { ... } then pass effectName.`,identifierReferencesAsyncArrow:`{{hook}} receives identifier pointing to async arrow function. Two issues: (1) no debug name, (2) async effects require cancellation logic. Convert to: async function effectName() { ... } with cleanup.`,identifierReferencesAsyncFunction:`{{hook}} receives identifier pointing to async function. Async effects require cancellation logic for unmount. Implement cleanup or set allowAsync: true if cancellation is handled.`,identifierReferencesCallback:`{{hook}} receives identifier from useCallback/useMemo. These hooks return new references when dependencies change, causing unexpected effect re-runs. Use a stable function declaration: function effectName() { ... }`,identifierReferencesFunctionDeclaration:`{{hook}} receives identifier pointing to a named function declaration. Convert it to an inline named function expression so the effect callback is self-contained: useEffect(function effectName() {}, [])`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`Environment mode: 'roblox-ts' only allows identifiers, 'standard' allows both identifiers and named function expressions`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:[...nC],description:`Hook configuration objects with name and allowAsync settings.`,items:{additionalProperties:!1,properties:{name:{description:`Hook name to check`,type:`string`},allowAsync:{description:`Whether async functions are allowed for this hook`,type:`boolean`}},required:[`name`,`allowAsync`],type:`object`},type:`array`},inlineFunctionDeclarations:{default:!1,description:`Convert effect callbacks that reference a named function declaration into inline named function expressions (standard and sloptor modes only), keeping the effect body visible to dependency analysis. When the declaration is only referenced by the effect and is not exported or commented, the fix also removes the now-unused declaration.`,type:`boolean`},sloptor:{default:!1,description:`Compile with sloptor (a Go-based roblox-ts compiler). Sloptor targets @rbxts/react like roblox-ts but supports standard TypeScript features, so the rule applies standard-mode behavior. Use with environment: 'roblox-ts'.`,type:`boolean`}},type:`object`}],type:`problem`}}),lC={allowRootKeys:!1,ignoreCallExpressions:[`ReactTree.mount`,`CreateReactStory`,`createReactStory`,`createPlatformStory`],iterationMethods:[`map`,`filter`,`forEach`,`flatMap`,`reduce`,`reduceRight`,`some`,`every`,`find`,`findIndex`],memoizationHooks:[`useCallback`,`useMemo`]},uC=new Set([`ChainExpression`,`ParenthesizedExpression`,`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]),dC=new Set([...uC,`AwaitExpression`,`ConditionalExpression`,`LogicalExpression`,`SequenceExpression`,`SpreadElement`]),fC={iteration:!1,memoization:!1},pC=new Set([`ConditionalExpression`,`LogicalExpression`]),mC=new Set([`BlockStatement`,`CatchClause`,`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`IfStatement`,`LabeledStatement`,`SwitchCase`,`SwitchStatement`,`TryStatement`,`WhileStatement`,`WithStatement`]);function J(e){return e.parent??void 0}function hC(e){let t=e;for(;t!==void 0&&uC.has(t.type);)t=J(t);return t}function gC(e){let t=J(e);for(;t!==void 0;){if(k(t))return t;t=J(t)}}function _C(e,t,n){let{callee:r}=e;if(r.type===`Identifier`)return{iteration:t.has(r.name),memoization:n.has(r.name)};if(r.type===`MemberExpression`&&r.property.type===`Identifier`){let{name:i}=r.property,a={iteration:t.has(i),memoization:n.has(i)};return i===`from`&&r.object.type===`Identifier`&&r.object.name===`Array`&&e.arguments.length>=2||i===`call`&&r.object.type===`MemberExpression`&&r.object.property.type===`Identifier`&&t.has(r.object.property.name)?{...a,iteration:!0}:a}return fC}function vC(e){let t=e,n=J(e);for(;n!==void 0;){if(n.type===`CallExpression`){for(let e of n.arguments)if(e===t||e.type===`SpreadElement`&&e.argument===t)return n;return}if(dC.has(n.type)){t=n,n=J(n);continue}break}}function yC(e,t){if(t.type===`FunctionDeclaration`){let n=e.getDeclaredVariables(t);return n.length>0?n[0]:void 0}let n=J(t);if(n!==void 0&&(n.type===`VariableDeclarator`||n.type===`AssignmentExpression`)){let t=e.getDeclaredVariables(n);if(t.length>0)return t[0]}}function bC(e,t){e.iteration||=t.iteration,e.memoization||=t.memoization}function xC(e,t,n){if(e.isWrite())return fC;let r=vC(e.identifier);return r===void 0||qg(r)?fC:_C(r,t,n)}function SC(e,t,n,r){let i=vC(t);if(i!==void 0)return qg(i)?fC:_C(i,n,r);let a=yC(e,t);if(a===void 0)return fC;let o={iteration:!1,memoization:!1};for(let e of a.references)if(bC(o,xC(e,n,r)),o.iteration&&o.memoization)return o;return o}function CC(e){let t=wC(e);return t===void 0?!1:t.type===`ReturnStatement`?EC(t):t.type===`ArrowFunctionExpression`}function wC(e){let t=TC(hC(J(e)));for(;t!==void 0&&pC.has(t.type);)t=hC(J(t));return TC(t)}function TC(e){return e?.type===`JSXExpressionContainer`?hC(J(e)):e}function EC(e){let t=hC(J(e));for(;t!==void 0&&mC.has(t.type);)t=hC(J(t));return t!==void 0&&k(t)}function DC(e){if(!CC(e))return!1;let t=gC(e);if(t===void 0)return!1;let n=hC(J(t));return n?.type!==`CallExpression`||qg(n)}function OC(e,t){let n=J(e);if(n===void 0||n.type===`JSXExpressionContainer`&&(n=J(n),n===void 0))return!1;for(let e=0;e<20&&n!==void 0;e+=1){if(n.type===`CallExpression`){let{callee:e}=n;return e.type===`Identifier`?t.has(e.name):e.type===`MemberExpression`&&e.object.type===`Identifier`&&e.property.type===`Identifier`&&t.has(`${e.object.name}.${e.property.name}`)}n=J(n)}return!1}function kC(e){return e.toLowerCase().endsWith(`children`)}function AC(e){let t=J(e);if(t===void 0)return!1;for(;t!==void 0&&(t.type===`ConditionalExpression`||t.type===`LogicalExpression`);)t=J(t);if(t===void 0||t.type===`JSXExpressionContainer`&&(t=J(t),t===void 0)||t.type!==`JSXAttribute`)return!1;let n=Jg(t);return n===void 0||!kC(n)}function jC(e){let t=e,n=J(e);for(;n!==void 0&&uC.has(n.type);)t=n,n=J(n);return n===void 0?!1:n.type===`VariableDeclarator`?n.init===t:n.type===`AssignmentExpression`&&n.right===t}function MC(e,t){let n=J(e);if(n===void 0)return!1;let r=!1;for(;n!==void 0&&(n.type===t||uC.has(n.type));)n.type===t&&(r=!0),n=J(n);if(!r||n?.type!==`JSXExpressionContainer`)return!1;let i=J(n);return i===void 0?!1:i.type===`JSXElement`||i.type===`JSXFragment`}function NC(e){return MC(e,`ConditionalExpression`)}function PC(e){return MC(e,`LogicalExpression`)}const FC=y(`require-react-component-keys`,`react`,{create(e){let[t]=e.options,n={allowRootKeys:lC.allowRootKeys,ignoreCallExpressions:lC.ignoreCallExpressions,iterationMethods:lC.iterationMethods,memoizationHooks:lC.memoizationHooks,...t},r=new Set(n.ignoreCallExpressions),i=new Set(n.iterationMethods),a=new Set(n.memoizationHooks);function o(t){let o=gC(t),s=o===void 0?fC:SC(e.sourceCode,o,i,a),c=s.iteration||s.memoization;if(DC(t)&&!c){!n.allowRootKeys&&t.type===`JSXElement`&&Yg(t,`key`)&&e.report({messageId:`rootComponentWithKey`,node:t});return}if(!OC(t,r)&&!(jC(t)||AC(t)||NC(t))&&!(t.type===`JSXFragment`&&PC(t))&&!(t.type===`JSXFragment`&&s.memoization&&!s.iteration&&CC(t))){if(t.type===`JSXFragment`){e.report({messageId:`missingKey`,node:t});return}Yg(t,`key`)||e.report({messageId:`missingKey`,node:t})}}return{JSXElement:o,JSXFragment:o}},meta:{docs:{description:`Require keys on nested React JSX children, fragments, and configured iteration or memoization contexts.`},messages:{missingKey:"JSX element in list/callback lacks key prop. React Luau warns about missing keys in _G.__DEV__ mode. Add a unique `key` prop using a stable identifier (not array index).",rootComponentWithKey:"Root return has unnecessary key prop. The key gets overwritten by the parent anyway. Remove the `key` prop."},schema:[{additionalProperties:!1,properties:{allowRootKeys:{default:!1,description:`Allow key props on root component returns`,type:`boolean`},ignoreCallExpressions:{default:lC.ignoreCallExpressions,description:`Function calls where JSX arguments don't need keys`,items:{type:`string`},type:`array`},iterationMethods:{default:lC.iterationMethods,description:`Array method names that indicate iteration contexts where keys are required`,items:{type:`string`},type:`array`},memoizationHooks:{default:[`useCallback`,`useMemo`],description:`Hook names that indicate memoization contexts where keys are required`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}});function IC(e){if(e.id.type===`Identifier`)return e.id.name}function LC(e,t,n){return ue(e,t,n,`memo`)}function RC(e,t,n){return e.callee.type===`Identifier`?t.has(e.callee.name):e.callee.type!==`MemberExpression`||e.callee.property.type!==`Identifier`||e.callee.property.name!==`createContext`||e.callee.object.type!==`Identifier`?!1:n.has(e.callee.object.name)}function zC(e){let t=e;for(;t!==null;){if(t.type===`ExportNamedDeclaration`||t.type===`ExportDefaultDeclaration`)return!0;t=t.parent}return!1}function BC(e){return e.parent.type===`VariableDeclaration`?e.parent.parent.type===`ExportNamedDeclaration`||e.parent.parent.type===`ExportDefaultDeclaration`:!1}function VC(e,t,n){for(let r of e.getDeclaredVariables(t))if(r.name===n){for(let{identifier:e}of r.references)if(zC(e))return!0;return!1}return!1}function HC(e,t,n,r){return r.has(t)||BC(n)?!0:VC(e,n,t)}function UC(e,t,n){e.report({data:{variableName:n},messageId:t.kind===`context`?`missingContextDisplayName`:`missingMemoDisplayName`,node:t.node})}const WC=y(`require-react-display-names`,`react`,{create(e){let t=Wm(e.options[0]),n=new Set,r=new Set,i=new Set,a=new Map,o=new Set;return{'AssignmentExpression[left.type="MemberExpression"]'({left:e}){if(e.type!==`MemberExpression`)return;let{property:t}=e;if(t.type!==`Identifier`||t.name!==`displayName`)return;let{object:n}=e;if(n.type!==`Identifier`)return;let r=a.get(n.name);r!==void 0&&(r.hasDisplayName=!0)},ExportDefaultDeclaration(t){if(t.declaration.type===`CallExpression`){if(LC(t.declaration,n,i)){e.report({messageId:`directMemoExport`,node:t});return}RC(t.declaration,r,i)&&e.report({messageId:`directContextExport`,node:t});return}t.declaration.type===`Identifier`&&o.add(t.declaration.name)},ExportNamedDeclaration(e){for(let t of e.specifiers)t.exported.type===`Identifier`&&t.exported.name==="default"&&t.local.type===`Identifier`&&o.add(t.local.name)},ImportDeclaration(e){if(Gm(e,t))for(let t of e.specifiers){let{name:e}=t.local;if(t.type===`ImportSpecifier`){let i=fe(t);i===`memo`?n.add(e):i===`createContext`&&r.add(e);continue}i.add(e)}},"Program:exit"(){for(let[t,n]of a)n.hasDisplayName||HC(e.sourceCode,t,n.node,o)&&UC(e,n,t)},VariableDeclarator(e){if(e.init?.type!==`CallExpression`)return;let t=IC(e);if(t!==void 0){if(LC(e.init,n,i)){a.set(t,{hasDisplayName:!1,kind:`memo`,node:e});return}RC(e.init,r,i)&&a.set(t,{hasDisplayName:!1,kind:`context`,node:e})}}}},meta:{docs:{description:`Require displayName on exported memo components and contexts.`},messages:{directContextExport:`Directly exporting createContext() result prevents setting displayName.`,directMemoExport:`Directly exporting memo() result prevents setting displayName.`,missingContextDisplayName:`Context '{{variableName}}' must have a displayName assigned.`,missingMemoDisplayName:`Memo component '{{variableName}}' must have a displayName assigned.`},schema:[{additionalProperties:!1,properties:{environment:zm},type:`object`}],type:`problem`}});function GC(e,t){t.type===`ObjectExpression`&&t.properties.length===0&&e.report({messageId:`emptyObjectDefault`,node:t}),t.type===`ArrayExpression`&&t.elements.length===0&&e.report({messageId:`emptyArrayDefault`,node:t})}function KC(e,t){for(let n of t){if(n.type===`AssignmentPattern`&&n.left.type===`ObjectPattern`){qC(e,n.left),x(n.right)&&GC(e,n.right);continue}n.type===`ObjectPattern`&&qC(e,n)}}function qC(e,t){for(let n of t.properties){let t=JC(n);t!==void 0&&GC(e,t)}}function JC(e){if(e.type!==`Property`||e.value.type!==`AssignmentPattern`)return;let t=e.value.right;return x(t)?t:void 0}function YC(e){if(!(e.type!==`FunctionDeclaration`||!Gg(e)))return[...e.params]}function XC(e){if(!(e.type!==`VariableDeclarator`||!$g(e)||e.init===null)&&(e.init.type===`ArrowFunctionExpression`||e.init.type===`FunctionExpression`))return[...e.init.params]}const ZC=y(`rerender-memo-with-default-value`,`react`,{create(e){return{FunctionDeclaration(t){let n=YC(t);n!==void 0&&KC(e,n)},VariableDeclarator(t){let n=XC(t);n!==void 0&&KC(e,n)}}},meta:{docs:{description:`Prevent inline empty object and array defaults in component prop destructuring.`,recommended:!0},messages:{emptyArrayDefault:`Default prop value [] creates a new array reference every render — extract to a module-level constant`,emptyObjectDefault:`Default prop value {} creates a new object reference every render — extract to a module-level constant`},type:`problem`}}),QC=/(?<first>[\p{Ll}\d])(?<second>\p{Lu})/gu,$C=/(?<first>\p{Lu})(?<second>\p{Lu}\p{Ll})/gu,ew=`$<first>\0$<second>`;function tw(e){let t=e.trim();if(t.length===0)return``;let n=t.replace(QC,ew).replace($C,ew),r=0,{length:i}=n;for(;n.charCodeAt(r)===0;)r+=1;if(r===i)return``;for(;n.charCodeAt(i-1)===0;)--i;let a=``,o=r;for(let e=r;e<=i;e+=1)if(e===i||n.charCodeAt(e)===0){if(e>o){let t=n.slice(o,e),r=t.charCodeAt(0);a.length>0&&r>=48&&r<=57&&(a+=`_`),a+=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}o=e+1}return a}function nw(e){return e.split(`/`).filter(e=>!e.startsWith(`.`))}function rw(e){return e.split(`/`).filter(e=>e===`..`).length}function iw(e){return e.some(e=>e===tw(e)&&!e.includes(`.`))}function aw(e){return i.basename(e,i.extname(e))===`index`}function ow(e){if(!e.includes(`fixtures`))return!1;let t=e.indexOf(`fixtures`);return!iw(e.slice(0,t))}const sw=y(`strict-component-boundaries`,`react`,{create(e){let n=e.options?.[0],{allow:r=[],maxDepth:a=1}=t.isObject(n)?n:{allow:[],maxDepth:1},o=r.map(e=>new RegExp(e,`u`));return{ImportDeclaration(n){let r=n.source.value;if(!t.isString(r)||!r.startsWith(`.`)||o.some(e=>e.test(r)))return;let{filename:s}=e;if(s===``)return;let c=jb(r,s);if(!c.found)return;let l=i.relative(s,c.path).replaceAll(`\\`,`/`),u=nw(l);if((rw(l)>1||u.includes(`components`))&&iw(u)&&u.length>a&&!aw(l)&&!ow(u)){e.report({messageId:`noReachingIntoComponent`,node:n});return}u.includes(`components`)&&u.length>a+1&&!aw(l)&&!ow(u)&&e.report({messageId:`noReachingIntoComponent`,node:n})}}},meta:{docs:{description:`Prevent imports that reach into another component's nested modules.`},messages:{noReachingIntoComponent:`Do not reach into an individual component's folder for nested modules. Import from the closest shared components folder instead.`},schema:[{additionalProperties:!1,properties:{allow:{default:[],description:`Regular expression patterns for imports allowed to cross component boundaries.`,items:{type:`string`},type:`array`},maxDepth:{default:1,description:`Maximum path depth allowed inside another component before reporting.`,type:`integer`}},type:`object`}],type:`problem`}}),cw=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`ObjectExpression`]),lw=new Map([[`useCallback`,{closureIndex:0,dependenciesIndex:1}],[`useEffect`,{closureIndex:0,dependenciesIndex:1}],[`useImperativeHandle`,{closureIndex:1,dependenciesIndex:2}],[`useInsertionEffect`,{closureIndex:0,dependenciesIndex:1}],[`useLayoutEffect`,{closureIndex:0,dependenciesIndex:1}],[`useMemo`,{closureIndex:0,dependenciesIndex:1}],[`useSpring`,{closureIndex:0,dependenciesIndex:1}],[`useSprings`,{closureIndex:1,dependenciesIndex:2}],[`useTrail`,{closureIndex:1,dependenciesIndex:2}]]),uw=new Map([[`useBinding`,!0],[`useReducer`,new Set([1])],[`useRef`,!0],[`useState`,new Set([1])],[`useTransition`,new Set([1])]]),dw=new Set([`ClassDeclaration`,`FunctionDeclaration`,`FunctionName`,`ImportBinding`]),fw=new Set(`Array.BigInt.Boolean.clearInterval.clearTimeout.console.Date.decodeURI.decodeURIComponent.Document.Element.encodeURI.encodeURIComponent.Error.Event.Exclude.Extract.Function.Infinity.InstanceType.isFinite.isNaN.JSON.Map.Math.NaN.Node.NonNullable.null.Number.Object.Omit.Parameters.parseFloat.parseInt.Partial.Pick.Promise.Readonly.ReadonlyArray.ReadonlyMap.ReadonlySet.Record.RegExp.Required.ReturnType.Set.setInterval.setTimeout.String.Symbol.undefined.WeakMap.WeakSet.Window`.split(`.`));function pw({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`&&e.property.type===`Identifier`)return e.property.name}function mw(e){let t=0,n=e;for(;;){if(n.type===`ChainExpression`||n.type===`ParenthesizedExpression`||n.type===`TSAsExpression`||n.type===`TSNonNullExpression`||n.type===`TSSatisfiesExpression`||n.type===`TSTypeAssertion`){n=n.expression;continue}if(n.type!==`MemberExpression`)break;t+=1,n=n.object}return t}function hw(e){let t=e;for(;;){if(t.type===`ChainExpression`||t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSNonNullExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`){t=t.expression;continue}if(t.type!==`MemberExpression`)break;t=t.object}return t.type===`Identifier`?t:void 0}function gw(e){let t=[],n=[e];for(;n.length>0;){let e=n.pop();if(e!==void 0){if(e.type===`Identifier`){t.push(e.name);continue}if(e.type===`MemberExpression`){n.push(e.object);continue}if(_w(e)){n.push(e.expression);continue}if(e.type===`BinaryExpression`||e.type===`LogicalExpression`){n.push(e.right,e.left);continue}if(e.type===`UnaryExpression`){n.push(e.argument);continue}e.type===`ConditionalExpression`&&n.push(e.alternate,e.consequent,e.test)}}return t}function _w(e){return e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||e.type===`TSAsExpression`||e.type===`TSNonNullExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSTypeAssertion`}const vw=new Set([`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]);function yw(e){return vw.has(e.type)}function bw(e,t){let n=[],r=e;for(;;){if(r.type===`ChainExpression`||r.type===`ParenthesizedExpression`||yw(r)){r=r.expression;continue}if(r.type!==`MemberExpression`)break;n.push(r),r=r.object}let i=r.type===`Identifier`?r.name:t.getText(r);for(let e=n.length-1;e>=0;--e){let r=n[e];if(r===void 0)continue;if(r.computed){i+=`[${t.getText(r.property)}]`;continue}let a=r.property.type===`Identifier`?r.property.name:``;i+=`${r.optional?`?.`:`.`}${a}`}return i}function xw(e,t){return e.type===`VariableDeclarator`&&e.id.type===t}function Sw(e,t,n){if(e===void 0||!(e instanceof Set)||!xw(t,`ArrayPattern`))return!1;let{elements:r}=t.id,i=0;for(let t of r){if((t?.type===`Identifier`?t.name:void 0)===n)return e.has(i);i+=1}return!1}function Cw(e,t,n){if(e===void 0||!(e instanceof Set)||!xw(t,`ObjectPattern`))return!1;for(let r of t.id.properties){if(r.type!==`Property`||va(r)?.name!==n)continue;let t=_a(r);return t!==void 0&&e.has(t)}return!1}function ww(e,t,n,r){if(e?.type!==`CallExpression`)return!1;let i=pw(e);if(i===void 0)return!1;let a=r.get(i);return a===!0||Sw(a,t,n)||Cw(a,t,n)}function Tw(e){if(e?.type!==`CallExpression`)return!1;let{callee:t}=e;return t.type===`MemberExpression`&&t.object.type===`Identifier`&&t.object.name===`React`&&t.property.type===`Identifier`&&t.property.name===`joinBindings`}function Ew(e){if(e?.type!==`CallExpression`)return!1;let{callee:t}=e;return t.type===`MemberExpression`&&t.property.type===`Identifier`&&t.property.name===`map`}function Dw(e){return e?.type===`Literal`||e?.type===`TemplateLiteral`||e?.type===`UnaryExpression`&&e.argument.type===`Literal`}function Ow(e,t){let n=e.defs.find(e=>e.node===t);if(n?.node.type!==`VariableDeclarator`)return!1;let r=n.node.parent.parent;return r?.type===`Program`||r?.type===`ExportNamedDeclaration`}function kw(e,{node:t,type:n},r,i){if(dw.has(n))return!0;if(n!==`Variable`||t.type!==`VariableDeclarator`)return!1;let{parent:a}=t;if(a.type!==`VariableDeclaration`||a.kind!==`const`)return!1;let{init:o}=t;return ww(o,t,r,i)||Tw(o)||Ew(o)||Dw(o)||Ow(e,t)}function Aw(e,t,n){if(!e)return!1;let r=e.defs;if(r.length===0)return!1;for(let i of r)if(kw(e,i,t,n))return!0;return!1}function jw(e,t){let n=t,r=e;for(;n;){if(n.type===`CallExpression`&&n.callee===r){if(r.type===`MemberExpression`)return r.object;break}let e=n.type===`MemberExpression`&&n.object===r,t=n.type===`ChainExpression`,i=n.type===`TSNonNullExpression`;if(!e&&!t&&!i)break;r=n,n=r.parent??void 0}return r}const Mw=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`VariableDeclarator`]);function Nw(e){if(e.type!==`Identifier`)return!1;let{parent:t}=e;return t.type===`Property`&&t.computed&&t.key===e}function Pw(e){if(e.type!==`Identifier`)return!1;let t=e.parent??void 0;for(;t;){if(vw.has(t.type)){t=t.parent??void 0;continue}if(t.type.startsWith(`TS`))return!0;if(Mw.has(t.type))return!1;t=t.parent??void 0}return!1}function Fw(e,t){let n=t.parent??void 0;for(;n;){if(k(n)){let t=n;return e.defs.some(e=>e.type===`Parameter`&&e.node===t)?!0:e.defs.some(e=>{let n=e.node.parent??void 0;for(;n&&n!==t;)n=n.parent??void 0;return n===t})}n=n.parent??void 0}return!1}function Iw(e,t){if(e.type!==`Identifier`)return;let n,r=t;for(;r;){let t=r.set.get(e.name);if(t){n=t;break}r=r.upper}if(!(!n||n.defs.length===0))for(let e of n.defs){let t=e.node;if(t.type===`FunctionDeclaration`)return t;if(t.type===`VariableDeclarator`&&t.init&&(t.init.type===`ArrowFunctionExpression`||t.init.type===`FunctionExpression`))return t.init}}function Lw(e,t){let n=t;for(;n;){let t=n.set.get(e);if(t)return t;n=n.upper}}function Rw(e,t){let n=e.node;for(;n;){if(n===t)return!0;n=n.parent??void 0}return!1}function zw(e,t){return e?.defs.every(e=>!Rw(e,t))??!1}function Bw(e,t,n,r){let i=jw(e,e.parent??void 0);return{name:t,depth:mw(i),forceDependency:Nw(e),node:i,usagePath:bw(i,r),variable:n}}function Vw(e){return e.type===`ParenthesizedExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSAsExpression`||e.type===`TSTypeAssertion`||e.type===`TSNonNullExpression`}function Hw(e,n,r){let i=n.visitorKeys[e.type]??[];for(let n of i){if(!t.isObject(e))break;let i=e[n];if(Array.isArray(i))for(let e of i)x(e)&&r(e);else x(i)&&r(i)}}function Uw(e,t){let n=[],r=new Set;function i(i){if(i.type!==`Identifier`)return;let{name:a}=i;if(r.has(a)||fw.has(a)||Pw(i))return;let o=Lw(a,t.getScope(i));zw(o,e)&&o!==void 0&&Fw(o,e)&&(r.add(a),n.push(Bw(i,a,o,t)))}function a(e){if(e.type===`Identifier`&&i(e),Vw(e)){a(e.expression);return}if(e.type===`MemberExpression`){a(e.object),e.computed&&a(e.property);return}if(e.type===`ChainExpression`){a(e.expression);return}if(e.type===`Property`){e.computed&&a(e.key),a(e.value);return}Hw(e,t,a)}return a(e),n}function Ww(e,t){let n=[];for(let r of e.elements){if(!r)continue;let e=r.type===`SpreadElement`?r.argument:r,i=bw(e,t),a=mw(e);n.push({name:i,depth:a,node:e})}return n}function Gw({name:e}){return e}function Kw(e){return e?cw.has(e.type):!1}function qw(e,{parent:t}){return t.type===`VariableDeclarator`?e.variable?.defs.some(e=>e.node===t)??!1:!1}function Jw(e){return e.length>0&&t.isNumber(e[0])}function Yw(e){return e.length>0&&t.isString(e[0])}function Xw(e){return e===!0||e===!1?e:t.isNumber(e)?new Set([e]):Array.isArray(e)&&(Jw(e)||Yw(e))?new Set(e):!1}function Zw(e,t,n,r){let i=[],a=0;for(let{name:e}of t)e!==n.name&&(i[a++]=e);let o=`[${i.join(`, `)}]`;e.report({data:{name:n.name},fix(e){return e.replaceText(r,o)},messageId:`unnecessaryDependency`,node:n.node,suggest:[{data:{name:n.name},fix(e){return e.replaceText(r,o)},messageId:`removeDependencySuggestion`}]})}function Qw(e){return e!==void 0&&k(e)}function $w(e,t){return e.filter(e=>e.forceDependency||!Aw(e.variable,e.name,t))}function eT(e,t,n,r){if(r.length===0)return;let i=[...new Set(r.map(Gw))].join(`, `),a=`[${[...new Set(r.map(({usagePath:e})=>e))].toSorted().join(`, `)}]`;e.report({data:{deps:i},fix(e){return e.insertTextAfter(n,`, ${a}`)},messageId:`missingDependenciesArray`,node:t,suggest:[{data:{dependencies:a},fix(e){return e.insertTextAfter(n,`, ${a}`)},messageId:`addDependenciesArraySuggestion`}]})}function tT(e){let t=hw(e);return t?.type===`Identifier`?t.name:void 0}function nT(e,t){let n=tT(t.node);if(n!==void 0)return e.find(e=>tT(e.node)===n)}function rT(e,t){return!e.forceDependency&&Aw(e.variable,e.name,t)}function iT(e,t,n,r,i,a,o){for(let s of t){let c=nT(n,s);if(c===void 0){a&&Zw(e,t,s,r);continue}if(o&&rT(c,i)){Zw(e,t,s,r);continue}a&&s.depth>c.depth&&Zw(e,t,s,r)}}function aT(e,t,n){let r=hw(e.node);if(r?.type===`Identifier`&&e.depth<=t.depth)return r.name===tT(t.node);if(!n)return!1;let i=tT(t.node);return i!==void 0&&gw(e.node).includes(i)}function oT(e,t,n,r){let i=[];for(let a of $w(e,n))tT(a.node)!==void 0&&(t.some(e=>aT(e,a,r))||i.push(a));return i}function sT(e,t,n,r){if(r.length===0)return;let i=n.map(({name:e})=>e),a=r.map(({usagePath:e})=>e),o=`[${[...i,...a].toSorted().join(`, `)}]`,s=n.at(-1)?.node??t,c=r.at(0);if(c!==void 0&&r.length===1){e.report({data:{name:c.usagePath},fix(e){return e.replaceText(t,o)},messageId:`missingDependency`,node:s,suggest:[{data:{name:c.usagePath},fix(e){return e.replaceText(t,o)},messageId:`addDependencySuggestion`}]});return}e.report({data:{names:a.join(`, `)},fix(e){return e.replaceText(t,o)},messageId:`missingDependencies`,node:s,suggest:[{fix(e){return e.replaceText(t,o)},messageId:`addMissingDependenciesSuggestion`}]})}function cT(e){let t=e.variable?.defs[0];return t?.node.type===`VariableDeclarator`?t.node.init??void 0:void 0}function lT(e,t,n,r){for(let i of $w(t,r)){let t=tT(i.node);if(t!==void 0){for(let r of n)if(tT(r.node)===t&&r.depth===i.depth){r.depth===0&&Kw(cT(i))&&e.report({data:{name:i.usagePath},messageId:`unstableDependency`,node:r.node});break}}}}const uT=y(`use-exhaustive-dependencies`,`react`,{create(e){let[t]=e.options,n={hooks:t?.hooks??[],reportMissingDependenciesArray:t?.reportMissingDependenciesArray??!0,reportUnnecessaryDependencies:t?.reportUnnecessaryDependencies??!0,reportUnnecessaryStableDependencies:t?.reportUnnecessaryStableDependencies??!1,resolveExpressionDependencies:t?.resolveExpressionDependencies??!0},r=new Map(lw);for(let e of n.hooks)e.closureIndex!==void 0&&e.dependenciesIndex!==void 0&&r.set(e.name,{closureIndex:e.closureIndex,dependenciesIndex:e.dependenciesIndex});let i=new Map(uw);for(let e of n.hooks)e.stableResult!==void 0&&i.set(e.name,Xw(e.stableResult));let a=new WeakMap;function o(t){let n=a.get(t);if(n)return n;let r=e.sourceCode.getScope(t);return a.set(t,r),r}function s(e,t){if(e.type===`ArrowFunctionExpression`)return e;if(!(k(e)||e.type===`Identifier`))return;let n=Iw(e,o(t));return Qw(n)?n:void 0}return{CallExpression(t){let a=pw(t);if(a===void 0||a===``)return;let o=r.get(a);if(!o)return;let{closureIndex:c,dependenciesIndex:l}=o,u=t.arguments,d=u[c];if(d===void 0)return;let f=s(d,t);if(!f)return;let p=u[l];if(!p&&n.reportMissingDependenciesArray){eT(e,t,d,$w(Uw(f,e.sourceCode).filter(e=>!qw(e,t)),i));return}if(!p||p.type!==`ArrayExpression`)return;let m=p,h=Uw(f,e.sourceCode).filter(e=>!qw(e,t)),g=Ww(m,e.sourceCode);(n.reportUnnecessaryDependencies||n.reportUnnecessaryStableDependencies)&&iT(e,g,h,m,i,n.reportUnnecessaryDependencies,n.reportUnnecessaryStableDependencies),sT(e,m,g,oT(h,g,i,n.resolveExpressionDependencies)),lT(e,h,g,i)}}},meta:{docs:{description:`Enforce exhaustive and correct dependency specification in React hooks to prevent stale closures and unnecessary re-renders`},fixable:`code`,hasSuggestions:!0,messages:{addDependenciesArraySuggestion:`Add dependencies array: {{dependencies}}`,addDependencySuggestion:`Add '{{name}}' to dependencies array`,addMissingDependenciesSuggestion:`Add missing dependencies to array`,missingDependencies:`This hook does not specify all its dependencies. Missing: {{names}}`,missingDependenciesArray:`This hook does not specify its dependencies array. Missing: {{deps}}`,missingDependency:`This hook does not specify its dependency on {{name}}.`,removeDependencySuggestion:`Remove '{{name}}' from dependencies array`,unnecessaryDependency:`This dependency {{name}} can be removed from the list.`,unstableDependency:`{{name}} changes on every re-render. Wrap the definition in useCallback() or useMemo() to stabilize it.`},schema:[{additionalProperties:!1,properties:{hooks:{default:[],description:`Array of custom hook entries to check for exhaustive dependencies`,items:{additionalProperties:!1,properties:{name:{description:`The name of the hook`,type:`string`},closureIndex:{description:`Index of the closure argument for dependency validation`,type:`number`},dependenciesIndex:{description:`Index of the dependencies array for validation`,type:`number`},stableResult:{description:`Specify stable results: true (whole result), number (array index), number[] (multiple indices), or string[] (object properties)`,oneOf:[{type:`boolean`},{type:`number`},{items:{type:`number`},type:`array`},{items:{type:`string`},type:`array`}]}},required:[`name`],type:`object`},type:`array`},reportMissingDependenciesArray:{default:!0,description:`Report when the dependencies array is completely missing`,type:`boolean`},reportUnnecessaryDependencies:{default:!0,description:`Report when unnecessary dependencies are specified`,type:`boolean`},reportUnnecessaryStableDependencies:{default:!1,description:`Report when stable values (useRef, useState setter, etc.) are included as dependencies`,type:`boolean`},resolveExpressionDependencies:{default:!0,description:"Recognize expression dependencies like `value !== undefined` as covering a capture",type:`boolean`}},type:`object`}],type:`problem`}}),dT=/^use[A-Z]/u;function fT(e){return dT.test(e)}function pT(e){return t.isObject(e)?e:{}}function mT(e){if((e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)&&e.id!==null)return S(e.id.name)||fT(e.id.name);let{parent:t}=e;return t.type===`VariableDeclarator`&&T(t.id)?S(t.id.name)||fT(t.id.name):t.type===`Property`&&T(t.key)||t.type===`MethodDefinition`&&T(t.key)?S(t.key.name)||fT(t.key.name):!1}function hT(e){let t=N(e);return t!==void 0&&fT(t)}function gT(e){let t=e.parent,n=!1;for(let r=0;r<20&&t!==null&&!k(t);r+=1){if(t.type===`TryStatement`){let r=e;for(;r!==null&&r!==t;){if(r===t.finalizer){n=!0;break}r=r.parent}break}t=t.parent}return n}function _T(e,t){return t!==void 0&&e.callee.type===`Identifier`&&`name`in e.callee&&e.callee.name===t}function vT(e,t){return{afterEarlyReturn:!1,functionDepth:t,inConditional:!1,inLoop:!1,inNestedFunction:!1,inTryBlock:!1,isComponentOrHook:!1,...e}}function yT(e){if(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)return e.id?.name??void 0}function bT(e){return T(e)?e.name:void 0}function xT(e,t,n,r){if(n===void 0||Object.keys(n).length===0)return!1;let i=ST(t,n);if(i!==void 0)return i;let a=t.callee.type===`Identifier`?r.get(e):void 0;return a!==void 0&&n[a]===!1||(a!==void 0&&n[a],!1)}function ST(e,t){if(e.callee.type!==`MemberExpression`)return;let n=bT(e.callee.object);if(n!==void 0&&t[n]===!1)return!0;if(n!==void 0&&t[n]===!0)return!1}const CT=y(`use-hook-at-top-level`,`react`,{create(e){let t=pT(e.options[0]),n=[],r=[],i,a=new Map;function o(){return n.length>0?n.at(-1):void 0}function s(e){n.push(e)}function c(){n.pop()}function l(e){let t=o();t!==void 0&&(n[n.length-1]={...t,...e})}function u(e,n){let{ignoreHooks:r,importSources:i,onlyHooks:o}=t;return o!==void 0&&o.length>0?!o.includes(e):r?.includes(e)===!0||xT(e,n,i,a)}function d(e){let t=o(),n=t===void 0?0:t.functionDepth+1,a=mT(e);r.push(i);let c=yT(e);c!==void 0&&(i=c),t?.isComponentOrHook===!0?s(vT({functionDepth:n,inNestedFunction:!0},n)):a&&s(vT({functionDepth:n,isComponentOrHook:!0},n))}function f(){o()!==void 0&&c(),i=r.pop()}return{ArrowFunctionExpression:d,"ArrowFunctionExpression:exit":f,CallExpression(t){if(!hT(t))return;let n=N(t);if(n===void 0||u(n,t))return;let r=o();if(!(r===void 0||!r.isComponentOrHook&&!r.inNestedFunction||gT(t))){if(_T(t,i)){e.report({messageId:`recursiveHookCall`,node:t});return}if(r.inNestedFunction){e.report({messageId:`nestedFunction`,node:t});return}if(r.inConditional){e.report({messageId:`conditionalHook`,node:t});return}if(r.inLoop){e.report({messageId:`loopHook`,node:t});return}if(r.inTryBlock){e.report({messageId:`tryBlockHook`,node:t});return}r.afterEarlyReturn&&e.report({messageId:`afterEarlyReturn`,node:t})}},ConditionalExpression(){l({inConditional:!0})},"ConditionalExpression:exit"(){l({inConditional:!1})},DoWhileStatement(){l({inLoop:!0})},"DoWhileStatement:exit"(){l({inLoop:!1})},ForInStatement(){l({inLoop:!0})},"ForInStatement:exit"(){l({inLoop:!1})},ForOfStatement(){l({inLoop:!0})},"ForOfStatement:exit"(){l({inLoop:!1})},ForStatement(){l({inLoop:!0})},"ForStatement:exit"(){l({inLoop:!1})},FunctionDeclaration:d,"FunctionDeclaration:exit":f,FunctionExpression:d,"FunctionExpression:exit":f,IfStatement(){l({inConditional:!0})},"IfStatement:exit"(){l({inConditional:!1})},ImportDeclaration(e){if(t.importSources===void 0||Object.keys(t.importSources).length===0)return;let n=e.source.value;for(let t of e.specifiers)t.type===`ImportSpecifier`&&T(t.imported)&&fT(t.imported.name)&&a.set(t.local.name,n)},LogicalExpression(){l({inConditional:!0})},"LogicalExpression:exit"(){l({inConditional:!1})},"ReturnStatement:exit"(){l({afterEarlyReturn:!0})},SwitchStatement(){l({inConditional:!0})},"SwitchStatement:exit"(){l({inConditional:!1})},TryStatement(){l({inTryBlock:!0})},"TryStatement:exit"(){l({inTryBlock:!1})},WhileStatement(){l({inLoop:!0})},"WhileStatement:exit"(){l({inLoop:!1})}}},meta:{docs:{description:`Enforce that React hooks are only called at the top level of components or custom hooks, never conditionally or in nested functions`,recommended:!0},messages:{afterEarlyReturn:`This hook is being called after an early return. Hooks must be called unconditionally and in the same order every render.`,conditionalHook:`This hook is being called conditionally. All hooks must be called in the exact same order in every component render.`,loopHook:`This hook is being called inside a loop. All hooks must be called in the exact same order in every component render.`,nestedFunction:`This hook is being called from a nested function. All hooks must be called unconditionally from the top-level component.`,recursiveHookCall:`This hook is being called recursively. Recursive calls require a condition to terminate, which violates hook rules.`,tryBlockHook:`This hook is being called inside a try block. Hooks must be called unconditionally at the top level.`},schema:[{additionalProperties:!1,properties:{ignoreHooks:{description:`Hook names that should be ignored even when they match the hook naming pattern.`,items:{type:`string`},type:`array`},importSources:{additionalProperties:{type:`boolean`},description:`Import sources or namespace names mapped to whether their hooks should be checked.`,type:`object`},onlyHooks:{description:`If set, only these hook names are checked.`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}}),wT={bannedClasses:new Map,bannedProperties:new Map};function TT(e){return e.type===`JSXIdentifier`?e.name:e.name.name}function ET(e){let t=new Map;if(M(e)){for(let n of e)t.set(n.toLowerCase(),{message:``,originalName:n});return t}if(Ei(e))for(let[n,r]of Object.entries(e))t.set(n.toLowerCase(),{message:r,originalName:n});return t}function DT(e){let n=new Map;if(e===void 0||!t.isObject(e))return n;for(let[r,i]of Object.entries(e)){if(!t.isObject(i))continue;let e=new Map;for(let[n,r]of Object.entries(i))t.isString(r)&&e.set(n.toLowerCase(),{message:r,propertyName:n});e.size>0&&n.set(r.toLowerCase(),e)}return n}function OT(e){if(!t.isObject(e))return wT;let{bannedInstances:n,bannedProperties:r}=e;return{bannedClasses:ET(n),bannedProperties:DT(r)}}function kT(e){let t=e;for(;t.upper!==null&&t.type!==`function`&&t.type!==`module`&&t.type!==`global`;)t=t.upper;return t}function AT(e){if(!Ne(e,`Instance`))return;let[n]=e.arguments;if(!(n?.type!==`Literal`||!t.isString(n.value)))return n.value}const jT=y(`ban-instances`,`roblox`,{create(e){let t=OT(e.options[0]);if(t.bannedClasses.size===0&&t.bannedProperties.size===0)return{};let{sourceCode:n}=e,{bannedClasses:r,bannedProperties:i}=t,a=new Map;function o(t,n){if(n.message!==``){e.report({data:{className:n.originalName,customMessage:n.message},messageId:`bannedInstanceCustom`,node:t});return}e.report({data:{className:n.originalName},messageId:`bannedInstance`,node:t})}function s(t,n,r){if(r.message!==``){e.report({data:{className:n,customMessage:r.message,propertyName:r.propertyName},messageId:`bannedPropertyCustom`,node:t});return}e.report({data:{className:n,propertyName:r.propertyName},messageId:`bannedProperty`,node:t})}function c(e){if(e.id.type!==`Identifier`||e.init===null)return;let t=m(e.init);if(t.type!==`NewExpression`)return;let r=AT(t);if(r===void 0)return;let i=_(n.getScope(e),e.id.name);i!==void 0&&a.set(i,{className:r,classNameKey:r.toLowerCase(),functionScope:kT(i.scope)})}function l(e){let t=n.getScope(e),r=_(t,e.name);if(r===void 0)return;let i=a.get(r);if(i!==void 0)return i.functionScope===kT(t)?i:void 0}return{AssignmentExpression(e){if(e.left.type!==`MemberExpression`)return;let t=g(e.left);if(t===void 0)return;let n=m(e.left.object);if(n.type!==`Identifier`)return;let r=l(n);if(r===void 0)return;let a=i.get(r.classNameKey);if(a===void 0)return;let o=a.get(t.toLowerCase());o!==void 0&&s(e.left,r.className,o)},JSXOpeningElement(e){if(e.name.type!==`JSXIdentifier`)return;let{name:t}=e.name,n=t.charAt(0);if(n!==n.toLowerCase())return;let a=t.toLowerCase(),c=r.get(a);c!==void 0&&o(e,c);let l=i.get(a);if(l!==void 0)for(let n of e.attributes){if(n.type!==`JSXAttribute`)continue;let e=TT(n.name);if(e===void 0)continue;let r=l.get(e.toLowerCase());r!==void 0&&s(n,t,r)}},NewExpression(e){let t=AT(e);if(t===void 0)return;let n=r.get(t.toLowerCase());n!==void 0&&o(e,n)},VariableDeclarator(e){c(e)}}},meta:{docs:{description:`Ban specified Roblox Instance classes and configured Instance properties.`},messages:{bannedInstance:`Instance class '{{className}}' is banned by project configuration. This class may cause performance issues, is deprecated, or has a better alternative. Check project guidelines for the recommended replacement.`,bannedInstanceCustom:`{{customMessage}}`,bannedProperty:`Property '{{propertyName}}' on Instance class '{{className}}' is banned by project configuration. This property may cause performance issues, is deprecated, or has a better alternative. Check project guidelines for the recommended replacement.`,bannedPropertyCustom:`{{customMessage}}`},schema:[{additionalProperties:!1,properties:{bannedInstances:{description:`Map of banned class names to custom messages, or an array of class names.`,oneOf:[{items:{type:`string`},type:`array`},{additionalProperties:{type:`string`},type:`object`}]},bannedProperties:{additionalProperties:{additionalProperties:{type:`string`},type:`object`},description:`Map of banned class names to maps of banned property names and custom messages.`,type:`object`}},type:`object`}],type:`problem`}}),MT={baseThreshold:10,errorThreshold:25,interfacePenalty:20,performanceMode:!0};function NT({callee:e}){return e.type===`MemberExpression`&&e.object.type===`Identifier`&&e.object.name===`Ianitor`}function PT(e){if(e.type!==`TSTypeReference`)return e;let{typeArguments:t,typeName:n}=e;return n.type!==`Identifier`||n.name!==`Readonly`?e:t?.params[0]??e}function FT(e){let t=PT(e);if(t.type!==`TSTypeReference`)return;let{typeArguments:n,typeName:r}=t;if(r.type!==`TSQualifiedName`)return;let{left:i,right:a}=r;if(i.type!==`Identifier`||i.name!==`Ianitor`||a.name!==`Static`)return;let o=n?.params[0];if(o?.type!==`TSTypeQuery`)return;let{exprName:s}=o;return s.type===`Identifier`?s.name:void 0}function IT(e){let t=PT(e);if(t.type!==`TSTypeReference`)return!1;let{typeArguments:n,typeName:r}=t;if(r.type!==`TSQualifiedName`)return!1;let{left:i,right:a}=r;return i.type!==`Identifier`||i.name!==`Ianitor`||a.name!==`Static`?!1:n?.params[0]?.type===`TSTypeQuery`}function LT(e){let{callee:t}=e;if(t.type!==`MemberExpression`||t.property.type!==`Identifier`)return 0;switch(t.property.name){case`array`:case`instanceIsA`:case`instanceOf`:case`optional`:return 2;case`boolean`:case`number`:case`string`:return 1;case`interface`:case`strictInterface`:{let[t]=e.arguments;return t?.type===`ObjectExpression`?10+t.properties.length*3:0}case`intersection`:case`union`:return e.arguments.length*2;case`map`:case`record`:return 3;default:return 1}}function Y(e,t,n,r){let i=e+t;return n.performanceMode?Math.min(i,r):i}function RT(e,t,n,r,i,a,o,s=0){return Y(e,X(t,n,r,i,a,o)+s,r,o)}function zT(e,t,n,r,i,a,o){let s=e;for(let e of t){if(!(`typeAnnotation`in e))continue;let{typeAnnotation:t}=e;t?.type===`TSTypeAnnotation`&&(s=RT(s,t.typeAnnotation,n,r,i,a,o))}return s}function BT(e,t,n,r,i,a,o,s,c){if(`types`in t){let l=e,{types:u}=t;for(let e of u)l=RT(l,e,n,r,i,a,o);return Y(l,s*(u.length+c),r,o)}return e}function VT(e,t){let n=t.get(e);if(n!==void 0)return n;let r=Math.log2(e+1);return t.set(e,r),r}function X(e,t,n,r,i,a){let o=r.nodeCache.get(e);if(o!==void 0)return o;if(r.visitedNodes.has(e))return 50;r.visitedNodes.add(e);let s=0,c=t+1;switch(e.type){case`TSAnyKeyword`:case`TSNeverKeyword`:case`TSUnknownKeyword`:break;case`TSArrayType`:if(`elementType`in e){let{elementType:t}=e;s=Y(X(t,c,n,r,i,a),1,n,a);break}s=1;break;case`TSBigIntKeyword`:case`TSBooleanKeyword`:case`TSNullKeyword`:case`TSNumberKeyword`:case`TSStringKeyword`:case`TSSymbolKeyword`:case`TSUndefinedKeyword`:case`TSVoidKeyword`:s=1;break;case`TSConditionalType`:{let{checkType:t,extendsType:o,falseType:l,trueType:u}=e;s=Y(Y(3,X(t,c,n,r,i,a),n,a),X(o,c,n,r,i,a),n,a),s=Y(Y(s,X(u,c,n,r,i,a),n,a),X(l,c,n,r,i,a),n,a);break}case`TSFunctionType`:case`TSMethodSignature`:{s=2;let{params:t}=e;for(let e of t){if(!(`typeAnnotation`in e))continue;let{typeAnnotation:t}=e;t?.type===`TSTypeAnnotation`&&(s=Y(s,X(t.typeAnnotation,c,n,r,i,a),n,a))}if(`returnType`in e){let{returnType:t}=e;t?.type===`TSTypeAnnotation`&&(s=Y(s,X(t.typeAnnotation,c,n,r,i,a),n,a))}break}case`TSInterfaceDeclaration`:{s=n.interfacePenalty;let{body:t,extends:o}=e;o.length>0&&(s=Y(s,o.length*5,n,a));let l=t.body;s=Y(s,l.length*2,n,a),s=zT(s,l,c,n,r,i,a);break}case`TSIntersectionType`:s=BT(s,e,c,n,r,i,a,3,0);break;case`TSMappedType`:{let{constraint:t,typeAnnotation:o}=e;s=RT(5,t,c,n,r,i,a),o!==null&&(s=RT(s,o,c,n,r,i,a));break}case`TSTupleType`:{let{elementTypes:t}=e;s=1;for(let e of t)e.type!==`TSRestType`&&e.type!==`TSOptionalType`&&(s=RT(s,e,c,n,r,i,a));s=Y(s,1.5*t.length,n,a);break}case`TSTypeLiteral`:{let{members:t}=e;s=2+t.length*.5,s=zT(s,t,c,n,r,i,a);break}case`TSTypeReference`:{s=2;let{typeArguments:t}=e,o=t?.params??[];for(let e of o)s=RT(s,e,c,n,r,i,a,2);break}case`TSUnionType`:s=BT(s,e,c,n,r,i,a,2,-1);break;default:s=1}return s*=VT(t,i),r.nodeCache.set(e,s),r.visitedNodes.delete(e),s}const HT=y(`enforce-ianitor-check-type`,`roblox`,{create(e){let t=e.options[0],n={...MT,...t},r={nodeCache:new WeakMap,visitedNodes:new WeakSet},i=new Set,a=new Map,o=n.errorThreshold*2,s=!1,c=new Map,l=new Map,u=new Map;return{Identifier(e){e.name===`Ianitor`&&(s=!0)},"Program:exit"(){if(s){for(let[t,n]of l)e.report({data:{score:n.complexity.toFixed(1)},messageId:`missingIanitorCheckType`,node:t});for(let[t]of c)e.report({data:{name:t.id.name},messageId:`complexInterfaceNeedsCheck`,node:t});for(let[t,n]of u){let{id:r}=t;r.type===`Identifier`&&i.has(r.name)||e.report({data:{score:n.complexity.toFixed(1)},messageId:`missingIanitorCheckType`,node:r})}}},TSInterfaceDeclaration(e){let t=X(e,0,n,r,a,o);t<n.interfacePenalty||c.set(e,{complexity:t})},TSTypeAliasDeclaration(e){let t=FT(e.typeAnnotation);if(t!==void 0&&(s=!0,i.add(t)),IT(e.typeAnnotation))return;let c=X(e.typeAnnotation,0,n,r,a,o);c<n.baseThreshold||l.set(e,{complexity:c})},VariableDeclarator(e){let{id:t,init:r}=e;if(r?.type!==`CallExpression`||!NT(r)||(s=!0,t.type===`Identifier`&&t.typeAnnotation!==void 0&&t.typeAnnotation!==null))return;let i=LT(r);i<n.baseThreshold||u.set(e,{complexity:i})}}},meta:{docs:{description:`Enforce Ianitor.Check<T> type annotations on complex TypeScript types`,recommended:!0},messages:{complexInterfaceNeedsCheck:`Interface '{{name}}' requires Ianitor.Check<T> annotation (interfaces always need explicit checking)`,missingIanitorCheckType:`Complex type (score: {{score}}) requires Ianitor.Check<T> annotation for type safety`},schema:[{additionalProperties:!1,properties:{baseThreshold:{default:MT.baseThreshold,description:`Minimum complexity score before missing Ianitor.Check<T> annotations are reported.`,minimum:1,type:`number`},errorThreshold:{default:MT.errorThreshold,description:`Complexity score used to cap recursive analysis before reporting is determined.`,minimum:1,type:`number`},interfacePenalty:{default:MT.interfacePenalty,description:`Complexity penalty applied when an Ianitor validator builds an interface-like shape.`,minimum:1,type:`number`},performanceMode:{default:MT.performanceMode,description:`Whether repeated type nodes are cached during complexity analysis.`,type:`boolean`}},type:`object`}],type:`problem`}});function UT(e){return e.type===`Identifier`||e.type===`PrivateIdentifier`||Z(e)}function Z(e){let t=m(e);return t.type===`Identifier`||Xe(t)?!0:D(t)?WT(t):xe(t)?t.operator!==`delete`&&Z(t.argument):Se(t)||Ce(t)?GT(t):we(t)?KT(t):Ge(t)?YT(t.expressions):He(t)?qT(t):Ue(t)?JT(t):Te(t)?YT(t.expressions):Ie(t)}function WT(e){return e.optional||e.object.type===`Super`||!Z(e.object)?!1:!e.computed||Z(e.property)}function GT(e){return Z(e.left)&&Z(e.right)}function KT(e){return Z(e.test)&&Z(e.consequent)&&Z(e.alternate)}function qT(e){for(let t of e.elements)if(t!==null&&(t.type===`SpreadElement`||!Z(t)))return!1;return!0}function JT(e){for(let t of e.properties)if(t.type===`SpreadElement`||t.kind!==`init`||t.method||t.computed&&!UT(t.key)||!Z(t.value))return!1;return!0}function YT(e){for(let t of e)if(!Z(t))return!1;return!0}const XT={environment:`roblox-ts`,requireExplicitGenericOnNewArray:!0};function ZT(e){return e.type===`Identifier`}function QT(e,t){let n=m(t.callee);return!ZT(n)||n.name!==`Array`?!1:!v(e,n,`Array`)}function $T(e,t){if(e.type!==`TSTypeReference`||!ZT(e.typeName)||e.typeName.name!==`Array`&&e.typeName.name!==`ReadonlyArray`||e.typeArguments?.params.length!==1)return;let[n]=e.typeArguments.params;return n===void 0?void 0:t.getText(n)}const eE=/:\s*(?:Array<.+>|ReadonlyArray<.+>)\s*=/u;function tE(e){return eE.exec(e)!==null}function nE(e){if(ZT(e)||e.type===`ArrayPattern`||e.type===`ObjectPattern`)return e.typeAnnotation??void 0}function rE(e,t){let{parent:n}=e;if(C(n)&&n.init===e){let e=nE(n.id);return e!==void 0&&$T(e.typeAnnotation,t)!==void 0}return Ye(n)&&n.right===e?tE(t.getText(n)):De(n)&&n.value===e&&n.typeAnnotation!==void 0&&n.typeAnnotation!==null?$T(n.typeAnnotation.typeAnnotation,t)!==void 0:Je(n)&&n.expression===e||qe(n)&&n.expression===e?$T(n.typeAnnotation,t)!==void 0:!1}function iE(e){if(e===void 0)return!1;let{typeAnnotation:t}=e;return t.type!==`TSTypeReference`||!ZT(t.typeName)?!1:t.typeName.name===`ReadonlyArray`}function aE(e){let n=m(e);return Ie(n)&&`value`in n?!t.isNumber(n.value):He(n)||Ue(n)||Le(n)||Me(n)||Pe(n)?!0:Ge(n)?n.expressions.length===0:xe(n)?n.operator===`void`||n.operator===`typeof`&&!n.prefix:!1}function oE(e,t){let n=m(e);if(!(!_e(n)||n.optional)&&!(!D(n.callee)||n.callee.optional)&&!(!ZT(n.callee.object)||n.callee.object.name!==t))return g(n.callee)===`push`?n:void 0}function sE(e,t,n){for(let r=t;r<e.length;r+=1){let t=e[r];if(!(t===void 0||!Ke(t))&&oE(t.expression,n)!==void 0)return!0}return!1}function cE(e,t){let n=[],r=0;for(let i of e){if(i.type===`SpreadElement`){n[r++]=`...${t.getText(i.argument)}`;continue}n[r++]=t.getText(i)}return`[${n.join(`, `)}]`}function lE(e,t,n,r,i){if(n.init===null||r.length===0)return[];let[a]=r,o=r.at(-1);if(a===void 0||o===void 0)return[];let[s]=a.range;for(;s>0;){let e=t.text[s-1];if(e===` `||e===` `){--s;continue}e===`
66
- `&&--s;break}return[e.replaceText(n.init,i),e.removeRange([s,o.range[1]])]}function uE(e,t,n){let{sourceCode:r}=e;if(t.arguments.length===0){dE(e,t,n);return}if(t.arguments.length>1){fE(e,t,n);return}pE(e,t,n,r)}function dE(e,t,n){n.requireExplicitGenericOnNewArray&&(t.typeArguments!==void 0&&t.typeArguments!==null&&t.typeArguments.params.length>0||rE(t,e.sourceCode)||e.report({messageId:`requireExplicitGenericOnNewArray`,node:t}))}function fE(e,t,n){let[r]=t.arguments;if(r===void 0||r.type!==`SpreadElement`&&n.environment===`roblox-ts`&&!aE(r))return;let i=cE(t.arguments,e.sourceCode);if(!t.arguments.some(e=>e.type===`SpreadElement`)){e.report({fix(e){return e.replaceText(t,i)},messageId:`avoidConstructorEnumeration`,node:t});return}e.report({messageId:`avoidConstructorEnumeration`,node:t,suggest:[{fix(e){return e.replaceText(t,i)},messageId:`suggestArrayLiteral`}]})}function pE(e,t,n,r){let[i]=t.arguments;if(i===void 0)return;if(i.type===`SpreadElement`){mE(e,t,r.getText(i.argument));return}if(!aE(i)){hE(e,t,n,r.getText(i));return}let a=`[${r.getText(i)}]`;e.report({fix(e){return e.replaceText(t,a)},messageId:`avoidSingleArgumentConstructor`,node:t})}function mE(e,t,n){e.report({messageId:`avoidSingleArgumentConstructor`,node:t,suggest:[{fix(e){return e.replaceText(t,`[...${n}]`)},messageId:`suggestArrayLiteral`}]})}function hE(e,t,n,r){n.environment!==`roblox-ts`&&e.report({messageId:`avoidLengthConstructorInStandard`,node:t,suggest:[{fix(e){return e.replaceText(t,`Array.from({ length: ${r} })`)},messageId:`suggestArrayFromLength`}]})}function gE(e,t,n){let r=t[n];if(r===void 0||!Ae(r)||r.kind!==`const`&&r.kind!==`let`||r.declarations.length!==1)return;let[i]=r.declarations;if(i===void 0||!ZT(i.id)||i.init===null||!Ve(i.init)||!QT(e,i.init)||i.init.arguments.length>0||iE(nE(i.id)))return;let a=i.id.name,o=_E(e,t,n+1,a);if(o.pushStatements.length!==0&&!sE(t,o.nextIndex,a))return{arrayIdentifierName:a,declarator:i,hasUnsafeArgument:o.hasUnsafeArgument,literalText:`[${o.argumentParts.join(`, `)}]`,pushStatements:o.pushStatements,statement:r}}function _E(e,t,n,r){let i=[],a=[],o=!1,s=n;for(;s<t.length;){let n=t[s];if(n===void 0||!Ke(n))break;let c=oE(n.expression,r);if(c===void 0||c.arguments.length===0)break;i.push(n),o=vE(e,c,a)||o,s+=1}return{argumentParts:a,hasUnsafeArgument:o,nextIndex:s,pushStatements:i}}function vE(e,t,n){let r=!1;for(let i of t.arguments){if(i.type===`SpreadElement`){r=!0,n.push(`...${e.getText(i.argument)}`);continue}Z(i)||(r=!0),n.push(e.getText(i))}return r}const yE=y(`no-array-constructor-elements`,`roblox`,{create(e){let[n]=e.options,r=t.isObject(n)?{...XT,...n}:{...XT},{sourceCode:i}=e;function a(t){for(let n=0;n<t.length;n+=1){let r=gE(i,t,n);if(r!==void 0){if(!r.hasUnsafeArgument){e.report({fix(e){return lE(e,i,r.declarator,r.pushStatements,r.literalText)},messageId:`collapseArrayPushInitialization`,node:r.statement});continue}e.report({messageId:`collapseArrayPushInitialization`,node:r.statement,suggest:[{fix(e){return lE(e,i,r.declarator,r.pushStatements,r.literalText)},messageId:`suggestCollapseArrayPushInitialization`}]})}}}return{BlockStatement(e){a(e.body)},NewExpression(t){QT(i,t)&&uE(e,t,r)},Program(e){a(e.body)}}},meta:{docs:{description:`Disallow array constructor element forms and enforce roblox-ts-aware constructor patterns.`},fixable:`code`,hasSuggestions:!0,messages:{avoidConstructorEnumeration:`Do not use Array constructor enumeration arguments. Use an array literal instead.`,avoidLengthConstructorInStandard:`Length-based Array constructor is not allowed in standard mode. Prefer Array.from({ length: n }).`,avoidSingleArgumentConstructor:`Single-argument Array constructor form is not allowed here. Use an array literal instead.`,collapseArrayPushInitialization:`Collapse new Array<T>() + consecutive .push(...) calls into a single array literal initializer.`,requireExplicitGenericOnNewArray:`new Array() must use an explicit generic argument or a contextual Array<T>/ReadonlyArray<T> annotation.`,suggestArrayFromLength:`Replace with Array.from({ length: value }).`,suggestArrayLiteral:`Replace constructor form with an array literal.`,suggestCollapseArrayPushInitialization:`Collapse constructor + push sequence into a single array literal initializer.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`Array constructor environment mode: 'roblox-ts' allows new Array(length); 'standard' reports it.`,enum:[`roblox-ts`,`standard`],type:`string`},requireExplicitGenericOnNewArray:{default:!0,description:`When true, zero-argument new Array() requires explicit generic type arguments or contextual array typing.`,type:`boolean`}},type:`object`}],type:`problem`}}),bE=new Set([`comments`,`loc`,`parent`,`range`,`tokens`]);function xE(e){return e.type===`Identifier`}function SE(e){return t.isObject(e)&&t.isString(e.type)}function CE(e,t){for(let[n,r]of Object.entries(e))bE.has(n)||r!=null&&t.push(r)}function wE(e,n){let r=[e];for(;r.length>0;){let e=r.pop();if(Array.isArray(e)){for(let t of e)r.push(t);continue}if(t.isObject(e)&&SE(e)){if(e.type===`Identifier`&&e.name===n)return!0;CE(e,r)}}return!1}function TE(e,t){let n=m(t.callee);return!xE(n)||n.name!==`Array`?!1:!v(e,n,`Array`)}function EE(e,t,n){if(!Ke(e))return;let{expression:r}=e;if(!be(r)||r.operator!==`=`)return;let{left:i}=r;if(!D(i)||!i.computed)return;let{object:a,property:o}=i;if(!(!xE(a)||a.name!==t)&&!(!Be(o)||o.value!==n))return{expression:r,statement:e}}function DE(e,t,n){let r=t[n];if(r===void 0||!Ae(r)||r.declarations.length!==1)return;let[i]=r.declarations;if(i===void 0||!C(i)||i.init===null)return;let{init:a}=i;if(!Ve(a)||a.arguments.length>0||!TE(e,a)||!Qe(i.id))return;let o=i.id.name,s=[],c=n+1,l=0;for(;c<t.length;){let e=t[c];if(e===void 0)break;let n=EE(e,o,l);if(n!==void 0){s.push(n),l+=1,c+=1;continue}if(wE(e,o))break;c+=1}if(s.length===0)return;let[u]=s,d=s.at(-1);if(u!==void 0&&d!==void 0)return{assignments:s.map(t=>({statement:t.statement,valueText:e.getText(t.expression.right)})),declaration:r,declarator:i,firstAssignmentStatement:u.statement,lastAssignmentStatement:d.statement}}function OE(e,t,{assignments:n,declaration:r,declarator:i,firstAssignmentStatement:a,lastAssignmentStatement:o}){let{init:s}=i;if(s===null)return[];let c=`[${n.map(e=>e.valueText).join(`, `)}]`,l=[e.replaceText(s,c)],[u]=r.range,[,d]=r.range,[f]=a.range,[,p]=o.range,m=t.text.slice(d,f);if(m.trim().length>0){let n=u;n>0&&t.text[n-1]===`
90
+ }`)]},messageId:`wrapCaseBody`,node:r})}}},meta:{docs:{description:`Require braces around switch case bodies selected by line span or statement count.`},fixable:`code`,messages:{wrapCaseBody:`Wrap this switch case body in braces.`},schema:[{additionalProperties:!1,properties:{metric:{default:`lines`,description:`Whether to report cases by line span or by statement count.`,enum:[`lines`,`statements`],type:`string`}},type:`object`}],type:`problem`}});function wd(e){let t=e.parent;for(;t!==null;){switch(t.type){case`ArrowFunctionExpression`:return Td(t);case`FunctionDeclaration`:return t.id?.name;case`FunctionExpression`:return t.id?t.id.name:Td(t)}t=t.parent}}function Td({parent:e}){if(e?.type===`VariableDeclarator`&&e.id.type===`Identifier`)return e.id.name;if(e?.type===`PropertyDefinition`||e?.type===`MethodDefinition`){if(e.key.type===`PrivateIdentifier`)return`#${e.key.name}`;if(e.key.type===`Identifier`)return e.key.name}}function Ed(e){let t=e.parent;for(;t!==null;){switch(t.type){case`ArrowFunctionExpression`:return t.parent.type===`PropertyDefinition`&&t.parent.parent.type===`ClassBody`;case`FunctionDeclaration`:return!1;case`FunctionExpression`:return(t.parent.type===`MethodDefinition`||t.parent.type===`PropertyDefinition`)&&t.parent.parent.type===`ClassBody`}t=t.parent}return!1}function Dd(e,t,n){try{let r=e.getScope(t),i=new Set(r.variables.map(e=>e.name)),a=t.parent;for(;a!==null;)a.type===`CatchClause`&&a.param?.type===`Identifier`&&i.add(a.param.name),a=a.parent;if(!i.has(n))return n;for(let e=2;e<100;e+=1){let t=`${n}${e}`;if(!i.has(t))return t}}catch{}return n}function Od(e,t){try{let n=e.getScope(t);for(;n!==null;){let e=n.set.get(t.name);if(e!==void 0){let t=e.defs.find(e=>e.type===`ImportBinding`);return t?.parent?.type===`ImportDeclaration`?t.parent.source.value:void 0}n=n.upper}}catch{}}function kd(e,t){try{let n=e.getScope(t);for(;n!==null;){if(n.set.has(t.name))return!0;n=n.upper}}catch{}return!1}function Ad(e,n){return t.isString(e)?n===e:(Array.isArray(e.name)?e.name:[e.name]).includes(n)}function jd(e,n,r,i){if(!Ad(i,r.name))return!1;if(t.isString(i))return!0;switch(i.from){case`file`:return kd(e,r)&&Od(e,r)===void 0?i.path===void 0?!0:n===`<input>`||n===`<text>`?!1:n.endsWith(i.path):!1;case`library`:return e.isGlobalReference(r);case`package`:return Od(e,r)===i.package;case void 0:return!0;default:return!1}}function Md(e,t,n,r){return r.some(r=>jd(e,t,n,r))}const Nd=b(`require-throw-error-capture`,`general`,{create(e){let{sourceCode:t}=e,n=e.options[0]?.allow??[],r=e.physicalFilename??`<input>`;return{ThrowStatement(i){let{argument:a}=i;if(a.type!==`NewExpression`)return;let{callee:o}=a;if(o.type!==`Identifier`||!o.name.endsWith(`Error`)||Md(t,r,o,n))return;let s=wd(i);if(s===void 0)return;let c=Ed(i)?`this.${s}`:s;e.report({fix(e){let n=Dd(t,i,`error`),r=[`const ${n} = ${t.getText(a)};`,`Error.captureStackTrace(${n}, ${c});`,`throw ${n};`].join(`
91
+ `);return i.parent.type===`BlockStatement`?e.replaceText(i,r):e.replaceText(i,`{\n${r}\n}`)},messageId:`missingCaptureStackTrace`,node:i})}}},meta:{docs:{description:`Require 'Error.captureStackTrace' before directly throwing new Error instances in named functions.`,recommended:!1},fixable:`code`,messages:{missingCaptureStackTrace:`Call 'Error.captureStackTrace' on this error before throwing it so the stack trace points to the throw site.`},schema:[{additionalProperties:!1,properties:{allow:{description:`Error classes that do not need Error.captureStackTrace`,items:{anyOf:[{type:`string`},{additionalProperties:!1,properties:{name:{anyOf:[{type:`string`},{items:{type:`string`},type:`array`}],description:`Name(s) of the error class`},from:{description:`Where the error class is declared`,enum:[`file`,`library`,`package`],type:`string`},package:{description:`Package the error class is imported from (required when from is 'package')`,type:`string`},path:{description:`Optional file path filter for file specifiers (matched against the end of the file path)`,type:`string`}},required:[`name`],type:`object`}]},type:`array`}},type:`object`}],type:`suggestion`}});function Pd(e){return e.includes(`u`)||e.includes(`v`)}function Fd(e,t){return e.type===`Identifier`&&e.name===t}function Id(e){if(!(e.type!==`Literal`||!t.isString(e.value)))return e.value}function Ld(e){return e.type!==`SpreadElement`}const Rd=b(`require-unicode-regex`,`general`,{createOnce(e){return{CallExpression(t){if(!Fd(t.callee,`regex`))return;if(t.arguments.length<2){e.report({messageId:`requireUnicodeFlag`,node:t});return}let[,n]=t.arguments;if(n===void 0||!Ld(n))return;let r=Id(n);r!==void 0&&!Pd(r)&&e.report({messageId:`requireUnicodeFlag`,node:t})}}},meta:{docs:{description:`Require the 'u' or 'v' unicode flag on calls named regex().`},messages:{requireUnicodeFlag:`Missing the 'u' or 'v' unicode flag on this regex() call. Use the unicode flag to avoid silently creating invalid regex patterns.`},schema:[],type:`problem`}});function zd(e,t){let n=[],r=0,i=e;for(;;){if(i.type===`TSParenthesizedType`){i=i.typeAnnotation;continue}if(i.type===`TSArrayType`){n[r++]=`Array`,i=i.elementType;continue}if(i.type===`TSTypeOperator`&&i.operator===`readonly`&&i.typeAnnotation.type===`TSArrayType`){n[r++]=`ReadonlyArray`,i=i.typeAnnotation.elementType;continue}let e=t.getText(i);for(let t=n.length-1;t>=0;--t)e=`${n[t]}<${e}>`;return e}}function Bd({parent:e}){let t=e.type===`TSParenthesizedType`?e.parent:e;return(t.type!==`TSRestType`||t.parent.type!==`TSTupleType`)&&t.type!==`TSTupleType`&&t.type!==`TSArrayType`&&(t.type!==`TSTypeOperator`||t.operator!==`readonly`)}const Vd=b(`array-type-generic`,`naming`,{createOnce(e){function t(t){e.report({fix(n){return n.replaceText(t,zd(t,e.sourceCode))},messageId:`useGenericArrayType`,node:t})}return{TSArrayType(e){Bd(e)&&t(e)},TSTypeOperator(e){e.operator===`readonly`&&e.typeAnnotation.type===`TSArrayType`&&Bd(e)&&t(e)}}},meta:{docs:{description:`Disallow bracket array type syntax and require Array<T> / ReadonlyArray<T>.`},fixable:`code`,messages:{useGenericArrayType:`Bracket array type syntax is not allowed. Use Array<T> or ReadonlyArray<T> generic syntax.`},schema:[],type:`problem`}}),Hd=new Map([[`omit`,{originalName:`Omit`,replacementName:`Except`}]]);function Ud(e){let n=new Map(Hd);if(!t.isObject(e)||!(`bannedTypes`in e))return n;let{bannedTypes:r}=e;if(M(r)){for(let e of r)n.set(e.toLowerCase(),{originalName:e,replacementName:void 0});return n}if(Ei(r))for(let[e,t]of Object.entries(r))n.set(e.toLowerCase(),{originalName:e,replacementName:t});return n}function Wd(e){if(e.type===`Identifier`)return e.name;if(e.type===`TSQualifiedName`)return e.right.name}const Gd=b(`ban-types`,`naming`,{create(e){let[t]=e.options,n=Ud(t);return{TSTypeReference(t){let r=Wd(t.typeName);if(r===void 0)return;let i=n.get(r.toLowerCase());if(i!==void 0){if(i.replacementName!==void 0&&i.replacementName!==``){e.report({data:{replacementName:i.replacementName,typeName:i.originalName},messageId:`bannedTypeWithReplacement`,node:t.typeName});return}e.report({data:{typeName:i.originalName},messageId:`bannedType`,node:t.typeName})}}}},meta:{docs:{description:`Ban configured TypeScript utility types, defaulting to Omit in favor of Except.`},messages:{bannedType:`Type '{{typeName}}' is banned by project configuration. Use the project-preferred alternative for this type.`,bannedTypeWithReplacement:`Type '{{typeName}}' is banned. Use '{{replacementName}}' instead.`},schema:[{additionalProperties:!1,properties:{bannedTypes:{default:{Omit:`Except`},description:`Array of banned type names or an object mapping banned type names to preferred replacement names.`,oneOf:[{items:{type:`string`},type:`array`},{additionalProperties:{type:`string`},type:`object`}]}},type:`object`}],type:`problem`}}),Kd=new Map([[`backGround`,`background`],[`callBack`,`callback`],[`checkBox`,`checkbox`],[`clipBoard`,`clipboard`],[`codeBase`,`codebase`],[`dataBase`,`database`],[`downLoad`,`download`],[`feedBack`,`feedback`],[`foreGround`,`foreground`],[`frameWork`,`framework`],[`headLine`,`headline`],[`keyBoard`,`keyboard`],[`keyFrame`,`keyframe`],[`lifeCycle`,`lifecycle`],[`metaData`,`metadata`],[`midPoint`,`midpoint`],[`nameSpace`,`namespace`],[`overRide`,`override`],[`passWord`,`password`],[`payLoad`,`payload`],[`placeHolder`,`placeholder`],[`preView`,`preview`],[`screenShot`,`screenshot`],[`sideBar`,`sidebar`],[`subClass`,`subclass`],[`subDirectory`,`subdirectory`],[`subDomain`,`subdomain`],[`subMenu`,`submenu`],[`subProcess`,`subprocess`],[`subString`,`substring`],[`subTree`,`subtree`],[`subType`,`subtype`],[`subTitle`,`subtitle`],[`timeOut`,`timeout`],[`timeStamp`,`timestamp`],[`toolBar`,`toolbar`],[`toolKit`,`toolkit`],[`toolTip`,`tooltip`],[`touchScreen`,`touchscreen`],[`unSubscribe`,`unsubscribe`],[`underScore`,`underscore`],[`upLoad`,`upload`],[`userName`,`username`],[`viewPort`,`viewport`],[`webCam`,`webcam`],[`webHook`,`webhook`],[`webSite`,`website`],[`weekEnd`,`weekend`],[`whiteSpace`,`whitespace`],[`wildCard`,`wildcard`],[`workFlow`,`workflow`],[`workSpace`,`workspace`]]),qd=/[\\^$.*+?()[\]{}|]/gu,Jd=String.raw`(?=$|[\d_$]|\p{Uppercase_Letter})`;function Yd(e){return e.replaceAll(qd,String.raw`\$&`)}function Xd(e){let t=e.at(0);return t===void 0?e:`${t.toUpperCase()}${e.slice(1)}`}function Zd(e){let t=e.at(0);return t===void 0?e:`${t.toLowerCase()}${e.slice(1)}`}function Qd(e){return e===e.toUpperCase()}function $d(e){let t=e.at(0);return t?.toUpperCase()===t&&t!==void 0}function ef(e){if(e.size===0)return;let t=[],n=[];for(let r of e.keys())t.push(Yd(r)),n.push(Yd(Xd(r)));return RegExp(`(?:^(?:${t.join(`|`)})|(?:${n.join(`|`)}))${Jd}`,`gu`)}function tf(e,n){let r=new Map(n?Kd:void 0);if(!t.isObject(e))return r;for(let[n,i]of Object.entries(e)){if(i===!1){r.delete(n);continue}t.isString(i)&&i.length>0&&r.set(n,i)}return r}function nf(e){let n=t.isObject(e)?e:{},r=n.extendDefaultReplacements!==!1,i=tf(n.replacements,r),a=new Set;if(t.isObject(n.allowList))for(let e of Object.keys(n.allowList))a.add(e);return{allowList:a,checkProperties:n.checkProperties===!0,checkShorthandProperties:n.checkShorthandProperties===!0,checkVariables:n.checkVariables!==!1,replacementRegExp:ef(i),replacements:i}}function rf(e,t){let n=t.get(e)??t.get(Zd(e));if(n!==void 0)return $d(e)?Xd(n):Zd(n)}function af(e,{allowList:t,replacementRegExp:n,replacements:r}){if(n===void 0||Qd(e)||t.has(e))return;n.lastIndex=0;let i=e.replaceAll(n,e=>rf(e,r)??e);return i===e?void 0:i}function of(e){let{parent:t}=e;return t?.type===`Property`&&t.shorthand&&t.value===e}function sf(e){let{parent:t}=e;return t===null?!1:t.type===`Property`&&t.key===e&&!t.computed||t.type===`PropertyDefinition`&&t.key===e&&!t.computed||t.type===`MethodDefinition`&&t.key===e&&!t.computed}const cf=b(`consistent-compound-words`,`naming`,{create(e){let t=nf(e.options[0]);function n(n,r){let i=af(r,t);i!==void 0&&e.report({data:{name:r,replacement:i},messageId:`error`,node:n})}return{Identifier(e){!t.checkProperties||e.name===`__proto__`||e.parent.type===`ExportSpecifier`||!sf(e)||n(e,e.name)},"Program:exit"(){t.checkVariables&&te(e.sourceCode,e=>{if(e.defs.length===0)return;let[r]=e.defs;r===void 0||!t.checkShorthandProperties&&of(r.name)||n(r.name,e.name)})}}},meta:{docs:{description:`Enforce consistent spelling of compound words in identifiers.`,recommended:!1},messages:{error:"Prefer `{{replacement}}` over `{{name}}`.",rename:"Rename to `{{replacement}}`."},schema:[{additionalProperties:!1,properties:{allowList:{additionalProperties:{enum:[!0]},type:`object`},checkProperties:{type:`boolean`},checkShorthandProperties:{type:`boolean`},checkVariables:{type:`boolean`},extendDefaultReplacements:{type:`boolean`},replacements:{additionalProperties:{anyOf:[{enum:[!1]},{minLength:1,type:`string`}]},type:`object`}},type:`object`}],type:`suggestion`}}),lf=/\.spec\.(?:ts|tsx)$/u,uf=b(`no-spec-file-extension`,`naming`,{createOnce(e){return{Program(t){let{filename:n}=e;n.length===0||!lf.test(n)||e.report({messageId:`noSpecFileExtension`,node:t})}}},meta:{docs:{description:`Disallow the .spec.{ts,tsx} file extension for test files. Use .test.{ts,tsx} instead.`,recommended:!0},messages:{noSpecFileExtension:`Test files must use .test.ts or .test.tsx instead of .spec.ts or .spec.tsx. Rename this file to use the .test extension.`},schema:[],type:`problem`}});function df(e){return e>=`0`&&e<=`9`}function ff(e){return e>=`a`&&e<=`z`}function pf(e){return e>=`A`&&e<=`Z`}function mf(e){return df(e)||ff(e)||pf(e)}function hf(e,t,n){return df(e)!==df(t)||ff(e)&&pf(t)?!0:pf(e)&&pf(t)&&n!==void 0&&ff(n)}function gf(e,t){let n=0;for(let r=1;r<t.length;r+=1){let i=r+1<t.length?t.charAt(r+1):void 0;hf(t.charAt(r-1),t.charAt(r),i)&&(e.push(t.slice(n,r)),n=r)}e.push(t.slice(n))}function _f(e){let t=[],n;for(let r=0;r<e.length;r+=1){if(mf(e.charAt(r))){n??=r;continue}let i=e.codePointAt(r);if(i===void 0||i>127)return;n!==void 0&&(gf(t,e.slice(n,r)),n=void 0)}return n!==void 0&&gf(t,e.slice(n)),t}function vf(e){let t=_f(e);if(t===void 0)return;let n=``;for(let e of t)e.length!==0&&(n+=`${e.slice(0,1).toUpperCase()}${e.slice(1).toLowerCase()}`);return n}const yf=/^\d/u;function bf(e){if(e.id.type===`Identifier`)return e.id.name;if(!(e.id.type!==`Literal`||!t.isString(e.id.value)))return yf.test(e.id.value)?void 0:e.id.value}const xf=b(`prefer-pascal-case-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration(t){let n=t.id.name,r=vf(n);r!==void 0&&r!==n&&e.report({data:{identifier:n},messageId:`notPascalCase`,node:t.id})},TSEnumMember(t){let n=bf(t);if(n===void 0)return;let r=vf(n);r!==void 0&&r!==n&&e.report({data:{identifier:n},messageId:`notPascalCase`,node:t.id})}}},meta:{docs:{description:`Enforce PascalCase names for enums and enum members.`,recommended:!0},messages:{notPascalCase:`Enum '{{ identifier }}' uses non-standard casing. TypeScript convention requires PascalCase for enum names and members to distinguish them from variables (camelCase) and constants (UPPER_CASE). Rename to PascalCase: capitalize first letter of each word, no underscores.`},schema:[],type:`suggestion`}}),Sf=new Set([`alumni`,`axes`,`cacti`,`children`,`criteria`,`data`,`dice`,`feet`,`fungi`,`geese`,`indices`,`matrices`,`media`,`men`,`mice`,`octopi`,`people`,`phenomena`,`teeth`,`vertices`,`women`]),Cf=new Set([`alias`,`analysis`,`axis`,`basis`,`business`,`class`,`crisis`,`glass`,`news`,`series`,`species`,`status`,`thesis`]),wf=new Set([`args`,`components`,`controllers`,`dto`,`dtos`,`entries`,`enums`,`hooks`,`items`,`keys`,`models`,`options`,`orders`,`pages`,`parameters`,`params`,`props`,`repositories`,`services`,`settings`,`types`,`values`,`vo`,`vos`]),Tf=/[A-Z]+(?![a-z])|[A-Z]?[a-z]+|\d+/gu,Ef=/^[A-Z]{2,}[sS]?$/u;function Df(e){let t=[],n=0;for(let r of e.split(`_`)){let e=r.match(Tf);if(e!==null)for(let r of e)t[n++]=r}return t}const Of=/^\d+$/u;function kf(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(!(n===void 0||Of.test(n)))return{lowercased:n.toLowerCase(),original:n}}}const Af=/[sS]$/u,jf=/(?:ches|shes|xes|zes)$/u;function Mf(e,t){return Sf.has(e)||wf.has(e)?!0:Cf.has(e)?!1:Ef.test(t)&&Af.test(t)||e.endsWith(`ies`)||e.endsWith(`ves`)||jf.test(e)||e.endsWith(`s`)&&!e.endsWith(`ss`)&&!e.endsWith(`us`)&&!e.endsWith(`is`)}function Nf(e){if(Ef.test(e)&&Af.test(e))return!0;let t=kf(Df(e));return t!==void 0&&Mf(t.lowercased,t.original)}const Pf=b(`prefer-singular-enums`,`naming`,{createOnce(e){return{TSEnumDeclaration({id:t}){let{name:n}=t;Nf(n)&&e.report({data:{name:n},messageId:`notSingular`,node:t})}}},meta:{docs:{description:`Prefer singular naming for enums.`,recommended:!0},messages:{notSingular:`Enum name "{{name}}" should be singular.`},schema:[],type:`suggestion`}}),Ff=`replace`,If=`suggestion`,Lf=`A more descriptive name will do too.`,Rf={args:`parameters`,char:`character`,dt:`deltaTime`,plr:`player`},zf=[`char`],Bf={acc:{accumulator:!0},arg:{argument:!0},args:{arguments:!0},arr:{array:!0},attr:{attribute:!0},attrs:{attributes:!0},btn:{button:!0},cb:{callback:!0},char:{character:!0},conf:{config:!0},ctx:{context:!0},cur:{current:!0},curr:{current:!0},db:{database:!0},def:{defer:!0,deferred:!0,define:!0,definition:!0},dest:{destination:!0},dev:{development:!0},dir:{direction:!0,directory:!0},dirs:{directories:!0},dist:{distance:!0},doc:{document:!0},docs:{documentation:!0,documents:!0},dst:{daylightSavingTime:!0,destination:!0,distribution:!0},dt:{dateTime:!0,deltaTime:!0},e:{error:!0,event:!0},el:{element:!0},elem:{element:!0},elems:{elements:!0},env:{environment:!0},envs:{environments:!0},err:{error:!0},ev:{event:!0},evt:{event:!0},ext:{extension:!0},exts:{extensions:!0},fn:{func:!0,function:!0},func:{function:!0},i:{index:!0},idx:{index:!0},impl:{implementation:!0},j:{index:!0},len:{length:!0},lib:{library:!0},mod:{module:!0},msg:{message:!0},num:{number:!0},obj:{object:!0},opts:{options:!0},param:{parameter:!0},params:{parameters:!0},pkg:{package:!0},plr:{player:!0},prev:{previous:!0},prod:{production:!0},prop:{property:!0},props:{properties:!0},rel:{related:!0,relationship:!0,relative:!0},req:{request:!0},res:{resource:!0,response:!0,result:!0},ret:{returnValue:!0},retval:{returnValue:!0},sep:{separator:!0},src:{source:!0},stdDev:{standardDeviation:!0},str:{string:!0},tbl:{table:!0},temp:{temporary:!0},tit:{title:!0},tmp:{temporary:!0},util:{utility:!0},utils:{utilities:!0},val:{value:!0},var:{variable:!0},vars:{variables:!0},ver:{version:!0}},Vf={defaultProps:!0,devDependencies:!0,EmberENV:!0,getDerivedStateFromProps:!0,getInitialProps:!0,getServerSideProps:!0,getStaticProps:!0,iOS:!0,obj:!0,propTypes:!0,setupFilesAfterEnv:!0},Hf=[`i18n`,`l10n`],Uf=/(?=[A-Z])|(?<=[_.-])/u,Wf=new Set(`any.as.boolean.break.case.catch.class.const.constructor.continue.debugger.declare.default.delete.do.else.enum.export.extends.false.finally.for.from.function.get.if.implements.import.in.instanceof.interface.let.module.new.null.number.of.package.private.protected.public.require.return.set.static.string.super.switch.symbol.this.throw.true.try.type.typeof.var.void.while.with.yield`.split(`.`)),Gf=/^[A-Za-z]+$/u;function Kf(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95}function qf(e){return e<192?Kf(e):e>=12289&&e<=55295?!0:e<=767?e!==215&&e!==247:e<=8191?e>=880&&e!==894:e<=8591?e>=8204&&e<=8205||e>=8304:e<=12271?e>=11264:e<=64255?e>=63744:e<=65023?e>=64512:e<=65279?e>=65136:e<=65370?e>=65313&&e<=65338||e>=65345:e>=65382&&e<=65500}function Jf(e){return!!(qf(e)||e>=48&&e<=57||e===8204||e===8205||e>=768&&e<=865||e>=8240&&e<=8266)}function Yf(e){if(e.length===0||Wf.has(e))return!1;let t=e.codePointAt(0);if(t===void 0||!qf(t))return!1;let n=t>65535?2:1;for(;n<e.length;){let t=e.codePointAt(n);if(t===void 0||!Jf(t))return!1;n+=t>65535?2:1}return!0}function Xf(e){let t=[e],n=1;for(let r of e.childScopes){let e=Xf(r);for(let r of e)t[n++]=r}return t}function Zf(e,t){return t.every(t=>_(t,e)===void 0)}function Qf(e,t,n){let r=e;if(!(!Yf(r)&&(r+=`_`,!Yf(r)))){for(;!Zf(r,t)||!n(r,t);)r+=`_`;return r}}function $f(e){let t=new Set;for(let n of e.identifiers)t.add(n);for(let{identifier:n}of e.references)t.add(n);return[...t]}function ep(e,t){return e.range[0]===t.range[0]&&e.range[1]===t.range[1]}function tp(e){let{parent:t}=e;return!_e(t)||t.local!==e?!1:ep(t.local,t.imported)}function np(e){let{parent:t}=e;return!ve(t)||t.local!==e?!1:ep(t.local,t.exported)}function rp(e){if(!T(e))return!1;let{parent:t}=e;return D(t)&&t.shorthand&&t.value===e}function ip(e){if(!T(e))return!1;let{parent:t}=e;if(!Je(t)||t.left!==e)return!1;let n=t.parent;return D(n)?n.shorthand:!1}function ap(e){if(!T(e))return!1;let{parent:t}=e;if(De(t)&&t.local===e||Oe(t)&&t.local===e)return!0;if(_e(t)&&t.local===e){let{imported:e}=t;if(E(e)&&e.name==="default")return!0}return w(t)&&t.id===e&&t.init!==null&&Xe(t.init)}function op(e){if(!T(e))return!1;let{parent:t}=e;if(w(t)&&t.id===e){let e=t.parent;return ke(e)?Ae(e.parent):!1}return je(t)&&t.id===e||Ne(t)&&t.id===e||t.type===`TSTypeAliasDeclaration`&&t.id===e?Ae(t.parent):!1}function sp(e){return $f(e).every(e=>!op(e)&&!fe(e))}function cp(e,t,n){if(T(e))return rp(e)||ip(e)?n.replaceText(e,`${e.name}: ${t}`):tp(e)?n.replaceText(e,`${e.name} as ${t}`):np(e)?n.replaceText(e,`${t} as ${e.name}`):n.replaceText(e,t)}function lp(e,t,n){let r=[],i=0;for(let a of $f(e)){let e=cp(a,t,n);e!==void 0&&(r[i++]=e)}return r}function up(e){if(!T(e))return!1;let{parent:t}=e;if(O(t)&&t.property===e&&!t.computed){let e=t.parent;if(ye(e)&&e.left===t)return!0}return D(t)&&t.key===e&&!t.computed&&!t.shorthand&&(He(t.parent)||Ue(t.parent))||Pe(t)&&t.key===e&&!t.computed||ve(t)&&t.exported===e&&t.local!==e?!0:(Te(t)||Ee(t))&&t.key===e&&!t.computed}function dp(e){if(!T(e))return!1;let{parent:t}=e;return D(t)&&t.key===e&&!t.computed&&!t.shorthand&&(He(t.parent)||Ue(t.parent))}function fp(e){if(e.type===`ImportBinding`){let{parent:t}=e;if(t!==null&&me(t)&&he(t.source))return t.source.value}else if(e.type===`Variable`){let{node:t}=e;if(w(t)&&t.init!==null&&Xe(t.init)){let[e]=t.init.arguments;if(e!==void 0&&he(e))return e.value}}}function pp(e){let t=fp(e);return t!==void 0&&!t.includes(`node_modules`)&&(t.startsWith(`.`)||t.startsWith(`/`))}function mp(e,t){return e===!1?!1:e!==`internal`||pp(t)}function hp(e){return e.defs.length===1&&e.defs[0]?.type===`ClassName`}const gp=/^(?:[#$./]|[~@]\/)/u;function _p(e){return!gp.test(e)}function vp(e){if(e?.type!==`ImportBinding`)return!1;let{parent:t}=e;return t===null||!me(t)||!he(t.source)?!1:_p(t.source.value)}function yp(e){let t=e;for(;t.type===`TSQualifiedName`;)t=t.left;return t.type===`Identifier`?t:void 0}function bp(e,t){return xp(e,t,new Set)}function xp(e,t,n){let r=e;for(;r.type===`TSIndexedAccessType`;)r=r.objectType;if(r.type===`TSImportType`)return _p(r.source.value);if(r.type===`TSTypeReference`){let e=yp(r.typeName);return e!==void 0&&Sp(e.name,t.getScope(e),r.typeArguments,t,n)}return r.type===`TSUnionType`||r.type===`TSIntersectionType`?r.types.some(e=>xp(e,t,n)):!1}function Sp(e,t,n,r,i){let a=_(t,e)?.defs[0];if(vp(a))return!0;if(a===void 0)return n!==null&&n.params.some(e=>xp(e,r,i));let o=a.node;return o.type===`TSTypeAliasDeclaration`?!i.has(o)&&(i.add(o),xp(o.typeAnnotation,r,i)):o.type===`TSInterfaceDeclaration`&&o.extends.some(e=>Cp(e,r,i))}function Cp(e,t,n){let r=Tp(e.expression);return r===void 0||!T(r)?!1:Sp(r.name,t.getScope(r),e.typeArguments,t,n)}function wp(e){let{parent:t}=e;if(w(t)&&t.init===e)return ae(t.id)?.typeAnnotation;if((t.type===`TSAsExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`)&&t.expression===e)return t.typeAnnotation}function Tp(e){let t=e;for(;;){if(E(t))return t;if(O(t)){t=t.object;continue}if(Re(t)){t=t.left;continue}return}}function Ep(e,t){let{parent:n}=e,r;if(O(n)&&n.property===e&&!n.computed?r=n.object:Re(n)&&n.right===e&&(r=n.left),r===void 0)return!1;let i=E(r)?r:Tp(r);return i===void 0||!T(i)?!1:_(t.getScope(e),i.name)?.defs[0]?.type===`ImportBinding`}function Dp(e,t){let n=e.parent;if(!ge(n))return!1;let{callee:r}=n;if(!E(r))return!1;let i=_(t.getScope(r),r.name)?.defs[0];return vp(i)}function Op(e,t){if(Ep(e,t))return!0;if(!dp(e))return!1;let n=e.parent.parent;if(n===null||!He(n))return!1;let r=wp(n);return r!==void 0&&bp(r,t)||Dp(n,t)}function kp(e,t,n){return e?t:n}const Ap=/[.+^${}()|[\]\\]/gu,jp=/^\/(?<first>.+)\/(?<second>[dgimsuvy]*)$/u,Mp=new WeakMap,Np=new WeakMap;function Pp(e){return t.isObject(e)}function Fp(e){return e===e.toUpperCase()}function Ip(e){return Fp(e.charAt(0))}function Lp(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Rp(e){return e.charAt(0).toLowerCase()+e.slice(1)}function zp(e){return e.includes(`u`)||e.includes(`v`)?e:`${e}u`}function Bp(e){return e===void 0?3:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:3}function Vp(e,t,n){return e===3||t===3||e===2||t===2?e!==t:e===0&&t===1||e===1&&t===1&&n===0}function Hp(e){if(e.length<2)return[e];let t=[],n=0,r=Bp(e.codePointAt(0));for(let i=1;i<e.length;i+=1){let a=Bp(e.codePointAt(i)),o=Bp(e.codePointAt(i+1));Vp(r,a,o)&&(t.push(e.slice(n,i)),n=i),r=a}return t.push(e.slice(n)),t}const Up=/\$\d+/gu;function Wp(e){let t=e.match(Up);if(t===null)return 0;let n=0;for(let e of t){let t=Math.trunc(Number(e.slice(1)));t>n&&(n=t)}return n}function Gp(e){let t=Wp(e);if(t===0)return[];let n=Array.from({length:t});for(let e=1;e<=t;e+=1)n[e-1]=RegExp(`\\$${e}`,`gu`);return n}function Kp(e){let t=[],n=[],r=0;for(let[i,a]of e)a&&(t[r]=Rp(i),n[r]=Lp(i),r+=1);return{lowerFirst:t.toSorted((e,t)=>e.localeCompare(t)),upperFirst:n.toSorted((e,t)=>e.localeCompare(t))}}function qp(e,t){if(e.startsWith(`/`)){let n=jp.exec(e);if(n?.groups!==void 0)return{matcher:{original:e,pattern:RegExp(`^${n.groups.first}$`,zp(n.groups.second??``)),replacement:t,replacementPatterns:Gp(t)},type:`pattern`}}if(e.includes(`*`)||e.includes(`?`)){let n=e.replaceAll(Ap,String.raw`\$&`).replaceAll(`*`,`(.*)`).replaceAll(`?`,`(.)`),r=0,i=t.replaceAll(`*`,()=>`$${++r}`);return{matcher:{original:e,pattern:RegExp(`^${n}$`,`u`),replacement:i,replacementPatterns:Gp(i)},type:`pattern`}}return{original:e,replacement:t,type:`exact`}}function Jp(e,t){let n=t.exactMatchers.get(e);if(n!==void 0)return{matchedWord:e,replacement:n,shorthand:e};for(let n of t.matchers){let t=e.match(n.pattern);if(t===null)continue;let r=n.replacement,i=1;for(let e of n.replacementPatterns)r=r.replaceAll(e,t[i]??``),i+=1;return{matchedWord:e,replacement:r,shorthand:n.original}}}function Yp(e,t){if(t.ignoreExact.has(e))return!0;for(let n of t.ignoreMatchers)if(n.pattern.test(e))return!0;return!1}function Xp(e,n){return e===`internal`||t.isBoolean(e)?e:n}function Zp(e){if(!t.isObject(e))return;let n={};for(let[r,i]of Object.entries(e))t.isBoolean(i)&&(n[r]=i);return n}function Qp(e,n){return t.isBoolean(e)?e:n}function $p(e){let t=Pp(e)?e:void 0,n=Zp(t?.allowList),r=kp(Qp(t?.extendDefaultAllowList,!0),n===void 0?Vf:{...Vf,...n},n??{});return new Map(Object.entries(r))}function em(e){if(!t.isObject(e))return new Map;let n=new Map;for(let[r,i]of Object.entries(e)){if(i===!1){n.set(r,!1);continue}if(!t.isObject(i))continue;let e={};for(let[n,r]of Object.entries(i))t.isBoolean(r)&&(e[n]=r);n.set(r,e)}return n}function tm(e){let t=Pp(e)?e:void 0,n=Qp(t?.extendDefaultReplacements,!0),r=em(t?.replacements),i=new Set([...Object.keys(Bf),...r.keys()]),a=[];for(let e of i){let t=r.get(e),i=n?Bf[e]??{}:{},o=t===!1?{}:kp(t===void 0,i,{...i,...t}),s=new Map(Object.entries(o));Mp.set(s,Kp(s)),a.push([e,s])}return new Map(a)}function nm(e){let n=Pp(e)?e:void 0,r=[];for(let e of Hf)r.push(e);if(Array.isArray(n?.ignore))for(let e of n.ignore)(t.isString(e)||e instanceof RegExp)&&r.push(e);return r.map(e=>e instanceof RegExp?e:new RegExp(e,`u`))}function rm(e){let t=Pp(e)?e:void 0,n=new Set(zf);if(!M(t?.allowPropertyAccess))return n;for(let e of t.allowPropertyAccess)n.add(e);return n}function im(e){let t=Pp(e)?e:void 0,n=new Map,r=new Set,i=[],a=[],o=Ei(t?.shorthands)?t.shorthands:{},s={...Rf,...o};for(let[e,t]of Object.entries(s)){let r=qp(e,t);r.type===`exact`?n.set(r.original,r.replacement):a.push(r.matcher)}if(M(t?.ignoreShorthands))for(let e of t.ignoreShorthands){let t=qp(e,``);t.type===`exact`?r.add(t.original):i.push(t.matcher)}return{exactMatchers:n,ignoredIdentifiers:new Map,ignoreExact:r,ignoreMatchers:i,matchers:a,replacementsByIdentifier:new Map}}function am(e){let t=Pp(e)?e:void 0;return{allowList:$p(t),allowPropertyAccess:rm(t),checkDefaultAndNamespaceImports:Xp(t?.checkDefaultAndNamespaceImports,`internal`),checkFilenames:Qp(t?.checkFilenames,!0),checkProperties:Qp(t?.checkProperties,!1),checkShorthandImports:Xp(t?.checkShorthandImports,`internal`),checkShorthandProperties:Qp(t?.checkShorthandProperties,!0),checkVariables:Qp(t?.checkVariables,!0),ignore:nm(t),nameReplacements:new Map,replacements:tm(t),shorthandConfiguration:im(t)}}function om(e){return{...e,nameReplacements:new Map,shorthandConfiguration:{...e.shorthandConfiguration,ignoredIdentifiers:new Map,replacementsByIdentifier:new Map}}}function sm(e){if(!Pp(e))return am(void 0);let t=Np.get(e);if(t!==void 0)return om(t);let n=am(e);return Np.set(e,n),om(n)}function cm(e,t){if(Fp(e)||t.allowList.get(e)===!0)return[];let n=t.replacements.get(Rp(e))??t.replacements.get(e)??t.replacements.get(Lp(e));if(n===void 0)return[];let r=Mp.get(n);return r===void 0?[]:Ip(e)?r.upperFirst:r.lowerFirst}function lm(e,t){let n=t.replacementsByIdentifier.get(e);if(n!==void 0)return n===!1?void 0:n;if(e.length===0)return;let r=Hp(e),i=[];for(let e of r){let n=Jp(e,t);n!==void 0&&i.push(n)}if(i.length===0){t.replacementsByIdentifier.set(e,!1);return}let a=``,o=0;for(let e of r){let t=i[o];if(t?.matchedWord===e){a+=t.replacement,o+=1;continue}a+=e}let s={matches:i,replaced:a};return t.replacementsByIdentifier.set(e,s),s}function um(e,t){let n=t.ignoredIdentifiers.get(e);if(n!==void 0)return n;let r=Yp(e,t);if(!r){let n=lm(e,t);r=n!==void 0&&n.matches.length>0&&n.matches.every(e=>Yp(e.matchedWord,t))}return t.ignoredIdentifiers.set(e,r),r}function dm(e,t,n){if(n.has(e))return!0;for(let e of t.matches)if(!n.has(e.matchedWord))return!1;return t.matches.length>0}function fm(e,t,n=3){let r=`${n}\0${e}`,i=t.nameReplacements.get(r);if(i!==void 0)return i;let a=pm(e,t,n);return t.nameReplacements.set(r,a),a}function pm(e,t,n){if(t.allowList.get(e)===!0||t.ignore.some(t=>t.test(e)))return{total:0};let r=lm(e,t.shorthandConfiguration);if(r!==void 0)return um(e,t.shorthandConfiguration)?{total:0}:{samples:[r.replaced],total:1};if(Fp(e))return{total:0};let i=cm(e,t);if(i.length>0)return{samples:i.slice(0,n),total:i.length};let a=e.split(Uf).filter(Boolean),o=!1,s=[],c=0;for(let e of a){let n=cm(e,t);if(n.length>0){o=!0,s[c++]=n;continue}s[c++]=[e]}if(!o)return{total:0};let l=s.reduce((e,t)=>e*t.length,1);return{samples:mm(s,l,n).map(e=>e.join(``)),total:l}}function mm(e,t,n){let r=Math.min(t,n),i=Array.from({length:r},(t,n)=>{let r=n,i=[];for(let t=e.length-1;t>=0;--t){let n=e[t]??[],a=r%n.length;r=(r-a)/n.length;let o=n[a];o!==void 0&&i.unshift(o)}return i});for(let e of i)for(let t=e.length-1;t>0;--t){let n=e[t]??``;Gf.test(n)&&e[t-1]?.endsWith(n)===!0&&e.splice(t,1)}return i}function hm(e,t){let n=t.replacements.get(e);if(n===void 0)return!1;let r=Mp.get(n);return r!==void 0&&r.lowerFirst.length>0}function gm(e,{samples:t=[],total:n},r){if(n===1)return{data:{discouragedName:e,nameTypeText:r,replacement:t[0]??``},messageId:Ff};let i=t.map(e=>`\`${e}\``).join(`, `),a=n-t.length;return a>0&&(i+=`, ... (${a>99?`99+`:a} more omitted)`),{data:{discouragedName:e,nameTypeText:r,replacementsText:i},messageId:If}}function _m(e){return function(t,n){return n.every(n=>{let r=e.get(n);return r===void 0||!r.has(t)})}}function vm(e){let{parent:t}=e;return O(t)&&t.property===e&&!t.computed||Re(t)&&t.right===e}function ym(e,t,n,r){r({...gm(e.name,{samples:[t],total:1},n?`property`:`variable`),node:e})}function bm(e,t,n){return ap(t)&&!mp(n.checkDefaultAndNamespaceImports,e)||tp(t)&&!mp(n.checkShorthandImports,e)?!0:!n.checkShorthandProperties&&rp(t)}function xm(e){if(e.name!==`plr`)return;let[t]=e.defs;if(t?.type!==`Variable`||!w(t.node)||t.node.init===null)return;let{init:n}=t.node;if(O(n)&&!n.computed&&E(n.object)&&n.object.name===`Players`&&E(n.property)&&n.property.name===`LocalPlayer`)return`localPlayer`}function Sm(e,t,n,r){let i=[],a=0,o=0;for(let s of e){let e=Qf(s,t,n);if(e!==void 0){if(e!==s&&hm(s,r)){o+=1;continue}e.length>0&&(i[a++]=e)}}return{droppedDiscouraged:o,safeSamples:i}}function Cm(e,t,n){let r=e.type===`Variable`&&w(e.node)&&e.node.init===null,i=e.type===`Parameter`&&t.scope.type===`function`&&t.scope.block.type===`ArrowFunctionExpression`,a=r||i;return(e,t)=>!(!n(e,t)||a&&e===`arguments`)}function wm(e,t,n,r,i,a,o){for(let e of i)a.has(e)||a.set(e,new Set),a.get(e)?.add(r);e({...t,fix(e){return lp(n,r,e)},node:o})}function Tm(e,n,r,i,a){let[o]=e.defs;if(o===void 0)return;let s=o.name;if(!E(s)||bm(o,s,n))return;let c=Cm(o,e,i),l=xm(e),u=l===void 0?fm(e.name,n):{samples:[l],total:1};if(u.total===0||!u.samples)return;let{references:d}=e,f=[...d.map(e=>e.from),e.scope],{droppedDiscouraged:p,safeSamples:m}=Sm(u.samples,f,c,n),h=m.length>0?m:u.samples,g=t.isNumber(u.samples.length)&&u.samples.length===u.total?Math.max(0,u.total-p):u.total,_=e.name===`fn`&&g>1?h.map(e=>e===`function_`?`function`:e):h,ee=gm(s.name,{samples:_,total:g},`variable`);if(g===1&&m.length===1&&sp(e)){let[t]=m;if(t!==void 0){wm(a,ee,e,t,f,r,s);return}}a({...ee,node:s})}function Em(e,t){if(!hp(e)){t(e);return}if(e.scope.type===`class`){let[n]=e.defs;if(n===void 0){t(e);return}let r=n.name;if(!E(r)){t(e);return}t(e)}}function Dm(e,t){for(let n of Xf(e))for(let e of n.variables)Em(e,t)}function Om(e,t,n,r){let i=up(e),a=vm(e);!i&&!a||Op(e,r)||km(e,i,a,t,n)||!i||!t.checkProperties||Am(e,t,n)}function km(e,t,n,r,i){let a=lm(e.name,r.shorthandConfiguration);return a===void 0||!t&&!n?!1:(um(e.name,r.shorthandConfiguration)||!r.checkShorthandProperties||n&&dm(e.name,a,r.allowPropertyAccess)||ym(e,a.replaced,!0,i),!0)}function Am(e,t,n){let r=fm(e.name,t);if(r.total===0)return;let i=gm(e.name,r,`property`),a=jm(e,r.samples);if(a!==void 0){n({...i,fix(t){return t.replaceText(e,a)},node:e});return}n({...i,node:e})}function jm(e,t){if(t?.length!==1||!dp(e))return;let[n]=t,{parent:r}=e;if(n!==void 0&&D(r)&&he(r.value)&&Yf(n))return n}const Mm=b(`prevent-abbreviations`,`naming`,{create(e){let t=sm(e.options[0]),n=e.physicalFilename,r=new WeakMap,i=_m(r),{sourceCode:a}=e;function o(n){Tm(n,t,r,i,e.report)}return{Identifier(n){!T(n)||n.name===`__proto__`||Om(n,t,e.report,a)},JSXOpeningElement({name:n}){if(!t.checkVariables||!fe(n)||!Ip(n.name))return;let r=fm(n.name,t);if(r.total===0)return;let i=gm(n.name,r,`variable`);e.report({...i,node:n})},"Program:exit"(r){if(n!==`<input>`&&n!==`<text>`&&t.checkFilenames){let i=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`)),a=n.slice(i+1),o=a.lastIndexOf(`.`),s=o===-1?``:a.slice(o),c=fm(o===-1?a:a.slice(0,o),t);if(c.total>0&&c.samples){let t=c.samples.map(e=>`${e}${s}`);e.report({...gm(a,{samples:t,total:c.total},`filename`),node:r})}}t.checkVariables&&Dm(a.getScope(r),o)}}},meta:{docs:{description:`Prevent abbreviations.`,recommended:!1},fixable:`code`,messages:{[Ff]:`The {{nameTypeText}} \`{{discouragedName}}\` should be named \`{{replacement}}\`. ${Lf}`,[If]:`Please rename the {{nameTypeText}} \`{{discouragedName}}\`. Suggested names are: {{replacementsText}}. ${Lf}`},schema:[{additionalProperties:!1,properties:{allowList:{additionalProperties:{type:`boolean`},default:Vf,defaultLabel:`default allow list`,description:`Names that should be allowed even when they match a discouraged abbreviation.`,type:`object`},allowPropertyAccess:{default:zf,description:`Property names that may keep abbreviated member access.`,items:{type:`string`},type:`array`},checkDefaultAndNamespaceImports:{default:`internal`,description:`Whether default and namespace import local names should be checked.`,enum:[!1,!0,`internal`]},checkFilenames:{default:!0,description:`Whether file names should be checked for abbreviations.`,type:`boolean`},checkProperties:{default:!1,description:`Whether object, member, and JSX property names should be checked.`,type:`boolean`},checkShorthandImports:{default:`internal`,description:`Whether renamed shorthand imports should be checked.`,enum:[!1,!0,`internal`]},checkShorthandProperties:{default:!0,description:`Whether shorthand object property names should be checked.`,type:`boolean`},checkVariables:{default:!0,description:`Whether variable, function, class, and component names should be checked.`,type:`boolean`},extendDefaultAllowList:{default:!0,description:`Merge configured allowList entries with the default allow list.`,type:`boolean`},extendDefaultReplacements:{default:!0,description:`Merge configured replacements with the default replacement map.`,type:`boolean`},ignore:{default:Hf,description:`Names or regular expression patterns that should be ignored.`,items:{type:`string`},type:`array`},ignoreShorthands:{default:[],description:`Shorthand names that should not be reported.`,items:{type:`string`},type:`array`},replacements:{additionalProperties:{oneOf:[{enum:[!1]},{additionalProperties:{type:`boolean`},type:`object`}]},default:Bf,defaultLabel:`default replacement map`,description:`Replacement suggestions for discouraged names.`,type:`object`},shorthands:{additionalProperties:{type:`string`},default:Rf,defaultLabel:`default shorthands`,description:`Shorthand names and the full names they should expand to.`,type:`object`}},type:`object`}],type:`suggestion`}});function Nm({parent:e}){if(e.type!==`ObjectExpression`)return!1;let{parent:t}=e;return t.type===`TSSatisfiesExpression`?!0:t.type===`CallExpression`||t.type===`NewExpression`?t.arguments.some(t=>t===e):!1}const Pm=b(`require-async-suffix`,`naming`,{create(e){let t=e.options[0]?.except,n=t===void 0?new Set:new Set(t);function r(t){t.name.endsWith(`Async`)||n.has(t.name)||e.report({messageId:`missingAsyncSuffix`,node:t})}return{FunctionDeclaration(e){!e.async||e.id===null||r(e.id)},MethodDefinition(e){!e.value.async||e.key.type!==`Identifier`||e.override===!0||r(e.key)},Property(e){!e.method||e.value.type!==`FunctionExpression`||!e.value.async||e.key.type!==`Identifier`||Nm(e)||r(e.key)},PropertyDefinition(e){(e.value?.type===`ArrowFunctionExpression`||e.value?.type===`FunctionExpression`)&&(!e.value.async||e.key.type!==`Identifier`||e.override===!0||r(e.key))},VariableDeclarator(e){e.id.type===`Identifier`&&(e.init?.type===`ArrowFunctionExpression`||e.init?.type===`FunctionExpression`)&&e.init.async&&r(e.id)}}},meta:{docs:{description:`Require async function names to end with Async.`},messages:{missingAsyncSuffix:`Async functions must have names that end with Async.`},schema:[{additionalProperties:!1,properties:{except:{items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}}),Fm=new Set([`FC`,`FunctionComponent`,`VFC`,`VoidFunctionComponent`]);function Im(e){if(e.type===`Identifier`&&Fm.has(e.name))return e.name;if(e.type===`TSQualifiedName`&&Fm.has(e.right.name))return e.right.name}function Lm(e){let{typeAnnotation:t}=e.id;return oe(t)?t:void 0}const Rm=b(`ban-react-fc`,`react`,{createOnce(e){return{VariableDeclarator(t){let n=Lm(t);if(n===void 0)return;let r=n.typeAnnotation;r.type===`TSTypeReference`&&Im(r.typeName)!==void 0&&t.init?.type===`ArrowFunctionExpression`&&e.report({messageId:`banReactFC`,node:t})}}},meta:{docs:{description:`Ban React.FC and similar component type annotations. Use explicit function declarations instead.`},messages:{banReactFC:"Avoid React.FC/FunctionComponent/VFC/VoidFunctionComponent types. They break debug information and profiling. Use explicit function declarations instead: `function Component(props: Props) { ... }`"},schema:[],type:`problem`}}),zm={default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`};function Bm(e){return e===`roblox-ts`||e===`standard`}const Vm=new Set([`react`,`react-dom`]),Hm=new Set([`@rbxts/react`,`@rbxts/roact`]);function Um(e){return e===`standard`?Vm:Hm}function Wm(e){return Um(H(e))}function Gm(e,t){return t.has(e.source.value)}function Km(e,t,n,r){if(Gm(e,t))for(let t of e.specifiers){if(t.type===`ImportDefaultSpecifier`||t.type===`ImportNamespaceSpecifier`){n.add(t.local.name);continue}let e=de(t);e!==void 0&&r(e,t.local.name)}}function H(e){return!t.isObject(e)||e.environment!==`standard`?`roblox-ts`:`standard`}function qm(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function Jm(e,t){if(e.type!==`ImportBinding`)return!1;let n=qm(e.node);return n!==void 0&&t.has(n.source.value)}function Ym(e,t,n){if(e===void 0)return!1;for(let r of e.defs)if(Jm(r,n)&&r.node.type===`ImportSpecifier`&&de(r.node)===t)return!0;return!1}function Xm(e,t){if(e===void 0)return!1;for(let n of e.defs)if(Jm(n,t)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0;return!1}function Zm(e,{callee:t},n,r){if(t.type===`Identifier`){let i=_(e.getScope(t),t.name);return i!==void 0&&i.defs.some(e=>{if(e.type!==`ImportBinding`||e.node.type!==`ImportSpecifier`)return!1;let t=qm(e.node);if(t===void 0||!r.has(t.source.value))return!1;let i=de(e.node);return i!==void 0&&n.has(i)})}return t.type!==`MemberExpression`||t.computed||t.object.type!==`Identifier`||t.property.type!==`Identifier`?!1:Xm(_(e.getScope(t.object),t.object.name),r)&&n.has(t.property.name)}const Qm=new Map([[`useEffect`,1],[`useInsertionEffect`,1],[`useLayoutEffect`,1]]),$m=new Set([`useCallback`,`useMemo`]),eh=new Set([`useBinding`,`useRef`]),th=new Set([`useReducer`,`useState`,`useTransition`]),nh=new Set([...eh,...th]),rh=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`ClassExpression`,`FunctionExpression`,`NewExpression`,`ObjectExpression`]);function ih(e){return e===`aggressive`||e===`definite`||e===`moderate`}function ah(e,t){if(!(e.computed||e.object.type!==`Identifier`||!t.has(e.object.name)))return e.property.type===`Identifier`?e.property.name:void 0}function oh(e){let t=m(e);for(;t.type===`MemberExpression`;)t=m(t.object);return t.type===`Identifier`?t:void 0}function sh(e){return rh.has(e.type)}function ch(e){if(e!==null){if(e.type===`Identifier`)return e.name;if(e.type===`AssignmentPattern`&&e.left.type===`Identifier`)return e.left.name;if(e.type===`RestElement`&&e.argument.type===`Identifier`)return e.argument.name}}function lh(e,t,n){let r=e.elements[n];return r!=null&&ch(r)===t}function uh(e){return e.scope.type===`module`||e.scope.type===`global`}function dh(e,n){if(!(!(`hooks`in e)||!Array.isArray(e.hooks)))for(let r of e.hooks){if(!t.isObject(r)||!(`name`in r)||!t.isString(r.name))continue;let e=`dependenciesIndex`in r&&t.isNumber(r.dependenciesIndex)?r.dependenciesIndex:1;n.set(r.name,e)}}const fh=b(`memoized-effect-dependencies`,`react`,{create(e){let[n]=e.options,r=t.isObject(n)?n:{},i=`mode`in r&&ih(r.mode)?r.mode:`definite`,a=`environment`in r&&Bm(r.environment)?r.environment:`roblox-ts`,o=new Map(Qm);dh(r,o);let s=Um(a),c=new Set,l=new Map,u=new Set,d=new Map,f=new WeakMap,p=new WeakMap,h=new WeakMap,{sourceCode:g}=e;function _(e){let t=f.get(e);if(t!==void 0)return t;let n=g.getScope(e);return f.set(e,n),n}function ee(e){let t=_(e),n=p.get(t);if(n===void 0)n=new Map,p.set(t,n);else if(n.has(e.name))return n.get(e.name);let r=t;for(;r!==null;){let t=r.set.get(e.name);if(t!==void 0)return n.set(e.name,t),t;r=r.upper}n.set(e.name,void 0)}function te({callee:e}){if(e.type===`Identifier`)return u.has(e.name);if(e.type===`MemberExpression`){let t=ah(e,c);return t!==void 0&&$m.has(t)}return!1}function v({callee:e}){if(e.type===`Identifier`){let t=d.get(e.name);return t===void 0?void 0:eh.has(t)?`whole`:th.has(t)?`index1`:void 0}if(e.type===`MemberExpression`){let t=ah(e,c);if(t===void 0)return;if(eh.has(t))return`whole`;if(th.has(t))return`index1`}}function y(e,t){if(e.type===`Parameter`)return`unknown`;if(e.type===`ImportBinding`)return`memoized`;let{node:n}=e;if(n.type===`FunctionDeclaration`||n.type===`ClassDeclaration`)return`unmemoized`;if(n.type!==`VariableDeclarator`)return`unknown`;let r=n.parent;if(r.type===`VariableDeclaration`&&r.kind!==`const`)return i===`definite`?`unknown`:`unmemoized`;let a=n.init===null?void 0:m(n.init);return a===void 0?`unknown`:sh(a)?`unmemoized`:a.type===`CallExpression`?ne(a,n.id,t):`unknown`}function ne(e,t,n){if(te(e))return`memoized`;let r=v(e);return r===`whole`||r===`index1`&&t.type===`ArrayPattern`&&lh(t,n,1)?`memoized`:i===`definite`?`unknown`:`unmemoized`}function b(e){let t=h.get(e);if(t!==void 0)return t;if(uh(e))return h.set(e,`memoized`),`memoized`;let n=!1;for(let t of e.defs){let r=y(t,e.name);if(r===`unmemoized`)return h.set(e,`unmemoized`),`unmemoized`;r===`memoized`&&(n=!0)}let r=n?`memoized`:`unknown`;return i===`aggressive`&&r!==`memoized`&&(r=`unmemoized`),h.set(e,r),r}function re(e){let t=m(e);if(sh(t))return`unmemoized`;if(t.type===`CallExpression`)return i===`definite`?`unknown`:`unmemoized`;let n=oh(t);if(n===void 0)return`unknown`;let r=ee(n);return r===void 0?`unknown`:b(r)}function x({callee:e}){if(e.type===`Identifier`)return l.get(e.name);if(e.type===`MemberExpression`){let t=ah(e,c);return t===void 0?void 0:o.get(t)}}return{CallExpression(t){let n=x(t);if(n===void 0)return;let r=t.arguments[n];if(r?.type===`ArrayExpression`)for(let t of r.elements){if(t===null)continue;if(t.type===`SpreadElement`){if(i===`definite`)continue;let n=t.argument,r=g.getText(n);e.report({data:{name:r},messageId:`unmemoizedDependency`,node:n});continue}if(re(t)!==`unmemoized`)continue;let n=g.getText(t);e.report({data:{name:n},messageId:`unmemoizedDependency`,node:t})}},ImportDeclaration(e){Km(e,s,c,(e,t)=>{if(o.has(e)){let n=o.get(e);l.set(t,n??1)}$m.has(e)&&u.add(t),nh.has(e)&&d.set(t,e)})}}},meta:{docs:{description:`Flags effect dependencies that are not memoized. Unmemoized dependencies can cause unnecessary re-renders or infinite loops.`},messages:{unmemoizedDependency:`{{name}} is not memoized. Wrap it in useMemo/useCallback or move it to module scope.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:Array.from(Qm,([e,t])=>({name:e,dependenciesIndex:t})),description:`Effect hooks checked by default; configured entries are added to this set.`,items:{additionalProperties:!1,properties:{name:{description:`The name of the hook`,type:`string`},dependenciesIndex:{description:`Index of the dependencies array for validation`,type:`number`}},required:[`name`],type:`object`},type:`array`},mode:{default:`definite`,description:`Strictness for memoization detection: definite (only obvious), moderate (unknown calls and non-const), aggressive (any non-module).`,enum:[`aggressive`,`definite`,`moderate`],type:`string`}},type:`object`}],type:`problem`}}),ph=new Set([`ArrayExpression`,`ObjectExpression`,`Property`,`SequenceExpression`]),mh=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`]),hh=new WeakMap;function gh(e){let{ast:t}=e,n=hh.get(t);if(n!==void 0)return n;let r=_h(e);return hh.set(t,r),r}function _h(e){let t={referenceByIdentifier:new Map,sourceCode:e,traversalByRoot:new WeakMap};Sh(t);let n=[],r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap;return Ch(t,n),{callExpressions:n,getArgumentUpstreamReferences(e){let n=i.get(e);return n===void 0&&(n=jh(t,e),i.set(e,n)),n},getCallExpression(e){if(o.has(e))return o.get(e);let t=Ah(e);return o.set(e,t),t},getDescendantCallExpressions(e){return vh(t,e).callExpressions},getDescendantIfStatements(e){return vh(t,e).ifStatements},getDownstreamReferences(e){return vh(t,e).references},getReference(e){return t.referenceByIdentifier.get(e)},getSynchronousCallChain(e){let n=a.get(e);return n===void 0&&(n=Nh(t,e),a.set(e,n)),n},getUpstreamReferences(e){let n=r.get(e);return n===void 0&&(n=Oh(t,e),r.set(e,n)),n},isSynchronousWithin:Mh}}function vh(e,t){let n=e.traversalByRoot.get(t);return n===void 0&&(n={callExpressions:[],ifStatements:[],references:[]},yh(e,t,n),e.traversalByRoot.set(t,n)),n}function yh(e,t,n){let r=[t];for(;r.length>0;){let i=r.pop();if(i===void 0)break;if(Eh(i)){let t=Dh(e,i);t!==void 0&&n.references.push(t)}xh(i,t,n),Th(e,i,r,!1)}}function bh(e,t,n){let r=[t];for(;r.length>0;){let i=r.pop();if(i===void 0)break;if(Eh(i)){let t=Dh(e,i);t!==void 0&&n.references.push(t)}xh(i,t,n),Th(e,i,r,!0)}}function xh(e,t,n){e!==t&&(e.type===`CallExpression`?n.callExpressions.push(e):e.type===`IfStatement`&&n.ifStatements.push(e))}function Sh(e){let t={callExpressions:[],ifStatements:[],references:[]};bh(e,e.sourceCode.ast,t);for(let n of t.references)Eh(n.identifier)&&e.referenceByIdentifier.set(n.identifier,n)}function Ch(e,t){bh(e,e.sourceCode.ast,{callExpressions:t,ifStatements:[],references:[]})}function wh(e,t){if(Array.isArray(e)){for(let n=e.length-1;n>=0;--n){let r=e[n];S(r)&&t.push(r)}return}S(e)&&t.push(e)}function Th(e,t,n,r){let i=new Set(e.sourceCode.visitorKeys[t.type]);for(let[e,a]of Object.entries(t))!i.has(e)||e===`arguments`&&!r||wh(a,n)}function Eh(e){return e.type===`Identifier`}function Dh(e,t){return e.sourceCode.getScope(t).references.find(e=>e.identifier===t)}function Oh(e,t){let n=[],r=new Set,i=0;return kh(e,t,e=>{n[i++]=e},r),n}function kh(e,t,n,r){if(r.has(t))return;let i=n(t);if(r.add(t),i===!1)return;let a=t.resolved?.defs??[];for(let t of a){if(t.type===`ImportBinding`||t.type===`Parameter`)continue;let i=Ph(t);if(i!==void 0)for(let t of vh(e,i).references)kh(e,t,n,r)}}function Ah(e){let t=e.identifier.parent;for(;;){if(t.type===`CallExpression`){let n=e.identifier;for(;n.parent.type===`MemberExpression`;)n=n.parent;if(t.callee===n)return t}else if(t.type===`MemberExpression`){t=t.parent;continue}return}}function jh(e,t){let n=[];for(let r of Oh(e,t)){let t=Ah(r);if(t!==void 0){for(let r of t.arguments)if(S(r))for(let t of vh(e,r).references)for(let r of Oh(e,t))n.push(r)}}return n}function Mh(e,t){let n=e;for(;n!==t;){if(n.type===`AwaitExpression`||n.type===`UnaryExpression`&&n.operator===`void`||mh.has(n.type))return!1;let{parent:e}=n;if(e===null)return!1;n=e}return!0}function Nh(e,t){function n(e){let t=e;for(;t!=null;){if(mh.has(t.type))return t;t=t.parent}}function r(e){let t=e.identifier;for(;;){let e=t.parent;if(e===null)return!1;if(e.type===`VariableDeclarator`&&e.init===t)return!0;if(ph.has(e.type)){t=e;continue}return!1}}let i=[];return kh(e,t,e=>{let t=Ah(e),a=n(t);if(t!==void 0&&a!==void 0&&Mh(t,a))i.push(e);else if(r(e))i.push(e);else return!1},new Set),i}function Ph(e){if(`init`in e.node)return e.node.init??void 0;if(`body`in e.node){let{body:t}=e.node;return S(t)?t:void 0}}const Fh=new Set([`forwardRef`,`memo`]),Ih=`useEffect`,Lh=`useState`,Rh=`useRef`,zh=new WeakMap;function U(e,t){let{ast:n}=e,r=zh.get(n);r===void 0&&(r=new Map,zh.set(n,r));let i=r.get(t);if(i!==void 0)return i;let a=Bh(e,t);return r.set(t,a),a}function Bh(e,t){let n=gh(e),r={environment:t,reactSources:Vh(t),scope:n,sourceCode:e},i=[];for(let e of n.callExpressions){if(!Hh(r,e))continue;let t=Uh(r,e);t!==void 0&&i.push(t)}return{effects:i,findEnclosingReactNode(e){return Sg(r,e)},getComponentName(e){return Cg(e)},getStateName(e){return yg(r,e)},getUseStateDeclaration(e){return bg(r,e)},isConstant(e){return pg(e)},isCustomHook(e){return Zh(e)},isProp(e){return fg(r,e)},isPropCall(e){return _g(r,e)},isRefCall(e){return vg(r,e)},isRefCurrent(e){return hg(e)},isState(e){return cg(r,e)},isStateCall(e){return gg(r,e)},isStateSetter(e){return lg(r,e)},scope:n}}function Vh(e){return e===`standard`?new Set([`react`,`react-dom`]):new Set([`@rbxts/react`,`@rbxts/roact`])}function Hh(e,t){return eg(e,t)?Zm(e.sourceCode,t,new Set([Ih]),e.reactSources):!1}function Uh(e,t){let n=Wh(e,t);if(n===void 0)return;let r=e.scope.getDownstreamReferences(n),i=Gh(e,t);return{cleanup:Kh(n),dependencyReferences:i,functionNode:n,functionReferences:r,node:t}}function Wh(e,t){let[n]=t.arguments;if(n?.type===`ArrowFunctionExpression`||n?.type===`FunctionExpression`)return n;if(n?.type!==`Identifier`)return;let r=e.scope.getReference(n)?.resolved?.defs[0];if(r===void 0)return;let i=qh(r.node);if(i!==void 0)return i.type===`ArrowFunctionExpression`||i.type===`FunctionExpression`||i.type===`BlockStatement`?i:void 0}function Gh(e,t){let[,n]=t.arguments;if(n?.type===`ArrayExpression`)return e.scope.getDownstreamReferences(n)}function Kh(e){if(e.type!==`ArrowFunctionExpression`&&e.type!==`FunctionExpression`||e.body?.type!==`BlockStatement`)return;let{body:t}=e.body;for(let e=t.length-1;e>=0;--e){let n=t[e];if(n?.type===`ReturnStatement`&&n.argument!==null)return n}}function qh(e){if(`init`in e)return e.init??void 0;if(`body`in e){let{body:t}=e;return Tg(t)?t:void 0}}function Jh(e){let t=e.charAt(0);return t===t.toUpperCase()}function Yh(e){return e.type!==`FunctionDeclaration`&&(e.type!==`VariableDeclarator`||e.init?.type!==`ArrowFunctionExpression`&&e.init?.type!==`CallExpression`)||e.id?.type!==`Identifier`?!1:Jh(e.id.name)}function Xh(e,t){function n(e){if(e.type!==`VariableDeclarator`||e.init?.type!==`CallExpression`||e.init.callee.type!==`Identifier`||Fh.has(e.init.callee.name))return!1;let[t]=e.init.arguments;return t?.type===`ArrowFunctionExpression`||t?.type===`FunctionExpression`}function r(t){if(t.type!==`VariableDeclarator`)return!1;let{id:n}=t;return n.type===`Identifier`?ng(e,n)?.references.some(e=>{let{parent:t}=e.identifier;return t.type!==`CallExpression`||t.arguments.every(t=>t!==e.identifier)?!1:t.callee.type===`Identifier`&&!Fh.has(t.callee.name)})??!1:!1}return Yh(t)&&(n(t)||r(t))}function Zh(e){if(e.type!==`FunctionDeclaration`&&(e.type!==`VariableDeclarator`||e.init===null||e.init.type!==`ArrowFunctionExpression`&&e.init.type!==`FunctionExpression`)||e.id?.type!==`Identifier`)return!1;let{name:t}=e.id,n=t.charAt(3);return t.startsWith(`use`)&&t.length>3&&n===n.toUpperCase()}function Qh(e,t){if(t.type===`MemberExpression`&&tg(e,t,Lh))return!0;if(t.type!==`Identifier`)return!1;let{parent:n}=t;return n.type===`MemberExpression`&&tg(e,n,Lh)||t.name===Lh?!0:og(e,t,Lh)}function $h(e,t){if(t.type===`MemberExpression`)return tg(e,t,Rh);if(t.type!==`Identifier`)return!1;let{parent:n}=t;return n.type===`MemberExpression`&&tg(e,n,Rh)||t.name===Rh?!0:og(e,t,Rh)}function eg(e,t){return t.type===`CallExpression`?t.callee.type===`Identifier`?t.callee.name===Ih||og(e,t.callee,Ih):t.callee.type===`MemberExpression`&&tg(e,t.callee,Ih):!1}function tg(e,t,n){return t.computed||t.object.type!==`Identifier`||t.property.type!==`Identifier`?!1:t.object.name===`React`&&t.property.name===n||t.property.name===n&&sg(e,t.object)}function ng(e,t){if(t.type!==`Identifier`)return;let{name:n}=t,r=e.sourceCode.getScope(t);for(;r!==null;){let e=r.set.get(n);if(e!==void 0)return e;r=r.upper}}function rg(e,t,n){if(e===void 0)return!1;for(let r of e.defs)if(ig(r,t,n))return!0;return!1}function ig(e,t,n){if(e.type!==`ImportBinding`)return!1;let r=e.node.parent;if(r?.type!==`ImportDeclaration`||!n.has(r.source.value)||e.node.type!==`ImportSpecifier`)return!1;let{imported:i}=e.node;return i.type===`Identifier`&&i.name===t||i.type===`Literal`&&i.value===t}function ag(e,t){if(e===void 0)return!1;for(let n of e.defs){if(n.type!==`ImportBinding`)continue;let e=n.node.parent;if(e?.type===`ImportDeclaration`&&t.has(e.source.value)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0}return!1}function og(e,t,n){return t.type===`Identifier`&&rg(ng(e,t),n,e.reactSources)}function sg(e,t){return ag(ng(e,t),e.reactSources)}function cg(e,t){let n=ug(e,t);if(n===void 0)return!1;let[r]=n;return r?.type===`Identifier`&&r.name===t.identifier.name}function lg(e,t){let n=ug(e,t);if(n===void 0)return!1;let[,r]=n;return r?.type===`Identifier`&&r.name===t.identifier.name}function ug(e,t){let n=t.resolved?.defs.find(t=>dg(e,t.node));if(n?.node.type!==`VariableDeclarator`||n.node.id.type!==`ArrayPattern`)return;let{elements:r}=n.node.id;return r.length!==1&&r.length!==2?void 0:r}function dg(e,t){return t.type===`VariableDeclarator`&&t.init?.type===`CallExpression`&&Qh(e,t.init.callee)&&t.id.type===`ArrayPattern`}function fg(e,t){return t.resolved?.defs.some(t=>{if(t.type!==`Parameter`)return!1;let n=xg(t.node);return Yh(n)&&!Xh(e,n)||Zh(n)})??!1}function pg(e){return(e.resolved?.defs??[]).some(e=>{if(e.node.type!==`VariableDeclarator`)return!1;let{init:t}=e.node;return t?.type===`Literal`||t?.type===`TemplateLiteral`||t?.type===`ArrayExpression`||t?.type===`ObjectExpression`})}function mg(e,t){return t.resolved?.defs.some(t=>t.node.type!==`VariableDeclarator`||t.node.init?.type!==`CallExpression`?!1:$h(e,t.node.init.callee))??!1}function hg(e){let{parent:t}=e.identifier;return t.type===`MemberExpression`&&t.property.type===`Identifier`&&t.property.name===`current`}function gg(e,t){return e.scope.getSynchronousCallChain(t).some(t=>lg(e,t))}function _g(e,t){return e.scope.getSynchronousCallChain(t).some(t=>fg(e,t))}function vg(e,t){return e.scope.getSynchronousCallChain(t).some(t=>hg(t)||mg(e,t))}function yg(e,t){let n=bg(e,t);if(n?.id.type!==`ArrayPattern`)return;let[r,i]=n.id.elements,a=r?.type===`Identifier`?r.name:void 0,o=i?.type===`Identifier`?i.name:void 0;return a??o}function bg(e,t){let n=e.scope.getUpstreamReferences(t).find(t=>Qh(e,t.identifier))?.identifier;if(n===void 0)return;let r=n;for(;r.type!==`VariableDeclarator`;){let e=r.parent;if(e===null)return;r=e}return r}function xg(e){if(e.type!==`ArrowFunctionExpression`)return e;let{parent:t}=e;return t.type===`CallExpression`?t.parent:t}function Sg(e,t){if(t==null)return;if(Yh(t)||Xh(e,t)||Zh(t))return wg(t);let{parent:n}=t;return n===null?void 0:Sg(e,n)}function Cg(e){if(e===void 0||e.type!==`FunctionDeclaration`&&e.type!==`VariableDeclarator`)return;if(e.type===`FunctionDeclaration`){let{id:t}=e;return t===null?void 0:t.name}let t=e.id;if(t!==null&&t.type===`Identifier`)return t.name}function wg(e){return e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`VariableDeclarator`?e:void 0}function Tg(e){return typeof e==`object`&&!!e&&`type`in e}function Eg(e,t){let n=[],r=0,i=t.dependencyReferences??[];for(let t of i)for(let i of e.scope.getUpstreamReferences(t))e.isProp(i)&&(n[r++]=i);return n}function Dg(e,t,n,r){for(let i of n.functionReferences){if(!t.scope.isSynchronousWithin(i.identifier,n.functionNode)||!t.isStateCall(i))continue;let a=t.scope.getCallExpression(i);if(a===void 0||t.scope.getArgumentUpstreamReferences(i).some(t.isProp))continue;let o=t.getStateName(i);o!==void 0&&e.report({data:{props:r.map(e=>`"${e.identifier.name}"`).join(` and `),state:o},messageId:`avoidAdjustingStateWhenAPropChanges`,node:a})}}const Og=b(`no-adjust-state-on-prop-change`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects){if(t.dependencyReferences===void 0)continue;let r=Eg(n,t);r.length!==0&&Dg(e,n,t,r)}}}},meta:{docs:{description:`Disallow adjusting state in an effect when a prop changes.`,recommended:!0},messages:{avoidAdjustingStateWhenAPropChanges:`Avoid adjusting state when a prop changes. Instead, adjust "{{state}}" directly during render when {{props}} changes, or refactor your state to avoid this need entirely.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}}),kg=new Set([`useAsyncEffect`,`useEffect`,`useInsertionEffect`,`useLayoutEffect`,`useMountEffect`,`useReactiveEffect`,`useUnmountEffect`,`useUpdateEffect`]),Ag=b(`no-cascading-set-state`,`react`,{create(e){return{CallExpression(t){let n=N(t);if(n===void 0||!kg.has(n))return;let r=ua(t);if(r===void 0)return;let i=ya(r);i<3||e.report({data:{count:String(i)},messageId:`cascadingSetState`,node:t})}}},meta:{docs:{description:`Disallow effect hooks with many cascading state updates.`,recommended:!0},messages:{cascadingSetState:`{{count}} setState calls in a single useEffect — consider using useReducer or deriving state`},type:`problem`}});function jg(e,t,n,r){for(let i of n.functionReferences){if(!t.scope.isSynchronousWithin(i.identifier,n.functionNode)||!t.isStateCall(i))continue;let a=t.scope.getCallExpression(i);if(a===void 0)continue;let o=t.scope.getArgumentUpstreamReferences(i).some(e=>t.isState(e));if(!r||o)continue;let s=t.getStateName(i);s!==void 0&&e.report({data:{state:s},messageId:`avoidChainingStateUpdates`,node:a})}}const Mg=b(`no-chain-state-updates`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects){if(t.cleanup!==void 0||t.dependencyReferences===void 0)continue;let r=t.dependencyReferences.flatMap(e=>n.scope.getUpstreamReferences(e)).some(e=>n.isState(e));jg(e,n,t,r)}}}},meta:{docs:{description:`Disallow chaining state changes in an effect.`,recommended:!0},messages:{avoidChainingStateUpdates:`Avoid chaining state changes. When possible, update "{{state}}" along with other relevant state simultaneously.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function Ng(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isStateCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=t.getStateName(r);a!==void 0&&t.scope.getArgumentUpstreamReferences(r).some(e=>t.isState(e)||t.isProp(e))&&e.report({data:{state:a},messageId:`avoidDerivedState`,node:i})}}const Pg=b(`no-derived-state`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects)t.cleanup===void 0&&t.dependencyReferences!==void 0&&Ng(e,n,t)}}},meta:{docs:{description:`Disallow storing derived state in an effect.`,recommended:!0},messages:{avoidDerivedState:`Avoid storing derived state. Instead, compute "{{state}}" directly during render.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function Fg(e,t,n){for(let r of t.scope.getDescendantIfStatements(n.functionNode))if(r.alternate===null)for(let n of t.scope.getDownstreamReferences(r.test)){let r=t.scope.getUpstreamReferences(n),{name:i}=n.identifier;r.some(e=>t.isState(e))&&e.report({data:{name:i},messageId:`avoidEventHandler`,node:n.identifier}),r.some(e=>t.isProp(e))&&e.report({data:{name:i},messageId:`avoidPropHandler`,node:n.identifier})}}const Ig=b(`no-event-handler`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects)t.cleanup===void 0&&Fg(e,n,t)}}},meta:{docs:{description:`Disallow using state and an effect as an event handler.`,recommended:!0},messages:{avoidEventHandler:`Avoid using state and effects as an event handler. Instead, call the code that uses "{{name}}" directly when the event occurs.`,avoidPropHandler:`Avoid using props and effects as an event handler. Instead, move the code that uses "{{name}}" to the parent component.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function Lg(e,t){return t.functionReferences.filter(n=>e.scope.isSynchronousWithin(n.identifier,t.functionNode)?e.isStateCall(n):!1)}function Rg(e,t){let n=[...e.scope.getDownstreamReferences(t)];for(let r of e.scope.getDescendantCallExpressions(t))for(let t of r.arguments)for(let r of e.scope.getDownstreamReferences(t))n.push(r);return n}function zg(e,t){let n=new Set;for(let r of t)for(let t of e.scope.getUpstreamReferences(r)){let e=t.resolved;e!=null&&(Hg(e)||n.add(e))}return n}function Bg(e,t,n,r){for(let i of n){if(!t.scope.getUpstreamReferences(i).some(e=>{let t=e.resolved;return t!=null&&r.has(t)}))continue;let n=t.scope.getCallExpression(i);if(n===void 0)continue;let a=t.getStateName(i);a!==void 0&&e.report({data:{state:a},messageId:`avoidExternalStoreSubscription`,node:n})}}const Vg=b(`no-external-store-subscription`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects){if(t.cleanup===void 0||t.cleanup.argument===null)continue;let r=Lg(n,t);if(r.length===0)continue;let i=Rg(n,t.cleanup.argument),a=zg(n,i);Bg(e,n,r,a)}}}},meta:{docs:{description:`Disallow subscribing to an external store in an effect.`,recommended:!0},messages:{avoidExternalStoreSubscription:`Avoid using an effect to subscribe to an external store. Instead, use "useSyncExternalStore" to manage "{{state}}".`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function Hg(e){return e.defs.some(e=>e.type===`ImportBinding`)}const Ug=/^[A-Z]/u;function W(e){return Ug.test(e)}const Wg=new Set([`%`,`*`,`**`,`+`,`-`,`/`]);function Gg(e){return e.type===`FunctionDeclaration`&&e.id!==null&&W(e.id.name)}function Kg(e){return e.type===`CallExpression`?e.callee.type===`Identifier`?e.callee.name===`memo`:e.callee.type===`MemberExpression`&&e.callee.object.type===`Identifier`&&e.callee.object.name===`React`&&e.callee.property.type===`Identifier`&&e.callee.property.name===`memo`:!1}function qg({callee:e}){return e.type===`Identifier`?e.name===`forwardRef`||e.name===`memo`:e.type===`MemberExpression`&&e.object.type===`Identifier`&&e.object.name===`React`&&e.property.type===`Identifier`&&(e.property.name===`forwardRef`||e.property.name===`memo`)}function Jg({name:e}){return e.type===`JSXIdentifier`?e.name:e.name.name}function Yg(e,t){for(let n of e.openingElement.attributes)if(n.type===`JSXAttribute`&&n.name.type===`JSXIdentifier`&&n.name.name===t)return!0;return!1}function Xg(e,t){switch(e.type){case`BinaryExpression`:return Wg.has(e.operator)?(t.push(e.right,e.left),!0):!1;case`Identifier`:case`Literal`:return!0;case`MemberExpression`:return!e.computed&&(t.push(e.object),!0);case`ParenthesizedExpression`:return t.push(e.expression),!0;case`TemplateLiteral`:return e.expressions.length===0;case`UnaryExpression`:return t.push(e.argument),!0;default:return!1}}function Zg(e){let t=[e];for(;t.length>0;){let e=t.pop();if(e===void 0)break;if(!Xg(e,t))return!1}return!0}function Qg(e,n){return e?.type===`CallExpression`&&e.callee.type===`Identifier`&&(t.isString(n)?e.callee.name===n:n.has(e.callee.name))}function $g(e){return e.type===`VariableDeclarator`&&e.id.type===`Identifier`&&W(e.id.name)&&e.init!==null&&(e.init.type===`ArrowFunctionExpression`||e.init.type===`FunctionExpression`)}function e_(e){return e.loc.end.line-e.loc.start.line+1}function t_(e){if(!(e.type!==`FunctionDeclaration`||!Gg(e)||e.id===null||e.body===null)&&!(!S(e.id)||!(`name`in e.id)||!t.isString(e.id.name)))return{name:e.id.name,body:e.body,nameNode:e.id}}function n_(e){if(e.type!==`VariableDeclarator`||!$g(e)||e.init===null||!(`name`in e.id)||!t.isString(e.id.name)||e.init.type!==`ArrowFunctionExpression`&&e.init.type!==`FunctionExpression`||!S(e.init.body))return;let{name:n}=e.id;return{name:n,body:e.init.body,nameNode:e.id}}const r_=b(`no-giant-component`,`react`,{create(e){function t(t,n,r){let i=e_(r);i<=300||e.report({data:{name:n,lineCount:String(i)},messageId:`giantComponent`,node:t})}return{FunctionDeclaration(e){let n=t_(e);n!==void 0&&t(n.nameNode,n.name,n.body)},VariableDeclarator(e){let n=n_(e);n!==void 0&&t(n.nameNode,n.name,n.body)}}},meta:{docs:{description:`Report React components whose bodies exceed 300 lines.`,recommended:!0},messages:{giantComponent:`Component "{{name}}" is {{lineCount}} lines — consider breaking it into smaller focused components`},type:`problem`}}),i_=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`]),a_=`maxDestructuredProps`;function o_(e){if(e.type===`FunctionDeclaration`&&e.id!==null&&C(e.id.name))return e.id.name;if(e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`&&C(t.id.name))return t.id.name;if(t.type===`Property`&&t.key.type===`Identifier`&&C(t.key.name)||t.type===`MethodDefinition`&&t.key.type===`Identifier`&&C(t.key.name))return t.key.name}}function s_(e){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`&&C(t.id.name))return t.id.name;if(t.type===`AssignmentExpression`&&t.left.type===`Identifier`&&C(t.left.name))return t.left.name;let n;if(t.type===`ExportDefaultDeclaration`&&e.arguments.length>0){let[t]=e.arguments;t?.type===`FunctionExpression`&&t.id&&C(t.id.name)&&(n=t.id.name)}return n}function c_(e){if(!Le(e))return;let[t]=e.params;if(!t)return;let n;if(t.type===`ObjectPattern`&&(n=t),t.type===`AssignmentPattern`&&t.left.type===`ObjectPattern`&&(n=t.left),!n)return;let r=0;for(let e of n.properties)e.type===`Property`&&(r+=1);return r}function l_(e,t){return t?.type===`TSLiteralType`}function u_(e,t){if(!Le(e)||e.body===null)return{maxJsxDepth:0,nullLiterals:[],stateHookCount:0};let n=0,r=0,i=[],a=0;return da(e.body,o=>{if(!(o!==e&&i_.has(o.type))){if(o.type===`JSXElement`||o.type===`JSXFragment`){a+=1,a>n&&(n=a);return}if(o.type===`CallExpression`){let e=N(o);e!==void 0&&e.length>0&&t.has(e)&&(r+=1)}o.type===`Literal`&&o.value===null&&!l_(o,o.parent)&&i.push(o)}}),{maxJsxDepth:n,nullLiterals:i,stateHookCount:r}}function d_(e){let t={enforceTargetLines:!0,ignoreComponents:[],maxDestructuredProperties:5,maxLines:200,maxStateHooks:5,maxTsxNesting:3,stateHooks:[`useState`,`useReducer`,`useBinding`],targetLines:120},n=e??{};return{enforceTargetLines:n.enforceTargetLines??t.enforceTargetLines,ignoreComponents:n.ignoreComponents??t.ignoreComponents,maxDestructuredProperties:n[a_]??t.maxDestructuredProperties,maxLines:n.maxLines??t.maxLines,maxStateHooks:n.maxStateHooks??t.maxStateHooks,maxTsxNesting:n.maxTsxNesting??t.maxTsxNesting,stateHooks:n.stateHooks??t.stateHooks,targetLines:n.targetLines??t.targetLines}}const f_=`tooManyProps`,p_=b(`no-god-components`,`react`,{create(e){let n=d_(e.options[0]),r=new Set(n.ignoreComponents),i=new Set(n.stateHooks),a=new WeakSet;function o(o,s){if(r.has(s)||a.has(o))return;a.add(o);let c=o.loc,l=c.end.line-c.start.line+1;l>n.maxLines?e.report({data:{name:s,lines:String(l),max:String(n.maxLines),target:String(n.targetLines)},messageId:`exceedsMaxLines`,node:o}):n.enforceTargetLines&&l>n.targetLines&&e.report({data:{name:s,lines:String(l),max:String(n.maxLines),target:String(n.targetLines)},messageId:`exceedsTargetLines`,node:o});let u=c_(o);t.isNumber(u)&&u>n.maxDestructuredProperties&&e.report({data:{name:s,count:String(u),max:String(n.maxDestructuredProperties)},messageId:f_,node:o});let d=u_(o,i);d.maxJsxDepth>n.maxTsxNesting&&e.report({data:{name:s,depth:String(d.maxJsxDepth),max:String(n.maxTsxNesting)},messageId:`tsxNestingTooDeep`,node:o}),d.stateHookCount>n.maxStateHooks&&e.report({data:{name:s,count:String(d.stateHookCount),hooks:n.stateHooks.join(`, `),max:String(n.maxStateHooks)},messageId:`tooManyStateHooks`,node:o});for(let t of d.nullLiterals)e.report({messageId:`nullLiteral`,node:t})}function s(e){let t=o_(e);t!==void 0&&t.length!==0&&o(e,t)}return{ArrowFunctionExpression:s,CallExpression(e){if(!qg(e))return;let[t]=e.arguments;if(!t||t.type!==`FunctionExpression`&&t.type!==`ArrowFunctionExpression`)return;let n=s_(e),r=o_(t),i=n??r;i!==void 0&&i.length!==0&&o(t,i)},FunctionDeclaration(e){e.type===`FunctionDeclaration`&&s(e)},FunctionExpression(e){e.type===`FunctionExpression`&&s(e)}}},meta:{docs:{description:`Enforce React component size and complexity limits inspired by the 'Refactor God Component' checklist.`,recommended:!1},messages:{exceedsMaxLines:`Component '{{name}}' is {{lines}} lines; max allowed is {{max}}. Split into smaller components/hooks.`,exceedsTargetLines:`Component '{{name}}' is {{lines}} lines; target is {{target}} (max {{max}}). Consider extracting hooks/components.`,nullLiteral:"Avoid `null` in components; use `undefined` instead.",[f_]:`Component '{{name}}' destructures {{count}} props; max allowed is {{max}}. Group props or split the component.`,tooManyStateHooks:`Component '{{name}}' has {{count}} state hooks ({{hooks}}); max allowed is {{max}}. Extract cohesive state into a custom hook.`,tsxNestingTooDeep:`Component '{{name}}' has TSX nesting depth {{depth}}; max allowed is {{max}}. Extract child components.`},schema:[{additionalProperties:!1,properties:{enforceTargetLines:{default:!0,description:`Whether to report when exceeding targetLines (soft limit).`,type:`boolean`},ignoreComponents:{default:[],description:`Component names to ignore.`,items:{type:`string`},type:`array`},[a_]:{default:5,description:`Maximum number of destructured props in a component parameter.`,type:`number`},maxLines:{default:200,description:`Hard maximum lines for a component.`,type:`number`},maxStateHooks:{default:5,description:`Maximum number of stateful hook calls in a component.`,type:`number`},maxTsxNesting:{default:3,description:`Maximum JSX/TSX nesting depth in a component.`,type:`number`},stateHooks:{default:[`useState`,`useReducer`,`useBinding`],description:`Hook names to count toward state complexity.`,items:{type:`string`},type:`array`},targetLines:{default:120,description:`Soft target lines for a component.`,type:`number`}},type:`object`}],type:`problem`}});function m_(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isStateCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=t.getStateName(r);if(a===void 0)continue;let o=`undefined`,[s]=i.arguments;s!==void 0&&(o=e.sourceCode.getText(s)),e.report({data:{arguments:o,state:a},messageId:`avoidInitializingState`,node:i})}}const h_=b(`no-initialize-state`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects)t.dependencyReferences!==void 0&&t.dependencyReferences.every(n.isStateSetter)&&m_(e,n,t)}}},meta:{docs:{description:`Disallow initializing state in an effect.`,recommended:!0},messages:{avoidInitializingState:`Avoid initializing state in an effect. Instead, initialize "{{state}}"'s "useState()" with "{{arguments}}". For SSR hydration, prefer "useSyncExternalStore".`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function g_(e){return e.name.type===`JSXIdentifier`?e.name.name:void 0}function __(e){switch(e.type){case`ArrayExpression`:return`array`;case`ArrowFunctionExpression`:case`FunctionExpression`:return`function`;case`JSXElement`:case`JSXFragment`:return`JSX`;case`ObjectExpression`:return`object`;default:return}}const v_=b(`no-inline-property-on-memo-component`,`react`,{create(e){let t=new Set;return{JSXAttribute(n){if(n.value?.type!==`JSXExpressionContainer`||n.value.expression.type===`JSXEmptyExpression`)return;let r=n.parent;if(!pe(r))return;let i=g_(r);if(i===void 0||!t.has(i))return;let a=__(n.value.expression);a!==void 0&&e.report({data:{name:i,type:a},messageId:`inlineProperty`,node:n.value.expression})},VariableDeclarator(e){e.id.type===`Identifier`&&e.init!==null&&Kg(e.init)&&t.add(e.id.name)}}},meta:{docs:{description:`Prevent inline properties from being passed to memoized components.`,recommended:!0},messages:{inlineProperty:`Inline {{type}} passed to memoized component "{{name}}" — new references cause unnecessary re-renders`},type:`problem`}});function y_(e){return e.parent.type===`ExpressionStatement`?!0:e.parent.type!==`UnaryExpression`||e.parent.operator!==`void`?!1:e.parent.parent.type===`ExpressionStatement`}function b_(e,t,n,r){if(Gm(e,t))for(let t of e.specifiers){if(t.type===`ImportSpecifier`){se(t.imported,`useMemo`)&&n.add(t.local.name);continue}r.add(t.local.name)}}const x_=new Set([`Instance`]);function S_(e){let n=t.isObject(e)&&M(e.constructors)?new Set(e.constructors):x_,r=t.isObject(e)&&e.environment===`standard`?`standard`:`roblox-ts`,i=t.isObject(e)?e.maxHelperTraceDepth:void 0;return{constructors:n,environment:r,maxHelperTraceDepth:Di(i)&&Number.isInteger(i)&&i>=0?i:4}}function C_(e){return e?.type===`CallExpression`}function w_(e,t,n){let r=e.parent;for(;r!==null;){if(k(r)){let{parent:e}=r;if(C_(e)&&e.arguments[0]===r){if(!ue(e,t,n)){r=e.parent;continue}return!0}}r=r.parent}return!1}function T_(e,t,n,r,i){let a=r.get(e);if(a!==void 0)return a;if(i.has(e))return new Set;i.add(e);let o=new Set;for(let a of e.defs){let e=E_(a,t,n,r,i);for(let t of e)o.add(t)}return i.delete(e),r.set(e,o),o}function E_(e,t,n,r,i){if(e.type===`FunctionName`)return D_(e.node,n);if(e.type!==`Variable`)return new Set;let{node:a}=e;if(a.type!==`VariableDeclarator`||a.init===null)return new Set;let o=m(a.init);if(k(o))return O_(o,n);if(o.type!==`Identifier`)return new Set;let s=_(t.getScope(o),o.name);return s===void 0?new Set:T_(s,t,n,r,i)}function D_(e,t){return e.type===`FunctionDeclaration`?O_(e,t):new Set}function O_(e,t){let n=t.get(e)?.id;return n===void 0?new Set:new Set([n])}function k_(e,t,n,r){let i=_(t.getScope(e),e.name);return i===void 0?new Set:T_(i,t,n,r,new Set)}function A_(e,t,n,r){for(let i of t.values())for(let t of i.callIdentifiers){let a=k_(t,e,n,r);for(let e of a)i.callees.add(e)}}function j_(e,t,n){let r=new Set(e),i=[];for(let t of e)i.push({depth:0,functionId:t});let a=0;for(;a<i.length;){let e=i[a];if(a+=1,e===void 0||e.depth>=n)continue;let o=t.get(e.functionId);if(o!==void 0)for(let t of o.callees)r.has(t)||(r.add(t),i.push({depth:e.depth+1,functionId:t}))}return r}function M_(e,t,n,r,i){let a=new Set;for(let e of t){let t=r.get(e)?.id;t!==void 0&&a.add(t)}for(let t of n){let n=k_(t,e,r,i);for(let e of n)a.add(e)}return a}const N_=b(`no-new-instance-in-use-memo`,`react`,{create(e){let t=S_(e.options[0]);if(t.constructors.size===0)return{};let n=Um(t.environment),r=new Set,i=new Set,a=new Map,o=new Map,s=[],c=[],l=[],u=[],d=new Map,f=0;function p(e){let t=a.get(e);if(t!==void 0)return t;let n={id:f,callees:new Set,callIdentifiers:[]};return f+=1,a.set(e,n),o.set(n.id,n),n}function m(e){let t=s.at(-1);if(t===void 0)return;let n=o.get(t);n!==void 0&&n.callIdentifiers.push(e)}function h(e){s.push(p(e).id)}function g(){s.pop()}return{ArrowFunctionExpression:h,"ArrowFunctionExpression:exit":g,CallExpression(e){if(e.callee.type===`Identifier`&&m(e.callee),!ue(e,r,i))return;let[t]=e.arguments;if(t!==void 0){if(t.type===`Identifier`){l.push(t);return}k(t)&&u.push(t)}},FunctionDeclaration:h,"FunctionDeclaration:exit":g,FunctionExpression:h,"FunctionExpression:exit":g,ImportDeclaration(e){b_(e,n,r,i)},NewExpression(e){if(e.callee.type!==`Identifier`)return;let n=e.callee.name;t.constructors.has(n)&&c.push({constructorName:n,containingFunctionId:s.at(-1),isLexicallyInsideUseMemo:w_(e,r,i),node:e})},"Program:exit"(){A_(e.sourceCode,o,a,d);let n=j_(M_(e.sourceCode,u,l,a,d),o,t.maxHelperTraceDepth);for(let t of c)!(t.containingFunctionId!==void 0&&n.has(t.containingFunctionId))&&!t.isLexicallyInsideUseMemo||e.report({data:{constructorName:t.constructorName},messageId:`noNewInUseMemo`,node:t.node})}}},meta:{docs:{description:`Disallow configured constructor calls (default: new Instance) inside React useMemo callbacks.`},messages:{noNewInUseMemo:"Avoid creating '{{constructorName}}' with `new` inside useMemo. Create it outside the memo callback or use an effect/ref pattern."},schema:[{additionalProperties:!1,properties:{constructors:{default:[...x_],description:`Constructor identifiers that should be disallowed inside useMemo callbacks.`,items:{type:`string`},type:`array`},environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},maxHelperTraceDepth:{default:4,description:`Maximum depth for tracing local helper function calls from useMemo callbacks. 0 disables helper traversal.`,minimum:0,type:`integer`}},type:`object`}],type:`problem`}});function P_(e,t){let n=[];for(let r of e.scope.getArgumentUpstreamReferences(t)){if(e.scope.getUpstreamReferences(r).length!==1)continue;let{identifier:t}=r;R_(t)||e.isProp(r)||z_(t)||e.isRefCurrent(r)||e.isConstant(r)||n.push(r)}return n}function F_(e,t,n){let r=e.getComponentName(t);return r!==void 0&&r!==``?`"${r}"`:n?`this custom hook`:`this component`}function I_(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isPropCall(r)||t.isRefCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=P_(t,r);if(a.length===0)continue;let o=t.findEnclosingReactNode(n.node),s=o!==void 0&&t.isCustomHook(o);e.report({data:{name:F_(t,o,s),data:a.map(e=>`"${e.identifier.name}"`).join(` and `)},messageId:s?`avoidPassingDataToParentInHook`:`avoidPassingDataToParentInComponent`,node:i})}}const L_=b(`no-pass-data-to-parent`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects)t.cleanup===void 0&&I_(e,n,t)}}},meta:{docs:{description:`Disallow passing data to parents in an effect.`,recommended:!0},messages:{avoidPassingDataToParentInComponent:`Avoid passing data to parents in an effect. Instead, fetch "{{data}}" in the parent and pass it down to {{name}} as a prop.`,avoidPassingDataToParentInHook:`Avoid passing data to parents in an effect. Instead, return "{{data}}" from {{name}}.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function R_(e){return e.type!==`Identifier`&&e.type!==`MemberExpression`?!1:e.type===`Identifier`?e.name===`useState`:e.object.type===`Identifier`&&e.object.name===`React`&&e.property.type===`Identifier`&&e.property.name===`useState`}function z_(e){return e.type!==`Identifier`&&e.type!==`MemberExpression`?!1:e.type===`Identifier`?e.name===`useRef`:e.object.type===`Identifier`&&e.object.name===`React`&&e.property.type===`Identifier`&&e.property.name===`useRef`}function B_(e,t,n){let r=e.getComponentName(t);return r!==void 0&&r!==``?`"${r}"`:n?`this custom hook`:`this component`}function V_(e){return e.map(e=>`"${e.identifier.name}"`).join(` and `)}function H_(e,t,n){for(let r of n.functionReferences){if(!t.scope.isSynchronousWithin(r.identifier,n.functionNode)||!t.isPropCall(r))continue;let i=t.scope.getCallExpression(r);if(i===void 0)continue;let a=t.scope.getArgumentUpstreamReferences(r).filter(e=>t.isState(e));if(a.length===0)continue;let o=t.findEnclosingReactNode(n.node),s=o!==void 0&&t.isCustomHook(o);e.report({data:{name:B_(t,o,s),state:V_(a)},messageId:s?`avoidPassingLiveStateToParentInHook`:`avoidPassingLiveStateToParentInComponent`,node:i})}}const U_=b(`no-pass-live-state-to-parent`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t);return{Program(){for(let t of n.effects)H_(e,n,t)}}},meta:{docs:{description:`Disallow passing live state to parents in an effect.`,recommended:!0},messages:{avoidPassingLiveStateToParentInComponent:`Avoid passing live state to parents in an effect. Instead, lift "{{state}}" to the parent and pass it down to {{name}} as a prop.`,avoidPassingLiveStateToParentInHook:`Avoid passing live state to parents in an effect. Instead, return "{{state}}" from {{name}}.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}}),W_=new Set([`JSXElement`,`ReactElement`,`ReactNode`]),G_=new Set([`ChainExpression`,`ParenthesizedExpression`,`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]),K_=/^use[A-Z]/u;function q_(e){return K_.test(e)}function J_(e){if(e?.type!==`TSTypeReference`)return!1;let{typeName:t}=e;return t.type===`Identifier`?W_.has(t.name):t.type===`TSQualifiedName`&&W_.has(t.right.name)}function Y_({returnType:e}){return e?.typeAnnotation??void 0}function X_(e){if(e.type===`ArrowFunctionExpression`&&(e.body.type===`JSXElement`||e.body.type===`JSXFragment`))return!0;if(e.body===null)return!1;let t=!1;return fa(e.body,e=>{if(t||e.type!==`ReturnStatement`)return;let{argument:n}=e;n!==null&&(n.type===`JSXElement`||n.type===`JSXFragment`)&&(t=!0)}),t}function Z_({parent:e}){return e.type===`CallExpression`||e.type===`JSXExpressionContainer`||e.type===`ArrayExpression`}function Q_(e){if(e.parent?.type===`VariableDeclarator`&&e.parent.id.type===`Identifier`)return e.parent.id.name}function $_(e){return e.type===`Identifier`?e.name:void 0}function ev(e){let t=e;for(;t!==void 0&&G_.has(t.type);)t=t.parent??void 0;return t}function tv(e){let t=ev(e.parent??void 0);return t?.type===`Property`&&iv(t.value)===e}function nv(e){let t=ev(e.parent??void 0);return t?.type===`JSXExpressionContainer`&&t.parent.type===`JSXAttribute`&&iv(t.expression)===e}function rv(e){let t=ev(e.parent??void 0);return t?.type===`CallExpression`&&t.arguments.some(t=>iv(t)===e)}function iv(e){let t=e;for(;av(t);)t=t.expression;return t}function av(e){return G_.has(e.type)}function ov(e,t){if(t.type===`FunctionDeclaration`){let n=e.getDeclaredVariables(t);return n.length>0?n[0]:void 0}let{parent:n}=t;if(n.type!==`VariableDeclarator`)return;let r=e.getDeclaredVariables(n);return r.length>0?r[0]:void 0}function sv(e,t){let n=ov(t,e);if(n===void 0)return!1;let r=!1;for(let e of n.references)if(!e.isWrite()&&(r=!0,!tv(e.identifier)&&!nv(e.identifier)&&!rv(e.identifier)))return!1;return r}const cv=b(`no-render-helper-functions`,`react`,{create(e){let t=0;function n(t,n){e.report({data:{functionName:n},messageId:`noRenderHelper`,node:t})}function r(e){return e===void 0||W(e)||q_(e)}function i(t,i){let a=$_(i.id);if(r(a)||sv(t,e.sourceCode))return;let o=ae(i.id),s=o!==void 0&&J_(o.typeAnnotation),c=J_(Y_(t));a!==void 0&&(s||c||X_(t))&&n(i,a)}function a(e){let t=e.type===`FunctionExpression`?e.id?.name:void 0;if(r(t))return;let i=J_(Y_(e));t!==void 0&&(i||X_(e))&&n(e,t)}function o(e){let{parent:n}=e,r=Q_(e);if(r!==void 0&&W(r)){--t;return}if(!(t>0||Z_(e))){if(n.type===`VariableDeclarator`){i(e,n);return}n.type===`ReturnStatement`&&a(e)}}return{ArrowFunctionExpression(e){let n=Q_(e);n!==void 0&&W(n)&&(t+=1)},"ArrowFunctionExpression:exit":o,FunctionDeclaration({id:e}){e!==null&&W(e.name)&&(t+=1)},"FunctionDeclaration:exit"(r){if(r.id===null)return;let i=r.id.name;if(W(i)){--t;return}t>0||q_(i)||sv(r,e.sourceCode)||(J_(Y_(r))||X_(r))&&n(r,i)},FunctionExpression(e){let n=Q_(e);n!==void 0&&W(n)&&(t+=1)},"FunctionExpression:exit":o}},meta:{docs:{description:`Disallow non-component functions that return JSX or React elements.`},messages:{noRenderHelper:`Convert render helper '{{functionName}}' to a React component. Functions that return JSX should be PascalCase components, not camelCase helpers.`},schema:[],type:`suggestion`}}),lv=b(`no-reset-all-state-on-property-change`,`react`,{create(e){let t=H(e.options[0]),n=U(e.sourceCode,t),{sourceCode:r}=e;return{Program(){for(let t of n.effects){if(t.dependencyReferences===void 0)continue;let i=n.findEnclosingReactNode(t.node);if(i!==void 0&&n.isCustomHook(i))continue;let a=uv(r,n,t.functionReferences,t.dependencyReferences,t.node);a!==void 0&&e.report({data:{prop:a.identifier.name},messageId:`avoidResettingAllStateWhenAPropChanges`,node:t.node})}}}},meta:{docs:{description:`Disallow resetting all state in an effect when a prop changes.`,recommended:!0},messages:{avoidResettingAllStateWhenAPropChanges:`Avoid resetting all state when a prop changes. Instead, if "{{prop}}" is a key, pass it as "key" so React will reset the component's state.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`suggestion`}});function uv(e,t,n,r,i){let a=n.filter(e=>t.isStateCall(e));if(a.length>0&&a.every(n=>dv(e,t,n))&&a.length===pv(t,t.findEnclosingReactNode(i)))return r.flatMap(e=>t.scope.getUpstreamReferences(e)).find(e=>t.isProp(e))}function dv(e,t,n){let r=t.scope.getCallExpression(n);if(r===void 0)return!1;let[i]=r.arguments,a=t.getUseStateDeclaration(n);if(a?.init?.type!==`CallExpression`)return!1;let[o]=a.init.arguments;return fv(i)&&fv(o)?!0:i===void 0||o===void 0?!1:e.getText(i)===e.getText(o)}function fv(e){return e===void 0||e.type===`Identifier`&&e.name===`undefined`}function pv(e,t){let n=t;for(;n!==void 0;){if(n.type===`VariableDeclarator`&&n.init?.type===`CallExpression`){let[e]=n.init.arguments;if(e===void 0||e.type!==`ArrowFunctionExpression`&&e.type!==`FunctionExpression`)return 0;n=e;continue}return e.scope.getDescendantCallExpressions(n).filter(({callee:e})=>{if(e.type!==`Identifier`&&e.type!==`MemberExpression`)return!1;if(e.type===`MemberExpression`){if(e.computed||e.object.type!==`Identifier`||e.property.type!==`Identifier`||e.object.name!==`React`||e.property.name!==`useState`)return!1}else if(e.name!==`useState`)return!1;return!0}).length}return 0}const mv=`Fragment`;function hv(e,{callee:t},n){return t.type===`Identifier`?Ym(_(e.getScope(t),t.name),`createElement`,n):t.type!==`MemberExpression`||t.computed||g(t)!==`createElement`||t.object.type!==`Identifier`?!1:Xm(_(e.getScope(t.object),t.object.name),n)}function gv(e){return e.type===`Literal`&&t.isString(e.value)}function _v(e,t){if(z(e))return C(t)||t===mv;if(!R(e.scope)||t!==mv&&!C(t))return!1;for(let t of e.defs){if(t.type===`FunctionName`||t.type===`ClassName`)return!0;if(t.type!==`Variable`||t.node.type!==`VariableDeclarator`)continue;let e=t.node.init??void 0;if(e!==void 0&&(k(e)||e.type===`ClassExpression`))return!0}return!1}function vv(e,t,n){let r=_(e.getScope(t),t.name);return Ym(r,mv,n)?!0:r!==void 0&&_v(r,t.name)}function yv(e){let t=e;for(;;){if(t.computed)return;if(t.object.type===`Identifier`)return t.object;if(t.object.type!==`MemberExpression`)return;t=t.object}}function bv(e){if(e.computed)return;let t=g(e);if(t!==void 0)return e.object.type===`MemberExpression`&&bv(e.object)===void 0?void 0:t}function xv(e,t,n){let r=yv(t);if(r===void 0)return!1;let i=bv(t);if(i===void 0)return!1;let a=_(e.getScope(r),r.name);return i===mv&&Xm(a,n)?!0:a===void 0||!z(a)?!1:C(i)}function Sv(e,t,n){return t.type===`SpreadElement`?!1:gv(t)?!0:t.type===`Identifier`?vv(e,t,n):t.type===`MemberExpression`&&xv(e,t,n)}const Cv=b(`no-static-react-create-element`,`react`,{create(e){let t=Wm(e.options[0]),{sourceCode:n}=e;return{CallExpression(r){if(!hv(n,r,t))return;let[i]=r.arguments;i!==void 0&&Sv(n,i,t)&&e.report({messageId:`useJsx`,node:r})}}},meta:{docs:{description:`Require JSX for static React.createElement calls.`,recommended:!0},messages:{useJsx:`Use JSX instead of static React.createElement calls.`},schema:[{additionalProperties:!1,properties:{environment:zm},type:`object`}],type:`problem`}}),wv=b(`no-underscore-react-props`,`react`,{createOnce(e){return{JSXAttribute(t){t.name.type!==`JSXIdentifier`||!t.name.name.startsWith(`_`)||e.report({data:{propName:t.name.name},messageId:`noUnderscoreReactProperty`,node:t.name})}}},meta:{docs:{description:`Ban React property names that begin with an underscore in JSX.`},messages:{noUnderscoreReactProperty:`React prop '{{propName}}' starts with '_'. Remove the leading underscore from the prop name.`},schema:[],type:`problem`}}),Tv=b(`no-unused-use-memo`,`react`,{create(e){let t=new Set,n=new Set,r=Wm(e.options[0]);return{CallExpression(r){!ue(r,t,n)||!y_(r)||e.report({messageId:`unusedUseMemo`,node:r})},ImportDeclaration(e){b_(e,r,t,n)}}},meta:{docs:{description:`Disallow standalone useMemo calls that ignore the memoized value.`,recommended:!0},messages:{unusedUseMemo:`useMemo results must be used. Standalone useMemo calls add overhead without preserving a value.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`}},type:`object`}],type:`problem`}});function Ev(e){if(e.body===null)return;if(e.body.type!==`BlockStatement`)return e.body;if(e.body.body.length!==1)return;let[t]=e.body.body;if(t?.type===`ReturnStatement`)return t.argument??void 0}const Dv=b(`no-use-memo-simple-expression`,`react`,{create(e){return{CallExpression(t){if(!Qg(t,`useMemo`))return;let n=ua(t);if(n===void 0)return;let r=Ev(n);r===void 0||!Zg(r)||e.report({messageId:`simpleMemo`,node:t})}}},meta:{docs:{description:`Disallow useMemo for expressions that are already trivial to compute.`,recommended:!0},messages:{simpleMemo:`useMemo wrapping a trivially cheap expression - memo overhead exceeds the computation`},type:`problem`}}),Ov=[`useEffect`,`useLayoutEffect`,`useInsertionEffect`],kv=[`on`],Av=[`useRef`],jv=[`useState`,`useReducer`];function Mv(e){return e===void 0?{environment:`roblox-ts`,hooks:new Set(Ov),propertyCallbackPrefixes:new Set(kv),refHooks:new Set(Av),reportAdjustState:!0,reportDerivedState:!0,reportDuplicateDeps:!0,reportEffectChain:!0,reportEmptyEffect:!0,reportEventFlag:!0,reportEventSpecificLogic:!0,reportExternalStore:!0,reportInitializeState:!0,reportLogOnly:!0,reportMixedDerivedState:!0,reportNotifyParent:!0,reportPassRefToParent:!0,reportResetState:!0,stateHooks:new Set(jv)}:{environment:Bm(e.environment)?e.environment:`roblox-ts`,hooks:new Set(M(e.hooks)?e.hooks:Ov),propertyCallbackPrefixes:new Set(M(e.propertyCallbackPrefixes)?e.propertyCallbackPrefixes:kv),refHooks:new Set(M(e.refHooks)?e.refHooks:Av),reportAdjustState:e.reportAdjustState??!0,reportDerivedState:e.reportDerivedState??!0,reportDuplicateDeps:e.reportDuplicateDeps??!0,reportEffectChain:e.reportEffectChain??!0,reportEmptyEffect:e.reportEmptyEffect??!0,reportEventFlag:e.reportEventFlag??!0,reportEventSpecificLogic:e.reportEventSpecificLogic??!0,reportExternalStore:e.reportExternalStore??!0,reportInitializeState:e.reportInitializeState??!0,reportLogOnly:e.reportLogOnly??!0,reportMixedDerivedState:e.reportMixedDerivedState??!0,reportNotifyParent:e.reportNotifyParent??!0,reportPassRefToParent:e.reportPassRefToParent??!0,reportResetState:e.reportResetState??!0,stateHooks:new Set(M(e.stateHooks)?e.stateHooks:jv)}}function Nv(e){if(!(e.type!==`MemberExpression`||e.computed||e.property.type!==`Identifier`))return e.property.name}function Pv({callee:e},t,n,r){if(e.type===`Identifier`)return t.has(e.name);let i=ce(e);return i!==void 0&&n.has(i.objectName)&&r.has(i.propertyName)}function Fv(e){if((e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)&&e.id!==null)return e.id.name;let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`)return t.id.name;if(`key`in t&&(!(`computed`in t)||!t.computed)&&S(t.key)&&t.key.type===`Identifier`)return t.key.name}function Iv(e){return Ti(e)&&e.startsWith(`use`)}function Lv(e){if(e.type===`ReturnStatement`)return e.argument===null;if(e.type!==`BlockStatement`||e.body.length!==1)return!1;let[t]=e.body;return t?.type===`ReturnStatement`&&t.argument===null}function Rv(e,t){if(`body`in e&&S(e.body)){if(e.body.type===`BlockStatement`)for(let n of e.body.body)t.push(n);else t.push(e.body)}}function zv(e,t){if(e.type===`BlockStatement`){for(let n of e.body)t.push(n);return}if(e.type===`IfStatement`){t.push(e.consequent),e.alternate!==null&&t.push(e.alternate);return}if(e.type===`DoWhileStatement`||e.type===`ForInStatement`||e.type===`ForOfStatement`||e.type===`ForStatement`||e.type===`LabeledStatement`||e.type===`WhileStatement`||e.type===`WithStatement`){Rv(e,t);return}if(e.type===`SwitchStatement`){for(let n of e.cases)for(let e of n.consequent)t.push(e);return}if(e.type===`TryStatement`){for(let n of e.block.body)t.push(n);if(e.handler!==null)for(let n of e.handler.body.body)t.push(n);if(e.finalizer!==null)for(let n of e.finalizer.body)t.push(n)}}function Bv(e){let t=[...e.body];for(;t.length>0;){let e=t.pop();if(e!==void 0)switch(e.type){case`ArrowFunctionExpression`:continue;case`FunctionDeclaration`:continue;case`FunctionExpression`:continue;case`ReturnStatement`:if(e.argument!==null)return!0;continue;case`BlockStatement`:case`DoWhileStatement`:case`ForInStatement`:case`ForOfStatement`:case`ForStatement`:case`IfStatement`:case`LabeledStatement`:case`SwitchStatement`:case`TryStatement`:case`WhileStatement`:case`WithStatement`:zv(e,t);continue;default:continue}}return!1}function Vv(e){if(e.length===0)return e;let[t]=e;return t?.type!==`IfStatement`||t.alternate!==null||!Lv(t.consequent)?e:e.slice(1)}function Hv(e){return e.type===`ChainExpression`?e.expression:e}function G(e){if(e.type!==`ExpressionStatement`)return;let t=Hv(e.expression);return t.type===`CallExpression`?t:void 0}function Uv(e,t){return e.callee.type===`Identifier`&&t.has(e.callee.name)}function Wv(e){return e.type===`Literal`&&e.value===!1}function Gv(e){return e.type===`Literal`||e.type===`UnaryExpression`&&e.operator===`void`&&e.argument.type===`Literal`&&e.argument.value===0}function Kv(e){return e.type===`ArrayExpression`&&e.elements.length===0}function qv(e){return e.type===`ObjectExpression`&&e.properties.length===0}function Jv(e){if(e.type===`Literal`){let{value:t}=e;return t===``||t===0||t===!1||t===null}return Gv(e)||Kv(e)||qv(e)}function Yv(e,t){let n=G(e);if(n?.callee.type!==`Identifier`)return;let r=t.get(n.callee.name);if(r===void 0||n.arguments.length!==1)return;let[i]=n.arguments;if(!(i===void 0||!Wv(i)))return r}function Xv(e,t){let n=G(e);if(!(n===void 0||Uv(n,t)))return n}function Zv(e,t){return e.type===`UnaryExpression`&&e.operator===`!`&&e.argument.type===`Identifier`&&e.argument.name===t}function Qv(e,t){return e.type===`Identifier`&&e.name===t}function K(e){return e.type===`BlockStatement`?e.body:[e]}function $v(e,t,n){let[r,i,a]=e;if(i===void 0||a===void 0||r?.type!==`IfStatement`||r.alternate!==null)return;let o=Yv(i,t),s=Yv(a,t),c=Lv(r.consequent);if(o!==void 0&&s===void 0)return!c||!Zv(r.test,o)||Xv(a,n)===void 0?void 0:o;if(s!==void 0&&o===void 0&&!(!c||!Zv(r.test,s)))return Xv(i,n)===void 0?void 0:s}function ey(e,t,n){if(e.type!==`IfStatement`||e.alternate!==null)return;let r=K(e.consequent),[i,a]=r;if(i===void 0||a===void 0||r.length!==2)return;let o=Yv(i,t),s=Yv(a,t);if(o!==void 0&&s===void 0)return Qv(e.test,o)?Xv(a,n)===void 0?void 0:o:void 0;if(s!==void 0&&o===void 0&&Qv(e.test,s))return Xv(i,n)===void 0?void 0:s}function ty(e,t,n){if(e.length===3)return $v(e,t,n);if(e.length===1){let[r]=e;return r===void 0?void 0:ey(r,t,n)}}const ny=new Set([`ArrayExpression`,`BinaryExpression`,`CallExpression`,`ChainExpression`,`ConditionalExpression`,`Identifier`,`LogicalExpression`,`MemberExpression`,`ObjectExpression`,`PrivateIdentifier`,`TemplateLiteral`,`UnaryExpression`]);function ry(e){return ny.has(e.type)}function iy(e,t){for(let n of e.elements)n!==null&&n.type!==`SpreadElement`&&t.push(n)}function ay(e,t){t.push(e.callee);for(let n of e.arguments)n.type!==`SpreadElement`&&t.push(n)}function oy(e,t){t.push(e.object),e.computed||t.push(e.property)}function sy(e,t){for(let n of e.properties)n.type===`Property`&&t.push(n.value)}function cy(e,t){switch(e.type){case`ArrayExpression`:iy(e,t);break;case`BinaryExpression`:case`LogicalExpression`:t.push(e.left,e.right);break;case`CallExpression`:ay(e,t);break;case`ChainExpression`:t.push(e.expression);break;case`ConditionalExpression`:t.push(e.test,e.consequent,e.alternate);break;case`MemberExpression`:oy(e,t);break;case`ObjectExpression`:sy(e,t);break;case`TemplateLiteral`:for(let n of e.expressions)t.push(n);break;case`UnaryExpression`:t.push(e.argument)}}function ly(e){let t=[e],n=new Set;for(;t.length>0;){let e=t.pop();if(!(e===void 0||n.has(e))){if(n.add(e),e.type===`Identifier`)return!0;cy(e,t)}}return!1}function uy(e,t){let n=0;for(let r of e){if(r.type===`IfStatement`){if(r.alternate!==null)return;let e=uy(K(r.consequent),t);if(e===void 0||e===0)return;n+=e;continue}let e=G(r);if(e===void 0||!t(e))return;n+=1}return n>0?n:void 0}function dy(e,t){return uy(e,e=>Uv(e,t)?e.arguments.some(e=>e.type!==`SpreadElement`&&ly(e)):!1)}function fy(e,t,n){return uy(e,e=>gy(e,t,n))}function py(e,t){for(let n of t)if(e.startsWith(n))return!0;return!1}function my(e){return e.type===`AssignmentPattern`?e.left:e}function hy(e,t,n,r){let i={functionId:n,isCustomHook:r,propertyCallbackIdentifiers:new Set,propertyObjectName:void 0},[a]=e.params;if(a===void 0)return i;let o=my(a);if(o.type===`Identifier`)return i.propertyObjectName=o.name,i;if(o.type!==`ObjectPattern`)return i;for(let e of o.properties){if(e.type!==`Property`)continue;let n=_a(e);if(n===void 0||!py(n,t))continue;let r=va(e);r!==void 0&&i.propertyCallbackIdentifiers.add(r.name)}return i}function gy({callee:e},t,n){if(e.type===`Identifier`)return t.propertyCallbackIdentifiers.has(e.name);let r=ce(e);return r!==void 0&&t.propertyObjectName!==void 0&&r.objectName===t.propertyObjectName&&py(r.propertyName,n)}function _y(e,t){let[,n]=e.arguments;if(n?.type!==`ArrayExpression`)return!1;for(let e of n.elements)if(e?.type===`Identifier`&&e.name===t)return!0;return!1}function vy(e){let t=new Set,[,n]=e.arguments;if(n?.type!==`ArrayExpression`)return t;for(let e of n.elements)e?.type===`Identifier`&&t.add(e.name);return t}function yy(e){let[,t]=e.arguments;return t===void 0||t.type===`ArrayExpression`&&t.elements.length===0}function by(e,t){if(e.length===0)return!1;for(let n of e){if(n.type===`IfStatement`){if(n.alternate!==null||!by(K(n.consequent),t))return!1;continue}if(!t(n))return!1}return!0}function xy(e,t){let n=new Set;for(let r of e){if(r.type===`IfStatement`){let e=K(r.consequent);for(let r of xy(e,t))n.add(r);continue}let e=G(r);e!==void 0&&Uv(e,t)&&e.callee.type===`Identifier`&&n.add(e.callee.name)}return n}function Sy({callee:e},t){if(e.type===`Identifier`)return t.has(e.name);let n=ce(e);return n!==void 0&&t.has(n.objectName)}function Cy(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(Cy(K(r.consequent),t,n))return!0;continue}let e=G(r);if(e!==void 0&&!Uv(e,t)&&!Sy(e,n))return!0}return!1}function wy(e,t,n){return by(e,e=>{let r=G(e);if(r===void 0||!Uv(r,t)||r.arguments.length!==1)return!1;let[i]=r.arguments;return i!==void 0&&n(i)})}function Ty(e){return e.type===`Literal`&&e.value!==null&&!t.isObject(e.value)||Kv(e)||qv(e)}function Ey(e,t){return wy(e,t,Jv)}function Dy(e,t){return wy(e,t,Ty)}function Oy(e){return by(e,e=>{let t=G(e);return t!==void 0&&ce(t.callee)?.objectName===`console`})}const ky=new Set([`addEventListener`,`addListener`,`on`,`subscribe`]);function Ay(e){return e.some(e=>{let t=G(e);if(t===void 0)return!1;let n=Nv(t.callee);return n!==void 0&&ky.has(n)})}function jy(e,t){return e.type===`MemberExpression`&&!e.computed&&e.object.type===`Identifier`&&e.property.type===`Identifier`&&e.property.name===`current`&&t.has(e.object.name)}function My(e,t,n){return e.callee.type===`Identifier`&&n.has(e.callee.name)&&e.arguments.some(e=>jy(e,t))}function Ny(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(Ny(K(r.consequent),t,n))return!0;continue}let e=G(r);if(e!==void 0&&My(e,t,n))return!0}return!1}function Py(e){let t=new Set,n=new Set,r=ry(e)?[e]:[];for(;r.length>0;){let e=r.pop();if(!(e===void 0||n.has(e))){if(n.add(e),e.type===`Identifier`){t.add(e.name);continue}ry(e)&&cy(e,r)}}return t}function Fy(e){return e.alternate===null?[]:e.alternate.type===`BlockStatement`?e.alternate.body:[e.alternate]}function Iy(e,t,n){return[...Py(e.test)].some(e=>n.has(e)&&!t.has(e))}function Ly(e,t){return e.some(e=>{let n=G(e);return n!==void 0&&Uv(n,t)})}function Ry(e,t,n,r){for(let i of e)if(i.type===`IfStatement`&&(Iy(i,n,r)&&Ly(K(i.consequent),t)||Ry(Fy(i),t,n,r)))return!0;return!1}const zy=new Set([`alert`,`confirm`,`display`,`hide`,`log`,`navigate`,`notify`,`post`,`prompt`,`redirect`,`report`,`send`,`show`,`submit`,`track`]);function By(e){let t=e.toLowerCase();for(let e of zy)if(t.startsWith(e))return!0;return!1}function Vy(e,t){let n=G(e);return n===void 0||Uv(n,t)?!1:n.callee.type===`Identifier`?By(n.callee.name):n.callee.type!==`MemberExpression`||n.callee.computed||n.callee.property.type!==`Identifier`?!1:By(n.callee.property.name)}function Hy(e,t){return[...Py(e.test)].some(e=>t.has(e))}function Uy(e,t,n){for(let r of e)if(r.type===`IfStatement`&&(Hy(r,n)&&K(r.consequent).some(e=>Vy(e,t))||r.alternate!==null&&Uy(Fy(r),t,n)))return!0;return!1}function Wy(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Gy(e,t){return`${e}:${t}`}function Ky(e){if(e.body?.type===`BlockStatement`)return e.body}function qy(e){return e.body.type===`BlockStatement`}function Jy(e){return e.body!==null}const Yy=new Set(`addEventListener.addListener.alert.analytics.cancelAnimationFrame.clearInterval.clearTimeout.confirm.debug.delete.error.fetch.get.info.log.navigate.navigateTo.notify.observe.patch.post.prompt.put.redirect.removeEventListener.removeListener.report.requestAnimationFrame.send.setInterval.setTimeout.showNotification.submit.subscribe.track.unobserve.unsubscribe.warn`.split(`.`)),Xy=[`fetch`,`send`,`post`,`track`],Zy=new Set([`addEventListener`,`addListener`,`cancelAnimationFrame`,`catch`,`clearInterval`,`clearTimeout`,`finally`,`observe`,`removeEventListener`,`removeListener`,`requestAnimationFrame`,`setInterval`,`setTimeout`,`subscribe`,`then`,`unobserve`,`unsubscribe`]),Qy=[`log`,`fetch`,`send`,`track`,`report`,`show`,`navigate`,`submit`,`post`,`notify`];function $y(e){for(let t of Qy)if(e.startsWith(t))return!0;return!1}function eb(e){return e.object.type===`Identifier`&&e.object.name===`console`&&e.property.type===`Identifier`&&(e.property.name===`log`||e.property.name===`warn`||e.property.name===`error`||e.property.name===`info`||e.property.name===`debug`)}function tb(e){for(let t of Xy)if(e.startsWith(t))return!0;return Zy.has(e)}function nb(e,t,n){let{callee:r}=e;return Uv(e,t)?!1:r.type===`Identifier`?n.has(r.name)?!1:Yy.has(r.name)||$y(r.name):r.type!==`MemberExpression`||r.computed||r.property.type!==`Identifier`||r.object.type===`Identifier`&&n.has(r.object.name)?!1:eb(r)||tb(r.property.name)}function rb(e,t,n){for(let r of e){if(r.type===`IfStatement`){if(rb(K(r.consequent),t,n))return!0;continue}let e=G(r);if(e!==void 0&&nb(e,t,n))return!0}return!1}const ib=b(`no-useless-use-effect`,`react`,{create(e){let t=Mv(e.options[0]),n=Um(t.environment),r=new Set,i=new Set,a=new Set,o=new Set,s=new Set,c=new Map,l=new Set,u=new Set,d=[],f=1,p=new Map,m=[];function h(e){return Pv(e,i,r,t.hooks)}function g(e){return Pv(e,a,r,t.stateHooks)}function _(e){return Pv(e,l,r,t.refHooks)}function ee(e){if(e.init?.type!==`CallExpression`||!g(e.init)||e.id.type!==`ArrayPattern`)return;let{elements:t}=e.id;if(t.length<2)return;let[,n]=t;if(n==null||n.type!==`Identifier`)return;o.add(n.name);let[r]=t;r?.type===`Identifier`&&(s.add(r.name),c.set(n.name,r.name))}function te(e){e.init?.type!==`CallExpression`||!_(e.init)||e.id.type!==`Identifier`||u.add(e.id.name)}function v(e){e.id.type===`Identifier`&&e.init!==null&&(e.init.type===`FunctionExpression`||e.init.type===`ArrowFunctionExpression`)&&p.set(e.id.name,e.init)}function y(e){let n=f;f+=1;let r=Fv(e);d.push(hy(e,t.propertyCallbackPrefixes,n,Iv(r))),e.type===`FunctionDeclaration`&&e.id!==null&&p.set(e.id.name,e)}function ne(){d.pop()}function b(e){return!t.reportMixedDerivedState||e.setterCalls.size===0||!e.hasNonSetter||e.hasReturnCleanup?!1:!rb(e.statements,o,e.functionContext?.propertyCallbackIdentifiers??new Set)}function re(e){let{coreStatements:n,dependencyIdentifiers:r,functionContext:i,hasNonSetter:a,hasReturnCleanup:l,node:d,statements:f}=e,p=t.reportEventFlag?ty(f,c,o):void 0,m=[...r].some(e=>!s.has(e)&&!o.has(e));return[[t.reportEmptyEffect&&(f.length===0||f[0]!==void 0&&Lv(f[0])),`emptyEffect`],[t.reportInitializeState&&yy(d)&&Dy(f,o),`initializeState`],[t.reportResetState&&Ey(f,o)&&m,`resetState`],[p!==void 0&&_y(d,p),`eventFlag`],[t.reportEventSpecificLogic&&Uy(f,o,s),`eventSpecificLogic`],[t.reportAdjustState&&Ry(f,o,s,r)&&!a,`adjustState`],[t.reportDerivedState&&dy(n,o)!==void 0,`derivedState`],[b(e),`mixedDerivedState`],[t.reportPassRefToParent&&i!==void 0&&Ny(f,u,i.propertyCallbackIdentifiers),`passRefToParent`],[t.reportNotifyParent&&i!==void 0&&!i.isCustomHook&&fy(n,i,t.propertyCallbackPrefixes)!==void 0,`notifyParent`],[t.reportExternalStore&&Ay(f)&&l,`externalStore`],[t.reportLogOnly&&Oy(f),`logOnly`]].find(([e])=>e)?.[1]}function x(t,n,r){let i=d.at(-1),a=Vv(n),s=vy(t),c=xy(n,o),l=Cy(n,o,i?.propertyCallbackIdentifiers??new Set),u=r!==void 0&&Bv(r);m.push({depIdentifiers:s,hasNonSetterSideEffect:l,hasReturnWithCleanup:u,node:t,ownerFunctionId:i?.functionId??0,setterCalls:c,statements:n});let f=re({coreStatements:a,dependencyIdentifiers:s,functionContext:i,hasNonSetter:l,hasReturnCleanup:u,node:t,setterCalls:c,statements:n});f!==void 0&&e.report({messageId:f,node:t})}function S(){if(!t.reportEffectChain)return;let n=ie();for(let t of m)if(!(t.hasNonSetterSideEffect||t.hasReturnWithCleanup))for(let r of t.depIdentifiers){let i=Gy(t.ownerFunctionId,r),a=n.get(i);if(a!==void 0&&C(a)){e.report({messageId:`effectChain`,node:t.node});return}}}function ie(){let e=new Map;for(let[t,n]of m.entries())for(let r of n.setterCalls){let i=c.get(r);if(i===void 0)continue;let a=Gy(n.ownerFunctionId,i),o=e.get(a);o===void 0&&(o=new Set,e.set(a,o)),o.add(t)}return e}function C(e){return e.size!==0&&[...e].every(e=>{let t=m[e];return t!==void 0&&!t.hasNonSetterSideEffect&&!t.hasReturnWithCleanup})}function w(){if(!t.reportDuplicateDeps||m.length<2)return;let e=new Set;for(let t=0;t<m.length;t+=1){if(e.has(t))continue;let n=ae(t,e);n.length<2||oe(n,e)}}function ae(e,t){let n=m[e];if(n===void 0||n.depIdentifiers.size===0)return[];let r=[e];for(let i=e+1;i<m.length;i+=1){let e=m[i];t.has(i)||e!==void 0&&e.ownerFunctionId===n.ownerFunctionId&&Wy(n.depIdentifiers,e.depIdentifiers)&&r.push(i)}return r}function oe(t,n){for(let r of t){n.add(r);let t=m[r];t!==void 0&&e.report({messageId:`duplicateDeps`,node:t.node})}}function se(e,t){let n=p.get(t);if(n===void 0||n.async)return;let r=Ky(n);r!==void 0&&x(e,r.body.filter(e=>e.type!==`EmptyStatement`),r)}function ce(e,t){if(!t.async){if(t.type===`ArrowFunctionExpression`){if(!qy(t))return;x(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body);return}Jy(t)&&x(e,t.body.body.filter(e=>e.type!==`EmptyStatement`),t.body)}}return{ArrowFunctionExpression:y,"ArrowFunctionExpression:exit":ne,CallExpression(e){if(!h(e))return;let[t]=e.arguments;if(t!==void 0){if(t.type===`Identifier`){se(e,t.name);return}Le(t)&&ce(e,t)}},FunctionDeclaration:y,"FunctionDeclaration:exit":ne,FunctionExpression:y,"FunctionExpression:exit":ne,ImportDeclaration(e){Km(e,n,r,(e,n)=>{t.hooks.has(e)&&i.add(n),t.stateHooks.has(e)&&a.add(n),t.refHooks.has(e)&&l.add(n)})},"Program:exit"(){S(),w()},VariableDeclarator(e){ee(e),te(e),v(e)}}},meta:{docs:{description:`Disallow empty effects, duplicate dependencies, effect chains, log-only effects, derived state, external-store state sync, state initialization, reset effects, parent notifications, parent ref callbacks, and event side effects routed through state.`},messages:{adjustState:`This effect adjusts state when a prop changes. Adjust the state directly during rendering or restructure to avoid this need.`,derivedState:`This effect only derives state from properties or state. Compute the value during rendering instead of useEffect.`,duplicateDeps:`Multiple effects have identical dependency arrays. Combine them into a single effect for better performance.`,effectChain:`This effect is part of a chain of effects that only derive state from other effects. Consolidate the logic into event handlers or compute during rendering.`,emptyEffect:`This effect has an empty body and should be removed.`,eventFlag:`This effect only reacts to a state flag. Call the side effect directly in the event handler instead of toggling state.`,eventSpecificLogic:`This effect runs event-specific logic based on state. Move this logic to the event handler that triggers the state change.`,externalStore:"This effect subscribes to an external store and syncs to state. Use `useSyncExternalStore` instead.",initializeState:`This effect initializes state with a constant value. Pass the value as the useState initializer instead.`,logOnly:`This effect only contains console.log calls. Remove it (debug leftover) or move the logging to an event handler.`,mixedDerivedState:`This effect contains state setter calls that derive values from props or state mixed with other operations. Extract the setter calls and compute values during rendering.`,notifyParent:`This effect only notifies a parent via a property callback. Call the callback in the event handler instead of useEffect.`,passRefToParent:"This effect passes a ref to a parent callback. Use `forwardRef` or `useImperativeHandle` instead.",resetState:"This effect resets state when a prop changes. Pass a `key` prop to the component instead to reset all state automatically."},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:[...Ov],description:`Effect hook names checked for avoidable effect patterns.`,items:{type:`string`},type:`array`},propertyCallbackPrefixes:{default:[...kv],description:`Property name prefixes treated as event callback props.`,items:{type:`string`},type:`array`},refHooks:{default:[...Av],description:`Ref hook names that return mutable ref objects.`,items:{type:`string`},type:`array`},reportAdjustState:{default:!0,description:`Report effects that only adjust state after render.`,type:`boolean`},reportDerivedState:{default:!0,description:`Report effects that copy derived values into state.`,type:`boolean`},reportDuplicateDeps:{default:!0,description:`Report duplicate entries in effect dependency arrays.`,type:`boolean`},reportEffectChain:{default:!0,description:`Report effects that only trigger another effect through state.`,type:`boolean`},reportEmptyEffect:{default:!0,description:`Report effects whose callback body is empty.`,type:`boolean`},reportEventFlag:{default:!0,description:`Report effects that react to event flags stored in state.`,type:`boolean`},reportEventSpecificLogic:{default:!0,description:`Report effects that move event-specific logic out of the event callback.`,type:`boolean`},reportExternalStore:{default:!0,description:`Report effects that mirror external store values into local state.`,type:`boolean`},reportInitializeState:{default:!0,description:`Report effects that only initialize state after mount.`,type:`boolean`},reportLogOnly:{default:!0,description:`Report effects that only log values.`,type:`boolean`},reportMixedDerivedState:{default:!0,description:`Report effects that mix derived-state updates with other work.`,type:`boolean`},reportNotifyParent:{default:!0,description:`Report effects that only notify a parent through a callback prop.`,type:`boolean`},reportPassRefToParent:{default:!0,description:`Report effects that only pass a ref value to a parent callback.`,type:`boolean`},reportResetState:{default:!0,description:`Report effects that reset local state when inputs change.`,type:`boolean`},stateHooks:{default:[...jv],description:`State hook names that return [value, setter] pairs.`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}});let ab=function(e){return e.Aggressive=`aggressive`,e.EmptyOrOmitted=`empty-or-omitted`,e.NonUpdating=`non-updating`,e}({});function ob(e){return!t.isObject(e)||!t.isString(e.dependencyMode)?`non-updating`:e.dependencyMode===`empty-or-omitted`||e.dependencyMode===`aggressive`?e.dependencyMode:`non-updating`}function sb(e){let n=t.isObject(e)&&M(e.staticGlobalFactories)?e.staticGlobalFactories:Tl;return{dependencyMode:ob(e),environment:H(e),staticGlobalFactories:new Set(n)}}function cb(e){return{staticGlobalFactories:e.staticGlobalFactories}}function lb(e){let t=ua(e);if(t===void 0)return;let{body:n}=t;if(n===null)return;if(n.type!==`BlockStatement`)return n;if(n.body.length!==1)return;let[r]=n.body;return r?.type===`ReturnStatement`?r.argument??void 0:void 0}function ub(e,t){switch(t.dependencyMode){case`aggressive`:return!0;case`empty-or-omitted`:return e===0||e===1;case`non-updating`:return e===0||e===1||e===2;default:{let e=Error(`Unknown dependency mode: ${String(t.dependencyMode)}`);throw Error.captureStackTrace(e,ub),e}}}const db=b(`no-useless-use-memo`,`react`,{create(e){let t=sb(e.options[0]),n=cb(t),r=Um(t.environment),i=new Set,a=new Set;return{CallExpression(r){if(!ue(r,i,a)||y_(r)||r.arguments.length===0)return;let o=lb(r);if(o===void 0)return;let s=new Set;B(e.sourceCode,o,s,n)&&ub(ba(e.sourceCode,r.arguments[1],s,n,Vl),t)&&e.report({messageId:`uselessUseMemo`,node:r})},ImportDeclaration(e){b_(e,r,i,a)}}},meta:{docs:{description:`Disallow useMemo calls that only wrap values static enough to live at module scope.`},messages:{uselessUseMemo:`useMemo is wrapping a static value. Move the value to module scope instead of paying hook overhead for no runtime benefit.`},schema:[{additionalProperties:!1,properties:{dependencyMode:{default:`non-updating`,description:`Dependency-array mode used to decide whether a memoized value is static.`,enum:[`empty-or-omitted`,`aggressive`,`non-updating`],type:`string`},environment:{default:`roblox-ts`,description:`The React environment: 'roblox-ts' uses @rbxts/react, 'standard' uses react.`,enum:[`roblox-ts`,`standard`],type:`string`},staticGlobalFactories:{default:Tl,description:`Global constructors and factories whose calls are treated as static values.`,items:{type:`string`},type:`array`}},type:`object`}],type:`suggestion`}}),fb=[`useSpring`];function pb(e){let t=!1,n=!1;for(let r of e.properties)if(!(r.type!==`Property`||r.computed||r.key.type!==`Identifier`)&&(r.key.name===`from`&&(t=!0),r.key.name===`to`&&(n=!0),t&&n))return!0;return!1}function mb(e,t,n){let r=m(t);if(r.type===`ObjectExpression`)return n(r);if(r.type!==`Identifier`)return!1;let i=_(e.getScope(r),r.name);if(i===void 0||!R(i.scope)||z(i))return!1;for(let e of i.defs){let t=Al(e);if(t===void 0)continue;let r=m(t);if(r.type===`ObjectExpression`&&n(r))return!0}return!1}function hb(e,t){return mb(e,t,pb)}function gb(e,t,n,r){let i={staticGlobalFactories:r.staticGlobalFactories};return mb(e,t,t=>Bl(e,t,n,i))}function _b(e,t){return e===0||e===2||e===1&&t.treatEmptyDepsAsViolation}function vb({callee:e},t){if(e.type===`Identifier`)return t.springHooks.has(e.name);if(e.type===`MemberExpression`&&!e.computed){let{property:n}=e;if(n.type===`Identifier`)return t.springHooks.has(n.name)}return!1}const yb=b(`no-useless-use-spring`,`react`,{create(e){let[t]=e.options,n={springHooks:new Set(t?.springHooks??fb),staticGlobalFactories:new Set(t?.staticGlobalFactories??Tl),treatEmptyDepsAsViolation:t?.treatEmptyDepsAsViolation??!0};return{CallExpression(t){if(!vb(t,n)||t.arguments.length===0)return;let[r]=t.arguments;if(r===void 0||r.type===`SpreadElement`)return;let i=new Set;if(!gb(e.sourceCode,r,i,n)||hb(e.sourceCode,r))return;let a=t.arguments.length>1?t.arguments[1]:void 0;_b(ba(e.sourceCode,a,i,n,Vl),n)&&e.report({messageId:`uselessSpring`,node:t})}}},meta:{docs:{description:`Disallow useSpring hooks whose config and dependencies are entirely static`},messages:{uselessSpring:`useSpring call has only static inputs and non-updating dependencies; replace it with a constant or remove the hook.`},schema:[{additionalProperties:!1,default:{springHooks:[...fb],staticGlobalFactories:[...Tl],treatEmptyDepsAsViolation:!0},properties:{springHooks:{default:[...fb],description:`Hook identifiers that should be treated as spring hooks`,items:{type:`string`},type:`array`},staticGlobalFactories:{default:[...Tl],description:`Global factory identifiers that are treated as static constructors`,items:{type:`string`},type:`array`},treatEmptyDepsAsViolation:{default:!0,description:`Treat static config with an empty dependency array as a violation`,type:`boolean`}},type:`object`}],type:`suggestion`}});function bb(e){if(!R(e.scope))return!1;for(let t of e.defs){if(t.type!==`Variable`)continue;let e=t.node;if(e.type!==`VariableDeclarator`)continue;let n=e.parent;if(n.type===`VariableDeclaration`&&n.kind===`const`)return!0}return!1}function xb(e,t){let n=_(e.getScope(t),t.name);return n===void 0?!1:z(n)||bb(n)}function Sb(e,t){let n=_(e.getScope(t),t.name);return n===void 0?!1:z(n)||R(n.scope)}function Cb(e,t){let n=t;for(;n.type===`MemberExpression`;){if(n.computed)return!1;n=m(n.object)}return n.type===`Identifier`&&Sb(e,n)}function wb(e,t){let n=m(t);switch(n.type){case`Identifier`:return xb(e,n);case`Literal`:return!0;case`MemberExpression`:return Cb(e,n);case`TemplateLiteral`:return n.expressions.length===0;case`UnaryExpression`:return n.operator===`-`&&m(n.argument).type===`Literal`;default:return!1}}function Tb(e,t){for(let n of t.properties)if(n.type!==`Property`||n.kind!==`init`||n.computed||!wb(e,n.value))return!1;return!0}function Eb(e,t){if(t.id.type!==`ArrayPattern`||t.init?.type!==`CallExpression`||N(t.init)!==`useReducer`)return;let n=t.id.elements[1];if(n!=null&&n.type===`Identifier`)return _(e.getScope(n),n.name)}function Db(e){let t=e;for(;t!==void 0;){if(t.type===`Program`)return t;t=t.parent}}function Ob(e,t,n,r,i){let a=`const ${r} = ${t.getText(n)};`,{body:o}=i,s;for(let e of o){if(e.type===`ImportDeclaration`){s=e;continue}break}if(s!==void 0)return e.insertTextAfter(s,`\n\n${a}`);let[c]=o;return c===void 0?e.insertTextAfterRange([i.range[0],i.range[1]],a):e.insertTextBefore(c,`${a}\n\n`)}const kb=b(`prefer-constant-dispatch`,`react`,{create(e){let t=new Set,{sourceCode:n}=e,r=0;return{CallExpression(i){if(i.callee.type!==`Identifier`)return;let a=_(n.getScope(i.callee),i.callee.name);if(a===void 0||!t.has(a))return;let[o]=i.arguments;if(o===void 0||o.type===`SpreadElement`)return;let s=m(o);if(s.type!==`ObjectExpression`||!Tb(n,s))return;let c=Db(s);if(c===void 0)return;let l=`PREFER_CONSTANT_ACTION_${r}`;r+=1,e.report({messageId:`preferConstantDispatch`,node:s,suggest:[{desc:`Extract to module constant \`${l}\``,fix(e){return[Ob(e,n,s,l,c),e.replaceText(s,l)]}}]})},VariableDeclarator(e){let r=Eb(n,e);r!==void 0&&t.add(r)}}},meta:{docs:{description:`Disallow inline useReducer action objects that could be module-level constants.`,recommended:!0},hasSuggestions:!0,messages:{preferConstantDispatch:`Move this inline useReducer action object to a module-level constant.`},schema:[],type:`suggestion`}}),Ab=new p({extensions:[`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.cjs`,`.json`,`.node`]}),jb={found:!1};function Mb(e,t){if(!e.startsWith(`.`))return jb;let{path:n}=Ab.sync(i.dirname(t),e);return n===void 0||n===``?jb:{found:!0,path:n}}const Nb=new Set([`.js`,`.jsx`,`.ts`,`.tsx`]),Pb=new Set([`.git`,`.next`,`.turbo`,`__fixtures__`,`__mocks__`,`__tests__`,`coverage`,`dist`,`documentation`,`example`,`examples`,`fixture`,`fixtures`,`node_modules`,`opensrc`,`stories`,`story`,`test`,`tests`]),Fb=/\bexport\s+default\b/u,Ib=/\/index$/u,Lb=/\.(?:[cm]?jsx?|tsx?)$/u,Rb=new Map,zb=new Map,Bb=new Map,Vb=/[.*+?^${}()|[\]\\]/gu,Hb=String.raw`\$&`;function Ub(e){return e.replaceAll(Vb,Hb)}const Wb=new Map;function Gb(e){return e.includes(`u`)||e.includes(`v`)?e:`${e}u`}function Kb(e,t){let n=`${t}:${e}`,r=Wb.get(n);if(r!==void 0)return r;let i=new RegExp(e,Gb(t));if(Wb.size>=64){let e=Wb.keys().next().value;e!==void 0&&Wb.delete(e)}return Wb.set(n,i),i}function qb(e){return e.replaceAll(`\\`,`/`)}function Jb(e){let t=zb.get(e);if(t!==void 0)return t;let n=d(e,`utf8`);return zb.set(e,n),n}function Yb(e,t){let n=Ub(t);return Kb(`\\bexport\\s+(?:const|function|class)\\s+${n}\\b`,`u`).test(e)||Kb(`\\bexport\\s*\\{[^}]*\\b${n}\\b[^}]*\\}`,`u`).test(e)?`named`:Fb.test(e)&&Kb(`\\b${n}\\b`,`u`).test(e)?`default`:void 0}function Xb(e,t){for(let n of t)if(!Kb(`\\b${Ub(n)}\\b`,`u`).test(e))return!1;return!0}function Zb(e){let t=Bb.get(e);if(t!==void 0)return t;let n=e;for(;;){if(u(i.join(n,`package.json`))||u(i.join(n,`tsconfig.json`)))return Bb.set(e,n),n;let t=i.dirname(n);if(t===n){Bb.set(e,void 0);return}n=t}}function Qb(e){let t=Rb.get(e);if(t!==void 0)return t;let n=new Map;function r(e){let t=f(e,{withFileTypes:!0});for(let a of t){let t=a.name.toLowerCase();if(a.name.startsWith(`.`)&&a.name!==`.storybook`||Pb.has(t))continue;let o=i.join(e,a.name);if(a.isDirectory()){r(o);continue}let s=i.extname(a.name);if(!Nb.has(s)||a.name.endsWith(`.d.ts`))continue;let c=i.basename(a.name,s).toLowerCase(),l=n.get(c);l===void 0?n.set(c,[o]):l.push(o)}}r(e);let a=new Map;for(let[e,t]of n)a.set(e,t);return Rb.set(e,a),a}function $b(e,t){let n=qb(i.relative(i.dirname(e),t));return n=n.replace(Lb,``),n=n.replace(Ib,``),n.startsWith(`.`)||(n=`./${n}`),n}function ex(e){let t=Zb(i.dirname(e)),n=qb(t===void 0?e:i.relative(t,e));for(let e of n.split(`/`))if(Pb.has(e.toLowerCase()))return!0;return!1}function tx(e,t){if(ex(e))return{importStyle:void 0,matches:!1};let n=i.extname(e);if(!Nb.has(n)||e.endsWith(`.d.ts`))return{importStyle:void 0,matches:!1};let r=i.basename(e,n).toLowerCase();if(!t.fileNames.map(e=>e.toLowerCase()).includes(r))return{importStyle:void 0,matches:!1};let a=Jb(e);if(!Kb(`\\b${Ub(t.componentName)}\\b`,`u`).test(a)||t.markers!==void 0&&!Xb(a,t.markers))return{importStyle:void 0,matches:!1};let o=Yb(a,t.componentName);return o===void 0?{importStyle:void 0,matches:!1}:{importStyle:o,matches:!0}}function nx(e,n,r){let i=e.source.value;if(!t.isString(i)||!i.startsWith(`.`)||n.length===0)return{importStyle:void 0,matches:!1};let a=Mb(i,n);return a.found?tx(a.path,r):{importStyle:void 0,matches:!1}}function rx(e,t,n,r){if(t.matches)for(let t of e.specifiers){if(t.type===`ImportDefaultSpecifier`){r.add(t.local.name);continue}if(t.type!==`ImportSpecifier`)continue;let{imported:e}=t;(e.type===`Identifier`?e.name:e.value)===n&&r.add(t.local.name)}}function ix(e,t){let n=Zb(i.dirname(e));if(n===void 0)return{found:!1};let r=Qb(n),a=new Set;for(let e of t.fileNames){let t=r.get(e.toLowerCase())??[];for(let e of t)a.add(e)}let o=[...a].filter(e=>tx(e,t).matches);if(o.length!==1)return{found:!1};let[s]=o;if(s===void 0)return{found:!1};let c=tx(s,t);return{found:!0,importSource:$b(e,s),importStyle:c.importStyle,path:s}}const ax={componentName:`ContextStack`,fileNames:[`context-stack`],markers:[`providers`]},ox=new Set([`.jsx`,`.tsx`]);function sx(e){return e.openingElement.name.type===`JSXMemberExpression`&&e.openingElement.name.property.name===`Provider`}function cx(e){return e.children.filter(e=>e.type===`JSXText`?e.value.trim().length>0:e.type!==`JSXExpressionContainer`||e.expression.type!==`JSXEmptyExpression`)}function lx(e){let{parent:t}=e;if(t.type!==`JSXElement`||!sx(t))return!1;let n=cx(t);return n.length===1&&n[0]===e}function ux(e){if(!sx(e))return;let t=[e],n=e;for(;;){let e=cx(n);if(e.length!==1)break;let[r]=e;if(r?.type!==`JSXElement`||!sx(r))break;t.push(r),n=r}return t.length>1?t:void 0}function dx(e,t){let n=!1;for(let r of e.children){if(r===t){n=!0;continue}if(r.type!==`JSXText`||r.value.trim()!==``)return!1}return n}function fx(e){let t=0;for(let n of e){let r=e[t+1];if(r===void 0){t+=1;continue}if(!dx(n,r))return!1;t+=1}return!0}function px(e,t){let n=t.getText(e.openingElement);return e.openingElement.selfClosing?n:n.endsWith(`>`)?`${n.slice(0,-1)} />`:void 0}function mx(e,t,n){let r=[];for(let e of t){let t=px(e,n);if(t===void 0)return;r.push(t)}let i=t.at(-1);if(i===void 0||i.closingElement===null)return;let a=n.text.slice(i.openingElement.range[1],i.closingElement.range[0]);return`<${e} providers={[${r.join(`, `)}]}>${a}</${e}>`}const hx=b(`prefer-context-stack`,`react`,{create(e){let{filename:t,sourceCode:n}=e,r=t===``?{found:!1}:ix(t,ax),a=t!==``&&tx(t,ax).matches,o=new Set;return{ImportDeclaration(e){rx(e,nx(e,t,ax),ax.componentName,o)},JSXElement(s){if(a||lx(s))return;let c=ux(s);if(c===void 0||o.size===0&&!r.found)return;let l=ox.has(i.extname(t))&&o.size===1&&fx(c),[u]=o,d=l&&u!==void 0?mx(u,c,n):void 0;if(d!==void 0){e.report({fix:e=>e.replaceText(s,d),messageId:`preferContextStack`,node:s});return}e.report({messageId:`preferContextStack`,node:s})}}},meta:{docs:{description:`Prefer a local ContextStack component over directly nesting multiple context providers.`},fixable:`code`,messages:{preferContextStack:"Use the local `ContextStack` component instead of nesting multiple context providers directly."},schema:[],type:`suggestion`}}),gx=/^use[A-Z]/v;function _x(e,t){if(e===void 0)return!1;for(let n of e.defs)if(Jm(n,t)&&(n.node.type===`ImportDefaultSpecifier`||n.node.type===`ImportNamespaceSpecifier`))return!0;return!1}function vx(e){return t.isObject(e)?{allowedHooks:new Set(M(e.allowedHooks)?e.allowedHooks:[])}:{allowedHooks:new Set}}const yx=b(`prefer-direct-hook-imports`,`react`,{create(e){let t=Wm(e.options[0]),{allowedHooks:n}=vx(e.options[0]),{sourceCode:r}=e;return{CallExpression(i){let{callee:a}=i;if(a.type!==`MemberExpression`||a.computed||a.object.type!==`Identifier`||a.property.type!==`Identifier`)return;let o=a.property.name;gx.test(o)&&(n.has(o)||_x(_(r.getScope(a.object),a.object.name),t)&&e.report({data:{hookName:o},messageId:`preferDirectHookImport`,node:i}))}}},meta:{docs:{description:`Prefer importing React hooks directly instead of calling them via the React namespace.`,recommended:!0},messages:{preferDirectHookImport:"Import `{{hookName}}` directly instead of calling `React.{{hookName}}`."},schema:[{additionalProperties:!1,properties:{allowedHooks:{description:`Hook names that are allowed to be called via React namespace.`,items:{type:`string`},type:`array`},environment:zm},type:`object`}],type:`suggestion`}});function bx(e){if(!t.isObject(e)||!(`additionalHoistableComponents`in e))return new Set;let{additionalHoistableComponents:n}=e;return M(n)?new Set(n):new Set}function xx(e){if(!t.isObject(e)||!(`additionalStaticFactories`in e))return new Set;let{additionalStaticFactories:n}=e;return M(n)?new Set(n):new Set}function Sx(e){let t=e;for(;t.type===`JSXMemberExpression`;)t=t.object;return t.type===`JSXIdentifier`?t.name:void 0}function Cx(e,t,n){let r=_(e.sourceCode.getScope(t),n);if(r===void 0||!R(r.scope))return!1;if(z(r))return!0;for(let e of r.defs)if(e.type===`FunctionName`||e.type===`ClassName`||Al(e)!==void 0)return!0;return!1}function wx(e,t,n){let r=_(e.sourceCode.getScope(t),n);return r!==void 0&&z(r)}function Tx(e,t,n,r){let{name:i}=t.openingElement;if(i.type===`JSXIdentifier`){let e=i.name.charAt(0);if(e!==``&&e===e.toLowerCase())return!0}let a=Sx(i);if(a===void 0)return!1;let o=_(e.sourceCode.getScope(t),a),s=i.type===`JSXMemberExpression`;return n.has(a)?o===void 0?!s:s?wx(e,t,a):Cx(e,t,a):r===`standard`?s?wx(e,t,a):Cx(e,t,a):!1}function Ex(e,t,n,r,i){if(i===`roblox-ts`&&t.name.type===`JSXIdentifier`&&(t.name.name===`Event`||t.name.name===`Change`))return!1;let{value:a}=t;return a===null||a.type===`Literal`?!0:a.type!==`JSXExpressionContainer`||a.expression.type===`JSXEmptyExpression`?!1:Nl(e.sourceCode,a.expression,new Set)?i===`standard`:B(e.sourceCode,a.expression,n,r)}function Dx(e,t,n,r,i){for(let a of t.attributes)if(a.type===`JSXSpreadAttribute`||!Ex(e,a,new Set(n),r,i))return!1;return!0}function Ox(e,t,n,r,i,a){if(t.type===`JSXText`)return a===`standard`||t.value.trim().length===0;if(t.type===`JSXElement`||t.type===`JSXFragment`)return Ax(e,t,new Set(n),r,i,a);if(t.type!==`JSXExpressionContainer`)return!1;if(t.expression.type===`JSXEmptyExpression`)return!0;if(t.expression.type===`JSXElement`||t.expression.type===`JSXFragment`)return Ax(e,t.expression,new Set(n),r,i,a);if(t.expression.type===`Identifier`){let o=jl(e.sourceCode,t.expression);if(o!==void 0){let t=m(o);if(t.type===`JSXElement`||t.type===`JSXFragment`)return Ax(e,t,new Set(n),r,i,a)}}return B(e.sourceCode,t.expression,new Set(n),i)}function kx(e,t,n,r,i,a){for(let o of t.children)if(!Ox(e,o,new Set(n),r,i,a))return!1;return!0}function Ax(e,t,n,r,i,a){return!n.has(t)&&(n.add(t),(t.type===`JSXFragment`||Tx(e,t,r,a)&&Dx(e,t.openingElement,n,i,a))&&kx(e,t,n,r,i,a))}function jx(e,t,n,r,i){let{parent:a}=t;for(;a.type!==`Program`;){if((a.type===`JSXElement`||a.type===`JSXFragment`)&&Ax(e,a,new Set,n,r,i))return!0;({parent:a}=a)}return!1}function Mx(e,t){switch(e.type){case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSTypeAssertion`:return e.expression===t;default:return!1}}function Nx(e,t){return e.type===`JSXElement`||e.type===`JSXFragment`||e.type===`JSXExpressionContainer`&&e.expression===t}function Px(e,t){if(Mx(e,t)||Nx(e,t))return!0;switch(e.type){case`ArrayExpression`:case`ObjectExpression`:return!0;case`Property`:return e.value===t;default:return!1}}function Fx(e,t){let n=t,{parent:r}=n;for(;Px(r,n);){n=r;let{parent:e}=n;if(e===null)return!1;r=e}if(r.type!==`VariableDeclarator`||r.id.type!==`Identifier`||r.init!==n||r.parent.type!==`VariableDeclaration`||r.parent.kind!==`const`)return!1;let i=_(e.sourceCode.getScope(n),r.id.name);return i!==void 0&&R(i.scope)}function Ix(e,t){let n=e.sourceCode.getText(t);e.report({data:{elementText:n},messageId:`hoistableJsxElement`,node:t})}const Lx=b(`prefer-hoisted-jsx-elements`,`react`,{create(e){let[t]=e.options,n=bx(t),r=xx(t),i=H(t),a={staticCallsRequireFactories:!0,staticGlobalFactories:new Set([...i===`roblox-ts`?Tl:[],...r])};function o(t){Ax(e,t,new Set,n,a,i)&&(Fx(e,t)||jx(e,t,n,a,i)||Ix(e,t))}return{JSXElement:o,JSXFragment:o}},meta:{docs:{description:`Prefer extracting static JSX elements to module-level constants.`},messages:{hoistableJsxElement:"Extract `{{elementText}}` to a shared module-level const — this JSX element is fully static and identical elements should reuse the same const."},schema:[{additionalProperties:!1,properties:{additionalHoistableComponents:{description:`Additional component names that can be hoisted to module-level constants.`,items:{type:`string`},type:`array`},additionalStaticFactories:{description:`Additional factory functions whose return values are considered static.`,items:{type:`string`},type:`array`},environment:zm},type:`object`}],type:`suggestion`}}),Rx={staticGlobalFactories:new Set(Tl)};function zx({value:e}){if(e?.type===`JSXExpressionContainer`&&e.expression.type!==`JSXEmptyExpression`)return e.expression}function Bx(e){if(e.type===`JSXElement`||e.type===`JSXFragment`||e.type===`JSXExpressionContainer`||e.type===`ParenthesizedExpression`||e.type===`ArrayExpression`)return e}function Vx(e,t,n,r){if(n.id.type!==`Identifier`||n.init!==r)return!1;let i=_(e.sourceCode.getScope(t),n.id.name);return i!==void 0&&R(i.scope)}function Hx(e,t){let n=t;for(;;){let{parent:r}=n;if(r===null)return!1;if(r.type===`VariableDeclarator`)return Vx(e,t,r,n);let i=Bx(r);if(i===void 0)return!1;n=i}}function Ux(e,t){let n=e.sourceCode.getText(t);e.report({data:{objectText:n},messageId:`hoistableObjectProp`,node:t})}function Wx(e,t){if(t.properties.some(e=>e.type===`Property`&&e.computed))return;let n=new Set;if(B(e.sourceCode,t,n,Rx)){Ux(e,t);return}for(let n of t.properties){if(n.type!==`Property`)continue;let t=m(n.value);t.type===`ObjectExpression`&&Wx(e,t)}}const Gx=b(`prefer-hoisted-jsx-object-properties`,`react`,{create(e){return{JSXAttribute(t){let n=zx(t);if(n===void 0)return;let r=m(n);if(r.type!==`ObjectExpression`)return;let i=t.parent;if(i.type!==`JSXOpeningElement`)return;let a=i.parent;a.type===`JSXElement`&&Hx(e,a)||Wx(e,r)}}},meta:{docs:{description:`Prefer extracting inline JSX object props to module-level constants when the entire object is statically hoistable.`},messages:{hoistableObjectProp:"Extract `{{objectText}}` to a module-level const — this inline JSX prop object is fully static and causes unnecessary reference churn on every render."},schema:[],type:`suggestion`}}),Kx={componentName:`Portal`,fileNames:[`portal`],markers:[`target`]},qx=new Set([`@rbxts/react-roblox`,`react-dom`]),Jx=new Set([`.jsx`,`.tsx`]);function Yx(e){return e.type===`ImportBinding`}function Xx(e){return e.parent?.type===`ImportDeclaration`?e.parent:void 0}function Zx(e){if(e===void 0)return!1;for(let t of e.defs){if(!Yx(t)||t.node.type!==`ImportSpecifier`)continue;let e=Xx(t.node);if(e===void 0||!qx.has(e.source.value))continue;let{imported:n}=t.node;if(n.type===`Identifier`&&n.name===`createPortal`)return!0}return!1}function Qx(e){if(e===void 0)return!1;for(let t of e.defs){if(!Yx(t)||t.node.type!==`ImportNamespaceSpecifier`)continue;let e=Xx(t.node);if(e!==void 0&&qx.has(e.source.value))return!0}return!1}function $x(e,{callee:t}){return t.type===`Identifier`?Zx(_(e.getScope(t),t.name)):t.type!==`MemberExpression`||t.computed||t.property.type!==`Identifier`||t.property.name!==`createPortal`||t.object.type!==`Identifier`?!1:Qx(_(e.getScope(t.object),t.object.name))}function eS(e,t){return e.type===`JSXElement`||e.type===`JSXFragment`?t.getText(e):`{${t.getText(e)}}`}function tS(e,t,n){if(t.arguments.length!==2)return;let[r,i]=t.arguments;if(r===void 0||i===void 0)return;let a=eS(r,n);return`<${e} target={${n.getText(i)}}>${a}</${e}>`}const nS=b(`prefer-local-portal-component`,`react`,{create(e){let{filename:t,sourceCode:n}=e,r=t===``?{found:!1}:ix(t,Kx),a=t!==``&&tx(t,Kx).matches,o=new Set;return{CallExpression(s){if(a||!$x(n,s)||s.arguments.length!==2||!(o.size>0||r.found))return;let c=Jx.has(i.extname(t))&&o.size===1,[l]=o,u=c&&l!==void 0?tS(l,s,n):void 0;if(u!==void 0){e.report({fix:e=>e.replaceText(s,u),messageId:`preferPortalComponent`,node:s});return}e.report({messageId:`preferPortalComponent`,node:s})},ImportDeclaration(e){rx(e,nx(e,t,Kx),Kx.componentName,o)}}},meta:{docs:{description:`Prefer a local Portal component over direct createPortal calls when the project already defines one.`},fixable:`code`,messages:{preferPortalComponent:"Use the local `Portal` component instead of calling `createPortal` directly."},schema:[],type:`suggestion`}}),rS=new Set([`end`,`loc`,`parent`,`range`,`start`]),iS=new Set([`.jsx`,`.tsx`]),aS=new Set([`PaddingBottom`,`PaddingLeft`,`PaddingRight`,`PaddingTop`]),oS={componentName:`DirectionalPadding`,fileNames:[`directional-padding`],markers:[`horizontal`,`vertical`]},sS={componentName:`EqualPadding`,fileNames:[`equal-padding`],markers:[`padding`]};function cS(e){return t.isObject(e)}function lS(e,t){return Object.is(e,t)?!0:uS(e)?Array.isArray(t)&&dS(e,t):Array.isArray(t)||!cS(e)||!cS(t)?!1:fS(e,t)}function uS(e){return Array.isArray(e)}function dS(e,t){if(e.length!==t.length)return!1;let n=0;for(let r of e)if(!lS(r,t[n++]))return!1;return!0}function fS(e,t){let n=Object.entries(e).filter(([e])=>!rS.has(e)),r=Object.entries(t).filter(([e])=>!rS.has(e));if(n.length!==r.length)return!1;for(let[e,r]of n)if(!(e in t)||!lS(r,t[e]))return!1;return!0}function pS(e){for(let t of e.children)if((t.type!==`JSXText`||t.value.trim()!==``)&&(t.type!==`JSXExpressionContainer`||t.expression.type!==`JSXEmptyExpression`))return!0;return!1}function mS({value:e}){if(e!==null){if(e.type===`JSXExpressionContainer`)switch(e.expression.type){case`JSXElement`:case`JSXEmptyExpression`:case`JSXFragment`:return;default:return m(e.expression)}return e.type===`Literal`?e:void 0}}function hS(e){let t=new Map;for(let n of e.attributes){if(n.type===`JSXSpreadAttribute`||n.name.type!==`JSXIdentifier`)return;let e=n.name.name;if(!aS.has(e)||t.has(e)||n.value===null)return;t.set(e,n)}let n=t.get(`PaddingBottom`),r=t.get(`PaddingLeft`),i=t.get(`PaddingRight`),a=t.get(`PaddingTop`);if(n!==void 0&&r!==void 0&&i!==void 0&&a!==void 0)return{paddingBottom:n,paddingLeft:r,paddingRight:i,paddingTop:a}}function gS({value:e},t){if(e!==null)switch(e.type){case`JSXExpressionContainer`:case`Literal`:return t.getText(e);default:return}}function _S(e,t,n,r){let i=gS(n.paddingTop,r);if(i===void 0)return;if(t===`preferEqualPadding`)return`<${e} padding=${i} />`;let a=gS(n.paddingLeft,r);if(a!==void 0)return`<${e} horizontal=${i} vertical=${a} />`}function vS(e){let t=mS(e.paddingBottom),n=mS(e.paddingLeft),r=mS(e.paddingRight),i=mS(e.paddingTop);if(t===void 0||n===void 0||r===void 0||i===void 0)return;if(lS(i,t)&&lS(i,n)&&lS(i,r))return`preferEqualPadding`;let a=lS(i,t),o=lS(n,r);return a&&o?`preferDirectionalPadding`:void 0}function yS(e){return e.type===`JSXIdentifier`}const bS=b(`prefer-padding-components`,`react`,{create(e){let{filename:t}=e,n=t===``?{found:!1}:ix(t,oS),r=t===``?{found:!1}:ix(t,sS),a=t!==``&&tx(t,oS).matches,o=t!==``&&tx(t,sS).matches,s=new Set,c=new Set;return{ImportDeclaration(e){let n=nx(e,t,oS),r=nx(e,t,sS);rx(e,n,oS.componentName,s),rx(e,r,sS.componentName,c)},JSXElement(l){if(pS(l))return;let{openingElement:u}=l;if(!yS(u.name)||u.name.name!==`uipadding`)return;let d=hS(u);if(d===void 0)return;let f=vS(d);if(f===void 0||(f===`preferEqualPadding`?o:a))return;let p=f===`preferEqualPadding`?c:s,m=f===`preferEqualPadding`?r:n;if(p.size===0&&!m.found)return;let h=iS.has(i.extname(t))&&p.size===1,[g]=[...p],_=h&&g!==void 0?_S(g,f,d,e.sourceCode):void 0;if(_!==void 0){e.report({fix(e){return e.replaceText(l,_)},messageId:f,node:l});return}e.report({messageId:f,node:l})}}},meta:{docs:{description:`Prefer local EqualPadding and DirectionalPadding components over matching <uipadding /> declarations.`},fixable:`code`,messages:{preferDirectionalPadding:"Use the local `DirectionalPadding` component when horizontal and vertical padding already match.",preferEqualPadding:"Use the local `EqualPadding` component when all four padding values already match."},schema:[],type:`suggestion`}});function xS(e){return e.type===`JSXElement`||e.type===`JSXFragment`}function SS(e,t,n){return e.type===`Super`||t.type===`Super`?e.type===`Super`&&t.type===`Super`:q(e,t,n)}function CS(e,t,n){return e.type===`SpreadElement`||t.type===`SpreadElement`?e.type!==`SpreadElement`||t.type!==`SpreadElement`?!1:q(e.argument,t.argument,n):q(e,t,n)}function wS(e,t,n){return e.type===`PrivateIdentifier`||t.type===`PrivateIdentifier`?e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`&&e.name===t.name:q(e,t,n)}function q(e,t,n){let r=m(e),i=m(t);if(r.type!==i.type)return!1;switch(r.type){case`BinaryExpression`:return i.type===`BinaryExpression`&&TS(r,i,n);case`CallExpression`:return i.type===`CallExpression`&&ES(r,i,n);case`Identifier`:return i.type===`Identifier`&&r.name===i.name;case`Literal`:return i.type===`Literal`&&r.value===i.value;case`LogicalExpression`:return i.type===`LogicalExpression`&&DS(r,i,n);case`MemberExpression`:return i.type===`MemberExpression`&&OS(r,i,n);case`ThisExpression`:return i.type===`ThisExpression`;case`UnaryExpression`:return i.type===`UnaryExpression`&&r.operator===i.operator&&q(r.argument,i.argument,n);default:return n.getText(r)===n.getText(i)}}function TS(e,t,n){return e.operator===t.operator&&wS(e.left,t.left,n)&&wS(e.right,t.right,n)}function ES(e,t,n){if(e.optional!==t.optional||!SS(e.callee,t.callee,n)||e.arguments.length!==t.arguments.length)return!1;for(let r=0;r<e.arguments.length;r+=1){let i=e.arguments[r],a=t.arguments[r];if(i===void 0||a===void 0||!CS(i,a,n))return!1}return!0}function DS(e,t,n){return e.operator===t.operator&&q(e.left,t.left,n)&&q(e.right,t.right,n)}function OS(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!SS(e.object,t.object,n)?!1:e.computed?wS(e.property,t.property,n):kS(e.property,t.property)}function kS(e,t){return(e.type===`Identifier`&&t.type===`Identifier`||e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`)&&e.name===t.name}function AS(e){let t=m(e);if(t.type===`UnaryExpression`&&t.operator===`!`)return m(t.argument)}function jS(e){let t=m(e);if(t.type===`BinaryExpression`&&(t.operator===`===`||t.operator===`!==`))return{left:t.left,operator:t.operator,right:t.right}}function MS(e){let t=m(e);return t.type===`Identifier`||t.type===`ThisExpression`||t.type===`Literal`}function NS(e){return Qe(e)&&MS(e)}function PS(e,t,n){let r=AS(e);if(r&&q(r,t,n))return{isFixSafe:MS(r)};let i=AS(t);if(i&&q(i,e,n))return{isFixSafe:MS(i)};let a=jS(e),o=jS(t);if(!a||!o||!(a.operator===`===`&&o.operator===`!==`||a.operator===`!==`&&o.operator===`===`))return;let s=wS(a.left,o.left,n)&&wS(a.right,o.right,n),c=wS(a.left,o.right,n)&&wS(a.right,o.left,n);if(!(!s&&!c))return{isFixSafe:NS(a.left)&&NS(a.right)&&NS(o.left)&&NS(o.right)}}function FS(e){return e.type===`JSXText`&&e.value.trim()===``}function IS(e){if(e.type===`JSXExpressionContainer`&&e.expression.type!==`JSXEmptyExpression`&&e.expression.type===`LogicalExpression`&&e.expression.operator===`&&`&&xS(e.expression.right))return{condition:e.expression.left,logical:e.expression,node:e,renderBranch:e.expression.right}}const LS=b(`prefer-ternary-conditional-rendering`,`react`,{create(e){let{sourceCode:t}=e;function n(e,t){let n=t;for(;n<e.length;){let t=e[n];if(t===void 0||!FS(t))break;n+=1}let r=e[n];return r===void 0?void 0:IS(r)}function r(n,r){let i=PS(n.condition,r.condition,t);if(i!==void 0){if(i.isFixSafe){e.report({fix(e){let i=`{${t.getText(n.condition)} ? ${t.getText(n.renderBranch)} : ${t.getText(r.renderBranch)}}`;return e.replaceTextRange([n.node.range[0],r.node.range[1]],i)},messageId:`preferTernaryConditionalRendering`,node:n.logical});return}e.report({messageId:`preferTernaryConditionalRendering`,node:n.logical})}}function i(e){for(let t=0;t<e.length;t+=1){let i=e[t];if(i===void 0)continue;let a=IS(i);if(a===void 0)continue;let o=n(e,t+1);o!==void 0&&r(a,o)}}return{JSXElement(e){i(e.children)},JSXFragment(e){i(e.children)}}},meta:{docs:{description:`Prefer ternary expressions over complementary JSX && branches.`},fixable:`code`,messages:{preferTernaryConditionalRendering:`Use a single ternary expression instead of complementary JSX && branches.`},schema:[],type:`suggestion`}});function RS(e,t,n){if(t.type!==`BlockStatement`)return;let r=0;for(let e of t.body)if(e.type===`VariableDeclaration`)for(let t of e.declarations)Qg(t.init,`useState`)&&(r+=1);r<5||e.report({data:{componentName:n,useStateCount:String(r)},messageId:`excessiveUseState`,node:t})}const zS=b(`prefer-use-reducer`,`react`,{create(e){return{FunctionDeclaration(t){t.id===null||!W(t.id.name)||`body`in t&&t.body&&RS(e,t.body,t.id.name)},VariableDeclarator(t){!$g(t)||!t.init||`body`in t.init&&t.init.body&&`name`in t.id&&RS(e,t.init.body,t.id.name)}}},meta:{docs:{description:`Suggest using useReducer for related state updates instead of multiple useState calls.`,recommended:!0},messages:{excessiveUseState:`Component "{{componentName}}" has {{useStateCount}} useState calls — consider useReducer for related state`},type:`problem`}}),BS=/^use[A-Z0-9].*$/u;function VS(e){return BS.test(e)}function HS(e){if(e.id!==null)return e.id.name}function US(e){return e.id.type===`Identifier`?e.id.name:void 0}function WS(e){let t=HS(e);return t!==void 0&&VS(t)}function GS({parent:e}){if(e.type!==`VariableDeclarator`)return!1;let t=US(e);return t!==void 0&&VS(t)}function KS(e,t){let n=e.get(t);if(n!==void 0&&n.length!==0)return n.at(-1)}function qS(e){for(let t=e.defs.length-1;t>=0;--t){let n=e.defs[t];if(n?.node.type===`VariableDeclarator`&&n.node.init?.type===`ArrayExpression`)return n.node.init}}function JS(e){for(let t=e.defs.length-1;t>=0;--t){let n=e.defs[t];if(n?.node.type===`VariableDeclarator`&&n.node.init?.type===`ObjectExpression`)return!0}return!1}function YS(e,t,n,r){let i=_(e.getScope(t),n);if(i!==void 0){let e=qS(i);if(e!==void 0)return e}return KS(r,n)}function XS(e,t,n){if(e.argument.type===`Identifier`){let r=YS(t,e,e.argument.name,n);return r===void 0?1:ZS(r,t,n)}return e.argument.type===`ArrayExpression`?ZS(e.argument,t,n):1}function ZS(e,t,n){let r=0;for(let i of e.elements){if(i===null){r+=1;continue}if(i.type===`SpreadElement`){r+=XS(i,t,n);continue}r+=1}return r}function QS(e,t){let n=_(e.getScope(t),t.name);return n!==void 0&&JS(n)}function $S(e){let t=US(e);if(t!==void 0&&e.init?.type===`ArrayExpression`)return{name:t,init:e.init}}function eC(e,t){let n=$S(e);if(n===void 0)return;let{name:r,init:i}=n,a=t.get(r)??[];a.push(i),t.set(r,a)}function tC(e,t){let n=$S(e);if(n===void 0)return;let{name:r}=n,i=t.get(r);i!==void 0&&i.length!==0&&(i.pop(),i.length===0&&t.delete(r))}const nC=b(`react-hooks-strict-return`,`react`,{create(e){let{sourceCode:t}=e,n=new Map,r=0;function i(e){WS(e)&&(r+=1)}function a(e){WS(e)&&--r}function o(e){GS(e)&&(r+=1)}function s(e){GS(e)&&--r}function c(t){e.report({data:{count:`2`},messageId:`tooManyReturnValues`,node:t})}function l(e){if(r!==0&&e.argument!==null&&e.argument.type!==`ObjectExpression`){if(e.argument.type===`Identifier`){if(QS(t,e.argument))return;let r=YS(t,e,e.argument.name,n);if(r===void 0)return;ZS(r,t,n)>2&&c(e);return}e.argument.type===`ArrayExpression`&&ZS(e.argument,t,n)>2&&c(e)}}return{ArrowFunctionExpression:o,"ArrowFunctionExpression:exit":s,FunctionDeclaration:i,"FunctionDeclaration:exit":a,FunctionExpression:i,"FunctionExpression:exit":a,ReturnStatement:l,VariableDeclarator(e){eC(e,n)},"VariableDeclarator:exit"(e){tC(e,n)}}},meta:{docs:{description:`Restrict React hooks to object returns or short tuples.`},messages:{tooManyReturnValues:`Hook returns more than {{count}} values. Return an object with named properties instead.`},schema:[],type:`suggestion`}}),rC=[{name:`useEffect`,allowAsync:!1},{name:`useLayoutEffect`,allowAsync:!1},{name:`useInsertionEffect`,allowAsync:!1}];function iC(e){return t.isObject(e)&&t.isString(e.name)&&typeof e.allowAsync==`boolean`}function aC(e){let n=t.isObject(e)&&e.sloptor,r=t.isObject(e)&&e.inlineFunctionDeclarations;if(!t.isObject(e))return{environment:`roblox-ts`,hooks:rC,inlineFunctionDeclarations:r,sloptor:n};let i=Bm(e.environment)?e.environment:`roblox-ts`,a=e.hooks;if(!Array.isArray(a))return{environment:i,hooks:rC,inlineFunctionDeclarations:r,sloptor:n};let o=[];for(let e of a)iC(e)&&o.push(e);return o.length===0?{environment:i,hooks:rC,inlineFunctionDeclarations:r,sloptor:n}:{environment:i,hooks:o,inlineFunctionDeclarations:r,sloptor:n}}function oC(e){for(let t of e.defs){let{node:e}=t;if(e.type===`FunctionDeclaration`)return{isAsync:e.async,node:e,type:`function-declaration`};if(e.type===`VariableDeclarator`){if(e.init===null)continue;if(e.init.type===`ArrowFunctionExpression`)return{isAsync:e.init.async,node:e.init,type:`arrow`};if(e.init.type===`FunctionExpression`)return{isAsync:e.init.async,node:e.init,type:`function-expression`}}}}function sC(e,t){let n=_(e.getScope(t),t.name);if(n===void 0)return!1;for(let e of n.defs){let{node:t}=e;if(t.type!==`VariableDeclarator`||t.init?.type!==`CallExpression`)continue;let n=N(t.init);if(n===`useCallback`||n===`useMemo`)return!0}return!1}function cC(e,t,n){if(t.references.length!==1)return!1;let r=n.parent.type;return r===`ExportNamedDeclaration`||r===`ExportDefaultDeclaration`?!1:!ne(e,n)}const lC=b(`require-named-effect-functions`,`react`,{create(e){let{environment:t,hooks:n,inlineFunctionDeclarations:r,sloptor:i}=aC(e.options[0]),a=new Map(n.map(e=>[e.name,e.allowAsync])),o=new Set(a.keys()),s=t===`roblox-ts`&&!i;function c(e){return a.get(e)??!1}function l(t,n,r){e.report({data:{hook:t},messageId:r,node:n})}function u(t,n,r){let i=_(e.sourceCode.getScope(r),r.name);if(i===void 0){sC(e.sourceCode,r)&&l(t,n,`identifierReferencesCallback`);return}let a=oC(i);if(a===void 0){sC(e.sourceCode,r)&&l(t,n,`identifierReferencesCallback`);return}d(t,n,r,a,i)}function d(e,t,n,i,a){if(i.type===`arrow`){i.isAsync&&!c(e)?l(e,t,`identifierReferencesAsyncArrow`):i.isAsync||l(e,t,`identifierReferencesArrow`);return}if(i.type===`function-expression`){f(e,t,i.node);return}i.isAsync?c(e)||l(e,t,`identifierReferencesAsyncFunction`):!s&&r&&p(e,t,n,i.node,a)}function f(e,t,n){n.id===null?l(e,t,`anonymousFunction`):s&&l(e,t,`functionExpression`)}function p(t,n,r,i,a){e.report({data:{hook:t},fix(t){let n=[t.replaceText(r,e.sourceCode.getText(i))];return cC(e.sourceCode,a,i)&&n.push(t.removeRange(y(e.sourceCode.text,i))),n},messageId:`identifierReferencesFunctionDeclaration`,node:n})}function m(e,t,n){let r=n.id!==null;r&&n.async?l(e,t,`asyncFunctionExpression`):r&&s?l(e,t,`functionExpression`):!r&&n.async?l(e,t,`asyncAnonymousFunction`):r||l(e,t,`anonymousFunction`)}return{CallExpression(e){let t=N(e);if(t===void 0||!o.has(t))return;let[n]=e.arguments;if(n!==void 0){if(n.type===`Identifier`){u(t,e,n);return}if(n.type===`ArrowFunctionExpression`){n.async?l(t,e,`asyncArrowFunction`):l(t,e,`arrowFunction`);return}n.type===`FunctionExpression`&&m(t,e,n)}}}},meta:{docs:{description:`Enforce named effect functions for better debuggability. Prevents inline arrow functions in useEffect and similar hooks.`,recommended:!1},fixable:`code`,messages:{anonymousFunction:`Anonymous function passed to {{hook}}. debug.info returns empty string for anonymous functions, making stack traces useless for debugging. Extract to: function effectName() { ... } then pass effectName.`,arrowFunction:`Arrow function passed to {{hook}}. Arrow functions have no debug name and create new instances each render. Extract to: function effectName() { ... } then pass effectName.`,asyncAnonymousFunction:`Async anonymous function in {{hook}}. Two issues: (1) no debug name makes stack traces useless, (2) async effects require cancellation logic for unmount. Extract to: async function effectName() { ... } with cleanup.`,asyncArrowFunction:`Async arrow function in {{hook}}. Two issues: (1) arrow functions have no debug name, (2) async effects require cancellation logic. Extract to: async function effectName() { ... } with cleanup.`,asyncFunctionDeclaration:`Async function declaration passed to {{hook}}. Async effects require cancellation logic to handle component unmount. Implement cleanup or set allowAsync: true if cancellation is handled.`,asyncFunctionExpression:`Async function expression in {{hook}}. Async effects require cancellation logic for unmount. Extract to a named async function declaration with cleanup, then pass the reference.`,functionExpression:`Function expression passed to {{hook}}. Function expressions create new instances each render, breaking referential equality. Extract to: function effectName() { ... } at module or component top-level.`,identifierReferencesArrow:`{{hook}} receives identifier pointing to arrow function. Arrow functions have no debug name and lack referential stability. Convert to: function effectName() { ... } then pass effectName.`,identifierReferencesAsyncArrow:`{{hook}} receives identifier pointing to async arrow function. Two issues: (1) no debug name, (2) async effects require cancellation logic. Convert to: async function effectName() { ... } with cleanup.`,identifierReferencesAsyncFunction:`{{hook}} receives identifier pointing to async function. Async effects require cancellation logic for unmount. Implement cleanup or set allowAsync: true if cancellation is handled.`,identifierReferencesCallback:`{{hook}} receives identifier from useCallback/useMemo. These hooks return new references when dependencies change, causing unexpected effect re-runs. Use a stable function declaration: function effectName() { ... }`,identifierReferencesFunctionDeclaration:`{{hook}} receives identifier pointing to a named function declaration. Convert it to an inline named function expression so the effect callback is self-contained: useEffect(function effectName() {}, [])`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`Environment mode: 'roblox-ts' only allows identifiers, 'standard' allows both identifiers and named function expressions`,enum:[`roblox-ts`,`standard`],type:`string`},hooks:{default:[...rC],description:`Hook configuration objects with name and allowAsync settings.`,items:{additionalProperties:!1,properties:{name:{description:`Hook name to check`,type:`string`},allowAsync:{description:`Whether async functions are allowed for this hook`,type:`boolean`}},required:[`name`,`allowAsync`],type:`object`},type:`array`},inlineFunctionDeclarations:{default:!1,description:`Convert effect callbacks that reference a named function declaration into inline named function expressions (standard and sloptor modes only), keeping the effect body visible to dependency analysis. When the declaration is only referenced by the effect and is not exported or commented, the fix also removes the now-unused declaration.`,type:`boolean`},sloptor:{default:!1,description:`Compile with sloptor (a Go-based roblox-ts compiler). Sloptor targets @rbxts/react like roblox-ts but supports standard TypeScript features, so the rule applies standard-mode behavior. Use with environment: 'roblox-ts'.`,type:`boolean`}},type:`object`}],type:`problem`}}),uC={allowRootKeys:!1,ignoreCallExpressions:[`ReactTree.mount`,`CreateReactStory`,`createReactStory`,`createPlatformStory`],iterationMethods:[`map`,`filter`,`forEach`,`flatMap`,`reduce`,`reduceRight`,`some`,`every`,`find`,`findIndex`],memoizationHooks:[`useCallback`,`useMemo`]},dC=new Set([`ChainExpression`,`ParenthesizedExpression`,`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]),fC=new Set([...dC,`AwaitExpression`,`ConditionalExpression`,`LogicalExpression`,`SequenceExpression`,`SpreadElement`]),pC={iteration:!1,memoization:!1},mC=new Set([`ConditionalExpression`,`LogicalExpression`]),hC=new Set([`BlockStatement`,`CatchClause`,`DoWhileStatement`,`ForInStatement`,`ForOfStatement`,`ForStatement`,`IfStatement`,`LabeledStatement`,`SwitchCase`,`SwitchStatement`,`TryStatement`,`WhileStatement`,`WithStatement`]);function J(e){return e.parent??void 0}function gC(e){let t=e;for(;t!==void 0&&dC.has(t.type);)t=J(t);return t}function _C(e){let t=J(e);for(;t!==void 0;){if(A(t))return t;t=J(t)}}function vC(e,t,n){let{callee:r}=e;if(r.type===`Identifier`)return{iteration:t.has(r.name),memoization:n.has(r.name)};if(r.type===`MemberExpression`&&r.property.type===`Identifier`){let{name:i}=r.property,a={iteration:t.has(i),memoization:n.has(i)};return i===`from`&&r.object.type===`Identifier`&&r.object.name===`Array`&&e.arguments.length>=2||i===`call`&&r.object.type===`MemberExpression`&&r.object.property.type===`Identifier`&&t.has(r.object.property.name)?{...a,iteration:!0}:a}return pC}function yC(e){let t=e,n=J(e);for(;n!==void 0;){if(n.type===`CallExpression`){for(let e of n.arguments)if(e===t||e.type===`SpreadElement`&&e.argument===t)return n;return}if(fC.has(n.type)){t=n,n=J(n);continue}break}}function bC(e,t){if(t.type===`FunctionDeclaration`){let n=e.getDeclaredVariables(t);return n.length>0?n[0]:void 0}let n=J(t);if(n!==void 0&&(n.type===`VariableDeclarator`||n.type===`AssignmentExpression`)){let t=e.getDeclaredVariables(n);if(t.length>0)return t[0]}}function xC(e,t){e.iteration||=t.iteration,e.memoization||=t.memoization}function SC(e,t,n){if(e.isWrite())return pC;let r=yC(e.identifier);return r===void 0||qg(r)?pC:vC(r,t,n)}function CC(e,t,n,r){let i=yC(t);if(i!==void 0)return qg(i)?pC:vC(i,n,r);let a=bC(e,t);if(a===void 0)return pC;let o={iteration:!1,memoization:!1};for(let e of a.references)if(xC(o,SC(e,n,r)),o.iteration&&o.memoization)return o;return o}function wC(e){let t=TC(e);return t===void 0?!1:t.type===`ReturnStatement`?DC(t):t.type===`ArrowFunctionExpression`}function TC(e){let t=EC(gC(J(e)));for(;t!==void 0&&mC.has(t.type);)t=gC(J(t));return EC(t)}function EC(e){return e?.type===`JSXExpressionContainer`?gC(J(e)):e}function DC(e){let t=gC(J(e));for(;t!==void 0&&hC.has(t.type);)t=gC(J(t));return t!==void 0&&A(t)}function OC(e){if(!wC(e))return!1;let t=_C(e);if(t===void 0)return!1;let n=gC(J(t));return n?.type!==`CallExpression`||qg(n)}function kC(e,t){let n=J(e);if(n===void 0||n.type===`JSXExpressionContainer`&&(n=J(n),n===void 0))return!1;for(let e=0;e<20&&n!==void 0;e+=1){if(n.type===`CallExpression`){let{callee:e}=n;return e.type===`Identifier`?t.has(e.name):e.type===`MemberExpression`&&e.object.type===`Identifier`&&e.property.type===`Identifier`&&t.has(`${e.object.name}.${e.property.name}`)}n=J(n)}return!1}function AC(e){return e.toLowerCase().endsWith(`children`)}function jC(e){let t=J(e);if(t===void 0)return!1;for(;t!==void 0&&(t.type===`ConditionalExpression`||t.type===`LogicalExpression`);)t=J(t);if(t===void 0||t.type===`JSXExpressionContainer`&&(t=J(t),t===void 0)||t.type!==`JSXAttribute`)return!1;let n=Jg(t);return n===void 0||!AC(n)}function MC(e){let t=e,n=J(e);for(;n!==void 0&&dC.has(n.type);)t=n,n=J(n);return n===void 0?!1:n.type===`VariableDeclarator`?n.init===t:n.type===`AssignmentExpression`&&n.right===t}function NC(e,t){let n=J(e);if(n===void 0)return!1;let r=!1;for(;n!==void 0&&(n.type===t||dC.has(n.type));)n.type===t&&(r=!0),n=J(n);if(!r||n?.type!==`JSXExpressionContainer`)return!1;let i=J(n);return i===void 0?!1:i.type===`JSXElement`||i.type===`JSXFragment`}function PC(e){return NC(e,`ConditionalExpression`)}function FC(e){return NC(e,`LogicalExpression`)}const IC=b(`require-react-component-keys`,`react`,{create(e){let[t]=e.options,n={allowRootKeys:uC.allowRootKeys,ignoreCallExpressions:uC.ignoreCallExpressions,iterationMethods:uC.iterationMethods,memoizationHooks:uC.memoizationHooks,...t},r=new Set(n.ignoreCallExpressions),i=new Set(n.iterationMethods),a=new Set(n.memoizationHooks);function o(t){let o=_C(t),s=o===void 0?pC:CC(e.sourceCode,o,i,a),c=s.iteration||s.memoization;if(OC(t)&&!c){!n.allowRootKeys&&t.type===`JSXElement`&&Yg(t,`key`)&&e.report({messageId:`rootComponentWithKey`,node:t});return}if(!kC(t,r)&&!(MC(t)||jC(t)||PC(t))&&!(t.type===`JSXFragment`&&FC(t))&&!(t.type===`JSXFragment`&&s.memoization&&!s.iteration&&wC(t))){if(t.type===`JSXFragment`){e.report({messageId:`missingKey`,node:t});return}Yg(t,`key`)||e.report({messageId:`missingKey`,node:t})}}return{JSXElement:o,JSXFragment:o}},meta:{docs:{description:`Require keys on nested React JSX children, fragments, and configured iteration or memoization contexts.`},messages:{missingKey:"JSX element in list/callback lacks key prop. React Luau warns about missing keys in _G.__DEV__ mode. Add a unique `key` prop using a stable identifier (not array index).",rootComponentWithKey:"Root return has unnecessary key prop. The key gets overwritten by the parent anyway. Remove the `key` prop."},schema:[{additionalProperties:!1,properties:{allowRootKeys:{default:!1,description:`Allow key props on root component returns`,type:`boolean`},ignoreCallExpressions:{default:uC.ignoreCallExpressions,description:`Function calls where JSX arguments don't need keys`,items:{type:`string`},type:`array`},iterationMethods:{default:uC.iterationMethods,description:`Array method names that indicate iteration contexts where keys are required`,items:{type:`string`},type:`array`},memoizationHooks:{default:[`useCallback`,`useMemo`],description:`Hook names that indicate memoization contexts where keys are required`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}});function LC(e){if(e.id.type===`Identifier`)return e.id.name}function RC(e,t,n){return le(e,t,n,`memo`)}function zC(e,t,n){return e.callee.type===`Identifier`?t.has(e.callee.name):e.callee.type!==`MemberExpression`||e.callee.property.type!==`Identifier`||e.callee.property.name!==`createContext`||e.callee.object.type!==`Identifier`?!1:n.has(e.callee.object.name)}function BC(e){let t=e;for(;t!==null;){if(t.type===`ExportNamedDeclaration`||t.type===`ExportDefaultDeclaration`)return!0;t=t.parent}return!1}function VC(e){return e.parent.type===`VariableDeclaration`?e.parent.parent.type===`ExportNamedDeclaration`||e.parent.parent.type===`ExportDefaultDeclaration`:!1}function HC(e,t,n){for(let r of e.getDeclaredVariables(t))if(r.name===n){for(let{identifier:e}of r.references)if(BC(e))return!0;return!1}return!1}function UC(e,t,n,r){return r.has(t)||VC(n)?!0:HC(e,n,t)}function WC(e,t,n){e.report({data:{variableName:n},messageId:t.kind===`context`?`missingContextDisplayName`:`missingMemoDisplayName`,node:t.node})}const GC=b(`require-react-display-names`,`react`,{create(e){let t=Wm(e.options[0]),n=new Set,r=new Set,i=new Set,a=new Map,o=new Set;return{'AssignmentExpression[left.type="MemberExpression"]'({left:e}){if(e.type!==`MemberExpression`)return;let{property:t}=e;if(t.type!==`Identifier`||t.name!==`displayName`)return;let{object:n}=e;if(n.type!==`Identifier`)return;let r=a.get(n.name);r!==void 0&&(r.hasDisplayName=!0)},ExportDefaultDeclaration(t){if(t.declaration.type===`CallExpression`){if(RC(t.declaration,n,i)){e.report({messageId:`directMemoExport`,node:t});return}zC(t.declaration,r,i)&&e.report({messageId:`directContextExport`,node:t});return}t.declaration.type===`Identifier`&&o.add(t.declaration.name)},ExportNamedDeclaration(e){for(let t of e.specifiers)t.exported.type===`Identifier`&&t.exported.name==="default"&&t.local.type===`Identifier`&&o.add(t.local.name)},ImportDeclaration(e){if(Gm(e,t))for(let t of e.specifiers){let{name:e}=t.local;if(t.type===`ImportSpecifier`){let i=de(t);i===`memo`?n.add(e):i===`createContext`&&r.add(e);continue}i.add(e)}},"Program:exit"(){for(let[t,n]of a)n.hasDisplayName||UC(e.sourceCode,t,n.node,o)&&WC(e,n,t)},VariableDeclarator(e){if(e.init?.type!==`CallExpression`)return;let t=LC(e);if(t!==void 0){if(RC(e.init,n,i)){a.set(t,{hasDisplayName:!1,kind:`memo`,node:e});return}zC(e.init,r,i)&&a.set(t,{hasDisplayName:!1,kind:`context`,node:e})}}}},meta:{docs:{description:`Require displayName on exported memo components and contexts.`},messages:{directContextExport:`Directly exporting createContext() result prevents setting displayName.`,directMemoExport:`Directly exporting memo() result prevents setting displayName.`,missingContextDisplayName:`Context '{{variableName}}' must have a displayName assigned.`,missingMemoDisplayName:`Memo component '{{variableName}}' must have a displayName assigned.`},schema:[{additionalProperties:!1,properties:{environment:zm},type:`object`}],type:`problem`}});function KC(e,t){t.type===`ObjectExpression`&&t.properties.length===0&&e.report({messageId:`emptyObjectDefault`,node:t}),t.type===`ArrayExpression`&&t.elements.length===0&&e.report({messageId:`emptyArrayDefault`,node:t})}function qC(e,t){for(let n of t){if(n.type===`AssignmentPattern`&&n.left.type===`ObjectPattern`){JC(e,n.left),S(n.right)&&KC(e,n.right);continue}n.type===`ObjectPattern`&&JC(e,n)}}function JC(e,t){for(let n of t.properties){let t=YC(n);t!==void 0&&KC(e,t)}}function YC(e){if(e.type!==`Property`||e.value.type!==`AssignmentPattern`)return;let t=e.value.right;return S(t)?t:void 0}function XC(e){if(!(e.type!==`FunctionDeclaration`||!Gg(e)))return[...e.params]}function ZC(e){if(!(e.type!==`VariableDeclarator`||!$g(e)||e.init===null)&&(e.init.type===`ArrowFunctionExpression`||e.init.type===`FunctionExpression`))return[...e.init.params]}const QC=b(`rerender-memo-with-default-value`,`react`,{create(e){return{FunctionDeclaration(t){let n=XC(t);n!==void 0&&qC(e,n)},VariableDeclarator(t){let n=ZC(t);n!==void 0&&qC(e,n)}}},meta:{docs:{description:`Prevent inline empty object and array defaults in component prop destructuring.`,recommended:!0},messages:{emptyArrayDefault:`Default prop value [] creates a new array reference every render — extract to a module-level constant`,emptyObjectDefault:`Default prop value {} creates a new object reference every render — extract to a module-level constant`},type:`problem`}}),$C=/(?<first>[\p{Ll}\d])(?<second>\p{Lu})/gu,ew=/(?<first>\p{Lu})(?<second>\p{Lu}\p{Ll})/gu,tw=`$<first>\0$<second>`;function nw(e){let t=e.trim();if(t.length===0)return``;let n=t.replace($C,tw).replace(ew,tw),r=0,{length:i}=n;for(;n.charCodeAt(r)===0;)r+=1;if(r===i)return``;for(;n.charCodeAt(i-1)===0;)--i;let a=``,o=r;for(let e=r;e<=i;e+=1)if(e===i||n.charCodeAt(e)===0){if(e>o){let t=n.slice(o,e),r=t.charCodeAt(0);a.length>0&&r>=48&&r<=57&&(a+=`_`),a+=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}o=e+1}return a}function rw(e){return e.split(`/`).filter(e=>!e.startsWith(`.`))}function iw(e){return e.split(`/`).filter(e=>e===`..`).length}function aw(e){return e.some(e=>e===nw(e)&&!e.includes(`.`))}function ow(e){return i.basename(e,i.extname(e))===`index`}function sw(e){if(!e.includes(`fixtures`))return!1;let t=e.indexOf(`fixtures`);return!aw(e.slice(0,t))}const cw=b(`strict-component-boundaries`,`react`,{create(e){let n=e.options?.[0],{allow:r=[],maxDepth:a=1}=t.isObject(n)?n:{allow:[],maxDepth:1},o=r.map(e=>new RegExp(e,`u`));return{ImportDeclaration(n){let r=n.source.value;if(!t.isString(r)||!r.startsWith(`.`)||o.some(e=>e.test(r)))return;let{filename:s}=e;if(s===``)return;let c=Mb(r,s);if(!c.found)return;let l=i.relative(s,c.path).replaceAll(`\\`,`/`),u=rw(l);if((iw(l)>1||u.includes(`components`))&&aw(u)&&u.length>a&&!ow(l)&&!sw(u)){e.report({messageId:`noReachingIntoComponent`,node:n});return}u.includes(`components`)&&u.length>a+1&&!ow(l)&&!sw(u)&&e.report({messageId:`noReachingIntoComponent`,node:n})}}},meta:{docs:{description:`Prevent imports that reach into another component's nested modules.`},messages:{noReachingIntoComponent:`Do not reach into an individual component's folder for nested modules. Import from the closest shared components folder instead.`},schema:[{additionalProperties:!1,properties:{allow:{default:[],description:`Regular expression patterns for imports allowed to cross component boundaries.`,items:{type:`string`},type:`array`},maxDepth:{default:1,description:`Maximum path depth allowed inside another component before reporting.`,type:`integer`}},type:`object`}],type:`problem`}}),lw=new Set([`ArrayExpression`,`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`ObjectExpression`]),uw=new Map([[`useCallback`,{closureIndex:0,dependenciesIndex:1}],[`useEffect`,{closureIndex:0,dependenciesIndex:1}],[`useImperativeHandle`,{closureIndex:1,dependenciesIndex:2}],[`useInsertionEffect`,{closureIndex:0,dependenciesIndex:1}],[`useLayoutEffect`,{closureIndex:0,dependenciesIndex:1}],[`useMemo`,{closureIndex:0,dependenciesIndex:1}],[`useSpring`,{closureIndex:0,dependenciesIndex:1}],[`useSprings`,{closureIndex:1,dependenciesIndex:2}],[`useTrail`,{closureIndex:1,dependenciesIndex:2}]]),dw=new Map([[`useBinding`,!0],[`useReducer`,new Set([1])],[`useRef`,!0],[`useState`,new Set([1])],[`useTransition`,new Set([1])]]),fw=new Set([`ClassDeclaration`,`FunctionDeclaration`,`FunctionName`,`ImportBinding`]),pw=new Set(`Array.BigInt.Boolean.clearInterval.clearTimeout.console.Date.decodeURI.decodeURIComponent.Document.Element.encodeURI.encodeURIComponent.Error.Event.Exclude.Extract.Function.Infinity.InstanceType.isFinite.isNaN.JSON.Map.Math.NaN.Node.NonNullable.null.Number.Object.Omit.Parameters.parseFloat.parseInt.Partial.Pick.Promise.Readonly.ReadonlyArray.ReadonlyMap.ReadonlySet.Record.RegExp.Required.ReturnType.Set.setInterval.setTimeout.String.Symbol.undefined.WeakMap.WeakSet.Window`.split(`.`));function mw({callee:e}){if(e.type===`Identifier`)return e.name;if(e.type===`MemberExpression`&&e.property.type===`Identifier`)return e.property.name}function hw(e){let t=0,n=e;for(;;){if(n.type===`ChainExpression`||n.type===`ParenthesizedExpression`||n.type===`TSAsExpression`||n.type===`TSNonNullExpression`||n.type===`TSSatisfiesExpression`||n.type===`TSTypeAssertion`){n=n.expression;continue}if(n.type!==`MemberExpression`)break;t+=1,n=n.object}return t}function gw(e){let t=e;for(;;){if(t.type===`ChainExpression`||t.type===`ParenthesizedExpression`||t.type===`TSAsExpression`||t.type===`TSNonNullExpression`||t.type===`TSSatisfiesExpression`||t.type===`TSTypeAssertion`){t=t.expression;continue}if(t.type!==`MemberExpression`)break;t=t.object}return t.type===`Identifier`?t:void 0}function _w(e){let t=[],n=[e];for(;n.length>0;){let e=n.pop();if(e!==void 0){if(e.type===`Identifier`){t.push(e.name);continue}if(e.type===`MemberExpression`){n.push(e.object);continue}if(vw(e)){n.push(e.expression);continue}if(e.type===`BinaryExpression`||e.type===`LogicalExpression`){n.push(e.right,e.left);continue}if(e.type===`UnaryExpression`){n.push(e.argument);continue}e.type===`ConditionalExpression`&&n.push(e.alternate,e.consequent,e.test)}}return t}function vw(e){return e.type===`ChainExpression`||e.type===`ParenthesizedExpression`||e.type===`TSAsExpression`||e.type===`TSNonNullExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSTypeAssertion`}const yw=new Set([`TSAsExpression`,`TSInstantiationExpression`,`TSNonNullExpression`,`TSSatisfiesExpression`,`TSTypeAssertion`]);function bw(e){return yw.has(e.type)}function xw(e,t){let n=[],r=e;for(;;){if(r.type===`ChainExpression`||r.type===`ParenthesizedExpression`||bw(r)){r=r.expression;continue}if(r.type!==`MemberExpression`)break;n.push(r),r=r.object}let i=r.type===`Identifier`?r.name:t.getText(r);for(let e=n.length-1;e>=0;--e){let r=n[e];if(r===void 0)continue;if(r.computed){i+=`[${t.getText(r.property)}]`;continue}let a=r.property.type===`Identifier`?r.property.name:``;i+=`${r.optional?`?.`:`.`}${a}`}return i}function Sw(e,t){return e.type===`VariableDeclarator`&&e.id.type===t}function Cw(e,t,n){if(e===void 0||!(e instanceof Set)||!Sw(t,`ArrayPattern`))return!1;let{elements:r}=t.id,i=0;for(let t of r){if((t?.type===`Identifier`?t.name:void 0)===n)return e.has(i);i+=1}return!1}function ww(e,t,n){if(e===void 0||!(e instanceof Set)||!Sw(t,`ObjectPattern`))return!1;for(let r of t.id.properties){if(r.type!==`Property`||va(r)?.name!==n)continue;let t=_a(r);return t!==void 0&&e.has(t)}return!1}function Tw(e,t,n,r){if(e?.type!==`CallExpression`)return!1;let i=mw(e);if(i===void 0)return!1;let a=r.get(i);return a===!0||Cw(a,t,n)||ww(a,t,n)}function Ew(e){if(e?.type!==`CallExpression`)return!1;let{callee:t}=e;return t.type===`MemberExpression`&&t.object.type===`Identifier`&&t.object.name===`React`&&t.property.type===`Identifier`&&t.property.name===`joinBindings`}function Dw(e){if(e?.type!==`CallExpression`)return!1;let{callee:t}=e;return t.type===`MemberExpression`&&t.property.type===`Identifier`&&t.property.name===`map`}function Ow(e){return e?.type===`Literal`||e?.type===`TemplateLiteral`||e?.type===`UnaryExpression`&&e.argument.type===`Literal`}function kw(e,t){let n=e.defs.find(e=>e.node===t);if(n?.node.type!==`VariableDeclarator`)return!1;let r=n.node.parent.parent;return r?.type===`Program`||r?.type===`ExportNamedDeclaration`}function Aw(e,{node:t,type:n},r,i){if(fw.has(n))return!0;if(n!==`Variable`||t.type!==`VariableDeclarator`)return!1;let{parent:a}=t;if(a.type!==`VariableDeclaration`||a.kind!==`const`)return!1;let{init:o}=t;return Tw(o,t,r,i)||Ew(o)||Dw(o)||Ow(o)||kw(e,t)}function jw(e,t,n){if(!e)return!1;let r=e.defs;if(r.length===0)return!1;for(let i of r)if(Aw(e,i,t,n))return!0;return!1}function Mw(e,t){let n=t,r=e;for(;n;){if(n.type===`CallExpression`&&n.callee===r){if(r.type===`MemberExpression`)return r.object;break}let e=n.type===`MemberExpression`&&n.object===r,t=n.type===`ChainExpression`,i=n.type===`TSNonNullExpression`;if(!e&&!t&&!i)break;r=n,n=r.parent??void 0}return r}const Nw=new Set([`ArrowFunctionExpression`,`FunctionDeclaration`,`FunctionExpression`,`VariableDeclarator`]);function Pw(e){if(e.type!==`Identifier`)return!1;let{parent:t}=e;return t.type===`Property`&&t.computed&&t.key===e}function Fw(e){if(e.type!==`Identifier`)return!1;let t=e.parent??void 0;for(;t;){if(yw.has(t.type)){t=t.parent??void 0;continue}if(t.type.startsWith(`TS`))return!0;if(Nw.has(t.type))return!1;t=t.parent??void 0}return!1}function Iw(e,t){let n=t.parent??void 0;for(;n;){if(A(n)){let t=n;return e.defs.some(e=>e.type===`Parameter`&&e.node===t)?!0:e.defs.some(e=>{let n=e.node.parent??void 0;for(;n&&n!==t;)n=n.parent??void 0;return n===t})}n=n.parent??void 0}return!1}function Lw(e,t){if(e.type!==`Identifier`)return;let n,r=t;for(;r;){let t=r.set.get(e.name);if(t){n=t;break}r=r.upper}if(!(!n||n.defs.length===0))for(let e of n.defs){let t=e.node;if(t.type===`FunctionDeclaration`)return t;if(t.type===`VariableDeclarator`&&t.init&&(t.init.type===`ArrowFunctionExpression`||t.init.type===`FunctionExpression`))return t.init}}function Rw(e,t){let n=t;for(;n;){let t=n.set.get(e);if(t)return t;n=n.upper}}function zw(e,t){let n=e.node;for(;n;){if(n===t)return!0;n=n.parent??void 0}return!1}function Bw(e,t){return e?.defs.every(e=>!zw(e,t))??!1}function Vw(e,t,n,r){let i=Mw(e,e.parent??void 0);return{name:t,depth:hw(i),forceDependency:Pw(e),node:i,usagePath:xw(i,r),variable:n}}function Hw(e){return e.type===`ParenthesizedExpression`||e.type===`TSSatisfiesExpression`||e.type===`TSAsExpression`||e.type===`TSTypeAssertion`||e.type===`TSNonNullExpression`}function Uw(e,n,r){let i=n.visitorKeys[e.type]??[];for(let n of i){if(!t.isObject(e))break;let i=e[n];if(Array.isArray(i))for(let e of i)S(e)&&r(e);else S(i)&&r(i)}}function Ww(e,t){let n=[],r=new Set;function i(i){if(i.type!==`Identifier`)return;let{name:a}=i;if(r.has(a)||pw.has(a)||Fw(i))return;let o=Rw(a,t.getScope(i));Bw(o,e)&&o!==void 0&&Iw(o,e)&&(r.add(a),n.push(Vw(i,a,o,t)))}function a(e){if(e.type===`Identifier`&&i(e),Hw(e)){a(e.expression);return}if(e.type===`MemberExpression`){a(e.object),e.computed&&a(e.property);return}if(e.type===`ChainExpression`){a(e.expression);return}if(e.type===`Property`){e.computed&&a(e.key),a(e.value);return}Uw(e,t,a)}return a(e),n}function Gw(e,t){let n=[];for(let r of e.elements){if(!r)continue;let e=r.type===`SpreadElement`?r.argument:r,i=xw(e,t),a=hw(e);n.push({name:i,depth:a,node:e})}return n}function Kw({name:e}){return e}function qw(e){return e?lw.has(e.type):!1}function Jw(e,{parent:t}){return t.type===`VariableDeclarator`?e.variable?.defs.some(e=>e.node===t)??!1:!1}function Yw(e){return e.length>0&&t.isNumber(e[0])}function Xw(e){return e.length>0&&t.isString(e[0])}function Zw(e){return e===!0||e===!1?e:t.isNumber(e)?new Set([e]):Array.isArray(e)&&(Yw(e)||Xw(e))?new Set(e):!1}function Qw(e,t,n,r){let i=[],a=0;for(let{name:e}of t)e!==n.name&&(i[a++]=e);let o=`[${i.join(`, `)}]`;e.report({data:{name:n.name},fix(e){return e.replaceText(r,o)},messageId:`unnecessaryDependency`,node:n.node,suggest:[{data:{name:n.name},fix(e){return e.replaceText(r,o)},messageId:`removeDependencySuggestion`}]})}function $w(e){return e!==void 0&&A(e)}function eT(e,t){return e.filter(e=>e.forceDependency||!jw(e.variable,e.name,t))}function tT(e,t,n,r){if(r.length===0)return;let i=[...new Set(r.map(Kw))].join(`, `),a=`[${[...new Set(r.map(({usagePath:e})=>e))].toSorted().join(`, `)}]`;e.report({data:{deps:i},fix(e){return e.insertTextAfter(n,`, ${a}`)},messageId:`missingDependenciesArray`,node:t,suggest:[{data:{dependencies:a},fix(e){return e.insertTextAfter(n,`, ${a}`)},messageId:`addDependenciesArraySuggestion`}]})}function nT(e){let t=gw(e);return t?.type===`Identifier`?t.name:void 0}function rT(e,t){let n=nT(t.node);if(n!==void 0)return e.find(e=>nT(e.node)===n)}function iT(e,t){return!e.forceDependency&&jw(e.variable,e.name,t)}function aT(e,t,n,r,i,a,o){for(let s of t){let c=rT(n,s);if(c===void 0){a&&Qw(e,t,s,r);continue}if(o&&iT(c,i)){Qw(e,t,s,r);continue}a&&s.depth>c.depth&&Qw(e,t,s,r)}}function oT(e,t,n){let r=gw(e.node);if(r?.type===`Identifier`&&e.depth<=t.depth)return r.name===nT(t.node);if(!n)return!1;let i=nT(t.node);return i!==void 0&&_w(e.node).includes(i)}function sT(e,t,n,r){let i=[];for(let a of eT(e,n))nT(a.node)!==void 0&&(t.some(e=>oT(e,a,r))||i.push(a));return i}function cT(e,t,n,r){if(r.length===0)return;let i=n.map(({name:e})=>e),a=r.map(({usagePath:e})=>e),o=`[${[...i,...a].toSorted().join(`, `)}]`,s=n.at(-1)?.node??t,c=r.at(0);if(c!==void 0&&r.length===1){e.report({data:{name:c.usagePath},fix(e){return e.replaceText(t,o)},messageId:`missingDependency`,node:s,suggest:[{data:{name:c.usagePath},fix(e){return e.replaceText(t,o)},messageId:`addDependencySuggestion`}]});return}e.report({data:{names:a.join(`, `)},fix(e){return e.replaceText(t,o)},messageId:`missingDependencies`,node:s,suggest:[{fix(e){return e.replaceText(t,o)},messageId:`addMissingDependenciesSuggestion`}]})}function lT(e){let t=e.variable?.defs[0];return t?.node.type===`VariableDeclarator`?t.node.init??void 0:void 0}function uT(e,t,n,r){for(let i of eT(t,r)){let t=nT(i.node);if(t!==void 0){for(let r of n)if(nT(r.node)===t&&r.depth===i.depth){r.depth===0&&qw(lT(i))&&e.report({data:{name:i.usagePath},messageId:`unstableDependency`,node:r.node});break}}}}const dT=b(`use-exhaustive-dependencies`,`react`,{create(e){let[t]=e.options,n={hooks:t?.hooks??[],reportMissingDependenciesArray:t?.reportMissingDependenciesArray??!0,reportUnnecessaryDependencies:t?.reportUnnecessaryDependencies??!0,reportUnnecessaryStableDependencies:t?.reportUnnecessaryStableDependencies??!1,resolveExpressionDependencies:t?.resolveExpressionDependencies??!0},r=new Map(uw);for(let e of n.hooks)e.closureIndex!==void 0&&e.dependenciesIndex!==void 0&&r.set(e.name,{closureIndex:e.closureIndex,dependenciesIndex:e.dependenciesIndex});let i=new Map(dw);for(let e of n.hooks)e.stableResult!==void 0&&i.set(e.name,Zw(e.stableResult));let a=new WeakMap;function o(t){let n=a.get(t);if(n)return n;let r=e.sourceCode.getScope(t);return a.set(t,r),r}function s(e,t){if(e.type===`ArrowFunctionExpression`)return e;if(!(A(e)||e.type===`Identifier`))return;let n=Lw(e,o(t));return $w(n)?n:void 0}return{CallExpression(t){let a=mw(t);if(a===void 0||a===``)return;let o=r.get(a);if(!o)return;let{closureIndex:c,dependenciesIndex:l}=o,u=t.arguments,d=u[c];if(d===void 0)return;let f=s(d,t);if(!f)return;let p=u[l];if(!p&&n.reportMissingDependenciesArray){tT(e,t,d,eT(Ww(f,e.sourceCode).filter(e=>!Jw(e,t)),i));return}if(!p||p.type!==`ArrayExpression`)return;let m=p,h=Ww(f,e.sourceCode).filter(e=>!Jw(e,t)),g=Gw(m,e.sourceCode);(n.reportUnnecessaryDependencies||n.reportUnnecessaryStableDependencies)&&aT(e,g,h,m,i,n.reportUnnecessaryDependencies,n.reportUnnecessaryStableDependencies),cT(e,m,g,sT(h,g,i,n.resolveExpressionDependencies)),uT(e,h,g,i)}}},meta:{docs:{description:`Enforce exhaustive and correct dependency specification in React hooks to prevent stale closures and unnecessary re-renders`},fixable:`code`,hasSuggestions:!0,messages:{addDependenciesArraySuggestion:`Add dependencies array: {{dependencies}}`,addDependencySuggestion:`Add '{{name}}' to dependencies array`,addMissingDependenciesSuggestion:`Add missing dependencies to array`,missingDependencies:`This hook does not specify all its dependencies. Missing: {{names}}`,missingDependenciesArray:`This hook does not specify its dependencies array. Missing: {{deps}}`,missingDependency:`This hook does not specify its dependency on {{name}}.`,removeDependencySuggestion:`Remove '{{name}}' from dependencies array`,unnecessaryDependency:`This dependency {{name}} can be removed from the list.`,unstableDependency:`{{name}} changes on every re-render. Wrap the definition in useCallback() or useMemo() to stabilize it.`},schema:[{additionalProperties:!1,properties:{hooks:{default:[],description:`Array of custom hook entries to check for exhaustive dependencies`,items:{additionalProperties:!1,properties:{name:{description:`The name of the hook`,type:`string`},closureIndex:{description:`Index of the closure argument for dependency validation`,type:`number`},dependenciesIndex:{description:`Index of the dependencies array for validation`,type:`number`},stableResult:{description:`Specify stable results: true (whole result), number (array index), number[] (multiple indices), or string[] (object properties)`,oneOf:[{type:`boolean`},{type:`number`},{items:{type:`number`},type:`array`},{items:{type:`string`},type:`array`}]}},required:[`name`],type:`object`},type:`array`},reportMissingDependenciesArray:{default:!0,description:`Report when the dependencies array is completely missing`,type:`boolean`},reportUnnecessaryDependencies:{default:!0,description:`Report when unnecessary dependencies are specified`,type:`boolean`},reportUnnecessaryStableDependencies:{default:!1,description:`Report when stable values (useRef, useState setter, etc.) are included as dependencies`,type:`boolean`},resolveExpressionDependencies:{default:!0,description:"Recognize expression dependencies like `value !== undefined` as covering a capture",type:`boolean`}},type:`object`}],type:`problem`}}),fT=/^use[A-Z]/u;function pT(e){return fT.test(e)}function mT(e){return t.isObject(e)?e:{}}function hT(e){if((e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)&&e.id!==null)return C(e.id.name)||pT(e.id.name);let{parent:t}=e;return t.type===`VariableDeclarator`&&E(t.id)?C(t.id.name)||pT(t.id.name):t.type===`Property`&&E(t.key)||t.type===`MethodDefinition`&&E(t.key)?C(t.key.name)||pT(t.key.name):!1}function gT(e){let t=N(e);return t!==void 0&&pT(t)}function _T(e){let t=e.parent,n=!1;for(let r=0;r<20&&t!==null&&!A(t);r+=1){if(t.type===`TryStatement`){let r=e;for(;r!==null&&r!==t;){if(r===t.finalizer){n=!0;break}r=r.parent}break}t=t.parent}return n}function vT(e,t){return t!==void 0&&e.callee.type===`Identifier`&&`name`in e.callee&&e.callee.name===t}function yT(e,t){return{afterEarlyReturn:!1,functionDepth:t,inConditional:!1,inLoop:!1,inNestedFunction:!1,inTryBlock:!1,isComponentOrHook:!1,...e}}function bT(e){if(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)return e.id?.name??void 0}function xT(e){return E(e)?e.name:void 0}function ST(e,t,n,r){if(n===void 0||Object.keys(n).length===0)return!1;let i=CT(t,n);if(i!==void 0)return i;let a=t.callee.type===`Identifier`?r.get(e):void 0;return a!==void 0&&n[a]===!1||(a!==void 0&&n[a],!1)}function CT(e,t){if(e.callee.type!==`MemberExpression`)return;let n=xT(e.callee.object);if(n!==void 0&&t[n]===!1)return!0;if(n!==void 0&&t[n]===!0)return!1}const wT=b(`use-hook-at-top-level`,`react`,{create(e){let t=mT(e.options[0]),n=[],r=[],i,a=new Map;function o(){return n.length>0?n.at(-1):void 0}function s(e){n.push(e)}function c(){n.pop()}function l(e){let t=o();t!==void 0&&(n[n.length-1]={...t,...e})}function u(e,n){let{ignoreHooks:r,importSources:i,onlyHooks:o}=t;return o!==void 0&&o.length>0?!o.includes(e):r?.includes(e)===!0||ST(e,n,i,a)}function d(e){let t=o(),n=t===void 0?0:t.functionDepth+1,a=hT(e);r.push(i);let c=bT(e);c!==void 0&&(i=c),t?.isComponentOrHook===!0?s(yT({functionDepth:n,inNestedFunction:!0},n)):a&&s(yT({functionDepth:n,isComponentOrHook:!0},n))}function f(){o()!==void 0&&c(),i=r.pop()}return{ArrowFunctionExpression:d,"ArrowFunctionExpression:exit":f,CallExpression(t){if(!gT(t))return;let n=N(t);if(n===void 0||u(n,t))return;let r=o();if(!(r===void 0||!r.isComponentOrHook&&!r.inNestedFunction||_T(t))){if(vT(t,i)){e.report({messageId:`recursiveHookCall`,node:t});return}if(r.inNestedFunction){e.report({messageId:`nestedFunction`,node:t});return}if(r.inConditional){e.report({messageId:`conditionalHook`,node:t});return}if(r.inLoop){e.report({messageId:`loopHook`,node:t});return}if(r.inTryBlock){e.report({messageId:`tryBlockHook`,node:t});return}r.afterEarlyReturn&&e.report({messageId:`afterEarlyReturn`,node:t})}},ConditionalExpression(){l({inConditional:!0})},"ConditionalExpression:exit"(){l({inConditional:!1})},DoWhileStatement(){l({inLoop:!0})},"DoWhileStatement:exit"(){l({inLoop:!1})},ForInStatement(){l({inLoop:!0})},"ForInStatement:exit"(){l({inLoop:!1})},ForOfStatement(){l({inLoop:!0})},"ForOfStatement:exit"(){l({inLoop:!1})},ForStatement(){l({inLoop:!0})},"ForStatement:exit"(){l({inLoop:!1})},FunctionDeclaration:d,"FunctionDeclaration:exit":f,FunctionExpression:d,"FunctionExpression:exit":f,IfStatement(){l({inConditional:!0})},"IfStatement:exit"(){l({inConditional:!1})},ImportDeclaration(e){if(t.importSources===void 0||Object.keys(t.importSources).length===0)return;let n=e.source.value;for(let t of e.specifiers)t.type===`ImportSpecifier`&&E(t.imported)&&pT(t.imported.name)&&a.set(t.local.name,n)},LogicalExpression(){l({inConditional:!0})},"LogicalExpression:exit"(){l({inConditional:!1})},"ReturnStatement:exit"(){l({afterEarlyReturn:!0})},SwitchStatement(){l({inConditional:!0})},"SwitchStatement:exit"(){l({inConditional:!1})},TryStatement(){l({inTryBlock:!0})},"TryStatement:exit"(){l({inTryBlock:!1})},WhileStatement(){l({inLoop:!0})},"WhileStatement:exit"(){l({inLoop:!1})}}},meta:{docs:{description:`Enforce that React hooks are only called at the top level of components or custom hooks, never conditionally or in nested functions`,recommended:!0},messages:{afterEarlyReturn:`This hook is being called after an early return. Hooks must be called unconditionally and in the same order every render.`,conditionalHook:`This hook is being called conditionally. All hooks must be called in the exact same order in every component render.`,loopHook:`This hook is being called inside a loop. All hooks must be called in the exact same order in every component render.`,nestedFunction:`This hook is being called from a nested function. All hooks must be called unconditionally from the top-level component.`,recursiveHookCall:`This hook is being called recursively. Recursive calls require a condition to terminate, which violates hook rules.`,tryBlockHook:`This hook is being called inside a try block. Hooks must be called unconditionally at the top level.`},schema:[{additionalProperties:!1,properties:{ignoreHooks:{description:`Hook names that should be ignored even when they match the hook naming pattern.`,items:{type:`string`},type:`array`},importSources:{additionalProperties:{type:`boolean`},description:`Import sources or namespace names mapped to whether their hooks should be checked.`,type:`object`},onlyHooks:{description:`If set, only these hook names are checked.`,items:{type:`string`},type:`array`}},type:`object`}],type:`problem`}}),TT={bannedClasses:new Map,bannedProperties:new Map};function ET(e){return e.type===`JSXIdentifier`?e.name:e.name.name}function DT(e){let t=new Map;if(M(e)){for(let n of e)t.set(n.toLowerCase(),{message:``,originalName:n});return t}if(Ei(e))for(let[n,r]of Object.entries(e))t.set(n.toLowerCase(),{message:r,originalName:n});return t}function OT(e){let n=new Map;if(e===void 0||!t.isObject(e))return n;for(let[r,i]of Object.entries(e)){if(!t.isObject(i))continue;let e=new Map;for(let[n,r]of Object.entries(i))t.isString(r)&&e.set(n.toLowerCase(),{message:r,propertyName:n});e.size>0&&n.set(r.toLowerCase(),e)}return n}function kT(e){if(!t.isObject(e))return TT;let{bannedInstances:n,bannedProperties:r}=e;return{bannedClasses:DT(n),bannedProperties:OT(r)}}function AT(e){let t=e;for(;t.upper!==null&&t.type!==`function`&&t.type!==`module`&&t.type!==`global`;)t=t.upper;return t}function jT(e){if(!Me(e,`Instance`))return;let[n]=e.arguments;if(!(n?.type!==`Literal`||!t.isString(n.value)))return n.value}const MT=b(`ban-instances`,`roblox`,{create(e){let t=kT(e.options[0]);if(t.bannedClasses.size===0&&t.bannedProperties.size===0)return{};let{sourceCode:n}=e,{bannedClasses:r,bannedProperties:i}=t,a=new Map;function o(t,n){if(n.message!==``){e.report({data:{className:n.originalName,customMessage:n.message},messageId:`bannedInstanceCustom`,node:t});return}e.report({data:{className:n.originalName},messageId:`bannedInstance`,node:t})}function s(t,n,r){if(r.message!==``){e.report({data:{className:n,customMessage:r.message,propertyName:r.propertyName},messageId:`bannedPropertyCustom`,node:t});return}e.report({data:{className:n,propertyName:r.propertyName},messageId:`bannedProperty`,node:t})}function c(e){if(e.id.type!==`Identifier`||e.init===null)return;let t=m(e.init);if(t.type!==`NewExpression`)return;let r=jT(t);if(r===void 0)return;let i=_(n.getScope(e),e.id.name);i!==void 0&&a.set(i,{className:r,classNameKey:r.toLowerCase(),functionScope:AT(i.scope)})}function l(e){let t=n.getScope(e),r=_(t,e.name);if(r===void 0)return;let i=a.get(r);if(i!==void 0)return i.functionScope===AT(t)?i:void 0}return{AssignmentExpression(e){if(e.left.type!==`MemberExpression`)return;let t=g(e.left);if(t===void 0)return;let n=m(e.left.object);if(n.type!==`Identifier`)return;let r=l(n);if(r===void 0)return;let a=i.get(r.classNameKey);if(a===void 0)return;let o=a.get(t.toLowerCase());o!==void 0&&s(e.left,r.className,o)},JSXOpeningElement(e){if(e.name.type!==`JSXIdentifier`)return;let{name:t}=e.name,n=t.charAt(0);if(n!==n.toLowerCase())return;let a=t.toLowerCase(),c=r.get(a);c!==void 0&&o(e,c);let l=i.get(a);if(l!==void 0)for(let n of e.attributes){if(n.type!==`JSXAttribute`)continue;let e=ET(n.name);if(e===void 0)continue;let r=l.get(e.toLowerCase());r!==void 0&&s(n,t,r)}},NewExpression(e){let t=jT(e);if(t===void 0)return;let n=r.get(t.toLowerCase());n!==void 0&&o(e,n)},VariableDeclarator(e){c(e)}}},meta:{docs:{description:`Ban specified Roblox Instance classes and configured Instance properties.`},messages:{bannedInstance:`Instance class '{{className}}' is banned by project configuration. This class may cause performance issues, is deprecated, or has a better alternative. Check project guidelines for the recommended replacement.`,bannedInstanceCustom:`{{customMessage}}`,bannedProperty:`Property '{{propertyName}}' on Instance class '{{className}}' is banned by project configuration. This property may cause performance issues, is deprecated, or has a better alternative. Check project guidelines for the recommended replacement.`,bannedPropertyCustom:`{{customMessage}}`},schema:[{additionalProperties:!1,properties:{bannedInstances:{description:`Map of banned class names to custom messages, or an array of class names.`,oneOf:[{items:{type:`string`},type:`array`},{additionalProperties:{type:`string`},type:`object`}]},bannedProperties:{additionalProperties:{additionalProperties:{type:`string`},type:`object`},description:`Map of banned class names to maps of banned property names and custom messages.`,type:`object`}},type:`object`}],type:`problem`}}),NT={baseThreshold:10,errorThreshold:25,interfacePenalty:20,performanceMode:!0};function PT({callee:e}){return e.type===`MemberExpression`&&e.object.type===`Identifier`&&e.object.name===`Ianitor`}function FT(e){if(e.type!==`TSTypeReference`)return e;let{typeArguments:t,typeName:n}=e;return n.type!==`Identifier`||n.name!==`Readonly`?e:t?.params[0]??e}function IT(e){let t=FT(e);if(t.type!==`TSTypeReference`)return;let{typeArguments:n,typeName:r}=t;if(r.type!==`TSQualifiedName`)return;let{left:i,right:a}=r;if(i.type!==`Identifier`||i.name!==`Ianitor`||a.name!==`Static`)return;let o=n?.params[0];if(o?.type!==`TSTypeQuery`)return;let{exprName:s}=o;return s.type===`Identifier`?s.name:void 0}function LT(e){let t=FT(e);if(t.type!==`TSTypeReference`)return!1;let{typeArguments:n,typeName:r}=t;if(r.type!==`TSQualifiedName`)return!1;let{left:i,right:a}=r;return i.type!==`Identifier`||i.name!==`Ianitor`||a.name!==`Static`?!1:n?.params[0]?.type===`TSTypeQuery`}function RT(e){let{callee:t}=e;if(t.type!==`MemberExpression`||t.property.type!==`Identifier`)return 0;switch(t.property.name){case`array`:case`instanceIsA`:case`instanceOf`:case`optional`:return 2;case`boolean`:case`number`:case`string`:return 1;case`interface`:case`strictInterface`:{let[t]=e.arguments;return t?.type===`ObjectExpression`?10+t.properties.length*3:0}case`intersection`:case`union`:return e.arguments.length*2;case`map`:case`record`:return 3;default:return 1}}function Y(e,t,n,r){let i=e+t;return n.performanceMode?Math.min(i,r):i}function zT(e,t,n,r,i,a,o,s=0){return Y(e,X(t,n,r,i,a,o)+s,r,o)}function BT(e,t,n,r,i,a,o){let s=e;for(let e of t){if(!(`typeAnnotation`in e))continue;let{typeAnnotation:t}=e;t?.type===`TSTypeAnnotation`&&(s=zT(s,t.typeAnnotation,n,r,i,a,o))}return s}function VT(e,t,n,r,i,a,o,s,c){if(`types`in t){let l=e,{types:u}=t;for(let e of u)l=zT(l,e,n,r,i,a,o);return Y(l,s*(u.length+c),r,o)}return e}function HT(e,t){let n=t.get(e);if(n!==void 0)return n;let r=Math.log2(e+1);return t.set(e,r),r}function X(e,t,n,r,i,a){let o=r.nodeCache.get(e);if(o!==void 0)return o;if(r.visitedNodes.has(e))return 50;r.visitedNodes.add(e);let s=0,c=t+1;switch(e.type){case`TSAnyKeyword`:case`TSNeverKeyword`:case`TSUnknownKeyword`:break;case`TSArrayType`:if(`elementType`in e){let{elementType:t}=e;s=Y(X(t,c,n,r,i,a),1,n,a);break}s=1;break;case`TSBigIntKeyword`:case`TSBooleanKeyword`:case`TSNullKeyword`:case`TSNumberKeyword`:case`TSStringKeyword`:case`TSSymbolKeyword`:case`TSUndefinedKeyword`:case`TSVoidKeyword`:s=1;break;case`TSConditionalType`:{let{checkType:t,extendsType:o,falseType:l,trueType:u}=e;s=Y(Y(3,X(t,c,n,r,i,a),n,a),X(o,c,n,r,i,a),n,a),s=Y(Y(s,X(u,c,n,r,i,a),n,a),X(l,c,n,r,i,a),n,a);break}case`TSFunctionType`:case`TSMethodSignature`:{s=2;let{params:t}=e;for(let e of t){if(!(`typeAnnotation`in e))continue;let{typeAnnotation:t}=e;t?.type===`TSTypeAnnotation`&&(s=Y(s,X(t.typeAnnotation,c,n,r,i,a),n,a))}if(`returnType`in e){let{returnType:t}=e;t?.type===`TSTypeAnnotation`&&(s=Y(s,X(t.typeAnnotation,c,n,r,i,a),n,a))}break}case`TSInterfaceDeclaration`:{s=n.interfacePenalty;let{body:t,extends:o}=e;o.length>0&&(s=Y(s,o.length*5,n,a));let l=t.body;s=Y(s,l.length*2,n,a),s=BT(s,l,c,n,r,i,a);break}case`TSIntersectionType`:s=VT(s,e,c,n,r,i,a,3,0);break;case`TSMappedType`:{let{constraint:t,typeAnnotation:o}=e;s=zT(5,t,c,n,r,i,a),o!==null&&(s=zT(s,o,c,n,r,i,a));break}case`TSTupleType`:{let{elementTypes:t}=e;s=1;for(let e of t)e.type!==`TSRestType`&&e.type!==`TSOptionalType`&&(s=zT(s,e,c,n,r,i,a));s=Y(s,1.5*t.length,n,a);break}case`TSTypeLiteral`:{let{members:t}=e;s=2+t.length*.5,s=BT(s,t,c,n,r,i,a);break}case`TSTypeReference`:{s=2;let{typeArguments:t}=e,o=t?.params??[];for(let e of o)s=zT(s,e,c,n,r,i,a,2);break}case`TSUnionType`:s=VT(s,e,c,n,r,i,a,2,-1);break;default:s=1}return s*=HT(t,i),r.nodeCache.set(e,s),r.visitedNodes.delete(e),s}const UT=b(`enforce-ianitor-check-type`,`roblox`,{create(e){let t=e.options[0],n={...NT,...t},r={nodeCache:new WeakMap,visitedNodes:new WeakSet},i=new Set,a=new Map,o=n.errorThreshold*2,s=!1,c=new Map,l=new Map,u=new Map;return{Identifier(e){e.name===`Ianitor`&&(s=!0)},"Program:exit"(){if(s){for(let[t,n]of l)e.report({data:{score:n.complexity.toFixed(1)},messageId:`missingIanitorCheckType`,node:t});for(let[t]of c)e.report({data:{name:t.id.name},messageId:`complexInterfaceNeedsCheck`,node:t});for(let[t,n]of u){let{id:r}=t;r.type===`Identifier`&&i.has(r.name)||e.report({data:{score:n.complexity.toFixed(1)},messageId:`missingIanitorCheckType`,node:r})}}},TSInterfaceDeclaration(e){let t=X(e,0,n,r,a,o);t<n.interfacePenalty||c.set(e,{complexity:t})},TSTypeAliasDeclaration(e){let t=IT(e.typeAnnotation);if(t!==void 0&&(s=!0,i.add(t)),LT(e.typeAnnotation))return;let c=X(e.typeAnnotation,0,n,r,a,o);c<n.baseThreshold||l.set(e,{complexity:c})},VariableDeclarator(e){let{id:t,init:r}=e;if(r?.type!==`CallExpression`||!PT(r)||(s=!0,t.type===`Identifier`&&t.typeAnnotation!==void 0&&t.typeAnnotation!==null))return;let i=RT(r);i<n.baseThreshold||u.set(e,{complexity:i})}}},meta:{docs:{description:`Enforce Ianitor.Check<T> type annotations on complex TypeScript types`,recommended:!0},messages:{complexInterfaceNeedsCheck:`Interface '{{name}}' requires Ianitor.Check<T> annotation (interfaces always need explicit checking)`,missingIanitorCheckType:`Complex type (score: {{score}}) requires Ianitor.Check<T> annotation for type safety`},schema:[{additionalProperties:!1,properties:{baseThreshold:{default:NT.baseThreshold,description:`Minimum complexity score before missing Ianitor.Check<T> annotations are reported.`,minimum:1,type:`number`},errorThreshold:{default:NT.errorThreshold,description:`Complexity score used to cap recursive analysis before reporting is determined.`,minimum:1,type:`number`},interfacePenalty:{default:NT.interfacePenalty,description:`Complexity penalty applied when an Ianitor validator builds an interface-like shape.`,minimum:1,type:`number`},performanceMode:{default:NT.performanceMode,description:`Whether repeated type nodes are cached during complexity analysis.`,type:`boolean`}},type:`object`}],type:`problem`}});function WT(e){return e.type===`Identifier`||e.type===`PrivateIdentifier`||Z(e)}function Z(e){let t=m(e);return t.type===`Identifier`||Ye(t)?!0:O(t)?GT(t):be(t)?t.operator!==`delete`&&Z(t.argument):xe(t)||Se(t)?KT(t):Ce(t)?qT(t):We(t)?XT(t.expressions):Ve(t)?JT(t):He(t)?YT(t):we(t)?XT(t.expressions):Fe(t)}function GT(e){return e.optional||e.object.type===`Super`||!Z(e.object)?!1:!e.computed||Z(e.property)}function KT(e){return Z(e.left)&&Z(e.right)}function qT(e){return Z(e.test)&&Z(e.consequent)&&Z(e.alternate)}function JT(e){for(let t of e.elements)if(t!==null&&(t.type===`SpreadElement`||!Z(t)))return!1;return!0}function YT(e){for(let t of e.properties)if(t.type===`SpreadElement`||t.kind!==`init`||t.method||t.computed&&!WT(t.key)||!Z(t.value))return!1;return!0}function XT(e){for(let t of e)if(!Z(t))return!1;return!0}const ZT={environment:`roblox-ts`,requireExplicitGenericOnNewArray:!0};function QT(e){return e.type===`Identifier`}function $T(e,t){let n=m(t.callee);return!QT(n)||n.name!==`Array`?!1:!v(e,n,`Array`)}function eE(e,t){if(e.type!==`TSTypeReference`||!QT(e.typeName)||e.typeName.name!==`Array`&&e.typeName.name!==`ReadonlyArray`||e.typeArguments?.params.length!==1)return;let[n]=e.typeArguments.params;return n===void 0?void 0:t.getText(n)}const tE=/:\s*(?:Array<.+>|ReadonlyArray<.+>)\s*=/u;function nE(e){return tE.exec(e)!==null}function rE(e){if(QT(e)||e.type===`ArrayPattern`||e.type===`ObjectPattern`)return e.typeAnnotation??void 0}function iE(e,t){let{parent:n}=e;if(w(n)&&n.init===e){let e=rE(n.id);return e!==void 0&&eE(e.typeAnnotation,t)!==void 0}return Je(n)&&n.right===e?nE(t.getText(n)):Ee(n)&&n.value===e&&n.typeAnnotation!==void 0&&n.typeAnnotation!==null?eE(n.typeAnnotation.typeAnnotation,t)!==void 0:qe(n)&&n.expression===e||Ke(n)&&n.expression===e?eE(n.typeAnnotation,t)!==void 0:!1}function aE(e){if(e===void 0)return!1;let{typeAnnotation:t}=e;return t.type!==`TSTypeReference`||!QT(t.typeName)?!1:t.typeName.name===`ReadonlyArray`}function oE(e){let n=m(e);return Fe(n)&&`value`in n?!t.isNumber(n.value):Ve(n)||He(n)||Ie(n)||je(n)||Ne(n)?!0:We(n)?n.expressions.length===0:be(n)?n.operator===`void`||n.operator===`typeof`&&!n.prefix:!1}function sE(e,t){let n=m(e);if(!(!ge(n)||n.optional)&&!(!O(n.callee)||n.callee.optional)&&!(!QT(n.callee.object)||n.callee.object.name!==t))return g(n.callee)===`push`?n:void 0}function cE(e,t,n){for(let r=t;r<e.length;r+=1){let t=e[r];if(!(t===void 0||!Ge(t))&&sE(t.expression,n)!==void 0)return!0}return!1}function lE(e,t){let n=[],r=0;for(let i of e){if(i.type===`SpreadElement`){n[r++]=`...${t.getText(i.argument)}`;continue}n[r++]=t.getText(i)}return`[${n.join(`, `)}]`}function uE(e,t,n,r,i){if(n.init===null||r.length===0)return[];let[a]=r,o=r.at(-1);if(a===void 0||o===void 0)return[];let[s]=a.range;for(;s>0;){let e=t.text[s-1];if(e===` `||e===` `){--s;continue}e===`
92
+ `&&--s;break}return[e.replaceText(n.init,i),e.removeRange([s,o.range[1]])]}function dE(e,t,n){let{sourceCode:r}=e;if(t.arguments.length===0){fE(e,t,n);return}if(t.arguments.length>1){pE(e,t,n);return}mE(e,t,n,r)}function fE(e,t,n){n.requireExplicitGenericOnNewArray&&(t.typeArguments!==void 0&&t.typeArguments!==null&&t.typeArguments.params.length>0||iE(t,e.sourceCode)||e.report({messageId:`requireExplicitGenericOnNewArray`,node:t}))}function pE(e,t,n){let[r]=t.arguments;if(r===void 0||r.type!==`SpreadElement`&&n.environment===`roblox-ts`&&!oE(r))return;let i=lE(t.arguments,e.sourceCode);if(!t.arguments.some(e=>e.type===`SpreadElement`)){e.report({fix(e){return e.replaceText(t,i)},messageId:`avoidConstructorEnumeration`,node:t});return}e.report({messageId:`avoidConstructorEnumeration`,node:t,suggest:[{fix(e){return e.replaceText(t,i)},messageId:`suggestArrayLiteral`}]})}function mE(e,t,n,r){let[i]=t.arguments;if(i===void 0)return;if(i.type===`SpreadElement`){hE(e,t,r.getText(i.argument));return}if(!oE(i)){gE(e,t,n,r.getText(i));return}let a=`[${r.getText(i)}]`;e.report({fix(e){return e.replaceText(t,a)},messageId:`avoidSingleArgumentConstructor`,node:t})}function hE(e,t,n){e.report({messageId:`avoidSingleArgumentConstructor`,node:t,suggest:[{fix(e){return e.replaceText(t,`[...${n}]`)},messageId:`suggestArrayLiteral`}]})}function gE(e,t,n,r){n.environment!==`roblox-ts`&&e.report({messageId:`avoidLengthConstructorInStandard`,node:t,suggest:[{fix(e){return e.replaceText(t,`Array.from({ length: ${r} })`)},messageId:`suggestArrayFromLength`}]})}function _E(e,t,n){let r=t[n];if(r===void 0||!ke(r)||r.kind!==`const`&&r.kind!==`let`||r.declarations.length!==1)return;let[i]=r.declarations;if(i===void 0||!QT(i.id)||i.init===null||!Be(i.init)||!$T(e,i.init)||i.init.arguments.length>0||aE(rE(i.id)))return;let a=i.id.name,o=vE(e,t,n+1,a);if(o.pushStatements.length!==0&&!cE(t,o.nextIndex,a))return{arrayIdentifierName:a,declarator:i,hasUnsafeArgument:o.hasUnsafeArgument,literalText:`[${o.argumentParts.join(`, `)}]`,pushStatements:o.pushStatements,statement:r}}function vE(e,t,n,r){let i=[],a=[],o=!1,s=n;for(;s<t.length;){let n=t[s];if(n===void 0||!Ge(n))break;let c=sE(n.expression,r);if(c===void 0||c.arguments.length===0)break;i.push(n),o=yE(e,c,a)||o,s+=1}return{argumentParts:a,hasUnsafeArgument:o,nextIndex:s,pushStatements:i}}function yE(e,t,n){let r=!1;for(let i of t.arguments){if(i.type===`SpreadElement`){r=!0,n.push(`...${e.getText(i.argument)}`);continue}Z(i)||(r=!0),n.push(e.getText(i))}return r}const bE=b(`no-array-constructor-elements`,`roblox`,{create(e){let[n]=e.options,r=t.isObject(n)?{...ZT,...n}:{...ZT},{sourceCode:i}=e;function a(t){for(let n=0;n<t.length;n+=1){let r=_E(i,t,n);if(r!==void 0){if(!r.hasUnsafeArgument){e.report({fix(e){return uE(e,i,r.declarator,r.pushStatements,r.literalText)},messageId:`collapseArrayPushInitialization`,node:r.statement});continue}e.report({messageId:`collapseArrayPushInitialization`,node:r.statement,suggest:[{fix(e){return uE(e,i,r.declarator,r.pushStatements,r.literalText)},messageId:`suggestCollapseArrayPushInitialization`}]})}}}return{BlockStatement(e){a(e.body)},NewExpression(t){$T(i,t)&&dE(e,t,r)},Program(e){a(e.body)}}},meta:{docs:{description:`Disallow array constructor element forms and enforce roblox-ts-aware constructor patterns.`},fixable:`code`,hasSuggestions:!0,messages:{avoidConstructorEnumeration:`Do not use Array constructor enumeration arguments. Use an array literal instead.`,avoidLengthConstructorInStandard:`Length-based Array constructor is not allowed in standard mode. Prefer Array.from({ length: n }).`,avoidSingleArgumentConstructor:`Single-argument Array constructor form is not allowed here. Use an array literal instead.`,collapseArrayPushInitialization:`Collapse new Array<T>() + consecutive .push(...) calls into a single array literal initializer.`,requireExplicitGenericOnNewArray:`new Array() must use an explicit generic argument or a contextual Array<T>/ReadonlyArray<T> annotation.`,suggestArrayFromLength:`Replace with Array.from({ length: value }).`,suggestArrayLiteral:`Replace constructor form with an array literal.`,suggestCollapseArrayPushInitialization:`Collapse constructor + push sequence into a single array literal initializer.`},schema:[{additionalProperties:!1,properties:{environment:{default:`roblox-ts`,description:`Array constructor environment mode: 'roblox-ts' allows new Array(length); 'standard' reports it.`,enum:[`roblox-ts`,`standard`],type:`string`},requireExplicitGenericOnNewArray:{default:!0,description:`When true, zero-argument new Array() requires explicit generic type arguments or contextual array typing.`,type:`boolean`}},type:`object`}],type:`problem`}}),xE=new Set([`comments`,`loc`,`parent`,`range`,`tokens`]);function SE(e){return e.type===`Identifier`}function CE(e){return t.isObject(e)&&t.isString(e.type)}function wE(e,t){for(let[n,r]of Object.entries(e))xE.has(n)||r!=null&&t.push(r)}function TE(e,n){let r=[e];for(;r.length>0;){let e=r.pop();if(Array.isArray(e)){for(let t of e)r.push(t);continue}if(t.isObject(e)&&CE(e)){if(e.type===`Identifier`&&e.name===n)return!0;wE(e,r)}}return!1}function EE(e,t){let n=m(t.callee);return!SE(n)||n.name!==`Array`?!1:!v(e,n,`Array`)}function DE(e,t,n){if(!Ge(e))return;let{expression:r}=e;if(!ye(r)||r.operator!==`=`)return;let{left:i}=r;if(!O(i)||!i.computed)return;let{object:a,property:o}=i;if(!(!SE(a)||a.name!==t)&&!(!ze(o)||o.value!==n))return{expression:r,statement:e}}function OE(e,t,n){let r=t[n];if(r===void 0||!ke(r)||r.declarations.length!==1)return;let[i]=r.declarations;if(i===void 0||!w(i)||i.init===null)return;let{init:a}=i;if(!Be(a)||a.arguments.length>0||!EE(e,a)||!Ze(i.id))return;let o=i.id.name,s=[],c=n+1,l=0;for(;c<t.length;){let e=t[c];if(e===void 0)break;let n=DE(e,o,l);if(n!==void 0){s.push(n),l+=1,c+=1;continue}if(TE(e,o))break;c+=1}if(s.length===0)return;let[u]=s,d=s.at(-1);if(u!==void 0&&d!==void 0)return{assignments:s.map(t=>({statement:t.statement,valueText:e.getText(t.expression.right)})),declaration:r,declarator:i,firstAssignmentStatement:u.statement,lastAssignmentStatement:d.statement}}function kE(e,t,{assignments:n,declaration:r,declarator:i,firstAssignmentStatement:a,lastAssignmentStatement:o}){let{init:s}=i;if(s===null)return[];let c=`[${n.map(e=>e.valueText).join(`, `)}]`,l=[e.replaceText(s,c)],[u]=r.range,[,d]=r.range,[f]=a.range,[,p]=o.range,m=t.text.slice(d,f);if(m.trim().length>0){let n=u;n>0&&t.text[n-1]===`
67
93
  `&&--n;let i=m;n===u&&i.startsWith(`
68
94
  `)&&(i=i.slice(1));let a=t.getText(r),o=t.getText(s),l=a.indexOf(o),d=l===-1?a:`${a.slice(0,l)}${c}${a.slice(l+o.length)}`;return[e.replaceTextRange([n,p],`${i}${d}`)]}let h=f;for(;h>d;){let e=t.text[h-1];if(e===` `||e===` `){--h;continue}e===`
69
- `&&--h;break}return l.push(e.removeRange([h,p])),l}const kE=y(`no-array-constructor-index-assignment`,`roblox`,{create(e){let{sourceCode:t}=e;function n(n){let r=0;for(;r<n.length;){let i=DE(t,n,r);if(i===void 0){r+=1;continue}e.report({fix(e){return OE(e,t,i)},messageId:`preferArrayLiteral`,node:i.declaration}),r=n.indexOf(i.lastAssignmentStatement)+1}}function r(e){n(e.body)}return{BlockStatement:r,Program:r}},meta:{docs:{description:`Disallow new Array<T>() followed by contiguous index assignments; use an array literal instead.`},fixable:`code`,messages:{preferArrayLiteral:`Use an array literal instead of new Array<T>() followed by index assignments.`},schema:[],type:`suggestion`}});function AE(e,t,n){if(e.type!==t.type)return!1;switch(e.type){case`CallExpression`:return t.type===`CallExpression`&&n.getText(e)===n.getText(t);case`Identifier`:return t.type===`Identifier`&&e.name===t.name;case`Literal`:return t.type===`Literal`&&e.value===t.value&&e.raw===t.raw;case`MemberExpression`:return t.type===`MemberExpression`&&jE(e,t,n);case`Super`:return t.type===`Super`;case`ThisExpression`:return t.type===`ThisExpression`;default:return!1}}function jE(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!AE(e.object,t.object,n)?!1:e.computed?ME(e.property,t.property,n):NE(e.property,t.property)}function ME(e,t,n){return $e(e)&&$e(t)&&AE(e,t,n)}function NE(e,t){return e.type===`PrivateIdentifier`||t.type===`PrivateIdentifier`?e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`&&e.name===t.name:t.type===`Identifier`&&e.type===`Identifier`&&e.name===t.name}function PE(e,t){switch(e.type){case`Identifier`:case`ThisExpression`:return!0;case`Literal`:return t;case`MemberExpression`:return e.optional||!PE(e.object,!1)?!1:e.computed?$e(e.property)?PE(e.property,!0):!1:e.property.type===`Identifier`||e.property.type===`PrivateIdentifier`;default:return!1}}function FE(e){return PE(e,!1)}function IE(e){return e.type!==`CallExpression`||e.optional||e.arguments.length>0||e.callee.type!==`MemberExpression`||e.callee.optional||e.callee.computed||e.callee.property.type!==`Identifier`?!1:e.callee.property.name===`size`}function LE(e,t,n){if(!(e.operator!==`=`||e.left.type!==`MemberExpression`||!e.left.computed)){if(n===`roblox-ts`&&IE(e.left.property))return AE(e.left.object,e.left.property.callee.object,t)?e.left:void 0;if(n===`standard`){let{property:n}=e.left;if(n.type===`MemberExpression`&&!n.optional&&!n.computed&&n.property.type===`Identifier`&&n.property.name===`length`)return AE(e.left.object,n.object,t)?e.left:void 0}}}const RE=y(`no-array-size-assignment`,`roblox`,{create(e){let[t]=e.options,n=cc(t)&&t.allowAutofix,r=t?.environment===`standard`?`standard`:`roblox-ts`,{sourceCode:i}=e;return{AssignmentExpression(t){let a=LE(t,i,r);if(a===void 0)return;let o=t.parent.type===`ExpressionStatement`?t.parent:void 0;if(!(n&&o!==void 0&&FE(a.object))){e.report({messageId:`usePush`,node:t});return}let s=i.getText(a.object),c=i.getText(t.right);e.report({fix(e){return e.replaceText(o,`${s}.push(${c});`)},messageId:`usePush`,node:t})}}},meta:{docs:{description:`Disallow array append assignments using array[array.size()] = value (roblox-ts) or array[array.length] = value (standard) and prefer push-based appends.`},fixable:`code`,messages:{usePush:`Do not append with array[array.size()] = value or array[array.length] = value. Use array.push(value) instead.`},schema:[{additionalProperties:!1,properties:{allowAutofix:{default:!1,description:`Allow the fixer to replace safe append assignments with array.push(value).`,type:`boolean`},environment:{...zm,default:`roblox-ts`,description:`Array environment mode: 'roblox-ts' checks array[array.size()]; 'standard' checks array[array.length].`}},type:`object`}],type:`problem`}}),zE=new Map(`Accessory,AccessoryDescription,AccountService,Accoutrement,AchievementService,ActivityHistoryEventService,Actor,AdGui,AdPortal,AdService,AdvancedDragger,AirController,AlignOrientation,AlignPosition,AnalyticsService,AngularVelocity,Animation,AnimationClip,AnimationClipProvider,AnimationConstraint,AnimationController,AnimationFromVideoCreatorService,AnimationFromVideoCreatorStudioService,AnimationGraphDefinition,AnimationImportData,AnimationNode,AnimationNodeDefinition,AnimationRigData,AnimationStreamTrack,AnimationTrack,Animator,Annotation,AnnotationsService,AppAgeSignalsService,AppLifecycleObserverService,AppRatingPromptService,AppStorageService,AppUpdateService,ArcHandles,AssetCounterService,AssetDeliveryProxy,AssetImportService,AssetImportSession,AssetManagerService,AssetPatchSettings,AssetQualityService,AssetService,AssetSoundEffect,Atmosphere,AtmosphereSensor,Attachment,AudioAnalyzer,AudioChannelMixer,AudioChannelSplitter,AudioChorus,AudioCompressor,AudioDeviceInput,AudioDeviceOutput,AudioDistortion,AudioEcho,AudioEmitter,AudioEqualizer,AudioFader,AudioFilter,AudioFlanger,AudioFocusService,AudioGate,AudioLimiter,AudioListener,AudioPages,AudioPitchShifter,AudioPlayer,AudioRecorder,AudioReverb,AudioSearchParams,AudioSpeechToText,AudioTextToSpeech,AudioTremolo,AudioWindSynthesizer,AuroraScriptObject,AvatarAbilityRules,AvatarAccessoryRules,AvatarAnimationRules,AvatarBodyRules,AvatarChatService,AvatarClothingRules,AvatarCollisionRules,AvatarCreationService,AvatarEditorService,AvatarImportService,AvatarRules,AvatarSettings,Backpack,BackpackItem,BadgeService,BallSocketConstraint,BanHistoryPages,BaseCoreGuiConfiguration,BaseImportData,BasePart,BasePlayerGui,BaseRemoteEvent,BaseScript,BaseWrap,Beam,BevelMesh,BillboardGui,BinaryStringValue,BindableEvent,BindableFunction,BlockMesh,BloomEffect,BlurEffect,BodyAngularVelocity,BodyColors,BodyForce,BodyGyro,BodyMover,BodyPartDescription,BodyPosition,BodyThrust,BodyVelocity,Bone,BoolValue,BoxHandleAdornment,BranchService,Breakpoint,BrickColorValue,BrowserService,BubbleChatConfiguration,BubbleChatMessageProperties,BugReporterService,BulkImportService,BuoyancySensor,CFrameValue,CSGDictionaryService,CacheableContentProvider,CalloutService,Camera,CanvasGroup,Capture,CaptureService,CapturesPages,CapturesViewConfiguration,CatalogPages,ChangeHistoryService,ChangeHistoryStreamingService,ChannelSelectorSoundEffect,ChannelTabsConfiguration,CharacterAppearance,CharacterMesh,Chat,ChatInputBarConfiguration,ChatWindowConfiguration,ChatWindowMessageProperties,ChorusSoundEffect,ClickDetector,ClientReplicator,ClientStorageService,ClimbController,Clothing,CloudCRUDService,CloudExecutionService,CloudLocalizationTable,Clouds,ClusterPacketCache,Collaborator,CollaboratorsService,CollectionService,Color3Value,ColorCorrectionEffect,ColorGradingEffect,CommerceService,CompositeValueCurve,CompressorSoundEffect,ConeHandleAdornment,ConfigService,ConfigSnapshot,Configuration,ConfigureServerService,ConnectivityService,Constraint,ContentProvider,ContextActionService,Controller,ControllerBase,ControllerManager,ControllerPartSensor,ControllerSensor,ControllerService,CookiesService,CoreGui,CoreGuiConfiguration,CorePackages,CoreScript,CoreScriptDebuggingManagerHelper,CoreScriptSyncService,CornerWedgePart,CreationDBService,CreatorStoreService,CrossDMScriptChangeListener,CurveAnimation,CustomEvent,CustomEventReceiver,CustomLog,CustomSoundEffect,CylinderHandleAdornment,CylinderMesh,CylindricalConstraint,DataModel,DataModelDiff,DataModelMesh,DataModelPatchService,DataModelSession,DataStore,DataStoreGetOptions,DataStoreIncrementOptions,DataStoreInfo,DataStoreKey,DataStoreKeyInfo,DataStoreKeyPages,DataStoreListingPages,DataStoreObjectVersionInfo,DataStoreOptions,DataStorePages,DataStoreService,DataStoreSetOptions,DataStoreVersionPages,Debris,DebugSettings,DebuggablePluginWatcher,DebuggerBreakpoint,DebuggerConnection,DebuggerConnectionManager,DebuggerLuaResponse,DebuggerManager,DebuggerUIService,DebuggerVariable,DebuggerWatch,Decal,DeferredAssetManagerService,DepthOfFieldEffect,DesignFoundationsService,DeviceDisplayService,DeviceIdService,Dialog,DialogChoice,DigitsRigDescription,DisplayWakeLock,DistortionSoundEffect,DockWidgetPluginGui,DoubleConstrainedValue,DraftsService,DragDetector,Dragger,DraggerService,DynamicRotate,EchoSoundEffect,EditableImage,EditableMesh,EditableService,EditorSourceService,EncodingService,EqualizerSoundEffect,EulerRotationCurve,EventIngestService,ExampleV2Service,ExecutedRemoteCommand,ExperienceAuthService,ExperienceInviteOptions,ExperienceNotificationService,ExperienceService,ExperienceStateCaptureService,ExperienceStateRecordingService,ExplorerFilter,ExplorerFilterAutocompleter,ExplorerServiceVisibilityService,Explosion,FaceAnimatorService,FaceControls,FaceInstance,FacialAgeEstimationService,FacialAnimationRecordingService,FacialAnimationStreamingServiceStats,FacialAnimationStreamingServiceV2,FacialAnimationStreamingSubsessionStats,FacsImportData,Feature,FeatureRestrictionManager,File,FileManagerService,FileMesh,FileSyncReplicationService,Fire,Flag,FlagStand,FlagStandService,FlangeSoundEffect,FloatCurve,FloorWire,FluidForceSensor,FlyweightService,Folder,ForceField,FormFactorPart,Frame,FriendPages,FriendService,FunctionalTest,GamePassService,GameSettings,GamepadService,GeneratedFolder,GenerationService,GenericChallengeService,GenericSettings,Geometry,GeometryService,GetTextBoundsParams,GlobalDataStore,GlobalSettings,Glue,GongService,GroundController,GroupImportData,GroupService,GuiBase,GuiBase2d,GuiBase3d,GuiButton,GuiLabel,GuiMain,GuiObject,GuiService,GuidRegistryService,HSRDataContentProvider,HandleAdornment,Handles,HandlesBase,HapticEffect,HapticService,HarmonyService,Hat,HeapProfilerService,HeatmapQueryService,HeatmapService,HeightmapImporterService,HiddenSurfaceRemovalAsset,Highlight,HingeConstraint,Hint,Hole,Hopper,HopperBin,HttpRbxApiService,HttpRequest,HttpService,Humanoid,HumanoidController,HumanoidDescription,HumanoidRigDescription,IKControl,ILegacyStudioBridge,IXPService,ImageButton,ImageHandleAdornment,ImageLabel,ImageScreenCaptureService,ImportSession,IncrementalPatchBuilder,InputAction,InputActionLabel,InputBinding,InputContext,InputObject,InsertService,Instance,InstanceAdornment,InstanceExtensionsService,InstanceFileSyncService,IntConstrainedValue,IntValue,IntentService,InternalMessagingService,InternalMessagingServiceVerifier,IntersectOperation,InventoryPages,JointImportData,JointInstance,JointsService,KeyboardService,Keyframe,KeyframeMarker,KeyframeSequence,KeyframeSequenceProvider,LanguageService,LayerCollector,LegacyStudioBridge,Light,Lighting,LineForce,LineHandleAdornment,LinearVelocity,LinkingService,LiveScriptingService,LiveSyncService,LocalDebuggerConnection,LocalScript,LocalStorageService,LocalizationService,LocalizationTable,LodDataEntity,LodDataService,LogReporterService,LogService,Logger,LoginService,LuaSettings,LuaSourceContainer,LuaWebService,LuauExpression,LuauExpressionService,LuauScriptAnalyzerService,MLModelDeliveryService,MLService,MLSession,MakeupDescription,ManualGlue,ManualSurfaceJointInstance,ManualWeld,MarkerCurve,MarketplaceService,MatchmakingService,MaterialGenerationService,MaterialImportData,MaterialService,MaterialVariant,MemStorageConnection,MemStorageService,MemoryStoreDistributedCounter,MemoryStoreHashMap,MemoryStoreHashMapPages,MemoryStoreQueue,MemoryStoreService,MemoryStoreSortedMap,MeshContentProvider,MeshImportData,MeshPart,Message,MessageBusConnection,MessageBusService,MessagingService,MetaBreakpoint,MetaBreakpointContext,MetaBreakpointManager,MicroProfilerService,Model,ModerationService,ModuleScript,Motor,Motor6D,MotorFeature,Mouse,MouseService,MultipleDocumentInterfaceInstance,NegateOperation,NetworkClient,NetworkMarker,NetworkPeer,NetworkReplicator,NetworkServer,NetworkSettings,NoCollisionConstraint,Noise,NonReplicatedCSGDictionaryService,NotificationService,NumberPose,NumberValue,Object,ObjectValue,OmniRecommendationsService,OpenCloudApiV1,OpenCloudService,OperationGraph,OrderedDataStore,OutfitPages,OutputLink,PVAdornment,PVInstance,PackageLink,PackageService,PackageUIService,Packages,Pages,Pants,ParabolaAdornment,Part,PartAdornment,PartOperation,PartOperationAsset,ParticleEmitter,PartyEmulatorService,PatchBundlerFileWatch,PatchMapping,Path,Path2D,Path3D,PathfindingLink,PathfindingModifier,PathfindingService,PausedState,PausedStateBreakpoint,PausedStateException,PerformanceControlService,PermissionsService,PhysicsService,PhysicsSettings,PinShortcutService,PitchShiftSoundEffect,PlaceAssetIdsService,PlaceStatsService,PlacesService,Plane,PlaneConstraint,Platform,PlatformCloudStorageService,PlatformFriendsService,PlatformLibraries,Player,PlayerControlState,PlayerData,PlayerDataRecord,PlayerDataRecordConfig,PlayerDataService,PlayerEmulatorService,PlayerGui,PlayerHydrationService,PlayerListConfiguration,PlayerMouse,PlayerScripts,PlayerViewService,Players,Plugin,PluginAction,PluginCapabilities,PluginConnection,PluginConnectionService,PluginDebugService,PluginDragEvent,PluginGui,PluginGuiService,PluginManagementService,PluginManager,PluginManagerInterface,PluginMenu,PluginMouse,PluginPolicyService,PluginToolbar,PluginToolbarButton,PointLight,PointsService,PolicyService,PopLatencyService,Pose,PoseBase,PostEffect,Preloaded,PrismaticConstraint,ProceduralBehaviorSchedulerService,ProceduralModel,ProcessInstancePhysicsService,ProximityPrompt,ProximityPromptService,PublishService,PyramidHandleAdornment,QWidgetPluginGui,RTAnimationTracker,RayValue,RbxAnalyticsService,RealtimeMedia,RecommendationPages,RecommendationService,ReflectionMetadata,ReflectionMetadataCallbacks,ReflectionMetadataClass,ReflectionMetadataClasses,ReflectionMetadataEnum,ReflectionMetadataEnumItem,ReflectionMetadataEnums,ReflectionMetadataEvents,ReflectionMetadataFunctions,ReflectionMetadataItem,ReflectionMetadataMember,ReflectionMetadataProperties,ReflectionMetadataYieldFunctions,ReflectionService,RelativeGui,RemoteCommandService,RemoteCursorService,RemoteDebuggerServer,RemoteEvent,RemoteFunction,RenderSettings,RenderingTest,ReplicatedFirst,ReplicatedStorage,RequestOrchestratorService,ReverbSoundEffect,RibbonNotificationService,RigidConstraint,RobloxPluginGuiService,RobloxReplicatedStorage,RobloxSerializableInstance,RobloxServerStorage,RocketPropulsion,RodConstraint,RolloutValidation,RolloutValidationService,RomarkRbxAnalyticsService,RomarkService,RootImportData,RopeConstraint,Rotate,RotateP,RotateV,RotationCurve,RtMessagingService,RunService,RunningAverageItemDouble,RunningAverageItemInt,RunningAverageTimeIntervalItem,RuntimeContentService,RuntimeScriptService,SafetyService,SceneAnalysisService,ScreenGui,ScreenshotCapture,ScreenshotHud,Script,ScriptBuilder,ScriptChangeService,ScriptCloneWatcher,ScriptCloneWatcherHelper,ScriptCommitService,ScriptContext,ScriptDebugger,ScriptDebuggerService,ScriptDocument,ScriptEditorService,ScriptProfilerService,ScriptRegistrationService,ScriptRuntime,ScriptScannerService,ScriptService,ScrollingFrame,Seat,Selection,SelectionBox,SelectionHighlightManager,SelectionLasso,SelectionPartLasso,SelectionPointLasso,SelectionSphere,SelfViewConfiguration,SensorBase,SerializationService,ServerReplicator,ServerScriptService,ServerStorage,ServiceProvider,ServiceVisibilityService,SessionCheckService,SessionService,SharedTableRegistry,Shirt,ShirtGraphic,SkateboardController,SkateboardPlatform,Skin,Sky,SlidingBallConstraint,SlimAnimationDataEntity,SlimAnimationReplicationService,SlimContentProvider,SlimDebugSettings,SlimReplicationService,SlimService,Smoke,SmoothVoxelsUpgraderService,Snap,SnippetService,SocialService,SolidModelContentProvider,Sound,SoundEffect,SoundGroup,SoundService,SoundShimService,Sparkles,SpawnLocation,SpawnerService,SpecialMesh,SphereHandleAdornment,SpotLight,SpringConstraint,StackFrame,StandalonePluginScripts,StandardPages,StartPageService,StarterCharacterScripts,StarterGear,StarterGui,StarterPack,StarterPlayer,StarterPlayerScripts,StartupMessageService,Stats,StatsItem,Status,StopWatchReporter,StringValue,Studio,StudioActionOverride,StudioAssetService,StudioAttachment,StudioCallout,StudioCameraService,StudioCaptureService,StudioData,StudioDeviceEmulatorService,StudioDeviceSimulatorService,StudioObjectBase,StudioPublishService,StudioScreenshotCapture,StudioScriptDebugEventListener,StudioSdkService,StudioService,StudioTestService,StudioTheme,StudioUserService,StudioWidget,StudioWidgetsService,StyleBase,StyleDerive,StyleLink,StyleQuery,StyleRule,StyleSheet,StylingService,SunRaysEffect,SurfaceAppearance,SurfaceGui,SurfaceGuiBase,SurfaceLight,SurfaceSelection,SwimController,SyncScriptBuilder,SystemThemeService,TaskScheduler,Team,TeamCreateData,TeamCreatePublishService,TeamCreateService,Teams,TelemetryService,TeleportAsyncResult,TeleportOptions,TeleportService,TemporaryCageMeshProvider,TemporaryScriptService,Terrain,TerrainDetail,TerrainIterateOperation,TerrainModifyOperation,TerrainReadOperation,TerrainRegion,TerrainWriteOperation,TestCase,TestService,TextBox,TextBoxService,TextButton,TextChannel,TextChannelWindow,TextChatCommand,TextChatConfigurations,TextChatMessage,TextChatMessageProperties,TextChatService,TextFilterResult,TextFilterTranslatedResult,TextGenerator,TextLabel,TextService,TextSource,Texture,TextureGenerationPartGroup,TextureGenerationService,TextureGenerationUnwrappingRequest,ThirdPartyUserService,ThreadState,TimerService,ToastNotificationService,Tool,Torque,TorsionSpringConstraint,TotalCountTimeIntervalItem,TouchInputService,TouchTransmitter,TraceRouteService,TracerService,TrackerLodController,TrackerStreamAnimation,Trail,Translator,TremoloSoundEffect,TriangleMeshPart,TrussPart,TutorialService,Tween,TweenBase,TweenService,UGCAvatarService,UGCValidationService,UIAspectRatioConstraint,UIBase,UIComponent,UIConstraint,UICorner,UIDragDetector,UIDragDetectorService,UIFlexItem,UIGradient,UIGridLayout,UIGridStyleLayout,UILayout,UIListLayout,UIPadding,UIPageLayout,UIScale,UIShadow,UISizeConstraint,UIStroke,UITableLayout,UITextSizeConstraint,UnionOperation,UniqueIdLookupService,UniversalConstraint,UnreliableRemoteEvent,UnvalidatedAssetService,UserGameSettings,UserInputService,UserService,UserSettings,UserStorageService,VRService,VRStatusService,ValueBase,ValueCurve,Vector3Curve,Vector3Value,VectorForce,VehicleController,VehicleSeat,VelocityMotor,VersionControlService,VideoCapture,VideoCaptureService,VideoDeviceInput,VideoDisplay,VideoFrame,VideoPlayer,VideoSampler,VideoScreenCaptureService,VideoService,ViewportCamera,ViewportFrame,VirtualInput,VirtualInputManager,VirtualUser,VisibilityCheckDispatcher,Visit,VisualizationMode,VisualizationModeCategory,VisualizationModeService,VoiceChatInternal,VoiceChatService,VoxelBuffer,WebSocketClient,WebSocketService,WebStreamClient,WebViewService,WedgePart,Weld,WeldConstraint,WindowProtocolService,Wire,WireframeHandleAdornment,Workspace,WorkspaceAnnotation,WorldModel,WorldRoot,WrapDeformMeshProvider,WrapDeformer,WrapLayer,WrapTarget,WrapTextureTransfer`.split(`,`).map((e,t)=>[e,t])),BE=new Set(`WaitForChild`.split(`,`)),Q=[`AdvanceToNextPageAsync`,`IntersectAsync,SubtractAsync,UnionAsync`,`IsAvailable`],VE=new Map([[2,`GetCredentialsHeaders,GetDeviceAccessToken,GetDeviceIntegrityTokenYield`],[4,`GrantAchievement,HasAchieved`],[9,`GetAdAvailabilityNowAsync,GetAdAvailabilityNowForUniverseAsync,GetCampaignEligibilityAsync,RegisterAdOpportunityAsync,ShowRewardedVideoAdAsync,ShowRewardedVideoAdAtClientAsync`],[14,`GetPlayerSegmentsAsync`],[18,`GetAnimationClipAsync,GetAnimations,GetAnimationsAsync,GetClipEvaluatorAsync`],[21,`CreateJob,DownloadJobResult,FullProcess,GetJobStatus`],[22,`CreateAnimationByUploadingVideo,ImportVideoWithPrompt`],[32,`CreateOrUpdateChannelPreferenceAsync,CreateOrUpdatePlacePreferenceAsync,GetChannelPreferenceAsync,GetPlacePreferenceAsync`],[33,`GetAppAgeSignalsAsync`],[41,`GetFilesInDirAsync,PickFileWithPromptAsync,PickImageFileWithPrompt,PickMeshFileWithPrompt,PickMultipleFilesWithPrompt,StartSessionWithPathAsync,UploadAssetFromContentAsync,UploadAssetFromPathAsync,UploadVersionedAssetFromContentAsync,UploadVersionedAssetFromPathAsync`],[43,`AddNewPlace,CreateAlias,DeleteAlias,RemovePlace,RenameAlias,RenameModel,RenamePlace`],[45,`FetchAssetQualitySummaryFromGltfAsync,FetchAssetQualitySummaryFromJobIdAsync,FetchAssetQualityValidationEntriesFromModelsAsync,FetchAssetQualityValidationRawFromModelsAsync,FetchAssetQualityVisualizationDataFromUrlAsync,GenerateAssetQualityGltfFromInstanceAsync`],[46,`CachePartOperationsAsync,CanEditAssetAsync,ComposeDecalAsync,CreateAssetAsync,CreateAssetVersionAsync,CreateDataModelContentAsync,CreateEditableImageAsync,CreateEditableImageFromDownloadAsync,CreateEditableMeshAsync,CreateMeshPartAsync,CreatePlaceAsync,CreatePlaceInPlayerInventoryAsync,CreateSurfaceAppearanceAsync,GetAssetIdsForPackage,GetAssetIdsForPackageAsync,GetAudioMetadataAsync,GetBundleDetailsAsync,GetCreatorAssetID,GetGamePlacesAsync,LoadAssetAsync,PromptCreateAssetAsync,PromptImportAnimationClipFromVideoAsync,SavePlaceAsync,SearchAudio,SearchAudioAsync`],[69,Q[0]],[71,`GetWaveformAsync`],[72,`CanRecordAsync,GetUnrecordableInstancesAsync,RecordAsync`],[76,`GetWaveformAsync,LoadAsync,LoadPlatformAsync`],[84,`GetClientFeaturesAsync,GetServerFeaturesAsync`],[87,`AutoSetupAvatarAsync,CreateCageMeshPartsWithScaleForExportAsync,GenerateAvatar2DPreviewAsync,GenerateAvatarAsync,GetBatchTokenDetailsAsync,LoadAvatar2DPreviewAsync,LoadGeneratedAvatarAsync,PrepareAvatarForPreviewAsync,PromptCreateAvatarAssetAsync,PromptCreateAvatarAsync,PromptCreateMakeupAsync,PromptSelectAvatarGenerationImageAsync,RequestAvatarGenerationSessionAsync,ValidateUGCAccessoryAsync,ValidateUGCBodyPartAsync,ValidateUGCFullBodyAsync`],[88,`CheckApplyDefaultClothing,CheckApplyDefaultClothingAsync,ConformToAvatarRules,ConformToAvatarRulesAsync,GetAvatarRules,GetAvatarRulesAsync,GetBatchItemDetails,GetBatchItemDetailsAsync,GetBundlesByAssetIdAsync,GetFavorite,GetFavoriteAsync,GetHeadShapesAsync,GetInventory,GetInventoryAsync,GetItemDetails,GetItemDetailsAsync,GetOutfitDetails,GetOutfitDetailsAsync,GetOutfits,GetOutfitsAsync,GetRecommendedAssets,GetRecommendedAssetsAsync,GetRecommendedBundles,GetRecommendedBundlesAsync,SearchCatalog,SearchCatalogAsync`],[89,`ImportFBXAnimationFromFilePathUserMayChooseModel,ImportFBXAnimationUserMayChooseModel,ImportFbxRigWithoutSceneLoad,ImportLoadedFBXAnimation,LoadRigAndDetectType`],[94,`AwardBadge,AwardBadgeAsync,CheckUserBadgesAsync,GetBadgeInfoAsync,GetUserBadgesAsync,IsDisabled,IsLegal,UserHasBadge,UserHasBadgeAsync`],[96,Q[0]],[99,Q[1]],[109,`Invoke`],[131,Q[2]],[141,`CheckMomentTextStatusAsync,CheckUploadCaptureStatusAsync,CreatePostAsync,DeleteCapturesAsync,DeleteVideoCaptureAsync,GenerateMomentTextAsync,GetCaptureFilePathAsync,GetCaptureSizeAsync,GetCaptureStorageSizeAsync,GetCaptureUploadDataAsync,InternalCheckPlayabilityAsync,InternalGetStartPlaceIdAsync,PromptCaptureGalleryPermissionAsync,ReadCapturesFromGalleryAsync,SaveCapturesToExternalStorageAsync,StartUploadCaptureAsync,StartUploadCaptureForSupportTicketAsync,StartVideoCaptureAsync,StartVideoCaptureInternalAsync,UploadCaptureAsync,UploadPostAsync`],[142,Q[0]],[144,Q[0]],[151,`CanUserChatAsync,CanUsersChatAsync,FilterStringAsync,FilterStringForBroadcast,FilterStringForPlayerAsync`],[172,`GetCommerceProductInfoAsync,PrepareCommerceProductPurchase,UserEligibleForRealWorldCommerceAsync`],[176,`GetConfigAsync,GetConfigForPlayerAsync`],[182,`PreloadAsync`],[183,`GetButton`],[197,Q[1]],[199,`GetAssetInfoAsync,GetCreatorStoreProductInfoAsync,PerformCreatorStorePurchase`],[209,`GetObjectsAsync,HttpGetAsync,HttpPostAsync,InsertObjectsAndJoinIfLegacyAsync,SavePlace`],[214,`BatchGetAsync,GetAsync,GetVersionAsync,GetVersionAtTimeAsync,IncrementAsync,ListKeysAsync,ListVersionsAsync,RemoveAsync,RemoveVersionAsync,SetAsync,UpdateAsync`],[220,Q[0]],[221,Q[0]],[224,Q[0]],[225,`ListDataStoresAsync`],[227,Q[0]],[252,`CommitEdits,GetDrafts,UpdateToLatestVersion`],[270,`CanPromptOptInAsync`],[273,`LoadPlaybackAsync`],[281,`InquiryAsync`],[282,`CheckOrRequestCameraPermission`],[284,`ResolveStateForUser`],[290,`ListFilesInFolderAsync`],[295,Q[1]],[300,`EvaluateAsync`],[304,Q[1]],[306,Q[0]],[307,`GetPlatformFriends`],[309,`PlayerHasPass`],[313,`ConnectAsync,DisconnectAsync,ExportMeshToGlbAsync,GenerateMeshAsync,GenerateModelAsync,GetVideoGenSessionAsync,GetVideoGenTriggersAsync,InternalGenerateMeshAsync,LoadGeneratedMeshAsync,LoadModelFromGlbAsync,LoadModelFromUrlAsync,SegmentMeshAsync,StartVideoGenSessionAsync,UpdateVideoGenSessionPromptAsync,UpdateVideoGenSessionTriggersAsync`],[317,`FragmentAsync,HashMeshAsync,IntersectAsync,SubtractAsync,SweepPartAsync,UnionAsync`],[319,`BatchGetAsync,GetAsync,IncrementAsync,RemoveAsync,SetAsync,UpdateAsync`],[325,`GetAlliesAsync,GetEnemiesAsync,GetGroupInfoAsync,GetGroupsAsync,GetRolesInGroupAsync,PromptJoinAsync`],[333,`GetScreenResolution`],[343,`ClientRequestDataAsync,ServerRequestDataAsync`],[346,`GetHeightmapPreviewAsync,ImportHeightmap`],[354,`GetAsync,GetAsyncFullUrl,PostAsync,PostAsyncFullUrl,RequestAsync,RequestLimitedAsync`],[356,`GetAsync,JSONDecodeAsync,JSONEncodeAsync,PostAsync,RequestAccessTokenScopesAsync,RequestAsync`],[357,`ApplyAvatarRules,ApplyDescription,ApplyDescriptionAsync,ApplyDescriptionReset,ApplyDescriptionResetAsync,PlayEmote,PlayEmoteAndGetAnimTrackById,PlayEmoteAsync`],[375,`CreateMeshPartAsync,GetBaseCategories,GetBaseSets,GetCollection,GetFreeDecals,GetFreeDecalsAsync,GetFreeModels,GetFreeModelsAsync,GetLatestAssetVersionAsync,GetUserCategories,GetUserSets,LoadAsset,LoadAssetVersion,LoadAssetWithBytecodeAsync,LoadAssetWithFormat,LoadPackageAssetAsync,loadAsset`],[385,Q[1]],[386,Q[0]],[394,`GetAnimations,GetAnimationsAsync,GetKeyframeSequenceAsync`],[395,`GetCapabilitiesUsedInPackageAsync`],[403,`OpenUrl,SupportsSwitchToSettingsApp,SwitchToSettingsApp`],[409,`GetCountryRegionForPlayerAsync,GetTranslatorForLocaleAsync,GetTranslatorForPlayerAsync,PromptDownloadGameTableToCSV,PromptExportToCSVs,PromptImportFromCSVs,PromptUploadCSVToGameTable`],[414,`GetLogHistoryAsync`],[424,`CreateSessionAsync,LoadPostProcessModelAsync`],[425,`ForwardAsync`],[431,`GetAvailableSubscriptionProductsAsync,GetDeveloperProductsAsync,GetProductInfo,GetProductInfoAsync,GetRobloxSubscriptionDetailsAsync,GetRobuxBalance,GetSubscriptionProductInfoAsync,GetSubscriptionPurchaseInfoAsync,GetUserSubscriptionDetailsAsync,GetUserSubscriptionDetailsInternalAsync,GetUserSubscriptionPaymentHistoryAsync,GetUserSubscriptionStatusAsync,GetUsersPriceLevelsAsync,PerformBulkPurchase,PerformCancelSubscription,PerformPurchase,PerformPurchaseV2,PerformSubscriptionPurchase,PerformSubscriptionPurchaseV2,PerformSubscriptionPurchaseV3Async,PerformSubscriptionPurchaseWithRobuxAsync,PlayerOwnsAsset,PlayerOwnsAssetAsync,PlayerOwnsBundle,PlayerOwnsBundleAsync,PromptRobuxTransferAsync,RankProductsAsync,RecommendTopProductsAsync,UserOwnsGamePassAsync`],[433,`GenerateMaterialVariantsAsync`],[439,`GetAsync,IncrementAsync`],[440,`GetAsync,ListItemsAsync,RemoveAsync,SetAsync,UpdateAsync`],[441,Q[0]],[442,`AddAsync,GetSizeAsync,ReadAsync,RemoveAsync`],[444,`GetAsync,GetRangeAsync,GetSizeAsync,RemoveAsync,SetAsync,UpdateAsync`],[447,Q[1]],[451,`PublishAsync,SubscribeAsync`],[455,`DumpToFileAsync`],[457,`CreateReviewableContentAsync,InternalRequestReviewableContentReviewAsync`],[465,Q[1]],[475,`GetScheduledNotifications`],[481,`CreateUserNotificationAsync`],[482,`HttpRequestAsync,InvokeAsync`],[484,`BatchGetAsync,GetAsync,GetSortedAsync,IncrementAsync,RemoveAsync,SetAsync,UpdateAsync`],[485,Q[0]],[490,`UpdateAsync`],[491,`ConvertToPackageAsync,GetPackageInfo,PublishPackage,SetPackageVersion`],[493,Q[0]],[496,Q[1]],[498,Q[1]],[501,`GetEmulatedPartyAsync`],[504,`CheckOcclusionAsync,ComputeAsync`],[509,`ComputeRawPathAsync,ComputeSmoothPathAsync,FindPathAsync`],[524,Q[1]],[525,`GetUserDataAsync,SetUserDataAsync`],[526,`GetPartyMembers`],[528,`GetCanManageAsync,GetFriendsInUniverseAsync,GetFriendsOnline,GetFriendsOnlineAsync,GetFriendsWhoPlayedAsync,GetRankInGroup,GetRankInGroupAsync,GetRoleInGroup,GetRoleInGroupAsync,IsBestFriendsWith,IsFriendsWith,IsFriendsWithAsync,IsInGroup,IsInGroupAsync,LoadCharacter,LoadCharacterAsync,LoadCharacterBlocking,LoadCharacterWithAvatarRules,LoadCharacterWithHumanoidDescription,LoadCharacterWithHumanoidDescriptionAsync,PromptSecurityChallengeAsync,RequestStreamAroundAsync,WaitForDataReady,isFriendsWith,waitForDataReady`],[530,`GetRecordAsync`],[531,`ReleaseAsync,RequestFlushAsync`],[541,`BanAsync,CreateHumanoidModelFromDescription,CreateHumanoidModelFromDescriptionAsync,CreateHumanoidModelFromUserId,CreateHumanoidModelFromUserIdAsync,GetBanHistoryAsync,GetCharacterAppearanceAsync,GetCharacterAppearanceInfoAsync,GetFriendsAsync,GetHumanoidDescriptionFromOutfitId,GetHumanoidDescriptionFromOutfitIdAsync,GetHumanoidDescriptionFromUserId,GetHumanoidDescriptionFromUserIdAsync,GetNameFromUserIdAsync,GetProfileConfigurationFromUserIdAsync,GetUserIdFromNameAsync,GetUserThumbnailAsync,UnbanAsync`],[542,`CreateDockWidgetPluginGui,CreateDockWidgetPluginGuiAsync,CreateQWidgetPluginGui,ImportFbxAnimation,ImportFbxAnimationAsync,ImportFbxRig,ImportFbxRigAsync,PromptForExistingAssetId,PromptForExistingAssetIdAsync,PromptSaveSelection,PromptSaveSelectionAsync`],[551,`GetOTAPluginVersion`],[554,`ShowAsync`],[560,`AwardPoints,GetGamePointBalance,GetPointBalance`],[561,`CanViewBrandProjectAsync,GetPolicyInfoForPlayerAsync,GetPolicyInfoForServerRobloxOnlyAsync`],[569,`WaitForGenerationAsync`],[573,`CreateAssetAndWaitForAssetId,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsync,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsyncWithAddParam,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsyncWithAddParamErrorJson,PublishCageMeshAsync,PublishDescendantAssetsAsync`],[579,`ConnectAsync`],[580,Q[0]],[581,`GenerateItemListAsync,GetRecommendationItemAsync,RegisterItemAsync,RemoveItemAsync,UpdateItemAsync`],[597,`ExecuteCommandAsync`],[601,`InvokeClient,InvokeServer`],[634,`GetAnimationMemoryAsync,GetAudioMemoryAsync,GetInstanceCompositionAsync,GetScriptMemoryAsync,GetTriangleCompositionAsync,GetUnparentedInstancesAsync`],[647,`CloseAsync,EditTextAsync,ForceSetSelectionAsync,MultiEditTextAsync,RequestSetSelectionAsync,ReviewableTextEditsAsync`],[648,`EditSourceAsyncWithRanges,OpenScriptDocumentAsync,UpdateSourceAsync`],[655,Q[1]],[665,`DeserializeInstancesAsync,SerializeInstancesAsync`],[677,Q[1]],[691,`CanSendCallInviteAsync,CanSendGameInviteAsync,GetEventRsvpStatusAsync,GetExperienceEventAsync,GetPartyAsync,GetUpcomingExperienceEventsAsync,PromptFeedbackSubmissionAsync,PromptLinkSharing,PromptLinkSharingAsync,PromptRsvpToEventAsync`],[696,`EndRecording,GetRecordingDevices`],[699,Q[1]],[707,Q[0]],[711,`GetCore`],[716,`GetPaginatedMemoryByTexture`],[723,`AutoSetupAvatarAsync,AutoSetupSerializedAvatarAsync,CancelAutoSetupAvatarAsync,DEPRECATED_SerializeInstances,PromptSaveInstanceToRobloxAsync,RequestAvatarAutosetupAsync,SerializeInstances`],[727,`RequestScreenshotPermissionAsync`],[729,`EmulatePCDeviceWithResolution,GetCurrentDeviceId,GetCurrentOrientation,HasDeviceWithId,SetCurrentDeviceId,SetCurrentOrientation`],[730,`CreateDeviceAsync,GetDeviceAsync,GetDeviceInfoAsync,GetDeviceListAsync,GetOrientationAsync,GetPixelDensityAsync,GetResolutionAsync,GetScalingModeAsync,RemoveDeviceAsync,SetDeviceAsync,SetOrientationAsync,SetPixelDensityAsync,SetResolutionAsync,SetScalingModeAsync,StopSimulationAsync,UpdateDeviceAsync`],[733,`ScaleAsync`],[736,`PromptImportFile,PromptImportFileAsync,PromptImportFiles,PromptImportFilesAsync,TryInstallPlugin`],[737,`ExecuteMultiplayerTestAsync,ExecutePlayModeAsync,ExecuteRunModeAsync`],[757,`getSystemThemeAsync`],[767,`GetPlayerPlaceInstanceAsync,PromptExperienceDetailsAsync,ReserveServer,ReserveServerAsync,TeleportAsync,TeleportPartyAsync,UnblockAsync`],[770,`DrawBufferAsync,IntersectAsync,ReadBufferAsync,SubtractAsync,UnionAsync`],[778,`CaptureScreenshotAsync,FetchTestControlsAsync,RequestValidationAsync,Run,RunAsync,StartVideoCaptureAsync,StopVideoCaptureAsync`],[782,`AddUserAsync,SendAsync,SendDictatedSpeechAsync,SendInternalAsync,SendPresetAsync`],[788,`CanUserChatAsync,CanUsersChatAsync,CanUsersDirectChatAsync,CanUsersWhisperAsync,GetChatGroupsAsync,GetChatableUserCountAsync,GetPresetsAsync,OnUserChatSettingUpdateAsync,SendDictatedSpeechUniverseChatAsync,SendUniverseChatMessageAsync,SendUniverseChatPresetAsync`],[789,`GetChatForUserAsync,GetNonChatStringForBroadcastAsync,GetNonChatStringForUserAsync`],[791,`GenerateTextAsync`],[793,`FilterAndTranslateStringAsync,FilterStringAsync,GetFamilyInfoAsync,GetTextBoundsAsync,GetTextSizeOffsetAsync`],[797,`GetQuotasAsync`],[816,Q[1]],[817,Q[1]],[823,`CalculateBodyMaxCageDistance,CanLoadAsset,CreateEditableImageOriginalSizeAsync,DoesMeshHaveSkinningData,DoesSurfaceAppearanceMatchTexturePackAsync,FetchAssetWithFormat,GetMeshDataBinaryString,GetMeshVerts,IsDeformedLayeredClothingOutOfRenderBounds`],[845,Q[1]],[852,`GetUserFromGlobalUserIdAsync,GetUserInfosByUserIdsAsync`],[863,Q[1]],[871,`LoadAsync`],[872,`GetSamplesAtTimesAsync`],[874,`CreateVideoSamplerAsync`],[876,`CaptureSnapshotAsync`],[878,`WaitForInputEventsProcessed`],[885,`IsVoiceEnabledForUserIdAsync`],[886,`GetChatGroupsAsync,IsVoiceEnabledForUserIdAsync`],[887,`ClearAsync,DrawBufferAsync,FromHeightmapAsync,NormalizeAsync,UnclampAsync`],[891,Q[2]],[892,Q[1]],[903,`CreateEditableMeshAsync,GetDeformedCFrameAsync`]]),HE=new Map;function UE(e,t){let n=zE.get(e);if(n===void 0)return!1;if(BE.has(t))return!0;let r=HE.get(n);if(r!==void 0)return r.has(t);let i=VE.get(n);if(i===void 0)return!1;let a=new Set(i.split(`,`));return HE.set(n,a),a.has(t)}const WE=[`PlanckSystem`,`System`,`SystemFunction`,`SystemReturn`,`SystemTableLike`],GE=new Set([`comments`,`loc`,`parent`,`range`,`tokens`]);function KE(e,t){if(e.type===`Identifier`)return e.name;if(t&&e.type===`TSQualifiedName`)return e.right.name}function qE(e,t=!0){if(e==null)return;let n=e;for(;n.type===`TSTypeAnnotation`;)n=n.typeAnnotation;if(n.type===`TSUnionType`){let e;for(let r of n.types){if(r.type===`TSUndefinedKeyword`||r.type===`TSNullKeyword`)continue;let n=qE(r,t);if(n===void 0||e!==void 0)return;e=n}return e}if(n.type===`TSTypeReference`)return KE(n.typeName,t)}function JE(e,t){let n=qE(e);return n!==void 0&&t.has(n)}function YE(e,t){for(let[n,r]of Object.entries(e))GE.has(n)||r!=null&&t.push(r)}function XE(e,n){let r=[e];for(;r.length>0;){let e=r.pop();if(Array.isArray(e)){for(let t of e)r.push(t);continue}t.isObject(e)&&x(e)&&n(e)!==!1&&YE(e,r)}}function ZE(e){if(e.type===`Property`)return e.computed?e.key.type===`Literal`&&t.isString(e.key.value)?e.key.value:void 0:e.key.type===`Identifier`?e.key.name:e.key.type===`Literal`&&t.isString(e.key.value)?e.key.value:void 0}function QE(e,t,n){for(let r of e.properties)if(ZE(r)===`system`&&r.type===`Property`){if(k(r.value))n.add(r.value);else if(r.value.type===`Identifier`){let e=t.get(r.value.name);e!==void 0&&n.add(e)}}}function $E(e){if(e.type===`ImportSpecifier`)return e.imported.type===`Identifier`?e.imported.name:e.imported.value}function eD(e,n){let r=new Map;for(let i of e.body){if(i.type!==`ImportDeclaration`||!t.isString(i.source.value))continue;let e=n.getDeclaredVariables(i);for(let t of i.specifiers){let n=$E(t);if(n===void 0)continue;let a=e.find(e=>e.name===t.local.name);a!==void 0&&r.set(a,{imported:n,source:i.source.value})}}return r}function tD(e){let t=[],n=m(e);for(;n.type===`MemberExpression`;){let e=g(n);if(e===void 0)return;t.unshift(e),n=m(n.object)}return n.type===`Identifier`?{path:t,root:n}:void 0}function nD(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function rD(e){if(e.type===`Identifier`)return[e.name];if(e.type!==`MemberExpression`)return;let t=tD(e);return t===void 0?void 0:[t.root.name,...t.path]}function iD(e,t){return _(e.getScope(t),t.name)}function aD(e,t,n,r,i){XE(e,e=>{if(e.type!==`CallExpression`||e.callee.type!==`MemberExpression`)return;let a=tD(e.callee);if(a===void 0)return;let o=iD(t,a.root),s=o===void 0?void 0:n.get(o);if(s!==void 0)for(let n of r){if(s.source!==n.source||s.imported!==n.imported||!nD(a.path,n.memberPath))continue;let r=e.arguments[n.callbackArgumentIndex];if(r===void 0||r.type===`SpreadElement`||!k(r))continue;let o=r.params[n.parameterIndex];if(o?.type!==`Identifier`)continue;let c=iD(t,o);c!==void 0&&i.set(c,n.className)}})}function oD(e,t,n,r){XE(e,e=>{if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){let i=e.id.name,a=qE(e.id.typeAnnotation,!1);if(a===void 0||n.has(a))return;let o=t.getDeclaredVariables(e).find(e=>e.name===i);o!==void 0&&r.set(o,a);return}if(!k(e))return;let i=new Map(t.getDeclaredVariables(e).map(e=>[e.name,e]));for(let t of e.params){if(t.type!==`Identifier`)continue;let e=t.name,a=qE(t.typeAnnotation,!1);if(a===void 0||n.has(a))continue;let o=i.get(e);o!==void 0&&r.set(o,a)}})}function sD(e){let t=new Set;return XE(e,e=>{if(e.type===`ImportDeclaration`){for(let n of e.specifiers)t.add(n.local.name);return!1}return(e.type===`TSInterfaceDeclaration`||e.type===`TSTypeAliasDeclaration`||e.type===`ClassDeclaration`||e.type===`TSEnumDeclaration`)&&e.id!==null&&t.add(e.id.name),!0}),t}function cD(e,t){let n=iD(t,e);if(n?.defs.length!==1)return;let[r]=n.defs;if(r?.node.type!==`VariableDeclarator`)return;let i=r.node.parent;if(i.type===`VariableDeclaration`&&i.kind===`const`)return r.node.init??void 0}function lD(e,t){let n=iD(t,e);if(n?.defs.length!==1)return;let[r]=n.defs;if(r===void 0)return;if(k(r.node))return r.node;if(r.node.type!==`VariableDeclarator`||r.node.init===null)return;let i=m(r.node.init);return k(i)?i:void 0}function uD(e,t){let n=m(e);return k(n)?n:n.type===`Identifier`?lD(n,t):void 0}function dD(e,n,r,i,a){let o=m(e);if(o.type===`Identifier`)return fD(o,n,r,i,a);if(o.type!==`CallExpression`||o.callee.type!==`MemberExpression`||g(o.callee)!==`GetService`||o.callee.object.type!==`Identifier`||o.callee.object.name!==`game`||v(n,o.callee.object,`game`))return;let[s]=o.arguments;return s?.type===`Literal`&&t.isString(s.value)?s.value:void 0}function fD(e,t,n,r,i){let a=iD(t,e);if(a!==void 0){let e=r.get(a);if(e!==void 0)return e;let t=n.get(a);if(t?.source===`@rbxts/services`)return t.imported}let o=cD(e,t);if(!(o===void 0||i.has(o)))return i.add(o),dD(o,t,n,r,i)}function pD(e,t,n,r){if(e.callee.type!==`MemberExpression`)return!1;let i=g(e.callee);if(i===void 0)return!1;let a=dD(e.callee.object,t,n,r,new Set);return a!==void 0&&UE(a,i)}function mD(e,t){let n=new Set;if(e.body===null)return n;if(e.body.type!==`BlockStatement`){let r=uD(e.body,t);return r!==void 0&&n.add(r),n}return XE(e.body,e=>{if(k(e))return!1;if(e.type!==`ReturnStatement`||e.argument===null)return!0;let r=uD(e.argument,t);return r!==void 0&&n.add(r),!1}),n}function hD(e,t,n){let r=new Set,i=rD(e.callee);if(i===void 0)return r;for(let a of n)if(nD(i,a.calleePath))for(let n of a.callbackArgumentIndexes){let i=e.arguments[n];if(i===void 0||i.type===`SpreadElement`)continue;let a=uD(i,t);a!==void 0&&r.add(a)}return r}function gD(e,t,n,r,i,a){if(e.async)return;let o=new Set;function s(e){e.async||e.body===null||o.has(e)||(o.add(e),XE(e.body,o=>{if(o!==e&&k(o))return!1;if(o.type!==`CallExpression`)return!0;pD(o,t,n,r)&&a(o);for(let e of hD(o,t,i))s(e);return!0}))}let c=mD(e,t),l=c.size===0?[e]:c;for(let e of l)s(e)}const _D=y(`no-async-in-system`,`roblox`,{create(e){let t=e.options[0]?.additionalSystemTypeNames??[],n=e.options[0]?.callbackParameterTypes??[],r=e.options[0]?.synchronousCallbacks??[],i=new Set([...WE,...t]);return{"Program:exit"(t){let a=new Map,o=new Set,s=[],c=eD(t,e.sourceCode),l=new Map;oD(t,e.sourceCode,sD(t),l),aD(t,e.sourceCode,c,n,l),XE(t,e=>{if(k(e)){e.id!==null&&a.set(e.id.name,e),JE(e.returnType,i)&&o.add(e);return}if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){if(!JE(e.id.typeAnnotation,i)||e.init===null)return;k(e.init)?o.add(e.init):e.init.type===`ObjectExpression`&&s.push(e.init);return}e.type===`TSSatisfiesExpression`&&JE(e.typeAnnotation,i)&&e.expression.type===`ObjectExpression`&&s.push(e.expression)});for(let e of s)QE(e,a,o);for(let t of o)gD(t,e.sourceCode,c,l,r,t=>{e.report({messageId:`noAsyncInSystem`,node:t})})}}},meta:{docs:{description:`Disallow yielding Roblox API calls in synchronous Planck system execution.`,recommended:!0},messages:{noAsyncInSystem:`Do not call a yielding Roblox API from a synchronous Planck system.`},schema:[{additionalProperties:!1,properties:{additionalSystemTypeNames:{items:{type:`string`},type:`array`,uniqueItems:!0},callbackParameterTypes:{items:{additionalProperties:!1,properties:{callbackArgumentIndex:{minimum:0,type:`integer`},className:{type:`string`},imported:{type:`string`},memberPath:{items:{type:`string`},type:`array`},parameterIndex:{minimum:0,type:`integer`},source:{type:`string`}},required:[`callbackArgumentIndex`,`className`,`imported`,`memberPath`,`parameterIndex`,`source`],type:`object`},type:`array`},synchronousCallbacks:{items:{additionalProperties:!1,properties:{callbackArgumentIndexes:{items:{minimum:0,type:`integer`},minItems:1,type:`array`,uniqueItems:!0},calleePath:{items:{type:`string`},minItems:1,type:`array`}},required:[`callbackArgumentIndexes`,`calleePath`],type:`object`},type:`array`}},type:`object`}],type:`problem`}});function vD(e){return Math.round(e>1?e:e*255)}function yD(e){return{reportUnknownComponents:t.isObject(e)&&`reportUnknownComponents`in e?t.isBoolean(e.reportUnknownComponents)&&e.reportUnknownComponents:!0}}function bD(e){let t=[],n=0,r=!0;for(let i of e){if(!Be(i))return;let e=vD(i.value);t[n++]=e,e!==0&&(r=!1)}return[r,t]}const xD=y(`no-color3-constructor`,`roblox`,{create(e){let t=yD(e.options[0]);return{NewExpression(n){if(!Ne(n,`Color3`))return;let r=n.arguments;if(r.length===0)return;let i=bD(r);if(!i){t.reportUnknownComponents&&e.report({messageId:r.length<3?`useFromRGB`:`onlyZeroArgs`,node:n});return}if(r.length<3){let[t,r=0]=i[1];e.report({fix:e=>e.replaceText(n,`Color3.fromRGB(${t}, ${r}, 0)`),messageId:`useFromRGB`,node:n});return}i[0]||e.report({fix:e=>e.replaceText(n,`Color3.fromRGB(${i[1].join(`, `)})`),messageId:`onlyZeroArgs`,node:n})}}},meta:{docs:{description:`Ban new Color3(...) except new Color3() or new Color3(0, 0, 0). Use Color3.fromRGB() instead.`},fixable:`code`,messages:{onlyZeroArgs:`Use Color3.fromRGB() instead of new Color3(). new Color3() uses floats [0-1] and performs worse than Color3.fromRGB() which uses [0-255]. Only 'new Color3()' or 'new Color3(0, 0, 0)' are allowed.`,useFromRGB:`Use Color3.fromRGB() instead of new Color3(). new Color3() uses floats [0-1] and performs worse than Color3.fromRGB() which uses [0-255].`},schema:[{additionalProperties:!1,properties:{reportUnknownComponents:{default:!0,description:`Report new Color3(...) calls when one or more components are not numeric literals.`,type:`boolean`}},type:`object`}],type:`problem`}});function SD(e){let t=new Set;if(!e?.eventsImportPaths)return t;for(let n of e.eventsImportPaths)Ti(n)&&t.add(n);return t}function CD(e){let t=e;for(;;)switch(t.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSTypeAssertion`:t=t.expression;continue;default:return t}}function wD(e){let t=e;for(;;){let e=CD(t);if(e.type===`Identifier`)return e.name;if(e.type!==`MemberExpression`)return;t=e.object}}function TD(e,t){let n=CD(e.callee);if(n.type!==`MemberExpression`||g(n)!==`connect`)return;let r=wD(n.object);if(r===void 0||!t.has(r))return;let[i]=e.arguments;if(i)switch(i.type){case`ArrowFunctionExpression`:case`FunctionExpression`:return i;default:return}}function ED(e,t){let n=CD(e.callee);if(n.type!==`MemberExpression`)return!1;let r=wD(n);return r!==void 0&&t.has(r)}function DD(e,t){return!e.has(t)&&(e.add(t),!0)}function OD(e,t){return DD(t.playerValues,e)}function kD(e,t){return DD(t.playerContainers,e)}function AD(e,t){let n=t.length;for(;n>0;){--n;let r=t[n];r&&e.push(r)}}function jD(e,t){let n=t.length;for(;n>0;){--n;let r=t[n];r&&e.push(r.type===`RestElement`?r.argument:r.value)}}function MD(e,t){let n=[e],r=!1;for(;n.length>0;){let e=n.pop();if(e)switch(e.type){case`ArrayPattern`:AD(n,e.elements);break;case`AssignmentPattern`:n.push(e.left);break;case`Identifier`:OD(e.name,t)&&(r=!0);break;case`ObjectPattern`:jD(n,e.properties);break;case`RestElement`:n.push(e.argument)}}return r}function ND(e,t,n){return t===0?!1:e.type===`Identifier`?t===2?OD(e.name,n):kD(e.name,n):MD(e,n)}function PD(e,t,n){return e.type===`MemberExpression`||t===0?!1:e.type===`ArrayPattern`||e.type===`AssignmentPattern`||e.type===`Identifier`||e.type===`ObjectPattern`||e.type===`RestElement`?e.type===`Identifier`?t===2?OD(e.name,n):kD(e.name,n):MD(e,n):!1}function FD(e,t){let n=e;for(;;){let e=CD(n);switch(e.type){case`ArrayExpression`:return ID(e,t);case`AssignmentExpression`:n=e.right;continue;case`ConditionalExpression`:return LD(e,t);case`Identifier`:return t.playerValues.has(e.name)?2:+!!t.playerContainers.has(e.name);case`MemberExpression`:return RD(e,t);case`ObjectExpression`:return zD(e,t);case`SequenceExpression`:{let t=e.expressions.at(-1);if(t===void 0)return 0;n=t;continue}default:return 0}}}function ID(e,t){for(let n of e.elements)if(n!==null&&FD(n.type===`SpreadElement`?n.argument:n,t)!==0)return 1;return 0}function LD(e,t){let n=FD(e.consequent,t);return n===FD(e.alternate,t)?n:0}function RD(e,t){return FD(e.object,t)===1?2:0}function zD(e,t){for(let n of e.properties)if(FD(n.type===`SpreadElement`?n.argument:n.value,t)!==0)return 1;return 0}function BD(e,t){if(e.type===`TSParameterProperty`){MD(e.parameter,t);return}MD(e,t)}const VD=y(`no-events-in-events-callback`,`roblox`,{create(e){let t=SD(e.options[0]),n=new Set,r=new WeakMap,i=[];function a(){let e=i.at(-1);if(e?.callbackState&&!(e.callbackDepth>0))return e.callbackState}function o(e){if(e.type!==`FunctionDeclaration`){let t=r.get(e);if(t){i.push({callbackDepth:0,callbackState:t});return}}let t=i.at(-1);if(!t?.callbackState){i.push({callbackDepth:0,callbackState:void 0});return}i.push({callbackDepth:t.callbackDepth+1,callbackState:t.callbackState})}function s(){i.pop()}return{ArrowFunctionExpression:o,"ArrowFunctionExpression:exit":s,AssignmentExpression(e){let t=a();if(!t||e.operator!==`=`)return;let n=FD(e.right,t);n!==0&&PD(e.left,n,t)},CallExpression(t){let i=TD(t,n);if(i){let e={playerContainers:new Set,playerValues:new Set},[t]=i.params;t&&BD(t,e),r.set(i,e)}let o=a();if(!o||!ED(t,n))return;let[s]=t.arguments;!s||s.type===`SpreadElement`||FD(s,o)!==2||e.report({messageId:`preferFunctions`,node:t})},FunctionDeclaration:o,"FunctionDeclaration:exit":s,FunctionExpression:o,"FunctionExpression:exit":s,ImportDeclaration(e){let r=e.source.value;if(t.has(r))for(let t of e.specifiers){let{name:e}=t.local;if(t.type===`ImportDefaultSpecifier`){e===`Events`&&n.add(e);continue}if(t.type===`ImportSpecifier`){if(t.imported.type===`Identifier`&&t.imported.name===`Events`){n.add(e);continue}t.imported.type===`Literal`&&t.imported.value===`Events`&&n.add(e)}}},VariableDeclarator(e){let t=a();if(!t||!e.init)return;let n=FD(e.init,t);n!==0&&ND(e.id,n,t)}}},meta:{docs:{description:`Disallow sending Events back to the same player inside an Events.connect callback; use Functions for request/response.`},messages:{preferFunctions:`Do not call Events for the same player inside an Events.connect callback. Use a Functions callback instead.`},schema:[{additionalProperties:!1,properties:{eventsImportPaths:{description:`Import paths that identify Events objects whose callbacks should be checked.`,items:{minLength:1,type:`string`},type:`array`}},required:[`eventsImportPaths`],type:`object`}],type:`problem`}});function HD({callee:e}){if(e.type!==`CallExpression`)return!1;let t=e.callee;if(t.type!==`MemberExpression`)return!1;let{object:n}=t;return n.type===`Identifier`&&n.name===`Ianitor`}const UD=y(`no-ianitor-in-function-body`,`roblox`,{create(e){let t=0;function n(){t+=1}function r(){--t}return{ArrowFunctionExpression:n,"ArrowFunctionExpression:exit":r,CallExpression(n){t===0||!HD(n)||e.report({messageId:`hoistIanitorValidator`,node:n})},FunctionDeclaration:n,"FunctionDeclaration:exit":r,FunctionExpression:n,"FunctionExpression:exit":r}},meta:{docs:{description:`Disallow Ianitor validator creation inside function bodies. Hoist to module scope to avoid recreating validators on every call.`,recommended:!0},messages:{hoistIanitorValidator:`Ianitor validator created inside function body is slow — hoist to module scope. Example: const validator = Ianitor.keyOf(ids);`},schema:[],type:`problem`}});function WD(e){let t=m(e);if(t.type!==`CallExpression`)return!1;let n=m(t.callee);if(n.type!==`MemberExpression`||n.computed)return!1;let r=m(n.object);return r.type===`Identifier`&&r.name===`Ianitor`&&n.property.type===`Identifier`}function GD(e){for(let{node:t}of e.defs){if(t.type!==`VariableDeclarator`)continue;let{init:e}=t;if(e!==null&&WD(e))return!0}return!1}function KD(e,t){let n=m(e.callee);if(n.type===`CallExpression`)return WD(n);if(n.type===`Identifier`){let r=_(t.getScope(e),n.name);return r!==void 0&&GD(r)}return!1}function qD(e){let t=!1;for(let n of e.properties){if(n.type!==`Property`||n.key.type!==`Identifier`)continue;let{name:e}=n.key;if(e===`error`||e===`value`)return!1;e===`success`&&(t=!0)}return t}function JD(e){for(let t of e.properties)if(t.type===`Property`&&t.key.type===`Identifier`&&t.key.name===`success`)return t.key}const YD=y(`no-ianitor-success-access`,`roblox`,{create(e){let{sourceCode:t}=e,n=new Set,r=new Map;function i(e){let t=r.get(e);t!==void 0&&(t.referencedFully=!0)}return{CallExpression(e){for(let t of e.arguments){if(t.type!==`Identifier`)continue;let e=r.get(t.name);e!==void 0&&(e.referencedFully=!0)}},MemberExpression({computed:n,object:i,property:a}){if(n||a.type!==`Identifier`)return;let o=m(i);if(o.type===`CallExpression`&&a.name===`success`){KD(o,t)&&e.report({messageId:`preferCreateGuard`,node:a});return}if(o.type===`Identifier`){let e=r.get(o.name);e!==void 0&&e.properties.add(a.name)}},"Program:exit"(){for(let[,{firstSuccessNode:t,properties:n,referencedFully:i}]of r)!i&&n.has(`success`)&&!n.has(`error`)&&!n.has(`value`)&&e.report({messageId:`preferCreateGuard`,node:t})},ReturnStatement({argument:e}){e?.type===`Identifier`&&i(e.name)},VariableDeclarator({id:i,init:a}){if(a===null)return;let o=m(a);if(o.type===`CallExpression`){if(i.type===`Identifier`&&WD(o)){n.add(i.name);return}if(i.type===`ObjectPattern`&&KD(o,t)&&qD(i)){let t=JD(i);t!==void 0&&e.report({messageId:`preferCreateGuard`,node:t})}i.type===`Identifier`&&o.callee.type===`Identifier`&&n.has(o.callee.name)&&r.set(i.name,{firstSuccessNode:i,properties:new Set,referencedFully:!1})}}}},meta:{docs:{description:"Disallow accessing `.success` on Ianitor check results when the full result object is not needed."},messages:{preferCreateGuard:`Replace with Flamework.createGuard<T>(). Ianitor check results allocate a table on every call; Flamework.createGuard returns a plain boolean at runtime with zero allocation.`},schema:[],type:`suggestion`}}),XD={checkPrivate:!0,checkProtected:!0,checkPublic:!0};function ZD(e){return e===void 0?XD:{...XD,...e}}function QD(e,t){if(e.static||e.kind!==`method`||e.value.type!==`FunctionExpression`)return!1;let n=e.accessibility??`public`;return!(n===`private`&&!t.checkPrivate||n===`protected`&&!t.checkProtected||n===`public`&&!t.checkPublic)}function $D(e,t){for(let n of Object.values(e)){if(Array.isArray(n)){for(let e of n)if(x(e)&&eO(e,t))return!0;continue}if(x(n)&&eO(n,t))return!0}return!1}function eO(e,n){return!n.has(e)&&(n.add(e),e.type===`ThisExpression`||e.type===`Super`?!0:t.isObject(e)?$D(e,n):!1)}function tO({value:e}){return eO(e,new WeakSet)}function nO(e){return e.key.type===`Identifier`?e.key.name:`unknown`}const rO=y(`no-instance-methods-without-this`,`roblox`,{create(e){let t=ZD(e.options[0]);return{MethodDefinition(n){!QD(n,t)||tO(n)||e.report({data:{methodName:nO(n)},messageId:`noInstanceMethodWithoutThis`,node:n})}}},meta:{docs:{description:`Detect instance methods that do not use 'this' and suggest converting them to standalone functions for better performance in roblox-ts.`},messages:{noInstanceMethodWithoutThis:`Method '{{methodName}}' does not use 'this' and creates unnecessary metatable overhead in roblox-ts. Convert it to a standalone function for better performance.`},schema:[{additionalProperties:!1,properties:{checkPrivate:{default:!0,description:`Check private methods (default: true)`,type:`boolean`},checkProtected:{default:!0,description:`Check protected methods (default: true)`,type:`boolean`},checkPublic:{default:!0,description:`Check public methods (default: true)`,type:`boolean`}},type:`object`}],type:`problem`}});function iO(e){return e.type===`JSXIdentifier`?e.name:e.name.name}function aO(e){return e===`nativeProperties`||e.endsWith(`NativeProperties`)}function oO(e){if(e.type===`Variable`&&e.node.type===`VariableDeclarator`)return e.node.init??void 0}function sO(e){let t=m(e);for(;t.type===`MemberExpression`;){let e=m(t.object);if(e.type===`Identifier`)return e;if(e.type!==`MemberExpression`)return;t=e}return t.type===`Identifier`?t:void 0}function cO(e,t){let n=m(t);if(n.type===`ObjectExpression`)return!0;let r=sO(n);if(r===void 0)return!1;let i=_(e.getScope(r),r.name);return i===void 0?!1:z(i)||R(i.scope)}function lO(e,t,n){let r=m(t);if(n.has(r))return;if(n.add(r),r.type===`ObjectExpression`)return r;if(r.type!==`Identifier`)return;let i=_(e.getScope(r),r.name);if(!(i===void 0||R(i.scope)))for(let t of i.defs){let r=oO(t);if(r===void 0)continue;let i=lO(e,r,n);if(i!==void 0)return i}}const uO=y(`no-native-properties-spread`,`roblox`,{create(e){let{sourceCode:t}=e;function n(n,r){for(let i of n.properties){if(i.type!==`SpreadElement`||!cO(t,i.argument))continue;let n=t.getText(i.argument);e.report({data:`propertyName`in r?{prop:r.propertyName,source:n}:{source:n},messageId:r.messageId,node:i})}}return{JSXAttribute(e){let r=iO(e.name);if(r===void 0||!aO(r))return;let{value:i}=e;if(i?.type!==`JSXExpressionContainer`)return;let{expression:a}=i;if(a.type===`JSXEmptyExpression`)return;let o=lO(t,a,new Set);o!==void 0&&n(o,{messageId:`noNativePropertiesSpread`,propertyName:r})},JSXSpreadAttribute(e){let r=lO(t,e.argument,new Set);r!==void 0&&n(r,{messageId:`noElementSpread`})}}},meta:{docs:{description:`Disallow spreading static property bags into nativeProperties/*NativeProperties props and onto JSX elements via intermediate objects, because the spread creates a new copied table every render.`,recommended:!0},messages:{noElementSpread:`Spreading static property bag {{source}} through an intermediate object creates a new table every render. Inline the full object properties directly on the JSX element.`,noNativePropertiesSpread:`Spreading static property bag {{source}} into {{prop}} creates a new table every render. Pass it directly or inline the full object instead.`},schema:[],type:`problem`}}),dO=ws({name:`print`,alternative:`Log`,category:`roblox`,message:`{{name}}() is a raw output function lacking log levels, timestamps, and filtering. Production systems require structured logging for debugging and monitoring. Replace {{name}}(...) with {{alternative}}.`,messageId:`noPrint`,ruleName:`no-print`}),fO=`uiaspectratioconstraint`,pO=new Set([`ButtonSpritesheet`,`GenericSpritesheet`,`LabelSpritesheet`]);function mO({openingElement:e}){let{name:t}=e;return t.type===`JSXIdentifier`?t.name:void 0}function hO(e){let t=!1;return da(e,e=>{t||e.type===`JSXElement`&&mO(e)===fO&&(t=!0)}),t}function gO(e){if(e.type===`FunctionDeclaration`)return e.id?.name;if(O(e)){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`)return t.id.name}}function _O(e){if(e.body.type!==`BlockStatement`)return m(e.body)}function vO(e){for(let n of e.defs){if(n.type!==`ImportBinding`)continue;let{parent:e}=n.node;if(e?.type===`ImportDeclaration`&&t.isString(e.source.value))return e.source.value}}const yO=new Map;function bO(e,t){if(!e.startsWith(`.`))return!1;let n=jb(e,t);if(!n.found)return!1;let r=yO.get(n.path);if(r!==void 0)return r;try{let e=d(n.path,`utf8`).includes(`<uiaspectratioconstraint`);return yO.set(n.path,e),e}catch{return yO.set(n.path,!1),!1}}function xO(e){for(let t of e.openingElement.attributes)if(t.type===`JSXAttribute`&&t.name.type===`JSXIdentifier`&&t.name.name===`scaled`&&t.value?.type===`JSXExpressionContainer`&&t.value.expression.type===`Literal`&&t.value.expression.value===!1)return!0;return!1}function SO(e){return e.type===`JSXElement`?mO(e)===fO:e.type===`JSXExpressionContainer`&&e.expression.type===`Identifier`&&e.expression.name===`UI_ASPECT_RATIO_CONSTRAINT`}function CO(e,t,n,r){if(t.has(e))return!0;if(n===void 0)return!1;let i=n.set.get(e);if(i===void 0||!z(i))return!1;let a=vO(i);return a!==void 0&&(bO(a,r)||pO.has(e))}const wO=y(`no-redundant-aspect-ratio-constraint`,`roblox`,{create(e){let{filename:t,sourceCode:n}=e,r=new Set,i=[],a;return{ArrowFunctionExpression(e){let t=gO(e),n=_O(e);t===void 0||n===void 0||n.type!==`JSXElement`&&n.type!==`JSXFragment`||hO(n)&&r.add(t)},FunctionDeclaration(e){let t=gO(e);if(t===void 0||e.body?.body.length!==1)return;let[n]=e.body.body;n?.type===`ReturnStatement`&&n.argument!==null&&hO(n.argument)&&r.add(t)},ImportDeclaration(e){a??=e},JSXElement(e){i.push(e)},"Program:exit"(){let o;a!==void 0&&(o=n.getScope(a));for(let n of i){let i=mO(n);if(i!==void 0&&!(!CO(i,r,o,t)||xO(n)))for(let t of n.children)SO(t)&&e.report({messageId:`redundantAspectRatioConstraint`,node:t})}}}},meta:{docs:{description:`Disallow redundant uiaspectratioconstraint children inside components that already manage their own aspect ratio internally.`},messages:{redundantAspectRatioConstraint:`This component already renders a uiaspectratioconstraint internally. Passing one as a child is redundant and will cause layout issues.`},schema:[],type:`problem`}});function TO(e,t){let n=m(t);if(n.type!==`CallExpression`||n.optional)return!1;let r=m(n.callee);if(r.type!==`MemberExpression`||r.optional||g(r)!==`create`)return!1;let i=m(r.object);return i.type!==`Identifier`||i.name!==`table`?!1:!v(e,i,`table`)}function EO(e,t){let n=m(t);if(n.type!==`NewExpression`||n.arguments.length!==1&&n.arguments.length!==2)return!1;let r=m(n.callee);return r.type!==`Identifier`||r.name!==`Array`?!1:!v(e,r,`Array`)}const DO=y(`no-table-create-map`,`roblox`,{create(e){return{CallExpression(t){if(t.optional)return;let n=m(t.callee);if(n.type!==`MemberExpression`||n.optional||g(n)!==`map`)return;let r=m(n.object);!TO(e.sourceCode,r)&&!EO(e.sourceCode,r)||e.report({messageId:`avoidConstructThenMap`,node:t})}}},meta:{docs:{description:`Disallow map(...) directly on table.create(...) and new Array(...) constructor patterns in roblox-ts.`},messages:{avoidConstructThenMap:`Do not map directly on table.create(...) or new Array(...). Allocate first, then write by index in a loop.`},schema:[],type:`suggestion`}});function OO({callee:e}){if(e.type!==`MemberExpression`||g(e)!==`await`||e.object.type!==`CallExpression`)return!1;let t=e.object.callee;return t.type!==`MemberExpression`||t.object.type!==`Identifier`||t.object.name!==`Promise`?!1:g(t)===`delay`}const kO=y(`no-task-wait`,`roblox`,{createOnce(e){return{CallExpression(t){if(OO(t)){e.report({messageId:`noPromiseDelayAwait`,node:t});return}let{callee:n}=t;n.type===`MemberExpression`&&n.object.type===`Identifier`&&n.object.name===`task`&&g(n)===`wait`&&e.report({messageId:`noTaskWait`,node:t})}}},meta:{docs:{description:`Disallow task.wait() and Promise.delay(...).await() calls.`},messages:{noPromiseDelayAwait:`Do not use Promise.delay(...).await() in tests. Advance deterministic schedulers or wait for the actual condition instead.`,noTaskWait:`Do not use task.wait() in tests. Advance deterministic schedulers or wait for the actual condition instead.`},schema:[],type:`problem`}});var AO={AdGui:[25,133],AdPortal:[25,133],AlignOrientation:[7,6,25,133,72,152,155,133,343,172,359,204,379,76,440,132,455,132,471,207,515,132,720,132],AlignPosition:[23,132,25,133,155,133,187,36,189,2,344,144,348,204,361,172,379,86,436,135,454,132,471,207,515,132,720,132],AngularVelocity:[21,135,25,133,155,133,359,200,455,132,459,2,720,132],Animation:[25,133],AnimationConstraint:[15,212,20,212,25,133,155,133,250,132,318,212,320,212,348,204,359,204,681,152,720,132],AnimationController:[25,133],AnimationGraphDefinition:[25,133,324,133,443,10],AnimationNodeDefinition:[25,133,396,9],Animator:[25,133,438,133],ArcHandles:[25,133,103,155,682,200,720,133],Attachment:[25,133,72,152,720,132],AudioAnalyzer:[25,133,596,133,740,16],AudioChannelMixer:[25,133,259,13],AudioChannelSplitter:[25,133,259,13],AudioChorus:[25,133,69,132,120,192,377,197,452,234],AudioCompressor:[25,133,29,186,69,132,334,200,453,227,460,186,648,177],AudioDeviceInput:[1,0,25,133,388,132,722,212],AudioDeviceOutput:[25,133],AudioDistortion:[25,133,69,132,302,193],AudioEcho:[25,133,69,132,118,212,145,200,166,193,450,200,730,200],AudioEmitter:[2,133,25,133,31,242,125,100,398,100,437,32,473,100,578,15],AudioEqualizer:[25,133,69,132,223,200,327,200,365,200],AudioFader:[25,133,69,132,722,212],AudioFilter:[25,133,69,132,175,14,193,214,198,200,446,195],AudioFlanger:[25,133,69,132,120,192,377,197,452,234],AudioGate:[25,133,29,181,69,132,460,186],AudioLimiter:[25,133,69,132,352,200,460,181],AudioListener:[2,133,25,133,31,242,125,100,398,100,437,65,473,100,578,15],AudioPitchShifter:[25,133,69,132,424,201,740,16],AudioPlayer:[25,133,34,133,36,132,326,132,432,212,661,200,722,212],AudioRecorder:[25,133],AudioReverb:[25,133,69,132,115,193,116,202,119,212,126,212,145,200,147,182,222,213,258,183,328,218,329,200,456,231,730,179],AudioSpeechToText:[25,133,155,132,630,242],AudioTextToSpeech:[25,133,326,132,424,200,432,212,597,212,630,242,661,200,721,242,722,212],AudioTremolo:[25,133,69,132,120,212,146,193,193,234,567,200,585,200,604,200],AuroraScript:[25,133],AvatarAbilityRules:[25,133],AvatarAccessoryRules:[25,133],AvatarAnimationRules:[25,133],AvatarBodyRules:[25,133],AvatarClothingRules:[25,133],AvatarCollisionRules:[25,133],AvatarRules:[25,133],BallSocketConstraint:[25,133,155,133,312,132,449,187,472,200,687,132,688,178,689,228,698,228,720,132],Beam:[25,133,68,212,109,200,110,200,155,133,162,132,307,200,308,200,551,207,643,212,644,115,646,212,731,212,732,212,745,200],BillboardGui:[4,132,9,132,25,133,35,133,68,212,96,132,131,200,132,175,155,133,159,135,160,135,308,200,345,172,468,133,554,99,555,99,556,99,557,99,558,132,580,252,582,262,613,135,614,135,744,131],BlockMesh:[25,133,400,135,538,141,711,141],BloomEffect:[25,133,155,133,246,191,580,217,648,199],BlurEffect:[25,133,155,133,580,217],BodyAngularVelocity:[21,138,25,133,359,148,410,209],BodyColors:[25,133,212,168,266,168,283,156,481,168,498,156,677,159],BodyForce:[25,133,186,136],BodyGyro:[25,133,72,152,113,232,359,149,410,221],BodyPartDescription:[25,133,28,200,53,18,102,154,215,242],BodyPosition:[25,133,113,209,348,148,410,204,436,139],BodyThrust:[25,133,186,136,321,135],BodyVelocity:[25,133,348,148,410,209,708,138],Bone:[25,133,72,152,720,132],BoolValue:[25,133,704,132],BoxHandleAdornment:[6,4,9,132,25,133,72,152,103,155,565,5,580,141,583,135,682,200,720,133,743,175],BrickColorValue:[25,133],CFrameValue:[25,133,704,152],Camera:[25,133,72,153,74,22,167,236,168,33,184,151,213,133,214,212,703,132],CanvasGroup:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,133,144,132,205,170,206,200,245,53,247,133,260,200,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,720,133,743,212],CharacterMesh:[25,133,53,18,409,200],ChorusSoundEffect:[25,133,120,187,155,133,377,193,443,200,452,193],ClickDetector:[25,133,341,223],Color3Value:[25,133,704,154],ColorCorrectionEffect:[25,133,68,200,107,200,155,133,537,200,664,170],ColorGradingEffect:[25,133,155,133,665,116],CompositeValueCurve:[25,133,111,23],CompressorSoundEffect:[25,133,29,186,155,133,199,200,443,200,453,227,460,186,648,177],ConeHandleAdornment:[6,4,9,132,25,133,72,152,103,155,220,220,226,132,449,193,565,5,583,135,682,200,720,133,743,175],Configuration:[25,133],CornerWedgePart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,107,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,146,671,173,672,193,674,107,675,54,682,200,708,135],CurveAnimation:[25,133,324,133,443,10],CustomLog:[25,133],CylinderHandleAdornment:[6,4,9,132,13,224,25,133,72,152,103,155,220,212,244,200,449,212,565,5,583,135,682,200,720,133,743,175],CylinderMesh:[25,133,400,135,538,141,711,141],CylindricalConstraint:[5,3,14,3,16,132,17,228,18,200,19,200,21,200,25,133,155,133,238,200,312,132,319,228,330,178,331,200,383,172,384,230,385,200,386,200,472,200,532,132,563,200,564,200,580,187,590,132,591,132,597,200,624,200,627,200,698,228,699,234,708,200,720,132],Decal:[25,133,35,133,103,170,161,73,531,200,682,200,695,262,696,264,743,212],DepthOfFieldEffect:[25,133,155,133,165,196,185,184,236,207,391,196],DigitsRigDescription:[25,133,239,152,240,152,241,152,242,135,243,200,366,152,367,152,368,152,369,135,370,200,419,152,420,152,421,152,422,135,423,200,516,152,517,152,518,152,519,135,520,200,576,24,653,152,654,152,655,152,656,135,657,200],DistortionSoundEffect:[25,133,155,133,302,196,443,200],DoubleConstrainedValue:[25,133,360,212,376,200],DragDetector:[23,132,25,133,138,152,142,26,155,133,202,58,257,61,341,223,346,200,347,135,348,203,359,204,371,200,372,135,406,137,418,27,470,28,471,207,535,132,679,212,680,212,702,57],Dragger:[25,133],EchoSoundEffect:[25,133,117,212,145,200,155,133,166,193,443,200,730,200],EqualizerSoundEffect:[25,133,155,133,223,200,327,176,365,174,443,200],EulerRotationCurve:[25,133,533,93],ExplorerFilter:[25,133],FaceControls:[25,133],FileMesh:[25,133,400,135,538,141,711,141],Fire:[25,133,102,166,155,133,219,240,547,161,580,234,662,212],FlangeSoundEffect:[25,133,120,192,155,133,377,197,443,200,452,234],FloatCurve:[25,133],FloorWire:[25,133,103,155,112,200,612,229,645,264,682,200,708,220,720,133,741,185],Folder:[25,133],ForceField:[25,133,720,133],Frame:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,618,38,720,133,743,212],GeneratedFolder:[25,133],Handles:[25,133,103,155,618,41,682,200,720,133],HapticEffect:[25,133,325,132,436,135,449,225,690,42],Highlight:[25,133,121,43,155,133,169,169,174,193,407,170,408,200],HingeConstraint:[5,3,17,228,19,200,21,200,25,133,155,133,312,132,330,178,383,230,386,200,449,187,472,200,564,200,591,132,624,200,698,228,720,132],Humanoid:[25,133,33,133,37,133,40,133,67,133,101,45,128,46,129,242,157,133,217,206,218,47,224,200,253,235,254,233,349,206,355,237,389,206,390,72,466,133,475,48,701,133,728,211],HumanoidController:[25,133],HumanoidDescription:[25,133,54,190,94,200,122,212,161,200,164,200,203,200,214,212,221,212,230,200,252,200,381,200,416,200,444,212,534,200,571,200,607,132,622,200,700,132,727,200,733,212],HumanoidRigDescription:[25,133,86,135,87,135,88,200,89,152,208,135,209,135,210,200,211,152,262,135,263,135,264,200,265,152,267,135,268,135,269,200,270,152,271,135,272,135,273,200,274,152,275,135,276,135,277,200,278,152,279,135,280,135,281,200,282,152,287,135,288,135,289,200,290,152,293,135,294,135,295,200,296,152,297,135,298,135,299,200,300,152,392,135,393,135,394,200,395,152,477,135,478,135,479,200,480,152,482,135,483,135,484,200,485,152,486,135,487,135,488,200,489,152,490,135,491,135,492,200,493,152,494,135,495,135,496,200,497,152,501,135,502,135,503,200,504,152,507,135,508,135,509,200,510,152,511,135,512,135,513,200,514,152,526,135,527,135,528,200,529,152,598,135,599,135,600,200,601,152,723,135,724,135,725,200,726,152],IKControl:[25,133,155,133,156,152,400,152,443,200,589,184,690,49,729,212],ImageButton:[4,133,11,262,25,133,32,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,232,262,233,262,234,200,245,53,247,133,260,200,378,132,436,252,467,91,531,200,539,95,552,133,553,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,587,241,588,212,618,21,660,257,720,133,743,212],ImageHandleAdornment:[6,4,9,132,25,133,72,152,103,167,580,264,583,135,682,200,720,133,743,175],ImageLabel:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,232,262,233,262,234,200,245,53,247,133,260,200,436,252,467,91,531,200,539,95,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,587,241,588,212,660,257,720,133,743,212],InputAction:[25,133,155,133,690,51],InputBinding:[25,133,48,62,91,133,135,62,191,62,255,62,261,62,435,200,439,193,441,62,461,188,469,212,476,62,538,212,548,62,690,52,697,62,705,264,706,141],InputContext:[25,133,155,133,443,205,579,132],IntConstrainedValue:[25,133,360,207,376,200],IntValue:[25,133,704,200],LineForce:[23,132,25,133,155,133,249,132,332,205,348,172,454,132,720,132],LineHandleAdornment:[6,4,9,132,25,133,72,152,103,155,301,234,583,135,647,212,682,200,720,133,743,175],LinearVelocity:[25,133,155,133,187,36,188,133,313,140,317,200,344,143,348,205,353,265,429,262,442,140,454,133,459,2,549,136,707,135,709,126,720,132],LocalizationTable:[25,133,593,251],MakeupDescription:[25,133,28,200,335,66,405,200],MaterialVariant:[8,7,25,133,50,67,152,212,153,170,339,68,615,207],MeshPart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,107,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,134,132,154,133,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,462,89,499,173,500,193,505,107,506,54,525,200,530,135,580,147,671,173,672,193,674,107,675,54,682,200,708,135],Model:[25,133,303,70,380,71],Motor:[25,133,70,152,71,152,124,200,155,133,361,200],Motor6D:[25,133,70,152,71,152,124,200,155,133,361,200],MotorFeature:[25,133,163,74,237,50,286,63,668,117],NoCollisionConstraint:[25,133,155,133],Noise:[25,133],NumberPose:[25,133,148,84,149,85,704,200,729,212],NumberValue:[25,133,704,200],ObjectValue:[25,133],Pants:[25,133,103,170],Part:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,567,77,580,147,671,173,672,193,674,108,675,54,682,200,708,135],ParticleEmitter:[0,135,25,133,68,212,136,200,151,75,155,133,177,133,178,249,179,81,180,82,181,212,182,212,183,132,307,200,308,200,323,132,406,83,452,215,567,78,568,79,569,212,570,80,603,262,662,212,710,200,739,132,745,200],Path2D:[25,133,97,132,103,154,647,212,720,133,743,212],PitchShiftSoundEffect:[25,133,155,133,399,201,443,200],PlaneConstraint:[25,133,155,133,720,132],PluginAction:[25,133],PointLight:[25,133,68,212,102,170,155,133,451,238,566,132],PrismaticConstraint:[5,3,25,133,155,133,312,132,319,228,331,200,383,172,385,200,472,200,563,200,580,187,591,132,597,200,627,200,699,234,708,200,720,132],ProceduralModel:[25,133,303,70,380,71,580,145],ProximityPrompt:[3,246,25,133,35,133,93,133,155,133,158,87,201,59,225,200,256,60,341,207,350,200,397,242,465,133,618,88,692,262],PyramidHandleAdornment:[6,4,9,132,25,133,72,152,103,155,220,220,565,5,577,229,580,212,583,135,682,200,720,133,743,175],RayValue:[25,133],RealtimeMedia:[25,133],RelativeGui:[25,133],RenderingTest:[25,133,72,152,104,207,105,90,106,233,123,242,167,236,417,132,447,132,448,216,463,215,572,132,658,242,663,222],ReverbSoundEffect:[25,133,116,202,119,212,126,212,145,179,155,133,443,200,730,200],RigidConstraint:[25,133,155,133,720,132],RocketPropulsion:[25,133,81,194,356,222,358,226,359,150,626,135,628,229,651,180,652,234,683,232,684,221],RodConstraint:[25,133,155,133,301,234,309,239,310,239,312,132,647,186,720,132],RopeConstraint:[25,133,155,133,301,234,472,200,647,186,720,132,734,132,735,204,736,228,737,220,738,234],Rotate:[25,133,70,152,71,152,155,133],RotateP:[25,133,49,200,70,152,71,152,155,133],RotateV:[25,133,49,200,70,152,71,152,155,133],RotationCurve:[25,133],ScreenGui:[25,133,35,133,95,133,130,200,155,133,468,133,536,94,540,96,554,99,555,99,556,99,557,99,558,132,744,131],ScrollingFrame:[4,132,11,262,25,133,35,133,39,17,41,17,46,164,47,200,55,157,56,19,58,212,79,262,80,253,96,133,144,132,150,31,229,97,245,53,247,133,260,200,436,252,531,200,541,170,542,200,543,210,545,98,546,133,552,133,554,99,555,99,556,99,557,99,558,133,561,200,580,252,581,101,714,97,715,128,720,133,743,212],Seat:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,127,132,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,567,77,580,147,671,173,672,193,674,108,675,54,682,200,708,135],SelectionBox:[25,133,103,155,316,187,620,156,621,212,682,200,720,133],SelectionPartLasso:[25,133,103,155,682,200,720,133],SelectionPointLasso:[25,133,103,155,434,135,682,200,720,133],SelectionSphere:[25,133,103,155,620,156,621,212,682,200,720,133],Shirt:[25,133,103,170],ShirtGraphic:[25,133,103,170],Sky:[25,133,83,133,382,208,586,135,605,221,619,216],Smoke:[25,133,102,170,155,133,403,193,521,212,580,212,662,212],Sound:[2,133,25,133,325,132,430,132,431,132,432,212,433,132,522,204,523,207,524,92,661,200,722,193],SoundGroup:[25,133,722,193],Sparkles:[25,133,155,133,595,163,662,212],SpecialMesh:[25,133,364,69,400,135,538,141,711,141],SphereHandleAdornment:[6,4,9,132,25,133,72,152,103,155,449,212,565,5,583,135,682,200,720,133,743,175],SpotLight:[13,239,25,133,68,212,102,170,155,133,161,73,451,211,566,132],SpringConstraint:[25,133,98,225,114,200,155,133,192,212,312,132,348,172,351,234,373,200,449,191,610,200,647,186,720,132],StringValue:[25,133,704,242],StyleDerive:[25,133,443,200],StyleLink:[25,133],StyleQuery:[25,133],StyleRule:[25,133,443,200,562,242],StyleSheet:[25,133],SunRaysEffect:[25,133,155,133,246,189,602,212],SurfaceAppearance:[8,8,25,133,102,170,152,212,153,170,467,91],SurfaceGui:[4,133,9,132,25,133,35,133,68,212,80,266,96,132,155,133,161,73,308,200,345,200,426,233,468,133,554,99,555,99,556,99,557,99,558,132,584,105,666,200,744,131,745,200],SurfaceLight:[13,239,25,133,68,212,102,170,155,133,161,73,451,211,566,132],TextBox:[4,133,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,92,133,96,132,144,132,245,53,247,133,260,200,314,212,362,175,387,132,404,242,427,160,428,242,436,252,474,132,531,200,552,133,554,99,555,99,556,99,557,99,558,132,561,200,573,133,580,252,581,101,630,250,631,158,632,111,633,133,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],TextButton:[4,133,11,262,25,133,32,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,314,212,362,175,378,132,404,242,436,252,474,132,531,200,552,133,553,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,618,21,630,243,631,158,632,111,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],TextGenerator:[25,133,550,200,623,242,629,194,670,198],TextLabel:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,314,212,362,175,404,242,436,252,474,132,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,630,247,631,158,632,111,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],Texture:[25,133,35,133,103,170,161,73,401,200,402,200,531,200,616,220,617,220,682,200,695,262,696,264,743,212],Tool:[25,133,75,133,155,133,204,152,303,70,336,132,380,71,464,133,667,242],Torque:[25,133,155,133,459,1,676,135,720,132],TorsionSpringConstraint:[25,133,98,238,114,181,155,133,311,132,312,132,342,228,359,172,449,191,472,200,610,206,720,132],Trail:[25,133,68,212,155,133,162,132,304,220,307,200,308,200,351,200,373,186,643,212,644,115],TremoloSoundEffect:[25,133,120,212,146,193,155,133,193,234,443,200],TrussPart:[12,132,25,133,30,133,42,173,43,193,44,109,45,54,61,173,62,193,64,109,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,194,173,195,193,196,109,197,54,284,173,285,193,291,109,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,109,506,54,525,200,530,135,580,146,671,173,672,193,674,109,675,54,682,200,708,135],UIAspectRatioConstraint:[25,133,26,212,27,12,133,25],UICorner:[25,133,60,259,63,259,669,259,673,259],UIDragDetector:[25,133,66,118,137,263,139,119,140,200,141,120,142,121,143,252,155,133,346,200,347,252,371,200,372,252,470,122,559,255,560,239,691,123],UIFlexItem:[25,133,176,125,207,200,251,56,575,200],UIGradient:[25,133,155,133,400,262,531,200,538,212,659,39,690,40],UIGridLayout:[25,133,84,256,85,254,170,34,171,200,227,44,592,102,606,103,712,127],UIListLayout:[25,133,170,35,227,44,228,124,251,56,411,258,592,102,712,127,713,124,742,132],UIPadding:[25,133,412,258,413,258,414,258,415,258],UIPageLayout:[22,133,25,133,90,132,148,29,149,30,170,34,200,133,227,44,411,258,544,133,592,102,678,133,686,212,712,127],UIScale:[25,133,538,212],UIShadow:[25,133,52,258,102,154,155,133,400,252,602,252,682,200,743,175],UISizeConstraint:[25,133,354,261,374,262],UIStroke:[24,11,25,133,57,258,59,20,102,154,155,133,315,64,611,104,647,212,682,200,743,212],UITableLayout:[25,133,170,35,172,132,173,132,227,44,333,110,411,252,592,102,712,127],UITextSizeConstraint:[25,133,357,206,375,212],UniversalConstraint:[25,133,155,133,312,132,342,228,449,188,472,200,720,132],ValueCurve:[25,133],Vector3Curve:[25,133],Vector3Value:[25,133,704,135],VectorForce:[23,132,25,133,155,133,186,142,459,1,720,132],VehicleSeat:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,127,132,154,133,194,173,195,193,196,107,197,54,216,133,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,356,219,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,147,608,200,609,200,649,200,650,200,671,173,672,193,674,108,675,54,676,207,682,200,685,212,708,135],VelocityMotor:[25,133,70,152,71,152,108,200,124,200,155,133,361,200],VideoDisplay:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,436,252,467,91,531,200,539,95,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,660,257,716,170,717,262,718,262,719,200,720,133,743,212],VideoFrame:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,248,55,260,200,325,132,363,129,433,132,436,252,522,204,523,212,524,92,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,661,200,720,133,722,212,743,212],VideoPlayer:[25,133,248,55,326,132,363,129,432,212,661,200,722,212],ViewportFrame:[4,132,10,165,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,234,200,245,53,247,133,260,200,305,162,306,134,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,720,133,743,212],WedgePart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,147,671,173,672,193,674,107,675,54,682,200,708,135],Weld:[25,133,70,152,71,152,155,133],WeldConstraint:[25,133],Wire:[25,133,594,248,625,245],WireframeHandleAdornment:[6,4,9,132,25,133,72,152,103,155,538,141,583,135,647,212,682,200,720,133,743,175],WorldModel:[25,133,303,70,380,71],WrapDeformer:[25,133,73,152,235,152],WrapLayer:[25,133,38,130,51,152,73,152,155,133,235,152,405,212,445,212,457,152,574,200],WrapTarget:[25,133,73,152,235,152,610,200],WrapTextureTransfer:[25,133,693,260,694,261]},jO=`Acceleration.AccessType.AcousticSimulationEnabled.ActionText.Active.ActuatorType.AdornCullingMode.AlignType.AlphaMode.AlwaysOnTop.Ambient.AnchorPoint.Anchored.Angle.AngularActuatorType.AngularDamping.AngularLimitsEnabled.AngularResponsiveness.AngularRestitution.AngularSpeed.AngularStrength.AngularVelocity.Animated.ApplyAtCenterOfMass.ApplyStrokeMode.Archivable.AspectRatio.AspectType.AssetId.Attack.AudioCanCollide.AudioInteractionGroup.AutoButtonColor.AutoJumpEnabled.AutoLoad.AutoLocalize.AutoPlay.AutoRotate.AutoSkin.AutomaticCanvasSize.AutomaticScalingEnabled.AutomaticSize.BackParamA.BackParamB.BackSurface.BackSurfaceInput.BackgroundColor3.BackgroundTransparency.Backward.BaseAngle.BaseMaterial.BindOffset.BlurRadius.BodyPart.BodyTypeScale.BorderColor3.BorderMode.BorderOffset.BorderSizePixel.BorderStrokePosition.BottomLeftRadius.BottomParamA.BottomParamB.BottomRightRadius.BottomSurface.BottomSurfaceInput.BoundingBehavior.BreakJointsOnDeath.Brightness.Bypass.C0.C1.CFrame.CageOrigin.CameraType.CanBeDropped.CanCollide.CanQuery.CanTouch.CanvasPosition.CanvasSize.CartoonFactor.CastShadow.CelestialBodiesShown.CellPadding.CellSize.ChestRangeMax.ChestRangeMin.ChestSize.ChestTposeAdjustment.Circular.ClampMagnitudeToOne.ClearTextOnFocus.ClickablePrompt.ClimbAnimation.ClipToDeviceSafeArea.ClipsDescendants.Closed.Coils.CollisionGroup.CollisionGroupId.CollisionType.Color.Color3.ComparisonDiffThreshold.ComparisonMethod.ComparisonPsnrThreshold.Contrast.CurrentAngle.CurveSize0.CurveSize1.CurveType.CycleOffset.D.Damping.DecayRatio.DecayTime.Delay.DelayTime.Density.Depth.DepthMode.DepthScale.Description.DesiredAngle.DiffractionEnabled.Diffusion.Disabled.DisplayDistanceType.DisplayName.DisplayOrder.DistanceLowerLimit.DistanceUpperLimit.DominantAxis.DoubleSided.Down.Drag.DragAxis.DragFrame.DragRelativity.DragRotation.DragSpace.DragStyle.DragUDim2.Draggable.DryLevel.Duty.EarlyDelayTime.EasingDirection.EasingStyle.ElasticBehavior.EmissionDirection.EmissiveStrength.EmissiveTint.EnableFluidForces.Enabled.EndEffectorOffset.EvaluateStateMachine.Exclusivity.ExtentsOffset.ExtentsOffsetWorldSpace.Face.FaceCamera.FaceId.FallAnimation.FarIntensity.Feedback.FieldOfView.FieldOfViewMode.FillColor.FillDirection.FillDirectionMaxCells.FillEmptySpaceColumns.FillEmptySpaceRows.FillTransparency.FilterType.FlexMode.FlipbookBlendFrames.FlipbookIncompatible.FlipbookLayout.FlipbookMode.FlipbookSizeX.FlipbookSizeY.FlipbookStartRandom.Focus.FocusDistance.Force.ForceLimitMode.ForceLimitsEnabled.ForceRelativeTo.FormFactor.Forward.FreeLength.Frequency.FrontParamA.FrontParamB.FrontSurface.FrontSurfaceInput.Gain.GainMakeup.GamepadInputEnabled.GamepadKeyCode.GamepadModeSwitchKeyCode.GraphicTShirt.Grip.GroupColor3.GroupTransparency.GrowRatio.HeadBaseRangeMax.HeadBaseRangeMin.HeadBaseSize.HeadBaseTposeAdjustment.HeadColor3.HeadLocked.HeadScale.HeadShape.HeadsUpDisplay.HealthDisplayDistance.HealthDisplayType.Heat.Height.HeightScale.HighCutFrequency.HighGain.HipHeight.HoldDuration.Hollow.HorizontalAlignment.HorizontalFlex.HorizontalScrollBarInset.IdleAnimation.ImageColor3.ImageRectOffset.ImageRectSize.ImageTransparency.ImportOrigin.InFocusRadius.InOut.InclinationAngle.Index1TposeAdjustment.Index2TposeAdjustment.Index3TposeAdjustment.IndexRange.IndexSize.InnerRadius.InputSink.Intensity.Interactable.InternalVideoUsage.InverseSquareLaw.IsKinematic.ItemLineAlignment.JumpAnimation.JumpHeight.JumpPower.KeyCode.KeyboardKeyCode.KeyboardModeSwitchKeyCode.LateDelayTime.Layout.LayoutOrder.Left.LeftAnkleRangeMax.LeftAnkleRangeMin.LeftAnkleSize.LeftAnkleTposeAdjustment.LeftArmColor3.LeftClavicleRangeMax.LeftClavicleRangeMin.LeftClavicleSize.LeftClavicleTposeAdjustment.LeftElbowRangeMax.LeftElbowRangeMin.LeftElbowSize.LeftElbowTposeAdjustment.LeftHipRangeMax.LeftHipRangeMin.LeftHipSize.LeftHipTposeAdjustment.LeftKneeRangeMax.LeftKneeRangeMin.LeftKneeSize.LeftKneeTposeAdjustment.LeftLegColor3.LeftParamA.LeftParamB.LeftRight.LeftShoulderRangeMax.LeftShoulderRangeMin.LeftShoulderSize.LeftShoulderTposeAdjustment.LeftSurface.LeftSurfaceInput.LeftToeBaseRangeMax.LeftToeBaseRangeMin.LeftToeBaseSize.LeftToeBaseTposeAdjustment.LeftWristRangeMax.LeftWristRangeMin.LeftWristSize.LeftWristTposeAdjustment.Length.Level.LevelOfDetail.Lifetime.LightColor.LightDirection.LightEmission.LightInfluence.LimitAngle0.LimitAngle1.LimitEnabled.LimitsEnabled.LineDirection.LineHeight.LineJoinMode.LineThickness.LineVelocity.LinearDamping.LinearResponsiveness.LinearStrength.Location.Locked.LockedToPart.Loop.Looped.Looping.LowGain.LowShelfFrequency.LowShelfGain.LowerAngle.LowerLimit.Magnitude.MajorAxis.MakeupGain.MakeupType.ManualActivationOnly.Massless.Material.MaterialPattern.MaterialVariant.MaxActivationDistance.MaxAngle.MaxAngularVelocity.MaxAxesForce.MaxDistance.MaxDragAngle.MaxDragTranslation.MaxForce.MaxHealth.MaxIndicatorDistance.MaxLength.MaxLevel.MaxPlanarAxesForce.MaxSize.MaxSlopeAngle.MaxSpeed.MaxTextSize.MaxThrust.MaxTorque.MaxValue.MaxVelocity.MaxVisibleGraphemes.MaximumResolution.MeshType.MidGain.Middle1TposeAdjustment.Middle2TposeAdjustment.Middle3TposeAdjustment.MiddleRange.MiddleSize.MinDragAngle.MinDragTranslation.MinLength.MinSize.MinTextSize.MinValue.Mix.Modal.Mode.ModelStreamingMode.MoodAnimation.MoonAngularSize.MotorMaxAcceleration.MotorMaxAngularAcceleration.MotorMaxForce.MotorMaxTorque.MultiLine.Muted.NameDisplayDistance.NameOcclusion.NearIntensity.NeckRangeMax.NeckRangeMin.NeckSize.NeckTposeAdjustment.NodeType.ObjectText.OcclusionEnabled.Octave.Offset.OffsetStudsU.OffsetStudsV.Opacity.OpenTypeFeatures.Order.Orientation.OutlineColor.OutlineTransparency.OverlayTextureId.P.Padding.PaddingBottom.PaddingLeft.PaddingRight.PaddingTop.Pants.PerfTest.PermissionPolicy.Pinky1TposeAdjustment.Pinky2TposeAdjustment.Pinky3TposeAdjustment.PinkyRange.PinkySize.Pitch.PivotOffset.PixelsPerStud.PlaceholderColor3.PlaceholderText.PlaneVelocity.PlayOnRemove.PlaybackRegionsEnabled.PlaybackSpeed.Playing.Point.PointerIndex.Position.PositionType.PreferLodEnabled.PressedThreshold.PrimaryAxisOnly.PrimaryModifier.PrimaryTangentAxis.Priority.ProportionScale.Puffiness.Q.QualityAuto.QualityLevel.Radius.RampTime.Range.Rate.Ratio.ReactionForceEnabled.ReactionTorqueEnabled.ReferenceFrequency.ReferenceOrigin.Reflectance.RelativeTo.Release.ReleasedThreshold.RenderFidelity.RenderingTestFrameCount.RequiresHandle.RequiresLineOfSight.RequiresNeck.ResampleMode.ResetOnSpawn.ResponseCurve.ResponseStyle.Responsiveness.Restitution.ReverbEnabled.RichText.RigType.Right.RightAnkleRangeMax.RightAnkleRangeMin.RightAnkleSize.RightAnkleTposeAdjustment.RightArmColor3.RightClavicleRangeMax.RightClavicleRangeMin.RightClavicleSize.RightClavicleTposeAdjustment.RightElbowRangeMax.RightElbowRangeMin.RightElbowSize.RightElbowTposeAdjustment.RightHipRangeMax.RightHipRangeMin.RightHipSize.RightHipTposeAdjustment.RightKneeRangeMax.RightKneeRangeMin.RightKneeSize.RightKneeTposeAdjustment.RightLegColor3.RightParamA.RightParamB.RightShoulderRangeMax.RightShoulderRangeMin.RightShoulderSize.RightShoulderTposeAdjustment.RightSurface.RightSurfaceInput.RightToeBaseRangeMax.RightToeBaseRangeMin.RightToeBaseSize.RightToeBaseTposeAdjustment.RightWristRangeMax.RightWristRangeMin.RightWristSize.RightWristTposeAdjustment.RigidityEnabled.Ring1TposeAdjustment.Ring2TposeAdjustment.Ring3TposeAdjustment.RingRange.RingSize.RiseVelocity.RollOffMaxDistance.RollOffMinDistance.RollOffMode.RootPriority.RootRangeMax.RootRangeMin.RootSize.RootTposeAdjustment.RotVelocity.Rotation.RotationAxisVisible.RotationOrder.RunAnimation.RunLocally.SafeAreaCompatibility.Saturation.Scale.ScaleType.ScreenInsets.ScrollBarImageColor3.ScrollBarImageTransparency.ScrollBarThickness.ScrollWheelInputEnabled.ScrollingDirection.ScrollingEnabled.SecondaryColor.SecondaryModifier.SecondaryTangentAxis.Seed.Segments.Selectable.Selected.SelectionBehaviorDown.SelectionBehaviorLeft.SelectionBehaviorRight.SelectionBehaviorUp.SelectionGroup.SelectionModeDragSpeed.SelectionModeRotateSpeed.SelectionOrder.Selector.ServoMaxForce.ServoMaxTorque.Shading.Shadows.Shape.ShapeInOut.ShapePartial.ShapeStyle.Shirt.ShouldSkip.ShowNativeInput.ShrinkFactor.ShrinkRatio.Side.Sides.SimulationFidelity.Sink.Size.SizeConstraint.SizeOffset.SizeRelativeOffset.SizingMode.Skew.SkyboxOrientation.SliceCenter.SliceScale.SmoothTime.SoftlockAngularServoUponReachingTarget.SoftlockServoUponReachingTarget.SortOrder.SourceLocaleId.SourceName.SparkleColor.SpectrumEnabled.Speed.SpineRangeMax.SpineRangeMin.SpineSize.SpineTposeAdjustment.Spread.SpreadAngle.Square.StarCount.StartCorner.StaticFacialAnimation.Steer.SteerFloat.Stiffness.StrokeSizingMode.StudsBetweenTextures.StudsOffset.StudsOffsetWorldSpace.StudsPerTile.StudsPerTileU.StudsPerTileV.Style.SunAngularSize.SurfaceColor3.SurfaceTransparency.SwimAnimation.SystemPrompt.TargetAngle.TargetName.TargetOffset.TargetPosition.TargetRadius.Temperature.Text.TextColor3.TextDirection.TextEditable.TextScaled.TextSize.TextStrokeColor3.TextStrokeTransparency.TextTransparency.TextTruncate.TextWrapped.TextXAlignment.TextYAlignment.TextureLength.TextureMode.TextureSize.TextureSpeed.Thickness.Threshold.Throttle.ThrottleFloat.ThrustD.ThrustP.Thumb1TposeAdjustment.Thumb2TposeAdjustment.Thumb3TposeAdjustment.ThumbRange.ThumbSize.Ticket.TileMode.TileSize.TimePosition.TimeScale.Timeout.TintColor.TonemapperPreset.ToolPunchThroughDistance.ToolTip.TopBottom.TopLeftRadius.TopP.TopParamA.TopParamB.TopRightRadius.TopSurface.TopSurfaceInput.Torque.TorsoColor3.TouchInputEnabled.TrackballRadialPullFactor.TrackballRollFactor.Transform.Transparency.TurnD.TurnP.TurnSpeed.TweenTime.TwistLimitsEnabled.TwistLowerAngle.TwistUpperAngle.Type.UIDragSpeedAxisMapping.UIOffset.UVMaxBound.UVMinBound.UVOffset.UVScale.Up.UpperAngle.UpperLimit.UseAvatarSettings.UseJumpPower.VRSwitchKeyCode.VRTiltAndRollEnabled.Value.Vector2Scale.Vector3Scale.VectorVelocity.Velocity.VelocityConstraintMode.VelocityInheritance.VertexColor.VerticalAlignment.VerticalFlex.VerticalScrollBarInset.VerticalScrollBarPosition.VideoColor3.VideoRectOffset.VideoRectSize.VideoTransparency.Visible.VoiceId.Volume.WaistRangeMax.WaistRangeMin.WaistSize.WaistTposeAdjustment.WalkAnimation.WalkSpeed.Weight.WetLevel.Width0.Width1.WidthScale.WinchEnabled.WinchForce.WinchResponsiveness.WinchSpeed.WinchTarget.WindAffectsDrag.WindowSize.WireRadius.Wraps.ZIndex.ZIndexBehavior.ZOffset`.split(`.`),MO=[[0,`AccessModifierType`,`Deny`],[0,`ActuatorRelativeTo`,`Attachment0`],[0,`ActuatorRelativeTo`,`World`],[0,`ActuatorType`,`None`],[0,`AdornCullingMode`,`Automatic`],[0,`AdornShading`,`Default`],[0,`AlignType`,`AllAxes`],[0,`AlphaMode`,`Opaque`],[0,`AlphaMode`,`Overlay`],[0,`AnimationNodeType`,`InvalidNode`],[0,`AnimationPriority`,`Action`],[0,`ApplyStrokeMode`,`Contextual`],[0,`AspectType`,`FitWithinMaxSize`],[0,`AudioChannelLayout`,`Stereo`],[0,`AudioFilterType`,`Peak`],[0,`AudioSimulationFidelity`,`Automatic`],[0,`AudioWindowSize`,`Medium`],[0,`AutomaticSize`,`None`],[0,`BodyPart`,`Head`],[0,`BorderMode`,`Outline`],[0,`BorderStrokePosition`,`Outer`],[0,`ButtonStyle`,`Custom`],[0,`CameraType`,`Fixed`],[0,`CompositeValueCurveType`,`NumberRange`],[0,`DigitsRigDescriptionSide`,`None`],[0,`DominantAxis`,`Width`],[0,`DragDetectorDragStyle`,`TranslatePlane`],[0,`DragDetectorPermissionPolicy`,`Everybody`],[0,`DragDetectorResponseStyle`,`Physical`],[0,`EasingDirection`,`Out`],[0,`EasingStyle`,`Back`],[0,`ElasticBehavior`,`WhenScrollable`],[0,`EmitterPositionType`,`Parent`],[0,`FieldOfViewMode`,`Vertical`],[0,`FillDirection`,`Horizontal`],[0,`FillDirection`,`Vertical`],[0,`ForceLimitMode`,`Magnitude`],[0,`FormFactor`,`Brick`],[0,`FrameStyle`,`Custom`],[0,`GradientTileMode`,`Clamp`],[0,`GradientType`,`Linear`],[0,`HandlesStyle`,`Resize`],[0,`HapticEffectType`,`UIClick`],[0,`HighlightDepthMode`,`AlwaysOnTop`],[0,`HorizontalAlignment`,`Left`],[0,`HumanoidCollisionType`,`OuterBox`],[0,`HumanoidDisplayDistanceType`,`Viewer`],[0,`HumanoidHealthDisplayType`,`DisplayWhenDamaged`],[0,`HumanoidRigType`,`R6`],[0,`IKControlType`,`Transform`],[0,`InOut`,`Center`],[0,`InputActionType`,`Bool`],[0,`InputBindingType`,`Automatic`],[0,`InputSink`,`None`],[0,`InputType`,`NoInput`],[0,`InternalVideoUsage`,`Default`],[0,`ItemLineAlignment`,`Automatic`],[0,`KeyCode`,`ButtonL2`],[0,`KeyCode`,`ButtonR1`],[0,`KeyCode`,`ButtonX`],[0,`KeyCode`,`E`],[0,`KeyCode`,`LeftControl`],[0,`KeyCode`,`Unknown`],[0,`LeftRight`,`Center`],[0,`LineJoinMode`,`Round`],[0,`ListenerPositionType`,`Parent`],[0,`MakeupType`,`Face`],[0,`Material`,`Plastic`],[0,`MaterialPattern`,`Regular`],[0,`MeshType`,`Head`],[0,`ModelLevelOfDetail`,`Automatic`],[0,`ModelStreamingMode`,`Default`],[0,`NameOcclusion`,`OccludeAll`],[0,`NormalId`,`Front`],[0,`NormalId`,`Right`],[0,`NormalId`,`Top`],[0,`OrientationAlignmentMode`,`TwoAttachment`],[0,`PartType`,`Block`],[0,`ParticleEmitterShape`,`Box`],[0,`ParticleEmitterShapeInOut`,`Outward`],[0,`ParticleEmitterShapeStyle`,`Volume`],[0,`ParticleFlipbookLayout`,`None`],[0,`ParticleFlipbookMode`,`Loop`],[0,`ParticleOrientation`,`FacingCamera`],[0,`PoseEasingDirection`,`In`],[0,`PoseEasingStyle`,`Linear`],[0,`PositionAlignmentMode`,`TwoAttachment`],[0,`ProximityPromptExclusivity`,`OnePerButton`],[0,`ProximityPromptStyle`,`Default`],[0,`RenderFidelity`,`Automatic`],[0,`RenderingTestComparisonMethod`,`psnr`],[0,`ResamplerMode`,`Default`],[0,`RollOffMode`,`Inverse`],[0,`RotationOrder`,`XYZ`],[0,`SafeAreaCompatibility`,`FullscreenExtension`],[0,`ScaleType`,`Stretch`],[0,`ScreenInsets`,`CoreUISafeInsets`],[0,`ScrollBarInset`,`None`],[0,`ScrollingDirection`,`XY`],[0,`SelectionBehavior`,`Escape`],[0,`SimulationMode`,`Default`],[0,`SizeConstraint`,`RelativeXY`],[0,`SortOrder`,`Name`],[0,`StartCorner`,`TopLeft`],[0,`StrokeSizingMode`,`FixedSize`],[0,`SurfaceGuiSizingMode`,`FixedSize`],[0,`SurfaceType`,`Inlet`],[0,`SurfaceType`,`Smooth`],[0,`SurfaceType`,`Studs`],[0,`SurfaceType`,`Universal`],[0,`TableMajorAxis`,`RowMajor`],[0,`TextDirection`,`Auto`],[0,`TextTruncate`,`None`],[0,`TextXAlignment`,`Center`],[0,`TextYAlignment`,`Center`],[0,`TextureMode`,`Stretch`],[0,`TonemapperPreset`,`Default`],[0,`TopBottom`,`Center`],[0,`UIDragDetectorBoundingBehavior`,`Automatic`],[0,`UIDragDetectorDragRelativity`,`Absolute`],[0,`UIDragDetectorDragSpace`,`Parent`],[0,`UIDragDetectorDragStyle`,`TranslatePlane`],[0,`UIDragDetectorResponseStyle`,`Offset`],[0,`UIDragSpeedAxisMapping`,`XY`],[0,`UIFlexAlignment`,`None`],[0,`UIFlexMode`,`None`],[0,`VelocityConstraintMode`,`Vector`],[0,`VerticalAlignment`,`Top`],[0,`VerticalScrollBarPosition`,`Right`],[0,`VideoSampleSize`,`Full`],[0,`WrapLayerAutoSkin`,`Disabled`],[0,`ZIndexBehavior`,`Global`],[1,!1],[1,!0],[10,[-1,-1,-1]],[10,[0,0,0]],[10,[0,1,0]],[10,[0,180,90]],[10,[0,2,0]],[10,[0,50,0]],[10,[1,0,0]],[10,[1,1,1]],[10,[1e3,0,0]],[10,[1e3,1e3,1e3]],[10,[1e4,1e4,1e4]],[10,[12,12,12]],[10,[2,2,2]],[10,[4,1.2000000476837158,2]],[10,[4e3,4e3,4e3]],[10,[4e5,0,4e5]],[10,[4e5,4e5,0]],[2,[0,0,-5,1,0,0,0,1,0,0,0,1]],[2,[0,0,0,1,0,0,0,1,0,0,0,1]],[2,[0,20,20,1,0,0,0,.7071068286895752,.7071068286895752,0,-.7071068286895752,.7071068286895752]],[3,[0,0,0]],[3,[.05098039284348488,.4117647111415863,.6745098233222961]],[3,[.05098039656877518,.4117647409439087,.6745098233222961]],[3,[.10588235408067703,.16470588743686676,.2078431397676468]],[3,[.10588236153125763,.16470588743686676,.20784315466880798]],[3,[.1568627506494522,.49803924560546875,.27843138575553894]],[3,[.5,.5,.5]],[3,[.545098066329956,.3137255012989044,.21568629145622253]],[3,[.5490196347236633,.5490196347236633,.5490196347236633]],[3,[.5647059082984924,.09803922474384308,1]],[3,[.6392157077789307,.6352941393852234,.6470588445663452]],[3,[.7843137383460999,.7843137383460999,.7843137383460999]],[3,[.9254902601242065,.545098066329956,.27450981736183167]],[3,[.9490196704864502,.9529412388801575,.9529412388801575]],[3,[.9921569228172302,.917647123336792,.5529412031173706]],[3,[1,0,0]],[3,[1,1,1]],[3,[163,162,165]],[4,`inf`],[4,-.5],[4,-10],[4,-1],[4,-20],[4,-40],[4,-45],[4,-6],[4,.0010000000474974513],[4,.009999999776482582],[4,.019999999552965164],[4,.03999999910593033],[4,.05000000074505806],[4,.0625],[4,.10000000149011612],[4,.15000000596046448],[4,.20000000298023224],[4,.25],[4,.30000001192092896],[4,.4000000059604645],[4,.44999998807907104],[4,.5],[4,.699999988079071],[4,.7070000171661377],[4,.75],[4,.8500000238418579],[4,.8999999761581421],[4,.949999988079071],[4,0],[4,1.25],[4,1.5],[4,1e7],[4,1e4],[4,1e3],[4,100],[4,10],[4,11],[4,1250],[4,12],[4,16],[4,1],[4,2e4],[4,2e3],[4,20],[4,21],[4,24],[4,250],[4,25],[4,2],[4,3e3],[4,30],[4,32],[4,360],[4,3],[4,4e3],[4,40],[4,45],[4,4],[4,5e5],[4,5e3],[4,500],[4,50],[4,5],[4,7.199999809265137],[4,70],[4,89],[4,8],[4,90],[4,9],[5,[0,0,0,0]],[6,``],[6,`Button`],[6,`Default`],[6,`Input`],[6,`Interact`],[6,`Label`],[6,`Output`],[6,`Particle texture must be 1024 by 1024 to use flipbooks.`],[6,`TextBox`],[6,`en-us`],[7,[0,0,0,0]],[7,[0,0,2,0]],[7,[0,100,0,100]],[7,[0,300,0,300]],[7,[0,5,0,5]],[7,[1,0,1,0]],[8,[0,0]],[8,[0,8]],[9,[`-inf`,`-inf`]],[9,[`inf`,`inf`]],[9,[0,0]],[9,[1,0]],[9,[1,1]],[9,[1e3,1e3]],[9,[800,600]]];const NO=new Set([`Name`,`Parent`]),PO=new Set(Array.from(NO,e=>e.toLowerCase())),FO=new Map(Object.entries(AO).map(([e])=>[e.toLowerCase(),e]));function IO(e){let t=new Map;for(let[n,r]of Object.entries(e)){if(!XO(r))continue;let e=n.toLowerCase();t.has(e)||t.set(e,{propertyName:n,value:r})}return t}const LO=[`Enum`,`bool`,`CFrame`,`Color3`,`number`,`Rect`,`string`,`UDim2`,`UDim`,`Vector2`,`Vector3`];function RO(e){let[n]=e;if(!t.isNumber(n))return;let r=LO[n];if(r===void 0)return;let i=r===`Enum`?{enumType:e[1],type:r,value:e[2]}:{type:r,value:e[1]};return XO(i)?i:void 0}const zO=new Map([[`TextLabel`,new Map([[`text`,{propertyName:`Text`,value:{type:`string`,value:``}}]])],[`UICorner`,new Map([[`cornerradius`,{propertyName:`CornerRadius`,value:{type:`UDim`,value:[0,0]}}]])]]);function BO(){let e=new Map;for(let[t,n]of Object.entries(AO)){let r={};for(let e=0;e<n.length;e+=2){let t=n[e],i=n[e+1];if(t===void 0||i===void 0)continue;let a=jO[t],o=MO[i],s=o===void 0?void 0:RO(o);a!==void 0&&s!==void 0&&(r[a]=s)}e.set(t,IO(r))}return e}const VO=BO();function HO(e,t){return e.type===`Identifier`&&e.name===t}function UO(e){return e.type===`Literal`&&typeof e.value==`boolean`}function WO(e){if(e.type!==`JSXIdentifier`)return;let t=FO.get(e.name.toLowerCase());if(t!==void 0&&e.name!==t)return t}function GO(e){if(e.type===`JSXIdentifier`)return e.name}function KO({value:e}){if(e!==null){if(e.type===`Literal`)return e;if(e.type===`JSXExpressionContainer`&&e.expression.type!==`JSXEmptyExpression`)return e.expression}}function qO(e,t){let n=t.toLowerCase(),r=zO.get(e)?.get(n);if(r!==void 0)return r;let i=VO.get(e);if(i!==void 0)return i.get(n)}function JO(e){return PO.has(e.toLowerCase())}function YO(e){return t.isNumber(e)||e===`inf`||e===`-inf`}function XO(e){if(!t.isObject(e)||!t.isString(e.type)||!(`value`in e))return!1;switch(e.type){case`bool`:return typeof e.value==`boolean`;case`CFrame`:return Array.isArray(e.value)&&e.value.length===12&&e.value.every(YO);case`Color3`:return Array.isArray(e.value)&&e.value.length===3&&e.value.every(t.isNumber);case`Enum`:return t.isString(e.enumType)&&t.isString(e.value);case`number`:return YO(e.value);case`Rect`:case`UDim2`:return Array.isArray(e.value)&&e.value.length===4&&e.value.every(YO);case`string`:return t.isString(e.value);case`UDim`:case`Vector2`:return Array.isArray(e.value)&&e.value.length===2&&e.value.every(YO);case`Vector3`:return Array.isArray(e.value)&&e.value.length===3&&e.value.every(YO)}return!1}function ZO(e){let t=m(e);if(t.type!==`NewExpression`||!HO(t.callee,`Instance`))return;let[n]=t.arguments;if(!(n===void 0||n.type===`SpreadElement`||!ge(n)))return n.value}function QO(e){return Array.isArray(e)}function $O(e){return t.isObject(e)}function ek(e,t,n=new WeakSet){if(QO(e)){for(let r of e)if(ek(r,t,n))return!0;return!1}if(!$O(e)||n.has(e))return!1;if(n.add(e),e.type===`Identifier`&&e.name===t)return!0;for(let r of Object.values(e))if(ek(r,t,n))return!0;return!1}function tk(e){let t=[],n=e;for(;n.type===`MemberExpression`;){if(n.computed||n.property.type!==`Identifier`)return;t.unshift(n.property.name);let{object:e}=n;if(e.type===`Identifier`)return t.unshift(e.name),t;if(e.type!==`MemberExpression`)return;n=e}if(n.type===`Identifier`)return t.unshift(n.name),t}function nk(e){let t=tk(e);return t?.length===2&&t[0]===`math`&&t[1]===`huge`}function rk(e){return e===`inf`?1/0:e===`-inf`?-1/0:e}function ik(e,t){return rk(e)===t}function ak(e,t){if(e.length!==t.length)return!1;for(let[n,r]of e.entries()){let e=t[n];if(e===void 0||!ik(r,e))return!1}return!0}function $(e){if(Be(e))return e.value;if(nk(e))return 1/0;if(e.type!==`UnaryExpression`||e.operator!==`+`&&e.operator!==`-`)return;let t=$(e.argument);if(t!==void 0)return e.operator===`+`?t:-t}function ok(e){if(e.length!==2)return;let[t,n]=e;if(t!==void 0&&n!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`)return[t,n]}function sk(e){if(e.length!==3)return;let[t,n,r]=e;if(t!==void 0&&n!==void 0&&r!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`&&r.type!==`SpreadElement`)return[t,n,r]}function ck(e){if(e.length!==4)return;let[t,n,r,i]=e;if(t!==void 0&&n!==void 0&&r!==void 0&&i!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`&&r.type!==`SpreadElement`&&i.type!==`SpreadElement`)return[t,n,r,i]}function lk(e,t,n,r){if(e.type===`MemberExpression`){let r=tk(e);return r?.length===2&&r[0]===t&&r[1]===`zero`?n:void 0}if(!(e.type!==`NewExpression`||!HO(e.callee,t)))return e.arguments.length===0?n:r(e.arguments)}function uk(e){return lk(e,`Vector2`,[0,0],dk)}function dk(e){let t=ok(e);if(t===void 0)return;let[n,r]=t,i=$(n),a=$(r);if(i!==void 0&&a!==void 0)return[i,a]}function fk(e){let t=sk(e);if(t===void 0)return;let[n,r,i]=t,a=$(n),o=$(r),s=$(i);if(a!==void 0&&o!==void 0&&s!==void 0)return[a,o,s]}function pk(e){return lk(e,`Vector3`,[0,0,0],fk)}function mk(e){if(!(e.type!==`NewExpression`||!HO(e.callee,`UDim`)))return e.arguments.length===0?[0,0]:dk(e.arguments)}function hk(e){let t=ck(e);if(t===void 0)return;let[n,r,i,a]=t,o=$(n),s=$(r),c=$(i),l=$(a);if(o!==void 0&&s!==void 0&&c!==void 0&&l!==void 0)return[o,s,c,l]}function gk(e){if(e.type===`CallExpression`){let t=tk(e.callee),n=dk(e.arguments);if(t===void 0||n===void 0)return;let[r,i]=n;return t.length===2&&t[0]===`UDim2`&&t[1]===`fromOffset`?[0,r,0,i]:t.length===2&&t[0]===`UDim2`&&t[1]===`fromScale`?[r,0,i,0]:void 0}if(!(e.type!==`NewExpression`||!HO(e.callee,`UDim2`)))return e.arguments.length===0?[0,0,0,0]:hk(e.arguments)}function _k(e){if(!(e.type!==`NewExpression`||!HO(e.callee,`Rect`)))return e.arguments.length===0?[0,0,0,0]:hk(e.arguments)}function vk(e){let[t,n,r]=e,i=$(t),a=$(n),o=$(r);if(i!==void 0&&a!==void 0&&o!==void 0)return[i,a,o]}function yk(e){if(e.type===`CallExpression`){let t=tk(e.callee),n=sk(e.arguments);if(n===void 0||t?.length!==2||t[0]!==`Color3`||t[1]!==`fromRGB`)return;let r=vk(n);if(r===void 0)return;let[i,a,o]=r;return[Math.fround(i/255),Math.fround(a/255),Math.fround(o/255)]}if(e.type!==`NewExpression`||!HO(e.callee,`Color3`))return;if(e.arguments.length===0)return[0,0,0];let t=sk(e.arguments);if(t!==void 0)return vk(t)}function bk(e){if(e.type!==`NewExpression`||!HO(e.callee,`CFrame`))return;if(e.arguments.length===0)return[0,0,0,1,0,0,0,1,0,0,0,1];let t=fk(e.arguments);if(t===void 0)return;let[n,r,i]=t;return[n,r,i,1,0,0,0,1,0,0,0,1]}function xk(e){let t=tk(e);if(t?.length!==3||t[0]!==`Enum`)return;let[,n,r]=t;if(n!==void 0&&r!==void 0)return{enumType:n,value:r}}function Sk(e,t){switch(t.type){case`bool`:return UO(e)&&e.value===t.value;case`CFrame`:{let n=bk(e);return n!==void 0&&ak(t.value,n)}case`Color3`:{let n=yk(e);return n!==void 0&&n[0]===t.value[0]&&n[1]===t.value[1]&&n[2]===t.value[2]}case`Enum`:{let n=xk(e);return n!==void 0&&n.enumType===t.enumType&&n.value===t.value}case`number`:{let n=$(e);return n!==void 0&&ik(t.value,n)}case`Rect`:{let n=_k(e);return n!==void 0&&ak(t.value,n)}case`string`:return ge(e)&&e.value===t.value;case`UDim`:{let n=mk(e);return n!==void 0&&ak(t.value,n)}case`UDim2`:{let n=gk(e);return n!==void 0&&ak(t.value,n)}case`Vector2`:{let n=uk(e);return n!==void 0&&ak(t.value,n)}case`Vector3`:{let n=pk(e);return n!==void 0&&ak(t.value,n)}default:return!1}}const Ck=y(`no-useless-default`,`roblox`,{create(e){let{sourceCode:t}=e;function n(e){return t.getCommentsBefore(e).length>0||t.getCommentsAfter(e).length>0||t.getCommentsInside(e).length>0}function r(e){let r=t.getTokenBefore(e),i=t.getTokenAfter(e);if(n(e)||r!==null&&t.commentsExistBetween(r,e)||i!==null&&t.commentsExistBetween(e,i))return;let[a]=e.range;for(;a>0;){let e=t.text[a-1];if(e===` `||e===` `){--a;continue}break}return t=>t.removeRange([a,e.range[1]])}function i(e,r){if(e.attributes.some(e=>e.type===`JSXSpreadAttribute`))return;let i=t.getTokenBefore(r);if(i===null||n(r)||t.commentsExistBetween(i,r))return;let a=t.getTokenAfter(r);if(!(a!==null&&t.commentsExistBetween(r,a)))return e=>e.removeRange([i.range[1],r.range[1]])}function a(t,n,i){if(n.operator!==`=`||n.left.type!==`MemberExpression`||n.left.computed||n.left.object.type!==`Identifier`||n.left.property.type!==`Identifier`)return;let a=i.get(n.left.object.name);if(a===void 0)return;let o=n.left.property.name;if(JO(o))return;let s=qO(a.className,o);if(s===void 0||!Sk(n.right,s.value))return;let c=r(t);if(c===void 0){e.report({data:{className:a.className,propertyName:s.propertyName},messageId:`uselessDefault`,node:n.left});return}e.report({data:{className:a.className,propertyName:s.propertyName},fix:c,messageId:`uselessDefault`,node:n.left})}function o(e,t){for(let[n]of t)for(let r of e.arguments)if(r.type!==`SpreadElement`&&ek(r,n)){t.delete(n);break}}function s(e,t){if(e.left.type===`Identifier`||e.left.type===`MemberExpression`)for(let[n]of t)ek(e.right,n)&&t.delete(n)}function c(e,t){if(e.argument!==null)for(let[n]of t)ek(e.argument,n)&&t.delete(n)}function l(e){let t=new Map;for(let n of e)u(n,t)}function u(e,t){if(e.type===`ExpressionStatement`){d(e,t);return}if(e.type===`ReturnStatement`){c(e,t);return}e.type===`VariableDeclaration`&&f(e,t)}function d(e,t){let n=m(e.expression);if(n.type===`AssignmentExpression`){a(e,n,t),s(n,t);return}n.type===`CallExpression`&&o(n,t)}function f(e,t){if(e.kind===`const`)for(let n of e.declarations){if(n.id.type!==`Identifier`||n.init===null)continue;let e=ZO(n.init);e!==void 0&&t.set(n.id.name,{className:e})}}return{BlockStatement(e){l(e.body)},JSXOpeningElement(t){let n=WO(t.name);if(n!==void 0)for(let r of t.attributes){if(r.type===`JSXSpreadAttribute`)continue;let a=GO(r.name);if(a===void 0||JO(a))continue;let o=qO(n,a);if(o===void 0)continue;let s=KO(r);if(!(r.value===null&&o.value.type===`bool`&&o.value.value)&&(s===void 0||!Sk(s,o.value)))continue;let c=i(t,r);if(c===void 0){e.report({data:{className:n,propertyName:o.propertyName},messageId:`uselessDefault`,node:r});continue}e.report({data:{className:n,propertyName:o.propertyName},fix:c,messageId:`uselessDefault`,node:r})}},Program(e){l(e.body)}}},meta:{docs:{description:`Disallow Roblox JSX properties whose values already match the class defaults.`},fixable:`code`,messages:{uselessDefault:`Remove "{{propertyName}}" from {{className}}. It already matches the default value.`},schema:[],type:`suggestion`}}),wk=ws({name:`warn`,alternative:`Log`,category:`roblox`,message:`{{name}}() is a raw output function lacking log levels, timestamps, and filtering. Production systems require structured logging for debugging and monitoring. Replace {{name}}(...) with {{alternative}}.`,messageId:`noWarn`,ruleName:`no-warn`});function Tk({type:e}){return e===`Identifier`||e===`MemberExpression`||e===`CallExpression`||e===`NewExpression`||e===`ThisExpression`}function Ek(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function Dk(e){return m(e).type===`Literal`}function Ok(e){let n=m(e);if(n.type!==`Literal`||!t.isNumber(n.value))return;let{value:r}=n;if(r<=0||r>=1)return;let i=1/r;return Number.isInteger(i)?i:void 0}function kk(e,t){let n=e.getText(Ek(t));return Tk(m(t))?n:`(${n})`}const Ak=y(`prefer-idiv`,`roblox`,{createOnce(e){return{CallExpression(t){if(t.optional)return;let n=m(t.callee);if(n.type!==`MemberExpression`||n.optional||g(n)!==`floor`)return;let r=m(n.object);if(r.type!==`Identifier`||r.name!==`math`||v(e.sourceCode,r,`math`)||t.arguments.length!==1)return;let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`)return;let a=m(i);if(a.type!==`BinaryExpression`)return;let o,s;if(a.operator===`/`)o=a.left,s=e.sourceCode.getText(Ek(a.right));else if(a.operator===`*`){let e=Ok(a.right);if(e!==void 0&&!Dk(a.left))o=a.left,s=String(e);else{let e=Ok(a.left);if(e===void 0||Dk(a.right))return;o=a.right,s=String(e)}}else return;e.report({fix:n=>n.replaceText(t,`${kk(e.sourceCode,o)}.idiv(${s})`),messageId:`useIdiv`,node:t})}}},meta:{docs:{description:`Prefer .idiv() for integer division instead of math.floor(x / y) or math.floor(x * 0.5).`,recommended:!0},fixable:`code`,messages:{useIdiv:`Use .idiv() instead of math.floor(x / y) or math.floor(x * 0.5) for integer division.`},schema:[],type:`suggestion`}});function jk(e){if(e===void 0)return!1;let t=e;for(;t.type===`TSTypeAnnotation`;)t=t.typeAnnotation;return t.type===`TSNumberKeyword`||t.type===`TSTypeReference`&&t.typeName.type===`Identifier`&&t.typeName.name===`Number`}function Mk(e){return e.type!==`PrivateIdentifier`}function Nk(e){let n=m(e);return n.type===`Literal`&&!t.isNumber(n.value)}function Pk(e){if(e.type===`Parameter`){let t=e.name;if(t.typeAnnotation!==void 0&&t.typeAnnotation!==null)return!jk(t.typeAnnotation);let{parent:n}=t;return n.type===`AssignmentPattern`&&Nk(n.right)}if(e.type!==`Variable`||e.node.type!==`VariableDeclarator`)return!1;let{id:t,init:n}=e.node;return t.type===`Identifier`&&t.typeAnnotation!==void 0&&t.typeAnnotation!==null?!jk(t.typeAnnotation):n!==null&&Nk(n)}function Fk(e,t){let n=_(e.getScope(t),t.name);if(n===void 0)return!1;for(let e of n.defs)if(Pk(e))return!0;return!1}function Ik(e,t){let n=t;for(;n.type===`ParenthesizedExpression`;)n=n.expression;if(n.type===`TSAsExpression`||n.type===`TSTypeAssertion`)return!jk(n.typeAnnotation);if(Nk(n))return!0;let r=m(n);return r.type===`Identifier`&&Fk(e,r)}function Lk(e,t){return e.getText(m(t))}function Rk(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function zk(e,t){let n=Rk(t);return n.type===`SequenceExpression`?`(${e.getText(n)})`:e.getText(n)}function Bk(e,t){if(t.test.type!==`BinaryExpression`)return;let{alternate:n,consequent:r,test:i}=t,{left:a,operator:o,right:s}=i;if(!Mk(a)||!Mk(s)||!Z(a)||!Z(s)||Ik(e,a)||Ik(e,s))return;let c=Lk(e,a),l=Lk(e,s),u=Lk(e,n),d=Lk(e,r),f=o===`>`||o===`>=`,p=o===`<`||o===`<=`;if(f&&c===u&&l===d||p&&c===d&&l===u)return`min`;if(f&&c===d&&l===u||p&&c===u&&l===d)return`max`}const Vk=y(`prefer-math-min-max`,`roblox`,{create(e){let{sourceCode:t}=e;return{ConditionalExpression(n){if(v(t,n,`math`))return;let r=Bk(t,n);if(r===void 0||n.test.type!==`BinaryExpression`)return;let{left:i,right:a}=n.test;if(!Mk(i)||!Mk(a))return;let o=zk(t,i),s=zk(t,a);e.report({fix(e){return e.replaceText(n,`math.${r}(${o}, ${s})`)},messageId:`preferMathMethod`,node:n})}}},meta:{docs:{description:`Prefer math.min() and math.max() over simple clamp-like ternaries.`,recommended:!0},fixable:`code`,messages:{preferMathMethod:"Use `math.min()` or `math.max()` instead of this ternary comparison."},schema:[],type:`suggestion`}}),Hk=new Set([`ReadonlyRecord`,`Record`]);function Uk(e){return e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&Hk.has(e.typeName.name)}function Wk(e){if(e.id.type!==`Identifier`)return;let t=oe(e.id);if(t===void 0)return;let{typeAnnotation:n}=t;if(!Uk(n))return;let{typeArguments:r}=n;if(r?.params.length!==2)return;let[i,a]=r.params;if(i!==void 0&&a!==void 0&&a.type===`TSLiteralType`&&a.literal.type===`Literal`&&a.literal.value===!0)return i}function Gk(e){if(e?.type!==`ObjectExpression`)return!1;for(let t of e.properties)if(t.type!==`Property`||t.value.type!==`Literal`||t.value.value!==!0)return!1;return!0}const Kk=y(`prefer-modding-inspect`,`roblox`,{create(e){let{sourceCode:t}=e;return{VariableDeclarator(n){if(n.id.type!==`Identifier`)return;let r=n.id.name;if(!Gk(n.init))return;let i=Wk(n);if(i===void 0)return;let a=t.getText(i);e.report({data:{enumType:a},fix(e){return e.replaceTextRange([n.range[0],n.range[1]],`${r} = Modding.inspect<Record<${a}, true>>()`)},messageId:`preferModdingInspect`,node:n.id})}}},meta:{docs:{description:`Prefer Modding.inspect over manually enumerating every enum member in a Record<Enum, true>.`,recommended:!0},fixable:`code`,messages:{preferModdingInspect:`Replace manual {{enumType}} enumeration with Modding.inspect<Record<{{enumType}}, true>>().`},schema:[],type:`suggestion`}});function qk(e,t){return Be(e)&&e.value===t}function Jk(e){if(e===`ColorSequence`)return`ColorSequenceKeypoint`;if(e===`NumberSequence`)return`NumberSequenceKeypoint`}function Yk(e,t,n){if(e.type!==`NewExpression`||!Ne(e,t)||e.arguments.length!==2)return;let[r,i]=e.arguments;if(r!==void 0&&r.type!==`SpreadElement`&&i!==void 0&&i.type!==`SpreadElement`)return qk(r,n)?i:void 0}function Xk(e,t,n){if(t.arguments.length!==2)return;let[r,i]=t.arguments;if(r===void 0||r.type===`SpreadElement`||i===void 0||i.type===`SpreadElement`)return;let a=e.sourceCode.getText(r);if(a===e.sourceCode.getText(i))return{messageId:`preferSingleOverload`,replacement:`new ${n}(${a})`}}function Zk(e,t,n,r){if(t.arguments.length!==1)return;let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`||i.type!==`ArrayExpression`||i.elements.length!==2)return;let[a,o]=i.elements;if(a===void 0||o===void 0||a===null||o===null||a.type===`SpreadElement`||o.type===`SpreadElement`)return;let s=Yk(a,r,0),c=Yk(o,r,1);if(s===void 0||c===void 0)return;let l=e.sourceCode.getText(s),u=e.sourceCode.getText(c);return{messageId:l===u?`preferSingleOverload`:`preferTwoPointOverload`,replacement:l===u?`new ${n}(${l})`:`new ${n}(${l}, ${u})`}}const Qk=y(`prefer-sequence-overloads`,`roblox`,{createOnce(e){return{NewExpression(t){if(t.callee.type!==`Identifier`)return;let n=t.callee.name,r=Jk(n);if(r===void 0)return;let i=Xk(e,t,n)??Zk(e,t,n,r);i!==void 0&&e.report({fix:e=>e.replaceText(t,i.replacement),messageId:i.messageId,node:t})}}},meta:{docs:{description:`Prefer direct ColorSequence and NumberSequence overloads over identical direct arguments and two-keypoint arrays.`,recommended:!0},fixable:`code`,messages:{preferSingleOverload:`Use the single-value sequence overload instead of two identical keypoints.`,preferTwoPointOverload:`Use the two-value sequence overload instead of constructing a two-keypoint array.`},schema:[],type:`suggestion`}});function $k(e){return e.length===2}function eA(e){return e.type===`MemberExpression`&&!e.computed}function tA(e,t){if(e.type!==`CallExpression`)return!1;let{callee:n}=e;if(!eA(n)||n.property.name!==t||!$k(e.arguments))return!1;let[r,i]=e.arguments;return r.type!==`SpreadElement`&&i.type!==`SpreadElement`}function nA(e,t){if(e.declarations.length!==1)return;let[n]=e.declarations;if(n===void 0)return;let{id:r,init:i}=n;if(i===null||r.type!==`Identifier`||!tA(i,t))return;let{callee:a}=i;if(!eA(a))return;let[o,s]=i.arguments;if(o!==void 0&&s!==void 0&&o.type!==`SpreadElement`&&s.type!==`SpreadElement`)return{componentNode:s,entityNode:o,node:i,queryType:t,variableDeclaration:e,variableDeclarator:n,variableName:r.name,worldNode:a.object}}const rA=new Set([`ConditionalExpression`,`DoWhileStatement`,`ForStatement`,`IfStatement`,`WhileStatement`]);function iA(e){return t.isObject(e)&&`parent`in e}function aA(e){return t.isObject(e)&&t.isString(e.type)?e.type:void 0}function oA(e){return t.isObject(e)&&t.isString(e.operator)?e.operator:void 0}function sA(e){return aA(e)===`LogicalExpression`&&oA(e)===`&&`}function cA(e){return t.isObject(e)&&e.type===`Identifier`&&t.isString(e.name)}function lA(e){let{parent:t}=e;if(sA(t))return!0;let n=aA(t);if(n===void 0||!rA.has(n))return!1;let r=e;for(;r!==t&&iA(r);){let e=r.parent;if(sA(e))return!0;r=e}return!1}function uA(e){if(e.isWrite())return!1;let{identifier:t}=e;return cA(t)?lA(t):!1}function dA(e,t,n){return _(n.getScope(t),e)?.references.some(uA)??!1}function fA(e,t){return e.every(e=>dA(e.variableName,e.variableDeclaration,t))}const pA=/^[\s;]*$/u;function mA(e,t,n){if(e===void 0)return!0;if(n.getText(e.worldNode)!==n.getText(t.worldNode)||n.getText(e.entityNode)!==n.getText(t.entityNode)||e.queryType!==t.queryType)return!1;let[,r]=e.variableDeclaration.range,[i]=t.variableDeclaration.range,a=n.text.slice(r,i);return pA.test(a)}function hA(e,t){if(e.length<2)return;let[n]=e;if(n===void 0)return;let{sourceCode:r}=t,i=r.getText(n.worldNode),a=r.getText(n.entityNode),o=e.map(e=>e.variableName),s=e.map(e=>r.getText(e.componentNode));gA(e,t,`const ${o.length===1?o[0]:`[${o.join(`, `)}]`} = ${i}.get(${a}, ${s.join(`, `)});`,`preferSingleGet`,n)}function gA(e,t,n,r,i){let a=e.at(0)?.variableDeclaration,o=e.at(-1)?.variableDeclaration;a!==void 0&&o!==void 0&&t.report({data:{fixedCode:n},fix(e){let[t]=a.range,[,r]=o.range;return e.replaceTextRange([t,r],n)},messageId:r,node:i.node})}function _A(e,t){if(e.length<2)return;let{sourceCode:n}=t;if(!fA(e,n))return;let[r]=e;r!==void 0&&gA(e,t,`const hasAll = ${n.getText(r.worldNode)}.has(${n.getText(r.entityNode)}, ${e.map(e=>n.getText(e.componentNode)).join(`, `)});`,`preferSingleHas`,r)}const vA=y(`prefer-single-world-query`,`roblox`,{create(e){let{sourceCode:t}=e,n=[],r=[];function i(){n.length>=2&&hA(n,e),n=[]}function a(){r.length>=2&&_A(r,e),r=[]}function o(){i(),a()}return{":statement:not(VariableDeclaration[kind='const'])":o,"Program:exit":o,"VariableDeclaration[kind='const']"(e){let s=nA(e,`get`);if(s!==void 0){let e=n.at(-1);e!==void 0&&!mA(e,s,t)&&i(),n.push(s),a();return}let c=nA(e,`has`);if(c!==void 0){let e=r.at(-1);e!==void 0&&!mA(e,c,t)&&a(),r.push(c),i();return}o()}}},meta:{docs:{description:`Enforce combining multiple world.get() or world.has() calls into a single call for better Jecs performance.`},fixable:`code`,messages:{preferSingleGet:`Multiple world.get() calls on the same entity should be combined into a single call for better performance. Suggested fix: {{fixedCode}}`,preferSingleHas:`Multiple world.has() calls on the same entity should be combined into a single call for better performance. Suggested fix: {{fixedCode}}`},schema:[],type:`suggestion`}});function yA(e){return e.type===`PrivateIdentifier`}function bA(e){return e===`+`||e===`-`||e===`*`||e===`/`||e===`%`}function xA(e){return e.type===`BinaryExpression`&&bA(e.operator)&&!yA(e.left)&&!yA(e.right)}function SA(e){switch(e.type){case`BinaryExpression`:{if(!xA(e))return;let{left:t,right:n}=e,r=SA(t),i=SA(n);return r===void 0||i===void 0?void 0:`${r} ${e.operator} ${i}`}case`Identifier`:return e.name;case`Literal`:return Di(e.value)?String(e.value):void 0;case`UnaryExpression`:{let t=SA(e.argument);return t===void 0||e.operator!==`+`&&e.operator!==`-`?void 0:`${e.operator}${t}`}default:return}}function CA(e,t,n){switch(e){case`%`:return n===0?void 0:t%n;case`*`:return t*n;case`+`:return t+n;case`-`:return t-n;case`/`:return n===0?void 0:t/n;default:return}}function wA(e){switch(e.type){case`BinaryExpression`:{if(!xA(e))return;let{left:t,right:n}=e,r=wA(t),i=wA(n);return r===void 0||i===void 0?void 0:CA(e.operator,r,i)}case`Identifier`:return;case`Literal`:return Number(e.value);case`UnaryExpression`:{let t=wA(e.argument);return t===void 0?void 0:e.operator===`+`?t:e.operator===`-`?-t:void 0}default:return}}function TA(e){if(e.length!==4)return;let[t,n,r,i]=e;if(t===void 0||n===void 0||r===void 0||i===void 0||t.type===`SpreadElement`||n.type===`SpreadElement`||r.type===`SpreadElement`||i.type===`SpreadElement`)return;let a=SA(t),o=SA(n),s=SA(r),c=SA(i);if(a!==void 0&&o!==void 0&&s!==void 0&&c!==void 0)return{offsetXText:o,offsetYText:c,scaleXText:a,scaleYText:s}}const EA=y(`prefer-udim2-shorthand`,`roblox`,{create(e){return{NewExpression(t){if(!Ne(t,`UDim2`))return;let n=TA(t.arguments);if(n===void 0)return;let[r,i,a,o]=t.arguments;if(r===void 0||i===void 0||a===void 0||o===void 0||r.type===`SpreadElement`||i.type===`SpreadElement`||a.type===`SpreadElement`||o.type===`SpreadElement`)return;let s=wA(r),c=wA(i),l=wA(a),u=wA(o);if(s!==0||c!==0||l!==0||u!==0){if(c===0&&u===0){e.report({fix(e){return e.replaceText(t,`UDim2.fromScale(${n.scaleXText}, ${n.scaleYText})`)},messageId:`preferFromScale`,node:t});return}s===0&&l===0&&e.report({fix(e){return e.replaceText(t,`UDim2.fromOffset(${n.offsetXText}, ${n.offsetYText})`)},messageId:`preferFromOffset`,node:t})}}}},meta:{docs:{description:`Prefer UDim2.fromScale() or UDim2.fromOffset() over new UDim2() when all offsets or all scales are zero.`},fixable:`code`,messages:{preferFromOffset:`Use UDim2.fromOffset() instead of new UDim2() when all scales are 0.`,preferFromScale:`Use UDim2.fromScale() instead of new UDim2() when all offsets are 0.`},schema:[],type:`suggestion`}}),DA=s({classes:id}).readonly();function OA(e){if(!DA.allows(e))return new Map;let n=new Map;for(let[r,i]of Object.entries(e.classes))t.isString(i)&&n.set(r,i);return n}function kA(e){return e?.type===`module`||e?.type===`global`}function AA(e){if(e.type===`ImportDefaultSpecifier`)return e.local.name;if(e.type===`ImportSpecifier`){if(e.imported.type===`Identifier`)return e.imported.name;if(t.isString(e.imported.value))return e.imported.value}}function jA(e,t,n){if(e.callee.type===`Identifier`){let r=t.get(e.callee.name);if(r===void 0)return;let i=n.get(r);return i===void 0?void 0:{className:r,importSource:i}}if(e.callee.type===`MemberExpression`&&e.callee.property.type===`Identifier`){let t=e.callee.property.name,r=n.get(t);return r===void 0?void 0:{className:t,importSource:r}}}function MA(e,n,r){if(!t.isString(e.source.value))return;let i=e.source.value;for(let[t,a]of n)if(a===i)for(let n of e.specifiers)AA(n)===t&&r.set(n.local.name,t)}const NA=y(`require-module-level-instantiation`,`roblox`,{create(e){let{sourceCode:t}=e,n=OA(e.options[0]);if(n.size===0)return{};let r=new Map;return{ImportDeclaration(e){MA(e,n,r)},NewExpression(i){let a=jA(i,r,n);a===void 0||kA(t.getScope(i))||e.report({data:{className:a.className,importSource:a.importSource},messageId:`mustBeModuleLevel`,node:i})}}},meta:{docs:{description:`Require configured classes to be instantiated at module level only.`},messages:{mustBeModuleLevel:`'{{className}}' from '{{importSource}}' must be instantiated at module level only.`},schema:[{additionalProperties:!1,properties:{classes:{additionalProperties:{type:`string`},description:`Class names mapped to the import source that must be instantiated at module scope.`,type:`object`}},type:`object`}],type:`problem`}}),PA=e({meta:{name:`small-rules`},rules:{"array-type-generic":Vd,"ban-instances":jT,"ban-react-fc":Rm,"ban-types":Gd,"consistent-compound-words":cf,"directive-disable-enable-pair":hi,"directive-no-aggregating-enable":gi,"directive-no-duplicate-disable":_i,"directive-no-restricted-disable":vi,"directive-no-unlimited-disable":yi,"directive-no-unused-enable":bi,"directive-no-use":xi,"directive-require-description":wi,"enforce-ianitor-check-type":HT,"isolated-functions":sa,"memoized-effect-dependencies":fh,"no-adjust-state-on-prop-change":Og,"no-array-constructor-elements":yE,"no-array-constructor-index-assignment":kE,"no-array-size-assignment":RE,"no-async-constructor":Ma,"no-async-in-system":_D,"no-cascading-set-state":Ag,"no-chain-state-updates":Mg,"no-chained-type-assertions":ot,"no-color3-constructor":xD,"no-commented-code":xo,"no-conditional-empty-object-spread":ct,"no-constant-condition-with-break":Yo,"no-dead-store":Cs,"no-derived-state":Pg,"no-error":Ts,"no-event-handler":Ig,"no-events-in-events-callback":VD,"no-external-store-subscription":Vg,"no-filter-map-chain":Es,"no-floating-point-equality":Qs,"no-giant-component":r_,"no-god-components":p_,"no-ianitor-in-function-body":UD,"no-ianitor-success-access":YD,"no-identity-map":sc,"no-increment-decrement":uc,"no-initialize-state":h_,"no-inline-property-on-memo-component":v_,"no-instance-methods-without-this":rO,"no-known-value-widening":on,"no-loop-iterable-mutation":wc,"no-module-mocking":fn,"no-native-properties-spread":uO,"no-new-instance-in-use-memo":N_,"no-object-parameters":wn,"no-pass-data-to-parent":L_,"no-pass-live-state-to-parent":U_,"no-print":dO,"no-recursive":Dc,"no-redundant-aspect-ratio-constraint":wO,"no-reflect-apply":On,"no-reflect-get":kn,"no-render-helper-functions":cv,"no-reset-all-state-on-prop-change":lv,"no-restricted-property-assignment":Rc,"no-runtime-typeof":Mn,"no-shape-in-symbol-names":Pn,"no-spec-file-extension":uf,"no-static-react-create-element":Cv,"no-table-create-map":DO,"no-task-wait":kO,"no-trivial-assertions":ul,"no-underscore-react-props":wv,"no-unknown-parameters":zn,"no-unknown-returns":Wn,"no-unknown-type-aliases":qn,"no-unsafe-dictionary-type":Xn,"no-unused-imports":bl,"no-unused-use-memo":Tv,"no-use-memo-simple-expression":Dv,"no-use-of-empty-return-value":wl,"no-useless-constants":ou,"no-useless-default":Ck,"no-useless-use-effect":ib,"no-useless-use-memo":ub,"no-useless-use-spring":vb,"no-variadic-spread":du,"no-warn":wk,"no-widen-then-assert":Sr,"only-type-imports":fu,"prefer-class-properties":bu,"prefer-constant-dispatch":Ob,"prefer-context-stack":mx,"prefer-direct-hook-imports":vx,"prefer-early-return":Tu,"prefer-expect-assertions":Xu,"prefer-hoisted-jsx-elements":Ix,"prefer-hoisted-jsx-object-properties":Wx,"prefer-idiv":Ak,"prefer-local-portal-component":tS,"prefer-math-min-max":Vk,"prefer-modding-inspect":Kk,"prefer-module-scope-constants":$u,"prefer-padding-components":yS,"prefer-pascal-case-enums":xf,"prefer-sequence-overloads":Qk,"prefer-single-world-query":vA,"prefer-singular-enums":Pf,"prefer-ternary-conditional-rendering":IS,"prefer-udim2-shorthand":EA,"prefer-use-reducer":RS,"prevent-abbreviations":Mm,"react-hooks-strict-return":tC,"require-async-suffix":Pm,"require-module-level-instantiation":NA,"require-named-effect-functions":cC,"require-paired-calls":bd,"require-react-component-keys":FC,"require-react-display-names":WC,"require-safety-comment-for-type-assertion":Nr,"require-switch-case-braces":Cd,"require-throw-error-capture":Nd,"require-unicode-regex":Rd,"rerender-memo-with-default-value":ZC,"strict-component-boundaries":sw,"use-exhaustive-dependencies":uT,"use-hook-at-top-level":CT}});export{PA as default};
95
+ `&&--h;break}return l.push(e.removeRange([h,p])),l}const AE=b(`no-array-constructor-index-assignment`,`roblox`,{create(e){let{sourceCode:t}=e;function n(n){let r=0;for(;r<n.length;){let i=OE(t,n,r);if(i===void 0){r+=1;continue}e.report({fix(e){return kE(e,t,i)},messageId:`preferArrayLiteral`,node:i.declaration}),r=n.indexOf(i.lastAssignmentStatement)+1}}function r(e){n(e.body)}return{BlockStatement:r,Program:r}},meta:{docs:{description:`Disallow new Array<T>() followed by contiguous index assignments; use an array literal instead.`},fixable:`code`,messages:{preferArrayLiteral:`Use an array literal instead of new Array<T>() followed by index assignments.`},schema:[],type:`suggestion`}});function jE(e,t,n){if(e.type!==t.type)return!1;switch(e.type){case`CallExpression`:return t.type===`CallExpression`&&n.getText(e)===n.getText(t);case`Identifier`:return t.type===`Identifier`&&e.name===t.name;case`Literal`:return t.type===`Literal`&&e.value===t.value&&e.raw===t.raw;case`MemberExpression`:return t.type===`MemberExpression`&&ME(e,t,n);case`Super`:return t.type===`Super`;case`ThisExpression`:return t.type===`ThisExpression`;default:return!1}}function ME(e,t,n){return e.computed!==t.computed||e.optional!==t.optional||!jE(e.object,t.object,n)?!1:e.computed?NE(e.property,t.property,n):PE(e.property,t.property)}function NE(e,t,n){return Qe(e)&&Qe(t)&&jE(e,t,n)}function PE(e,t){return e.type===`PrivateIdentifier`||t.type===`PrivateIdentifier`?e.type===`PrivateIdentifier`&&t.type===`PrivateIdentifier`&&e.name===t.name:t.type===`Identifier`&&e.type===`Identifier`&&e.name===t.name}function FE(e,t){switch(e.type){case`Identifier`:case`ThisExpression`:return!0;case`Literal`:return t;case`MemberExpression`:return e.optional||!FE(e.object,!1)?!1:e.computed?Qe(e.property)?FE(e.property,!0):!1:e.property.type===`Identifier`||e.property.type===`PrivateIdentifier`;default:return!1}}function IE(e){return FE(e,!1)}function LE(e){return e.type!==`CallExpression`||e.optional||e.arguments.length>0||e.callee.type!==`MemberExpression`||e.callee.optional||e.callee.computed||e.callee.property.type!==`Identifier`?!1:e.callee.property.name===`size`}function RE(e,t,n){if(!(e.operator!==`=`||e.left.type!==`MemberExpression`||!e.left.computed)){if(n===`roblox-ts`&&LE(e.left.property))return jE(e.left.object,e.left.property.callee.object,t)?e.left:void 0;if(n===`standard`){let{property:n}=e.left;if(n.type===`MemberExpression`&&!n.optional&&!n.computed&&n.property.type===`Identifier`&&n.property.name===`length`)return jE(e.left.object,n.object,t)?e.left:void 0}}}const zE=b(`no-array-size-assignment`,`roblox`,{create(e){let[t]=e.options,n=cc(t)&&t.allowAutofix,r=t?.environment===`standard`?`standard`:`roblox-ts`,{sourceCode:i}=e;return{AssignmentExpression(t){let a=RE(t,i,r);if(a===void 0)return;let o=t.parent.type===`ExpressionStatement`?t.parent:void 0;if(!(n&&o!==void 0&&IE(a.object))){e.report({messageId:`usePush`,node:t});return}let s=i.getText(a.object),c=i.getText(t.right);e.report({fix(e){return e.replaceText(o,`${s}.push(${c});`)},messageId:`usePush`,node:t})}}},meta:{docs:{description:`Disallow array append assignments using array[array.size()] = value (roblox-ts) or array[array.length] = value (standard) and prefer push-based appends.`},fixable:`code`,messages:{usePush:`Do not append with array[array.size()] = value or array[array.length] = value. Use array.push(value) instead.`},schema:[{additionalProperties:!1,properties:{allowAutofix:{default:!1,description:`Allow the fixer to replace safe append assignments with array.push(value).`,type:`boolean`},environment:{...zm,default:`roblox-ts`,description:`Array environment mode: 'roblox-ts' checks array[array.size()]; 'standard' checks array[array.length].`}},type:`object`}],type:`problem`}}),BE=new Map(`Accessory,AccessoryDescription,AccountService,Accoutrement,AchievementService,ActivityHistoryEventService,Actor,AdGui,AdPortal,AdService,AdvancedDragger,AirController,AlignOrientation,AlignPosition,AnalyticsService,AngularVelocity,Animation,AnimationClip,AnimationClipProvider,AnimationConstraint,AnimationController,AnimationFromVideoCreatorService,AnimationFromVideoCreatorStudioService,AnimationGraphDefinition,AnimationImportData,AnimationNode,AnimationNodeDefinition,AnimationRigData,AnimationStreamTrack,AnimationTrack,Animator,Annotation,AnnotationsService,AppAgeSignalsService,AppLifecycleObserverService,AppRatingPromptService,AppStorageService,AppUpdateService,ArcHandles,AssetCounterService,AssetDeliveryProxy,AssetImportService,AssetImportSession,AssetManagerService,AssetPatchSettings,AssetQualityService,AssetService,AssetSoundEffect,Atmosphere,AtmosphereSensor,Attachment,AudioAnalyzer,AudioChannelMixer,AudioChannelSplitter,AudioChorus,AudioCompressor,AudioDeviceInput,AudioDeviceOutput,AudioDistortion,AudioEcho,AudioEmitter,AudioEqualizer,AudioFader,AudioFilter,AudioFlanger,AudioFocusService,AudioGate,AudioLimiter,AudioListener,AudioPages,AudioPitchShifter,AudioPlayer,AudioRecorder,AudioReverb,AudioSearchParams,AudioSpeechToText,AudioTextToSpeech,AudioTremolo,AudioWindSynthesizer,AuroraScriptObject,AvatarAbilityRules,AvatarAccessoryRules,AvatarAnimationRules,AvatarBodyRules,AvatarChatService,AvatarClothingRules,AvatarCollisionRules,AvatarCreationService,AvatarEditorService,AvatarImportService,AvatarRules,AvatarSettings,Backpack,BackpackItem,BadgeService,BallSocketConstraint,BanHistoryPages,BaseCoreGuiConfiguration,BaseImportData,BasePart,BasePlayerGui,BaseRemoteEvent,BaseScript,BaseWrap,Beam,BevelMesh,BillboardGui,BinaryStringValue,BindableEvent,BindableFunction,BlockMesh,BloomEffect,BlurEffect,BodyAngularVelocity,BodyColors,BodyForce,BodyGyro,BodyMover,BodyPartDescription,BodyPosition,BodyThrust,BodyVelocity,Bone,BoolValue,BoxHandleAdornment,BranchService,Breakpoint,BrickColorValue,BrowserService,BubbleChatConfiguration,BubbleChatMessageProperties,BugReporterService,BulkImportService,BuoyancySensor,CFrameValue,CSGDictionaryService,CacheableContentProvider,CalloutService,Camera,CanvasGroup,Capture,CaptureService,CapturesPages,CapturesViewConfiguration,CatalogPages,ChangeHistoryService,ChangeHistoryStreamingService,ChannelSelectorSoundEffect,ChannelTabsConfiguration,CharacterAppearance,CharacterMesh,Chat,ChatInputBarConfiguration,ChatWindowConfiguration,ChatWindowMessageProperties,ChorusSoundEffect,ClickDetector,ClientReplicator,ClientStorageService,ClimbController,Clothing,CloudCRUDService,CloudExecutionService,CloudLocalizationTable,Clouds,ClusterPacketCache,Collaborator,CollaboratorsService,CollectionService,Color3Value,ColorCorrectionEffect,ColorGradingEffect,CommerceService,CompositeValueCurve,CompressorSoundEffect,ConeHandleAdornment,ConfigService,ConfigSnapshot,Configuration,ConfigureServerService,ConnectivityService,Constraint,ContentProvider,ContextActionService,Controller,ControllerBase,ControllerManager,ControllerPartSensor,ControllerSensor,ControllerService,CookiesService,CoreGui,CoreGuiConfiguration,CorePackages,CoreScript,CoreScriptDebuggingManagerHelper,CoreScriptSyncService,CornerWedgePart,CreationDBService,CreatorStoreService,CrossDMScriptChangeListener,CurveAnimation,CustomEvent,CustomEventReceiver,CustomLog,CustomSoundEffect,CylinderHandleAdornment,CylinderMesh,CylindricalConstraint,DataModel,DataModelDiff,DataModelMesh,DataModelPatchService,DataModelSession,DataStore,DataStoreGetOptions,DataStoreIncrementOptions,DataStoreInfo,DataStoreKey,DataStoreKeyInfo,DataStoreKeyPages,DataStoreListingPages,DataStoreObjectVersionInfo,DataStoreOptions,DataStorePages,DataStoreService,DataStoreSetOptions,DataStoreVersionPages,Debris,DebugSettings,DebuggablePluginWatcher,DebuggerBreakpoint,DebuggerConnection,DebuggerConnectionManager,DebuggerLuaResponse,DebuggerManager,DebuggerUIService,DebuggerVariable,DebuggerWatch,Decal,DeferredAssetManagerService,DepthOfFieldEffect,DesignFoundationsService,DeviceDisplayService,DeviceIdService,Dialog,DialogChoice,DigitsRigDescription,DisplayWakeLock,DistortionSoundEffect,DockWidgetPluginGui,DoubleConstrainedValue,DraftsService,DragDetector,Dragger,DraggerService,DynamicRotate,EchoSoundEffect,EditableImage,EditableMesh,EditableService,EditorSourceService,EncodingService,EqualizerSoundEffect,EulerRotationCurve,EventIngestService,ExampleV2Service,ExecutedRemoteCommand,ExperienceAuthService,ExperienceInviteOptions,ExperienceNotificationService,ExperienceService,ExperienceStateCaptureService,ExperienceStateRecordingService,ExplorerFilter,ExplorerFilterAutocompleter,ExplorerServiceVisibilityService,Explosion,FaceAnimatorService,FaceControls,FaceInstance,FacialAgeEstimationService,FacialAnimationRecordingService,FacialAnimationStreamingServiceStats,FacialAnimationStreamingServiceV2,FacialAnimationStreamingSubsessionStats,FacsImportData,Feature,FeatureRestrictionManager,File,FileManagerService,FileMesh,FileSyncReplicationService,Fire,Flag,FlagStand,FlagStandService,FlangeSoundEffect,FloatCurve,FloorWire,FluidForceSensor,FlyweightService,Folder,ForceField,FormFactorPart,Frame,FriendPages,FriendService,FunctionalTest,GamePassService,GameSettings,GamepadService,GeneratedFolder,GenerationService,GenericChallengeService,GenericSettings,Geometry,GeometryService,GetTextBoundsParams,GlobalDataStore,GlobalSettings,Glue,GongService,GroundController,GroupImportData,GroupService,GuiBase,GuiBase2d,GuiBase3d,GuiButton,GuiLabel,GuiMain,GuiObject,GuiService,GuidRegistryService,HSRDataContentProvider,HandleAdornment,Handles,HandlesBase,HapticEffect,HapticService,HarmonyService,Hat,HeapProfilerService,HeatmapQueryService,HeatmapService,HeightmapImporterService,HiddenSurfaceRemovalAsset,Highlight,HingeConstraint,Hint,Hole,Hopper,HopperBin,HttpRbxApiService,HttpRequest,HttpService,Humanoid,HumanoidController,HumanoidDescription,HumanoidRigDescription,IKControl,ILegacyStudioBridge,IXPService,ImageButton,ImageHandleAdornment,ImageLabel,ImageScreenCaptureService,ImportSession,IncrementalPatchBuilder,InputAction,InputActionLabel,InputBinding,InputContext,InputObject,InsertService,Instance,InstanceAdornment,InstanceExtensionsService,InstanceFileSyncService,IntConstrainedValue,IntValue,IntentService,InternalMessagingService,InternalMessagingServiceVerifier,IntersectOperation,InventoryPages,JointImportData,JointInstance,JointsService,KeyboardService,Keyframe,KeyframeMarker,KeyframeSequence,KeyframeSequenceProvider,LanguageService,LayerCollector,LegacyStudioBridge,Light,Lighting,LineForce,LineHandleAdornment,LinearVelocity,LinkingService,LiveScriptingService,LiveSyncService,LocalDebuggerConnection,LocalScript,LocalStorageService,LocalizationService,LocalizationTable,LodDataEntity,LodDataService,LogReporterService,LogService,Logger,LoginService,LuaSettings,LuaSourceContainer,LuaWebService,LuauExpression,LuauExpressionService,LuauScriptAnalyzerService,MLModelDeliveryService,MLService,MLSession,MakeupDescription,ManualGlue,ManualSurfaceJointInstance,ManualWeld,MarkerCurve,MarketplaceService,MatchmakingService,MaterialGenerationService,MaterialImportData,MaterialService,MaterialVariant,MemStorageConnection,MemStorageService,MemoryStoreDistributedCounter,MemoryStoreHashMap,MemoryStoreHashMapPages,MemoryStoreQueue,MemoryStoreService,MemoryStoreSortedMap,MeshContentProvider,MeshImportData,MeshPart,Message,MessageBusConnection,MessageBusService,MessagingService,MetaBreakpoint,MetaBreakpointContext,MetaBreakpointManager,MicroProfilerService,Model,ModerationService,ModuleScript,Motor,Motor6D,MotorFeature,Mouse,MouseService,MultipleDocumentInterfaceInstance,NegateOperation,NetworkClient,NetworkMarker,NetworkPeer,NetworkReplicator,NetworkServer,NetworkSettings,NoCollisionConstraint,Noise,NonReplicatedCSGDictionaryService,NotificationService,NumberPose,NumberValue,Object,ObjectValue,OmniRecommendationsService,OpenCloudApiV1,OpenCloudService,OperationGraph,OrderedDataStore,OutfitPages,OutputLink,PVAdornment,PVInstance,PackageLink,PackageService,PackageUIService,Packages,Pages,Pants,ParabolaAdornment,Part,PartAdornment,PartOperation,PartOperationAsset,ParticleEmitter,PartyEmulatorService,PatchBundlerFileWatch,PatchMapping,Path,Path2D,Path3D,PathfindingLink,PathfindingModifier,PathfindingService,PausedState,PausedStateBreakpoint,PausedStateException,PerformanceControlService,PermissionsService,PhysicsService,PhysicsSettings,PinShortcutService,PitchShiftSoundEffect,PlaceAssetIdsService,PlaceStatsService,PlacesService,Plane,PlaneConstraint,Platform,PlatformCloudStorageService,PlatformFriendsService,PlatformLibraries,Player,PlayerControlState,PlayerData,PlayerDataRecord,PlayerDataRecordConfig,PlayerDataService,PlayerEmulatorService,PlayerGui,PlayerHydrationService,PlayerListConfiguration,PlayerMouse,PlayerScripts,PlayerViewService,Players,Plugin,PluginAction,PluginCapabilities,PluginConnection,PluginConnectionService,PluginDebugService,PluginDragEvent,PluginGui,PluginGuiService,PluginManagementService,PluginManager,PluginManagerInterface,PluginMenu,PluginMouse,PluginPolicyService,PluginToolbar,PluginToolbarButton,PointLight,PointsService,PolicyService,PopLatencyService,Pose,PoseBase,PostEffect,Preloaded,PrismaticConstraint,ProceduralBehaviorSchedulerService,ProceduralModel,ProcessInstancePhysicsService,ProximityPrompt,ProximityPromptService,PublishService,PyramidHandleAdornment,QWidgetPluginGui,RTAnimationTracker,RayValue,RbxAnalyticsService,RealtimeMedia,RecommendationPages,RecommendationService,ReflectionMetadata,ReflectionMetadataCallbacks,ReflectionMetadataClass,ReflectionMetadataClasses,ReflectionMetadataEnum,ReflectionMetadataEnumItem,ReflectionMetadataEnums,ReflectionMetadataEvents,ReflectionMetadataFunctions,ReflectionMetadataItem,ReflectionMetadataMember,ReflectionMetadataProperties,ReflectionMetadataYieldFunctions,ReflectionService,RelativeGui,RemoteCommandService,RemoteCursorService,RemoteDebuggerServer,RemoteEvent,RemoteFunction,RenderSettings,RenderingTest,ReplicatedFirst,ReplicatedStorage,RequestOrchestratorService,ReverbSoundEffect,RibbonNotificationService,RigidConstraint,RobloxPluginGuiService,RobloxReplicatedStorage,RobloxSerializableInstance,RobloxServerStorage,RocketPropulsion,RodConstraint,RolloutValidation,RolloutValidationService,RomarkRbxAnalyticsService,RomarkService,RootImportData,RopeConstraint,Rotate,RotateP,RotateV,RotationCurve,RtMessagingService,RunService,RunningAverageItemDouble,RunningAverageItemInt,RunningAverageTimeIntervalItem,RuntimeContentService,RuntimeScriptService,SafetyService,SceneAnalysisService,ScreenGui,ScreenshotCapture,ScreenshotHud,Script,ScriptBuilder,ScriptChangeService,ScriptCloneWatcher,ScriptCloneWatcherHelper,ScriptCommitService,ScriptContext,ScriptDebugger,ScriptDebuggerService,ScriptDocument,ScriptEditorService,ScriptProfilerService,ScriptRegistrationService,ScriptRuntime,ScriptScannerService,ScriptService,ScrollingFrame,Seat,Selection,SelectionBox,SelectionHighlightManager,SelectionLasso,SelectionPartLasso,SelectionPointLasso,SelectionSphere,SelfViewConfiguration,SensorBase,SerializationService,ServerReplicator,ServerScriptService,ServerStorage,ServiceProvider,ServiceVisibilityService,SessionCheckService,SessionService,SharedTableRegistry,Shirt,ShirtGraphic,SkateboardController,SkateboardPlatform,Skin,Sky,SlidingBallConstraint,SlimAnimationDataEntity,SlimAnimationReplicationService,SlimContentProvider,SlimDebugSettings,SlimReplicationService,SlimService,Smoke,SmoothVoxelsUpgraderService,Snap,SnippetService,SocialService,SolidModelContentProvider,Sound,SoundEffect,SoundGroup,SoundService,SoundShimService,Sparkles,SpawnLocation,SpawnerService,SpecialMesh,SphereHandleAdornment,SpotLight,SpringConstraint,StackFrame,StandalonePluginScripts,StandardPages,StartPageService,StarterCharacterScripts,StarterGear,StarterGui,StarterPack,StarterPlayer,StarterPlayerScripts,StartupMessageService,Stats,StatsItem,Status,StopWatchReporter,StringValue,Studio,StudioActionOverride,StudioAssetService,StudioAttachment,StudioCallout,StudioCameraService,StudioCaptureService,StudioData,StudioDeviceEmulatorService,StudioDeviceSimulatorService,StudioObjectBase,StudioPublishService,StudioScreenshotCapture,StudioScriptDebugEventListener,StudioSdkService,StudioService,StudioTestService,StudioTheme,StudioUserService,StudioWidget,StudioWidgetsService,StyleBase,StyleDerive,StyleLink,StyleQuery,StyleRule,StyleSheet,StylingService,SunRaysEffect,SurfaceAppearance,SurfaceGui,SurfaceGuiBase,SurfaceLight,SurfaceSelection,SwimController,SyncScriptBuilder,SystemThemeService,TaskScheduler,Team,TeamCreateData,TeamCreatePublishService,TeamCreateService,Teams,TelemetryService,TeleportAsyncResult,TeleportOptions,TeleportService,TemporaryCageMeshProvider,TemporaryScriptService,Terrain,TerrainDetail,TerrainIterateOperation,TerrainModifyOperation,TerrainReadOperation,TerrainRegion,TerrainWriteOperation,TestCase,TestService,TextBox,TextBoxService,TextButton,TextChannel,TextChannelWindow,TextChatCommand,TextChatConfigurations,TextChatMessage,TextChatMessageProperties,TextChatService,TextFilterResult,TextFilterTranslatedResult,TextGenerator,TextLabel,TextService,TextSource,Texture,TextureGenerationPartGroup,TextureGenerationService,TextureGenerationUnwrappingRequest,ThirdPartyUserService,ThreadState,TimerService,ToastNotificationService,Tool,Torque,TorsionSpringConstraint,TotalCountTimeIntervalItem,TouchInputService,TouchTransmitter,TraceRouteService,TracerService,TrackerLodController,TrackerStreamAnimation,Trail,Translator,TremoloSoundEffect,TriangleMeshPart,TrussPart,TutorialService,Tween,TweenBase,TweenService,UGCAvatarService,UGCValidationService,UIAspectRatioConstraint,UIBase,UIComponent,UIConstraint,UICorner,UIDragDetector,UIDragDetectorService,UIFlexItem,UIGradient,UIGridLayout,UIGridStyleLayout,UILayout,UIListLayout,UIPadding,UIPageLayout,UIScale,UIShadow,UISizeConstraint,UIStroke,UITableLayout,UITextSizeConstraint,UnionOperation,UniqueIdLookupService,UniversalConstraint,UnreliableRemoteEvent,UnvalidatedAssetService,UserGameSettings,UserInputService,UserService,UserSettings,UserStorageService,VRService,VRStatusService,ValueBase,ValueCurve,Vector3Curve,Vector3Value,VectorForce,VehicleController,VehicleSeat,VelocityMotor,VersionControlService,VideoCapture,VideoCaptureService,VideoDeviceInput,VideoDisplay,VideoFrame,VideoPlayer,VideoSampler,VideoScreenCaptureService,VideoService,ViewportCamera,ViewportFrame,VirtualInput,VirtualInputManager,VirtualUser,VisibilityCheckDispatcher,Visit,VisualizationMode,VisualizationModeCategory,VisualizationModeService,VoiceChatInternal,VoiceChatService,VoxelBuffer,WebSocketClient,WebSocketService,WebStreamClient,WebViewService,WedgePart,Weld,WeldConstraint,WindowProtocolService,Wire,WireframeHandleAdornment,Workspace,WorkspaceAnnotation,WorldModel,WorldRoot,WrapDeformMeshProvider,WrapDeformer,WrapLayer,WrapTarget,WrapTextureTransfer`.split(`,`).map((e,t)=>[e,t])),VE=new Set(`WaitForChild`.split(`,`)),Q=[`AdvanceToNextPageAsync`,`IntersectAsync,SubtractAsync,UnionAsync`,`IsAvailable`],HE=new Map([[2,`GetCredentialsHeaders,GetDeviceAccessToken,GetDeviceIntegrityTokenYield`],[4,`GrantAchievement,HasAchieved`],[9,`GetAdAvailabilityNowAsync,GetAdAvailabilityNowForUniverseAsync,GetCampaignEligibilityAsync,RegisterAdOpportunityAsync,ShowRewardedVideoAdAsync,ShowRewardedVideoAdAtClientAsync`],[14,`GetPlayerSegmentsAsync`],[18,`GetAnimationClipAsync,GetAnimations,GetAnimationsAsync,GetClipEvaluatorAsync`],[21,`CreateJob,DownloadJobResult,FullProcess,GetJobStatus`],[22,`CreateAnimationByUploadingVideo,ImportVideoWithPrompt`],[32,`CreateOrUpdateChannelPreferenceAsync,CreateOrUpdatePlacePreferenceAsync,GetChannelPreferenceAsync,GetPlacePreferenceAsync`],[33,`GetAppAgeSignalsAsync`],[41,`GetFilesInDirAsync,PickFileWithPromptAsync,PickImageFileWithPrompt,PickMeshFileWithPrompt,PickMultipleFilesWithPrompt,StartSessionWithPathAsync,UploadAssetFromContentAsync,UploadAssetFromPathAsync,UploadVersionedAssetFromContentAsync,UploadVersionedAssetFromPathAsync`],[43,`AddNewPlace,CreateAlias,DeleteAlias,RemovePlace,RenameAlias,RenameModel,RenamePlace`],[45,`FetchAssetQualitySummaryFromGltfAsync,FetchAssetQualitySummaryFromJobIdAsync,FetchAssetQualityValidationEntriesFromModelsAsync,FetchAssetQualityValidationRawFromModelsAsync,FetchAssetQualityVisualizationDataFromUrlAsync,GenerateAssetQualityGltfFromInstanceAsync`],[46,`CachePartOperationsAsync,CanEditAssetAsync,ComposeDecalAsync,CreateAssetAsync,CreateAssetVersionAsync,CreateDataModelContentAsync,CreateEditableImageAsync,CreateEditableImageFromDownloadAsync,CreateEditableMeshAsync,CreateMeshPartAsync,CreatePlaceAsync,CreatePlaceInPlayerInventoryAsync,CreateSurfaceAppearanceAsync,GetAssetIdsForPackage,GetAssetIdsForPackageAsync,GetAudioMetadataAsync,GetBundleDetailsAsync,GetCreatorAssetID,GetGamePlacesAsync,LoadAssetAsync,PromptCreateAssetAsync,PromptImportAnimationClipFromVideoAsync,SavePlaceAsync,SearchAudio,SearchAudioAsync`],[69,Q[0]],[71,`GetWaveformAsync`],[72,`CanRecordAsync,GetUnrecordableInstancesAsync,RecordAsync`],[76,`GetWaveformAsync,LoadAsync,LoadPlatformAsync`],[84,`GetClientFeaturesAsync,GetServerFeaturesAsync`],[87,`AutoSetupAvatarAsync,CreateCageMeshPartsWithScaleForExportAsync,GenerateAvatar2DPreviewAsync,GenerateAvatarAsync,GetBatchTokenDetailsAsync,LoadAvatar2DPreviewAsync,LoadGeneratedAvatarAsync,PrepareAvatarForPreviewAsync,PromptCreateAvatarAssetAsync,PromptCreateAvatarAsync,PromptCreateMakeupAsync,PromptSelectAvatarGenerationImageAsync,RequestAvatarGenerationSessionAsync,ValidateUGCAccessoryAsync,ValidateUGCBodyPartAsync,ValidateUGCFullBodyAsync`],[88,`CheckApplyDefaultClothing,CheckApplyDefaultClothingAsync,ConformToAvatarRules,ConformToAvatarRulesAsync,GetAvatarRules,GetAvatarRulesAsync,GetBatchItemDetails,GetBatchItemDetailsAsync,GetBundlesByAssetIdAsync,GetFavorite,GetFavoriteAsync,GetHeadShapesAsync,GetInventory,GetInventoryAsync,GetItemDetails,GetItemDetailsAsync,GetOutfitDetails,GetOutfitDetailsAsync,GetOutfits,GetOutfitsAsync,GetRecommendedAssets,GetRecommendedAssetsAsync,GetRecommendedBundles,GetRecommendedBundlesAsync,SearchCatalog,SearchCatalogAsync`],[89,`ImportFBXAnimationFromFilePathUserMayChooseModel,ImportFBXAnimationUserMayChooseModel,ImportFbxRigWithoutSceneLoad,ImportLoadedFBXAnimation,LoadRigAndDetectType`],[94,`AwardBadge,AwardBadgeAsync,CheckUserBadgesAsync,GetBadgeInfoAsync,GetUserBadgesAsync,IsDisabled,IsLegal,UserHasBadge,UserHasBadgeAsync`],[96,Q[0]],[99,Q[1]],[109,`Invoke`],[131,Q[2]],[141,`CheckMomentTextStatusAsync,CheckUploadCaptureStatusAsync,CreatePostAsync,DeleteCapturesAsync,DeleteVideoCaptureAsync,GenerateMomentTextAsync,GetCaptureFilePathAsync,GetCaptureSizeAsync,GetCaptureStorageSizeAsync,GetCaptureUploadDataAsync,InternalCheckPlayabilityAsync,InternalGetStartPlaceIdAsync,PromptCaptureGalleryPermissionAsync,ReadCapturesFromGalleryAsync,SaveCapturesToExternalStorageAsync,StartUploadCaptureAsync,StartUploadCaptureForSupportTicketAsync,StartVideoCaptureAsync,StartVideoCaptureInternalAsync,UploadCaptureAsync,UploadPostAsync`],[142,Q[0]],[144,Q[0]],[151,`CanUserChatAsync,CanUsersChatAsync,FilterStringAsync,FilterStringForBroadcast,FilterStringForPlayerAsync`],[172,`GetCommerceProductInfoAsync,PrepareCommerceProductPurchase,UserEligibleForRealWorldCommerceAsync`],[176,`GetConfigAsync,GetConfigForPlayerAsync`],[182,`PreloadAsync`],[183,`GetButton`],[197,Q[1]],[199,`GetAssetInfoAsync,GetCreatorStoreProductInfoAsync,PerformCreatorStorePurchase`],[209,`GetObjectsAsync,HttpGetAsync,HttpPostAsync,InsertObjectsAndJoinIfLegacyAsync,SavePlace`],[214,`BatchGetAsync,GetAsync,GetVersionAsync,GetVersionAtTimeAsync,IncrementAsync,ListKeysAsync,ListVersionsAsync,RemoveAsync,RemoveVersionAsync,SetAsync,UpdateAsync`],[220,Q[0]],[221,Q[0]],[224,Q[0]],[225,`ListDataStoresAsync`],[227,Q[0]],[252,`CommitEdits,GetDrafts,UpdateToLatestVersion`],[270,`CanPromptOptInAsync`],[273,`LoadPlaybackAsync`],[281,`InquiryAsync`],[282,`CheckOrRequestCameraPermission`],[284,`ResolveStateForUser`],[290,`ListFilesInFolderAsync`],[295,Q[1]],[300,`EvaluateAsync`],[304,Q[1]],[306,Q[0]],[307,`GetPlatformFriends`],[309,`PlayerHasPass`],[313,`ConnectAsync,DisconnectAsync,ExportMeshToGlbAsync,GenerateMeshAsync,GenerateModelAsync,GetVideoGenSessionAsync,GetVideoGenTriggersAsync,InternalGenerateMeshAsync,LoadGeneratedMeshAsync,LoadModelFromGlbAsync,LoadModelFromUrlAsync,SegmentMeshAsync,StartVideoGenSessionAsync,UpdateVideoGenSessionPromptAsync,UpdateVideoGenSessionTriggersAsync`],[317,`FragmentAsync,HashMeshAsync,IntersectAsync,SubtractAsync,SweepPartAsync,UnionAsync`],[319,`BatchGetAsync,GetAsync,IncrementAsync,RemoveAsync,SetAsync,UpdateAsync`],[325,`GetAlliesAsync,GetEnemiesAsync,GetGroupInfoAsync,GetGroupsAsync,GetRolesInGroupAsync,PromptJoinAsync`],[333,`GetScreenResolution`],[343,`ClientRequestDataAsync,ServerRequestDataAsync`],[346,`GetHeightmapPreviewAsync,ImportHeightmap`],[354,`GetAsync,GetAsyncFullUrl,PostAsync,PostAsyncFullUrl,RequestAsync,RequestLimitedAsync`],[356,`GetAsync,JSONDecodeAsync,JSONEncodeAsync,PostAsync,RequestAccessTokenScopesAsync,RequestAsync`],[357,`ApplyAvatarRules,ApplyDescription,ApplyDescriptionAsync,ApplyDescriptionReset,ApplyDescriptionResetAsync,PlayEmote,PlayEmoteAndGetAnimTrackById,PlayEmoteAsync`],[375,`CreateMeshPartAsync,GetBaseCategories,GetBaseSets,GetCollection,GetFreeDecals,GetFreeDecalsAsync,GetFreeModels,GetFreeModelsAsync,GetLatestAssetVersionAsync,GetUserCategories,GetUserSets,LoadAsset,LoadAssetVersion,LoadAssetWithBytecodeAsync,LoadAssetWithFormat,LoadPackageAssetAsync,loadAsset`],[385,Q[1]],[386,Q[0]],[394,`GetAnimations,GetAnimationsAsync,GetKeyframeSequenceAsync`],[395,`GetCapabilitiesUsedInPackageAsync`],[403,`OpenUrl,SupportsSwitchToSettingsApp,SwitchToSettingsApp`],[409,`GetCountryRegionForPlayerAsync,GetTranslatorForLocaleAsync,GetTranslatorForPlayerAsync,PromptDownloadGameTableToCSV,PromptExportToCSVs,PromptImportFromCSVs,PromptUploadCSVToGameTable`],[414,`GetLogHistoryAsync`],[424,`CreateSessionAsync,LoadPostProcessModelAsync`],[425,`ForwardAsync`],[431,`GetAvailableSubscriptionProductsAsync,GetDeveloperProductsAsync,GetProductInfo,GetProductInfoAsync,GetRobloxSubscriptionDetailsAsync,GetRobuxBalance,GetSubscriptionProductInfoAsync,GetSubscriptionPurchaseInfoAsync,GetUserSubscriptionDetailsAsync,GetUserSubscriptionDetailsInternalAsync,GetUserSubscriptionPaymentHistoryAsync,GetUserSubscriptionStatusAsync,GetUsersPriceLevelsAsync,PerformBulkPurchase,PerformCancelSubscription,PerformPurchase,PerformPurchaseV2,PerformSubscriptionPurchase,PerformSubscriptionPurchaseV2,PerformSubscriptionPurchaseV3Async,PerformSubscriptionPurchaseWithRobuxAsync,PlayerOwnsAsset,PlayerOwnsAssetAsync,PlayerOwnsBundle,PlayerOwnsBundleAsync,PromptRobuxTransferAsync,RankProductsAsync,RecommendTopProductsAsync,UserOwnsGamePassAsync`],[433,`GenerateMaterialVariantsAsync`],[439,`GetAsync,IncrementAsync`],[440,`GetAsync,ListItemsAsync,RemoveAsync,SetAsync,UpdateAsync`],[441,Q[0]],[442,`AddAsync,GetSizeAsync,ReadAsync,RemoveAsync`],[444,`GetAsync,GetRangeAsync,GetSizeAsync,RemoveAsync,SetAsync,UpdateAsync`],[447,Q[1]],[451,`PublishAsync,SubscribeAsync`],[455,`DumpToFileAsync`],[457,`CreateReviewableContentAsync,InternalRequestReviewableContentReviewAsync`],[465,Q[1]],[475,`GetScheduledNotifications`],[481,`CreateUserNotificationAsync`],[482,`HttpRequestAsync,InvokeAsync`],[484,`BatchGetAsync,GetAsync,GetSortedAsync,IncrementAsync,RemoveAsync,SetAsync,UpdateAsync`],[485,Q[0]],[490,`UpdateAsync`],[491,`ConvertToPackageAsync,GetPackageInfo,PublishPackage,SetPackageVersion`],[493,Q[0]],[496,Q[1]],[498,Q[1]],[501,`GetEmulatedPartyAsync`],[504,`CheckOcclusionAsync,ComputeAsync`],[509,`ComputeRawPathAsync,ComputeSmoothPathAsync,FindPathAsync`],[524,Q[1]],[525,`GetUserDataAsync,SetUserDataAsync`],[526,`GetPartyMembers`],[528,`GetCanManageAsync,GetFriendsInUniverseAsync,GetFriendsOnline,GetFriendsOnlineAsync,GetFriendsWhoPlayedAsync,GetRankInGroup,GetRankInGroupAsync,GetRoleInGroup,GetRoleInGroupAsync,IsBestFriendsWith,IsFriendsWith,IsFriendsWithAsync,IsInGroup,IsInGroupAsync,LoadCharacter,LoadCharacterAsync,LoadCharacterBlocking,LoadCharacterWithAvatarRules,LoadCharacterWithHumanoidDescription,LoadCharacterWithHumanoidDescriptionAsync,PromptSecurityChallengeAsync,RequestStreamAroundAsync,WaitForDataReady,isFriendsWith,waitForDataReady`],[530,`GetRecordAsync`],[531,`ReleaseAsync,RequestFlushAsync`],[541,`BanAsync,CreateHumanoidModelFromDescription,CreateHumanoidModelFromDescriptionAsync,CreateHumanoidModelFromUserId,CreateHumanoidModelFromUserIdAsync,GetBanHistoryAsync,GetCharacterAppearanceAsync,GetCharacterAppearanceInfoAsync,GetFriendsAsync,GetHumanoidDescriptionFromOutfitId,GetHumanoidDescriptionFromOutfitIdAsync,GetHumanoidDescriptionFromUserId,GetHumanoidDescriptionFromUserIdAsync,GetNameFromUserIdAsync,GetProfileConfigurationFromUserIdAsync,GetUserIdFromNameAsync,GetUserThumbnailAsync,UnbanAsync`],[542,`CreateDockWidgetPluginGui,CreateDockWidgetPluginGuiAsync,CreateQWidgetPluginGui,ImportFbxAnimation,ImportFbxAnimationAsync,ImportFbxRig,ImportFbxRigAsync,PromptForExistingAssetId,PromptForExistingAssetIdAsync,PromptSaveSelection,PromptSaveSelectionAsync`],[551,`GetOTAPluginVersion`],[554,`ShowAsync`],[560,`AwardPoints,GetGamePointBalance,GetPointBalance`],[561,`CanViewBrandProjectAsync,GetPolicyInfoForPlayerAsync,GetPolicyInfoForServerRobloxOnlyAsync`],[569,`WaitForGenerationAsync`],[573,`CreateAssetAndWaitForAssetId,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsync,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsyncWithAddParam,CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsyncWithAddParamErrorJson,PublishCageMeshAsync,PublishDescendantAssetsAsync`],[579,`ConnectAsync`],[580,Q[0]],[581,`GenerateItemListAsync,GetRecommendationItemAsync,RegisterItemAsync,RemoveItemAsync,UpdateItemAsync`],[597,`ExecuteCommandAsync`],[601,`InvokeClient,InvokeServer`],[634,`GetAnimationMemoryAsync,GetAudioMemoryAsync,GetInstanceCompositionAsync,GetScriptMemoryAsync,GetTriangleCompositionAsync,GetUnparentedInstancesAsync`],[647,`CloseAsync,EditTextAsync,ForceSetSelectionAsync,MultiEditTextAsync,RequestSetSelectionAsync,ReviewableTextEditsAsync`],[648,`EditSourceAsyncWithRanges,OpenScriptDocumentAsync,UpdateSourceAsync`],[655,Q[1]],[665,`DeserializeInstancesAsync,SerializeInstancesAsync`],[677,Q[1]],[691,`CanSendCallInviteAsync,CanSendGameInviteAsync,GetEventRsvpStatusAsync,GetExperienceEventAsync,GetPartyAsync,GetUpcomingExperienceEventsAsync,PromptFeedbackSubmissionAsync,PromptLinkSharing,PromptLinkSharingAsync,PromptRsvpToEventAsync`],[696,`EndRecording,GetRecordingDevices`],[699,Q[1]],[707,Q[0]],[711,`GetCore`],[716,`GetPaginatedMemoryByTexture`],[723,`AutoSetupAvatarAsync,AutoSetupSerializedAvatarAsync,CancelAutoSetupAvatarAsync,DEPRECATED_SerializeInstances,PromptSaveInstanceToRobloxAsync,RequestAvatarAutosetupAsync,SerializeInstances`],[727,`RequestScreenshotPermissionAsync`],[729,`EmulatePCDeviceWithResolution,GetCurrentDeviceId,GetCurrentOrientation,HasDeviceWithId,SetCurrentDeviceId,SetCurrentOrientation`],[730,`CreateDeviceAsync,GetDeviceAsync,GetDeviceInfoAsync,GetDeviceListAsync,GetOrientationAsync,GetPixelDensityAsync,GetResolutionAsync,GetScalingModeAsync,RemoveDeviceAsync,SetDeviceAsync,SetOrientationAsync,SetPixelDensityAsync,SetResolutionAsync,SetScalingModeAsync,StopSimulationAsync,UpdateDeviceAsync`],[733,`ScaleAsync`],[736,`PromptImportFile,PromptImportFileAsync,PromptImportFiles,PromptImportFilesAsync,TryInstallPlugin`],[737,`ExecuteMultiplayerTestAsync,ExecutePlayModeAsync,ExecuteRunModeAsync`],[757,`getSystemThemeAsync`],[767,`GetPlayerPlaceInstanceAsync,PromptExperienceDetailsAsync,ReserveServer,ReserveServerAsync,TeleportAsync,TeleportPartyAsync,UnblockAsync`],[770,`DrawBufferAsync,IntersectAsync,ReadBufferAsync,SubtractAsync,UnionAsync`],[778,`CaptureScreenshotAsync,FetchTestControlsAsync,RequestValidationAsync,Run,RunAsync,StartVideoCaptureAsync,StopVideoCaptureAsync`],[782,`AddUserAsync,SendAsync,SendDictatedSpeechAsync,SendInternalAsync,SendPresetAsync`],[788,`CanUserChatAsync,CanUsersChatAsync,CanUsersDirectChatAsync,CanUsersWhisperAsync,GetChatGroupsAsync,GetChatableUserCountAsync,GetPresetsAsync,OnUserChatSettingUpdateAsync,SendDictatedSpeechUniverseChatAsync,SendUniverseChatMessageAsync,SendUniverseChatPresetAsync`],[789,`GetChatForUserAsync,GetNonChatStringForBroadcastAsync,GetNonChatStringForUserAsync`],[791,`GenerateTextAsync`],[793,`FilterAndTranslateStringAsync,FilterStringAsync,GetFamilyInfoAsync,GetTextBoundsAsync,GetTextSizeOffsetAsync`],[797,`GetQuotasAsync`],[816,Q[1]],[817,Q[1]],[823,`CalculateBodyMaxCageDistance,CanLoadAsset,CreateEditableImageOriginalSizeAsync,DoesMeshHaveSkinningData,DoesSurfaceAppearanceMatchTexturePackAsync,FetchAssetWithFormat,GetMeshDataBinaryString,GetMeshVerts,IsDeformedLayeredClothingOutOfRenderBounds`],[845,Q[1]],[852,`GetUserFromGlobalUserIdAsync,GetUserInfosByUserIdsAsync`],[863,Q[1]],[871,`LoadAsync`],[872,`GetSamplesAtTimesAsync`],[874,`CreateVideoSamplerAsync`],[876,`CaptureSnapshotAsync`],[878,`WaitForInputEventsProcessed`],[885,`IsVoiceEnabledForUserIdAsync`],[886,`GetChatGroupsAsync,IsVoiceEnabledForUserIdAsync`],[887,`ClearAsync,DrawBufferAsync,FromHeightmapAsync,NormalizeAsync,UnclampAsync`],[891,Q[2]],[892,Q[1]],[903,`CreateEditableMeshAsync,GetDeformedCFrameAsync`]]),UE=new Map;function WE(e,t){let n=BE.get(e);if(n===void 0)return!1;if(VE.has(t))return!0;let r=UE.get(n);if(r!==void 0)return r.has(t);let i=HE.get(n);if(i===void 0)return!1;let a=new Set(i.split(`,`));return UE.set(n,a),a.has(t)}const GE=[`PlanckSystem`,`System`,`SystemFunction`,`SystemReturn`,`SystemTableLike`],KE=new Set([`comments`,`loc`,`parent`,`range`,`tokens`]);function qE(e,t){if(e.type===`Identifier`)return e.name;if(t&&e.type===`TSQualifiedName`)return e.right.name}function JE(e,t=!0){if(e==null)return;let n=e;for(;n.type===`TSTypeAnnotation`;)n=n.typeAnnotation;if(n.type===`TSUnionType`){let e;for(let r of n.types){if(r.type===`TSUndefinedKeyword`||r.type===`TSNullKeyword`)continue;let n=JE(r,t);if(n===void 0||e!==void 0)return;e=n}return e}if(n.type===`TSTypeReference`)return qE(n.typeName,t)}function YE(e,t){let n=JE(e);return n!==void 0&&t.has(n)}function XE(e,t){for(let[n,r]of Object.entries(e))KE.has(n)||r!=null&&t.push(r)}function ZE(e,n){let r=[e];for(;r.length>0;){let e=r.pop();if(Array.isArray(e)){for(let t of e)r.push(t);continue}t.isObject(e)&&S(e)&&n(e)!==!1&&XE(e,r)}}function QE(e){if(e.type===`Property`)return e.computed?e.key.type===`Literal`&&t.isString(e.key.value)?e.key.value:void 0:e.key.type===`Identifier`?e.key.name:e.key.type===`Literal`&&t.isString(e.key.value)?e.key.value:void 0}function $E(e,t,n){for(let r of e.properties)if(QE(r)===`system`&&r.type===`Property`){if(A(r.value))n.add(r.value);else if(r.value.type===`Identifier`){let e=t.get(r.value.name);e!==void 0&&n.add(e)}}}function eD(e){if(e.type===`ImportSpecifier`)return e.imported.type===`Identifier`?e.imported.name:e.imported.value}function tD(e,n){let r=new Map;for(let i of e.body){if(i.type!==`ImportDeclaration`||!t.isString(i.source.value))continue;let e=n.getDeclaredVariables(i);for(let t of i.specifiers){let n=eD(t);if(n===void 0)continue;let a=e.find(e=>e.name===t.local.name);a!==void 0&&r.set(a,{imported:n,source:i.source.value})}}return r}function nD(e){let t=[],n=m(e);for(;n.type===`MemberExpression`;){let e=g(n);if(e===void 0)return;t.unshift(e),n=m(n.object)}return n.type===`Identifier`?{path:t,root:n}:void 0}function rD(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function iD(e){if(e.type===`Identifier`)return[e.name];if(e.type!==`MemberExpression`)return;let t=nD(e);return t===void 0?void 0:[t.root.name,...t.path]}function aD(e,t){return _(e.getScope(t),t.name)}function oD(e,t,n,r,i){ZE(e,e=>{if(e.type!==`CallExpression`||e.callee.type!==`MemberExpression`)return;let a=nD(e.callee);if(a===void 0)return;let o=aD(t,a.root),s=o===void 0?void 0:n.get(o);if(s!==void 0)for(let n of r){if(s.source!==n.source||s.imported!==n.imported||!rD(a.path,n.memberPath))continue;let r=e.arguments[n.callbackArgumentIndex];if(r===void 0||r.type===`SpreadElement`||!A(r))continue;let o=r.params[n.parameterIndex];if(o?.type!==`Identifier`)continue;let c=aD(t,o);c!==void 0&&i.set(c,n.className)}})}function sD(e,t,n,r){ZE(e,e=>{if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){let i=e.id.name,a=JE(e.id.typeAnnotation,!1);if(a===void 0||n.has(a))return;let o=t.getDeclaredVariables(e).find(e=>e.name===i);o!==void 0&&r.set(o,a);return}if(!A(e))return;let i=new Map(t.getDeclaredVariables(e).map(e=>[e.name,e]));for(let t of e.params){if(t.type!==`Identifier`)continue;let e=t.name,a=JE(t.typeAnnotation,!1);if(a===void 0||n.has(a))continue;let o=i.get(e);o!==void 0&&r.set(o,a)}})}function cD(e){let t=new Set;return ZE(e,e=>{if(e.type===`ImportDeclaration`){for(let n of e.specifiers)t.add(n.local.name);return!1}return(e.type===`TSInterfaceDeclaration`||e.type===`TSTypeAliasDeclaration`||e.type===`ClassDeclaration`||e.type===`TSEnumDeclaration`)&&e.id!==null&&t.add(e.id.name),!0}),t}function lD(e,t){let n=aD(t,e);if(n?.defs.length!==1)return;let[r]=n.defs;if(r?.node.type!==`VariableDeclarator`)return;let i=r.node.parent;if(i.type===`VariableDeclaration`&&i.kind===`const`)return r.node.init??void 0}function uD(e,t){let n=aD(t,e);if(n?.defs.length!==1)return;let[r]=n.defs;if(r===void 0)return;if(A(r.node))return r.node;if(r.node.type!==`VariableDeclarator`||r.node.init===null)return;let i=m(r.node.init);return A(i)?i:void 0}function dD(e,t){let n=m(e);return A(n)?n:n.type===`Identifier`?uD(n,t):void 0}function fD(e,n,r,i,a){let o=m(e);if(o.type===`Identifier`)return pD(o,n,r,i,a);if(o.type!==`CallExpression`||o.callee.type!==`MemberExpression`||g(o.callee)!==`GetService`||o.callee.object.type!==`Identifier`||o.callee.object.name!==`game`||v(n,o.callee.object,`game`))return;let[s]=o.arguments;return s?.type===`Literal`&&t.isString(s.value)?s.value:void 0}function pD(e,t,n,r,i){let a=aD(t,e);if(a!==void 0){let e=r.get(a);if(e!==void 0)return e;let t=n.get(a);if(t?.source===`@rbxts/services`)return t.imported}let o=lD(e,t);if(!(o===void 0||i.has(o)))return i.add(o),fD(o,t,n,r,i)}function mD(e,t,n,r){if(e.callee.type!==`MemberExpression`)return!1;let i=g(e.callee);if(i===void 0)return!1;let a=fD(e.callee.object,t,n,r,new Set);return a!==void 0&&WE(a,i)}function hD(e,t){let n=new Set;if(e.body===null)return n;if(e.body.type!==`BlockStatement`){let r=dD(e.body,t);return r!==void 0&&n.add(r),n}return ZE(e.body,e=>{if(A(e))return!1;if(e.type!==`ReturnStatement`||e.argument===null)return!0;let r=dD(e.argument,t);return r!==void 0&&n.add(r),!1}),n}function gD(e,t,n){let r=new Set,i=iD(e.callee);if(i===void 0)return r;for(let a of n)if(rD(i,a.calleePath))for(let n of a.callbackArgumentIndexes){let i=e.arguments[n];if(i===void 0||i.type===`SpreadElement`)continue;let a=dD(i,t);a!==void 0&&r.add(a)}return r}function _D(e,t,n,r,i,a){if(e.async)return;let o=new Set;function s(e){e.async||e.body===null||o.has(e)||(o.add(e),ZE(e.body,o=>{if(o!==e&&A(o))return!1;if(o.type!==`CallExpression`)return!0;mD(o,t,n,r)&&a(o);for(let e of gD(o,t,i))s(e);return!0}))}let c=hD(e,t),l=c.size===0?[e]:c;for(let e of l)s(e)}const vD=b(`no-async-in-system`,`roblox`,{create(e){let t=e.options[0]?.additionalSystemTypeNames??[],n=e.options[0]?.callbackParameterTypes??[],r=e.options[0]?.synchronousCallbacks??[],i=new Set([...GE,...t]);return{"Program:exit"(t){let a=new Map,o=new Set,s=[],c=tD(t,e.sourceCode),l=new Map;sD(t,e.sourceCode,cD(t),l),oD(t,e.sourceCode,c,n,l),ZE(t,e=>{if(A(e)){e.id!==null&&a.set(e.id.name,e),YE(e.returnType,i)&&o.add(e);return}if(e.type===`VariableDeclarator`&&e.id.type===`Identifier`){if(!YE(e.id.typeAnnotation,i)||e.init===null)return;A(e.init)?o.add(e.init):e.init.type===`ObjectExpression`&&s.push(e.init);return}e.type===`TSSatisfiesExpression`&&YE(e.typeAnnotation,i)&&e.expression.type===`ObjectExpression`&&s.push(e.expression)});for(let e of s)$E(e,a,o);for(let t of o)_D(t,e.sourceCode,c,l,r,t=>{e.report({messageId:`noAsyncInSystem`,node:t})})}}},meta:{docs:{description:`Disallow yielding Roblox API calls in synchronous Planck system execution.`,recommended:!0},messages:{noAsyncInSystem:`Do not call a yielding Roblox API from a synchronous Planck system.`},schema:[{additionalProperties:!1,properties:{additionalSystemTypeNames:{items:{type:`string`},type:`array`,uniqueItems:!0},callbackParameterTypes:{items:{additionalProperties:!1,properties:{callbackArgumentIndex:{minimum:0,type:`integer`},className:{type:`string`},imported:{type:`string`},memberPath:{items:{type:`string`},type:`array`},parameterIndex:{minimum:0,type:`integer`},source:{type:`string`}},required:[`callbackArgumentIndex`,`className`,`imported`,`memberPath`,`parameterIndex`,`source`],type:`object`},type:`array`},synchronousCallbacks:{items:{additionalProperties:!1,properties:{callbackArgumentIndexes:{items:{minimum:0,type:`integer`},minItems:1,type:`array`,uniqueItems:!0},calleePath:{items:{type:`string`},minItems:1,type:`array`}},required:[`callbackArgumentIndexes`,`calleePath`],type:`object`},type:`array`}},type:`object`}],type:`problem`}});function yD(e){return Math.round(e>1?e:e*255)}function bD(e){return{reportUnknownComponents:t.isObject(e)&&`reportUnknownComponents`in e?t.isBoolean(e.reportUnknownComponents)&&e.reportUnknownComponents:!0}}function xD(e){let t=[],n=0,r=!0;for(let i of e){if(!ze(i))return;let e=yD(i.value);t[n++]=e,e!==0&&(r=!1)}return[r,t]}const SD=b(`no-color3-constructor`,`roblox`,{create(e){let t=bD(e.options[0]);return{NewExpression(n){if(!Me(n,`Color3`))return;let r=n.arguments;if(r.length===0)return;let i=xD(r);if(!i){t.reportUnknownComponents&&e.report({messageId:r.length<3?`useFromRGB`:`onlyZeroArgs`,node:n});return}if(r.length<3){let[t,r=0]=i[1];e.report({fix:e=>e.replaceText(n,`Color3.fromRGB(${t}, ${r}, 0)`),messageId:`useFromRGB`,node:n});return}i[0]||e.report({fix:e=>e.replaceText(n,`Color3.fromRGB(${i[1].join(`, `)})`),messageId:`onlyZeroArgs`,node:n})}}},meta:{docs:{description:`Ban new Color3(...) except new Color3() or new Color3(0, 0, 0). Use Color3.fromRGB() instead.`},fixable:`code`,messages:{onlyZeroArgs:`Use Color3.fromRGB() instead of new Color3(). new Color3() uses floats [0-1] and performs worse than Color3.fromRGB() which uses [0-255]. Only 'new Color3()' or 'new Color3(0, 0, 0)' are allowed.`,useFromRGB:`Use Color3.fromRGB() instead of new Color3(). new Color3() uses floats [0-1] and performs worse than Color3.fromRGB() which uses [0-255].`},schema:[{additionalProperties:!1,properties:{reportUnknownComponents:{default:!0,description:`Report new Color3(...) calls when one or more components are not numeric literals.`,type:`boolean`}},type:`object`}],type:`problem`}});function CD(e){let t=new Set;if(!e?.eventsImportPaths)return t;for(let n of e.eventsImportPaths)Ti(n)&&t.add(n);return t}function wD(e){let t=e;for(;;)switch(t.type){case`ChainExpression`:case`ParenthesizedExpression`:case`TSAsExpression`:case`TSInstantiationExpression`:case`TSNonNullExpression`:case`TSTypeAssertion`:t=t.expression;continue;default:return t}}function TD(e){let t=e;for(;;){let e=wD(t);if(e.type===`Identifier`)return e.name;if(e.type!==`MemberExpression`)return;t=e.object}}function ED(e,t){let n=wD(e.callee);if(n.type!==`MemberExpression`||g(n)!==`connect`)return;let r=TD(n.object);if(r===void 0||!t.has(r))return;let[i]=e.arguments;if(i)switch(i.type){case`ArrowFunctionExpression`:case`FunctionExpression`:return i;default:return}}function DD(e,t){let n=wD(e.callee);if(n.type!==`MemberExpression`)return!1;let r=TD(n);return r!==void 0&&t.has(r)}function OD(e,t){return!e.has(t)&&(e.add(t),!0)}function kD(e,t){return OD(t.playerValues,e)}function AD(e,t){return OD(t.playerContainers,e)}function jD(e,t){let n=t.length;for(;n>0;){--n;let r=t[n];r&&e.push(r)}}function MD(e,t){let n=t.length;for(;n>0;){--n;let r=t[n];r&&e.push(r.type===`RestElement`?r.argument:r.value)}}function ND(e,t){let n=[e],r=!1;for(;n.length>0;){let e=n.pop();if(e)switch(e.type){case`ArrayPattern`:jD(n,e.elements);break;case`AssignmentPattern`:n.push(e.left);break;case`Identifier`:kD(e.name,t)&&(r=!0);break;case`ObjectPattern`:MD(n,e.properties);break;case`RestElement`:n.push(e.argument)}}return r}function PD(e,t,n){return t===0?!1:e.type===`Identifier`?t===2?kD(e.name,n):AD(e.name,n):ND(e,n)}function FD(e,t,n){return e.type===`MemberExpression`||t===0?!1:e.type===`ArrayPattern`||e.type===`AssignmentPattern`||e.type===`Identifier`||e.type===`ObjectPattern`||e.type===`RestElement`?e.type===`Identifier`?t===2?kD(e.name,n):AD(e.name,n):ND(e,n):!1}function ID(e,t){let n=e;for(;;){let e=wD(n);switch(e.type){case`ArrayExpression`:return LD(e,t);case`AssignmentExpression`:n=e.right;continue;case`ConditionalExpression`:return RD(e,t);case`Identifier`:return t.playerValues.has(e.name)?2:+!!t.playerContainers.has(e.name);case`MemberExpression`:return zD(e,t);case`ObjectExpression`:return BD(e,t);case`SequenceExpression`:{let t=e.expressions.at(-1);if(t===void 0)return 0;n=t;continue}default:return 0}}}function LD(e,t){for(let n of e.elements)if(n!==null&&ID(n.type===`SpreadElement`?n.argument:n,t)!==0)return 1;return 0}function RD(e,t){let n=ID(e.consequent,t);return n===ID(e.alternate,t)?n:0}function zD(e,t){return ID(e.object,t)===1?2:0}function BD(e,t){for(let n of e.properties)if(ID(n.type===`SpreadElement`?n.argument:n.value,t)!==0)return 1;return 0}function VD(e,t){if(e.type===`TSParameterProperty`){ND(e.parameter,t);return}ND(e,t)}const HD=b(`no-events-in-events-callback`,`roblox`,{create(e){let t=CD(e.options[0]),n=new Set,r=new WeakMap,i=[];function a(){let e=i.at(-1);if(e?.callbackState&&!(e.callbackDepth>0))return e.callbackState}function o(e){if(e.type!==`FunctionDeclaration`){let t=r.get(e);if(t){i.push({callbackDepth:0,callbackState:t});return}}let t=i.at(-1);if(!t?.callbackState){i.push({callbackDepth:0,callbackState:void 0});return}i.push({callbackDepth:t.callbackDepth+1,callbackState:t.callbackState})}function s(){i.pop()}return{ArrowFunctionExpression:o,"ArrowFunctionExpression:exit":s,AssignmentExpression(e){let t=a();if(!t||e.operator!==`=`)return;let n=ID(e.right,t);n!==0&&FD(e.left,n,t)},CallExpression(t){let i=ED(t,n);if(i){let e={playerContainers:new Set,playerValues:new Set},[t]=i.params;t&&VD(t,e),r.set(i,e)}let o=a();if(!o||!DD(t,n))return;let[s]=t.arguments;!s||s.type===`SpreadElement`||ID(s,o)!==2||e.report({messageId:`preferFunctions`,node:t})},FunctionDeclaration:o,"FunctionDeclaration:exit":s,FunctionExpression:o,"FunctionExpression:exit":s,ImportDeclaration(e){let r=e.source.value;if(t.has(r))for(let t of e.specifiers){let{name:e}=t.local;if(t.type===`ImportDefaultSpecifier`){e===`Events`&&n.add(e);continue}if(t.type===`ImportSpecifier`){if(t.imported.type===`Identifier`&&t.imported.name===`Events`){n.add(e);continue}t.imported.type===`Literal`&&t.imported.value===`Events`&&n.add(e)}}},VariableDeclarator(e){let t=a();if(!t||!e.init)return;let n=ID(e.init,t);n!==0&&PD(e.id,n,t)}}},meta:{docs:{description:`Disallow sending Events back to the same player inside an Events.connect callback; use Functions for request/response.`},messages:{preferFunctions:`Do not call Events for the same player inside an Events.connect callback. Use a Functions callback instead.`},schema:[{additionalProperties:!1,properties:{eventsImportPaths:{description:`Import paths that identify Events objects whose callbacks should be checked.`,items:{minLength:1,type:`string`},type:`array`}},required:[`eventsImportPaths`],type:`object`}],type:`problem`}});function UD({callee:e}){if(e.type!==`CallExpression`)return!1;let t=e.callee;if(t.type!==`MemberExpression`)return!1;let{object:n}=t;return n.type===`Identifier`&&n.name===`Ianitor`}const WD=b(`no-ianitor-in-function-body`,`roblox`,{create(e){let t=0;function n(){t+=1}function r(){--t}return{ArrowFunctionExpression:n,"ArrowFunctionExpression:exit":r,CallExpression(n){t===0||!UD(n)||e.report({messageId:`hoistIanitorValidator`,node:n})},FunctionDeclaration:n,"FunctionDeclaration:exit":r,FunctionExpression:n,"FunctionExpression:exit":r}},meta:{docs:{description:`Disallow Ianitor validator creation inside function bodies. Hoist to module scope to avoid recreating validators on every call.`,recommended:!0},messages:{hoistIanitorValidator:`Ianitor validator created inside function body is slow — hoist to module scope. Example: const validator = Ianitor.keyOf(ids);`},schema:[],type:`problem`}});function GD(e){let t=m(e);if(t.type!==`CallExpression`)return!1;let n=m(t.callee);if(n.type!==`MemberExpression`||n.computed)return!1;let r=m(n.object);return r.type===`Identifier`&&r.name===`Ianitor`&&n.property.type===`Identifier`}function KD(e){for(let{node:t}of e.defs){if(t.type!==`VariableDeclarator`)continue;let{init:e}=t;if(e!==null&&GD(e))return!0}return!1}function qD(e,t){let n=m(e.callee);if(n.type===`CallExpression`)return GD(n);if(n.type===`Identifier`){let r=_(t.getScope(e),n.name);return r!==void 0&&KD(r)}return!1}function JD(e){let t=!1;for(let n of e.properties){if(n.type!==`Property`||n.key.type!==`Identifier`)continue;let{name:e}=n.key;if(e===`error`||e===`value`)return!1;e===`success`&&(t=!0)}return t}function YD(e){for(let t of e.properties)if(t.type===`Property`&&t.key.type===`Identifier`&&t.key.name===`success`)return t.key}const XD=b(`no-ianitor-success-access`,`roblox`,{create(e){let{sourceCode:t}=e,n=new Set,r=new Map;function i(e){let t=r.get(e);t!==void 0&&(t.referencedFully=!0)}return{CallExpression(e){for(let t of e.arguments){if(t.type!==`Identifier`)continue;let e=r.get(t.name);e!==void 0&&(e.referencedFully=!0)}},MemberExpression({computed:n,object:i,property:a}){if(n||a.type!==`Identifier`)return;let o=m(i);if(o.type===`CallExpression`&&a.name===`success`){qD(o,t)&&e.report({messageId:`preferCreateGuard`,node:a});return}if(o.type===`Identifier`){let e=r.get(o.name);e!==void 0&&e.properties.add(a.name)}},"Program:exit"(){for(let[,{firstSuccessNode:t,properties:n,referencedFully:i}]of r)!i&&n.has(`success`)&&!n.has(`error`)&&!n.has(`value`)&&e.report({messageId:`preferCreateGuard`,node:t})},ReturnStatement({argument:e}){e?.type===`Identifier`&&i(e.name)},VariableDeclarator({id:i,init:a}){if(a===null)return;let o=m(a);if(o.type===`CallExpression`){if(i.type===`Identifier`&&GD(o)){n.add(i.name);return}if(i.type===`ObjectPattern`&&qD(o,t)&&JD(i)){let t=YD(i);t!==void 0&&e.report({messageId:`preferCreateGuard`,node:t})}i.type===`Identifier`&&o.callee.type===`Identifier`&&n.has(o.callee.name)&&r.set(i.name,{firstSuccessNode:i,properties:new Set,referencedFully:!1})}}}},meta:{docs:{description:"Disallow accessing `.success` on Ianitor check results when the full result object is not needed."},messages:{preferCreateGuard:`Replace with Flamework.createGuard<T>(). Ianitor check results allocate a table on every call; Flamework.createGuard returns a plain boolean at runtime with zero allocation.`},schema:[],type:`suggestion`}}),ZD={checkPrivate:!0,checkProtected:!0,checkPublic:!0};function QD(e){return e===void 0?ZD:{...ZD,...e}}function $D(e,t){if(e.static||e.kind!==`method`||e.value.type!==`FunctionExpression`)return!1;let n=e.accessibility??`public`;return!(n===`private`&&!t.checkPrivate||n===`protected`&&!t.checkProtected||n===`public`&&!t.checkPublic)}function eO(e,t){for(let n of Object.values(e)){if(Array.isArray(n)){for(let e of n)if(S(e)&&tO(e,t))return!0;continue}if(S(n)&&tO(n,t))return!0}return!1}function tO(e,n){return!n.has(e)&&(n.add(e),e.type===`ThisExpression`||e.type===`Super`?!0:t.isObject(e)?eO(e,n):!1)}function nO({value:e}){return tO(e,new WeakSet)}function rO(e){return e.key.type===`Identifier`?e.key.name:`unknown`}const iO=b(`no-instance-methods-without-this`,`roblox`,{create(e){let t=QD(e.options[0]);return{MethodDefinition(n){!$D(n,t)||nO(n)||e.report({data:{methodName:rO(n)},messageId:`noInstanceMethodWithoutThis`,node:n})}}},meta:{docs:{description:`Detect instance methods that do not use 'this' and suggest converting them to standalone functions for better performance in roblox-ts.`},messages:{noInstanceMethodWithoutThis:`Method '{{methodName}}' does not use 'this' and creates unnecessary metatable overhead in roblox-ts. Convert it to a standalone function for better performance.`},schema:[{additionalProperties:!1,properties:{checkPrivate:{default:!0,description:`Check private methods (default: true)`,type:`boolean`},checkProtected:{default:!0,description:`Check protected methods (default: true)`,type:`boolean`},checkPublic:{default:!0,description:`Check public methods (default: true)`,type:`boolean`}},type:`object`}],type:`problem`}});function aO(e){return e.type===`JSXIdentifier`?e.name:e.name.name}function oO(e){return e===`nativeProperties`||e.endsWith(`NativeProperties`)}function sO(e){if(e.type===`Variable`&&e.node.type===`VariableDeclarator`)return e.node.init??void 0}function cO(e){let t=m(e);for(;t.type===`MemberExpression`;){let e=m(t.object);if(e.type===`Identifier`)return e;if(e.type!==`MemberExpression`)return;t=e}return t.type===`Identifier`?t:void 0}function lO(e,t){let n=m(t);if(n.type===`ObjectExpression`)return!0;let r=cO(n);if(r===void 0)return!1;let i=_(e.getScope(r),r.name);return i===void 0?!1:z(i)||R(i.scope)}function uO(e,t,n){let r=m(t);if(n.has(r))return;if(n.add(r),r.type===`ObjectExpression`)return r;if(r.type!==`Identifier`)return;let i=_(e.getScope(r),r.name);if(!(i===void 0||R(i.scope)))for(let t of i.defs){let r=sO(t);if(r===void 0)continue;let i=uO(e,r,n);if(i!==void 0)return i}}const dO=b(`no-native-properties-spread`,`roblox`,{create(e){let{sourceCode:t}=e;function n(n,r){for(let i of n.properties){if(i.type!==`SpreadElement`||!lO(t,i.argument))continue;let n=t.getText(i.argument);e.report({data:`propertyName`in r?{prop:r.propertyName,source:n}:{source:n},messageId:r.messageId,node:i})}}return{JSXAttribute(e){let r=aO(e.name);if(r===void 0||!oO(r))return;let{value:i}=e;if(i?.type!==`JSXExpressionContainer`)return;let{expression:a}=i;if(a.type===`JSXEmptyExpression`)return;let o=uO(t,a,new Set);o!==void 0&&n(o,{messageId:`noNativePropertiesSpread`,propertyName:r})},JSXSpreadAttribute(e){let r=uO(t,e.argument,new Set);r!==void 0&&n(r,{messageId:`noElementSpread`})}}},meta:{docs:{description:`Disallow spreading static property bags into nativeProperties/*NativeProperties props and onto JSX elements via intermediate objects, because the spread creates a new copied table every render.`,recommended:!0},messages:{noElementSpread:`Spreading static property bag {{source}} through an intermediate object creates a new table every render. Inline the full object properties directly on the JSX element.`,noNativePropertiesSpread:`Spreading static property bag {{source}} into {{prop}} creates a new table every render. Pass it directly or inline the full object instead.`},schema:[],type:`problem`}}),fO=ws({name:`print`,alternative:`Log`,category:`roblox`,message:`{{name}}() is a raw output function lacking log levels, timestamps, and filtering. Production systems require structured logging for debugging and monitoring. Replace {{name}}(...) with {{alternative}}.`,messageId:`noPrint`,ruleName:`no-print`}),pO=`uiaspectratioconstraint`,mO=new Set([`ButtonSpritesheet`,`GenericSpritesheet`,`LabelSpritesheet`]);function hO({openingElement:e}){let{name:t}=e;return t.type===`JSXIdentifier`?t.name:void 0}function gO(e){let t=!1;return da(e,e=>{t||e.type===`JSXElement`&&hO(e)===pO&&(t=!0)}),t}function _O(e){if(e.type===`FunctionDeclaration`)return e.id?.name;if(k(e)){let{parent:t}=e;if(t.type===`VariableDeclarator`&&t.id.type===`Identifier`)return t.id.name}}function vO(e){if(e.body.type!==`BlockStatement`)return m(e.body)}function yO(e){for(let n of e.defs){if(n.type!==`ImportBinding`)continue;let{parent:e}=n.node;if(e?.type===`ImportDeclaration`&&t.isString(e.source.value))return e.source.value}}const bO=new Map;function xO(e,t){if(!e.startsWith(`.`))return!1;let n=Mb(e,t);if(!n.found)return!1;let r=bO.get(n.path);if(r!==void 0)return r;try{let e=d(n.path,`utf8`).includes(`<uiaspectratioconstraint`);return bO.set(n.path,e),e}catch{return bO.set(n.path,!1),!1}}function SO(e){for(let t of e.openingElement.attributes)if(t.type===`JSXAttribute`&&t.name.type===`JSXIdentifier`&&t.name.name===`scaled`&&t.value?.type===`JSXExpressionContainer`&&t.value.expression.type===`Literal`&&t.value.expression.value===!1)return!0;return!1}function CO(e){return e.type===`JSXElement`?hO(e)===pO:e.type===`JSXExpressionContainer`&&e.expression.type===`Identifier`&&e.expression.name===`UI_ASPECT_RATIO_CONSTRAINT`}function wO(e,t,n,r){if(t.has(e))return!0;if(n===void 0)return!1;let i=n.set.get(e);if(i===void 0||!z(i))return!1;let a=yO(i);return a!==void 0&&(xO(a,r)||mO.has(e))}const TO=b(`no-redundant-aspect-ratio-constraint`,`roblox`,{create(e){let{filename:t,sourceCode:n}=e,r=new Set,i=[],a;return{ArrowFunctionExpression(e){let t=_O(e),n=vO(e);t===void 0||n===void 0||n.type!==`JSXElement`&&n.type!==`JSXFragment`||gO(n)&&r.add(t)},FunctionDeclaration(e){let t=_O(e);if(t===void 0||e.body?.body.length!==1)return;let[n]=e.body.body;n?.type===`ReturnStatement`&&n.argument!==null&&gO(n.argument)&&r.add(t)},ImportDeclaration(e){a??=e},JSXElement(e){i.push(e)},"Program:exit"(){let o;a!==void 0&&(o=n.getScope(a));for(let n of i){let i=hO(n);if(i!==void 0&&!(!wO(i,r,o,t)||SO(n)))for(let t of n.children)CO(t)&&e.report({messageId:`redundantAspectRatioConstraint`,node:t})}}}},meta:{docs:{description:`Disallow redundant uiaspectratioconstraint children inside components that already manage their own aspect ratio internally.`},messages:{redundantAspectRatioConstraint:`This component already renders a uiaspectratioconstraint internally. Passing one as a child is redundant and will cause layout issues.`},schema:[],type:`problem`}});function EO(e,t){let n=m(t);if(n.type!==`CallExpression`||n.optional)return!1;let r=m(n.callee);if(r.type!==`MemberExpression`||r.optional||g(r)!==`create`)return!1;let i=m(r.object);return i.type!==`Identifier`||i.name!==`table`?!1:!v(e,i,`table`)}function DO(e,t){let n=m(t);if(n.type!==`NewExpression`||n.arguments.length!==1&&n.arguments.length!==2)return!1;let r=m(n.callee);return r.type!==`Identifier`||r.name!==`Array`?!1:!v(e,r,`Array`)}const OO=b(`no-table-create-map`,`roblox`,{create(e){return{CallExpression(t){if(t.optional)return;let n=m(t.callee);if(n.type!==`MemberExpression`||n.optional||g(n)!==`map`)return;let r=m(n.object);!EO(e.sourceCode,r)&&!DO(e.sourceCode,r)||e.report({messageId:`avoidConstructThenMap`,node:t})}}},meta:{docs:{description:`Disallow map(...) directly on table.create(...) and new Array(...) constructor patterns in roblox-ts.`},messages:{avoidConstructThenMap:`Do not map directly on table.create(...) or new Array(...). Allocate first, then write by index in a loop.`},schema:[],type:`suggestion`}});function kO({callee:e}){if(e.type!==`MemberExpression`||g(e)!==`await`||e.object.type!==`CallExpression`)return!1;let t=e.object.callee;return t.type!==`MemberExpression`||t.object.type!==`Identifier`||t.object.name!==`Promise`?!1:g(t)===`delay`}const AO=b(`no-task-wait`,`roblox`,{createOnce(e){return{CallExpression(t){if(kO(t)){e.report({messageId:`noPromiseDelayAwait`,node:t});return}let{callee:n}=t;n.type===`MemberExpression`&&n.object.type===`Identifier`&&n.object.name===`task`&&g(n)===`wait`&&e.report({messageId:`noTaskWait`,node:t})}}},meta:{docs:{description:`Disallow task.wait() and Promise.delay(...).await() calls.`},messages:{noPromiseDelayAwait:`Do not use Promise.delay(...).await() in tests. Advance deterministic schedulers or wait for the actual condition instead.`,noTaskWait:`Do not use task.wait() in tests. Advance deterministic schedulers or wait for the actual condition instead.`},schema:[],type:`problem`}}),jO=b(`no-unsupported-syntax`,`roblox`,{createOnce(e){let t;return{ArrayPattern(n){t.spreadDestructuring&&MO(e,n.elements)},before(){let[n]=e.options;t={globalThis:n?.globalThis??!0,labels:n?.labels??!0,prototype:n?.prototype??!0,regexLiterals:n?.regexLiterals??!0,spreadDestructuring:n?.spreadDestructuring??!0}},Identifier(n){t.globalThis&&n.name===`globalThis`&&e.report({messageId:`globalThis`,node:n})},LabeledStatement(n){t.labels&&e.report({messageId:`label`,node:n})},Literal(n){t.regexLiterals&&`regex`in n&&e.report({messageId:`regexLiteral`,node:n})},MemberExpression(n){t.prototype&&!n.computed&&n.property.type===`Identifier`&&n.property.name===`prototype`&&e.report({messageId:`prototype`,node:n.property})},ObjectPattern(n){t.spreadDestructuring&&MO(e,n.properties)}}},meta:{docs:{description:`Disallow syntax that roblox-ts cannot compile to Luau.`},messages:{globalThis:"`globalThis` is not supported in roblox-ts.",label:"`label` is not supported in roblox-ts.",prototype:"`.prototype` is not supported in roblox-ts.",regexLiteral:`Regex literals are not supported in roblox-ts.`,spreadDestructuring:"Operator `...` is not supported for destructuring!"},schema:[{additionalProperties:!1,properties:{globalThis:{default:!0,description:`Disallow the globalThis identifier.`,type:`boolean`},labels:{default:!0,description:`Disallow labeled statements.`,type:`boolean`},prototype:{default:!0,description:"Disallow `.prototype` member access.",type:`boolean`},regexLiterals:{default:!0,description:`Disallow regular expression literals.`,type:`boolean`},spreadDestructuring:{default:!0,description:`Disallow rest elements in destructuring patterns.`,type:`boolean`}},type:`object`}],type:`problem`}});function MO(e,t){for(let n of t)n?.type===`RestElement`&&e.report({messageId:`spreadDestructuring`,node:n})}var NO={AdGui:[25,133],AdPortal:[25,133],AlignOrientation:[7,6,25,133,72,152,155,133,343,172,359,204,379,76,440,132,455,132,471,207,515,132,720,132],AlignPosition:[23,132,25,133,155,133,187,36,189,2,344,144,348,204,361,172,379,86,436,135,454,132,471,207,515,132,720,132],AngularVelocity:[21,135,25,133,155,133,359,200,455,132,459,2,720,132],Animation:[25,133],AnimationConstraint:[15,212,20,212,25,133,155,133,250,132,318,212,320,212,348,204,359,204,681,152,720,132],AnimationController:[25,133],AnimationGraphDefinition:[25,133,324,133,443,10],AnimationNodeDefinition:[25,133,396,9],Animator:[25,133,438,133],ArcHandles:[25,133,103,155,682,200,720,133],Attachment:[25,133,72,152,720,132],AudioAnalyzer:[25,133,596,133,740,16],AudioChannelMixer:[25,133,259,13],AudioChannelSplitter:[25,133,259,13],AudioChorus:[25,133,69,132,120,192,377,197,452,234],AudioCompressor:[25,133,29,186,69,132,334,200,453,227,460,186,648,177],AudioDeviceInput:[1,0,25,133,388,132,722,212],AudioDeviceOutput:[25,133],AudioDistortion:[25,133,69,132,302,193],AudioEcho:[25,133,69,132,118,212,145,200,166,193,450,200,730,200],AudioEmitter:[2,133,25,133,31,242,125,100,398,100,437,32,473,100,578,15],AudioEqualizer:[25,133,69,132,223,200,327,200,365,200],AudioFader:[25,133,69,132,722,212],AudioFilter:[25,133,69,132,175,14,193,214,198,200,446,195],AudioFlanger:[25,133,69,132,120,192,377,197,452,234],AudioGate:[25,133,29,181,69,132,460,186],AudioLimiter:[25,133,69,132,352,200,460,181],AudioListener:[2,133,25,133,31,242,125,100,398,100,437,65,473,100,578,15],AudioPitchShifter:[25,133,69,132,424,201,740,16],AudioPlayer:[25,133,34,133,36,132,326,132,432,212,661,200,722,212],AudioRecorder:[25,133],AudioReverb:[25,133,69,132,115,193,116,202,119,212,126,212,145,200,147,182,222,213,258,183,328,218,329,200,456,231,730,179],AudioSpeechToText:[25,133,155,132,630,242],AudioTextToSpeech:[25,133,326,132,424,200,432,212,597,212,630,242,661,200,721,242,722,212],AudioTremolo:[25,133,69,132,120,212,146,193,193,234,567,200,585,200,604,200],AuroraScript:[25,133],AvatarAbilityRules:[25,133],AvatarAccessoryRules:[25,133],AvatarAnimationRules:[25,133],AvatarBodyRules:[25,133],AvatarClothingRules:[25,133],AvatarCollisionRules:[25,133],AvatarRules:[25,133],BallSocketConstraint:[25,133,155,133,312,132,449,187,472,200,687,132,688,178,689,228,698,228,720,132],Beam:[25,133,68,212,109,200,110,200,155,133,162,132,307,200,308,200,551,207,643,212,644,115,646,212,731,212,732,212,745,200],BillboardGui:[4,132,9,132,25,133,35,133,68,212,96,132,131,200,132,175,155,133,159,135,160,135,308,200,345,172,468,133,554,99,555,99,556,99,557,99,558,132,580,252,582,262,613,135,614,135,744,131],BlockMesh:[25,133,400,135,538,141,711,141],BloomEffect:[25,133,155,133,246,191,580,217,648,199],BlurEffect:[25,133,155,133,580,217],BodyAngularVelocity:[21,138,25,133,359,148,410,209],BodyColors:[25,133,212,168,266,168,283,156,481,168,498,156,677,159],BodyForce:[25,133,186,136],BodyGyro:[25,133,72,152,113,232,359,149,410,221],BodyPartDescription:[25,133,28,200,53,18,102,154,215,242],BodyPosition:[25,133,113,209,348,148,410,204,436,139],BodyThrust:[25,133,186,136,321,135],BodyVelocity:[25,133,348,148,410,209,708,138],Bone:[25,133,72,152,720,132],BoolValue:[25,133,704,132],BoxHandleAdornment:[6,4,9,132,25,133,72,152,103,155,565,5,580,141,583,135,682,200,720,133,743,175],BrickColorValue:[25,133],CFrameValue:[25,133,704,152],Camera:[25,133,72,153,74,22,167,236,168,33,184,151,213,133,214,212,703,132],CanvasGroup:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,133,144,132,205,170,206,200,245,53,247,133,260,200,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,720,133,743,212],CharacterMesh:[25,133,53,18,409,200],ChorusSoundEffect:[25,133,120,187,155,133,377,193,443,200,452,193],ClickDetector:[25,133,341,223],Color3Value:[25,133,704,154],ColorCorrectionEffect:[25,133,68,200,107,200,155,133,537,200,664,170],ColorGradingEffect:[25,133,155,133,665,116],CompositeValueCurve:[25,133,111,23],CompressorSoundEffect:[25,133,29,186,155,133,199,200,443,200,453,227,460,186,648,177],ConeHandleAdornment:[6,4,9,132,25,133,72,152,103,155,220,220,226,132,449,193,565,5,583,135,682,200,720,133,743,175],Configuration:[25,133],CornerWedgePart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,107,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,146,671,173,672,193,674,107,675,54,682,200,708,135],CurveAnimation:[25,133,324,133,443,10],CustomLog:[25,133],CylinderHandleAdornment:[6,4,9,132,13,224,25,133,72,152,103,155,220,212,244,200,449,212,565,5,583,135,682,200,720,133,743,175],CylinderMesh:[25,133,400,135,538,141,711,141],CylindricalConstraint:[5,3,14,3,16,132,17,228,18,200,19,200,21,200,25,133,155,133,238,200,312,132,319,228,330,178,331,200,383,172,384,230,385,200,386,200,472,200,532,132,563,200,564,200,580,187,590,132,591,132,597,200,624,200,627,200,698,228,699,234,708,200,720,132],Decal:[25,133,35,133,103,170,161,73,531,200,682,200,695,262,696,264,743,212],DepthOfFieldEffect:[25,133,155,133,165,196,185,184,236,207,391,196],DigitsRigDescription:[25,133,239,152,240,152,241,152,242,135,243,200,366,152,367,152,368,152,369,135,370,200,419,152,420,152,421,152,422,135,423,200,516,152,517,152,518,152,519,135,520,200,576,24,653,152,654,152,655,152,656,135,657,200],DistortionSoundEffect:[25,133,155,133,302,196,443,200],DoubleConstrainedValue:[25,133,360,212,376,200],DragDetector:[23,132,25,133,138,152,142,26,155,133,202,58,257,61,341,223,346,200,347,135,348,203,359,204,371,200,372,135,406,137,418,27,470,28,471,207,535,132,679,212,680,212,702,57],Dragger:[25,133],EchoSoundEffect:[25,133,117,212,145,200,155,133,166,193,443,200,730,200],EqualizerSoundEffect:[25,133,155,133,223,200,327,176,365,174,443,200],EulerRotationCurve:[25,133,533,93],ExplorerFilter:[25,133],FaceControls:[25,133],FileMesh:[25,133,400,135,538,141,711,141],Fire:[25,133,102,166,155,133,219,240,547,161,580,234,662,212],FlangeSoundEffect:[25,133,120,192,155,133,377,197,443,200,452,234],FloatCurve:[25,133],FloorWire:[25,133,103,155,112,200,612,229,645,264,682,200,708,220,720,133,741,185],Folder:[25,133],ForceField:[25,133,720,133],Frame:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,618,38,720,133,743,212],GeneratedFolder:[25,133],Handles:[25,133,103,155,618,41,682,200,720,133],HapticEffect:[25,133,325,132,436,135,449,225,690,42],Highlight:[25,133,121,43,155,133,169,169,174,193,407,170,408,200],HingeConstraint:[5,3,17,228,19,200,21,200,25,133,155,133,312,132,330,178,383,230,386,200,449,187,472,200,564,200,591,132,624,200,698,228,720,132],Humanoid:[25,133,33,133,37,133,40,133,67,133,101,45,128,46,129,242,157,133,217,206,218,47,224,200,253,235,254,233,349,206,355,237,389,206,390,72,466,133,475,48,701,133,728,211],HumanoidController:[25,133],HumanoidDescription:[25,133,54,190,94,200,122,212,161,200,164,200,203,200,214,212,221,212,230,200,252,200,381,200,416,200,444,212,534,200,571,200,607,132,622,200,700,132,727,200,733,212],HumanoidRigDescription:[25,133,86,135,87,135,88,200,89,152,208,135,209,135,210,200,211,152,262,135,263,135,264,200,265,152,267,135,268,135,269,200,270,152,271,135,272,135,273,200,274,152,275,135,276,135,277,200,278,152,279,135,280,135,281,200,282,152,287,135,288,135,289,200,290,152,293,135,294,135,295,200,296,152,297,135,298,135,299,200,300,152,392,135,393,135,394,200,395,152,477,135,478,135,479,200,480,152,482,135,483,135,484,200,485,152,486,135,487,135,488,200,489,152,490,135,491,135,492,200,493,152,494,135,495,135,496,200,497,152,501,135,502,135,503,200,504,152,507,135,508,135,509,200,510,152,511,135,512,135,513,200,514,152,526,135,527,135,528,200,529,152,598,135,599,135,600,200,601,152,723,135,724,135,725,200,726,152],IKControl:[25,133,155,133,156,152,400,152,443,200,589,184,690,49,729,212],ImageButton:[4,133,11,262,25,133,32,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,232,262,233,262,234,200,245,53,247,133,260,200,378,132,436,252,467,91,531,200,539,95,552,133,553,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,587,241,588,212,618,21,660,257,720,133,743,212],ImageHandleAdornment:[6,4,9,132,25,133,72,152,103,167,580,264,583,135,682,200,720,133,743,175],ImageLabel:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,232,262,233,262,234,200,245,53,247,133,260,200,436,252,467,91,531,200,539,95,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,587,241,588,212,660,257,720,133,743,212],InputAction:[25,133,155,133,690,51],InputBinding:[25,133,48,62,91,133,135,62,191,62,255,62,261,62,435,200,439,193,441,62,461,188,469,212,476,62,538,212,548,62,690,52,697,62,705,264,706,141],InputContext:[25,133,155,133,443,205,579,132],IntConstrainedValue:[25,133,360,207,376,200],IntValue:[25,133,704,200],LineForce:[23,132,25,133,155,133,249,132,332,205,348,172,454,132,720,132],LineHandleAdornment:[6,4,9,132,25,133,72,152,103,155,301,234,583,135,647,212,682,200,720,133,743,175],LinearVelocity:[25,133,155,133,187,36,188,133,313,140,317,200,344,143,348,205,353,265,429,262,442,140,454,133,459,2,549,136,707,135,709,126,720,132],LocalizationTable:[25,133,593,251],MakeupDescription:[25,133,28,200,335,66,405,200],MaterialVariant:[8,7,25,133,50,67,152,212,153,170,339,68,615,207],MeshPart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,107,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,134,132,154,133,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,462,89,499,173,500,193,505,107,506,54,525,200,530,135,580,147,671,173,672,193,674,107,675,54,682,200,708,135],Model:[25,133,303,70,380,71],Motor:[25,133,70,152,71,152,124,200,155,133,361,200],Motor6D:[25,133,70,152,71,152,124,200,155,133,361,200],MotorFeature:[25,133,163,74,237,50,286,63,668,117],NoCollisionConstraint:[25,133,155,133],Noise:[25,133],NumberPose:[25,133,148,84,149,85,704,200,729,212],NumberValue:[25,133,704,200],ObjectValue:[25,133],Pants:[25,133,103,170],Part:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,567,77,580,147,671,173,672,193,674,108,675,54,682,200,708,135],ParticleEmitter:[0,135,25,133,68,212,136,200,151,75,155,133,177,133,178,249,179,81,180,82,181,212,182,212,183,132,307,200,308,200,323,132,406,83,452,215,567,78,568,79,569,212,570,80,603,262,662,212,710,200,739,132,745,200],Path2D:[25,133,97,132,103,154,647,212,720,133,743,212],PitchShiftSoundEffect:[25,133,155,133,399,201,443,200],PlaneConstraint:[25,133,155,133,720,132],PluginAction:[25,133],PointLight:[25,133,68,212,102,170,155,133,451,238,566,132],PrismaticConstraint:[5,3,25,133,155,133,312,132,319,228,331,200,383,172,385,200,472,200,563,200,580,187,591,132,597,200,627,200,699,234,708,200,720,132],ProceduralModel:[25,133,303,70,380,71,580,145],ProximityPrompt:[3,246,25,133,35,133,93,133,155,133,158,87,201,59,225,200,256,60,341,207,350,200,397,242,465,133,618,88,692,262],PyramidHandleAdornment:[6,4,9,132,25,133,72,152,103,155,220,220,565,5,577,229,580,212,583,135,682,200,720,133,743,175],RayValue:[25,133],RealtimeMedia:[25,133],RelativeGui:[25,133],RenderingTest:[25,133,72,152,104,207,105,90,106,233,123,242,167,236,417,132,447,132,448,216,463,215,572,132,658,242,663,222],ReverbSoundEffect:[25,133,116,202,119,212,126,212,145,179,155,133,443,200,730,200],RigidConstraint:[25,133,155,133,720,132],RocketPropulsion:[25,133,81,194,356,222,358,226,359,150,626,135,628,229,651,180,652,234,683,232,684,221],RodConstraint:[25,133,155,133,301,234,309,239,310,239,312,132,647,186,720,132],RopeConstraint:[25,133,155,133,301,234,472,200,647,186,720,132,734,132,735,204,736,228,737,220,738,234],Rotate:[25,133,70,152,71,152,155,133],RotateP:[25,133,49,200,70,152,71,152,155,133],RotateV:[25,133,49,200,70,152,71,152,155,133],RotationCurve:[25,133],ScreenGui:[25,133,35,133,95,133,130,200,155,133,468,133,536,94,540,96,554,99,555,99,556,99,557,99,558,132,744,131],ScrollingFrame:[4,132,11,262,25,133,35,133,39,17,41,17,46,164,47,200,55,157,56,19,58,212,79,262,80,253,96,133,144,132,150,31,229,97,245,53,247,133,260,200,436,252,531,200,541,170,542,200,543,210,545,98,546,133,552,133,554,99,555,99,556,99,557,99,558,133,561,200,580,252,581,101,714,97,715,128,720,133,743,212],Seat:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,127,132,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,567,77,580,147,671,173,672,193,674,108,675,54,682,200,708,135],SelectionBox:[25,133,103,155,316,187,620,156,621,212,682,200,720,133],SelectionPartLasso:[25,133,103,155,682,200,720,133],SelectionPointLasso:[25,133,103,155,434,135,682,200,720,133],SelectionSphere:[25,133,103,155,620,156,621,212,682,200,720,133],Shirt:[25,133,103,170],ShirtGraphic:[25,133,103,170],Sky:[25,133,83,133,382,208,586,135,605,221,619,216],Smoke:[25,133,102,170,155,133,403,193,521,212,580,212,662,212],Sound:[2,133,25,133,325,132,430,132,431,132,432,212,433,132,522,204,523,207,524,92,661,200,722,193],SoundGroup:[25,133,722,193],Sparkles:[25,133,155,133,595,163,662,212],SpecialMesh:[25,133,364,69,400,135,538,141,711,141],SphereHandleAdornment:[6,4,9,132,25,133,72,152,103,155,449,212,565,5,583,135,682,200,720,133,743,175],SpotLight:[13,239,25,133,68,212,102,170,155,133,161,73,451,211,566,132],SpringConstraint:[25,133,98,225,114,200,155,133,192,212,312,132,348,172,351,234,373,200,449,191,610,200,647,186,720,132],StringValue:[25,133,704,242],StyleDerive:[25,133,443,200],StyleLink:[25,133],StyleQuery:[25,133],StyleRule:[25,133,443,200,562,242],StyleSheet:[25,133],SunRaysEffect:[25,133,155,133,246,189,602,212],SurfaceAppearance:[8,8,25,133,102,170,152,212,153,170,467,91],SurfaceGui:[4,133,9,132,25,133,35,133,68,212,80,266,96,132,155,133,161,73,308,200,345,200,426,233,468,133,554,99,555,99,556,99,557,99,558,132,584,105,666,200,744,131,745,200],SurfaceLight:[13,239,25,133,68,212,102,170,155,133,161,73,451,211,566,132],TextBox:[4,133,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,92,133,96,132,144,132,245,53,247,133,260,200,314,212,362,175,387,132,404,242,427,160,428,242,436,252,474,132,531,200,552,133,554,99,555,99,556,99,557,99,558,132,561,200,573,133,580,252,581,101,630,250,631,158,632,111,633,133,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],TextButton:[4,133,11,262,25,133,32,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,314,212,362,175,378,132,404,242,436,252,474,132,531,200,552,133,553,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,618,21,630,243,631,158,632,111,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],TextGenerator:[25,133,550,200,623,242,629,194,670,198],TextLabel:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,314,212,362,175,404,242,436,252,474,132,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,630,247,631,158,632,111,634,132,635,238,636,154,637,212,638,200,639,112,640,132,641,113,642,114,720,133,743,212],Texture:[25,133,35,133,103,170,161,73,401,200,402,200,531,200,616,220,617,220,682,200,695,262,696,264,743,212],Tool:[25,133,75,133,155,133,204,152,303,70,336,132,380,71,464,133,667,242],Torque:[25,133,155,133,459,1,676,135,720,132],TorsionSpringConstraint:[25,133,98,238,114,181,155,133,311,132,312,132,342,228,359,172,449,191,472,200,610,206,720,132],Trail:[25,133,68,212,155,133,162,132,304,220,307,200,308,200,351,200,373,186,643,212,644,115],TremoloSoundEffect:[25,133,120,212,146,193,155,133,193,234,443,200],TrussPart:[12,132,25,133,30,133,42,173,43,193,44,109,45,54,61,173,62,193,64,109,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,194,173,195,193,196,109,197,54,284,173,285,193,291,109,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,109,506,54,525,200,530,135,580,146,671,173,672,193,674,109,675,54,682,200,708,135],UIAspectRatioConstraint:[25,133,26,212,27,12,133,25],UICorner:[25,133,60,259,63,259,669,259,673,259],UIDragDetector:[25,133,66,118,137,263,139,119,140,200,141,120,142,121,143,252,155,133,346,200,347,252,371,200,372,252,470,122,559,255,560,239,691,123],UIFlexItem:[25,133,176,125,207,200,251,56,575,200],UIGradient:[25,133,155,133,400,262,531,200,538,212,659,39,690,40],UIGridLayout:[25,133,84,256,85,254,170,34,171,200,227,44,592,102,606,103,712,127],UIListLayout:[25,133,170,35,227,44,228,124,251,56,411,258,592,102,712,127,713,124,742,132],UIPadding:[25,133,412,258,413,258,414,258,415,258],UIPageLayout:[22,133,25,133,90,132,148,29,149,30,170,34,200,133,227,44,411,258,544,133,592,102,678,133,686,212,712,127],UIScale:[25,133,538,212],UIShadow:[25,133,52,258,102,154,155,133,400,252,602,252,682,200,743,175],UISizeConstraint:[25,133,354,261,374,262],UIStroke:[24,11,25,133,57,258,59,20,102,154,155,133,315,64,611,104,647,212,682,200,743,212],UITableLayout:[25,133,170,35,172,132,173,132,227,44,333,110,411,252,592,102,712,127],UITextSizeConstraint:[25,133,357,206,375,212],UniversalConstraint:[25,133,155,133,312,132,342,228,449,188,472,200,720,132],ValueCurve:[25,133],Vector3Curve:[25,133],Vector3Value:[25,133,704,135],VectorForce:[23,132,25,133,155,133,186,142,459,1,720,132],VehicleSeat:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,127,132,154,133,194,173,195,193,196,107,197,54,216,133,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,356,219,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,147,608,200,609,200,649,200,650,200,671,173,672,193,674,108,675,54,676,207,682,200,685,212,708,135],VelocityMotor:[25,133,70,152,71,152,108,200,124,200,155,133,361,200],VideoDisplay:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,260,200,436,252,467,91,531,200,539,95,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,660,257,716,170,717,262,718,262,719,200,720,133,743,212],VideoFrame:[4,132,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,245,53,247,133,248,55,260,200,325,132,363,129,433,132,436,252,522,204,523,212,524,92,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,661,200,720,133,722,212,743,212],VideoPlayer:[25,133,248,55,326,132,363,129,432,212,661,200,722,212],ViewportFrame:[4,132,10,165,11,262,25,133,35,133,41,17,46,164,47,200,55,157,56,19,58,212,96,132,144,132,231,170,234,200,245,53,247,133,260,200,305,162,306,134,436,252,531,200,552,132,554,99,555,99,556,99,557,99,558,132,561,200,580,252,581,101,720,133,743,212],WedgePart:[12,132,25,133,30,133,42,173,43,193,44,107,45,54,61,173,62,193,64,106,65,54,72,152,76,133,77,133,78,133,82,133,99,244,100,200,102,171,154,133,190,37,194,173,195,193,196,107,197,54,284,173,285,193,291,107,292,54,322,132,337,132,338,67,340,242,425,152,458,200,499,173,500,193,505,107,506,54,525,200,530,135,580,147,671,173,672,193,674,107,675,54,682,200,708,135],Weld:[25,133,70,152,71,152,155,133],WeldConstraint:[25,133],Wire:[25,133,594,248,625,245],WireframeHandleAdornment:[6,4,9,132,25,133,72,152,103,155,538,141,583,135,647,212,682,200,720,133,743,175],WorldModel:[25,133,303,70,380,71],WrapDeformer:[25,133,73,152,235,152],WrapLayer:[25,133,38,130,51,152,73,152,155,133,235,152,405,212,445,212,457,152,574,200],WrapTarget:[25,133,73,152,235,152,610,200],WrapTextureTransfer:[25,133,693,260,694,261]},PO=`Acceleration.AccessType.AcousticSimulationEnabled.ActionText.Active.ActuatorType.AdornCullingMode.AlignType.AlphaMode.AlwaysOnTop.Ambient.AnchorPoint.Anchored.Angle.AngularActuatorType.AngularDamping.AngularLimitsEnabled.AngularResponsiveness.AngularRestitution.AngularSpeed.AngularStrength.AngularVelocity.Animated.ApplyAtCenterOfMass.ApplyStrokeMode.Archivable.AspectRatio.AspectType.AssetId.Attack.AudioCanCollide.AudioInteractionGroup.AutoButtonColor.AutoJumpEnabled.AutoLoad.AutoLocalize.AutoPlay.AutoRotate.AutoSkin.AutomaticCanvasSize.AutomaticScalingEnabled.AutomaticSize.BackParamA.BackParamB.BackSurface.BackSurfaceInput.BackgroundColor3.BackgroundTransparency.Backward.BaseAngle.BaseMaterial.BindOffset.BlurRadius.BodyPart.BodyTypeScale.BorderColor3.BorderMode.BorderOffset.BorderSizePixel.BorderStrokePosition.BottomLeftRadius.BottomParamA.BottomParamB.BottomRightRadius.BottomSurface.BottomSurfaceInput.BoundingBehavior.BreakJointsOnDeath.Brightness.Bypass.C0.C1.CFrame.CageOrigin.CameraType.CanBeDropped.CanCollide.CanQuery.CanTouch.CanvasPosition.CanvasSize.CartoonFactor.CastShadow.CelestialBodiesShown.CellPadding.CellSize.ChestRangeMax.ChestRangeMin.ChestSize.ChestTposeAdjustment.Circular.ClampMagnitudeToOne.ClearTextOnFocus.ClickablePrompt.ClimbAnimation.ClipToDeviceSafeArea.ClipsDescendants.Closed.Coils.CollisionGroup.CollisionGroupId.CollisionType.Color.Color3.ComparisonDiffThreshold.ComparisonMethod.ComparisonPsnrThreshold.Contrast.CurrentAngle.CurveSize0.CurveSize1.CurveType.CycleOffset.D.Damping.DecayRatio.DecayTime.Delay.DelayTime.Density.Depth.DepthMode.DepthScale.Description.DesiredAngle.DiffractionEnabled.Diffusion.Disabled.DisplayDistanceType.DisplayName.DisplayOrder.DistanceLowerLimit.DistanceUpperLimit.DominantAxis.DoubleSided.Down.Drag.DragAxis.DragFrame.DragRelativity.DragRotation.DragSpace.DragStyle.DragUDim2.Draggable.DryLevel.Duty.EarlyDelayTime.EasingDirection.EasingStyle.ElasticBehavior.EmissionDirection.EmissiveStrength.EmissiveTint.EnableFluidForces.Enabled.EndEffectorOffset.EvaluateStateMachine.Exclusivity.ExtentsOffset.ExtentsOffsetWorldSpace.Face.FaceCamera.FaceId.FallAnimation.FarIntensity.Feedback.FieldOfView.FieldOfViewMode.FillColor.FillDirection.FillDirectionMaxCells.FillEmptySpaceColumns.FillEmptySpaceRows.FillTransparency.FilterType.FlexMode.FlipbookBlendFrames.FlipbookIncompatible.FlipbookLayout.FlipbookMode.FlipbookSizeX.FlipbookSizeY.FlipbookStartRandom.Focus.FocusDistance.Force.ForceLimitMode.ForceLimitsEnabled.ForceRelativeTo.FormFactor.Forward.FreeLength.Frequency.FrontParamA.FrontParamB.FrontSurface.FrontSurfaceInput.Gain.GainMakeup.GamepadInputEnabled.GamepadKeyCode.GamepadModeSwitchKeyCode.GraphicTShirt.Grip.GroupColor3.GroupTransparency.GrowRatio.HeadBaseRangeMax.HeadBaseRangeMin.HeadBaseSize.HeadBaseTposeAdjustment.HeadColor3.HeadLocked.HeadScale.HeadShape.HeadsUpDisplay.HealthDisplayDistance.HealthDisplayType.Heat.Height.HeightScale.HighCutFrequency.HighGain.HipHeight.HoldDuration.Hollow.HorizontalAlignment.HorizontalFlex.HorizontalScrollBarInset.IdleAnimation.ImageColor3.ImageRectOffset.ImageRectSize.ImageTransparency.ImportOrigin.InFocusRadius.InOut.InclinationAngle.Index1TposeAdjustment.Index2TposeAdjustment.Index3TposeAdjustment.IndexRange.IndexSize.InnerRadius.InputSink.Intensity.Interactable.InternalVideoUsage.InverseSquareLaw.IsKinematic.ItemLineAlignment.JumpAnimation.JumpHeight.JumpPower.KeyCode.KeyboardKeyCode.KeyboardModeSwitchKeyCode.LateDelayTime.Layout.LayoutOrder.Left.LeftAnkleRangeMax.LeftAnkleRangeMin.LeftAnkleSize.LeftAnkleTposeAdjustment.LeftArmColor3.LeftClavicleRangeMax.LeftClavicleRangeMin.LeftClavicleSize.LeftClavicleTposeAdjustment.LeftElbowRangeMax.LeftElbowRangeMin.LeftElbowSize.LeftElbowTposeAdjustment.LeftHipRangeMax.LeftHipRangeMin.LeftHipSize.LeftHipTposeAdjustment.LeftKneeRangeMax.LeftKneeRangeMin.LeftKneeSize.LeftKneeTposeAdjustment.LeftLegColor3.LeftParamA.LeftParamB.LeftRight.LeftShoulderRangeMax.LeftShoulderRangeMin.LeftShoulderSize.LeftShoulderTposeAdjustment.LeftSurface.LeftSurfaceInput.LeftToeBaseRangeMax.LeftToeBaseRangeMin.LeftToeBaseSize.LeftToeBaseTposeAdjustment.LeftWristRangeMax.LeftWristRangeMin.LeftWristSize.LeftWristTposeAdjustment.Length.Level.LevelOfDetail.Lifetime.LightColor.LightDirection.LightEmission.LightInfluence.LimitAngle0.LimitAngle1.LimitEnabled.LimitsEnabled.LineDirection.LineHeight.LineJoinMode.LineThickness.LineVelocity.LinearDamping.LinearResponsiveness.LinearStrength.Location.Locked.LockedToPart.Loop.Looped.Looping.LowGain.LowShelfFrequency.LowShelfGain.LowerAngle.LowerLimit.Magnitude.MajorAxis.MakeupGain.MakeupType.ManualActivationOnly.Massless.Material.MaterialPattern.MaterialVariant.MaxActivationDistance.MaxAngle.MaxAngularVelocity.MaxAxesForce.MaxDistance.MaxDragAngle.MaxDragTranslation.MaxForce.MaxHealth.MaxIndicatorDistance.MaxLength.MaxLevel.MaxPlanarAxesForce.MaxSize.MaxSlopeAngle.MaxSpeed.MaxTextSize.MaxThrust.MaxTorque.MaxValue.MaxVelocity.MaxVisibleGraphemes.MaximumResolution.MeshType.MidGain.Middle1TposeAdjustment.Middle2TposeAdjustment.Middle3TposeAdjustment.MiddleRange.MiddleSize.MinDragAngle.MinDragTranslation.MinLength.MinSize.MinTextSize.MinValue.Mix.Modal.Mode.ModelStreamingMode.MoodAnimation.MoonAngularSize.MotorMaxAcceleration.MotorMaxAngularAcceleration.MotorMaxForce.MotorMaxTorque.MultiLine.Muted.NameDisplayDistance.NameOcclusion.NearIntensity.NeckRangeMax.NeckRangeMin.NeckSize.NeckTposeAdjustment.NodeType.ObjectText.OcclusionEnabled.Octave.Offset.OffsetStudsU.OffsetStudsV.Opacity.OpenTypeFeatures.Order.Orientation.OutlineColor.OutlineTransparency.OverlayTextureId.P.Padding.PaddingBottom.PaddingLeft.PaddingRight.PaddingTop.Pants.PerfTest.PermissionPolicy.Pinky1TposeAdjustment.Pinky2TposeAdjustment.Pinky3TposeAdjustment.PinkyRange.PinkySize.Pitch.PivotOffset.PixelsPerStud.PlaceholderColor3.PlaceholderText.PlaneVelocity.PlayOnRemove.PlaybackRegionsEnabled.PlaybackSpeed.Playing.Point.PointerIndex.Position.PositionType.PreferLodEnabled.PressedThreshold.PrimaryAxisOnly.PrimaryModifier.PrimaryTangentAxis.Priority.ProportionScale.Puffiness.Q.QualityAuto.QualityLevel.Radius.RampTime.Range.Rate.Ratio.ReactionForceEnabled.ReactionTorqueEnabled.ReferenceFrequency.ReferenceOrigin.Reflectance.RelativeTo.Release.ReleasedThreshold.RenderFidelity.RenderingTestFrameCount.RequiresHandle.RequiresLineOfSight.RequiresNeck.ResampleMode.ResetOnSpawn.ResponseCurve.ResponseStyle.Responsiveness.Restitution.ReverbEnabled.RichText.RigType.Right.RightAnkleRangeMax.RightAnkleRangeMin.RightAnkleSize.RightAnkleTposeAdjustment.RightArmColor3.RightClavicleRangeMax.RightClavicleRangeMin.RightClavicleSize.RightClavicleTposeAdjustment.RightElbowRangeMax.RightElbowRangeMin.RightElbowSize.RightElbowTposeAdjustment.RightHipRangeMax.RightHipRangeMin.RightHipSize.RightHipTposeAdjustment.RightKneeRangeMax.RightKneeRangeMin.RightKneeSize.RightKneeTposeAdjustment.RightLegColor3.RightParamA.RightParamB.RightShoulderRangeMax.RightShoulderRangeMin.RightShoulderSize.RightShoulderTposeAdjustment.RightSurface.RightSurfaceInput.RightToeBaseRangeMax.RightToeBaseRangeMin.RightToeBaseSize.RightToeBaseTposeAdjustment.RightWristRangeMax.RightWristRangeMin.RightWristSize.RightWristTposeAdjustment.RigidityEnabled.Ring1TposeAdjustment.Ring2TposeAdjustment.Ring3TposeAdjustment.RingRange.RingSize.RiseVelocity.RollOffMaxDistance.RollOffMinDistance.RollOffMode.RootPriority.RootRangeMax.RootRangeMin.RootSize.RootTposeAdjustment.RotVelocity.Rotation.RotationAxisVisible.RotationOrder.RunAnimation.RunLocally.SafeAreaCompatibility.Saturation.Scale.ScaleType.ScreenInsets.ScrollBarImageColor3.ScrollBarImageTransparency.ScrollBarThickness.ScrollWheelInputEnabled.ScrollingDirection.ScrollingEnabled.SecondaryColor.SecondaryModifier.SecondaryTangentAxis.Seed.Segments.Selectable.Selected.SelectionBehaviorDown.SelectionBehaviorLeft.SelectionBehaviorRight.SelectionBehaviorUp.SelectionGroup.SelectionModeDragSpeed.SelectionModeRotateSpeed.SelectionOrder.Selector.ServoMaxForce.ServoMaxTorque.Shading.Shadows.Shape.ShapeInOut.ShapePartial.ShapeStyle.Shirt.ShouldSkip.ShowNativeInput.ShrinkFactor.ShrinkRatio.Side.Sides.SimulationFidelity.Sink.Size.SizeConstraint.SizeOffset.SizeRelativeOffset.SizingMode.Skew.SkyboxOrientation.SliceCenter.SliceScale.SmoothTime.SoftlockAngularServoUponReachingTarget.SoftlockServoUponReachingTarget.SortOrder.SourceLocaleId.SourceName.SparkleColor.SpectrumEnabled.Speed.SpineRangeMax.SpineRangeMin.SpineSize.SpineTposeAdjustment.Spread.SpreadAngle.Square.StarCount.StartCorner.StaticFacialAnimation.Steer.SteerFloat.Stiffness.StrokeSizingMode.StudsBetweenTextures.StudsOffset.StudsOffsetWorldSpace.StudsPerTile.StudsPerTileU.StudsPerTileV.Style.SunAngularSize.SurfaceColor3.SurfaceTransparency.SwimAnimation.SystemPrompt.TargetAngle.TargetName.TargetOffset.TargetPosition.TargetRadius.Temperature.Text.TextColor3.TextDirection.TextEditable.TextScaled.TextSize.TextStrokeColor3.TextStrokeTransparency.TextTransparency.TextTruncate.TextWrapped.TextXAlignment.TextYAlignment.TextureLength.TextureMode.TextureSize.TextureSpeed.Thickness.Threshold.Throttle.ThrottleFloat.ThrustD.ThrustP.Thumb1TposeAdjustment.Thumb2TposeAdjustment.Thumb3TposeAdjustment.ThumbRange.ThumbSize.Ticket.TileMode.TileSize.TimePosition.TimeScale.Timeout.TintColor.TonemapperPreset.ToolPunchThroughDistance.ToolTip.TopBottom.TopLeftRadius.TopP.TopParamA.TopParamB.TopRightRadius.TopSurface.TopSurfaceInput.Torque.TorsoColor3.TouchInputEnabled.TrackballRadialPullFactor.TrackballRollFactor.Transform.Transparency.TurnD.TurnP.TurnSpeed.TweenTime.TwistLimitsEnabled.TwistLowerAngle.TwistUpperAngle.Type.UIDragSpeedAxisMapping.UIOffset.UVMaxBound.UVMinBound.UVOffset.UVScale.Up.UpperAngle.UpperLimit.UseAvatarSettings.UseJumpPower.VRSwitchKeyCode.VRTiltAndRollEnabled.Value.Vector2Scale.Vector3Scale.VectorVelocity.Velocity.VelocityConstraintMode.VelocityInheritance.VertexColor.VerticalAlignment.VerticalFlex.VerticalScrollBarInset.VerticalScrollBarPosition.VideoColor3.VideoRectOffset.VideoRectSize.VideoTransparency.Visible.VoiceId.Volume.WaistRangeMax.WaistRangeMin.WaistSize.WaistTposeAdjustment.WalkAnimation.WalkSpeed.Weight.WetLevel.Width0.Width1.WidthScale.WinchEnabled.WinchForce.WinchResponsiveness.WinchSpeed.WinchTarget.WindAffectsDrag.WindowSize.WireRadius.Wraps.ZIndex.ZIndexBehavior.ZOffset`.split(`.`),FO=[[0,`AccessModifierType`,`Deny`],[0,`ActuatorRelativeTo`,`Attachment0`],[0,`ActuatorRelativeTo`,`World`],[0,`ActuatorType`,`None`],[0,`AdornCullingMode`,`Automatic`],[0,`AdornShading`,`Default`],[0,`AlignType`,`AllAxes`],[0,`AlphaMode`,`Opaque`],[0,`AlphaMode`,`Overlay`],[0,`AnimationNodeType`,`InvalidNode`],[0,`AnimationPriority`,`Action`],[0,`ApplyStrokeMode`,`Contextual`],[0,`AspectType`,`FitWithinMaxSize`],[0,`AudioChannelLayout`,`Stereo`],[0,`AudioFilterType`,`Peak`],[0,`AudioSimulationFidelity`,`Automatic`],[0,`AudioWindowSize`,`Medium`],[0,`AutomaticSize`,`None`],[0,`BodyPart`,`Head`],[0,`BorderMode`,`Outline`],[0,`BorderStrokePosition`,`Outer`],[0,`ButtonStyle`,`Custom`],[0,`CameraType`,`Fixed`],[0,`CompositeValueCurveType`,`NumberRange`],[0,`DigitsRigDescriptionSide`,`None`],[0,`DominantAxis`,`Width`],[0,`DragDetectorDragStyle`,`TranslatePlane`],[0,`DragDetectorPermissionPolicy`,`Everybody`],[0,`DragDetectorResponseStyle`,`Physical`],[0,`EasingDirection`,`Out`],[0,`EasingStyle`,`Back`],[0,`ElasticBehavior`,`WhenScrollable`],[0,`EmitterPositionType`,`Parent`],[0,`FieldOfViewMode`,`Vertical`],[0,`FillDirection`,`Horizontal`],[0,`FillDirection`,`Vertical`],[0,`ForceLimitMode`,`Magnitude`],[0,`FormFactor`,`Brick`],[0,`FrameStyle`,`Custom`],[0,`GradientTileMode`,`Clamp`],[0,`GradientType`,`Linear`],[0,`HandlesStyle`,`Resize`],[0,`HapticEffectType`,`UIClick`],[0,`HighlightDepthMode`,`AlwaysOnTop`],[0,`HorizontalAlignment`,`Left`],[0,`HumanoidCollisionType`,`OuterBox`],[0,`HumanoidDisplayDistanceType`,`Viewer`],[0,`HumanoidHealthDisplayType`,`DisplayWhenDamaged`],[0,`HumanoidRigType`,`R6`],[0,`IKControlType`,`Transform`],[0,`InOut`,`Center`],[0,`InputActionType`,`Bool`],[0,`InputBindingType`,`Automatic`],[0,`InputSink`,`None`],[0,`InputType`,`NoInput`],[0,`InternalVideoUsage`,`Default`],[0,`ItemLineAlignment`,`Automatic`],[0,`KeyCode`,`ButtonL2`],[0,`KeyCode`,`ButtonR1`],[0,`KeyCode`,`ButtonX`],[0,`KeyCode`,`E`],[0,`KeyCode`,`LeftControl`],[0,`KeyCode`,`Unknown`],[0,`LeftRight`,`Center`],[0,`LineJoinMode`,`Round`],[0,`ListenerPositionType`,`Parent`],[0,`MakeupType`,`Face`],[0,`Material`,`Plastic`],[0,`MaterialPattern`,`Regular`],[0,`MeshType`,`Head`],[0,`ModelLevelOfDetail`,`Automatic`],[0,`ModelStreamingMode`,`Default`],[0,`NameOcclusion`,`OccludeAll`],[0,`NormalId`,`Front`],[0,`NormalId`,`Right`],[0,`NormalId`,`Top`],[0,`OrientationAlignmentMode`,`TwoAttachment`],[0,`PartType`,`Block`],[0,`ParticleEmitterShape`,`Box`],[0,`ParticleEmitterShapeInOut`,`Outward`],[0,`ParticleEmitterShapeStyle`,`Volume`],[0,`ParticleFlipbookLayout`,`None`],[0,`ParticleFlipbookMode`,`Loop`],[0,`ParticleOrientation`,`FacingCamera`],[0,`PoseEasingDirection`,`In`],[0,`PoseEasingStyle`,`Linear`],[0,`PositionAlignmentMode`,`TwoAttachment`],[0,`ProximityPromptExclusivity`,`OnePerButton`],[0,`ProximityPromptStyle`,`Default`],[0,`RenderFidelity`,`Automatic`],[0,`RenderingTestComparisonMethod`,`psnr`],[0,`ResamplerMode`,`Default`],[0,`RollOffMode`,`Inverse`],[0,`RotationOrder`,`XYZ`],[0,`SafeAreaCompatibility`,`FullscreenExtension`],[0,`ScaleType`,`Stretch`],[0,`ScreenInsets`,`CoreUISafeInsets`],[0,`ScrollBarInset`,`None`],[0,`ScrollingDirection`,`XY`],[0,`SelectionBehavior`,`Escape`],[0,`SimulationMode`,`Default`],[0,`SizeConstraint`,`RelativeXY`],[0,`SortOrder`,`Name`],[0,`StartCorner`,`TopLeft`],[0,`StrokeSizingMode`,`FixedSize`],[0,`SurfaceGuiSizingMode`,`FixedSize`],[0,`SurfaceType`,`Inlet`],[0,`SurfaceType`,`Smooth`],[0,`SurfaceType`,`Studs`],[0,`SurfaceType`,`Universal`],[0,`TableMajorAxis`,`RowMajor`],[0,`TextDirection`,`Auto`],[0,`TextTruncate`,`None`],[0,`TextXAlignment`,`Center`],[0,`TextYAlignment`,`Center`],[0,`TextureMode`,`Stretch`],[0,`TonemapperPreset`,`Default`],[0,`TopBottom`,`Center`],[0,`UIDragDetectorBoundingBehavior`,`Automatic`],[0,`UIDragDetectorDragRelativity`,`Absolute`],[0,`UIDragDetectorDragSpace`,`Parent`],[0,`UIDragDetectorDragStyle`,`TranslatePlane`],[0,`UIDragDetectorResponseStyle`,`Offset`],[0,`UIDragSpeedAxisMapping`,`XY`],[0,`UIFlexAlignment`,`None`],[0,`UIFlexMode`,`None`],[0,`VelocityConstraintMode`,`Vector`],[0,`VerticalAlignment`,`Top`],[0,`VerticalScrollBarPosition`,`Right`],[0,`VideoSampleSize`,`Full`],[0,`WrapLayerAutoSkin`,`Disabled`],[0,`ZIndexBehavior`,`Global`],[1,!1],[1,!0],[10,[-1,-1,-1]],[10,[0,0,0]],[10,[0,1,0]],[10,[0,180,90]],[10,[0,2,0]],[10,[0,50,0]],[10,[1,0,0]],[10,[1,1,1]],[10,[1e3,0,0]],[10,[1e3,1e3,1e3]],[10,[1e4,1e4,1e4]],[10,[12,12,12]],[10,[2,2,2]],[10,[4,1.2000000476837158,2]],[10,[4e3,4e3,4e3]],[10,[4e5,0,4e5]],[10,[4e5,4e5,0]],[2,[0,0,-5,1,0,0,0,1,0,0,0,1]],[2,[0,0,0,1,0,0,0,1,0,0,0,1]],[2,[0,20,20,1,0,0,0,.7071068286895752,.7071068286895752,0,-.7071068286895752,.7071068286895752]],[3,[0,0,0]],[3,[.05098039284348488,.4117647111415863,.6745098233222961]],[3,[.05098039656877518,.4117647409439087,.6745098233222961]],[3,[.10588235408067703,.16470588743686676,.2078431397676468]],[3,[.10588236153125763,.16470588743686676,.20784315466880798]],[3,[.1568627506494522,.49803924560546875,.27843138575553894]],[3,[.5,.5,.5]],[3,[.545098066329956,.3137255012989044,.21568629145622253]],[3,[.5490196347236633,.5490196347236633,.5490196347236633]],[3,[.5647059082984924,.09803922474384308,1]],[3,[.6392157077789307,.6352941393852234,.6470588445663452]],[3,[.7843137383460999,.7843137383460999,.7843137383460999]],[3,[.9254902601242065,.545098066329956,.27450981736183167]],[3,[.9490196704864502,.9529412388801575,.9529412388801575]],[3,[.9921569228172302,.917647123336792,.5529412031173706]],[3,[1,0,0]],[3,[1,1,1]],[3,[163,162,165]],[4,`inf`],[4,-.5],[4,-10],[4,-1],[4,-20],[4,-40],[4,-45],[4,-6],[4,.0010000000474974513],[4,.009999999776482582],[4,.019999999552965164],[4,.03999999910593033],[4,.05000000074505806],[4,.0625],[4,.10000000149011612],[4,.15000000596046448],[4,.20000000298023224],[4,.25],[4,.30000001192092896],[4,.4000000059604645],[4,.44999998807907104],[4,.5],[4,.699999988079071],[4,.7070000171661377],[4,.75],[4,.8500000238418579],[4,.8999999761581421],[4,.949999988079071],[4,0],[4,1.25],[4,1.5],[4,1e7],[4,1e4],[4,1e3],[4,100],[4,10],[4,11],[4,1250],[4,12],[4,16],[4,1],[4,2e4],[4,2e3],[4,20],[4,21],[4,24],[4,250],[4,25],[4,2],[4,3e3],[4,30],[4,32],[4,360],[4,3],[4,4e3],[4,40],[4,45],[4,4],[4,5e5],[4,5e3],[4,500],[4,50],[4,5],[4,7.199999809265137],[4,70],[4,89],[4,8],[4,90],[4,9],[5,[0,0,0,0]],[6,``],[6,`Button`],[6,`Default`],[6,`Input`],[6,`Interact`],[6,`Label`],[6,`Output`],[6,`Particle texture must be 1024 by 1024 to use flipbooks.`],[6,`TextBox`],[6,`en-us`],[7,[0,0,0,0]],[7,[0,0,2,0]],[7,[0,100,0,100]],[7,[0,300,0,300]],[7,[0,5,0,5]],[7,[1,0,1,0]],[8,[0,0]],[8,[0,8]],[9,[`-inf`,`-inf`]],[9,[`inf`,`inf`]],[9,[0,0]],[9,[1,0]],[9,[1,1]],[9,[1e3,1e3]],[9,[800,600]]];const IO=new Set([`Name`,`Parent`]),LO=new Set(Array.from(IO,e=>e.toLowerCase())),RO=new Map(Object.entries(NO).map(([e])=>[e.toLowerCase(),e]));function zO(e){let t=new Map;for(let[n,r]of Object.entries(e)){if(!$O(r))continue;let e=n.toLowerCase();t.has(e)||t.set(e,{propertyName:n,value:r})}return t}const BO=[`Enum`,`bool`,`CFrame`,`Color3`,`number`,`Rect`,`string`,`UDim2`,`UDim`,`Vector2`,`Vector3`];function VO(e){let[n]=e;if(!t.isNumber(n))return;let r=BO[n];if(r===void 0)return;let i=r===`Enum`?{enumType:e[1],type:r,value:e[2]}:{type:r,value:e[1]};return $O(i)?i:void 0}const HO=new Map([[`TextLabel`,new Map([[`text`,{propertyName:`Text`,value:{type:`string`,value:``}}]])],[`UICorner`,new Map([[`cornerradius`,{propertyName:`CornerRadius`,value:{type:`UDim`,value:[0,0]}}]])]]);function UO(){let e=new Map;for(let[t,n]of Object.entries(NO)){let r={};for(let e=0;e<n.length;e+=2){let t=n[e],i=n[e+1];if(t===void 0||i===void 0)continue;let a=PO[t],o=FO[i],s=o===void 0?void 0:VO(o);a!==void 0&&s!==void 0&&(r[a]=s)}e.set(t,zO(r))}return e}const WO=UO();function GO(e,t){return e.type===`Identifier`&&e.name===t}function KO(e){return e.type===`Literal`&&typeof e.value==`boolean`}function qO(e){if(e.type!==`JSXIdentifier`)return;let t=RO.get(e.name.toLowerCase());if(t!==void 0&&e.name!==t)return t}function JO(e){if(e.type===`JSXIdentifier`)return e.name}function YO({value:e}){if(e!==null){if(e.type===`Literal`)return e;if(e.type===`JSXExpressionContainer`&&e.expression.type!==`JSXEmptyExpression`)return e.expression}}function XO(e,t){let n=t.toLowerCase(),r=HO.get(e)?.get(n);if(r!==void 0)return r;let i=WO.get(e);if(i!==void 0)return i.get(n)}function ZO(e){return LO.has(e.toLowerCase())}function QO(e){return t.isNumber(e)||e===`inf`||e===`-inf`}function $O(e){if(!t.isObject(e)||!t.isString(e.type)||!(`value`in e))return!1;switch(e.type){case`bool`:return typeof e.value==`boolean`;case`CFrame`:return Array.isArray(e.value)&&e.value.length===12&&e.value.every(QO);case`Color3`:return Array.isArray(e.value)&&e.value.length===3&&e.value.every(t.isNumber);case`Enum`:return t.isString(e.enumType)&&t.isString(e.value);case`number`:return QO(e.value);case`Rect`:case`UDim2`:return Array.isArray(e.value)&&e.value.length===4&&e.value.every(QO);case`string`:return t.isString(e.value);case`UDim`:case`Vector2`:return Array.isArray(e.value)&&e.value.length===2&&e.value.every(QO);case`Vector3`:return Array.isArray(e.value)&&e.value.length===3&&e.value.every(QO)}return!1}function ek(e){let t=m(e);if(t.type!==`NewExpression`||!GO(t.callee,`Instance`))return;let[n]=t.arguments;if(!(n===void 0||n.type===`SpreadElement`||!he(n)))return n.value}function tk(e){return Array.isArray(e)}function nk(e){return t.isObject(e)}function rk(e,t,n=new WeakSet){if(tk(e)){for(let r of e)if(rk(r,t,n))return!0;return!1}if(!nk(e)||n.has(e))return!1;if(n.add(e),e.type===`Identifier`&&e.name===t)return!0;for(let r of Object.values(e))if(rk(r,t,n))return!0;return!1}function ik(e){let t=[],n=e;for(;n.type===`MemberExpression`;){if(n.computed||n.property.type!==`Identifier`)return;t.unshift(n.property.name);let{object:e}=n;if(e.type===`Identifier`)return t.unshift(e.name),t;if(e.type!==`MemberExpression`)return;n=e}if(n.type===`Identifier`)return t.unshift(n.name),t}function ak(e){let t=ik(e);return t?.length===2&&t[0]===`math`&&t[1]===`huge`}function ok(e){return e===`inf`?1/0:e===`-inf`?-1/0:e}function sk(e,t){return ok(e)===t}function ck(e,t){if(e.length!==t.length)return!1;for(let[n,r]of e.entries()){let e=t[n];if(e===void 0||!sk(r,e))return!1}return!0}function $(e){if(ze(e))return e.value;if(ak(e))return 1/0;if(e.type!==`UnaryExpression`||e.operator!==`+`&&e.operator!==`-`)return;let t=$(e.argument);if(t!==void 0)return e.operator===`+`?t:-t}function lk(e){if(e.length!==2)return;let[t,n]=e;if(t!==void 0&&n!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`)return[t,n]}function uk(e){if(e.length!==3)return;let[t,n,r]=e;if(t!==void 0&&n!==void 0&&r!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`&&r.type!==`SpreadElement`)return[t,n,r]}function dk(e){if(e.length!==4)return;let[t,n,r,i]=e;if(t!==void 0&&n!==void 0&&r!==void 0&&i!==void 0&&t.type!==`SpreadElement`&&n.type!==`SpreadElement`&&r.type!==`SpreadElement`&&i.type!==`SpreadElement`)return[t,n,r,i]}function fk(e,t,n,r){if(e.type===`MemberExpression`){let r=ik(e);return r?.length===2&&r[0]===t&&r[1]===`zero`?n:void 0}if(!(e.type!==`NewExpression`||!GO(e.callee,t)))return e.arguments.length===0?n:r(e.arguments)}function pk(e){return fk(e,`Vector2`,[0,0],mk)}function mk(e){let t=lk(e);if(t===void 0)return;let[n,r]=t,i=$(n),a=$(r);if(i!==void 0&&a!==void 0)return[i,a]}function hk(e){let t=uk(e);if(t===void 0)return;let[n,r,i]=t,a=$(n),o=$(r),s=$(i);if(a!==void 0&&o!==void 0&&s!==void 0)return[a,o,s]}function gk(e){return fk(e,`Vector3`,[0,0,0],hk)}function _k(e){if(!(e.type!==`NewExpression`||!GO(e.callee,`UDim`)))return e.arguments.length===0?[0,0]:mk(e.arguments)}function vk(e){let t=dk(e);if(t===void 0)return;let[n,r,i,a]=t,o=$(n),s=$(r),c=$(i),l=$(a);if(o!==void 0&&s!==void 0&&c!==void 0&&l!==void 0)return[o,s,c,l]}function yk(e){if(e.type===`CallExpression`){let t=ik(e.callee),n=mk(e.arguments);if(t===void 0||n===void 0)return;let[r,i]=n;return t.length===2&&t[0]===`UDim2`&&t[1]===`fromOffset`?[0,r,0,i]:t.length===2&&t[0]===`UDim2`&&t[1]===`fromScale`?[r,0,i,0]:void 0}if(!(e.type!==`NewExpression`||!GO(e.callee,`UDim2`)))return e.arguments.length===0?[0,0,0,0]:vk(e.arguments)}function bk(e){if(!(e.type!==`NewExpression`||!GO(e.callee,`Rect`)))return e.arguments.length===0?[0,0,0,0]:vk(e.arguments)}function xk(e){let[t,n,r]=e,i=$(t),a=$(n),o=$(r);if(i!==void 0&&a!==void 0&&o!==void 0)return[i,a,o]}function Sk(e){if(e.type===`CallExpression`){let t=ik(e.callee),n=uk(e.arguments);if(n===void 0||t?.length!==2||t[0]!==`Color3`||t[1]!==`fromRGB`)return;let r=xk(n);if(r===void 0)return;let[i,a,o]=r;return[Math.fround(i/255),Math.fround(a/255),Math.fround(o/255)]}if(e.type!==`NewExpression`||!GO(e.callee,`Color3`))return;if(e.arguments.length===0)return[0,0,0];let t=uk(e.arguments);if(t!==void 0)return xk(t)}function Ck(e){if(e.type!==`NewExpression`||!GO(e.callee,`CFrame`))return;if(e.arguments.length===0)return[0,0,0,1,0,0,0,1,0,0,0,1];let t=hk(e.arguments);if(t===void 0)return;let[n,r,i]=t;return[n,r,i,1,0,0,0,1,0,0,0,1]}function wk(e){let t=ik(e);if(t?.length!==3||t[0]!==`Enum`)return;let[,n,r]=t;if(n!==void 0&&r!==void 0)return{enumType:n,value:r}}function Tk(e,t){switch(t.type){case`bool`:return KO(e)&&e.value===t.value;case`CFrame`:{let n=Ck(e);return n!==void 0&&ck(t.value,n)}case`Color3`:{let n=Sk(e);return n!==void 0&&n[0]===t.value[0]&&n[1]===t.value[1]&&n[2]===t.value[2]}case`Enum`:{let n=wk(e);return n!==void 0&&n.enumType===t.enumType&&n.value===t.value}case`number`:{let n=$(e);return n!==void 0&&sk(t.value,n)}case`Rect`:{let n=bk(e);return n!==void 0&&ck(t.value,n)}case`string`:return he(e)&&e.value===t.value;case`UDim`:{let n=_k(e);return n!==void 0&&ck(t.value,n)}case`UDim2`:{let n=yk(e);return n!==void 0&&ck(t.value,n)}case`Vector2`:{let n=pk(e);return n!==void 0&&ck(t.value,n)}case`Vector3`:{let n=gk(e);return n!==void 0&&ck(t.value,n)}default:return!1}}const Ek=b(`no-useless-default`,`roblox`,{create(e){let{sourceCode:t}=e;function n(e){return t.getCommentsBefore(e).length>0||t.getCommentsAfter(e).length>0||t.getCommentsInside(e).length>0}function r(e){let r=t.getTokenBefore(e),i=t.getTokenAfter(e);if(n(e)||r!==null&&t.commentsExistBetween(r,e)||i!==null&&t.commentsExistBetween(e,i))return;let[a]=e.range;for(;a>0;){let e=t.text[a-1];if(e===` `||e===` `){--a;continue}break}return t=>t.removeRange([a,e.range[1]])}function i(e,r){if(e.attributes.some(e=>e.type===`JSXSpreadAttribute`))return;let i=t.getTokenBefore(r);if(i===null||n(r)||t.commentsExistBetween(i,r))return;let a=t.getTokenAfter(r);if(!(a!==null&&t.commentsExistBetween(r,a)))return e=>e.removeRange([i.range[1],r.range[1]])}function a(t,n,i){if(n.operator!==`=`||n.left.type!==`MemberExpression`||n.left.computed||n.left.object.type!==`Identifier`||n.left.property.type!==`Identifier`)return;let a=i.get(n.left.object.name);if(a===void 0)return;let o=n.left.property.name;if(ZO(o))return;let s=XO(a.className,o);if(s===void 0||!Tk(n.right,s.value))return;let c=r(t);if(c===void 0){e.report({data:{className:a.className,propertyName:s.propertyName},messageId:`uselessDefault`,node:n.left});return}e.report({data:{className:a.className,propertyName:s.propertyName},fix:c,messageId:`uselessDefault`,node:n.left})}function o(e,t){for(let[n]of t)for(let r of e.arguments)if(r.type!==`SpreadElement`&&rk(r,n)){t.delete(n);break}}function s(e,t){if(e.left.type===`Identifier`||e.left.type===`MemberExpression`)for(let[n]of t)rk(e.right,n)&&t.delete(n)}function c(e,t){if(e.argument!==null)for(let[n]of t)rk(e.argument,n)&&t.delete(n)}function l(e){let t=new Map;for(let n of e)u(n,t)}function u(e,t){if(e.type===`ExpressionStatement`){d(e,t);return}if(e.type===`ReturnStatement`){c(e,t);return}e.type===`VariableDeclaration`&&f(e,t)}function d(e,t){let n=m(e.expression);if(n.type===`AssignmentExpression`){a(e,n,t),s(n,t);return}n.type===`CallExpression`&&o(n,t)}function f(e,t){if(e.kind===`const`)for(let n of e.declarations){if(n.id.type!==`Identifier`||n.init===null)continue;let e=ek(n.init);e!==void 0&&t.set(n.id.name,{className:e})}}return{BlockStatement(e){l(e.body)},JSXOpeningElement(t){let n=qO(t.name);if(n!==void 0)for(let r of t.attributes){if(r.type===`JSXSpreadAttribute`)continue;let a=JO(r.name);if(a===void 0||ZO(a))continue;let o=XO(n,a);if(o===void 0)continue;let s=YO(r);if(!(r.value===null&&o.value.type===`bool`&&o.value.value)&&(s===void 0||!Tk(s,o.value)))continue;let c=i(t,r);if(c===void 0){e.report({data:{className:n,propertyName:o.propertyName},messageId:`uselessDefault`,node:r});continue}e.report({data:{className:n,propertyName:o.propertyName},fix:c,messageId:`uselessDefault`,node:r})}},Program(e){l(e.body)}}},meta:{docs:{description:`Disallow Roblox JSX properties whose values already match the class defaults.`},fixable:`code`,messages:{uselessDefault:`Remove "{{propertyName}}" from {{className}}. It already matches the default value.`},schema:[],type:`suggestion`}}),Dk=ws({name:`warn`,alternative:`Log`,category:`roblox`,message:`{{name}}() is a raw output function lacking log levels, timestamps, and filtering. Production systems require structured logging for debugging and monitoring. Replace {{name}}(...) with {{alternative}}.`,messageId:`noWarn`,ruleName:`no-warn`});function Ok({type:e}){return e===`Identifier`||e===`MemberExpression`||e===`CallExpression`||e===`NewExpression`||e===`ThisExpression`}function kk(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function Ak(e){return m(e).type===`Literal`}function jk(e){let n=m(e);if(n.type!==`Literal`||!t.isNumber(n.value))return;let{value:r}=n;if(r<=0||r>=1)return;let i=1/r;return Number.isInteger(i)?i:void 0}function Mk(e,t){let n=e.getText(kk(t));return Ok(m(t))?n:`(${n})`}const Nk=b(`prefer-idiv`,`roblox`,{createOnce(e){return{CallExpression(t){if(t.optional)return;let n=m(t.callee);if(n.type!==`MemberExpression`||n.optional||g(n)!==`floor`)return;let r=m(n.object);if(r.type!==`Identifier`||r.name!==`math`||v(e.sourceCode,r,`math`)||t.arguments.length!==1)return;let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`)return;let a=m(i);if(a.type!==`BinaryExpression`)return;let o,s;if(a.operator===`/`)o=a.left,s=e.sourceCode.getText(kk(a.right));else if(a.operator===`*`){let e=jk(a.right);if(e!==void 0&&!Ak(a.left))o=a.left,s=String(e);else{let e=jk(a.left);if(e===void 0||Ak(a.right))return;o=a.right,s=String(e)}}else return;e.report({fix:n=>n.replaceText(t,`${Mk(e.sourceCode,o)}.idiv(${s})`),messageId:`useIdiv`,node:t})}}},meta:{docs:{description:`Prefer .idiv() for integer division instead of math.floor(x / y) or math.floor(x * 0.5).`,recommended:!0},fixable:`code`,messages:{useIdiv:`Use .idiv() instead of math.floor(x / y) or math.floor(x * 0.5) for integer division.`},schema:[],type:`suggestion`}});function Pk(e){if(e===void 0)return!1;let t=e;for(;t.type===`TSTypeAnnotation`;)t=t.typeAnnotation;return t.type===`TSNumberKeyword`||t.type===`TSTypeReference`&&t.typeName.type===`Identifier`&&t.typeName.name===`Number`}function Fk(e){return e.type!==`PrivateIdentifier`}function Ik(e){let n=m(e);return n.type===`Literal`&&!t.isNumber(n.value)}function Lk(e){if(e.type===`Parameter`){let t=e.name;if(t.typeAnnotation!==void 0&&t.typeAnnotation!==null)return!Pk(t.typeAnnotation);let{parent:n}=t;return n.type===`AssignmentPattern`&&Ik(n.right)}if(e.type!==`Variable`||e.node.type!==`VariableDeclarator`)return!1;let{id:t,init:n}=e.node;return t.type===`Identifier`&&t.typeAnnotation!==void 0&&t.typeAnnotation!==null?!Pk(t.typeAnnotation):n!==null&&Ik(n)}function Rk(e,t){let n=_(e.getScope(t),t.name);if(n===void 0)return!1;for(let e of n.defs)if(Lk(e))return!0;return!1}function zk(e,t){let n=t;for(;n.type===`ParenthesizedExpression`;)n=n.expression;if(n.type===`TSAsExpression`||n.type===`TSTypeAssertion`)return!Pk(n.typeAnnotation);if(Ik(n))return!0;let r=m(n);return r.type===`Identifier`&&Rk(e,r)}function Bk(e,t){return e.getText(m(t))}function Vk(e){let t=e;for(;t.type===`ParenthesizedExpression`;)t=t.expression;return t}function Hk(e,t){let n=Vk(t);return n.type===`SequenceExpression`?`(${e.getText(n)})`:e.getText(n)}function Uk(e,t){if(t.test.type!==`BinaryExpression`)return;let{alternate:n,consequent:r,test:i}=t,{left:a,operator:o,right:s}=i;if(!Fk(a)||!Fk(s)||!Z(a)||!Z(s)||zk(e,a)||zk(e,s))return;let c=Bk(e,a),l=Bk(e,s),u=Bk(e,n),d=Bk(e,r),f=o===`>`||o===`>=`,p=o===`<`||o===`<=`;if(f&&c===u&&l===d||p&&c===d&&l===u)return`min`;if(f&&c===d&&l===u||p&&c===u&&l===d)return`max`}const Wk=b(`prefer-math-min-max`,`roblox`,{create(e){let{sourceCode:t}=e;return{ConditionalExpression(n){if(v(t,n,`math`))return;let r=Uk(t,n);if(r===void 0||n.test.type!==`BinaryExpression`)return;let{left:i,right:a}=n.test;if(!Fk(i)||!Fk(a))return;let o=Hk(t,i),s=Hk(t,a);e.report({fix(e){return e.replaceText(n,`math.${r}(${o}, ${s})`)},messageId:`preferMathMethod`,node:n})}}},meta:{docs:{description:`Prefer math.min() and math.max() over simple clamp-like ternaries.`,recommended:!0},fixable:`code`,messages:{preferMathMethod:"Use `math.min()` or `math.max()` instead of this ternary comparison."},schema:[],type:`suggestion`}}),Gk=new Set([`ReadonlyRecord`,`Record`]);function Kk(e){return e.type===`TSTypeReference`&&e.typeName.type===`Identifier`&&Gk.has(e.typeName.name)}function qk(e){if(e.id.type!==`Identifier`)return;let t=ae(e.id);if(t===void 0)return;let{typeAnnotation:n}=t;if(!Kk(n))return;let{typeArguments:r}=n;if(r?.params.length!==2)return;let[i,a]=r.params;if(i!==void 0&&a!==void 0&&a.type===`TSLiteralType`&&a.literal.type===`Literal`&&a.literal.value===!0)return i}function Jk(e){if(e?.type!==`ObjectExpression`)return!1;for(let t of e.properties)if(t.type!==`Property`||t.value.type!==`Literal`||t.value.value!==!0)return!1;return!0}const Yk=b(`prefer-modding-inspect`,`roblox`,{create(e){let{sourceCode:t}=e;return{VariableDeclarator(n){if(n.id.type!==`Identifier`)return;let r=n.id.name;if(!Jk(n.init))return;let i=qk(n);if(i===void 0)return;let a=t.getText(i);e.report({data:{enumType:a},fix(e){return e.replaceTextRange([n.range[0],n.range[1]],`${r} = Modding.inspect<Record<${a}, true>>()`)},messageId:`preferModdingInspect`,node:n.id})}}},meta:{docs:{description:`Prefer Modding.inspect over manually enumerating every enum member in a Record<Enum, true>.`,recommended:!0},fixable:`code`,messages:{preferModdingInspect:`Replace manual {{enumType}} enumeration with Modding.inspect<Record<{{enumType}}, true>>().`},schema:[],type:`suggestion`}});function Xk(e,t){return ze(e)&&e.value===t}function Zk(e){if(e===`ColorSequence`)return`ColorSequenceKeypoint`;if(e===`NumberSequence`)return`NumberSequenceKeypoint`}function Qk(e,t,n){if(e.type!==`NewExpression`||!Me(e,t)||e.arguments.length!==2)return;let[r,i]=e.arguments;if(r!==void 0&&r.type!==`SpreadElement`&&i!==void 0&&i.type!==`SpreadElement`)return Xk(r,n)?i:void 0}function $k(e,t,n){if(t.arguments.length!==2)return;let[r,i]=t.arguments;if(r===void 0||r.type===`SpreadElement`||i===void 0||i.type===`SpreadElement`)return;let a=e.sourceCode.getText(r);if(a===e.sourceCode.getText(i))return{messageId:`preferSingleOverload`,replacement:`new ${n}(${a})`}}function eA(e,t,n,r){if(t.arguments.length!==1)return;let[i]=t.arguments;if(i===void 0||i.type===`SpreadElement`||i.type!==`ArrayExpression`||i.elements.length!==2)return;let[a,o]=i.elements;if(a===void 0||o===void 0||a===null||o===null||a.type===`SpreadElement`||o.type===`SpreadElement`)return;let s=Qk(a,r,0),c=Qk(o,r,1);if(s===void 0||c===void 0)return;let l=e.sourceCode.getText(s),u=e.sourceCode.getText(c);return{messageId:l===u?`preferSingleOverload`:`preferTwoPointOverload`,replacement:l===u?`new ${n}(${l})`:`new ${n}(${l}, ${u})`}}const tA=b(`prefer-sequence-overloads`,`roblox`,{createOnce(e){return{NewExpression(t){if(t.callee.type!==`Identifier`)return;let n=t.callee.name,r=Zk(n);if(r===void 0)return;let i=$k(e,t,n)??eA(e,t,n,r);i!==void 0&&e.report({fix:e=>e.replaceText(t,i.replacement),messageId:i.messageId,node:t})}}},meta:{docs:{description:`Prefer direct ColorSequence and NumberSequence overloads over identical direct arguments and two-keypoint arrays.`,recommended:!0},fixable:`code`,messages:{preferSingleOverload:`Use the single-value sequence overload instead of two identical keypoints.`,preferTwoPointOverload:`Use the two-value sequence overload instead of constructing a two-keypoint array.`},schema:[],type:`suggestion`}});function nA(e){return e.length===2}function rA(e){return e.type===`MemberExpression`&&!e.computed}function iA(e,t){if(e.type!==`CallExpression`)return!1;let{callee:n}=e;if(!rA(n)||n.property.name!==t||!nA(e.arguments))return!1;let[r,i]=e.arguments;return r.type!==`SpreadElement`&&i.type!==`SpreadElement`}function aA(e,t){if(e.declarations.length!==1)return;let[n]=e.declarations;if(n===void 0)return;let{id:r,init:i}=n;if(i===null||r.type!==`Identifier`||!iA(i,t))return;let{callee:a}=i;if(!rA(a))return;let[o,s]=i.arguments;if(o!==void 0&&s!==void 0&&o.type!==`SpreadElement`&&s.type!==`SpreadElement`)return{componentNode:s,entityNode:o,node:i,queryType:t,variableDeclaration:e,variableDeclarator:n,variableName:r.name,worldNode:a.object}}const oA=new Set([`ConditionalExpression`,`DoWhileStatement`,`ForStatement`,`IfStatement`,`WhileStatement`]);function sA(e){return t.isObject(e)&&`parent`in e}function cA(e){return t.isObject(e)&&t.isString(e.type)?e.type:void 0}function lA(e){return t.isObject(e)&&t.isString(e.operator)?e.operator:void 0}function uA(e){return cA(e)===`LogicalExpression`&&lA(e)===`&&`}function dA(e){return t.isObject(e)&&e.type===`Identifier`&&t.isString(e.name)}function fA(e){let{parent:t}=e;if(uA(t))return!0;let n=cA(t);if(n===void 0||!oA.has(n))return!1;let r=e;for(;r!==t&&sA(r);){let e=r.parent;if(uA(e))return!0;r=e}return!1}function pA(e){if(e.isWrite())return!1;let{identifier:t}=e;return dA(t)?fA(t):!1}function mA(e,t,n){return _(n.getScope(t),e)?.references.some(pA)??!1}function hA(e,t){return e.every(e=>mA(e.variableName,e.variableDeclaration,t))}const gA=/^[\s;]*$/u;function _A(e,t,n){if(e===void 0)return!0;if(n.getText(e.worldNode)!==n.getText(t.worldNode)||n.getText(e.entityNode)!==n.getText(t.entityNode)||e.queryType!==t.queryType)return!1;let[,r]=e.variableDeclaration.range,[i]=t.variableDeclaration.range,a=n.text.slice(r,i);return gA.test(a)}function vA(e,t){if(e.length<2)return;let[n]=e;if(n===void 0)return;let{sourceCode:r}=t,i=r.getText(n.worldNode),a=r.getText(n.entityNode),o=e.map(e=>e.variableName),s=e.map(e=>r.getText(e.componentNode));yA(e,t,`const ${o.length===1?o[0]:`[${o.join(`, `)}]`} = ${i}.get(${a}, ${s.join(`, `)});`,`preferSingleGet`,n)}function yA(e,t,n,r,i){let a=e.at(0)?.variableDeclaration,o=e.at(-1)?.variableDeclaration;a!==void 0&&o!==void 0&&t.report({data:{fixedCode:n},fix(e){let[t]=a.range,[,r]=o.range;return e.replaceTextRange([t,r],n)},messageId:r,node:i.node})}function bA(e,t){if(e.length<2)return;let{sourceCode:n}=t;if(!hA(e,n))return;let[r]=e;r!==void 0&&yA(e,t,`const hasAll = ${n.getText(r.worldNode)}.has(${n.getText(r.entityNode)}, ${e.map(e=>n.getText(e.componentNode)).join(`, `)});`,`preferSingleHas`,r)}const xA=b(`prefer-single-world-query`,`roblox`,{create(e){let{sourceCode:t}=e,n=[],r=[];function i(){n.length>=2&&vA(n,e),n=[]}function a(){r.length>=2&&bA(r,e),r=[]}function o(){i(),a()}return{":statement:not(VariableDeclaration[kind='const'])":o,"Program:exit":o,"VariableDeclaration[kind='const']"(e){let s=aA(e,`get`);if(s!==void 0){let e=n.at(-1);e!==void 0&&!_A(e,s,t)&&i(),n.push(s),a();return}let c=aA(e,`has`);if(c!==void 0){let e=r.at(-1);e!==void 0&&!_A(e,c,t)&&a(),r.push(c),i();return}o()}}},meta:{docs:{description:`Enforce combining multiple world.get() or world.has() calls into a single call for better Jecs performance.`},fixable:`code`,messages:{preferSingleGet:`Multiple world.get() calls on the same entity should be combined into a single call for better performance. Suggested fix: {{fixedCode}}`,preferSingleHas:`Multiple world.has() calls on the same entity should be combined into a single call for better performance. Suggested fix: {{fixedCode}}`},schema:[],type:`suggestion`}});function SA(e){return e.type===`PrivateIdentifier`}function CA(e){return e===`+`||e===`-`||e===`*`||e===`/`||e===`%`}function wA(e){return e.type===`BinaryExpression`&&CA(e.operator)&&!SA(e.left)&&!SA(e.right)}function TA(e){switch(e.type){case`BinaryExpression`:{if(!wA(e))return;let{left:t,right:n}=e,r=TA(t),i=TA(n);return r===void 0||i===void 0?void 0:`${r} ${e.operator} ${i}`}case`Identifier`:return e.name;case`Literal`:return Di(e.value)?String(e.value):void 0;case`UnaryExpression`:{let t=TA(e.argument);return t===void 0||e.operator!==`+`&&e.operator!==`-`?void 0:`${e.operator}${t}`}default:return}}function EA(e,t,n){switch(e){case`%`:return n===0?void 0:t%n;case`*`:return t*n;case`+`:return t+n;case`-`:return t-n;case`/`:return n===0?void 0:t/n;default:return}}function DA(e){switch(e.type){case`BinaryExpression`:{if(!wA(e))return;let{left:t,right:n}=e,r=DA(t),i=DA(n);return r===void 0||i===void 0?void 0:EA(e.operator,r,i)}case`Identifier`:return;case`Literal`:return Number(e.value);case`UnaryExpression`:{let t=DA(e.argument);return t===void 0?void 0:e.operator===`+`?t:e.operator===`-`?-t:void 0}default:return}}function OA(e){if(e.length!==4)return;let[t,n,r,i]=e;if(t===void 0||n===void 0||r===void 0||i===void 0||t.type===`SpreadElement`||n.type===`SpreadElement`||r.type===`SpreadElement`||i.type===`SpreadElement`)return;let a=TA(t),o=TA(n),s=TA(r),c=TA(i);if(a!==void 0&&o!==void 0&&s!==void 0&&c!==void 0)return{offsetXText:o,offsetYText:c,scaleXText:a,scaleYText:s}}const kA=b(`prefer-udim2-shorthand`,`roblox`,{create(e){return{NewExpression(t){if(!Me(t,`UDim2`))return;let n=OA(t.arguments);if(n===void 0)return;let[r,i,a,o]=t.arguments;if(r===void 0||i===void 0||a===void 0||o===void 0||r.type===`SpreadElement`||i.type===`SpreadElement`||a.type===`SpreadElement`||o.type===`SpreadElement`)return;let s=DA(r),c=DA(i),l=DA(a),u=DA(o);if(s!==0||c!==0||l!==0||u!==0){if(c===0&&u===0){e.report({fix(e){return e.replaceText(t,`UDim2.fromScale(${n.scaleXText}, ${n.scaleYText})`)},messageId:`preferFromScale`,node:t});return}s===0&&l===0&&e.report({fix(e){return e.replaceText(t,`UDim2.fromOffset(${n.offsetXText}, ${n.offsetYText})`)},messageId:`preferFromOffset`,node:t})}}}},meta:{docs:{description:`Prefer UDim2.fromScale() or UDim2.fromOffset() over new UDim2() when all offsets or all scales are zero.`},fixable:`code`,messages:{preferFromOffset:`Use UDim2.fromOffset() instead of new UDim2() when all scales are 0.`,preferFromScale:`Use UDim2.fromScale() instead of new UDim2() when all offsets are 0.`},schema:[],type:`suggestion`}}),AA=s({classes:id}).readonly();function jA(e){if(!AA.allows(e))return new Map;let n=new Map;for(let[r,i]of Object.entries(e.classes))t.isString(i)&&n.set(r,i);return n}function MA(e){return e?.type===`module`||e?.type===`global`}function NA(e){if(e.type===`ImportDefaultSpecifier`)return e.local.name;if(e.type===`ImportSpecifier`){if(e.imported.type===`Identifier`)return e.imported.name;if(t.isString(e.imported.value))return e.imported.value}}function PA(e,t,n){if(e.callee.type===`Identifier`){let r=t.get(e.callee.name);if(r===void 0)return;let i=n.get(r);return i===void 0?void 0:{className:r,importSource:i}}if(e.callee.type===`MemberExpression`&&e.callee.property.type===`Identifier`){let t=e.callee.property.name,r=n.get(t);return r===void 0?void 0:{className:t,importSource:r}}}function FA(e,n,r){if(!t.isString(e.source.value))return;let i=e.source.value;for(let[t,a]of n)if(a===i)for(let n of e.specifiers)NA(n)===t&&r.set(n.local.name,t)}const IA=b(`require-module-level-instantiation`,`roblox`,{create(e){let{sourceCode:t}=e,n=jA(e.options[0]);if(n.size===0)return{};let r=new Map;return{ImportDeclaration(e){FA(e,n,r)},NewExpression(i){let a=PA(i,r,n);a===void 0||MA(t.getScope(i))||e.report({data:{className:a.className,importSource:a.importSource},messageId:`mustBeModuleLevel`,node:i})}}},meta:{docs:{description:`Require configured classes to be instantiated at module level only.`},messages:{mustBeModuleLevel:`'{{className}}' from '{{importSource}}' must be instantiated at module level only.`},schema:[{additionalProperties:!1,properties:{classes:{additionalProperties:{type:`string`},description:`Class names mapped to the import source that must be instantiated at module scope.`,type:`object`}},type:`object`}],type:`problem`}}),LA=e({meta:{name:`small-rules`},rules:{"array-type-generic":Vd,"ban-instances":MT,"ban-react-fc":Rm,"ban-types":Gd,"consistent-compound-words":cf,"directive-disable-enable-pair":hi,"directive-no-aggregating-enable":gi,"directive-no-duplicate-disable":_i,"directive-no-restricted-disable":vi,"directive-no-unlimited-disable":yi,"directive-no-unused-enable":bi,"directive-no-use":xi,"directive-require-description":wi,"enforce-ianitor-check-type":UT,"isolated-functions":sa,"memoized-effect-dependencies":fh,"no-adjust-state-on-prop-change":Og,"no-array-constructor-elements":bE,"no-array-constructor-index-assignment":AE,"no-array-size-assignment":zE,"no-async-constructor":Ma,"no-async-in-system":vD,"no-cascading-set-state":Ag,"no-chain-state-updates":Mg,"no-chained-type-assertions":at,"no-color3-constructor":SD,"no-commented-code":xo,"no-conditional-empty-object-spread":st,"no-constant-condition-with-break":Yo,"no-dead-store":Cs,"no-derived-state":Pg,"no-error":Ts,"no-event-handler":Ig,"no-events-in-events-callback":HD,"no-external-store-subscription":Vg,"no-filter-map-chain":Es,"no-floating-point-equality":Qs,"no-giant-component":r_,"no-god-components":p_,"no-ianitor-in-function-body":WD,"no-ianitor-success-access":XD,"no-identity-map":sc,"no-increment-decrement":uc,"no-initialize-state":h_,"no-inline-property-on-memo-component":v_,"no-instance-methods-without-this":iO,"no-known-value-widening":on,"no-loop-iterable-mutation":wc,"no-module-mocking":fn,"no-native-properties-spread":dO,"no-new-instance-in-use-memo":N_,"no-object-parameters":wn,"no-pass-data-to-parent":L_,"no-pass-live-state-to-parent":U_,"no-print":fO,"no-recursive":Dc,"no-redundant-aspect-ratio-constraint":TO,"no-reflect-apply":On,"no-reflect-get":kn,"no-render-helper-functions":cv,"no-reset-all-state-on-prop-change":lv,"no-restricted-property-assignment":Rc,"no-runtime-typeof":Mn,"no-shape-in-symbol-names":Pn,"no-spec-file-extension":uf,"no-static-react-create-element":Cv,"no-table-create-map":OO,"no-task-wait":AO,"no-trivial-assertions":ul,"no-underscore-react-props":wv,"no-unknown-parameters":zn,"no-unknown-returns":Wn,"no-unknown-type-aliases":qn,"no-unsafe-dictionary-type":Xn,"no-unsupported-syntax":jO,"no-unused-imports":bl,"no-unused-use-memo":Tv,"no-use-memo-simple-expression":Dv,"no-use-of-empty-return-value":wl,"no-useless-constants":ou,"no-useless-default":Ek,"no-useless-use-effect":ib,"no-useless-use-memo":db,"no-useless-use-spring":yb,"no-variadic-spread":du,"no-warn":Dk,"no-widen-then-assert":Sr,"only-type-imports":fu,"prefer-class-properties":bu,"prefer-constant-dispatch":kb,"prefer-context-stack":hx,"prefer-direct-hook-imports":yx,"prefer-early-return":Tu,"prefer-expect-assertions":Xu,"prefer-hoisted-jsx-elements":Lx,"prefer-hoisted-jsx-object-properties":Gx,"prefer-idiv":Nk,"prefer-local-portal-component":nS,"prefer-math-min-max":Wk,"prefer-modding-inspect":Yk,"prefer-module-scope-constants":$u,"prefer-padding-components":bS,"prefer-pascal-case-enums":xf,"prefer-sequence-overloads":tA,"prefer-single-world-query":xA,"prefer-singular-enums":Pf,"prefer-ternary-conditional-rendering":LS,"prefer-udim2-shorthand":kA,"prefer-use-reducer":zS,"prevent-abbreviations":Mm,"react-hooks-strict-return":nC,"require-async-suffix":Pm,"require-module-level-instantiation":IA,"require-named-effect-functions":lC,"require-paired-calls":bd,"require-react-component-keys":IC,"require-react-display-names":GC,"require-safety-comment-for-type-assertion":Nr,"require-switch-case-braces":Cd,"require-throw-error-capture":Nd,"require-unicode-regex":Rd,"rerender-memo-with-default-value":QC,"strict-component-boundaries":cw,"use-exhaustive-dependencies":dT,"use-hook-at-top-level":wT}});export{ab as DependencyMode,LA as default};