Edit: /tmp/tsx-0/17887-ce3d6aee9aa5abde909cae86171ec6fdde48318c (6719B)
{"code":"__filename=\"/opt/canhelp/node_modules/better-auth/dist/utils/wildcard.mjs\";(()=>{\nvar __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __name=(target,value)=>__defProp(target,\"name\",{value,configurable:true});var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from===\"object\"||typeof from===\"function\"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},\"__esModule\",{value:true}),mod);var wildcard_exports={};__export(wildcard_exports,{wildcardMatch:()=>wildcardMatch});module.exports=__toCommonJS(wildcard_exports);function escapeRegExpChar(char){if(char===\"-\"||char===\"^\"||char===\"$\"||char===\"+\"||char===\".\"||char===\"(\"||char===\")\"||char===\"|\"||char===\"[\"||char===\"]\"||char===\"{\"||char===\"}\"||char===\"*\"||char===\"?\"||char===\"\\\\\")return`\\\\${char}`;else return char}__name(escapeRegExpChar,\"escapeRegExpChar\");function escapeRegExpString(str){let result=\"\";for(let i=0;i
`^${transform(p,separator)}$`).join(\"|\")})`;let separatorSplitter=\"\";let separatorMatcher=\"\";let wildcard=\".\";if(separator===true){separatorSplitter=\"/\";separatorMatcher=\"[/\\\\\\\\]\";wildcard=\"[^/\\\\\\\\]\"}else if(separator){separatorSplitter=separator;separatorMatcher=escapeRegExpString(separatorSplitter);if(separatorMatcher.length>1){separatorMatcher=`(?:${separatorMatcher})`;wildcard=`((?!${separatorMatcher}).)`}else wildcard=`[^${separatorMatcher}]`}const requiredSeparator=separator?`${separatorMatcher}+?`:\"\";const optionalSeparator=separator?`${separatorMatcher}*?`:\"\";const segments=separator?pattern.split(separatorSplitter):[pattern];let result=\"\";for(let s=0;s0)continue;if(separator)if(s===segments.length-1)currentSeparator=optionalSeparator;else if(nextSegment!==\"**\")currentSeparator=requiredSeparator;else currentSeparator=\"\";if(separator&&segment===\"**\"){if(currentSeparator){result+=s===0?\"\":currentSeparator;result+=`(?:${wildcard}*?${currentSeparator})*?`}continue}for(let c=0;c