import{__exports as e}from"../../../_virtual/util3.mjs";var r;function n(){return r||(r=1,function(e){e.getArg=function(e,r,n){if(r in e)return e[r];if(3===arguments.length)return n;throw new Error('"'+r+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function t(e){var n=e.match(r);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function a(e){var r="";return e.scheme&&(r+=e.scheme+":"),r+="//",e.auth&&(r+=e.auth+"@"),e.host&&(r+=e.host),e.port&&(r+=":"+e.port),e.path&&(r+=e.path),r}function i(r){var n=r,i=t(r);if(i){if(!i.path)return r;n=i.path}for(var o,u=e.isAbsolute(n),c=n.split(/\/+/),l=0,s=c.length-1;s>=0;s--)"."===(o=c[s])?c.splice(s,1):".."===o?l++:l>0&&(""===o?(c.splice(s+1,l),l=0):(c.splice(s,2),l--));return""===(n=c.join("/"))&&(n=u?"/":"."),i?(i.path=n,a(i)):n}function o(e,r){""===e&&(e="."),""===r&&(r=".");var o=t(r),u=t(e);if(u&&(e=u.path||"/"),o&&!o.scheme)return u&&(o.scheme=u.scheme),a(o);if(o||r.match(n))return r;if(u&&!u.host&&!u.path)return u.host=r,a(u);var c="/"===r.charAt(0)?r:i(e.replace(/\/+$/,"")+"/"+r);return u?(u.path=c,a(u)):c}e.urlParse=t,e.urlGenerate=a,e.normalize=i,e.join=o,e.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},e.relative=function(e,r){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==r.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return r;if((e=e.slice(0,t)).match(/^([^\/]+:\/)?\/*$/))return r;++n}return Array(n+1).join("../")+r.substr(e.length+1)};var u=!("__proto__"in Object.create(null));function c(e){return e}function l(e){if(!e)return!1;var r=e.length;if(r<9)return!1;if(95!==e.charCodeAt(r-1)||95!==e.charCodeAt(r-2)||111!==e.charCodeAt(r-3)||116!==e.charCodeAt(r-4)||111!==e.charCodeAt(r-5)||114!==e.charCodeAt(r-6)||112!==e.charCodeAt(r-7)||95!==e.charCodeAt(r-8)||95!==e.charCodeAt(r-9))return!1;for(var n=r-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function s(e,r){return e===r?0:null===e?1:null===r?-1:e>r?1:-1}e.toSetString=u?c:function(e){return l(e)?"$"+e:e},e.fromSetString=u?c:function(e){return l(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,r,n){var t=s(e.source,r.source);return 0!==t||0!==(t=e.originalLine-r.originalLine)||0!==(t=e.originalColumn-r.originalColumn)||n||0!==(t=e.generatedColumn-r.generatedColumn)||0!==(t=e.generatedLine-r.generatedLine)?t:s(e.name,r.name)},e.compareByGeneratedPositionsDeflated=function(e,r,n){var t=e.generatedLine-r.generatedLine;return 0!==t||0!==(t=e.generatedColumn-r.generatedColumn)||n||0!==(t=s(e.source,r.source))||0!==(t=e.originalLine-r.originalLine)||0!==(t=e.originalColumn-r.originalColumn)?t:s(e.name,r.name)},e.compareByGeneratedPositionsInflated=function(e,r){var n=e.generatedLine-r.generatedLine;return 0!==n||0!==(n=e.generatedColumn-r.generatedColumn)||0!==(n=s(e.source,r.source))||0!==(n=e.originalLine-r.originalLine)||0!==(n=e.originalColumn-r.originalColumn)?n:s(e.name,r.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,r,n){if(r=r||"",e&&("/"!==e[e.length-1]&&"/"!==r[0]&&(e+="/"),r=e+r),n){var u=t(n);if(!u)throw new Error("sourceMapURL could not be parsed");if(u.path){var c=u.path.lastIndexOf("/");c>=0&&(u.path=u.path.substring(0,c+1))}r=o(a(u),r)}return i(r)}}(e)),e}export{n as __require};