1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.staticFile = void 0;
|
4 | const trimLeadingSlash = (path) => {
|
5 | if (path.startsWith('/')) {
|
6 | return trimLeadingSlash(path.substr(1));
|
7 | }
|
8 | return path;
|
9 | };
|
10 | const inner = (path) => {
|
11 | if (typeof window !== 'undefined' && window.remotion_staticBase) {
|
12 | return `${window.remotion_staticBase}/${trimLeadingSlash(path)}`;
|
13 | }
|
14 | return `/${trimLeadingSlash(path)}`;
|
15 | };
|
16 | const staticFile = (path) => {
|
17 | const preparsed = inner(path);
|
18 | if (!preparsed.startsWith('/')) {
|
19 | return `/${preparsed}`;
|
20 | }
|
21 | return preparsed;
|
22 | };
|
23 | exports.staticFile = staticFile;
|