text: "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _url=_interopRequireDefault(require("url")),_crypto=_interopRequireDefault(require("crypto"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function removeWebSafe(a){return a.replace(/-/g,"+").replace(/_/g,"/")}function makeWebSafe(a){return a.replace(/\+/g,"-").replace(/\//g,"_")}function decodeBase64Hash(a){return Buffer.from(a,"base64")}function encodeBase64Hash(a,b){return _crypto.default.createHmac("sha1",a).update(b).digest("base64")}function sign(a,b){const c=_url.default.parse(a),d=decodeBase64Hash(removeWebSafe(b)),e=makeWebSafe(encodeBase64Hash(d,null===c||void 0===c?void 0:c.path));return _url.default.format(c)+"&signature="+e}var _default=sign;exports.default=_default;