!function(root,factory){"function"==typeof define&&define.amd?define([],factory):"object"==typeof module&&module.exports?module.exports=factory():root.PathUtils=factory()}(this,function(){var PathUtils={urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#\.]*(?:\.[^\?#\.]+)*(\.[^\?#\.]+)|[^\?#]*)))?(\?[^#]+)?)(#.*)?/,parsedUrlPropNames:["href","hrefNoHash","hrefNoSearch","domain","protocol","doubleSlash","authority","userinfo","username","password","host","hostname","port","pathname","directory","filename","filenameExtension","search","hash"],defaultPorts:{http:"80",https:"443",ftp:"20",ftps:"990"},parseUrl:function(url){if(url&&"object"==typeof url)return url;var matches=PathUtils.urlParseRE.exec(url||"")||[],props=PathUtils.parsedUrlPropNames,cnt=props.length,result={},i;for(i=0;i