oraculo-ui 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/OraculoSeccionBonoBienvenida-4ZHLRFV2.css +221 -0
- package/dist/OraculoSeccionBonoBienvenida-4ZHLRFV2.css.map +1 -0
- package/dist/OraculoSeccionBonoBienvenida-6L54EBL3.mjs +9 -0
- package/dist/OraculoSeccionBonoBienvenida-6L54EBL3.mjs.map +1 -0
- package/dist/OraculoSeccionCasino-CPSKAAFH.css +398 -0
- package/dist/OraculoSeccionCasino-CPSKAAFH.css.map +1 -0
- package/dist/OraculoSeccionCasino-FHD2WBDU.mjs +13 -0
- package/dist/OraculoSeccionCasino-FHD2WBDU.mjs.map +1 -0
- package/dist/{OraculoSeccionCasino-H6CXFXMN.mjs → OraculoSeccionCasino-LRZCQVLY.mjs} +1 -1
- package/dist/{OraculoSeccionCasino-WBPCNYC5.mjs → OraculoSeccionCasino-ORWFZCMV.mjs} +1 -1
- package/dist/OraculoSeccionCasinoEnVivo-7W64K4YQ.css +157 -0
- package/dist/OraculoSeccionCasinoEnVivo-7W64K4YQ.css.map +1 -0
- package/dist/OraculoSeccionCasinoEnVivo-EPVIACRV.mjs +9 -0
- package/dist/OraculoSeccionCasinoEnVivo-EPVIACRV.mjs.map +1 -0
- package/dist/OraculoSeccionClubOlimpo-63QCT4A2.mjs +10 -0
- package/dist/OraculoSeccionClubOlimpo-63QCT4A2.mjs.map +1 -0
- package/dist/OraculoSeccionClubOlimpo-BLUJXLUC.mjs +8 -0
- package/dist/OraculoSeccionClubOlimpo-BLUJXLUC.mjs.map +1 -0
- package/dist/OraculoSeccionClubOlimpo-F2AFK4G3.css +274 -0
- package/dist/OraculoSeccionClubOlimpo-F2AFK4G3.css.map +1 -0
- package/dist/OraculoSeccionClubOlimpo-ZCBMTUL3.css +117 -0
- package/dist/OraculoSeccionClubOlimpo-ZCBMTUL3.css.map +1 -0
- package/dist/{OraculoSeccionDestacados-EPL4KZCF.mjs → OraculoSeccionDestacados-2KCEN6PZ.mjs} +1 -1
- package/dist/OraculoSeccionDestacados-5RFVEBFL.mjs +13 -0
- package/dist/OraculoSeccionDestacados-5RFVEBFL.mjs.map +1 -0
- package/dist/{OraculoSeccionDestacados-IMREYQ6W.mjs → OraculoSeccionDestacados-6D4LKX4H.mjs} +1 -1
- package/dist/OraculoSeccionDestacados-AMMYUK67.css +398 -0
- package/dist/OraculoSeccionDestacados-AMMYUK67.css.map +1 -0
- package/dist/OraculoSeccionTopJuegos-K6CHEKEP.mjs +13 -0
- package/dist/OraculoSeccionTopJuegos-K6CHEKEP.mjs.map +1 -0
- package/dist/{OraculoSeccionTopJuegos-DWEO36ND.mjs → OraculoSeccionTopJuegos-LEFQWP7T.mjs} +1 -1
- package/dist/{OraculoSeccionTopJuegos-FKAD2YD3.mjs → OraculoSeccionTopJuegos-RBVOHPDV.mjs} +1 -1
- package/dist/OraculoSeccionTopJuegos-XBGNNR6G.css +398 -0
- package/dist/OraculoSeccionTopJuegos-XBGNNR6G.css.map +1 -0
- package/dist/{OraculoSeccionVirtuales-IBYOMEJV.mjs → OraculoSeccionVirtuales-FKHGLEVT.mjs} +1 -1
- package/dist/{OraculoSeccionVirtuales-N2ETKRK7.mjs → OraculoSeccionVirtuales-N6FY52CM.mjs} +1 -1
- package/dist/OraculoSeccionVirtuales-NEIWD2BT.mjs +13 -0
- package/dist/OraculoSeccionVirtuales-NEIWD2BT.mjs.map +1 -0
- package/dist/OraculoSeccionVirtuales-SSM6EDST.css +398 -0
- package/dist/OraculoSeccionVirtuales-SSM6EDST.css.map +1 -0
- package/dist/{chunk-VYYKDD5L.mjs → chunk-7IWMEE6R.mjs} +318 -1117
- package/dist/chunk-FIOWVLJP.mjs +7 -0
- package/dist/chunk-FIOWVLJP.mjs.map +1 -0
- package/dist/{chunk-ECHAXSTL.mjs → chunk-FROEVP3X.mjs} +314 -1114
- package/dist/chunk-IGAIIVJZ.mjs +74 -0
- package/dist/chunk-IGAIIVJZ.mjs.map +1 -0
- package/dist/chunk-MC4XEBI3.mjs +1277 -0
- package/dist/chunk-MC4XEBI3.mjs.map +1 -0
- package/dist/chunk-PYHDJZX3.mjs +476 -0
- package/dist/chunk-PYHDJZX3.mjs.map +1 -0
- package/dist/chunk-THUJNRMX.mjs +119 -0
- package/dist/chunk-THUJNRMX.mjs.map +1 -0
- package/dist/chunk-WTK2IT5O.mjs +250 -0
- package/dist/chunk-WTK2IT5O.mjs.map +1 -0
- package/dist/chunk-XNMUIY72.mjs +10 -0
- package/dist/chunk-XNMUIY72.mjs.map +1 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +302 -1060
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17,8 +17,8 @@ var __commonJS = (cb, mod2) => function __require() {
|
|
|
17
17
|
return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
|
|
18
18
|
};
|
|
19
19
|
var __export = (target, all) => {
|
|
20
|
-
for (var
|
|
21
|
-
__defProp(target,
|
|
20
|
+
for (var name3 in all)
|
|
21
|
+
__defProp(target, name3, { get: all[name3], enumerable: true });
|
|
22
22
|
};
|
|
23
23
|
var __copyProps = (to, from, except, desc) => {
|
|
24
24
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -2125,183 +2125,6 @@ function getGlobal() {
|
|
|
2125
2125
|
}
|
|
2126
2126
|
throw new Error("Unable to locate global object.");
|
|
2127
2127
|
}
|
|
2128
|
-
function isCloudWorkstation(url) {
|
|
2129
|
-
try {
|
|
2130
|
-
const host = url.startsWith("http://") || url.startsWith("https://") ? new URL(url).hostname : url;
|
|
2131
|
-
return host.endsWith(".cloudworkstations.dev");
|
|
2132
|
-
} catch {
|
|
2133
|
-
return false;
|
|
2134
|
-
}
|
|
2135
|
-
}
|
|
2136
|
-
async function pingServer(endpoint) {
|
|
2137
|
-
const result = await fetch(endpoint, {
|
|
2138
|
-
credentials: "include"
|
|
2139
|
-
});
|
|
2140
|
-
return result.ok;
|
|
2141
|
-
}
|
|
2142
|
-
function createMockUserToken(token, projectId) {
|
|
2143
|
-
if (token.uid) {
|
|
2144
|
-
throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');
|
|
2145
|
-
}
|
|
2146
|
-
const header = {
|
|
2147
|
-
alg: "none",
|
|
2148
|
-
type: "JWT"
|
|
2149
|
-
};
|
|
2150
|
-
const project = projectId || "demo-project";
|
|
2151
|
-
const iat = token.iat || 0;
|
|
2152
|
-
const sub = token.sub || token.user_id;
|
|
2153
|
-
if (!sub) {
|
|
2154
|
-
throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");
|
|
2155
|
-
}
|
|
2156
|
-
const payload = {
|
|
2157
|
-
// Set all required fields to decent defaults
|
|
2158
|
-
iss: `https://securetoken.google.com/${project}`,
|
|
2159
|
-
aud: project,
|
|
2160
|
-
iat,
|
|
2161
|
-
exp: iat + 3600,
|
|
2162
|
-
auth_time: iat,
|
|
2163
|
-
sub,
|
|
2164
|
-
user_id: sub,
|
|
2165
|
-
firebase: {
|
|
2166
|
-
sign_in_provider: "custom",
|
|
2167
|
-
identities: {}
|
|
2168
|
-
},
|
|
2169
|
-
// Override with user options
|
|
2170
|
-
...token
|
|
2171
|
-
};
|
|
2172
|
-
const signature = "";
|
|
2173
|
-
return [
|
|
2174
|
-
base64urlEncodeWithoutPadding(JSON.stringify(header)),
|
|
2175
|
-
base64urlEncodeWithoutPadding(JSON.stringify(payload)),
|
|
2176
|
-
signature
|
|
2177
|
-
].join(".");
|
|
2178
|
-
}
|
|
2179
|
-
function getEmulatorSummary() {
|
|
2180
|
-
const summary = {
|
|
2181
|
-
prod: [],
|
|
2182
|
-
emulator: []
|
|
2183
|
-
};
|
|
2184
|
-
for (const key of Object.keys(emulatorStatus)) {
|
|
2185
|
-
if (emulatorStatus[key]) {
|
|
2186
|
-
summary.emulator.push(key);
|
|
2187
|
-
} else {
|
|
2188
|
-
summary.prod.push(key);
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
return summary;
|
|
2192
|
-
}
|
|
2193
|
-
function getOrCreateEl(id) {
|
|
2194
|
-
let parentDiv = document.getElementById(id);
|
|
2195
|
-
let created = false;
|
|
2196
|
-
if (!parentDiv) {
|
|
2197
|
-
parentDiv = document.createElement("div");
|
|
2198
|
-
parentDiv.setAttribute("id", id);
|
|
2199
|
-
created = true;
|
|
2200
|
-
}
|
|
2201
|
-
return { created, element: parentDiv };
|
|
2202
|
-
}
|
|
2203
|
-
function updateEmulatorBanner(name4, isRunningEmulator) {
|
|
2204
|
-
if (typeof window === "undefined" || typeof document === "undefined" || !isCloudWorkstation(window.location.host) || emulatorStatus[name4] === isRunningEmulator || emulatorStatus[name4] || // If already set to use emulator, can't go back to prod.
|
|
2205
|
-
previouslyDismissed) {
|
|
2206
|
-
return;
|
|
2207
|
-
}
|
|
2208
|
-
emulatorStatus[name4] = isRunningEmulator;
|
|
2209
|
-
function prefixedId(id) {
|
|
2210
|
-
return `__firebase__banner__${id}`;
|
|
2211
|
-
}
|
|
2212
|
-
const bannerId = "__firebase__banner";
|
|
2213
|
-
const summary = getEmulatorSummary();
|
|
2214
|
-
const showError = summary.prod.length > 0;
|
|
2215
|
-
function tearDown() {
|
|
2216
|
-
const element = document.getElementById(bannerId);
|
|
2217
|
-
if (element) {
|
|
2218
|
-
element.remove();
|
|
2219
|
-
}
|
|
2220
|
-
}
|
|
2221
|
-
function setupBannerStyles(bannerEl) {
|
|
2222
|
-
bannerEl.style.display = "flex";
|
|
2223
|
-
bannerEl.style.background = "#7faaf0";
|
|
2224
|
-
bannerEl.style.position = "fixed";
|
|
2225
|
-
bannerEl.style.bottom = "5px";
|
|
2226
|
-
bannerEl.style.left = "5px";
|
|
2227
|
-
bannerEl.style.padding = ".5em";
|
|
2228
|
-
bannerEl.style.borderRadius = "5px";
|
|
2229
|
-
bannerEl.style.alignItems = "center";
|
|
2230
|
-
}
|
|
2231
|
-
function setupIconStyles(prependIcon, iconId) {
|
|
2232
|
-
prependIcon.setAttribute("width", "24");
|
|
2233
|
-
prependIcon.setAttribute("id", iconId);
|
|
2234
|
-
prependIcon.setAttribute("height", "24");
|
|
2235
|
-
prependIcon.setAttribute("viewBox", "0 0 24 24");
|
|
2236
|
-
prependIcon.setAttribute("fill", "none");
|
|
2237
|
-
prependIcon.style.marginLeft = "-6px";
|
|
2238
|
-
}
|
|
2239
|
-
function setupCloseBtn() {
|
|
2240
|
-
const closeBtn = document.createElement("span");
|
|
2241
|
-
closeBtn.style.cursor = "pointer";
|
|
2242
|
-
closeBtn.style.marginLeft = "16px";
|
|
2243
|
-
closeBtn.style.fontSize = "24px";
|
|
2244
|
-
closeBtn.innerHTML = " ×";
|
|
2245
|
-
closeBtn.onclick = () => {
|
|
2246
|
-
previouslyDismissed = true;
|
|
2247
|
-
tearDown();
|
|
2248
|
-
};
|
|
2249
|
-
return closeBtn;
|
|
2250
|
-
}
|
|
2251
|
-
function setupLinkStyles(learnMoreLink, learnMoreId) {
|
|
2252
|
-
learnMoreLink.setAttribute("id", learnMoreId);
|
|
2253
|
-
learnMoreLink.innerText = "Learn more";
|
|
2254
|
-
learnMoreLink.href = "https://firebase.google.com/docs/studio/preview-apps#preview-backend";
|
|
2255
|
-
learnMoreLink.setAttribute("target", "__blank");
|
|
2256
|
-
learnMoreLink.style.paddingLeft = "5px";
|
|
2257
|
-
learnMoreLink.style.textDecoration = "underline";
|
|
2258
|
-
}
|
|
2259
|
-
function setupDom() {
|
|
2260
|
-
const banner = getOrCreateEl(bannerId);
|
|
2261
|
-
const firebaseTextId = prefixedId("text");
|
|
2262
|
-
const firebaseText = document.getElementById(firebaseTextId) || document.createElement("span");
|
|
2263
|
-
const learnMoreId = prefixedId("learnmore");
|
|
2264
|
-
const learnMoreLink = document.getElementById(learnMoreId) || document.createElement("a");
|
|
2265
|
-
const prependIconId = prefixedId("preprendIcon");
|
|
2266
|
-
const prependIcon = document.getElementById(prependIconId) || document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
2267
|
-
if (banner.created) {
|
|
2268
|
-
const bannerEl = banner.element;
|
|
2269
|
-
setupBannerStyles(bannerEl);
|
|
2270
|
-
setupLinkStyles(learnMoreLink, learnMoreId);
|
|
2271
|
-
const closeBtn = setupCloseBtn();
|
|
2272
|
-
setupIconStyles(prependIcon, prependIconId);
|
|
2273
|
-
bannerEl.append(prependIcon, firebaseText, learnMoreLink, closeBtn);
|
|
2274
|
-
document.body.appendChild(bannerEl);
|
|
2275
|
-
}
|
|
2276
|
-
if (showError) {
|
|
2277
|
-
firebaseText.innerText = `Preview backend disconnected.`;
|
|
2278
|
-
prependIcon.innerHTML = `<g clip-path="url(#clip0_6013_33858)">
|
|
2279
|
-
<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>
|
|
2280
|
-
</g>
|
|
2281
|
-
<defs>
|
|
2282
|
-
<clipPath id="clip0_6013_33858">
|
|
2283
|
-
<rect width="24" height="24" fill="white"/>
|
|
2284
|
-
</clipPath>
|
|
2285
|
-
</defs>`;
|
|
2286
|
-
} else {
|
|
2287
|
-
prependIcon.innerHTML = `<g clip-path="url(#clip0_6083_34804)">
|
|
2288
|
-
<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/>
|
|
2289
|
-
</g>
|
|
2290
|
-
<defs>
|
|
2291
|
-
<clipPath id="clip0_6083_34804">
|
|
2292
|
-
<rect width="24" height="24" fill="white"/>
|
|
2293
|
-
</clipPath>
|
|
2294
|
-
</defs>`;
|
|
2295
|
-
firebaseText.innerText = "Preview backend running in this workspace.";
|
|
2296
|
-
}
|
|
2297
|
-
firebaseText.setAttribute("id", firebaseTextId);
|
|
2298
|
-
}
|
|
2299
|
-
if (document.readyState === "loading") {
|
|
2300
|
-
window.addEventListener("DOMContentLoaded", setupDom);
|
|
2301
|
-
} else {
|
|
2302
|
-
setupDom();
|
|
2303
|
-
}
|
|
2304
|
-
}
|
|
2305
2128
|
function getUA() {
|
|
2306
2129
|
if (typeof navigator !== "undefined" && typeof navigator["userAgent"] === "string") {
|
|
2307
2130
|
return navigator["userAgent"];
|
|
@@ -2364,36 +2187,6 @@ function replaceTemplate(template, data) {
|
|
|
2364
2187
|
return value != null ? String(value) : `<${key}?>`;
|
|
2365
2188
|
});
|
|
2366
2189
|
}
|
|
2367
|
-
function deepEqual(a, b) {
|
|
2368
|
-
if (a === b) {
|
|
2369
|
-
return true;
|
|
2370
|
-
}
|
|
2371
|
-
const aKeys = Object.keys(a);
|
|
2372
|
-
const bKeys = Object.keys(b);
|
|
2373
|
-
for (const k of aKeys) {
|
|
2374
|
-
if (!bKeys.includes(k)) {
|
|
2375
|
-
return false;
|
|
2376
|
-
}
|
|
2377
|
-
const aProp = a[k];
|
|
2378
|
-
const bProp = b[k];
|
|
2379
|
-
if (isObject(aProp) && isObject(bProp)) {
|
|
2380
|
-
if (!deepEqual(aProp, bProp)) {
|
|
2381
|
-
return false;
|
|
2382
|
-
}
|
|
2383
|
-
} else if (aProp !== bProp) {
|
|
2384
|
-
return false;
|
|
2385
|
-
}
|
|
2386
|
-
}
|
|
2387
|
-
for (const k of bKeys) {
|
|
2388
|
-
if (!aKeys.includes(k)) {
|
|
2389
|
-
return false;
|
|
2390
|
-
}
|
|
2391
|
-
}
|
|
2392
|
-
return true;
|
|
2393
|
-
}
|
|
2394
|
-
function isObject(thing) {
|
|
2395
|
-
return thing !== null && typeof thing === "object";
|
|
2396
|
-
}
|
|
2397
2190
|
function getModularInstance(service) {
|
|
2398
2191
|
if (service && service._delegate) {
|
|
2399
2192
|
return service._delegate;
|
|
@@ -2401,7 +2194,7 @@ function getModularInstance(service) {
|
|
|
2401
2194
|
return service;
|
|
2402
2195
|
}
|
|
2403
2196
|
}
|
|
2404
|
-
var CONSTANTS, stringToByteArray$1, byteArrayToString, base64, DecodeBase64StringError, base64Encode, base64urlEncodeWithoutPadding, base64Decode, getDefaultsFromGlobal, getDefaultsFromEnvVariable, getDefaultsFromCookie, getDefaults,
|
|
2197
|
+
var CONSTANTS, stringToByteArray$1, byteArrayToString, base64, DecodeBase64StringError, base64Encode, base64urlEncodeWithoutPadding, base64Decode, getDefaultsFromGlobal, getDefaultsFromEnvVariable, getDefaultsFromCookie, getDefaults, ERROR_NAME, FirebaseError, ErrorFactory, PATTERN, MAX_VALUE_MILLIS;
|
|
2405
2198
|
var init_index_node_esm = __esm({
|
|
2406
2199
|
"../node_modules/@firebase/util/dist/node-esm/index.node.esm.js"() {
|
|
2407
2200
|
"use strict";
|
|
@@ -2699,67 +2492,6 @@ var init_index_node_esm = __esm({
|
|
|
2699
2492
|
return;
|
|
2700
2493
|
}
|
|
2701
2494
|
};
|
|
2702
|
-
getDefaultEmulatorHost = (productName) => {
|
|
2703
|
-
var _a, _b;
|
|
2704
|
-
return (_b = (_a = getDefaults()) == null ? void 0 : _a.emulatorHosts) == null ? void 0 : _b[productName];
|
|
2705
|
-
};
|
|
2706
|
-
getDefaultEmulatorHostnameAndPort = (productName) => {
|
|
2707
|
-
const host = getDefaultEmulatorHost(productName);
|
|
2708
|
-
if (!host) {
|
|
2709
|
-
return void 0;
|
|
2710
|
-
}
|
|
2711
|
-
const separatorIndex = host.lastIndexOf(":");
|
|
2712
|
-
if (separatorIndex <= 0 || separatorIndex + 1 === host.length) {
|
|
2713
|
-
throw new Error(`Invalid host ${host} with no separate hostname and port!`);
|
|
2714
|
-
}
|
|
2715
|
-
const port = parseInt(host.substring(separatorIndex + 1), 10);
|
|
2716
|
-
if (host[0] === "[") {
|
|
2717
|
-
return [host.substring(1, separatorIndex - 1), port];
|
|
2718
|
-
} else {
|
|
2719
|
-
return [host.substring(0, separatorIndex), port];
|
|
2720
|
-
}
|
|
2721
|
-
};
|
|
2722
|
-
getDefaultAppConfig = () => {
|
|
2723
|
-
var _a;
|
|
2724
|
-
return (_a = getDefaults()) == null ? void 0 : _a.config;
|
|
2725
|
-
};
|
|
2726
|
-
Deferred = class {
|
|
2727
|
-
constructor() {
|
|
2728
|
-
this.reject = () => {
|
|
2729
|
-
};
|
|
2730
|
-
this.resolve = () => {
|
|
2731
|
-
};
|
|
2732
|
-
this.promise = new Promise((resolve, reject) => {
|
|
2733
|
-
this.resolve = resolve;
|
|
2734
|
-
this.reject = reject;
|
|
2735
|
-
});
|
|
2736
|
-
}
|
|
2737
|
-
/**
|
|
2738
|
-
* Our API internals are not promisified and cannot because our callback APIs have subtle expectations around
|
|
2739
|
-
* invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback
|
|
2740
|
-
* and returns a node-style callback which will resolve or reject the Deferred's promise.
|
|
2741
|
-
*/
|
|
2742
|
-
wrapCallback(callback) {
|
|
2743
|
-
return (error, value) => {
|
|
2744
|
-
if (error) {
|
|
2745
|
-
this.reject(error);
|
|
2746
|
-
} else {
|
|
2747
|
-
this.resolve(value);
|
|
2748
|
-
}
|
|
2749
|
-
if (typeof callback === "function") {
|
|
2750
|
-
this.promise.catch(() => {
|
|
2751
|
-
});
|
|
2752
|
-
if (callback.length === 1) {
|
|
2753
|
-
callback(error);
|
|
2754
|
-
} else {
|
|
2755
|
-
callback(error, value);
|
|
2756
|
-
}
|
|
2757
|
-
}
|
|
2758
|
-
};
|
|
2759
|
-
}
|
|
2760
|
-
};
|
|
2761
|
-
emulatorStatus = {};
|
|
2762
|
-
previouslyDismissed = false;
|
|
2763
2495
|
ERROR_NAME = "FirebaseError";
|
|
2764
2496
|
FirebaseError = class _FirebaseError extends Error {
|
|
2765
2497
|
constructor(code, message, customData) {
|
|
@@ -2796,13 +2528,7 @@ var init_index_node_esm = __esm({
|
|
|
2796
2528
|
});
|
|
2797
2529
|
|
|
2798
2530
|
// ../node_modules/@firebase/component/dist/esm/index.esm.js
|
|
2799
|
-
|
|
2800
|
-
return identifier === DEFAULT_ENTRY_NAME ? void 0 : identifier;
|
|
2801
|
-
}
|
|
2802
|
-
function isComponentEager(component) {
|
|
2803
|
-
return component.instantiationMode === "EAGER";
|
|
2804
|
-
}
|
|
2805
|
-
var Component, DEFAULT_ENTRY_NAME, Provider, ComponentContainer;
|
|
2531
|
+
var Component;
|
|
2806
2532
|
var init_index_esm = __esm({
|
|
2807
2533
|
"../node_modules/@firebase/component/dist/esm/index.esm.js"() {
|
|
2808
2534
|
"use strict";
|
|
@@ -2814,8 +2540,8 @@ var init_index_esm = __esm({
|
|
|
2814
2540
|
* @param instanceFactory Service factory responsible for creating the public interface
|
|
2815
2541
|
* @param type whether the service provided by the component is public or private
|
|
2816
2542
|
*/
|
|
2817
|
-
constructor(
|
|
2818
|
-
this.name =
|
|
2543
|
+
constructor(name3, instanceFactory, type) {
|
|
2544
|
+
this.name = name3;
|
|
2819
2545
|
this.instanceFactory = instanceFactory;
|
|
2820
2546
|
this.type = type;
|
|
2821
2547
|
this.multipleInstances = false;
|
|
@@ -2840,254 +2566,6 @@ var init_index_esm = __esm({
|
|
|
2840
2566
|
return this;
|
|
2841
2567
|
}
|
|
2842
2568
|
};
|
|
2843
|
-
DEFAULT_ENTRY_NAME = "[DEFAULT]";
|
|
2844
|
-
Provider = class {
|
|
2845
|
-
constructor(name4, container) {
|
|
2846
|
-
this.name = name4;
|
|
2847
|
-
this.container = container;
|
|
2848
|
-
this.component = null;
|
|
2849
|
-
this.instances = /* @__PURE__ */ new Map();
|
|
2850
|
-
this.instancesDeferred = /* @__PURE__ */ new Map();
|
|
2851
|
-
this.instancesOptions = /* @__PURE__ */ new Map();
|
|
2852
|
-
this.onInitCallbacks = /* @__PURE__ */ new Map();
|
|
2853
|
-
}
|
|
2854
|
-
/**
|
|
2855
|
-
* @param identifier A provider can provide multiple instances of a service
|
|
2856
|
-
* if this.component.multipleInstances is true.
|
|
2857
|
-
*/
|
|
2858
|
-
get(identifier) {
|
|
2859
|
-
const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);
|
|
2860
|
-
if (!this.instancesDeferred.has(normalizedIdentifier)) {
|
|
2861
|
-
const deferred = new Deferred();
|
|
2862
|
-
this.instancesDeferred.set(normalizedIdentifier, deferred);
|
|
2863
|
-
if (this.isInitialized(normalizedIdentifier) || this.shouldAutoInitialize()) {
|
|
2864
|
-
try {
|
|
2865
|
-
const instance = this.getOrInitializeService({
|
|
2866
|
-
instanceIdentifier: normalizedIdentifier
|
|
2867
|
-
});
|
|
2868
|
-
if (instance) {
|
|
2869
|
-
deferred.resolve(instance);
|
|
2870
|
-
}
|
|
2871
|
-
} catch (e) {
|
|
2872
|
-
}
|
|
2873
|
-
}
|
|
2874
|
-
}
|
|
2875
|
-
return this.instancesDeferred.get(normalizedIdentifier).promise;
|
|
2876
|
-
}
|
|
2877
|
-
getImmediate(options) {
|
|
2878
|
-
var _a;
|
|
2879
|
-
const normalizedIdentifier = this.normalizeInstanceIdentifier(options == null ? void 0 : options.identifier);
|
|
2880
|
-
const optional = (_a = options == null ? void 0 : options.optional) != null ? _a : false;
|
|
2881
|
-
if (this.isInitialized(normalizedIdentifier) || this.shouldAutoInitialize()) {
|
|
2882
|
-
try {
|
|
2883
|
-
return this.getOrInitializeService({
|
|
2884
|
-
instanceIdentifier: normalizedIdentifier
|
|
2885
|
-
});
|
|
2886
|
-
} catch (e) {
|
|
2887
|
-
if (optional) {
|
|
2888
|
-
return null;
|
|
2889
|
-
} else {
|
|
2890
|
-
throw e;
|
|
2891
|
-
}
|
|
2892
|
-
}
|
|
2893
|
-
} else {
|
|
2894
|
-
if (optional) {
|
|
2895
|
-
return null;
|
|
2896
|
-
} else {
|
|
2897
|
-
throw Error(`Service ${this.name} is not available`);
|
|
2898
|
-
}
|
|
2899
|
-
}
|
|
2900
|
-
}
|
|
2901
|
-
getComponent() {
|
|
2902
|
-
return this.component;
|
|
2903
|
-
}
|
|
2904
|
-
setComponent(component) {
|
|
2905
|
-
if (component.name !== this.name) {
|
|
2906
|
-
throw Error(`Mismatching Component ${component.name} for Provider ${this.name}.`);
|
|
2907
|
-
}
|
|
2908
|
-
if (this.component) {
|
|
2909
|
-
throw Error(`Component for ${this.name} has already been provided`);
|
|
2910
|
-
}
|
|
2911
|
-
this.component = component;
|
|
2912
|
-
if (!this.shouldAutoInitialize()) {
|
|
2913
|
-
return;
|
|
2914
|
-
}
|
|
2915
|
-
if (isComponentEager(component)) {
|
|
2916
|
-
try {
|
|
2917
|
-
this.getOrInitializeService({ instanceIdentifier: DEFAULT_ENTRY_NAME });
|
|
2918
|
-
} catch (e) {
|
|
2919
|
-
}
|
|
2920
|
-
}
|
|
2921
|
-
for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {
|
|
2922
|
-
const normalizedIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);
|
|
2923
|
-
try {
|
|
2924
|
-
const instance = this.getOrInitializeService({
|
|
2925
|
-
instanceIdentifier: normalizedIdentifier
|
|
2926
|
-
});
|
|
2927
|
-
instanceDeferred.resolve(instance);
|
|
2928
|
-
} catch (e) {
|
|
2929
|
-
}
|
|
2930
|
-
}
|
|
2931
|
-
}
|
|
2932
|
-
clearInstance(identifier = DEFAULT_ENTRY_NAME) {
|
|
2933
|
-
this.instancesDeferred.delete(identifier);
|
|
2934
|
-
this.instancesOptions.delete(identifier);
|
|
2935
|
-
this.instances.delete(identifier);
|
|
2936
|
-
}
|
|
2937
|
-
// app.delete() will call this method on every provider to delete the services
|
|
2938
|
-
// TODO: should we mark the provider as deleted?
|
|
2939
|
-
async delete() {
|
|
2940
|
-
const services = Array.from(this.instances.values());
|
|
2941
|
-
await Promise.all([
|
|
2942
|
-
...services.filter((service) => "INTERNAL" in service).map((service) => service.INTERNAL.delete()),
|
|
2943
|
-
...services.filter((service) => "_delete" in service).map((service) => service._delete())
|
|
2944
|
-
]);
|
|
2945
|
-
}
|
|
2946
|
-
isComponentSet() {
|
|
2947
|
-
return this.component != null;
|
|
2948
|
-
}
|
|
2949
|
-
isInitialized(identifier = DEFAULT_ENTRY_NAME) {
|
|
2950
|
-
return this.instances.has(identifier);
|
|
2951
|
-
}
|
|
2952
|
-
getOptions(identifier = DEFAULT_ENTRY_NAME) {
|
|
2953
|
-
return this.instancesOptions.get(identifier) || {};
|
|
2954
|
-
}
|
|
2955
|
-
initialize(opts = {}) {
|
|
2956
|
-
const { options = {} } = opts;
|
|
2957
|
-
const normalizedIdentifier = this.normalizeInstanceIdentifier(opts.instanceIdentifier);
|
|
2958
|
-
if (this.isInitialized(normalizedIdentifier)) {
|
|
2959
|
-
throw Error(`${this.name}(${normalizedIdentifier}) has already been initialized`);
|
|
2960
|
-
}
|
|
2961
|
-
if (!this.isComponentSet()) {
|
|
2962
|
-
throw Error(`Component ${this.name} has not been registered yet`);
|
|
2963
|
-
}
|
|
2964
|
-
const instance = this.getOrInitializeService({
|
|
2965
|
-
instanceIdentifier: normalizedIdentifier,
|
|
2966
|
-
options
|
|
2967
|
-
});
|
|
2968
|
-
for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {
|
|
2969
|
-
const normalizedDeferredIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);
|
|
2970
|
-
if (normalizedIdentifier === normalizedDeferredIdentifier) {
|
|
2971
|
-
instanceDeferred.resolve(instance);
|
|
2972
|
-
}
|
|
2973
|
-
}
|
|
2974
|
-
return instance;
|
|
2975
|
-
}
|
|
2976
|
-
/**
|
|
2977
|
-
*
|
|
2978
|
-
* @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().
|
|
2979
|
-
* The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.
|
|
2980
|
-
*
|
|
2981
|
-
* @param identifier An optional instance identifier
|
|
2982
|
-
* @returns a function to unregister the callback
|
|
2983
|
-
*/
|
|
2984
|
-
onInit(callback, identifier) {
|
|
2985
|
-
var _a;
|
|
2986
|
-
const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);
|
|
2987
|
-
const existingCallbacks = (_a = this.onInitCallbacks.get(normalizedIdentifier)) != null ? _a : /* @__PURE__ */ new Set();
|
|
2988
|
-
existingCallbacks.add(callback);
|
|
2989
|
-
this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);
|
|
2990
|
-
const existingInstance = this.instances.get(normalizedIdentifier);
|
|
2991
|
-
if (existingInstance) {
|
|
2992
|
-
callback(existingInstance, normalizedIdentifier);
|
|
2993
|
-
}
|
|
2994
|
-
return () => {
|
|
2995
|
-
existingCallbacks.delete(callback);
|
|
2996
|
-
};
|
|
2997
|
-
}
|
|
2998
|
-
/**
|
|
2999
|
-
* Invoke onInit callbacks synchronously
|
|
3000
|
-
* @param instance the service instance`
|
|
3001
|
-
*/
|
|
3002
|
-
invokeOnInitCallbacks(instance, identifier) {
|
|
3003
|
-
const callbacks = this.onInitCallbacks.get(identifier);
|
|
3004
|
-
if (!callbacks) {
|
|
3005
|
-
return;
|
|
3006
|
-
}
|
|
3007
|
-
for (const callback of callbacks) {
|
|
3008
|
-
try {
|
|
3009
|
-
callback(instance, identifier);
|
|
3010
|
-
} catch {
|
|
3011
|
-
}
|
|
3012
|
-
}
|
|
3013
|
-
}
|
|
3014
|
-
getOrInitializeService({ instanceIdentifier, options = {} }) {
|
|
3015
|
-
let instance = this.instances.get(instanceIdentifier);
|
|
3016
|
-
if (!instance && this.component) {
|
|
3017
|
-
instance = this.component.instanceFactory(this.container, {
|
|
3018
|
-
instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),
|
|
3019
|
-
options
|
|
3020
|
-
});
|
|
3021
|
-
this.instances.set(instanceIdentifier, instance);
|
|
3022
|
-
this.instancesOptions.set(instanceIdentifier, options);
|
|
3023
|
-
this.invokeOnInitCallbacks(instance, instanceIdentifier);
|
|
3024
|
-
if (this.component.onInstanceCreated) {
|
|
3025
|
-
try {
|
|
3026
|
-
this.component.onInstanceCreated(this.container, instanceIdentifier, instance);
|
|
3027
|
-
} catch {
|
|
3028
|
-
}
|
|
3029
|
-
}
|
|
3030
|
-
}
|
|
3031
|
-
return instance || null;
|
|
3032
|
-
}
|
|
3033
|
-
normalizeInstanceIdentifier(identifier = DEFAULT_ENTRY_NAME) {
|
|
3034
|
-
if (this.component) {
|
|
3035
|
-
return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;
|
|
3036
|
-
} else {
|
|
3037
|
-
return identifier;
|
|
3038
|
-
}
|
|
3039
|
-
}
|
|
3040
|
-
shouldAutoInitialize() {
|
|
3041
|
-
return !!this.component && this.component.instantiationMode !== "EXPLICIT";
|
|
3042
|
-
}
|
|
3043
|
-
};
|
|
3044
|
-
ComponentContainer = class {
|
|
3045
|
-
constructor(name4) {
|
|
3046
|
-
this.name = name4;
|
|
3047
|
-
this.providers = /* @__PURE__ */ new Map();
|
|
3048
|
-
}
|
|
3049
|
-
/**
|
|
3050
|
-
*
|
|
3051
|
-
* @param component Component being added
|
|
3052
|
-
* @param overwrite When a component with the same name has already been registered,
|
|
3053
|
-
* if overwrite is true: overwrite the existing component with the new component and create a new
|
|
3054
|
-
* provider with the new component. It can be useful in tests where you want to use different mocks
|
|
3055
|
-
* for different tests.
|
|
3056
|
-
* if overwrite is false: throw an exception
|
|
3057
|
-
*/
|
|
3058
|
-
addComponent(component) {
|
|
3059
|
-
const provider = this.getProvider(component.name);
|
|
3060
|
-
if (provider.isComponentSet()) {
|
|
3061
|
-
throw new Error(`Component ${component.name} has already been registered with ${this.name}`);
|
|
3062
|
-
}
|
|
3063
|
-
provider.setComponent(component);
|
|
3064
|
-
}
|
|
3065
|
-
addOrOverwriteComponent(component) {
|
|
3066
|
-
const provider = this.getProvider(component.name);
|
|
3067
|
-
if (provider.isComponentSet()) {
|
|
3068
|
-
this.providers.delete(component.name);
|
|
3069
|
-
}
|
|
3070
|
-
this.addComponent(component);
|
|
3071
|
-
}
|
|
3072
|
-
/**
|
|
3073
|
-
* getProvider provides a type safe interface where it can only be called with a field name
|
|
3074
|
-
* present in NameServiceMapping interface.
|
|
3075
|
-
*
|
|
3076
|
-
* Firebase SDKs providing services should extend NameServiceMapping interface to register
|
|
3077
|
-
* themselves.
|
|
3078
|
-
*/
|
|
3079
|
-
getProvider(name4) {
|
|
3080
|
-
if (this.providers.has(name4)) {
|
|
3081
|
-
return this.providers.get(name4);
|
|
3082
|
-
}
|
|
3083
|
-
const provider = new Provider(name4, this);
|
|
3084
|
-
this.providers.set(name4, provider);
|
|
3085
|
-
return provider;
|
|
3086
|
-
}
|
|
3087
|
-
getProviders() {
|
|
3088
|
-
return Array.from(this.providers.values());
|
|
3089
|
-
}
|
|
3090
|
-
};
|
|
3091
2569
|
}
|
|
3092
2570
|
});
|
|
3093
2571
|
|
|
@@ -3140,8 +2618,8 @@ var init_index_esm2 = __esm({
|
|
|
3140
2618
|
*
|
|
3141
2619
|
* @param name The name that the logs will be associated with
|
|
3142
2620
|
*/
|
|
3143
|
-
constructor(
|
|
3144
|
-
this.name =
|
|
2621
|
+
constructor(name3) {
|
|
2622
|
+
this.name = name3;
|
|
3145
2623
|
this._logLevel = defaultLogLevel;
|
|
3146
2624
|
this._logHandler = defaultLogHandler;
|
|
3147
2625
|
this._userLogHandler = null;
|
|
@@ -3350,8 +2828,8 @@ var init_wrap_idb_value = __esm({
|
|
|
3350
2828
|
});
|
|
3351
2829
|
|
|
3352
2830
|
// ../node_modules/idb/build/index.js
|
|
3353
|
-
function openDB(
|
|
3354
|
-
const request = indexedDB.open(
|
|
2831
|
+
function openDB(name3, version3, { blocked, upgrade, blocking, terminated } = {}) {
|
|
2832
|
+
const request = indexedDB.open(name3, version3);
|
|
3355
2833
|
const openPromise = wrap(request);
|
|
3356
2834
|
if (upgrade) {
|
|
3357
2835
|
request.addEventListener("upgradeneeded", (event) => {
|
|
@@ -3366,11 +2844,11 @@ function openDB(name4, version4, { blocked, upgrade, blocking, terminated } = {}
|
|
|
3366
2844
|
event
|
|
3367
2845
|
));
|
|
3368
2846
|
}
|
|
3369
|
-
openPromise.then((
|
|
2847
|
+
openPromise.then((db) => {
|
|
3370
2848
|
if (terminated)
|
|
3371
|
-
|
|
2849
|
+
db.addEventListener("close", () => terminated());
|
|
3372
2850
|
if (blocking) {
|
|
3373
|
-
|
|
2851
|
+
db.addEventListener("versionchange", (event) => blocking(event.oldVersion, event.newVersion, event));
|
|
3374
2852
|
}
|
|
3375
2853
|
}).catch(() => {
|
|
3376
2854
|
});
|
|
@@ -3426,11 +2904,11 @@ function isVersionServiceProvider(provider) {
|
|
|
3426
2904
|
const component = provider.getComponent();
|
|
3427
2905
|
return (component == null ? void 0 : component.type) === "VERSION";
|
|
3428
2906
|
}
|
|
3429
|
-
function _addComponent(
|
|
2907
|
+
function _addComponent(app, component) {
|
|
3430
2908
|
try {
|
|
3431
|
-
|
|
2909
|
+
app.container.addComponent(component);
|
|
3432
2910
|
} catch (e) {
|
|
3433
|
-
logger.debug(`Component ${component.name} failed to register with FirebaseApp ${
|
|
2911
|
+
logger.debug(`Component ${component.name} failed to register with FirebaseApp ${app.name}`, e);
|
|
3434
2912
|
}
|
|
3435
2913
|
}
|
|
3436
2914
|
function _registerComponent(component) {
|
|
@@ -3440,88 +2918,31 @@ function _registerComponent(component) {
|
|
|
3440
2918
|
return false;
|
|
3441
2919
|
}
|
|
3442
2920
|
_components.set(componentName, component);
|
|
3443
|
-
for (const
|
|
3444
|
-
_addComponent(
|
|
2921
|
+
for (const app of _apps.values()) {
|
|
2922
|
+
_addComponent(app, component);
|
|
3445
2923
|
}
|
|
3446
2924
|
for (const serverApp of _serverApps.values()) {
|
|
3447
2925
|
_addComponent(serverApp, component);
|
|
3448
2926
|
}
|
|
3449
2927
|
return true;
|
|
3450
2928
|
}
|
|
3451
|
-
function _getProvider(app2, name4) {
|
|
3452
|
-
const heartbeatController = app2.container.getProvider("heartbeat").getImmediate({ optional: true });
|
|
3453
|
-
if (heartbeatController) {
|
|
3454
|
-
void heartbeatController.triggerHeartbeat();
|
|
3455
|
-
}
|
|
3456
|
-
return app2.container.getProvider(name4);
|
|
3457
|
-
}
|
|
3458
2929
|
function _isFirebaseServerApp(obj) {
|
|
3459
2930
|
if (obj === null || obj === void 0) {
|
|
3460
2931
|
return false;
|
|
3461
2932
|
}
|
|
3462
2933
|
return obj.settings !== void 0;
|
|
3463
2934
|
}
|
|
3464
|
-
function
|
|
3465
|
-
let options = _options;
|
|
3466
|
-
if (typeof rawConfig !== "object") {
|
|
3467
|
-
const name5 = rawConfig;
|
|
3468
|
-
rawConfig = { name: name5 };
|
|
3469
|
-
}
|
|
3470
|
-
const config = {
|
|
3471
|
-
name: DEFAULT_ENTRY_NAME2,
|
|
3472
|
-
automaticDataCollectionEnabled: true,
|
|
3473
|
-
...rawConfig
|
|
3474
|
-
};
|
|
3475
|
-
const name4 = config.name;
|
|
3476
|
-
if (typeof name4 !== "string" || !name4) {
|
|
3477
|
-
throw ERROR_FACTORY.create("bad-app-name", {
|
|
3478
|
-
appName: String(name4)
|
|
3479
|
-
});
|
|
3480
|
-
}
|
|
3481
|
-
options || (options = getDefaultAppConfig());
|
|
3482
|
-
if (!options) {
|
|
3483
|
-
throw ERROR_FACTORY.create(
|
|
3484
|
-
"no-options"
|
|
3485
|
-
/* AppError.NO_OPTIONS */
|
|
3486
|
-
);
|
|
3487
|
-
}
|
|
3488
|
-
const existingApp = _apps.get(name4);
|
|
3489
|
-
if (existingApp) {
|
|
3490
|
-
if (deepEqual(options, existingApp.options) && deepEqual(config, existingApp.config)) {
|
|
3491
|
-
return existingApp;
|
|
3492
|
-
} else {
|
|
3493
|
-
throw ERROR_FACTORY.create("duplicate-app", { appName: name4 });
|
|
3494
|
-
}
|
|
3495
|
-
}
|
|
3496
|
-
const container = new ComponentContainer(name4);
|
|
3497
|
-
for (const component of _components.values()) {
|
|
3498
|
-
container.addComponent(component);
|
|
3499
|
-
}
|
|
3500
|
-
const newApp = new FirebaseAppImpl(options, config, container);
|
|
3501
|
-
_apps.set(name4, newApp);
|
|
3502
|
-
return newApp;
|
|
3503
|
-
}
|
|
3504
|
-
function getApp(name4 = DEFAULT_ENTRY_NAME2) {
|
|
3505
|
-
const app2 = _apps.get(name4);
|
|
3506
|
-
if (!app2 && name4 === DEFAULT_ENTRY_NAME2 && getDefaultAppConfig()) {
|
|
3507
|
-
return initializeApp();
|
|
3508
|
-
}
|
|
3509
|
-
if (!app2) {
|
|
3510
|
-
throw ERROR_FACTORY.create("no-app", { appName: name4 });
|
|
3511
|
-
}
|
|
3512
|
-
return app2;
|
|
3513
|
-
}
|
|
3514
|
-
function registerVersion(libraryKeyOrName, version4, variant) {
|
|
2935
|
+
function registerVersion(libraryKeyOrName, version3, variant) {
|
|
3515
2936
|
var _a;
|
|
3516
2937
|
let library = (_a = PLATFORM_LOG_STRING[libraryKeyOrName]) != null ? _a : libraryKeyOrName;
|
|
3517
2938
|
if (variant) {
|
|
3518
2939
|
library += `-${variant}`;
|
|
3519
2940
|
}
|
|
3520
2941
|
const libraryMismatch = library.match(/\s|\//);
|
|
3521
|
-
const versionMismatch =
|
|
2942
|
+
const versionMismatch = version3.match(/\s|\//);
|
|
3522
2943
|
if (libraryMismatch || versionMismatch) {
|
|
3523
2944
|
const warning = [
|
|
3524
|
-
`Unable to register library "${library}" with version "${
|
|
2945
|
+
`Unable to register library "${library}" with version "${version3}":`
|
|
3525
2946
|
];
|
|
3526
2947
|
if (libraryMismatch) {
|
|
3527
2948
|
warning.push(`library name "${library}" contains illegal characters (whitespace or "/")`);
|
|
@@ -3530,14 +2951,14 @@ function registerVersion(libraryKeyOrName, version4, variant) {
|
|
|
3530
2951
|
warning.push("and");
|
|
3531
2952
|
}
|
|
3532
2953
|
if (versionMismatch) {
|
|
3533
|
-
warning.push(`version name "${
|
|
2954
|
+
warning.push(`version name "${version3}" contains illegal characters (whitespace or "/")`);
|
|
3534
2955
|
}
|
|
3535
2956
|
logger.warn(warning.join(" "));
|
|
3536
2957
|
return;
|
|
3537
2958
|
}
|
|
3538
2959
|
_registerComponent(new Component(
|
|
3539
2960
|
`${library}-version`,
|
|
3540
|
-
() => ({ library, version:
|
|
2961
|
+
() => ({ library, version: version3 }),
|
|
3541
2962
|
"VERSION"
|
|
3542
2963
|
/* ComponentType.VERSION */
|
|
3543
2964
|
));
|
|
@@ -3545,11 +2966,11 @@ function registerVersion(libraryKeyOrName, version4, variant) {
|
|
|
3545
2966
|
function getDbPromise() {
|
|
3546
2967
|
if (!dbPromise) {
|
|
3547
2968
|
dbPromise = openDB(DB_NAME, DB_VERSION, {
|
|
3548
|
-
upgrade: (
|
|
2969
|
+
upgrade: (db, oldVersion) => {
|
|
3549
2970
|
switch (oldVersion) {
|
|
3550
2971
|
case 0:
|
|
3551
2972
|
try {
|
|
3552
|
-
|
|
2973
|
+
db.createObjectStore(STORE_NAME);
|
|
3553
2974
|
} catch (e) {
|
|
3554
2975
|
console.warn(e);
|
|
3555
2976
|
}
|
|
@@ -3563,11 +2984,11 @@ function getDbPromise() {
|
|
|
3563
2984
|
}
|
|
3564
2985
|
return dbPromise;
|
|
3565
2986
|
}
|
|
3566
|
-
async function readHeartbeatsFromIndexedDB(
|
|
2987
|
+
async function readHeartbeatsFromIndexedDB(app) {
|
|
3567
2988
|
try {
|
|
3568
|
-
const
|
|
3569
|
-
const tx =
|
|
3570
|
-
const result = await tx.objectStore(STORE_NAME).get(computeKey(
|
|
2989
|
+
const db = await getDbPromise();
|
|
2990
|
+
const tx = db.transaction(STORE_NAME);
|
|
2991
|
+
const result = await tx.objectStore(STORE_NAME).get(computeKey(app));
|
|
3571
2992
|
await tx.done;
|
|
3572
2993
|
return result;
|
|
3573
2994
|
} catch (e) {
|
|
@@ -3581,12 +3002,12 @@ async function readHeartbeatsFromIndexedDB(app2) {
|
|
|
3581
3002
|
}
|
|
3582
3003
|
}
|
|
3583
3004
|
}
|
|
3584
|
-
async function writeHeartbeatsToIndexedDB(
|
|
3005
|
+
async function writeHeartbeatsToIndexedDB(app, heartbeatObject) {
|
|
3585
3006
|
try {
|
|
3586
|
-
const
|
|
3587
|
-
const tx =
|
|
3007
|
+
const db = await getDbPromise();
|
|
3008
|
+
const tx = db.transaction(STORE_NAME, "readwrite");
|
|
3588
3009
|
const objectStore = tx.objectStore(STORE_NAME);
|
|
3589
|
-
await objectStore.put(heartbeatObject, computeKey(
|
|
3010
|
+
await objectStore.put(heartbeatObject, computeKey(app));
|
|
3590
3011
|
await tx.done;
|
|
3591
3012
|
} catch (e) {
|
|
3592
3013
|
if (e instanceof FirebaseError) {
|
|
@@ -3599,8 +3020,8 @@ async function writeHeartbeatsToIndexedDB(app2, heartbeatObject) {
|
|
|
3599
3020
|
}
|
|
3600
3021
|
}
|
|
3601
3022
|
}
|
|
3602
|
-
function computeKey(
|
|
3603
|
-
return `${
|
|
3023
|
+
function computeKey(app) {
|
|
3024
|
+
return `${app.name}!${app.options.appId}`;
|
|
3604
3025
|
}
|
|
3605
3026
|
function getUTCDateString() {
|
|
3606
3027
|
const today = /* @__PURE__ */ new Date();
|
|
@@ -3671,7 +3092,7 @@ function registerCoreComponents(variant) {
|
|
|
3671
3092
|
registerVersion(name$q, version$1, "esm2020");
|
|
3672
3093
|
registerVersion("fire-js", "");
|
|
3673
3094
|
}
|
|
3674
|
-
var PlatformLoggerServiceImpl, name$q, version$1, logger, name$p, name$o, name$n, name$m, name$l, name$k, name$j, name$i, name$h, name$g, name$f, name$e, name$d, name$c, name$b, name$a, name$9, name$8, name$7, name$6, name$5, name$4, name$3, name$2, name$1, name2, version,
|
|
3095
|
+
var PlatformLoggerServiceImpl, name$q, version$1, logger, name$p, name$o, name$n, name$m, name$l, name$k, name$j, name$i, name$h, name$g, name$f, name$e, name$d, name$c, name$b, name$a, name$9, name$8, name$7, name$6, name$5, name$4, name$3, name$2, name$1, name2, version, PLATFORM_LOG_STRING, _apps, _serverApps, _components, ERRORS, ERROR_FACTORY, SDK_VERSION, DB_NAME, DB_VERSION, STORE_NAME, dbPromise, MAX_HEADER_BYTES, MAX_NUM_STORED_HEARTBEATS, HeartbeatServiceImpl, HeartbeatStorageImpl;
|
|
3675
3096
|
var init_index_esm3 = __esm({
|
|
3676
3097
|
"../node_modules/@firebase/app/dist/esm/index.esm.js"() {
|
|
3677
3098
|
"use strict";
|
|
@@ -3728,7 +3149,6 @@ var init_index_esm3 = __esm({
|
|
|
3728
3149
|
name$1 = "@firebase/firestore-compat";
|
|
3729
3150
|
name2 = "firebase";
|
|
3730
3151
|
version = "12.6.0";
|
|
3731
|
-
DEFAULT_ENTRY_NAME2 = "[DEFAULT]";
|
|
3732
3152
|
PLATFORM_LOG_STRING = {
|
|
3733
3153
|
[name$q]: "fire-core",
|
|
3734
3154
|
[name$p]: "fire-core-compat",
|
|
@@ -3822,60 +3242,6 @@ var init_index_esm3 = __esm({
|
|
|
3822
3242
|
]: "FirebaseServerApp is not for use in browser environments."
|
|
3823
3243
|
};
|
|
3824
3244
|
ERROR_FACTORY = new ErrorFactory("app", "Firebase", ERRORS);
|
|
3825
|
-
FirebaseAppImpl = class {
|
|
3826
|
-
constructor(options, config, container) {
|
|
3827
|
-
this._isDeleted = false;
|
|
3828
|
-
this._options = { ...options };
|
|
3829
|
-
this._config = { ...config };
|
|
3830
|
-
this._name = config.name;
|
|
3831
|
-
this._automaticDataCollectionEnabled = config.automaticDataCollectionEnabled;
|
|
3832
|
-
this._container = container;
|
|
3833
|
-
this.container.addComponent(new Component(
|
|
3834
|
-
"app",
|
|
3835
|
-
() => this,
|
|
3836
|
-
"PUBLIC"
|
|
3837
|
-
/* ComponentType.PUBLIC */
|
|
3838
|
-
));
|
|
3839
|
-
}
|
|
3840
|
-
get automaticDataCollectionEnabled() {
|
|
3841
|
-
this.checkDestroyed();
|
|
3842
|
-
return this._automaticDataCollectionEnabled;
|
|
3843
|
-
}
|
|
3844
|
-
set automaticDataCollectionEnabled(val) {
|
|
3845
|
-
this.checkDestroyed();
|
|
3846
|
-
this._automaticDataCollectionEnabled = val;
|
|
3847
|
-
}
|
|
3848
|
-
get name() {
|
|
3849
|
-
this.checkDestroyed();
|
|
3850
|
-
return this._name;
|
|
3851
|
-
}
|
|
3852
|
-
get options() {
|
|
3853
|
-
this.checkDestroyed();
|
|
3854
|
-
return this._options;
|
|
3855
|
-
}
|
|
3856
|
-
get config() {
|
|
3857
|
-
this.checkDestroyed();
|
|
3858
|
-
return this._config;
|
|
3859
|
-
}
|
|
3860
|
-
get container() {
|
|
3861
|
-
return this._container;
|
|
3862
|
-
}
|
|
3863
|
-
get isDeleted() {
|
|
3864
|
-
return this._isDeleted;
|
|
3865
|
-
}
|
|
3866
|
-
set isDeleted(val) {
|
|
3867
|
-
this._isDeleted = val;
|
|
3868
|
-
}
|
|
3869
|
-
/**
|
|
3870
|
-
* This function will throw an Error if the App has already been deleted -
|
|
3871
|
-
* use before performing API actions on the App.
|
|
3872
|
-
*/
|
|
3873
|
-
checkDestroyed() {
|
|
3874
|
-
if (this.isDeleted) {
|
|
3875
|
-
throw ERROR_FACTORY.create("app-deleted", { appName: this._name });
|
|
3876
|
-
}
|
|
3877
|
-
}
|
|
3878
|
-
};
|
|
3879
3245
|
SDK_VERSION = version;
|
|
3880
3246
|
DB_NAME = "firebase-heartbeat-database";
|
|
3881
3247
|
DB_VERSION = 1;
|
|
@@ -3887,8 +3253,8 @@ var init_index_esm3 = __esm({
|
|
|
3887
3253
|
constructor(container) {
|
|
3888
3254
|
this.container = container;
|
|
3889
3255
|
this._heartbeatsCache = null;
|
|
3890
|
-
const
|
|
3891
|
-
this._storage = new HeartbeatStorageImpl(
|
|
3256
|
+
const app = this.container.getProvider("app").getImmediate();
|
|
3257
|
+
this._storage = new HeartbeatStorageImpl(app);
|
|
3892
3258
|
this._heartbeatsCachePromise = this._storage.read().then((result) => {
|
|
3893
3259
|
this._heartbeatsCache = result;
|
|
3894
3260
|
return result;
|
|
@@ -3962,8 +3328,8 @@ var init_index_esm3 = __esm({
|
|
|
3962
3328
|
}
|
|
3963
3329
|
};
|
|
3964
3330
|
HeartbeatStorageImpl = class {
|
|
3965
|
-
constructor(
|
|
3966
|
-
this.app =
|
|
3331
|
+
constructor(app) {
|
|
3332
|
+
this.app = app;
|
|
3967
3333
|
this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
|
|
3968
3334
|
}
|
|
3969
3335
|
async runIndexedDBEnvironmentCheck() {
|
|
@@ -5447,8 +4813,8 @@ var require_service_config = __commonJS({
|
|
|
5447
4813
|
if (!("name" in obj) || !Array.isArray(obj.name)) {
|
|
5448
4814
|
throw new Error("Invalid method config: invalid name array");
|
|
5449
4815
|
}
|
|
5450
|
-
for (const
|
|
5451
|
-
result.name.push(validateName(
|
|
4816
|
+
for (const name3 of obj.name) {
|
|
4817
|
+
result.name.push(validateName(name3));
|
|
5452
4818
|
}
|
|
5453
4819
|
if ("waitForReady" in obj) {
|
|
5454
4820
|
if (typeof obj.waitForReady !== "boolean") {
|
|
@@ -5544,13 +4910,13 @@ var require_service_config = __commonJS({
|
|
|
5544
4910
|
}
|
|
5545
4911
|
const seenMethodNames = [];
|
|
5546
4912
|
for (const methodConfig of result.methodConfig) {
|
|
5547
|
-
for (const
|
|
4913
|
+
for (const name3 of methodConfig.name) {
|
|
5548
4914
|
for (const seenName of seenMethodNames) {
|
|
5549
|
-
if (
|
|
5550
|
-
throw new Error(`Invalid service config: duplicate name ${
|
|
4915
|
+
if (name3.service === seenName.service && name3.method === seenName.method) {
|
|
4916
|
+
throw new Error(`Invalid service config: duplicate name ${name3.service}/${name3.method}`);
|
|
5551
4917
|
}
|
|
5552
4918
|
}
|
|
5553
|
-
seenMethodNames.push(
|
|
4919
|
+
seenMethodNames.push(name3);
|
|
5554
4920
|
}
|
|
5555
4921
|
}
|
|
5556
4922
|
return result;
|
|
@@ -6154,20 +5520,20 @@ var require_resolving_load_balancer = __commonJS({
|
|
|
6154
5520
|
"EMPTY"
|
|
6155
5521
|
];
|
|
6156
5522
|
function hasMatchingName(service, method, methodConfig, matchLevel) {
|
|
6157
|
-
for (const
|
|
5523
|
+
for (const name3 of methodConfig.name) {
|
|
6158
5524
|
switch (matchLevel) {
|
|
6159
5525
|
case "EMPTY":
|
|
6160
|
-
if (!
|
|
5526
|
+
if (!name3.service && !name3.method) {
|
|
6161
5527
|
return true;
|
|
6162
5528
|
}
|
|
6163
5529
|
break;
|
|
6164
5530
|
case "SERVICE":
|
|
6165
|
-
if (
|
|
5531
|
+
if (name3.service === service && !name3.method) {
|
|
6166
5532
|
return true;
|
|
6167
5533
|
}
|
|
6168
5534
|
break;
|
|
6169
5535
|
case "SERVICE_AND_METHOD":
|
|
6170
|
-
if (
|
|
5536
|
+
if (name3.service === service && name3.method === method) {
|
|
6171
5537
|
return true;
|
|
6172
5538
|
}
|
|
6173
5539
|
}
|
|
@@ -7423,13 +6789,13 @@ var require_make_client = __commonJS({
|
|
|
7423
6789
|
}
|
|
7424
6790
|
class ServiceClientImpl extends client_1.Client {
|
|
7425
6791
|
}
|
|
7426
|
-
Object.keys(methods).forEach((
|
|
7427
|
-
if (isPrototypePolluted(
|
|
6792
|
+
Object.keys(methods).forEach((name3) => {
|
|
6793
|
+
if (isPrototypePolluted(name3)) {
|
|
7428
6794
|
return;
|
|
7429
6795
|
}
|
|
7430
|
-
const attrs = methods[
|
|
6796
|
+
const attrs = methods[name3];
|
|
7431
6797
|
let methodType;
|
|
7432
|
-
if (typeof
|
|
6798
|
+
if (typeof name3 === "string" && name3.charAt(0) === "$") {
|
|
7433
6799
|
throw new Error("Method names cannot start with $");
|
|
7434
6800
|
}
|
|
7435
6801
|
if (attrs.requestStream) {
|
|
@@ -7448,10 +6814,10 @@ var require_make_client = __commonJS({
|
|
|
7448
6814
|
const serialize = attrs.requestSerialize;
|
|
7449
6815
|
const deserialize = attrs.responseDeserialize;
|
|
7450
6816
|
const methodFunc = partial(requesterFuncs[methodType], attrs.path, serialize, deserialize);
|
|
7451
|
-
ServiceClientImpl.prototype[
|
|
7452
|
-
Object.assign(ServiceClientImpl.prototype[
|
|
6817
|
+
ServiceClientImpl.prototype[name3] = methodFunc;
|
|
6818
|
+
Object.assign(ServiceClientImpl.prototype[name3], attrs);
|
|
7453
6819
|
if (attrs.originalName && !isPrototypePolluted(attrs.originalName)) {
|
|
7454
|
-
ServiceClientImpl.prototype[attrs.originalName] = ServiceClientImpl.prototype[
|
|
6820
|
+
ServiceClientImpl.prototype[attrs.originalName] = ServiceClientImpl.prototype[name3];
|
|
7455
6821
|
}
|
|
7456
6822
|
});
|
|
7457
6823
|
ServiceClientImpl.service = methods;
|
|
@@ -8501,7 +7867,7 @@ var require_minimal = __commonJS({
|
|
|
8501
7867
|
util.isString = function isString(value) {
|
|
8502
7868
|
return typeof value === "string" || value instanceof String;
|
|
8503
7869
|
};
|
|
8504
|
-
util.isObject = function
|
|
7870
|
+
util.isObject = function isObject(value) {
|
|
8505
7871
|
return value && typeof value === "object";
|
|
8506
7872
|
};
|
|
8507
7873
|
util.isset = /**
|
|
@@ -8559,7 +7925,7 @@ var require_minimal = __commonJS({
|
|
|
8559
7925
|
util.lcFirst = function lcFirst(str) {
|
|
8560
7926
|
return str.charAt(0).toLowerCase() + str.substring(1);
|
|
8561
7927
|
};
|
|
8562
|
-
function newError(
|
|
7928
|
+
function newError(name3) {
|
|
8563
7929
|
function CustomError(message, properties) {
|
|
8564
7930
|
if (!(this instanceof CustomError))
|
|
8565
7931
|
return new CustomError(message, properties);
|
|
@@ -8582,7 +7948,7 @@ var require_minimal = __commonJS({
|
|
|
8582
7948
|
},
|
|
8583
7949
|
name: {
|
|
8584
7950
|
get: function get() {
|
|
8585
|
-
return
|
|
7951
|
+
return name3;
|
|
8586
7952
|
},
|
|
8587
7953
|
set: void 0,
|
|
8588
7954
|
enumerable: false,
|
|
@@ -8616,9 +7982,9 @@ var require_minimal = __commonJS({
|
|
|
8616
7982
|
};
|
|
8617
7983
|
};
|
|
8618
7984
|
util.oneOfSetter = function setOneOf(fieldNames) {
|
|
8619
|
-
return function(
|
|
7985
|
+
return function(name3) {
|
|
8620
7986
|
for (var i = 0; i < fieldNames.length; ++i)
|
|
8621
|
-
if (fieldNames[i] !==
|
|
7987
|
+
if (fieldNames[i] !== name3)
|
|
8622
7988
|
delete this[fieldNames[i]];
|
|
8623
7989
|
};
|
|
8624
7990
|
};
|
|
@@ -9429,8 +8795,8 @@ var require_namespace = __commonJS({
|
|
|
9429
8795
|
var Type;
|
|
9430
8796
|
var Service;
|
|
9431
8797
|
var Enum;
|
|
9432
|
-
Namespace.fromJSON = function fromJSON2(
|
|
9433
|
-
return new Namespace(
|
|
8798
|
+
Namespace.fromJSON = function fromJSON2(name3, json) {
|
|
8799
|
+
return new Namespace(name3, json.options).addJSON(json.nested);
|
|
9434
8800
|
};
|
|
9435
8801
|
function arrayToJSON(array, toJSONOptions) {
|
|
9436
8802
|
if (!(array && array.length))
|
|
@@ -9449,16 +8815,16 @@ var require_namespace = __commonJS({
|
|
|
9449
8815
|
}
|
|
9450
8816
|
return false;
|
|
9451
8817
|
};
|
|
9452
|
-
Namespace.isReservedName = function isReservedName(reserved,
|
|
8818
|
+
Namespace.isReservedName = function isReservedName(reserved, name3) {
|
|
9453
8819
|
if (reserved) {
|
|
9454
8820
|
for (var i = 0; i < reserved.length; ++i)
|
|
9455
|
-
if (reserved[i] ===
|
|
8821
|
+
if (reserved[i] === name3)
|
|
9456
8822
|
return true;
|
|
9457
8823
|
}
|
|
9458
8824
|
return false;
|
|
9459
8825
|
};
|
|
9460
|
-
function Namespace(
|
|
9461
|
-
ReflectionObject.call(this,
|
|
8826
|
+
function Namespace(name3, options) {
|
|
8827
|
+
ReflectionObject.call(this, name3, options);
|
|
9462
8828
|
this.nested = void 0;
|
|
9463
8829
|
this._nestedArray = null;
|
|
9464
8830
|
this._lookupCache = {};
|
|
@@ -9500,13 +8866,13 @@ var require_namespace = __commonJS({
|
|
|
9500
8866
|
}
|
|
9501
8867
|
return this;
|
|
9502
8868
|
};
|
|
9503
|
-
Namespace.prototype.get = function get(
|
|
9504
|
-
return this.nested && this.nested[
|
|
8869
|
+
Namespace.prototype.get = function get(name3) {
|
|
8870
|
+
return this.nested && this.nested[name3] || null;
|
|
9505
8871
|
};
|
|
9506
|
-
Namespace.prototype.getEnum = function getEnum(
|
|
9507
|
-
if (this.nested && this.nested[
|
|
9508
|
-
return this.nested[
|
|
9509
|
-
throw Error("no such enum: " +
|
|
8872
|
+
Namespace.prototype.getEnum = function getEnum(name3) {
|
|
8873
|
+
if (this.nested && this.nested[name3] instanceof Enum)
|
|
8874
|
+
return this.nested[name3].values;
|
|
8875
|
+
throw Error("no such enum: " + name3);
|
|
9510
8876
|
};
|
|
9511
8877
|
Namespace.prototype.add = function add(object) {
|
|
9512
8878
|
if (!(object instanceof Field && object.extend !== void 0 || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace))
|
|
@@ -9696,16 +9062,16 @@ var require_mapfield = __commonJS({
|
|
|
9696
9062
|
((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = "MapField";
|
|
9697
9063
|
var types = require_types();
|
|
9698
9064
|
var util = require_util();
|
|
9699
|
-
function MapField(
|
|
9700
|
-
Field.call(this,
|
|
9065
|
+
function MapField(name3, id, keyType, type, options, comment) {
|
|
9066
|
+
Field.call(this, name3, id, type, void 0, void 0, options, comment);
|
|
9701
9067
|
if (!util.isString(keyType))
|
|
9702
9068
|
throw TypeError("keyType must be a string");
|
|
9703
9069
|
this.keyType = keyType;
|
|
9704
9070
|
this.resolvedKeyType = null;
|
|
9705
9071
|
this.map = true;
|
|
9706
9072
|
}
|
|
9707
|
-
MapField.fromJSON = function fromJSON2(
|
|
9708
|
-
return new MapField(
|
|
9073
|
+
MapField.fromJSON = function fromJSON2(name3, json) {
|
|
9074
|
+
return new MapField(name3, json.id, json.keyType, json.type, json.options, json.comment);
|
|
9709
9075
|
};
|
|
9710
9076
|
MapField.prototype.toJSON = function toJSON(toJSONOptions) {
|
|
9711
9077
|
var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
|
|
@@ -9751,7 +9117,7 @@ var require_method = __commonJS({
|
|
|
9751
9117
|
var ReflectionObject = require_object();
|
|
9752
9118
|
((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = "Method";
|
|
9753
9119
|
var util = require_util();
|
|
9754
|
-
function Method(
|
|
9120
|
+
function Method(name3, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) {
|
|
9755
9121
|
if (util.isObject(requestStream)) {
|
|
9756
9122
|
options = requestStream;
|
|
9757
9123
|
requestStream = responseStream = void 0;
|
|
@@ -9765,7 +9131,7 @@ var require_method = __commonJS({
|
|
|
9765
9131
|
throw TypeError("requestType must be a string");
|
|
9766
9132
|
if (!util.isString(responseType))
|
|
9767
9133
|
throw TypeError("responseType must be a string");
|
|
9768
|
-
ReflectionObject.call(this,
|
|
9134
|
+
ReflectionObject.call(this, name3, options);
|
|
9769
9135
|
this.type = type || "rpc";
|
|
9770
9136
|
this.requestType = requestType;
|
|
9771
9137
|
this.requestStream = requestStream ? true : void 0;
|
|
@@ -9776,8 +9142,8 @@ var require_method = __commonJS({
|
|
|
9776
9142
|
this.comment = comment;
|
|
9777
9143
|
this.parsedOptions = parsedOptions;
|
|
9778
9144
|
}
|
|
9779
|
-
Method.fromJSON = function fromJSON2(
|
|
9780
|
-
return new Method(
|
|
9145
|
+
Method.fromJSON = function fromJSON2(name3, json) {
|
|
9146
|
+
return new Method(name3, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions);
|
|
9781
9147
|
};
|
|
9782
9148
|
Method.prototype.toJSON = function toJSON(toJSONOptions) {
|
|
9783
9149
|
var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
|
|
@@ -9821,13 +9187,13 @@ var require_service2 = __commonJS({
|
|
|
9821
9187
|
var Method = require_method();
|
|
9822
9188
|
var util = require_util();
|
|
9823
9189
|
var rpc = require_rpc();
|
|
9824
|
-
function Service(
|
|
9825
|
-
Namespace.call(this,
|
|
9190
|
+
function Service(name3, options) {
|
|
9191
|
+
Namespace.call(this, name3, options);
|
|
9826
9192
|
this.methods = {};
|
|
9827
9193
|
this._methodsArray = null;
|
|
9828
9194
|
}
|
|
9829
|
-
Service.fromJSON = function fromJSON2(
|
|
9830
|
-
var service = new Service(
|
|
9195
|
+
Service.fromJSON = function fromJSON2(name3, json) {
|
|
9196
|
+
var service = new Service(name3, json.options);
|
|
9831
9197
|
if (json.methods)
|
|
9832
9198
|
for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)
|
|
9833
9199
|
service.add(Method.fromJSON(names[i], json.methods[names[i]]));
|
|
@@ -9865,8 +9231,8 @@ var require_service2 = __commonJS({
|
|
|
9865
9231
|
service._methodsArray = null;
|
|
9866
9232
|
return service;
|
|
9867
9233
|
}
|
|
9868
|
-
Service.prototype.get = function get(
|
|
9869
|
-
return this.methods[
|
|
9234
|
+
Service.prototype.get = function get(name3) {
|
|
9235
|
+
return this.methods[name3] || Namespace.prototype.get.call(this, name3);
|
|
9870
9236
|
};
|
|
9871
9237
|
Service.prototype.resolveAll = function resolveAll() {
|
|
9872
9238
|
if (!this._needsRecursiveResolve) return this;
|
|
@@ -10331,8 +9697,8 @@ var require_wrappers = __commonJS({
|
|
|
10331
9697
|
wrappers[".google.protobuf.Any"] = {
|
|
10332
9698
|
fromObject: function(object) {
|
|
10333
9699
|
if (object && object["@type"]) {
|
|
10334
|
-
var
|
|
10335
|
-
var type = this.lookup(
|
|
9700
|
+
var name3 = object["@type"].substring(object["@type"].lastIndexOf("/") + 1);
|
|
9701
|
+
var type = this.lookup(name3);
|
|
10336
9702
|
if (type) {
|
|
10337
9703
|
var type_url = object["@type"].charAt(0) === "." ? object["@type"].slice(1) : object["@type"];
|
|
10338
9704
|
if (type_url.indexOf("/") === -1) {
|
|
@@ -10349,11 +9715,11 @@ var require_wrappers = __commonJS({
|
|
|
10349
9715
|
toObject: function(message, options) {
|
|
10350
9716
|
var googleApi = "type.googleapis.com/";
|
|
10351
9717
|
var prefix = "";
|
|
10352
|
-
var
|
|
9718
|
+
var name3 = "";
|
|
10353
9719
|
if (options && options.json && message.type_url && message.value) {
|
|
10354
|
-
|
|
9720
|
+
name3 = message.type_url.substring(message.type_url.lastIndexOf("/") + 1);
|
|
10355
9721
|
prefix = message.type_url.substring(0, message.type_url.lastIndexOf("/") + 1);
|
|
10356
|
-
var type = this.lookup(
|
|
9722
|
+
var type = this.lookup(name3);
|
|
10357
9723
|
if (type)
|
|
10358
9724
|
message = type.decode(message.value);
|
|
10359
9725
|
}
|
|
@@ -10363,8 +9729,8 @@ var require_wrappers = __commonJS({
|
|
|
10363
9729
|
if (prefix === "") {
|
|
10364
9730
|
prefix = googleApi;
|
|
10365
9731
|
}
|
|
10366
|
-
|
|
10367
|
-
object["@type"] =
|
|
9732
|
+
name3 = prefix + messageName;
|
|
9733
|
+
object["@type"] = name3;
|
|
10368
9734
|
return object;
|
|
10369
9735
|
}
|
|
10370
9736
|
return this.toObject(message, options);
|
|
@@ -10394,8 +9760,8 @@ var require_type = __commonJS({
|
|
|
10394
9760
|
var verifier = require_verifier();
|
|
10395
9761
|
var converter = require_converter();
|
|
10396
9762
|
var wrappers = require_wrappers();
|
|
10397
|
-
function Type(
|
|
10398
|
-
Namespace.call(this,
|
|
9763
|
+
function Type(name3, options) {
|
|
9764
|
+
Namespace.call(this, name3, options);
|
|
10399
9765
|
this.fields = {};
|
|
10400
9766
|
this.oneofs = void 0;
|
|
10401
9767
|
this.extensions = void 0;
|
|
@@ -10498,8 +9864,8 @@ var require_type = __commonJS({
|
|
|
10498
9864
|
delete type.verify;
|
|
10499
9865
|
return type;
|
|
10500
9866
|
}
|
|
10501
|
-
Type.fromJSON = function fromJSON2(
|
|
10502
|
-
var type = new Type(
|
|
9867
|
+
Type.fromJSON = function fromJSON2(name3, json) {
|
|
9868
|
+
var type = new Type(name3, json.options);
|
|
10503
9869
|
type.extensions = json.extensions;
|
|
10504
9870
|
type.reserved = json.reserved;
|
|
10505
9871
|
var names = Object.keys(json.fields), i = 0;
|
|
@@ -10581,8 +9947,8 @@ var require_type = __commonJS({
|
|
|
10581
9947
|
});
|
|
10582
9948
|
return this;
|
|
10583
9949
|
};
|
|
10584
|
-
Type.prototype.get = function get(
|
|
10585
|
-
return this.fields[
|
|
9950
|
+
Type.prototype.get = function get(name3) {
|
|
9951
|
+
return this.fields[name3] || this.oneofs && this.oneofs[name3] || this.nested && this.nested[name3] || null;
|
|
10586
9952
|
};
|
|
10587
9953
|
Type.prototype.add = function add(object) {
|
|
10588
9954
|
if (this.get(object.name))
|
|
@@ -10635,8 +10001,8 @@ var require_type = __commonJS({
|
|
|
10635
10001
|
Type.prototype.isReservedId = function isReservedId(id) {
|
|
10636
10002
|
return Namespace.isReservedId(this.reserved, id);
|
|
10637
10003
|
};
|
|
10638
|
-
Type.prototype.isReservedName = function isReservedName(
|
|
10639
|
-
return Namespace.isReservedName(this.reserved,
|
|
10004
|
+
Type.prototype.isReservedName = function isReservedName(name3) {
|
|
10005
|
+
return Namespace.isReservedName(this.reserved, name3);
|
|
10640
10006
|
};
|
|
10641
10007
|
Type.prototype.create = function create(properties) {
|
|
10642
10008
|
return new this.ctor(properties);
|
|
@@ -10990,8 +10356,8 @@ var require_util = __commonJS({
|
|
|
10990
10356
|
};
|
|
10991
10357
|
var safePropBackslashRe = /\\/g;
|
|
10992
10358
|
var safePropQuoteRe = /"/g;
|
|
10993
|
-
util.isReserved = function isReserved(
|
|
10994
|
-
return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(
|
|
10359
|
+
util.isReserved = function isReserved(name3) {
|
|
10360
|
+
return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name3);
|
|
10995
10361
|
};
|
|
10996
10362
|
util.safeProp = function safeProp(prop) {
|
|
10997
10363
|
if (!/^[$\w_]+$/.test(prop) || util.isReserved(prop))
|
|
@@ -11263,14 +10629,14 @@ var require_field = __commonJS({
|
|
|
11263
10629
|
var util = require_util();
|
|
11264
10630
|
var Type;
|
|
11265
10631
|
var ruleRe = /^required|optional|repeated$/;
|
|
11266
|
-
Field.fromJSON = function fromJSON2(
|
|
11267
|
-
var field = new Field(
|
|
10632
|
+
Field.fromJSON = function fromJSON2(name3, json) {
|
|
10633
|
+
var field = new Field(name3, json.id, json.type, json.rule, json.extend, json.options, json.comment);
|
|
11268
10634
|
if (json.edition)
|
|
11269
10635
|
field._edition = json.edition;
|
|
11270
10636
|
field._defaultEdition = "proto3";
|
|
11271
10637
|
return field;
|
|
11272
10638
|
};
|
|
11273
|
-
function Field(
|
|
10639
|
+
function Field(name3, id, type, rule, extend, options, comment) {
|
|
11274
10640
|
if (util.isObject(rule)) {
|
|
11275
10641
|
comment = extend;
|
|
11276
10642
|
options = rule;
|
|
@@ -11280,7 +10646,7 @@ var require_field = __commonJS({
|
|
|
11280
10646
|
options = extend;
|
|
11281
10647
|
extend = void 0;
|
|
11282
10648
|
}
|
|
11283
|
-
ReflectionObject.call(this,
|
|
10649
|
+
ReflectionObject.call(this, name3, options);
|
|
11284
10650
|
if (!util.isInteger(id) || id < 0)
|
|
11285
10651
|
throw TypeError("id must be a non-negative integer");
|
|
11286
10652
|
if (!util.isString(type))
|
|
@@ -11342,8 +10708,8 @@ var require_field = __commonJS({
|
|
|
11342
10708
|
this._features.field_presence !== "IMPLICIT";
|
|
11343
10709
|
}
|
|
11344
10710
|
});
|
|
11345
|
-
Field.prototype.setOption = function setOption(
|
|
11346
|
-
return ReflectionObject.prototype.setOption.call(this,
|
|
10711
|
+
Field.prototype.setOption = function setOption(name3, value, ifNotSet) {
|
|
10712
|
+
return ReflectionObject.prototype.setOption.call(this, name3, value, ifNotSet);
|
|
11347
10713
|
};
|
|
11348
10714
|
Field.prototype.toJSON = function toJSON(toJSONOptions) {
|
|
11349
10715
|
var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
|
|
@@ -11457,20 +10823,20 @@ var require_oneof = __commonJS({
|
|
|
11457
10823
|
((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = "OneOf";
|
|
11458
10824
|
var Field = require_field();
|
|
11459
10825
|
var util = require_util();
|
|
11460
|
-
function OneOf(
|
|
10826
|
+
function OneOf(name3, fieldNames, options, comment) {
|
|
11461
10827
|
if (!Array.isArray(fieldNames)) {
|
|
11462
10828
|
options = fieldNames;
|
|
11463
10829
|
fieldNames = void 0;
|
|
11464
10830
|
}
|
|
11465
|
-
ReflectionObject.call(this,
|
|
10831
|
+
ReflectionObject.call(this, name3, options);
|
|
11466
10832
|
if (!(fieldNames === void 0 || Array.isArray(fieldNames)))
|
|
11467
10833
|
throw TypeError("fieldNames must be an Array");
|
|
11468
10834
|
this.oneof = fieldNames || [];
|
|
11469
10835
|
this.fieldsArray = [];
|
|
11470
10836
|
this.comment = comment;
|
|
11471
10837
|
}
|
|
11472
|
-
OneOf.fromJSON = function fromJSON2(
|
|
11473
|
-
return new OneOf(
|
|
10838
|
+
OneOf.fromJSON = function fromJSON2(name3, json) {
|
|
10839
|
+
return new OneOf(name3, json.oneof, json.options, json.comment);
|
|
11474
10840
|
};
|
|
11475
10841
|
OneOf.prototype.toJSON = function toJSON(toJSONOptions) {
|
|
11476
10842
|
var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
|
|
@@ -11568,14 +10934,14 @@ var require_object = __commonJS({
|
|
|
11568
10934
|
var editions2023Defaults = { enum_type: "OPEN", field_presence: "EXPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY" };
|
|
11569
10935
|
var proto2Defaults = { enum_type: "CLOSED", field_presence: "EXPLICIT", json_format: "LEGACY_BEST_EFFORT", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "EXPANDED", utf8_validation: "NONE" };
|
|
11570
10936
|
var proto3Defaults = { enum_type: "OPEN", field_presence: "IMPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY" };
|
|
11571
|
-
function ReflectionObject(
|
|
11572
|
-
if (!util.isString(
|
|
10937
|
+
function ReflectionObject(name3, options) {
|
|
10938
|
+
if (!util.isString(name3))
|
|
11573
10939
|
throw TypeError("name must be a string");
|
|
11574
10940
|
if (options && !util.isObject(options))
|
|
11575
10941
|
throw TypeError("options must be an object");
|
|
11576
10942
|
this.options = options;
|
|
11577
10943
|
this.parsedOptions = null;
|
|
11578
|
-
this.name =
|
|
10944
|
+
this.name = name3;
|
|
11579
10945
|
this._edition = null;
|
|
11580
10946
|
this._defaultEdition = "proto2";
|
|
11581
10947
|
this._features = {};
|
|
@@ -11691,42 +11057,42 @@ var require_object = __commonJS({
|
|
|
11691
11057
|
ReflectionObject.prototype._inferLegacyProtoFeatures = function _inferLegacyProtoFeatures() {
|
|
11692
11058
|
return {};
|
|
11693
11059
|
};
|
|
11694
|
-
ReflectionObject.prototype.getOption = function getOption(
|
|
11060
|
+
ReflectionObject.prototype.getOption = function getOption(name3) {
|
|
11695
11061
|
if (this.options)
|
|
11696
|
-
return this.options[
|
|
11062
|
+
return this.options[name3];
|
|
11697
11063
|
return void 0;
|
|
11698
11064
|
};
|
|
11699
|
-
ReflectionObject.prototype.setOption = function setOption(
|
|
11065
|
+
ReflectionObject.prototype.setOption = function setOption(name3, value, ifNotSet) {
|
|
11700
11066
|
if (!this.options)
|
|
11701
11067
|
this.options = {};
|
|
11702
|
-
if (/^features\./.test(
|
|
11703
|
-
util.setProperty(this.options,
|
|
11704
|
-
} else if (!ifNotSet || this.options[
|
|
11705
|
-
if (this.getOption(
|
|
11706
|
-
this.options[
|
|
11068
|
+
if (/^features\./.test(name3)) {
|
|
11069
|
+
util.setProperty(this.options, name3, value, ifNotSet);
|
|
11070
|
+
} else if (!ifNotSet || this.options[name3] === void 0) {
|
|
11071
|
+
if (this.getOption(name3) !== value) this.resolved = false;
|
|
11072
|
+
this.options[name3] = value;
|
|
11707
11073
|
}
|
|
11708
11074
|
return this;
|
|
11709
11075
|
};
|
|
11710
|
-
ReflectionObject.prototype.setParsedOption = function setParsedOption(
|
|
11076
|
+
ReflectionObject.prototype.setParsedOption = function setParsedOption(name3, value, propName) {
|
|
11711
11077
|
if (!this.parsedOptions) {
|
|
11712
11078
|
this.parsedOptions = [];
|
|
11713
11079
|
}
|
|
11714
11080
|
var parsedOptions = this.parsedOptions;
|
|
11715
11081
|
if (propName) {
|
|
11716
11082
|
var opt = parsedOptions.find(function(opt2) {
|
|
11717
|
-
return Object.prototype.hasOwnProperty.call(opt2,
|
|
11083
|
+
return Object.prototype.hasOwnProperty.call(opt2, name3);
|
|
11718
11084
|
});
|
|
11719
11085
|
if (opt) {
|
|
11720
|
-
var newValue = opt[
|
|
11086
|
+
var newValue = opt[name3];
|
|
11721
11087
|
util.setProperty(newValue, propName, value);
|
|
11722
11088
|
} else {
|
|
11723
11089
|
opt = {};
|
|
11724
|
-
opt[
|
|
11090
|
+
opt[name3] = util.setProperty({}, propName, value);
|
|
11725
11091
|
parsedOptions.push(opt);
|
|
11726
11092
|
}
|
|
11727
11093
|
} else {
|
|
11728
11094
|
var newOpt = {};
|
|
11729
|
-
newOpt[
|
|
11095
|
+
newOpt[name3] = value;
|
|
11730
11096
|
parsedOptions.push(newOpt);
|
|
11731
11097
|
}
|
|
11732
11098
|
return this;
|
|
@@ -11764,8 +11130,8 @@ var require_enum = __commonJS({
|
|
|
11764
11130
|
((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = "Enum";
|
|
11765
11131
|
var Namespace = require_namespace();
|
|
11766
11132
|
var util = require_util();
|
|
11767
|
-
function Enum(
|
|
11768
|
-
ReflectionObject.call(this,
|
|
11133
|
+
function Enum(name3, values, options, comment, comments, valuesOptions) {
|
|
11134
|
+
ReflectionObject.call(this, name3, options);
|
|
11769
11135
|
if (values && typeof values !== "object")
|
|
11770
11136
|
throw TypeError("values must be an object");
|
|
11771
11137
|
this.valuesById = {};
|
|
@@ -11790,8 +11156,8 @@ var require_enum = __commonJS({
|
|
|
11790
11156
|
});
|
|
11791
11157
|
return this;
|
|
11792
11158
|
};
|
|
11793
|
-
Enum.fromJSON = function fromJSON2(
|
|
11794
|
-
var enm = new Enum(
|
|
11159
|
+
Enum.fromJSON = function fromJSON2(name3, json) {
|
|
11160
|
+
var enm = new Enum(name3, json.values, json.options, json.comment, json.comments);
|
|
11795
11161
|
enm.reserved = json.reserved;
|
|
11796
11162
|
if (json.edition)
|
|
11797
11163
|
enm._edition = json.edition;
|
|
@@ -11817,49 +11183,49 @@ var require_enum = __commonJS({
|
|
|
11817
11183
|
keepComments ? this.comments : void 0
|
|
11818
11184
|
]);
|
|
11819
11185
|
};
|
|
11820
|
-
Enum.prototype.add = function add(
|
|
11821
|
-
if (!util.isString(
|
|
11186
|
+
Enum.prototype.add = function add(name3, id, comment, options) {
|
|
11187
|
+
if (!util.isString(name3))
|
|
11822
11188
|
throw TypeError("name must be a string");
|
|
11823
11189
|
if (!util.isInteger(id))
|
|
11824
11190
|
throw TypeError("id must be an integer");
|
|
11825
|
-
if (this.values[
|
|
11826
|
-
throw Error("duplicate name '" +
|
|
11191
|
+
if (this.values[name3] !== void 0)
|
|
11192
|
+
throw Error("duplicate name '" + name3 + "' in " + this);
|
|
11827
11193
|
if (this.isReservedId(id))
|
|
11828
11194
|
throw Error("id " + id + " is reserved in " + this);
|
|
11829
|
-
if (this.isReservedName(
|
|
11830
|
-
throw Error("name '" +
|
|
11195
|
+
if (this.isReservedName(name3))
|
|
11196
|
+
throw Error("name '" + name3 + "' is reserved in " + this);
|
|
11831
11197
|
if (this.valuesById[id] !== void 0) {
|
|
11832
11198
|
if (!(this.options && this.options.allow_alias))
|
|
11833
11199
|
throw Error("duplicate id " + id + " in " + this);
|
|
11834
|
-
this.values[
|
|
11200
|
+
this.values[name3] = id;
|
|
11835
11201
|
} else
|
|
11836
|
-
this.valuesById[this.values[
|
|
11202
|
+
this.valuesById[this.values[name3] = id] = name3;
|
|
11837
11203
|
if (options) {
|
|
11838
11204
|
if (this.valuesOptions === void 0)
|
|
11839
11205
|
this.valuesOptions = {};
|
|
11840
|
-
this.valuesOptions[
|
|
11206
|
+
this.valuesOptions[name3] = options || null;
|
|
11841
11207
|
}
|
|
11842
|
-
this.comments[
|
|
11208
|
+
this.comments[name3] = comment || null;
|
|
11843
11209
|
return this;
|
|
11844
11210
|
};
|
|
11845
|
-
Enum.prototype.remove = function remove(
|
|
11846
|
-
if (!util.isString(
|
|
11211
|
+
Enum.prototype.remove = function remove(name3) {
|
|
11212
|
+
if (!util.isString(name3))
|
|
11847
11213
|
throw TypeError("name must be a string");
|
|
11848
|
-
var val = this.values[
|
|
11214
|
+
var val = this.values[name3];
|
|
11849
11215
|
if (val == null)
|
|
11850
|
-
throw Error("name '" +
|
|
11216
|
+
throw Error("name '" + name3 + "' does not exist in " + this);
|
|
11851
11217
|
delete this.valuesById[val];
|
|
11852
|
-
delete this.values[
|
|
11853
|
-
delete this.comments[
|
|
11218
|
+
delete this.values[name3];
|
|
11219
|
+
delete this.comments[name3];
|
|
11854
11220
|
if (this.valuesOptions)
|
|
11855
|
-
delete this.valuesOptions[
|
|
11221
|
+
delete this.valuesOptions[name3];
|
|
11856
11222
|
return this;
|
|
11857
11223
|
};
|
|
11858
11224
|
Enum.prototype.isReservedId = function isReservedId(id) {
|
|
11859
11225
|
return Namespace.isReservedId(this.reserved, id);
|
|
11860
11226
|
};
|
|
11861
|
-
Enum.prototype.isReservedName = function isReservedName(
|
|
11862
|
-
return Namespace.isReservedName(this.reserved,
|
|
11227
|
+
Enum.prototype.isReservedName = function isReservedName(name3) {
|
|
11228
|
+
return Namespace.isReservedName(this.reserved, name3);
|
|
11863
11229
|
};
|
|
11864
11230
|
}
|
|
11865
11231
|
});
|
|
@@ -12247,8 +11613,8 @@ var require_parse = __commonJS({
|
|
|
12247
11613
|
var ptr = root;
|
|
12248
11614
|
var topLevelObjects = [];
|
|
12249
11615
|
var topLevelOptions = {};
|
|
12250
|
-
var applyCase = options.keepCase ? function(
|
|
12251
|
-
return
|
|
11616
|
+
var applyCase = options.keepCase ? function(name3) {
|
|
11617
|
+
return name3;
|
|
12252
11618
|
} : util.camelCase;
|
|
12253
11619
|
function resolveFileFeatures() {
|
|
12254
11620
|
topLevelObjects.forEach((obj) => {
|
|
@@ -12259,11 +11625,11 @@ var require_parse = __commonJS({
|
|
|
12259
11625
|
});
|
|
12260
11626
|
});
|
|
12261
11627
|
}
|
|
12262
|
-
function illegal(token2,
|
|
11628
|
+
function illegal(token2, name3, insideTryCatch) {
|
|
12263
11629
|
var filename = parse.filename;
|
|
12264
11630
|
if (!insideTryCatch)
|
|
12265
11631
|
parse.filename = null;
|
|
12266
|
-
return Error("illegal " + (
|
|
11632
|
+
return Error("illegal " + (name3 || "token") + " '" + token2 + "' (" + (filename ? filename + ", " : "") + "line " + tn.line + ")");
|
|
12267
11633
|
}
|
|
12268
11634
|
function readString() {
|
|
12269
11635
|
var values = [], token2;
|
|
@@ -12324,9 +11690,9 @@ var require_parse = __commonJS({
|
|
|
12324
11690
|
}
|
|
12325
11691
|
} while (skip(",", true));
|
|
12326
11692
|
var dummy = { options: void 0 };
|
|
12327
|
-
dummy.setOption = function(
|
|
11693
|
+
dummy.setOption = function(name3, value) {
|
|
12328
11694
|
if (this.options === void 0) this.options = {};
|
|
12329
|
-
this.options[
|
|
11695
|
+
this.options[name3] = value;
|
|
12330
11696
|
};
|
|
12331
11697
|
ifBlock(
|
|
12332
11698
|
dummy,
|
|
@@ -12536,12 +11902,12 @@ var require_parse = __commonJS({
|
|
|
12536
11902
|
}
|
|
12537
11903
|
if (!typeRefRe.test(type))
|
|
12538
11904
|
throw illegal(type, "type");
|
|
12539
|
-
var
|
|
12540
|
-
if (!nameRe.test(
|
|
12541
|
-
throw illegal(
|
|
12542
|
-
|
|
11905
|
+
var name3 = next();
|
|
11906
|
+
if (!nameRe.test(name3))
|
|
11907
|
+
throw illegal(name3, "name");
|
|
11908
|
+
name3 = applyCase(name3);
|
|
12543
11909
|
skip("=");
|
|
12544
|
-
var field = new Field(
|
|
11910
|
+
var field = new Field(name3, parseId(next()), type, rule, extend);
|
|
12545
11911
|
ifBlock(field, function parseField_block(token2) {
|
|
12546
11912
|
if (token2 === "option") {
|
|
12547
11913
|
parseOption(field, token2);
|
|
@@ -12552,7 +11918,7 @@ var require_parse = __commonJS({
|
|
|
12552
11918
|
parseInlineOptions(field);
|
|
12553
11919
|
});
|
|
12554
11920
|
if (rule === "proto3_optional") {
|
|
12555
|
-
var oneof = new OneOf("_" +
|
|
11921
|
+
var oneof = new OneOf("_" + name3);
|
|
12556
11922
|
field.setOption("proto3_optional", true);
|
|
12557
11923
|
oneof.add(field);
|
|
12558
11924
|
parent.add(oneof);
|
|
@@ -12567,17 +11933,17 @@ var require_parse = __commonJS({
|
|
|
12567
11933
|
if (edition >= 2023) {
|
|
12568
11934
|
throw illegal("group");
|
|
12569
11935
|
}
|
|
12570
|
-
var
|
|
12571
|
-
if (!nameRe.test(
|
|
12572
|
-
throw illegal(
|
|
12573
|
-
var fieldName = util.lcFirst(
|
|
12574
|
-
if (
|
|
12575
|
-
|
|
11936
|
+
var name3 = next();
|
|
11937
|
+
if (!nameRe.test(name3))
|
|
11938
|
+
throw illegal(name3, "name");
|
|
11939
|
+
var fieldName = util.lcFirst(name3);
|
|
11940
|
+
if (name3 === fieldName)
|
|
11941
|
+
name3 = util.ucFirst(name3);
|
|
12576
11942
|
skip("=");
|
|
12577
11943
|
var id = parseId(next());
|
|
12578
|
-
var type = new Type(
|
|
11944
|
+
var type = new Type(name3);
|
|
12579
11945
|
type.group = true;
|
|
12580
|
-
var field = new Field(fieldName, id,
|
|
11946
|
+
var field = new Field(fieldName, id, name3, rule);
|
|
12581
11947
|
field.filename = parse.filename;
|
|
12582
11948
|
ifBlock(type, function parseGroup_block(token2) {
|
|
12583
11949
|
switch (token2) {
|
|
@@ -12622,11 +11988,11 @@ var require_parse = __commonJS({
|
|
|
12622
11988
|
if (!typeRefRe.test(valueType))
|
|
12623
11989
|
throw illegal(valueType, "type");
|
|
12624
11990
|
skip(">");
|
|
12625
|
-
var
|
|
12626
|
-
if (!nameRe.test(
|
|
12627
|
-
throw illegal(
|
|
11991
|
+
var name3 = next();
|
|
11992
|
+
if (!nameRe.test(name3))
|
|
11993
|
+
throw illegal(name3, "name");
|
|
12628
11994
|
skip("=");
|
|
12629
|
-
var field = new MapField(applyCase(
|
|
11995
|
+
var field = new MapField(applyCase(name3), parseId(next()), keyType, valueType);
|
|
12630
11996
|
ifBlock(field, function parseMapField_block(token2) {
|
|
12631
11997
|
if (token2 === "option") {
|
|
12632
11998
|
parseOption(field, token2);
|
|
@@ -12683,11 +12049,11 @@ var require_parse = __commonJS({
|
|
|
12683
12049
|
var value = parseId(next(), true), dummy = {
|
|
12684
12050
|
options: void 0
|
|
12685
12051
|
};
|
|
12686
|
-
dummy.getOption = function(
|
|
12687
|
-
return this.options[
|
|
12052
|
+
dummy.getOption = function(name3) {
|
|
12053
|
+
return this.options[name3];
|
|
12688
12054
|
};
|
|
12689
|
-
dummy.setOption = function(
|
|
12690
|
-
ReflectionObject.prototype.setOption.call(dummy,
|
|
12055
|
+
dummy.setOption = function(name3, value2) {
|
|
12056
|
+
ReflectionObject.prototype.setOption.call(dummy, name3, value2);
|
|
12691
12057
|
};
|
|
12692
12058
|
dummy.setParsedOption = function() {
|
|
12693
12059
|
return void 0;
|
|
@@ -12730,13 +12096,13 @@ var require_parse = __commonJS({
|
|
|
12730
12096
|
}
|
|
12731
12097
|
token2 = next();
|
|
12732
12098
|
}
|
|
12733
|
-
var
|
|
12734
|
-
var optionValue = parseOptionValue(parent,
|
|
12099
|
+
var name3 = propName ? option.concat(propName) : option;
|
|
12100
|
+
var optionValue = parseOptionValue(parent, name3);
|
|
12735
12101
|
propName = propName && propName[0] === "." ? propName.slice(1) : propName;
|
|
12736
12102
|
option = option && option[option.length - 1] === "." ? option.slice(0, -1) : option;
|
|
12737
12103
|
setParsedOption(parent, option, optionValue, propName);
|
|
12738
12104
|
}
|
|
12739
|
-
function parseOptionValue(parent,
|
|
12105
|
+
function parseOptionValue(parent, name3) {
|
|
12740
12106
|
if (skip("{", true)) {
|
|
12741
12107
|
var objectResult = {};
|
|
12742
12108
|
while (!skip("}", true)) {
|
|
@@ -12750,7 +12116,7 @@ var require_parse = __commonJS({
|
|
|
12750
12116
|
var propName = token;
|
|
12751
12117
|
skip(":", true);
|
|
12752
12118
|
if (peek() === "{") {
|
|
12753
|
-
value = parseOptionValue(parent,
|
|
12119
|
+
value = parseOptionValue(parent, name3 + "." + token);
|
|
12754
12120
|
} else if (peek() === "[") {
|
|
12755
12121
|
value = [];
|
|
12756
12122
|
var lastValue;
|
|
@@ -12761,12 +12127,12 @@ var require_parse = __commonJS({
|
|
|
12761
12127
|
} while (skip(",", true));
|
|
12762
12128
|
skip("]");
|
|
12763
12129
|
if (typeof lastValue !== "undefined") {
|
|
12764
|
-
setOption(parent,
|
|
12130
|
+
setOption(parent, name3 + "." + token, lastValue);
|
|
12765
12131
|
}
|
|
12766
12132
|
}
|
|
12767
12133
|
} else {
|
|
12768
12134
|
value = readValue(true);
|
|
12769
|
-
setOption(parent,
|
|
12135
|
+
setOption(parent, name3 + "." + token, value);
|
|
12770
12136
|
}
|
|
12771
12137
|
var prevValue = objectResult[propName];
|
|
12772
12138
|
if (prevValue)
|
|
@@ -12778,20 +12144,20 @@ var require_parse = __commonJS({
|
|
|
12778
12144
|
return objectResult;
|
|
12779
12145
|
}
|
|
12780
12146
|
var simpleValue = readValue(true);
|
|
12781
|
-
setOption(parent,
|
|
12147
|
+
setOption(parent, name3, simpleValue);
|
|
12782
12148
|
return simpleValue;
|
|
12783
12149
|
}
|
|
12784
|
-
function setOption(parent,
|
|
12785
|
-
if (ptr === parent && /^features\./.test(
|
|
12786
|
-
topLevelOptions[
|
|
12150
|
+
function setOption(parent, name3, value) {
|
|
12151
|
+
if (ptr === parent && /^features\./.test(name3)) {
|
|
12152
|
+
topLevelOptions[name3] = value;
|
|
12787
12153
|
return;
|
|
12788
12154
|
}
|
|
12789
12155
|
if (parent.setOption)
|
|
12790
|
-
parent.setOption(
|
|
12156
|
+
parent.setOption(name3, value);
|
|
12791
12157
|
}
|
|
12792
|
-
function setParsedOption(parent,
|
|
12158
|
+
function setParsedOption(parent, name3, value, propName) {
|
|
12793
12159
|
if (parent.setParsedOption)
|
|
12794
|
-
parent.setParsedOption(
|
|
12160
|
+
parent.setParsedOption(name3, value, propName);
|
|
12795
12161
|
}
|
|
12796
12162
|
function parseInlineOptions(parent) {
|
|
12797
12163
|
if (skip("[", true)) {
|
|
@@ -12825,7 +12191,7 @@ var require_parse = __commonJS({
|
|
|
12825
12191
|
var type = token2;
|
|
12826
12192
|
if (!nameRe.test(token2 = next()))
|
|
12827
12193
|
throw illegal(token2, "name");
|
|
12828
|
-
var
|
|
12194
|
+
var name3 = token2, requestType, requestStream, responseType, responseStream;
|
|
12829
12195
|
skip("(");
|
|
12830
12196
|
if (skip("stream", true))
|
|
12831
12197
|
requestStream = true;
|
|
@@ -12841,7 +12207,7 @@ var require_parse = __commonJS({
|
|
|
12841
12207
|
throw illegal(token2);
|
|
12842
12208
|
responseType = token2;
|
|
12843
12209
|
skip(")");
|
|
12844
|
-
var method = new Method(
|
|
12210
|
+
var method = new Method(name3, type, requestType, responseType, requestStream, responseStream);
|
|
12845
12211
|
method.comment = commentText;
|
|
12846
12212
|
ifBlock(method, function parseMethod_block(token3) {
|
|
12847
12213
|
if (token3 === "option") {
|
|
@@ -12931,12 +12297,12 @@ var require_common = __commonJS({
|
|
|
12931
12297
|
"use strict";
|
|
12932
12298
|
module2.exports = common;
|
|
12933
12299
|
var commonRe = /\/|\./;
|
|
12934
|
-
function common(
|
|
12935
|
-
if (!commonRe.test(
|
|
12936
|
-
|
|
12300
|
+
function common(name3, json) {
|
|
12301
|
+
if (!commonRe.test(name3)) {
|
|
12302
|
+
name3 = "google/protobuf/" + name3 + ".proto";
|
|
12937
12303
|
json = { nested: { google: { nested: { protobuf: { nested: json } } } } };
|
|
12938
12304
|
}
|
|
12939
|
-
common[
|
|
12305
|
+
common[name3] = json;
|
|
12940
12306
|
}
|
|
12941
12307
|
common("any", {
|
|
12942
12308
|
/**
|
|
@@ -14949,8 +14315,8 @@ var require_descriptor2 = __commonJS({
|
|
|
14949
14315
|
var values = {};
|
|
14950
14316
|
if (descriptor.value)
|
|
14951
14317
|
for (var i = 0; i < descriptor.value.length; ++i) {
|
|
14952
|
-
var
|
|
14953
|
-
values[
|
|
14318
|
+
var name3 = descriptor.value[i].name, value = descriptor.value[i].number || 0;
|
|
14319
|
+
values[name3 && name3.length ? name3 : "NAME" + value] = value;
|
|
14954
14320
|
}
|
|
14955
14321
|
var enm = new Enum(
|
|
14956
14322
|
descriptor.name && descriptor.name.length ? descriptor.name : "Enum" + unnamedEnumIndex++,
|
|
@@ -16675,11 +16041,11 @@ var require_src2 = __commonJS({
|
|
|
16675
16041
|
oneofs: true,
|
|
16676
16042
|
json: true
|
|
16677
16043
|
};
|
|
16678
|
-
function joinName(baseName,
|
|
16044
|
+
function joinName(baseName, name3) {
|
|
16679
16045
|
if (baseName === "") {
|
|
16680
|
-
return
|
|
16046
|
+
return name3;
|
|
16681
16047
|
} else {
|
|
16682
|
-
return baseName + "." +
|
|
16048
|
+
return baseName + "." + name3;
|
|
16683
16049
|
}
|
|
16684
16050
|
}
|
|
16685
16051
|
function isHandledReflectionObject(obj) {
|
|
@@ -16694,8 +16060,8 @@ var require_src2 = __commonJS({
|
|
|
16694
16060
|
return [[objName, obj]];
|
|
16695
16061
|
} else {
|
|
16696
16062
|
if (isNamespaceBase(obj) && typeof obj.nested !== "undefined") {
|
|
16697
|
-
return Object.keys(obj.nested).map((
|
|
16698
|
-
return getAllHandledReflectionObjects(obj.nested[
|
|
16063
|
+
return Object.keys(obj.nested).map((name3) => {
|
|
16064
|
+
return getAllHandledReflectionObjects(obj.nested[name3], objName);
|
|
16699
16065
|
}).reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
|
|
16700
16066
|
}
|
|
16701
16067
|
}
|
|
@@ -16751,10 +16117,10 @@ var require_src2 = __commonJS({
|
|
|
16751
16117
|
options: mapMethodOptions(method.parsedOptions)
|
|
16752
16118
|
};
|
|
16753
16119
|
}
|
|
16754
|
-
function createServiceDefinition(service,
|
|
16120
|
+
function createServiceDefinition(service, name3, options, fileDescriptors) {
|
|
16755
16121
|
const def = {};
|
|
16756
16122
|
for (const method of service.methodsArray) {
|
|
16757
|
-
def[method.name] = createMethodDefinition(method,
|
|
16123
|
+
def[method.name] = createMethodDefinition(method, name3, options, fileDescriptors);
|
|
16758
16124
|
}
|
|
16759
16125
|
return def;
|
|
16760
16126
|
}
|
|
@@ -16774,9 +16140,9 @@ var require_src2 = __commonJS({
|
|
|
16774
16140
|
fileDescriptorProtos: fileDescriptors
|
|
16775
16141
|
};
|
|
16776
16142
|
}
|
|
16777
|
-
function createDefinition(obj,
|
|
16143
|
+
function createDefinition(obj, name3, options, fileDescriptors) {
|
|
16778
16144
|
if (obj instanceof Protobuf.Service) {
|
|
16779
|
-
return createServiceDefinition(obj,
|
|
16145
|
+
return createServiceDefinition(obj, name3, options, fileDescriptors);
|
|
16780
16146
|
} else if (obj instanceof Protobuf.Type) {
|
|
16781
16147
|
return createMessageDefinition(obj, fileDescriptors);
|
|
16782
16148
|
} else if (obj instanceof Protobuf.Enum) {
|
|
@@ -16790,8 +16156,8 @@ var require_src2 = __commonJS({
|
|
|
16790
16156
|
root.resolveAll();
|
|
16791
16157
|
const descriptorList = root.toDescriptor("proto3").file;
|
|
16792
16158
|
const bufferList = descriptorList.map((value) => Buffer.from(descriptor.FileDescriptorProto.encode(value).finish()));
|
|
16793
|
-
for (const [
|
|
16794
|
-
def[
|
|
16159
|
+
for (const [name3, obj] of getAllHandledReflectionObjects(root, "")) {
|
|
16160
|
+
def[name3] = createDefinition(obj, name3, options, bufferList);
|
|
16795
16161
|
}
|
|
16796
16162
|
return def;
|
|
16797
16163
|
}
|
|
@@ -17028,18 +16394,18 @@ var require_channelz = __commonJS({
|
|
|
17028
16394
|
var subchannels = [];
|
|
17029
16395
|
var servers = [];
|
|
17030
16396
|
var sockets = [];
|
|
17031
|
-
function registerChannelzChannel(
|
|
16397
|
+
function registerChannelzChannel(name3, getInfo, channelzEnabled) {
|
|
17032
16398
|
const id = getNextId();
|
|
17033
|
-
const ref = { id, name:
|
|
16399
|
+
const ref = { id, name: name3, kind: "channel" };
|
|
17034
16400
|
if (channelzEnabled) {
|
|
17035
16401
|
channels[id] = { ref, getInfo };
|
|
17036
16402
|
}
|
|
17037
16403
|
return ref;
|
|
17038
16404
|
}
|
|
17039
16405
|
exports2.registerChannelzChannel = registerChannelzChannel;
|
|
17040
|
-
function registerChannelzSubchannel(
|
|
16406
|
+
function registerChannelzSubchannel(name3, getInfo, channelzEnabled) {
|
|
17041
16407
|
const id = getNextId();
|
|
17042
|
-
const ref = { id, name:
|
|
16408
|
+
const ref = { id, name: name3, kind: "subchannel" };
|
|
17043
16409
|
if (channelzEnabled) {
|
|
17044
16410
|
subchannels[id] = { ref, getInfo };
|
|
17045
16411
|
}
|
|
@@ -17055,9 +16421,9 @@ var require_channelz = __commonJS({
|
|
|
17055
16421
|
return ref;
|
|
17056
16422
|
}
|
|
17057
16423
|
exports2.registerChannelzServer = registerChannelzServer;
|
|
17058
|
-
function registerChannelzSocket(
|
|
16424
|
+
function registerChannelzSocket(name3, getInfo, channelzEnabled) {
|
|
17059
16425
|
const id = getNextId();
|
|
17060
|
-
const ref = { id, name:
|
|
16426
|
+
const ref = { id, name: name3, kind: "socket" };
|
|
17061
16427
|
if (channelzEnabled) {
|
|
17062
16428
|
sockets[id] = { ref, getInfo };
|
|
17063
16429
|
}
|
|
@@ -18249,9 +17615,9 @@ var require_subchannel_call = __commonJS({
|
|
|
18249
17615
|
var constants_2 = require_constants();
|
|
18250
17616
|
var TRACER_NAME = "subchannel_call";
|
|
18251
17617
|
function getSystemErrorName(errno) {
|
|
18252
|
-
for (const [
|
|
17618
|
+
for (const [name3, num] of Object.entries(os.constants.errno)) {
|
|
18253
17619
|
if (num === errno) {
|
|
18254
|
-
return
|
|
17620
|
+
return name3;
|
|
18255
17621
|
}
|
|
18256
17622
|
}
|
|
18257
17623
|
return "Unknown system error " + errno;
|
|
@@ -22062,8 +21428,8 @@ var require_server = __commonJS({
|
|
|
22062
21428
|
if (serviceKeys.length === 0) {
|
|
22063
21429
|
throw new Error("Cannot add an empty service to a server");
|
|
22064
21430
|
}
|
|
22065
|
-
serviceKeys.forEach((
|
|
22066
|
-
const attrs = service[
|
|
21431
|
+
serviceKeys.forEach((name3) => {
|
|
21432
|
+
const attrs = service[name3];
|
|
22067
21433
|
let methodType;
|
|
22068
21434
|
if (attrs.requestStream) {
|
|
22069
21435
|
if (attrs.responseStream) {
|
|
@@ -22078,7 +21444,7 @@ var require_server = __commonJS({
|
|
|
22078
21444
|
methodType = "unary";
|
|
22079
21445
|
}
|
|
22080
21446
|
}
|
|
22081
|
-
let implFn = implementation[
|
|
21447
|
+
let implFn = implementation[name3];
|
|
22082
21448
|
let impl;
|
|
22083
21449
|
if (implFn === void 0 && typeof attrs.originalName === "string") {
|
|
22084
21450
|
implFn = implementation[attrs.originalName];
|
|
@@ -22086,7 +21452,7 @@ var require_server = __commonJS({
|
|
|
22086
21452
|
if (implFn !== void 0) {
|
|
22087
21453
|
impl = implFn.bind(implementation);
|
|
22088
21454
|
} else {
|
|
22089
|
-
impl = getDefaultHandler(methodType,
|
|
21455
|
+
impl = getDefaultHandler(methodType, name3);
|
|
22090
21456
|
}
|
|
22091
21457
|
const success = this.register(attrs.path, impl, attrs.responseSerialize, attrs.requestDeserialize, methodType);
|
|
22092
21458
|
if (success === false) {
|
|
@@ -22099,8 +21465,8 @@ var require_server = __commonJS({
|
|
|
22099
21465
|
throw new Error("removeService() requires object as argument");
|
|
22100
21466
|
}
|
|
22101
21467
|
const serviceKeys = Object.keys(service);
|
|
22102
|
-
serviceKeys.forEach((
|
|
22103
|
-
const attrs = service[
|
|
21468
|
+
serviceKeys.forEach((name3) => {
|
|
21469
|
+
const attrs = service[name3];
|
|
22104
21470
|
this.unregister(attrs.path);
|
|
22105
21471
|
});
|
|
22106
21472
|
}
|
|
@@ -22375,21 +21741,21 @@ var require_server = __commonJS({
|
|
|
22375
21741
|
(0, channelz_1.unregisterChannelzRef)(this.channelzRef);
|
|
22376
21742
|
}
|
|
22377
21743
|
}
|
|
22378
|
-
register(
|
|
22379
|
-
if (this.handlers.has(
|
|
21744
|
+
register(name3, handler, serialize, deserialize, type) {
|
|
21745
|
+
if (this.handlers.has(name3)) {
|
|
22380
21746
|
return false;
|
|
22381
21747
|
}
|
|
22382
|
-
this.handlers.set(
|
|
21748
|
+
this.handlers.set(name3, {
|
|
22383
21749
|
func: handler,
|
|
22384
21750
|
serialize,
|
|
22385
21751
|
deserialize,
|
|
22386
21752
|
type,
|
|
22387
|
-
path:
|
|
21753
|
+
path: name3
|
|
22388
21754
|
});
|
|
22389
21755
|
return true;
|
|
22390
21756
|
}
|
|
22391
|
-
unregister(
|
|
22392
|
-
return this.handlers.delete(
|
|
21757
|
+
unregister(name3) {
|
|
21758
|
+
return this.handlers.delete(name3);
|
|
22393
21759
|
}
|
|
22394
21760
|
start() {
|
|
22395
21761
|
if (this.http2ServerList.length === 0 || this.http2ServerList.every(({ server: http2Server }) => http2Server.listening !== true)) {
|
|
@@ -24171,8 +23537,8 @@ var require_src3 = __commonJS({
|
|
|
24171
23537
|
});
|
|
24172
23538
|
|
|
24173
23539
|
// ../node_modules/@firebase/firestore/dist/index.node.mjs
|
|
24174
|
-
function setSDKVersion(
|
|
24175
|
-
SDK_VERSION2 =
|
|
23540
|
+
function setSDKVersion(version3) {
|
|
23541
|
+
SDK_VERSION2 = version3;
|
|
24176
23542
|
}
|
|
24177
23543
|
function formatJSON(value) {
|
|
24178
23544
|
return (0, import_util4.inspect)(value, { depth: 100 });
|
|
@@ -24424,8 +23790,8 @@ async function ignoreIfPrimaryLeaseLoss(err) {
|
|
|
24424
23790
|
}
|
|
24425
23791
|
function getAndroidVersion(ua) {
|
|
24426
23792
|
const androidVersionRegex = ua.match(/Android ([\d.]+)/i);
|
|
24427
|
-
const
|
|
24428
|
-
return Number(
|
|
23793
|
+
const version3 = androidVersionRegex ? androidVersionRegex[1].split(".").slice(0, 2).join(".") : "-1";
|
|
23794
|
+
return Number(version3);
|
|
24429
23795
|
}
|
|
24430
23796
|
function isIndexedDbTransactionError(e) {
|
|
24431
23797
|
return e.name === "IndexedDbTransactionError";
|
|
@@ -24581,11 +23947,11 @@ function getLocalWriteTime(value) {
|
|
|
24581
23947
|
const localWriteTime = normalizeTimestamp(value.mapValue.fields[LOCAL_WRITE_TIME_KEY].timestampValue);
|
|
24582
23948
|
return new Timestamp(localWriteTime.seconds, localWriteTime.nanos);
|
|
24583
23949
|
}
|
|
24584
|
-
function databaseIdFromApp(
|
|
24585
|
-
if (!Object.prototype.hasOwnProperty.apply(
|
|
23950
|
+
function databaseIdFromApp(app, database) {
|
|
23951
|
+
if (!Object.prototype.hasOwnProperty.apply(app.options, ["projectId"])) {
|
|
24586
23952
|
throw new FirestoreError(Code.INVALID_ARGUMENT, '"projectId" not provided in firebase.initializeApp.');
|
|
24587
23953
|
}
|
|
24588
|
-
return new DatabaseId(
|
|
23954
|
+
return new DatabaseId(app.options.projectId, database);
|
|
24589
23955
|
}
|
|
24590
23956
|
function isNullOrUndefined(value) {
|
|
24591
23957
|
return value === null || value === void 0;
|
|
@@ -25855,9 +25221,9 @@ function fromBytes(serializer, value) {
|
|
|
25855
25221
|
return ByteString.fromUint8Array(value ? value : new Uint8Array());
|
|
25856
25222
|
}
|
|
25857
25223
|
}
|
|
25858
|
-
function fromVersion(
|
|
25859
|
-
hardAssert(!!
|
|
25860
|
-
return SnapshotVersion.fromTimestamp(fromTimestamp(
|
|
25224
|
+
function fromVersion(version3) {
|
|
25225
|
+
hardAssert(!!version3, 49232);
|
|
25226
|
+
return SnapshotVersion.fromTimestamp(fromTimestamp(version3));
|
|
25861
25227
|
}
|
|
25862
25228
|
function toResourceName(databaseId, path) {
|
|
25863
25229
|
return toResourcePath(databaseId, path).canonicalString();
|
|
@@ -25866,16 +25232,16 @@ function toResourcePath(databaseId, path) {
|
|
|
25866
25232
|
const resourcePath = fullyQualifiedPrefixPath(databaseId).child("documents");
|
|
25867
25233
|
return path === void 0 ? resourcePath : resourcePath.child(path);
|
|
25868
25234
|
}
|
|
25869
|
-
function fromResourceName(
|
|
25870
|
-
const resource = ResourcePath.fromString(
|
|
25235
|
+
function fromResourceName(name3) {
|
|
25236
|
+
const resource = ResourcePath.fromString(name3);
|
|
25871
25237
|
hardAssert(isValidResourceName(resource), 10190, { key: resource.toString() });
|
|
25872
25238
|
return resource;
|
|
25873
25239
|
}
|
|
25874
25240
|
function toName(serializer, key) {
|
|
25875
25241
|
return toResourceName(serializer.databaseId, key.path);
|
|
25876
25242
|
}
|
|
25877
|
-
function fromName(serializer,
|
|
25878
|
-
const resource = fromResourceName(
|
|
25243
|
+
function fromName(serializer, name3) {
|
|
25244
|
+
const resource = fromResourceName(name3);
|
|
25879
25245
|
if (resource.get(1) !== serializer.databaseId.projectId) {
|
|
25880
25246
|
throw new FirestoreError(Code.INVALID_ARGUMENT, "Tried to deserialize key from different project: " + resource.get(1) + " vs " + serializer.databaseId.projectId);
|
|
25881
25247
|
}
|
|
@@ -25887,8 +25253,8 @@ function fromName(serializer, name4) {
|
|
|
25887
25253
|
function toQueryPath(serializer, path) {
|
|
25888
25254
|
return toResourceName(serializer.databaseId, path);
|
|
25889
25255
|
}
|
|
25890
|
-
function fromQueryPath(
|
|
25891
|
-
const resourceName = fromResourceName(
|
|
25256
|
+
function fromQueryPath(name3) {
|
|
25257
|
+
const resourceName = fromResourceName(name3);
|
|
25892
25258
|
if (resourceName.length === 4) {
|
|
25893
25259
|
return ResourcePath.emptyPath();
|
|
25894
25260
|
}
|
|
@@ -25932,12 +25298,12 @@ function fromWatchChange(serializer, change) {
|
|
|
25932
25298
|
assertPresent(entityChange.document.name);
|
|
25933
25299
|
assertPresent(entityChange.document.updateTime);
|
|
25934
25300
|
const key = fromName(serializer, entityChange.document.name);
|
|
25935
|
-
const
|
|
25301
|
+
const version3 = fromVersion(entityChange.document.updateTime);
|
|
25936
25302
|
const createTime = entityChange.document.createTime ? fromVersion(entityChange.document.createTime) : SnapshotVersion.min();
|
|
25937
25303
|
const data = new ObjectValue({
|
|
25938
25304
|
mapValue: { fields: entityChange.document.fields }
|
|
25939
25305
|
});
|
|
25940
|
-
const doc3 = MutableDocument.newFoundDocument(key,
|
|
25306
|
+
const doc3 = MutableDocument.newFoundDocument(key, version3, createTime, data);
|
|
25941
25307
|
const updatedTargetIds = entityChange.targetIds || [];
|
|
25942
25308
|
const removedTargetIds = entityChange.removedTargetIds || [];
|
|
25943
25309
|
watchChange = new DocumentWatchChange(updatedTargetIds, removedTargetIds, doc3.key, doc3);
|
|
@@ -25946,8 +25312,8 @@ function fromWatchChange(serializer, change) {
|
|
|
25946
25312
|
const docDelete = change.documentDelete;
|
|
25947
25313
|
assertPresent(docDelete.document);
|
|
25948
25314
|
const key = fromName(serializer, docDelete.document);
|
|
25949
|
-
const
|
|
25950
|
-
const doc3 = MutableDocument.newNoDocument(key,
|
|
25315
|
+
const version3 = docDelete.readTime ? fromVersion(docDelete.readTime) : SnapshotVersion.min();
|
|
25316
|
+
const doc3 = MutableDocument.newNoDocument(key, version3);
|
|
25951
25317
|
const removedTargetIds = docDelete.removedTargetIds || [];
|
|
25952
25318
|
watchChange = new DocumentWatchChange([], removedTargetIds, doc3.key, doc3);
|
|
25953
25319
|
} else if ("documentRemove" in change) {
|
|
@@ -27698,50 +27064,6 @@ function validateLongPollingOptions(options) {
|
|
|
27698
27064
|
}
|
|
27699
27065
|
}
|
|
27700
27066
|
}
|
|
27701
|
-
function connectFirestoreEmulator(firestore, host, port, options = {}) {
|
|
27702
|
-
var _a;
|
|
27703
|
-
firestore = cast(firestore, Firestore$1);
|
|
27704
|
-
const useSsl = isCloudWorkstation(host);
|
|
27705
|
-
const settings = firestore._getSettings();
|
|
27706
|
-
const existingConfig = {
|
|
27707
|
-
...settings,
|
|
27708
|
-
emulatorOptions: firestore._getEmulatorOptions()
|
|
27709
|
-
};
|
|
27710
|
-
const newHostSetting = `${host}:${port}`;
|
|
27711
|
-
if (useSsl) {
|
|
27712
|
-
void pingServer(`https://${newHostSetting}`);
|
|
27713
|
-
updateEmulatorBanner("Firestore", true);
|
|
27714
|
-
}
|
|
27715
|
-
if (settings.host !== DEFAULT_HOST && settings.host !== newHostSetting) {
|
|
27716
|
-
logWarn("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");
|
|
27717
|
-
}
|
|
27718
|
-
const newConfig = {
|
|
27719
|
-
...settings,
|
|
27720
|
-
host: newHostSetting,
|
|
27721
|
-
ssl: useSsl,
|
|
27722
|
-
emulatorOptions: options
|
|
27723
|
-
};
|
|
27724
|
-
if (deepEqual(newConfig, existingConfig)) {
|
|
27725
|
-
return;
|
|
27726
|
-
}
|
|
27727
|
-
firestore._setSettings(newConfig);
|
|
27728
|
-
if (options.mockUserToken) {
|
|
27729
|
-
let token;
|
|
27730
|
-
let user;
|
|
27731
|
-
if (typeof options.mockUserToken === "string") {
|
|
27732
|
-
token = options.mockUserToken;
|
|
27733
|
-
user = User.MOCK_USER;
|
|
27734
|
-
} else {
|
|
27735
|
-
token = createMockUserToken(options.mockUserToken, (_a = firestore._app) == null ? void 0 : _a.options.projectId);
|
|
27736
|
-
const uid = options.mockUserToken.sub || options.mockUserToken.user_id;
|
|
27737
|
-
if (!uid) {
|
|
27738
|
-
throw new FirestoreError(Code.INVALID_ARGUMENT, "mockUserToken must contain 'sub' or 'user_id' field!");
|
|
27739
|
-
}
|
|
27740
|
-
user = new User(uid);
|
|
27741
|
-
}
|
|
27742
|
-
firestore._authCredentials = new EmulatorAuthCredentialsProvider(new OAuthToken(token, user));
|
|
27743
|
-
}
|
|
27744
|
-
}
|
|
27745
27067
|
function doc(parent, path, ...pathSegments) {
|
|
27746
27068
|
parent = getModularInstance(parent);
|
|
27747
27069
|
if (arguments.length === 1) {
|
|
@@ -27777,20 +27099,6 @@ function getMessageOrStack(error) {
|
|
|
27777
27099
|
}
|
|
27778
27100
|
return message;
|
|
27779
27101
|
}
|
|
27780
|
-
function getFirestore(appOrDatabaseId, optionalDatabaseId) {
|
|
27781
|
-
const app2 = typeof appOrDatabaseId === "object" ? appOrDatabaseId : getApp();
|
|
27782
|
-
const databaseId = typeof appOrDatabaseId === "string" ? appOrDatabaseId : optionalDatabaseId || DEFAULT_DATABASE_NAME;
|
|
27783
|
-
const db2 = _getProvider(app2, "firestore").getImmediate({
|
|
27784
|
-
identifier: databaseId
|
|
27785
|
-
});
|
|
27786
|
-
if (!db2._initialized) {
|
|
27787
|
-
const emulator = getDefaultEmulatorHostnameAndPort("firestore");
|
|
27788
|
-
if (emulator) {
|
|
27789
|
-
connectFirestoreEmulator(db2, ...emulator);
|
|
27790
|
-
}
|
|
27791
|
-
}
|
|
27792
|
-
return db2;
|
|
27793
|
-
}
|
|
27794
27102
|
function ensureFirestoreConfigured(firestore) {
|
|
27795
27103
|
if (firestore._terminated) {
|
|
27796
27104
|
throw new FirestoreError(Code.FAILED_PRECONDITION, "The client has already been terminated.");
|
|
@@ -27824,8 +27132,8 @@ function buildComponentProvider(componentsProvider) {
|
|
|
27824
27132
|
function registerFirestore(variant, useFetchStreams = true) {
|
|
27825
27133
|
setSDKVersion(SDK_VERSION);
|
|
27826
27134
|
_registerComponent(new Component("firestore", (container, { instanceIdentifier: databaseId, options: settings }) => {
|
|
27827
|
-
const
|
|
27828
|
-
const firestoreInstance = new Firestore(new FirebaseAuthCredentialsProvider(container.getProvider("auth-internal")), new FirebaseAppCheckTokenProvider(
|
|
27135
|
+
const app = container.getProvider("app").getImmediate();
|
|
27136
|
+
const firestoreInstance = new Firestore(new FirebaseAuthCredentialsProvider(container.getProvider("auth-internal")), new FirebaseAppCheckTokenProvider(app, container.getProvider("app-check-internal")), databaseIdFromApp(app, databaseId), app);
|
|
27829
27137
|
settings = { useFetchStreams, ...settings };
|
|
27830
27138
|
firestoreInstance._setSettings(settings);
|
|
27831
27139
|
return firestoreInstance;
|
|
@@ -28074,12 +27382,12 @@ function lengthPrefixedString(o) {
|
|
|
28074
27382
|
const l = encoder.encode(str).byteLength;
|
|
28075
27383
|
return `${l}${str}`;
|
|
28076
27384
|
}
|
|
28077
|
-
function buildDocumentSnapshotJsonBundle(
|
|
28078
|
-
const builder = new BundleBuilder(
|
|
27385
|
+
function buildDocumentSnapshotJsonBundle(db, document2, docData, path) {
|
|
27386
|
+
const builder = new BundleBuilder(db, AutoId.newId());
|
|
28079
27387
|
builder.addBundleDocument(documentToDocumentSnapshotBundleData(path, docData, document2));
|
|
28080
27388
|
return builder.build();
|
|
28081
27389
|
}
|
|
28082
|
-
function buildQuerySnapshotJsonBundle(
|
|
27390
|
+
function buildQuerySnapshotJsonBundle(db, query, bundleName, parent, paths, docs, documentData) {
|
|
28083
27391
|
const docBundleDataArray = [];
|
|
28084
27392
|
for (let i = 0; i < docs.length; i++) {
|
|
28085
27393
|
docBundleDataArray.push(documentToDocumentSnapshotBundleData(paths[i], documentData[i], docs[i]));
|
|
@@ -28090,7 +27398,7 @@ function buildQuerySnapshotJsonBundle(db2, query, bundleName, parent, paths, doc
|
|
|
28090
27398
|
parent,
|
|
28091
27399
|
docBundleDataArray
|
|
28092
27400
|
};
|
|
28093
|
-
const builder = new BundleBuilder(
|
|
27401
|
+
const builder = new BundleBuilder(db, bundleName);
|
|
28094
27402
|
builder.addBundleQuery(bundleData);
|
|
28095
27403
|
return builder.build();
|
|
28096
27404
|
}
|
|
@@ -28217,7 +27525,7 @@ function convertToDocSnapshot(firestore, ref, snapshot) {
|
|
|
28217
27525
|
const userDataWriter = new ExpUserDataWriter(firestore);
|
|
28218
27526
|
return new DocumentSnapshot(firestore, userDataWriter, ref._key, doc3, new SnapshotMetadata(snapshot.hasPendingWrites, snapshot.fromCache), ref.converter);
|
|
28219
27527
|
}
|
|
28220
|
-
var import_util4, import_crypto, grpc, protoLoader, name$12, version$12, User, version2, SDK_VERSION2, logClient, Code, FirestoreError, Deferred2, OAuthToken, EmptyAuthCredentialsProvider,
|
|
27528
|
+
var import_util4, import_crypto, grpc, protoLoader, name$12, version$12, User, version2, SDK_VERSION2, logClient, Code, FirestoreError, Deferred2, OAuthToken, EmptyAuthCredentialsProvider, FirebaseAuthCredentialsProvider, FirstPartyToken, FirstPartyAuthCredentialsProvider, AppCheckToken, FirebaseAppCheckTokenProvider, AutoId, MIN_SURROGATE$1, MAX_SURROGATE$1, DOCUMENT_KEY_NAME, BasePath, ResourcePath, identifierRegExp, FieldPath$1, DocumentKey, MIN_SECONDS, MS_TO_NANOS, Timestamp, SnapshotVersion, INITIAL_LARGEST_BATCH_ID, FieldIndex, IndexOffset, PRIMARY_LEASE_LOST_ERROR_MSG, PersistenceTransaction, PersistencePromise, INITIAL_BACKFILL_DELAY_MS, REGULAR_BACKFILL_DELAY_MS, ListenSequence, escapeChar, encodedSeparatorChar, encodedNul, encodedEscape, DbRemoteDocumentStore$1, DbPrimaryClientStore, DbMutationQueueStore, DbMutationBatchStore, DbDocumentMutationStore, DbRemoteDocumentStore, DbRemoteDocumentGlobalStore, DbTargetStore, DbTargetDocumentStore, DbTargetGlobalStore, DbCollectionParentStore, DbClientMetadataStore, DbBundleStore, DbNamedQueryStore, DbIndexConfigurationStore, DbIndexStateStore, DbIndexEntryStore, DbDocumentOverlayStore, DbGlobalsStore, V1_STORES, V3_STORES, V4_STORES, V6_STORES, V8_STORES, V11_STORES, V12_STORES, V13_STORES, V14_STORES, V15_STORES, V17_STORES, SortedMap, SortedMapIterator, LLRBNode, LLRBEmptyNode, SortedSet, SortedSetIterator, FieldMask, ByteString, ISO_TIMESTAMP_REG_EXP, SERVER_TIMESTAMP_SENTINEL, TYPE_KEY$1, PREVIOUS_VALUE_KEY, LOCAL_WRITE_TIME_KEY, DatabaseInfo, DEFAULT_DATABASE_NAME, DatabaseId, BATCHID_UNKNOWN, TYPE_KEY, MAX_VALUE_TYPE, MAX_VALUE, VECTOR_VALUE_SENTINEL, VECTOR_MAP_VECTORS_KEY, MIN_VECTOR_VALUE, ObjectValue, MutableDocument, Bound, OrderBy, Filter, FieldFilter, CompositeFilter, KeyFieldFilter, KeyFieldInFilter, KeyFieldNotInFilter, ArrayContainsFilter, InFilter, NotInFilter, ArrayContainsAnyFilter, TargetImpl, QueryImpl, ObjectMap, EMPTY_MUTABLE_DOCUMENT_MAP, EMPTY_DOCUMENT_MAP, EMPTY_DOCUMENT_VERSION_MAP, EMPTY_DOCUMENT_KEY_SET, EMPTY_TARGET_ID_SET, TransformOperation, ServerTimestampTransform, ArrayUnionTransformOperation, ArrayRemoveTransformOperation, NumericIncrementTransformOperation, Precondition, Mutation, SetMutation, PatchMutation, DeleteMutation, MutationBatch, Overlay, ExistenceFilter, RpcCode, Base64DecodeError, testingHooksSpi, MAX_64_BIT_UNSIGNED_INTEGER, BloomFilter, BloomFilterError, RemoteEvent, TargetChange, DocumentWatchChange, ExistenceFilterChange, WatchTargetChange, TargetState, LOG_TAG$g, WatchChangeAggregator, DIRECTIONS, OPERATORS, COMPOSITE_OPERATORS, JsonProtoSerializer, TargetData, LocalSerializer, INDEX_TYPE_NULL, INDEX_TYPE_BOOLEAN, INDEX_TYPE_NAN, INDEX_TYPE_NUMBER, INDEX_TYPE_TIMESTAMP, INDEX_TYPE_STRING, INDEX_TYPE_BLOB, INDEX_TYPE_REFERENCE, INDEX_TYPE_GEOPOINT, INDEX_TYPE_ARRAY, INDEX_TYPE_VECTOR, INDEX_TYPE_MAP, INDEX_TYPE_REFERENCE_SEGMENT, NOT_TRUNCATED, FirestoreIndexValueWriter, MemoryIndexManager, MemoryCollectionParentIndex, EMPTY_VALUE, OFFSET, TargetIdGenerator, GC_DID_NOT_RUN, LRU_COLLECTION_DISABLED, LRU_DEFAULT_CACHE_SIZE_BYTES, LruParams, LOG_TAG$e, LRU_MINIMUM_CACHE_SIZE_BYTES, INITIAL_GC_DELAY_MS, REGULAR_GC_DELAY_MS, RollingSequenceNumberBuffer, LruScheduler, LruGarbageCollectorImpl, RemoteDocumentChangeBuffer, OverlayedDocument, LocalDocumentsView, MemoryBundleCache, MemoryDocumentOverlayCache, MemoryGlobalsCache, ReferenceSet, DocReference, MemoryMutationQueue, MIN_LONG_VALUE, MemoryRemoteDocumentCacheImpl, MemoryRemoteDocumentChangeBuffer, MemoryTargetCache, LOG_TAG$d, MemoryPersistence, MemoryTransaction, MemoryEagerDelegate, MemoryLruDelegate, MAX_CLIENT_AGE_MS, LOG_TAG$b, RESUME_TOKEN_MAX_AGE_MICROS, LocalStoreImpl, QueryContext, DEFAULT_INDEX_AUTO_CREATION_MIN_COLLECTION_SIZE, QueryEngine, LocalClientState, MemorySharedClientState, NoopConnectivityMonitor, StreamBridge, lastUniqueDebugId, grpcVersion, LOG_TAG$9, X_GOOG_API_CLIENT_VALUE, GrpcConnection, nested, protos, protos$1, protoLoaderOptions, LOG_TAG$8, DEFAULT_BACKOFF_INITIAL_DELAY_MS, DEFAULT_BACKOFF_FACTOR, DEFAULT_BACKOFF_MAX_DELAY_MS, ExponentialBackoff, LOG_TAG$7, IDLE_TIMEOUT_MS, HEALTHY_TIMEOUT_MS, PersistentStream, PersistentListenStream, Datastore, DatastoreImpl, LOG_TAG$6, MAX_WATCH_STREAM_FAILURES, ONLINE_STATE_TIMEOUT_MS, OnlineStateTracker, LOG_TAG$5, RemoteStoreImpl, LOG_TAG$4, DelayedOperation, DocumentSet, DocumentChangeSet, ViewSnapshot, QueryListenersInfo, EventManagerImpl, ListenerDataSource, QueryListener, LocalViewChanges, AddedLimboDocument, RemovedLimboDocument, View, LOG_TAG$3, QueryView, LimboResolution, SyncEngineImpl, MemoryOfflineComponentProvider, LruGcMemoryOfflineComponentProvider, OnlineComponentProvider, AsyncObserver, LOG_TAG$2, MAX_CONCURRENT_LIMBO_RESOLUTIONS, DOM_EXCEPTION_INVALID_STATE, DOM_EXCEPTION_ABORTED, DOM_EXCEPTION_QUOTA_EXCEEDED, FirestoreClient, LOG_TAG$1, datastoreInstances, DEFAULT_HOST, DEFAULT_SSL, MIN_LONG_POLLING_TIMEOUT_SECONDS, MAX_LONG_POLLING_TIMEOUT_SECONDS, DEFAULT_AUTO_DETECT_LONG_POLLING, FirestoreSettingsImpl, Firestore$1, Query, DocumentReference, CollectionReference, LOG_TAG, AsyncQueueImpl, Firestore, Bytes, FieldPath, FieldValue, GeoPoint, VectorValue, RESERVED_FIELD_REGEX, ParseContextImpl, UserDataReader, FIELD_PATH_RESERVED, DocumentSnapshot$1, QueryDocumentSnapshot$1, AbstractUserDataWriter, encoder, meta, doc1Meta, doc1, doc2Meta, doc2, noDocMeta, limitQuery, limitToLastQuery, BUNDLE_VERSION, BundleBuilder, SnapshotMetadata, DocumentSnapshot, QueryDocumentSnapshot, QuerySnapshot, ExpUserDataWriter;
|
|
28221
27529
|
var init_index_node = __esm({
|
|
28222
27530
|
"../node_modules/@firebase/firestore/dist/index.node.mjs"() {
|
|
28223
27531
|
"use strict";
|
|
@@ -28410,24 +27718,6 @@ var init_index_node = __esm({
|
|
|
28410
27718
|
shutdown() {
|
|
28411
27719
|
}
|
|
28412
27720
|
};
|
|
28413
|
-
EmulatorAuthCredentialsProvider = class {
|
|
28414
|
-
constructor(token) {
|
|
28415
|
-
this.token = token;
|
|
28416
|
-
this.changeListener = null;
|
|
28417
|
-
}
|
|
28418
|
-
getToken() {
|
|
28419
|
-
return Promise.resolve(this.token);
|
|
28420
|
-
}
|
|
28421
|
-
invalidateToken() {
|
|
28422
|
-
}
|
|
28423
|
-
start(asyncQueue, changeListener) {
|
|
28424
|
-
this.changeListener = changeListener;
|
|
28425
|
-
asyncQueue.enqueueRetryable(() => changeListener(this.token.user));
|
|
28426
|
-
}
|
|
28427
|
-
shutdown() {
|
|
28428
|
-
this.changeListener = null;
|
|
28429
|
-
}
|
|
28430
|
-
};
|
|
28431
27721
|
FirebaseAuthCredentialsProvider = class {
|
|
28432
27722
|
constructor(authProvider) {
|
|
28433
27723
|
this.authProvider = authProvider;
|
|
@@ -28585,14 +27875,14 @@ var init_index_node = __esm({
|
|
|
28585
27875
|
}
|
|
28586
27876
|
};
|
|
28587
27877
|
FirebaseAppCheckTokenProvider = class {
|
|
28588
|
-
constructor(
|
|
27878
|
+
constructor(app, appCheckProvider) {
|
|
28589
27879
|
this.appCheckProvider = appCheckProvider;
|
|
28590
27880
|
this.forceRefresh = false;
|
|
28591
27881
|
this.appCheck = null;
|
|
28592
27882
|
this.latestAppCheckToken = null;
|
|
28593
27883
|
this.serverAppAppCheckToken = null;
|
|
28594
|
-
if (_isFirebaseServerApp(
|
|
28595
|
-
this.serverAppAppCheckToken =
|
|
27884
|
+
if (_isFirebaseServerApp(app) && app.settings.appCheckToken) {
|
|
27885
|
+
this.serverAppAppCheckToken = app.settings.appCheckToken;
|
|
28596
27886
|
}
|
|
28597
27887
|
}
|
|
28598
27888
|
start(asyncQueue, changeListener) {
|
|
@@ -28940,8 +28230,8 @@ var init_index_node = __esm({
|
|
|
28940
28230
|
static fromPath(path) {
|
|
28941
28231
|
return new _DocumentKey(ResourcePath.fromString(path));
|
|
28942
28232
|
}
|
|
28943
|
-
static fromName(
|
|
28944
|
-
return new _DocumentKey(ResourcePath.fromString(
|
|
28233
|
+
static fromName(name3) {
|
|
28234
|
+
return new _DocumentKey(ResourcePath.fromString(name3).popFirst(5));
|
|
28945
28235
|
}
|
|
28946
28236
|
static empty() {
|
|
28947
28237
|
return new _DocumentKey(ResourcePath.emptyPath());
|
|
@@ -30259,10 +29549,10 @@ var init_index_node = __esm({
|
|
|
30259
29549
|
}
|
|
30260
29550
|
};
|
|
30261
29551
|
MutableDocument = class _MutableDocument {
|
|
30262
|
-
constructor(key, documentType,
|
|
29552
|
+
constructor(key, documentType, version3, readTime, createTime, data, documentState) {
|
|
30263
29553
|
this.key = key;
|
|
30264
29554
|
this.documentType = documentType;
|
|
30265
|
-
this.version =
|
|
29555
|
+
this.version = version3;
|
|
30266
29556
|
this.readTime = readTime;
|
|
30267
29557
|
this.createTime = createTime;
|
|
30268
29558
|
this.data = data;
|
|
@@ -30291,12 +29581,12 @@ var init_index_node = __esm({
|
|
|
30291
29581
|
* Creates a new document that is known to exist with the given data at the
|
|
30292
29582
|
* given version.
|
|
30293
29583
|
*/
|
|
30294
|
-
static newFoundDocument(documentKey,
|
|
29584
|
+
static newFoundDocument(documentKey, version3, createTime, value) {
|
|
30295
29585
|
return new _MutableDocument(
|
|
30296
29586
|
documentKey,
|
|
30297
29587
|
1,
|
|
30298
29588
|
/* version */
|
|
30299
|
-
|
|
29589
|
+
version3,
|
|
30300
29590
|
/* readTime */
|
|
30301
29591
|
SnapshotVersion.min(),
|
|
30302
29592
|
/* createTime */
|
|
@@ -30307,12 +29597,12 @@ var init_index_node = __esm({
|
|
|
30307
29597
|
);
|
|
30308
29598
|
}
|
|
30309
29599
|
/** Creates a new document that is known to not exist at the given version. */
|
|
30310
|
-
static newNoDocument(documentKey,
|
|
29600
|
+
static newNoDocument(documentKey, version3) {
|
|
30311
29601
|
return new _MutableDocument(
|
|
30312
29602
|
documentKey,
|
|
30313
29603
|
2,
|
|
30314
29604
|
/* version */
|
|
30315
|
-
|
|
29605
|
+
version3,
|
|
30316
29606
|
/* readTime */
|
|
30317
29607
|
SnapshotVersion.min(),
|
|
30318
29608
|
/* createTime */
|
|
@@ -30327,12 +29617,12 @@ var init_index_node = __esm({
|
|
|
30327
29617
|
* whose data is not known (e.g. a document that was updated without a known
|
|
30328
29618
|
* base document).
|
|
30329
29619
|
*/
|
|
30330
|
-
static newUnknownDocument(documentKey,
|
|
29620
|
+
static newUnknownDocument(documentKey, version3) {
|
|
30331
29621
|
return new _MutableDocument(
|
|
30332
29622
|
documentKey,
|
|
30333
29623
|
3,
|
|
30334
29624
|
/* version */
|
|
30335
|
-
|
|
29625
|
+
version3,
|
|
30336
29626
|
/* readTime */
|
|
30337
29627
|
SnapshotVersion.min(),
|
|
30338
29628
|
/* createTime */
|
|
@@ -30346,11 +29636,11 @@ var init_index_node = __esm({
|
|
|
30346
29636
|
* Changes the document type to indicate that it exists and that its version
|
|
30347
29637
|
* and data are known.
|
|
30348
29638
|
*/
|
|
30349
|
-
convertToFoundDocument(
|
|
29639
|
+
convertToFoundDocument(version3, value) {
|
|
30350
29640
|
if (this.createTime.isEqual(SnapshotVersion.min()) && (this.documentType === 2 || this.documentType === 0)) {
|
|
30351
|
-
this.createTime =
|
|
29641
|
+
this.createTime = version3;
|
|
30352
29642
|
}
|
|
30353
|
-
this.version =
|
|
29643
|
+
this.version = version3;
|
|
30354
29644
|
this.documentType = 1;
|
|
30355
29645
|
this.data = value;
|
|
30356
29646
|
this.documentState = 0;
|
|
@@ -30360,8 +29650,8 @@ var init_index_node = __esm({
|
|
|
30360
29650
|
* Changes the document type to indicate that it doesn't exist at the given
|
|
30361
29651
|
* version.
|
|
30362
29652
|
*/
|
|
30363
|
-
convertToNoDocument(
|
|
30364
|
-
this.version =
|
|
29653
|
+
convertToNoDocument(version3) {
|
|
29654
|
+
this.version = version3;
|
|
30365
29655
|
this.documentType = 2;
|
|
30366
29656
|
this.data = ObjectValue.empty();
|
|
30367
29657
|
this.documentState = 0;
|
|
@@ -30372,8 +29662,8 @@ var init_index_node = __esm({
|
|
|
30372
29662
|
* that its data is not known (e.g. a document that was updated without a known
|
|
30373
29663
|
* base document).
|
|
30374
29664
|
*/
|
|
30375
|
-
convertToUnknownDocument(
|
|
30376
|
-
this.version =
|
|
29665
|
+
convertToUnknownDocument(version3) {
|
|
29666
|
+
this.version = version3;
|
|
30377
29667
|
this.documentType = 3;
|
|
30378
29668
|
this.data = ObjectValue.empty();
|
|
30379
29669
|
this.documentState = 2;
|
|
@@ -30774,8 +30064,8 @@ var init_index_node = __esm({
|
|
|
30774
30064
|
return new _Precondition(void 0, exists);
|
|
30775
30065
|
}
|
|
30776
30066
|
/** Creates a new Precondition based on a version a document exists at. */
|
|
30777
|
-
static updateTime(
|
|
30778
|
-
return new _Precondition(
|
|
30067
|
+
static updateTime(version3) {
|
|
30068
|
+
return new _Precondition(version3);
|
|
30779
30069
|
}
|
|
30780
30070
|
/** Returns whether this Precondition is empty. */
|
|
30781
30071
|
get isNone() {
|
|
@@ -38580,11 +37870,11 @@ This typically indicates that your device does not have a healthy Internet conne
|
|
|
38580
37870
|
};
|
|
38581
37871
|
Firestore = class extends Firestore$1 {
|
|
38582
37872
|
/** @hideconstructor */
|
|
38583
|
-
constructor(authCredentialsProvider, appCheckCredentialsProvider, databaseId,
|
|
38584
|
-
super(authCredentialsProvider, appCheckCredentialsProvider, databaseId,
|
|
37873
|
+
constructor(authCredentialsProvider, appCheckCredentialsProvider, databaseId, app) {
|
|
37874
|
+
super(authCredentialsProvider, appCheckCredentialsProvider, databaseId, app);
|
|
38585
37875
|
this.type = "firestore";
|
|
38586
37876
|
this._queue = new AsyncQueueImpl();
|
|
38587
|
-
this._persistenceKey = (
|
|
37877
|
+
this._persistenceKey = (app == null ? void 0 : app.name) || "[DEFAULT]";
|
|
38588
37878
|
}
|
|
38589
37879
|
async _terminate() {
|
|
38590
37880
|
if (this._firestoreClient) {
|
|
@@ -39113,9 +38403,9 @@ This typically indicates that your device does not have a healthy Internet conne
|
|
|
39113
38403
|
const normalizedValue = normalizeTimestamp(value);
|
|
39114
38404
|
return new Timestamp(normalizedValue.seconds, normalizedValue.nanos);
|
|
39115
38405
|
}
|
|
39116
|
-
convertDocumentKey(
|
|
39117
|
-
const resourcePath = ResourcePath.fromString(
|
|
39118
|
-
hardAssert(isValidResourceName(resourcePath), 9688, { name:
|
|
38406
|
+
convertDocumentKey(name3, expectedDatabaseId) {
|
|
38407
|
+
const resourcePath = ResourcePath.fromString(name3);
|
|
38408
|
+
hardAssert(isValidResourceName(resourcePath), 9688, { name: name3 });
|
|
39119
38409
|
const databaseId = new DatabaseId(resourcePath.get(1), resourcePath.get(3));
|
|
39120
38410
|
const key = new DocumentKey(resourcePath.popFirst(5));
|
|
39121
38411
|
if (!databaseId.isEqual(expectedDatabaseId)) {
|
|
@@ -39592,8 +38882,8 @@ This typically indicates that your device does not have a healthy Internet conne
|
|
|
39592
38882
|
convertBytes(bytes) {
|
|
39593
38883
|
return new Bytes(bytes);
|
|
39594
38884
|
}
|
|
39595
|
-
convertReference(
|
|
39596
|
-
const key = this.convertDocumentKey(
|
|
38885
|
+
convertReference(name3) {
|
|
38886
|
+
const key = this.convertDocumentKey(name3, this.firestore._databaseId);
|
|
39597
38887
|
return new DocumentReference(
|
|
39598
38888
|
this.firestore,
|
|
39599
38889
|
/* converter= */
|
|
@@ -39614,40 +38904,6 @@ var init_dist = __esm({
|
|
|
39614
38904
|
}
|
|
39615
38905
|
});
|
|
39616
38906
|
|
|
39617
|
-
// ../node_modules/firebase/app/dist/index.mjs
|
|
39618
|
-
var name3, version3;
|
|
39619
|
-
var init_dist2 = __esm({
|
|
39620
|
-
"../node_modules/firebase/app/dist/index.mjs"() {
|
|
39621
|
-
"use strict";
|
|
39622
|
-
init_index_esm3();
|
|
39623
|
-
init_index_esm3();
|
|
39624
|
-
name3 = "firebase";
|
|
39625
|
-
version3 = "12.6.0";
|
|
39626
|
-
registerVersion(name3, version3, "app");
|
|
39627
|
-
}
|
|
39628
|
-
});
|
|
39629
|
-
|
|
39630
|
-
// ../app/fireabse.ts
|
|
39631
|
-
var firebaseConfig, app, db;
|
|
39632
|
-
var init_fireabse = __esm({
|
|
39633
|
-
"../app/fireabse.ts"() {
|
|
39634
|
-
"use strict";
|
|
39635
|
-
init_dist2();
|
|
39636
|
-
init_dist();
|
|
39637
|
-
firebaseConfig = {
|
|
39638
|
-
apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,
|
|
39639
|
-
authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN,
|
|
39640
|
-
projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID,
|
|
39641
|
-
storageBucket: process.env.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET,
|
|
39642
|
-
messagingSenderId: process.env.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID,
|
|
39643
|
-
appId: process.env.NEXT_PUBLIC_FIREBASE_APP_ID,
|
|
39644
|
-
measurementId: process.env.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID
|
|
39645
|
-
};
|
|
39646
|
-
app = initializeApp(firebaseConfig);
|
|
39647
|
-
db = getFirestore(app);
|
|
39648
|
-
}
|
|
39649
|
-
});
|
|
39650
|
-
|
|
39651
38907
|
// import("../organisms/**/*/**/*") in src/templates/OraculoPageLandingPreview.tsx
|
|
39652
38908
|
var globImport_organisms;
|
|
39653
38909
|
var init_ = __esm({
|
|
@@ -39674,7 +38930,6 @@ var init_OraculoPageLandingPreview = __esm({
|
|
|
39674
38930
|
import_react8 = __toESM(require("react"));
|
|
39675
38931
|
import_material3 = require("@mui/material");
|
|
39676
38932
|
init_dist();
|
|
39677
|
-
init_fireabse();
|
|
39678
38933
|
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
39679
38934
|
init_();
|
|
39680
38935
|
HttpError = class extends Error {
|
|
@@ -39688,7 +38943,8 @@ var init_OraculoPageLandingPreview = __esm({
|
|
|
39688
38943
|
};
|
|
39689
38944
|
OraculoPageLandingPreview = ({
|
|
39690
38945
|
sectionsOverride,
|
|
39691
|
-
docId = "home"
|
|
38946
|
+
docId = "home",
|
|
38947
|
+
db
|
|
39692
38948
|
}) => {
|
|
39693
38949
|
const [sections, setSections] = (0, import_react8.useState)([]);
|
|
39694
38950
|
const [loading, setLoading] = (0, import_react8.useState)(false);
|
|
@@ -39698,6 +38954,7 @@ var init_OraculoPageLandingPreview = __esm({
|
|
|
39698
38954
|
const [sectionErrorMap, setSectionErrorMap] = (0, import_react8.useState)({});
|
|
39699
38955
|
(0, import_react8.useEffect)(() => {
|
|
39700
38956
|
if (sectionsOverride) return;
|
|
38957
|
+
if (!db) return;
|
|
39701
38958
|
setLoading(true);
|
|
39702
38959
|
const unsubscribe = onSnapshot(
|
|
39703
38960
|
doc(db, "landings", docId),
|
|
@@ -39723,7 +38980,7 @@ var init_OraculoPageLandingPreview = __esm({
|
|
|
39723
38980
|
}
|
|
39724
38981
|
);
|
|
39725
38982
|
return () => unsubscribe();
|
|
39726
|
-
}, [sectionsOverride, docId]);
|
|
38983
|
+
}, [sectionsOverride, docId, db]);
|
|
39727
38984
|
const fetchSectionData = async (section) => {
|
|
39728
38985
|
const rawUrl = (section.apiUrl || "").trim();
|
|
39729
38986
|
if (!rawUrl) return void 0;
|
|
@@ -39853,8 +39110,8 @@ var init_OraculoPageLandingPreview = __esm({
|
|
|
39853
39110
|
const mapPayloadToProps = (payload, manual, base) => {
|
|
39854
39111
|
const merged = base ? { ...base } : {};
|
|
39855
39112
|
if (manual) {
|
|
39856
|
-
const
|
|
39857
|
-
merged[
|
|
39113
|
+
const name3 = (manual.variableName || "items").trim() || "items";
|
|
39114
|
+
merged[name3] = manual.arr || [];
|
|
39858
39115
|
return merged;
|
|
39859
39116
|
}
|
|
39860
39117
|
const pl = payload;
|
|
@@ -39867,7 +39124,7 @@ var init_OraculoPageLandingPreview = __esm({
|
|
|
39867
39124
|
merged.items = choose(arrData || []);
|
|
39868
39125
|
return merged;
|
|
39869
39126
|
};
|
|
39870
|
-
const lazyLoadComponent =
|
|
39127
|
+
const lazyLoadComponent = (rawKey) => {
|
|
39871
39128
|
globImport_organisms(`../organisms/${rawKey}/${rawKey}`).then((mod2) => {
|
|
39872
39129
|
var _a;
|
|
39873
39130
|
const ns = mod2;
|
|
@@ -40053,9 +39310,11 @@ __export(index_exports, {
|
|
|
40053
39310
|
OraculoSeccionVirtuales: () => OraculoSeccionVirtuales_default,
|
|
40054
39311
|
OraculoSectionTitle: () => OraculoSectionTitle,
|
|
40055
39312
|
OraculoTopJuegoItem: () => OraculoSeccionTopJuegos,
|
|
40056
|
-
OraculoWelcomeBanner: () => OraculoWelcomeBanner_default
|
|
39313
|
+
OraculoWelcomeBanner: () => OraculoWelcomeBanner_default,
|
|
39314
|
+
default: () => index_default
|
|
40057
39315
|
});
|
|
40058
39316
|
module.exports = __toCommonJS(index_exports);
|
|
39317
|
+
var index_default;
|
|
40059
39318
|
var init_index = __esm({
|
|
40060
39319
|
"src/index.ts"() {
|
|
40061
39320
|
init_OraculoButton2();
|
|
@@ -40086,6 +39345,7 @@ var init_index = __esm({
|
|
|
40086
39345
|
init_InterfaceTopJuegos();
|
|
40087
39346
|
init_InterfaceVirtuales();
|
|
40088
39347
|
init_InterfaceDestacados();
|
|
39348
|
+
index_default = OraculoPageLandingPreview_default;
|
|
40089
39349
|
}
|
|
40090
39350
|
});
|
|
40091
39351
|
init_index();
|
|
@@ -40511,22 +39771,4 @@ long/umd/index.js:
|
|
|
40511
39771
|
* See the License for the specific language governing permissions and
|
|
40512
39772
|
* limitations under the License.
|
|
40513
39773
|
*)
|
|
40514
|
-
|
|
40515
|
-
firebase/app/dist/index.mjs:
|
|
40516
|
-
(**
|
|
40517
|
-
* @license
|
|
40518
|
-
* Copyright 2020 Google LLC
|
|
40519
|
-
*
|
|
40520
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
40521
|
-
* you may not use this file except in compliance with the License.
|
|
40522
|
-
* You may obtain a copy of the License at
|
|
40523
|
-
*
|
|
40524
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
40525
|
-
*
|
|
40526
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
40527
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
40528
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
40529
|
-
* See the License for the specific language governing permissions and
|
|
40530
|
-
* limitations under the License.
|
|
40531
|
-
*)
|
|
40532
39774
|
*/
|