import{__exports as e}from"../../../_virtual/util2.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 i(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}e.urlParse=t,e.urlGenerate=i;var a,o,u=(a=function(r){var n=r,a=t(r);if(a){if(!a.path)return r;n=a.path}for(var o=e.isAbsolute(n),u=[],l=0,c=0;;){if(l=c,-1===(c=n.indexOf("/",l))){u.push(n.slice(l));break}for(u.push(n.slice(l,c));c<n.length&&"/"===n[c];)c++}var s,f=0;for(c=u.length-1;c>=0;c--)"."===(s=u[c])?u.splice(c,1):".."===s?f++:f>0&&(""===s?(u.splice(c+1,f),f=0):(u.splice(c,2),f--));return""===(n=u.join("/"))&&(n=o?"/":"."),a?(a.path=n,i(a)):n},o=[],function(e){for(var r=0;r<o.length;r++)if(o[r].input===e){var n=o[0];return o[0]=o[r],o[r]=n,o[0].result}var t=a(e);return o.unshift({input:e,result:t}),o.length>32&&o.pop(),t});function l(e,r){""===e&&(e="."),""===r&&(r=".");var a=t(r),o=t(e);if(o&&(e=o.path||"/"),a&&!a.scheme)return o&&(a.scheme=o.scheme),i(a);if(a||r.match(n))return r;if(o&&!o.host&&!o.path)return o.host=r,i(o);var l="/"===r.charAt(0)?r:u(e.replace(/\/+$/,"")+"/"+r);return o?(o.path=l,i(o)):l}e.normalize=u,e.join=l,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 c=!("__proto__"in Object.create(null));function s(e){return e}function f(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 h(e,r){return e===r?0:null===e?1:null===r?-1:e>r?1:-1}e.toSetString=c?s:function(e){return f(e)?"$"+e:e},e.fromSetString=c?s:function(e){return f(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,r,n){var t=h(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:h(e.name,r.name)},e.compareByOriginalPositionsNoSource=function(e,r,n){var t;return 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:h(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=h(e.source,r.source))||0!==(t=e.originalLine-r.originalLine)||0!==(t=e.originalColumn-r.originalColumn)?t:h(e.name,r.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,r,n){var t=e.generatedColumn-r.generatedColumn;return 0!==t||n||0!==(t=h(e.source,r.source))||0!==(t=e.originalLine-r.originalLine)||0!==(t=e.originalColumn-r.originalColumn)?t:h(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=h(e.source,r.source))||0!==(n=e.originalLine-r.originalLine)||0!==(n=e.originalColumn-r.originalColumn)?n:h(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 a=t(n);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var o=a.path.lastIndexOf("/");o>=0&&(a.path=a.path.substring(0,o+1))}r=l(i(a),r)}return u(r)}}(e)),e}export{n as __require};