Rocky_Mountain_Vending/.pnpm-store/v10/files/51/0e5c91f712880f1cbbb61f9dfe1152e36fcacd10ff074dc383546942318bb8aa355041c519523890ff11e0141673aeb527f2deb27b3f264520c028b39fe05b
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

55 lines
No EOL
1.3 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.scriptInjector = exports.ScriptInjector = void 0;
/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
const injected_js_1 = require("../generated/injected.js");
/**
* @internal
*/
class ScriptInjector {
#updated = false;
#amendments = new Set();
// Appends a statement of the form `(PuppeteerUtil) => {...}`.
append(statement) {
this.#update(() => {
this.#amendments.add(statement);
});
}
pop(statement) {
this.#update(() => {
this.#amendments.delete(statement);
});
}
inject(inject, force = false) {
if (this.#updated || force) {
inject(this.#get());
}
this.#updated = false;
}
#update(callback) {
callback();
this.#updated = true;
}
#get() {
return `(() => {
const module = {};
${injected_js_1.source}
${[...this.#amendments]
.map(statement => {
return `(${statement})(module.exports.default);`;
})
.join('')}
return module.exports.default;
})()`;
}
}
exports.ScriptInjector = ScriptInjector;
/**
* @internal
*/
exports.scriptInjector = new ScriptInjector();
//# sourceMappingURL=ScriptInjector.js.map