"use strict";Liferay.Loader.define("data-engine-taglib$resolve-pathname@3.0.0/cjs/resolve-pathname",["module","exports","require"],(function(e,t,n){window;{function isAbsolute(e){return"/"===e.charAt(0)}function spliceOne(e,t){for(var n=t,i=n+1,s=e.length;i<s;n+=1,i+=1)e[n]=e[i];e.pop()}e.exports=function resolvePathname(e,t){void 0===t&&(t="");var n,i=e&&e.split("/")||[],s=t&&t.split("/")||[],r=e&&isAbsolute(e),o=t&&isAbsolute(t),l=r||o;if(e&&isAbsolute(e)?s=i:i.length&&(s.pop(),s=s.concat(i)),!s.length)return"/";if(s.length){var a=s[s.length-1];n="."===a||".."===a||""===a}else n=!1;for(var u=0,f=s.length;f>=0;f--){var p=s[f];"."===p?spliceOne(s,f):".."===p?(spliceOne(s,f),u++):u&&(spliceOne(s,f),u--)}if(!l)for(;u--;u)s.unshift("..");!l||""===s[0]||s[0]&&isAbsolute(s[0])||s.unshift("");var c=s.join("/");return n&&"/"!==c.substr(-1)&&(c+="/"),c}}}));
//# sourceMappingURL=resolve-pathname.js.map