'use strict';
import { urlProtocols } from '../../../base-repo/constants/http-constants.js';
import { createError } from '../../errors/errors.js';

var __defProp=Object['defineProperty'],__name=(_0x465190,_0x939fc0)=>__defProp(_0x465190,'name',{'value':_0x939fc0,'configurable':!![]});function combineEndpointPath(_0x4eb2ee,_0x2c8d8a){return _0x4eb2ee+'/'+_0x2c8d8a;}__name(combineEndpointPath,'combineEndpointPath');function formatBlobName(_0x386d92){return normalizePathSeparators(_0x386d92['replaceAll']('%2F','/')['replaceAll']('%5C','/'));}__name(formatBlobName,'formatBlobName');function normalizePathSeparators(_0x56aa57){return _0x56aa57['replaceAll']('\x5c','/');}__name(normalizePathSeparators,'normalizePathSeparators');function normalizeUrl(_0x7f33f9){let _0x50b93f=_0x7f33f9['trim']();!/^https?:\/\//i['test'](_0x50b93f)&&(_0x50b93f=''+urlProtocols['https']+_0x50b93f);try{const _0x1ecc15=new URL(_0x50b93f);return _0x1ecc15['toString']();}catch{throw createError('Invalid\x20URL:\x20'+_0x7f33f9);}}__name(normalizeUrl,'normalizeUrl');

export { combineEndpointPath, formatBlobName, normalizePathSeparators, normalizeUrl };
