Rocky_Mountain_Vending/.pnpm-store/v10/files/97/d4685a76bb373efd585ef4819b96d80c031bdf90c86788b9be2f37e4050835d8e6c2f23056a86b264084f16068f0aa353e4f352464b124c9e90763e8f2f8a1
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

38 lines
1.6 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toBase64 = toBase64;
const util_utf8_1 = require("@smithy/util-utf8");
const constants_browser_1 = require("./constants.browser");
function toBase64(_input) {
let input;
if (typeof _input === "string") {
input = (0, util_utf8_1.fromUtf8)(_input);
}
else {
input = _input;
}
const isArrayLike = typeof input === "object" && typeof input.length === "number";
const isUint8Array = typeof input === "object" &&
typeof input.byteOffset === "number" &&
typeof input.byteLength === "number";
if (!isArrayLike && !isUint8Array) {
throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
}
let str = "";
for (let i = 0; i < input.length; i += 3) {
let bits = 0;
let bitLength = 0;
for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {
bits |= input[j] << ((limit - j - 1) * constants_browser_1.bitsPerByte);
bitLength += constants_browser_1.bitsPerByte;
}
const bitClusterCount = Math.ceil(bitLength / constants_browser_1.bitsPerLetter);
bits <<= bitClusterCount * constants_browser_1.bitsPerLetter - bitLength;
for (let k = 1; k <= bitClusterCount; k++) {
const offset = (bitClusterCount - k) * constants_browser_1.bitsPerLetter;
str += constants_browser_1.alphabetByValue[(bits & (constants_browser_1.maxLetterValue << offset)) >> offset];
}
str += "==".slice(0, 4 - bitClusterCount);
}
return str;
}