/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/fnmatch@1.0.2/src/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
const cherow=require("cherow"),{generate:generate}=require("astring"),equal=require("fast-deep-equal"),ast_equals_value=(a,v)=>{let x;return eval("x = "+generate(a)),equal(v,x)},matchObjectPattern=(e,t)=>{if("object"!=typeof e)return!1;for(var r=0;r<t.length;r++){const a=t[r];if(!e.hasOwnProperty(a.key.name))return!1;if(!matches(e[a.key.name],a.value))return!1}return!0},matchIdentifier=()=>!0,matchAssignmentPattern=(e,t)=>ast_equals_value(t,e),matchArrayPattern=(e,t)=>{for(let r=0;r<t.length;r++){if("RestElement"===t[r].type)return!0;if(!(r<e.length&&matches(e[r],t[r])))return!1}return t.length===e.length},matchEmpty=(e,t)=>e===t,matches=(e,t)=>void 0===t?matchEmpty(e,t):"Identifier"===t.type?matchIdentifier(e,t.name):"ObjectPattern"===t.type?matchObjectPattern(e,t.properties):"AssignmentPattern"===t.type?matchAssignmentPattern(e,t.right):"ArrayPattern"===t.type&&matchArrayPattern(e,t.elements),match=e=>(...t)=>{const r=t.map((e=>e.toString())).map((e=>e.match(/function\s*\(/)?`let x = ${e}`:e)).map((e=>cherow.parseScript(e))).map((({body:[e]})=>{const t={ExpressionStatement:({expression:e})=>e.params[0],FunctionDeclaration:({params:e})=>e[0],VariableDeclaration:({declarations:e})=>e[0].init.params[0]}[e.type];if(!t)throw new Error("Invalid pattern: "+e.type);return t(e)}));for(let a=0;a<r.length;a++)if(matches(e,r[a]))return t[a](e)},func=(...e)=>t=>match(t)(...e);module.exports={match:match,func:func};
//# sourceMappingURL=/sm/b2e5bb10edcc052f3a10f896be1a3bb361a956934baefb83df9bba74acc8cd45.map