@superdoc-dev/cli 0.16.0-next.30 → 0.16.0-next.31
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/index.js +1296 -1023
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -185235,6 +185235,1231 @@ var __plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
185235
185235
|
};
|
|
185236
185236
|
var init__plugin_vue_export_helper_5t5P5NuM_es = () => {};
|
|
185237
185237
|
|
|
185238
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-tVaowTvG.es.js
|
|
185239
|
+
function isSettled(status) {
|
|
185240
|
+
return SETTLED_STATUSES.includes(status);
|
|
185241
|
+
}
|
|
185242
|
+
function normalizeFamilyKey$1(family$1) {
|
|
185243
|
+
return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
|
|
185244
|
+
}
|
|
185245
|
+
function deriveBundledSubstitutes() {
|
|
185246
|
+
const substitutes = {};
|
|
185247
|
+
for (const row of SUBSTITUTION_EVIDENCE)
|
|
185248
|
+
if (row.policyAction === "substitute" && row.physicalFamily)
|
|
185249
|
+
substitutes[normalizeFamilyKey$1(row.logicalFamily)] = row.physicalFamily;
|
|
185250
|
+
return Object.freeze(substitutes);
|
|
185251
|
+
}
|
|
185252
|
+
function deriveCategoryFallbacks() {
|
|
185253
|
+
const fallbacks = {};
|
|
185254
|
+
for (const row of SUBSTITUTION_EVIDENCE)
|
|
185255
|
+
if (row.policyAction === "category_fallback" && row.physicalFamily)
|
|
185256
|
+
fallbacks[normalizeFamilyKey$1(row.logicalFamily)] = row.physicalFamily;
|
|
185257
|
+
return Object.freeze(fallbacks);
|
|
185258
|
+
}
|
|
185259
|
+
function stripFamilyQuotes(family$1) {
|
|
185260
|
+
return family$1.trim().replace(/^["']|["']$/g, "");
|
|
185261
|
+
}
|
|
185262
|
+
function splitStack(cssFontFamily) {
|
|
185263
|
+
return cssFontFamily.split(",").map((part) => part.trim()).filter(Boolean);
|
|
185264
|
+
}
|
|
185265
|
+
function createFontResolver() {
|
|
185266
|
+
return new FontResolver;
|
|
185267
|
+
}
|
|
185268
|
+
function resolveFontFamily2(logicalFamily) {
|
|
185269
|
+
return defaultResolver.resolveFontFamily(logicalFamily);
|
|
185270
|
+
}
|
|
185271
|
+
function resolvePhysicalFamily(cssFontFamily) {
|
|
185272
|
+
return defaultResolver.resolvePhysicalFamily(cssFontFamily);
|
|
185273
|
+
}
|
|
185274
|
+
function resolveFace(logicalFamily, face, hasFace) {
|
|
185275
|
+
return defaultResolver.resolveFace(logicalFamily, face, hasFace);
|
|
185276
|
+
}
|
|
185277
|
+
function getFontConfigVersion() {
|
|
185278
|
+
return fontConfigVersion;
|
|
185279
|
+
}
|
|
185280
|
+
function bumpFontConfigVersion() {
|
|
185281
|
+
return fontConfigVersion += 1;
|
|
185282
|
+
}
|
|
185283
|
+
function fourFaces(filePrefix) {
|
|
185284
|
+
return [
|
|
185285
|
+
{
|
|
185286
|
+
weight: "normal",
|
|
185287
|
+
style: "normal",
|
|
185288
|
+
file: `${filePrefix}-Regular.woff2`
|
|
185289
|
+
},
|
|
185290
|
+
{
|
|
185291
|
+
weight: "bold",
|
|
185292
|
+
style: "normal",
|
|
185293
|
+
file: `${filePrefix}-Bold.woff2`
|
|
185294
|
+
},
|
|
185295
|
+
{
|
|
185296
|
+
weight: "normal",
|
|
185297
|
+
style: "italic",
|
|
185298
|
+
file: `${filePrefix}-Italic.woff2`
|
|
185299
|
+
},
|
|
185300
|
+
{
|
|
185301
|
+
weight: "bold",
|
|
185302
|
+
style: "italic",
|
|
185303
|
+
file: `${filePrefix}-BoldItalic.woff2`
|
|
185304
|
+
}
|
|
185305
|
+
];
|
|
185306
|
+
}
|
|
185307
|
+
function family(name, filePrefix, license) {
|
|
185308
|
+
return {
|
|
185309
|
+
family: name,
|
|
185310
|
+
license,
|
|
185311
|
+
faces: fourFaces(filePrefix)
|
|
185312
|
+
};
|
|
185313
|
+
}
|
|
185314
|
+
function withTrailingSlash(base3) {
|
|
185315
|
+
return base3.endsWith("/") ? base3 : `${base3}/`;
|
|
185316
|
+
}
|
|
185317
|
+
function joinUrl(base3, file) {
|
|
185318
|
+
return `${withTrailingSlash(base3)}${file}`;
|
|
185319
|
+
}
|
|
185320
|
+
function weightToken(weight) {
|
|
185321
|
+
return weight === "bold" ? "700" : "400";
|
|
185322
|
+
}
|
|
185323
|
+
function bundledAssetSignature(resolve2) {
|
|
185324
|
+
const family$1 = BUNDLED_MANIFEST[0];
|
|
185325
|
+
const face = family$1?.faces[0];
|
|
185326
|
+
if (!family$1 || !face)
|
|
185327
|
+
return "";
|
|
185328
|
+
return resolve2({
|
|
185329
|
+
file: face.file,
|
|
185330
|
+
family: family$1.family,
|
|
185331
|
+
weight: weightToken(face.weight),
|
|
185332
|
+
style: face.style,
|
|
185333
|
+
source: "bundled-substitute"
|
|
185334
|
+
});
|
|
185335
|
+
}
|
|
185336
|
+
function installBundledSubstitutes(registry2, options = {}) {
|
|
185337
|
+
const resolve2 = options.resolveAssetUrl ?? ((context) => joinUrl(options.assetBaseUrl ?? defaultAssetBase, context.file));
|
|
185338
|
+
const signature = bundledAssetSignature(resolve2);
|
|
185339
|
+
const installed = installedRegistries.get(registry2);
|
|
185340
|
+
if (installed !== undefined) {
|
|
185341
|
+
if (installed !== signature)
|
|
185342
|
+
console.warn(`[superdoc] bundled fonts are already registered for this document from "${installed}"; a later fonts config resolving to "${signature}" is ignored. Use one fonts.assetBaseUrl / fonts.resolveAssetUrl per document.`);
|
|
185343
|
+
return;
|
|
185344
|
+
}
|
|
185345
|
+
installedRegistries.set(registry2, signature);
|
|
185346
|
+
for (const family$1 of BUNDLED_MANIFEST)
|
|
185347
|
+
for (const face of family$1.faces) {
|
|
185348
|
+
const context = {
|
|
185349
|
+
file: face.file,
|
|
185350
|
+
family: family$1.family,
|
|
185351
|
+
weight: weightToken(face.weight),
|
|
185352
|
+
style: face.style,
|
|
185353
|
+
source: "bundled-substitute"
|
|
185354
|
+
};
|
|
185355
|
+
registry2.register({
|
|
185356
|
+
family: family$1.family,
|
|
185357
|
+
source: `url(${resolve2(context)})`,
|
|
185358
|
+
descriptors: {
|
|
185359
|
+
weight: face.weight,
|
|
185360
|
+
style: face.style
|
|
185361
|
+
}
|
|
185362
|
+
});
|
|
185363
|
+
}
|
|
185364
|
+
}
|
|
185365
|
+
function buildFontReport(logicalFamilies, registry2, resolver2) {
|
|
185366
|
+
const seen = /* @__PURE__ */ new Set;
|
|
185367
|
+
const report = [];
|
|
185368
|
+
for (const logical of logicalFamilies) {
|
|
185369
|
+
if (!logical || seen.has(logical))
|
|
185370
|
+
continue;
|
|
185371
|
+
seen.add(logical);
|
|
185372
|
+
const { physicalFamily, reason } = resolver2 ? resolver2.resolveFontFamily(logical) : resolveFontFamily2(logical);
|
|
185373
|
+
const loadStatus = registry2.getStatus(physicalFamily);
|
|
185374
|
+
report.push({
|
|
185375
|
+
logicalFamily: logical,
|
|
185376
|
+
physicalFamily,
|
|
185377
|
+
reason,
|
|
185378
|
+
loadStatus,
|
|
185379
|
+
exportFamily: logical,
|
|
185380
|
+
missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded"
|
|
185381
|
+
});
|
|
185382
|
+
}
|
|
185383
|
+
return report;
|
|
185384
|
+
}
|
|
185385
|
+
function buildFaceReport(usedFaces, registry2, resolver2) {
|
|
185386
|
+
const hasFace = (family$1, weight, style) => registry2.hasFace(family$1, weight, style);
|
|
185387
|
+
const seen = /* @__PURE__ */ new Set;
|
|
185388
|
+
const report = [];
|
|
185389
|
+
for (const { logicalFamily, weight, style } of usedFaces) {
|
|
185390
|
+
if (!logicalFamily)
|
|
185391
|
+
continue;
|
|
185392
|
+
const key2 = `${logicalFamily.toLowerCase()}|${weight}|${style}`;
|
|
185393
|
+
if (seen.has(key2))
|
|
185394
|
+
continue;
|
|
185395
|
+
seen.add(key2);
|
|
185396
|
+
const face = {
|
|
185397
|
+
weight,
|
|
185398
|
+
style
|
|
185399
|
+
};
|
|
185400
|
+
const { physicalFamily, reason } = resolver2 ? resolver2.resolveFace(logicalFamily, face, hasFace) : resolveFace(logicalFamily, face, hasFace);
|
|
185401
|
+
const loadStatus = registry2.getFaceStatus({
|
|
185402
|
+
family: physicalFamily,
|
|
185403
|
+
weight,
|
|
185404
|
+
style
|
|
185405
|
+
});
|
|
185406
|
+
const missing = reason === "fallback_face_absent" || reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded";
|
|
185407
|
+
report.push({
|
|
185408
|
+
logicalFamily,
|
|
185409
|
+
physicalFamily,
|
|
185410
|
+
reason,
|
|
185411
|
+
loadStatus,
|
|
185412
|
+
exportFamily: logicalFamily,
|
|
185413
|
+
missing,
|
|
185414
|
+
face
|
|
185415
|
+
});
|
|
185416
|
+
}
|
|
185417
|
+
return report;
|
|
185418
|
+
}
|
|
185419
|
+
function quoteFamily(family$1) {
|
|
185420
|
+
return `"${family$1.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`;
|
|
185421
|
+
}
|
|
185422
|
+
function canonicalizeFontSource(source) {
|
|
185423
|
+
const match = /^\s*url\(\s*([\s\S]*?)\s*\)\s*$/i.exec(source);
|
|
185424
|
+
if (!match)
|
|
185425
|
+
return source;
|
|
185426
|
+
let inner = match[1].trim();
|
|
185427
|
+
if (inner.startsWith('"') && inner.endsWith('"') || inner.startsWith("'") && inner.endsWith("'"))
|
|
185428
|
+
inner = inner.slice(1, -1);
|
|
185429
|
+
return `url(${JSON.stringify(inner)})`;
|
|
185430
|
+
}
|
|
185431
|
+
function normalizeFamilyKey(family$1) {
|
|
185432
|
+
return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
|
|
185433
|
+
}
|
|
185434
|
+
function normalizeWeight(weight) {
|
|
185435
|
+
if (weight === undefined)
|
|
185436
|
+
return "400";
|
|
185437
|
+
const w = String(weight).trim().toLowerCase();
|
|
185438
|
+
if (w === "bold" || w === "bolder")
|
|
185439
|
+
return "700";
|
|
185440
|
+
const n = Number(w);
|
|
185441
|
+
return Number.isFinite(n) && n >= 600 ? "700" : "400";
|
|
185442
|
+
}
|
|
185443
|
+
function normalizeStyle(style) {
|
|
185444
|
+
if (!style)
|
|
185445
|
+
return "normal";
|
|
185446
|
+
const s = style.trim().toLowerCase();
|
|
185447
|
+
return s.startsWith("italic") || s.startsWith("oblique") ? "italic" : "normal";
|
|
185448
|
+
}
|
|
185449
|
+
function faceKeyOf(family$1, weight, style) {
|
|
185450
|
+
return `${normalizeFamilyKey(family$1)}|${weight}|${style}`;
|
|
185451
|
+
}
|
|
185452
|
+
function faceProbe(family$1, weight, style, size2) {
|
|
185453
|
+
return `${style === "italic" ? "italic " : ""}${weight} ${size2} ${quoteFamily(family$1)}`;
|
|
185454
|
+
}
|
|
185455
|
+
function getFontRegistryFor(fontSet, FontFaceCtor) {
|
|
185456
|
+
if (!fontSet) {
|
|
185457
|
+
if (!domlessRegistry)
|
|
185458
|
+
domlessRegistry = new FontRegistry({});
|
|
185459
|
+
return domlessRegistry;
|
|
185460
|
+
}
|
|
185461
|
+
let registry2 = registriesByFontSet.get(fontSet);
|
|
185462
|
+
if (!registry2) {
|
|
185463
|
+
registry2 = new FontRegistry({
|
|
185464
|
+
fontSet,
|
|
185465
|
+
FontFaceCtor
|
|
185466
|
+
});
|
|
185467
|
+
registriesByFontSet.set(fontSet, registry2);
|
|
185468
|
+
}
|
|
185469
|
+
return registry2;
|
|
185470
|
+
}
|
|
185471
|
+
function classifyOffering(policyAction, verdict, physicalFamily, bundled) {
|
|
185472
|
+
if (policyAction === "preserve_only")
|
|
185473
|
+
return "preserve_only";
|
|
185474
|
+
if (policyAction === "customer_supplied" || physicalFamily == null)
|
|
185475
|
+
return "customer_supplied";
|
|
185476
|
+
if (policyAction === "category_fallback")
|
|
185477
|
+
return "category_fallback";
|
|
185478
|
+
if (!bundled)
|
|
185479
|
+
return "requires_asset";
|
|
185480
|
+
return verdict === "metric_safe" ? "default" : "qualified";
|
|
185481
|
+
}
|
|
185482
|
+
function deriveOfferings() {
|
|
185483
|
+
const offerings = SUBSTITUTION_EVIDENCE.map((row) => {
|
|
185484
|
+
const bundled = row.physicalFamily != null && BUNDLED_FAMILIES.has(row.physicalFamily);
|
|
185485
|
+
return {
|
|
185486
|
+
logicalFamily: row.logicalFamily,
|
|
185487
|
+
physicalFamily: row.physicalFamily,
|
|
185488
|
+
generic: row.physicalFamily && PHYSICAL_GENERIC[row.physicalFamily] || "sans-serif",
|
|
185489
|
+
offering: classifyOffering(row.policyAction, row.verdict, row.physicalFamily, bundled),
|
|
185490
|
+
bundled,
|
|
185491
|
+
verdict: row.verdict,
|
|
185492
|
+
evidenceId: row.evidenceId
|
|
185493
|
+
};
|
|
185494
|
+
});
|
|
185495
|
+
return Object.freeze(offerings);
|
|
185496
|
+
}
|
|
185497
|
+
function getDefaultFontOfferings() {
|
|
185498
|
+
const rank = (name) => {
|
|
185499
|
+
const i4 = DEFAULT_FONT_ORDER.indexOf(name);
|
|
185500
|
+
return i4 === -1 ? DEFAULT_FONT_ORDER.length : i4;
|
|
185501
|
+
};
|
|
185502
|
+
return FONT_OFFERINGS.filter((o) => o.offering === "default").sort((a, b) => rank(a.logicalFamily) - rank(b.logicalFamily));
|
|
185503
|
+
}
|
|
185504
|
+
function fontOfferingStack(offering) {
|
|
185505
|
+
return `${offering.logicalFamily}, ${offering.generic}`;
|
|
185506
|
+
}
|
|
185507
|
+
function fontOfferingRenderStack(offering) {
|
|
185508
|
+
return offering.physicalFamily ? `${offering.physicalFamily}, ${offering.generic}` : fontOfferingStack(offering);
|
|
185509
|
+
}
|
|
185510
|
+
function getDefaultFontFamilyOptions() {
|
|
185511
|
+
return getDefaultFontOfferings().map((offering) => ({
|
|
185512
|
+
label: offering.logicalFamily,
|
|
185513
|
+
value: fontOfferingStack(offering)
|
|
185514
|
+
}));
|
|
185515
|
+
}
|
|
185516
|
+
var SETTLED_STATUSES, SUBSTITUTION_EVIDENCE, BUNDLED_SUBSTITUTES, CATEGORY_FALLBACKS, FontResolver = class {
|
|
185517
|
+
#overrides = /* @__PURE__ */ new Map;
|
|
185518
|
+
#version = 0;
|
|
185519
|
+
#cachedSignature = null;
|
|
185520
|
+
map(logicalFamily, physicalFamily) {
|
|
185521
|
+
const key2 = normalizeFamilyKey$1(logicalFamily);
|
|
185522
|
+
const physical = physicalFamily?.trim();
|
|
185523
|
+
if (!key2 || !physical)
|
|
185524
|
+
return;
|
|
185525
|
+
if (this.#overrides.get(key2) === physical)
|
|
185526
|
+
return;
|
|
185527
|
+
if (key2 === normalizeFamilyKey$1(physical)) {
|
|
185528
|
+
if (this.#overrides.delete(key2)) {
|
|
185529
|
+
this.#version += 1;
|
|
185530
|
+
this.#cachedSignature = null;
|
|
185531
|
+
}
|
|
185532
|
+
return;
|
|
185533
|
+
}
|
|
185534
|
+
this.#overrides.set(key2, physical);
|
|
185535
|
+
this.#version += 1;
|
|
185536
|
+
this.#cachedSignature = null;
|
|
185537
|
+
}
|
|
185538
|
+
unmap(logicalFamily) {
|
|
185539
|
+
if (this.#overrides.delete(normalizeFamilyKey$1(logicalFamily))) {
|
|
185540
|
+
this.#version += 1;
|
|
185541
|
+
this.#cachedSignature = null;
|
|
185542
|
+
}
|
|
185543
|
+
}
|
|
185544
|
+
reset() {
|
|
185545
|
+
if (this.#overrides.size === 0)
|
|
185546
|
+
return;
|
|
185547
|
+
this.#overrides.clear();
|
|
185548
|
+
this.#version += 1;
|
|
185549
|
+
this.#cachedSignature = null;
|
|
185550
|
+
}
|
|
185551
|
+
get version() {
|
|
185552
|
+
return this.#version;
|
|
185553
|
+
}
|
|
185554
|
+
get signature() {
|
|
185555
|
+
if (this.#cachedSignature !== null)
|
|
185556
|
+
return this.#cachedSignature;
|
|
185557
|
+
this.#cachedSignature = this.#overrides.size === 0 ? "" : JSON.stringify([...this.#overrides.entries()].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));
|
|
185558
|
+
return this.#cachedSignature;
|
|
185559
|
+
}
|
|
185560
|
+
#physicalFor(bareFamily) {
|
|
185561
|
+
const key2 = normalizeFamilyKey$1(bareFamily);
|
|
185562
|
+
const override = this.#overrides.get(key2);
|
|
185563
|
+
if (override)
|
|
185564
|
+
return {
|
|
185565
|
+
physical: override,
|
|
185566
|
+
reason: "custom_mapping"
|
|
185567
|
+
};
|
|
185568
|
+
const bundled = BUNDLED_SUBSTITUTES[key2];
|
|
185569
|
+
if (bundled)
|
|
185570
|
+
return {
|
|
185571
|
+
physical: bundled,
|
|
185572
|
+
reason: "bundled_substitute"
|
|
185573
|
+
};
|
|
185574
|
+
const category = CATEGORY_FALLBACKS[key2];
|
|
185575
|
+
if (category)
|
|
185576
|
+
return {
|
|
185577
|
+
physical: category,
|
|
185578
|
+
reason: "category_fallback"
|
|
185579
|
+
};
|
|
185580
|
+
return {
|
|
185581
|
+
physical: bareFamily,
|
|
185582
|
+
reason: "as_requested"
|
|
185583
|
+
};
|
|
185584
|
+
}
|
|
185585
|
+
#resolveFaceLadder(primary, face, hasFace) {
|
|
185586
|
+
const key2 = normalizeFamilyKey$1(primary);
|
|
185587
|
+
const override = this.#overrides.get(key2);
|
|
185588
|
+
if (override && hasFace(override, face.weight, face.style))
|
|
185589
|
+
return {
|
|
185590
|
+
physical: override,
|
|
185591
|
+
reason: "custom_mapping"
|
|
185592
|
+
};
|
|
185593
|
+
if (hasFace(primary, face.weight, face.style))
|
|
185594
|
+
return {
|
|
185595
|
+
physical: primary,
|
|
185596
|
+
reason: "registered_face"
|
|
185597
|
+
};
|
|
185598
|
+
const bundled = BUNDLED_SUBSTITUTES[key2];
|
|
185599
|
+
if (bundled && hasFace(bundled, face.weight, face.style))
|
|
185600
|
+
return {
|
|
185601
|
+
physical: bundled,
|
|
185602
|
+
reason: "bundled_substitute"
|
|
185603
|
+
};
|
|
185604
|
+
const category = CATEGORY_FALLBACKS[key2];
|
|
185605
|
+
if (category && hasFace(category, face.weight, face.style))
|
|
185606
|
+
return {
|
|
185607
|
+
physical: category,
|
|
185608
|
+
reason: "category_fallback"
|
|
185609
|
+
};
|
|
185610
|
+
if (override || bundled)
|
|
185611
|
+
return {
|
|
185612
|
+
physical: primary,
|
|
185613
|
+
reason: "fallback_face_absent"
|
|
185614
|
+
};
|
|
185615
|
+
return {
|
|
185616
|
+
physical: primary,
|
|
185617
|
+
reason: "as_requested"
|
|
185618
|
+
};
|
|
185619
|
+
}
|
|
185620
|
+
resolveFontFamily(logicalFamily) {
|
|
185621
|
+
const primary = splitStack(logicalFamily)[0] ?? logicalFamily;
|
|
185622
|
+
const { physical, reason } = this.#physicalFor(primary);
|
|
185623
|
+
return {
|
|
185624
|
+
logicalFamily,
|
|
185625
|
+
physicalFamily: stripFamilyQuotes(physical),
|
|
185626
|
+
reason
|
|
185627
|
+
};
|
|
185628
|
+
}
|
|
185629
|
+
resolvePhysicalFamily(cssFontFamily) {
|
|
185630
|
+
if (!cssFontFamily)
|
|
185631
|
+
return cssFontFamily;
|
|
185632
|
+
const parts = splitStack(cssFontFamily);
|
|
185633
|
+
if (parts.length === 0)
|
|
185634
|
+
return cssFontFamily;
|
|
185635
|
+
const { physical, reason } = this.#physicalFor(parts[0]);
|
|
185636
|
+
if (reason === "as_requested")
|
|
185637
|
+
return cssFontFamily;
|
|
185638
|
+
return [physical, ...parts.slice(1)].join(", ");
|
|
185639
|
+
}
|
|
185640
|
+
resolveFace(logicalFamily, face, hasFace) {
|
|
185641
|
+
const primary = splitStack(logicalFamily)[0] ?? logicalFamily;
|
|
185642
|
+
const { physical, reason } = this.#resolveFaceLadder(primary, face, hasFace);
|
|
185643
|
+
return {
|
|
185644
|
+
logicalFamily,
|
|
185645
|
+
physicalFamily: stripFamilyQuotes(physical),
|
|
185646
|
+
reason
|
|
185647
|
+
};
|
|
185648
|
+
}
|
|
185649
|
+
resolvePhysicalFamilyForFace(cssFontFamily, face, hasFace) {
|
|
185650
|
+
if (!cssFontFamily)
|
|
185651
|
+
return cssFontFamily;
|
|
185652
|
+
const parts = splitStack(cssFontFamily);
|
|
185653
|
+
if (parts.length === 0)
|
|
185654
|
+
return cssFontFamily;
|
|
185655
|
+
const { physical } = this.#resolveFaceLadder(parts[0], face, hasFace);
|
|
185656
|
+
if (normalizeFamilyKey$1(physical) !== normalizeFamilyKey$1(parts[0]))
|
|
185657
|
+
return [physical, ...parts.slice(1)].join(", ");
|
|
185658
|
+
return cssFontFamily;
|
|
185659
|
+
}
|
|
185660
|
+
resolvePrimaryPhysicalFamily(family$1) {
|
|
185661
|
+
const primary = splitStack(family$1)[0] ?? family$1;
|
|
185662
|
+
return this.#physicalFor(primary).physical;
|
|
185663
|
+
}
|
|
185664
|
+
resolvePhysicalFamilies(families) {
|
|
185665
|
+
const out = /* @__PURE__ */ new Set;
|
|
185666
|
+
for (const family$1 of families)
|
|
185667
|
+
if (family$1)
|
|
185668
|
+
out.add(this.resolvePrimaryPhysicalFamily(family$1));
|
|
185669
|
+
return [...out];
|
|
185670
|
+
}
|
|
185671
|
+
}, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, BUNDLED_MANIFEST, defaultAssetBase = "/fonts/", installedRegistries, DEFAULT_FONT_LOAD_TIMEOUT_MS = 3000, DEFAULT_PROBE_SIZE = "16px", FontRegistry = class {
|
|
185672
|
+
#fontSet;
|
|
185673
|
+
#FontFaceCtor;
|
|
185674
|
+
#probeSize;
|
|
185675
|
+
#scheduleTimeout;
|
|
185676
|
+
#cancelTimeout;
|
|
185677
|
+
#managed = /* @__PURE__ */ new Map;
|
|
185678
|
+
#status = /* @__PURE__ */ new Map;
|
|
185679
|
+
#sources = /* @__PURE__ */ new Map;
|
|
185680
|
+
#warnedFailures = /* @__PURE__ */ new Set;
|
|
185681
|
+
#inflight = /* @__PURE__ */ new Map;
|
|
185682
|
+
#faceStatus = /* @__PURE__ */ new Map;
|
|
185683
|
+
#faceInflight = /* @__PURE__ */ new Map;
|
|
185684
|
+
#faceSources = /* @__PURE__ */ new Map;
|
|
185685
|
+
#facesByFamily = /* @__PURE__ */ new Map;
|
|
185686
|
+
#providerFaceKeys = /* @__PURE__ */ new Set;
|
|
185687
|
+
#warnedFaceFailures = /* @__PURE__ */ new Set;
|
|
185688
|
+
constructor(options = {}) {
|
|
185689
|
+
this.#fontSet = options.fontSet ?? null;
|
|
185690
|
+
this.#FontFaceCtor = options.FontFaceCtor ?? null;
|
|
185691
|
+
this.#probeSize = options.probeSize ?? DEFAULT_PROBE_SIZE;
|
|
185692
|
+
this.#scheduleTimeout = options.scheduleTimeout ?? ((cb, ms) => globalThis.setTimeout(cb, ms));
|
|
185693
|
+
this.#cancelTimeout = options.cancelTimeout ?? ((handle2) => globalThis.clearTimeout(handle2));
|
|
185694
|
+
}
|
|
185695
|
+
register(descriptor) {
|
|
185696
|
+
const { family: family$1, source, descriptors: descriptors2 } = descriptor;
|
|
185697
|
+
const identitySource = typeof source === "string" ? canonicalizeFontSource(source) : source;
|
|
185698
|
+
const weight = normalizeWeight(descriptors2?.weight);
|
|
185699
|
+
const style = normalizeStyle(descriptors2?.style);
|
|
185700
|
+
const key2 = faceKeyOf(family$1, weight, style);
|
|
185701
|
+
if (typeof identitySource === "string") {
|
|
185702
|
+
const existingSource = this.#faceSources.get(key2);
|
|
185703
|
+
if (existingSource === identitySource)
|
|
185704
|
+
return {
|
|
185705
|
+
family: family$1,
|
|
185706
|
+
status: this.getStatus(family$1),
|
|
185707
|
+
changed: false
|
|
185708
|
+
};
|
|
185709
|
+
if (existingSource !== undefined)
|
|
185710
|
+
throw new Error(`[superdoc] font face "${key2}" is already registered from a different source ("${existingSource}"); a registered face's source cannot be replaced`);
|
|
185711
|
+
}
|
|
185712
|
+
if (this.#FontFaceCtor && this.#fontSet) {
|
|
185713
|
+
const face = new this.#FontFaceCtor(family$1, source, {
|
|
185714
|
+
...descriptors2,
|
|
185715
|
+
weight,
|
|
185716
|
+
style
|
|
185717
|
+
});
|
|
185718
|
+
this.#fontSet.add(face);
|
|
185719
|
+
this.#managed.set(family$1, face);
|
|
185720
|
+
}
|
|
185721
|
+
if (typeof source === "string") {
|
|
185722
|
+
const list4 = this.#sources.get(family$1) ?? [];
|
|
185723
|
+
if (!list4.includes(source))
|
|
185724
|
+
list4.push(source);
|
|
185725
|
+
this.#sources.set(family$1, list4);
|
|
185726
|
+
}
|
|
185727
|
+
if (!this.#status.has(family$1))
|
|
185728
|
+
this.#status.set(family$1, "unloaded");
|
|
185729
|
+
this.#providerFaceKeys.add(key2);
|
|
185730
|
+
this.#trackFace(family$1, key2);
|
|
185731
|
+
if (!this.#faceStatus.has(key2))
|
|
185732
|
+
this.#faceStatus.set(key2, "unloaded");
|
|
185733
|
+
if (typeof identitySource === "string" && !this.#faceSources.has(key2))
|
|
185734
|
+
this.#faceSources.set(key2, identitySource);
|
|
185735
|
+
return {
|
|
185736
|
+
family: family$1,
|
|
185737
|
+
status: this.getStatus(family$1),
|
|
185738
|
+
changed: true
|
|
185739
|
+
};
|
|
185740
|
+
}
|
|
185741
|
+
#trackFace(family$1, key2) {
|
|
185742
|
+
const fam = normalizeFamilyKey(family$1);
|
|
185743
|
+
const set = this.#facesByFamily.get(fam) ?? /* @__PURE__ */ new Set;
|
|
185744
|
+
set.add(key2);
|
|
185745
|
+
this.#facesByFamily.set(fam, set);
|
|
185746
|
+
}
|
|
185747
|
+
isManaged(family$1) {
|
|
185748
|
+
return this.#managed.has(family$1);
|
|
185749
|
+
}
|
|
185750
|
+
getStatus(family$1) {
|
|
185751
|
+
const statuses = [];
|
|
185752
|
+
const faceKeys = this.#facesByFamily.get(normalizeFamilyKey(family$1));
|
|
185753
|
+
if (faceKeys)
|
|
185754
|
+
for (const k of faceKeys)
|
|
185755
|
+
statuses.push(this.#faceStatus.get(k) ?? "unloaded");
|
|
185756
|
+
const legacy = this.#status.get(family$1);
|
|
185757
|
+
if (legacy)
|
|
185758
|
+
statuses.push(legacy);
|
|
185759
|
+
if (statuses.length === 0)
|
|
185760
|
+
return "unloaded";
|
|
185761
|
+
for (const s of [
|
|
185762
|
+
"failed",
|
|
185763
|
+
"timed_out",
|
|
185764
|
+
"fallback_used",
|
|
185765
|
+
"loaded",
|
|
185766
|
+
"loading",
|
|
185767
|
+
"unloaded"
|
|
185768
|
+
])
|
|
185769
|
+
if (statuses.includes(s))
|
|
185770
|
+
return s;
|
|
185771
|
+
return "unloaded";
|
|
185772
|
+
}
|
|
185773
|
+
hasFace(family$1, weight, style) {
|
|
185774
|
+
const key2 = faceKeyOf(family$1, weight, style);
|
|
185775
|
+
return this.#providerFaceKeys.has(key2) && this.#faceStatus.get(key2) !== "failed";
|
|
185776
|
+
}
|
|
185777
|
+
isAvailable(family$1) {
|
|
185778
|
+
if (!this.#fontSet)
|
|
185779
|
+
return false;
|
|
185780
|
+
try {
|
|
185781
|
+
return this.#fontSet.check(`${this.#probeSize} ${quoteFamily(family$1)}`);
|
|
185782
|
+
} catch {
|
|
185783
|
+
return false;
|
|
185784
|
+
}
|
|
185785
|
+
}
|
|
185786
|
+
awaitFace(family$1, timeoutMs = DEFAULT_FONT_LOAD_TIMEOUT_MS) {
|
|
185787
|
+
if (this.#status.get(family$1) === "loaded")
|
|
185788
|
+
return Promise.resolve({
|
|
185789
|
+
family: family$1,
|
|
185790
|
+
status: "loaded"
|
|
185791
|
+
});
|
|
185792
|
+
const existing = this.#inflight.get(family$1);
|
|
185793
|
+
if (existing)
|
|
185794
|
+
return existing;
|
|
185795
|
+
const probe = this.#loadOne(family$1, timeoutMs).finally(() => {
|
|
185796
|
+
this.#inflight.delete(family$1);
|
|
185797
|
+
});
|
|
185798
|
+
this.#inflight.set(family$1, probe);
|
|
185799
|
+
return probe;
|
|
185800
|
+
}
|
|
185801
|
+
async awaitFaces(families, options = {}) {
|
|
185802
|
+
const unique = [...new Set(families)];
|
|
185803
|
+
const timeoutMs = options.timeoutMs ?? 3000;
|
|
185804
|
+
return Promise.all(unique.map((family$1) => this.awaitFace(family$1, timeoutMs)));
|
|
185805
|
+
}
|
|
185806
|
+
getRequiredFaces(families, timeoutMs = DEFAULT_FONT_LOAD_TIMEOUT_MS) {
|
|
185807
|
+
return [...new Set(families)].map((family$1) => ({
|
|
185808
|
+
family: family$1,
|
|
185809
|
+
status: this.getStatus(family$1),
|
|
185810
|
+
ready: this.awaitFace(family$1, timeoutMs)
|
|
185811
|
+
}));
|
|
185812
|
+
}
|
|
185813
|
+
getStates() {
|
|
185814
|
+
return [...this.#status.entries()].map(([family$1, status]) => ({
|
|
185815
|
+
family: family$1,
|
|
185816
|
+
status
|
|
185817
|
+
}));
|
|
185818
|
+
}
|
|
185819
|
+
getFaceStatus(request) {
|
|
185820
|
+
return this.#faceStatus.get(faceKeyOf(request.family, request.weight, request.style)) ?? "unloaded";
|
|
185821
|
+
}
|
|
185822
|
+
awaitFaceRequest(request, timeoutMs = DEFAULT_FONT_LOAD_TIMEOUT_MS) {
|
|
185823
|
+
const key2 = faceKeyOf(request.family, request.weight, request.style);
|
|
185824
|
+
if (this.#faceStatus.get(key2) === "loaded")
|
|
185825
|
+
return Promise.resolve({
|
|
185826
|
+
request,
|
|
185827
|
+
status: "loaded"
|
|
185828
|
+
});
|
|
185829
|
+
const existing = this.#faceInflight.get(key2);
|
|
185830
|
+
if (existing)
|
|
185831
|
+
return existing;
|
|
185832
|
+
const probe = this.#loadOneFace(request, key2, timeoutMs).finally(() => {
|
|
185833
|
+
this.#faceInflight.delete(key2);
|
|
185834
|
+
});
|
|
185835
|
+
this.#faceInflight.set(key2, probe);
|
|
185836
|
+
return probe;
|
|
185837
|
+
}
|
|
185838
|
+
async awaitFaceRequests(requests, options = {}) {
|
|
185839
|
+
const timeoutMs = options.timeoutMs ?? 3000;
|
|
185840
|
+
const seen = /* @__PURE__ */ new Set;
|
|
185841
|
+
const unique = [];
|
|
185842
|
+
for (const r of requests) {
|
|
185843
|
+
const key2 = faceKeyOf(r.family, r.weight, r.style);
|
|
185844
|
+
if (seen.has(key2))
|
|
185845
|
+
continue;
|
|
185846
|
+
seen.add(key2);
|
|
185847
|
+
unique.push(r);
|
|
185848
|
+
}
|
|
185849
|
+
return Promise.all(unique.map((r) => this.awaitFaceRequest(r, timeoutMs)));
|
|
185850
|
+
}
|
|
185851
|
+
async#loadOneFace(request, key2, timeoutMs) {
|
|
185852
|
+
this.#trackFace(request.family, key2);
|
|
185853
|
+
const fontSet = this.#fontSet;
|
|
185854
|
+
if (!fontSet) {
|
|
185855
|
+
this.#faceStatus.set(key2, "fallback_used");
|
|
185856
|
+
return {
|
|
185857
|
+
request,
|
|
185858
|
+
status: "fallback_used"
|
|
185859
|
+
};
|
|
185860
|
+
}
|
|
185861
|
+
this.#faceStatus.set(key2, "loading");
|
|
185862
|
+
const probe = faceProbe(request.family, request.weight, request.style, this.#probeSize);
|
|
185863
|
+
const TIMEOUT = Symbol("timeout");
|
|
185864
|
+
let handle2;
|
|
185865
|
+
const timeout = new Promise((resolve2) => {
|
|
185866
|
+
handle2 = this.#scheduleTimeout(() => resolve2(TIMEOUT), timeoutMs);
|
|
185867
|
+
});
|
|
185868
|
+
try {
|
|
185869
|
+
const settled = await Promise.race([fontSet.load(probe), timeout]);
|
|
185870
|
+
if (settled === TIMEOUT) {
|
|
185871
|
+
this.#faceStatus.set(key2, "timed_out");
|
|
185872
|
+
return {
|
|
185873
|
+
request,
|
|
185874
|
+
status: "timed_out"
|
|
185875
|
+
};
|
|
185876
|
+
}
|
|
185877
|
+
const status = settled.length > 0 ? "loaded" : "fallback_used";
|
|
185878
|
+
this.#faceStatus.set(key2, status);
|
|
185879
|
+
return {
|
|
185880
|
+
request,
|
|
185881
|
+
status
|
|
185882
|
+
};
|
|
185883
|
+
} catch {
|
|
185884
|
+
this.#faceStatus.set(key2, "failed");
|
|
185885
|
+
this.#warnFaceFailureOnce(request, key2);
|
|
185886
|
+
return {
|
|
185887
|
+
request,
|
|
185888
|
+
status: "failed"
|
|
185889
|
+
};
|
|
185890
|
+
} finally {
|
|
185891
|
+
this.#cancelTimeout(handle2);
|
|
185892
|
+
}
|
|
185893
|
+
}
|
|
185894
|
+
#warnFaceFailureOnce(request, key2) {
|
|
185895
|
+
if (this.#warnedFaceFailures.has(key2))
|
|
185896
|
+
return;
|
|
185897
|
+
this.#warnedFaceFailures.add(key2);
|
|
185898
|
+
const src = this.#faceSources.get(key2);
|
|
185899
|
+
const detail = src ? ` from ${src}` : "";
|
|
185900
|
+
console.warn(`[superdoc] font face failed to load: "${request.family}" ${request.weight} ${request.style}${detail}. Check fonts.assetBaseUrl / fonts.resolveAssetUrl so the bundled .woff2 are served.`);
|
|
185901
|
+
}
|
|
185902
|
+
async#loadOne(family$1, timeoutMs) {
|
|
185903
|
+
const fontSet = this.#fontSet;
|
|
185904
|
+
if (!fontSet) {
|
|
185905
|
+
this.#status.set(family$1, "fallback_used");
|
|
185906
|
+
return {
|
|
185907
|
+
family: family$1,
|
|
185908
|
+
status: "fallback_used"
|
|
185909
|
+
};
|
|
185910
|
+
}
|
|
185911
|
+
this.#status.set(family$1, "loading");
|
|
185912
|
+
const probe = `${this.#probeSize} ${quoteFamily(family$1)}`;
|
|
185913
|
+
const TIMEOUT = Symbol("timeout");
|
|
185914
|
+
let handle2;
|
|
185915
|
+
const timeout = new Promise((resolve2) => {
|
|
185916
|
+
handle2 = this.#scheduleTimeout(() => resolve2(TIMEOUT), timeoutMs);
|
|
185917
|
+
});
|
|
185918
|
+
try {
|
|
185919
|
+
const settled = await Promise.race([fontSet.load(probe), timeout]);
|
|
185920
|
+
if (settled === TIMEOUT) {
|
|
185921
|
+
this.#status.set(family$1, "timed_out");
|
|
185922
|
+
return {
|
|
185923
|
+
family: family$1,
|
|
185924
|
+
status: "timed_out"
|
|
185925
|
+
};
|
|
185926
|
+
}
|
|
185927
|
+
const status = settled.length > 0 ? "loaded" : "fallback_used";
|
|
185928
|
+
this.#status.set(family$1, status);
|
|
185929
|
+
return {
|
|
185930
|
+
family: family$1,
|
|
185931
|
+
status
|
|
185932
|
+
};
|
|
185933
|
+
} catch {
|
|
185934
|
+
this.#status.set(family$1, "failed");
|
|
185935
|
+
this.#warnLoadFailureOnce(family$1);
|
|
185936
|
+
return {
|
|
185937
|
+
family: family$1,
|
|
185938
|
+
status: "failed"
|
|
185939
|
+
};
|
|
185940
|
+
} finally {
|
|
185941
|
+
this.#cancelTimeout(handle2);
|
|
185942
|
+
}
|
|
185943
|
+
}
|
|
185944
|
+
#warnLoadFailureOnce(family$1) {
|
|
185945
|
+
if (this.#warnedFailures.has(family$1))
|
|
185946
|
+
return;
|
|
185947
|
+
this.#warnedFailures.add(family$1);
|
|
185948
|
+
const sources = this.#sources.get(family$1);
|
|
185949
|
+
const detail = sources && sources.length ? ` from ${sources.join(", ")}` : "";
|
|
185950
|
+
console.warn(`[superdoc] font asset failed to load for "${family$1}"${detail}. Check fonts.assetBaseUrl / fonts.resolveAssetUrl so the bundled .woff2 are served.`);
|
|
185951
|
+
}
|
|
185952
|
+
}, registriesByFontSet, domlessRegistry = null, PHYSICAL_GENERIC, BUNDLED_FAMILIES, FONT_OFFERINGS, DEFAULT_FONT_ORDER, headlessToolbarConstants, MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
185953
|
+
var init_create_super_doc_ui_tVaowTvG_es = __esm(() => {
|
|
185954
|
+
init_SuperConverter_bEQ45IUD_es();
|
|
185955
|
+
init_create_headless_toolbar_BmFWtej0_es();
|
|
185956
|
+
SETTLED_STATUSES = [
|
|
185957
|
+
"loaded",
|
|
185958
|
+
"failed",
|
|
185959
|
+
"timed_out",
|
|
185960
|
+
"fallback_used"
|
|
185961
|
+
];
|
|
185962
|
+
SUBSTITUTION_EVIDENCE = Object.freeze([
|
|
185963
|
+
{
|
|
185964
|
+
evidenceId: "calibri",
|
|
185965
|
+
logicalFamily: "Calibri",
|
|
185966
|
+
physicalFamily: "Carlito",
|
|
185967
|
+
verdict: "metric_safe",
|
|
185968
|
+
faces: {
|
|
185969
|
+
regular: true,
|
|
185970
|
+
bold: true,
|
|
185971
|
+
italic: true,
|
|
185972
|
+
boldItalic: true
|
|
185973
|
+
},
|
|
185974
|
+
advance: {
|
|
185975
|
+
meanDelta: 0,
|
|
185976
|
+
maxDelta: 0
|
|
185977
|
+
},
|
|
185978
|
+
gates: {
|
|
185979
|
+
static: "pass",
|
|
185980
|
+
metric: "pass",
|
|
185981
|
+
layout: "pass",
|
|
185982
|
+
ship: "pass"
|
|
185983
|
+
},
|
|
185984
|
+
policyAction: "substitute",
|
|
185985
|
+
measurementRefs: ["calibri__carlito#analytic_advance#2026-06-03", "calibri__carlito#face_aggregate#2026-06-03"],
|
|
185986
|
+
candidateLicense: "OFL-1.1",
|
|
185987
|
+
exportRule: "preserve_original_name"
|
|
185988
|
+
},
|
|
185989
|
+
{
|
|
185990
|
+
evidenceId: "cambria",
|
|
185991
|
+
logicalFamily: "Cambria",
|
|
185992
|
+
physicalFamily: "Caladea",
|
|
185993
|
+
verdict: "visual_only",
|
|
185994
|
+
faceVerdicts: {
|
|
185995
|
+
regular: "metric_safe",
|
|
185996
|
+
bold: "metric_safe",
|
|
185997
|
+
italic: "metric_safe",
|
|
185998
|
+
boldItalic: "visual_only"
|
|
185999
|
+
},
|
|
186000
|
+
glyphExceptions: [{
|
|
186001
|
+
slot: "boldItalic",
|
|
186002
|
+
codepoint: 96,
|
|
186003
|
+
advanceDelta: 0.231,
|
|
186004
|
+
note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow."
|
|
186005
|
+
}],
|
|
186006
|
+
faces: {
|
|
186007
|
+
regular: true,
|
|
186008
|
+
bold: true,
|
|
186009
|
+
italic: true,
|
|
186010
|
+
boldItalic: true
|
|
186011
|
+
},
|
|
186012
|
+
advance: {
|
|
186013
|
+
meanDelta: 0.0002378,
|
|
186014
|
+
maxDelta: 0.2310758
|
|
186015
|
+
},
|
|
186016
|
+
gates: {
|
|
186017
|
+
static: "pass",
|
|
186018
|
+
metric: "pass",
|
|
186019
|
+
layout: "not_run",
|
|
186020
|
+
ship: "pass"
|
|
186021
|
+
},
|
|
186022
|
+
policyAction: "substitute",
|
|
186023
|
+
measurementRefs: [
|
|
186024
|
+
"cambria_regular__caladea#regular#w400#d2f6cad3#analytic_advance#2026-06-04",
|
|
186025
|
+
"cambria_bold__caladea#bold#w700#74eda4fc#analytic_advance#2026-06-04",
|
|
186026
|
+
"cambria_italic__caladea#italic#w400#9c968bf6#analytic_advance#2026-06-04",
|
|
186027
|
+
"cambria_boldItalic__caladea#boldItalic#w700#f47a35ad#analytic_advance#2026-06-04"
|
|
186028
|
+
],
|
|
186029
|
+
candidateLicense: "Apache-2.0",
|
|
186030
|
+
exportRule: "preserve_original_name"
|
|
186031
|
+
},
|
|
186032
|
+
{
|
|
186033
|
+
evidenceId: "arial",
|
|
186034
|
+
logicalFamily: "Arial",
|
|
186035
|
+
physicalFamily: "Liberation Sans",
|
|
186036
|
+
verdict: "metric_safe",
|
|
186037
|
+
faces: {
|
|
186038
|
+
regular: true,
|
|
186039
|
+
bold: true,
|
|
186040
|
+
italic: true,
|
|
186041
|
+
boldItalic: true
|
|
186042
|
+
},
|
|
186043
|
+
advance: {
|
|
186044
|
+
meanDelta: 0,
|
|
186045
|
+
maxDelta: 0
|
|
186046
|
+
},
|
|
186047
|
+
gates: {
|
|
186048
|
+
static: "pass",
|
|
186049
|
+
metric: "pass",
|
|
186050
|
+
layout: "not_run",
|
|
186051
|
+
ship: "pass"
|
|
186052
|
+
},
|
|
186053
|
+
policyAction: "substitute",
|
|
186054
|
+
measurementRefs: ["arial__liberation-sans#analytic_advance#2026-06-03"],
|
|
186055
|
+
candidateLicense: "OFL-1.1",
|
|
186056
|
+
exportRule: "preserve_original_name"
|
|
186057
|
+
},
|
|
186058
|
+
{
|
|
186059
|
+
evidenceId: "times-new-roman",
|
|
186060
|
+
logicalFamily: "Times New Roman",
|
|
186061
|
+
physicalFamily: "Liberation Serif",
|
|
186062
|
+
verdict: "metric_safe",
|
|
186063
|
+
faces: {
|
|
186064
|
+
regular: true,
|
|
186065
|
+
bold: true,
|
|
186066
|
+
italic: true,
|
|
186067
|
+
boldItalic: true
|
|
186068
|
+
},
|
|
186069
|
+
advance: {
|
|
186070
|
+
meanDelta: 0,
|
|
186071
|
+
maxDelta: 0
|
|
186072
|
+
},
|
|
186073
|
+
gates: {
|
|
186074
|
+
static: "pass",
|
|
186075
|
+
metric: "pass",
|
|
186076
|
+
layout: "not_run",
|
|
186077
|
+
ship: "pass"
|
|
186078
|
+
},
|
|
186079
|
+
policyAction: "substitute",
|
|
186080
|
+
measurementRefs: ["times-new-roman__liberation-serif#analytic_advance#2026-06-03"],
|
|
186081
|
+
candidateLicense: "OFL-1.1",
|
|
186082
|
+
exportRule: "preserve_original_name"
|
|
186083
|
+
},
|
|
186084
|
+
{
|
|
186085
|
+
evidenceId: "courier-new",
|
|
186086
|
+
logicalFamily: "Courier New",
|
|
186087
|
+
physicalFamily: "Liberation Mono",
|
|
186088
|
+
verdict: "metric_safe",
|
|
186089
|
+
faces: {
|
|
186090
|
+
regular: true,
|
|
186091
|
+
bold: true,
|
|
186092
|
+
italic: true,
|
|
186093
|
+
boldItalic: true
|
|
186094
|
+
},
|
|
186095
|
+
advance: {
|
|
186096
|
+
meanDelta: 0,
|
|
186097
|
+
maxDelta: 0
|
|
186098
|
+
},
|
|
186099
|
+
gates: {
|
|
186100
|
+
static: "pass",
|
|
186101
|
+
metric: "pass",
|
|
186102
|
+
layout: "not_run",
|
|
186103
|
+
ship: "pass"
|
|
186104
|
+
},
|
|
186105
|
+
policyAction: "substitute",
|
|
186106
|
+
measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
|
|
186107
|
+
candidateLicense: "OFL-1.1",
|
|
186108
|
+
exportRule: "preserve_original_name"
|
|
186109
|
+
},
|
|
186110
|
+
{
|
|
186111
|
+
evidenceId: "helvetica",
|
|
186112
|
+
logicalFamily: "Helvetica",
|
|
186113
|
+
physicalFamily: "Liberation Sans",
|
|
186114
|
+
verdict: "metric_safe",
|
|
186115
|
+
faces: {
|
|
186116
|
+
regular: true,
|
|
186117
|
+
bold: true,
|
|
186118
|
+
italic: true,
|
|
186119
|
+
boldItalic: true
|
|
186120
|
+
},
|
|
186121
|
+
advance: {
|
|
186122
|
+
meanDelta: 0,
|
|
186123
|
+
maxDelta: 0
|
|
186124
|
+
},
|
|
186125
|
+
gates: {
|
|
186126
|
+
static: "not_run",
|
|
186127
|
+
metric: "pass",
|
|
186128
|
+
layout: "not_run",
|
|
186129
|
+
ship: "fail"
|
|
186130
|
+
},
|
|
186131
|
+
policyAction: "substitute",
|
|
186132
|
+
measurementRefs: ["helvetica__liberation-sans#analytic_advance#2026-06-03"],
|
|
186133
|
+
candidateLicense: "OFL-1.1",
|
|
186134
|
+
exportRule: "preserve_original_name"
|
|
186135
|
+
},
|
|
186136
|
+
{
|
|
186137
|
+
evidenceId: "calibri-light",
|
|
186138
|
+
logicalFamily: "Calibri Light",
|
|
186139
|
+
physicalFamily: "Carlito",
|
|
186140
|
+
verdict: "visual_only",
|
|
186141
|
+
faces: {
|
|
186142
|
+
regular: false,
|
|
186143
|
+
bold: false,
|
|
186144
|
+
italic: false,
|
|
186145
|
+
boldItalic: false
|
|
186146
|
+
},
|
|
186147
|
+
advance: {
|
|
186148
|
+
meanDelta: 0.0148,
|
|
186149
|
+
maxDelta: 0.066
|
|
186150
|
+
},
|
|
186151
|
+
gates: {
|
|
186152
|
+
static: "not_run",
|
|
186153
|
+
metric: "fail",
|
|
186154
|
+
layout: "not_run",
|
|
186155
|
+
ship: "fail"
|
|
186156
|
+
},
|
|
186157
|
+
policyAction: "category_fallback",
|
|
186158
|
+
measurementRefs: ["calibri-light__carlito#analytic_advance#2026-06-05"],
|
|
186159
|
+
candidateLicense: "OFL-1.1",
|
|
186160
|
+
exportRule: "preserve_original_name"
|
|
186161
|
+
}
|
|
186162
|
+
]);
|
|
186163
|
+
BUNDLED_SUBSTITUTES = deriveBundledSubstitutes();
|
|
186164
|
+
CATEGORY_FALLBACKS = deriveCategoryFallbacks();
|
|
186165
|
+
defaultResolver = new FontResolver;
|
|
186166
|
+
DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
|
|
186167
|
+
resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
|
|
186168
|
+
fontSignature: ""
|
|
186169
|
+
});
|
|
186170
|
+
BUNDLED_MANIFEST = Object.freeze([
|
|
186171
|
+
family("Carlito", "Carlito", "OFL-1.1"),
|
|
186172
|
+
family("Caladea", "Caladea", "Apache-2.0"),
|
|
186173
|
+
family("Liberation Sans", "LiberationSans", "OFL-1.1"),
|
|
186174
|
+
family("Liberation Serif", "LiberationSerif", "OFL-1.1"),
|
|
186175
|
+
family("Liberation Mono", "LiberationMono", "OFL-1.1")
|
|
186176
|
+
]);
|
|
186177
|
+
installedRegistries = /* @__PURE__ */ new WeakMap;
|
|
186178
|
+
registriesByFontSet = /* @__PURE__ */ new WeakMap;
|
|
186179
|
+
PHYSICAL_GENERIC = Object.freeze({
|
|
186180
|
+
Carlito: "sans-serif",
|
|
186181
|
+
Caladea: "serif",
|
|
186182
|
+
"Liberation Sans": "sans-serif",
|
|
186183
|
+
"Liberation Serif": "serif",
|
|
186184
|
+
"Liberation Mono": "monospace"
|
|
186185
|
+
});
|
|
186186
|
+
BUNDLED_FAMILIES = new Set(BUNDLED_MANIFEST.map((f2) => f2.family));
|
|
186187
|
+
FONT_OFFERINGS = deriveOfferings();
|
|
186188
|
+
DEFAULT_FONT_ORDER = [
|
|
186189
|
+
"Calibri",
|
|
186190
|
+
"Arial",
|
|
186191
|
+
"Courier New",
|
|
186192
|
+
"Times New Roman",
|
|
186193
|
+
"Helvetica"
|
|
186194
|
+
];
|
|
186195
|
+
headlessToolbarConstants = {
|
|
186196
|
+
DEFAULT_TEXT_ALIGN_OPTIONS: [
|
|
186197
|
+
{
|
|
186198
|
+
label: "Left",
|
|
186199
|
+
value: "left"
|
|
186200
|
+
},
|
|
186201
|
+
{
|
|
186202
|
+
label: "Center",
|
|
186203
|
+
value: "center"
|
|
186204
|
+
},
|
|
186205
|
+
{
|
|
186206
|
+
label: "Right",
|
|
186207
|
+
value: "right"
|
|
186208
|
+
},
|
|
186209
|
+
{
|
|
186210
|
+
label: "Justify",
|
|
186211
|
+
value: "justify"
|
|
186212
|
+
}
|
|
186213
|
+
],
|
|
186214
|
+
DEFAULT_LINE_HEIGHT_OPTIONS: [
|
|
186215
|
+
{
|
|
186216
|
+
label: "1.00",
|
|
186217
|
+
value: 1
|
|
186218
|
+
},
|
|
186219
|
+
{
|
|
186220
|
+
label: "1.15",
|
|
186221
|
+
value: 1.15
|
|
186222
|
+
},
|
|
186223
|
+
{
|
|
186224
|
+
label: "1.50",
|
|
186225
|
+
value: 1.5
|
|
186226
|
+
},
|
|
186227
|
+
{
|
|
186228
|
+
label: "2.00",
|
|
186229
|
+
value: 2
|
|
186230
|
+
},
|
|
186231
|
+
{
|
|
186232
|
+
label: "2.50",
|
|
186233
|
+
value: 2.5
|
|
186234
|
+
},
|
|
186235
|
+
{
|
|
186236
|
+
label: "3.00",
|
|
186237
|
+
value: 3
|
|
186238
|
+
}
|
|
186239
|
+
],
|
|
186240
|
+
DEFAULT_ZOOM_OPTIONS: [
|
|
186241
|
+
{
|
|
186242
|
+
label: "50%",
|
|
186243
|
+
value: 50
|
|
186244
|
+
},
|
|
186245
|
+
{
|
|
186246
|
+
label: "75%",
|
|
186247
|
+
value: 75
|
|
186248
|
+
},
|
|
186249
|
+
{
|
|
186250
|
+
label: "90%",
|
|
186251
|
+
value: 90
|
|
186252
|
+
},
|
|
186253
|
+
{
|
|
186254
|
+
label: "100%",
|
|
186255
|
+
value: 100
|
|
186256
|
+
},
|
|
186257
|
+
{
|
|
186258
|
+
label: "125%",
|
|
186259
|
+
value: 125
|
|
186260
|
+
},
|
|
186261
|
+
{
|
|
186262
|
+
label: "150%",
|
|
186263
|
+
value: 150
|
|
186264
|
+
},
|
|
186265
|
+
{
|
|
186266
|
+
label: "200%",
|
|
186267
|
+
value: 200
|
|
186268
|
+
}
|
|
186269
|
+
],
|
|
186270
|
+
DEFAULT_DOCUMENT_MODE_OPTIONS: [
|
|
186271
|
+
{
|
|
186272
|
+
label: "Editing",
|
|
186273
|
+
value: "editing",
|
|
186274
|
+
description: "Edit document directly"
|
|
186275
|
+
},
|
|
186276
|
+
{
|
|
186277
|
+
label: "Suggesting",
|
|
186278
|
+
value: "suggesting",
|
|
186279
|
+
description: "Edits become suggestions"
|
|
186280
|
+
},
|
|
186281
|
+
{
|
|
186282
|
+
label: "Viewing",
|
|
186283
|
+
value: "viewing",
|
|
186284
|
+
description: "View clean version of document only"
|
|
186285
|
+
}
|
|
186286
|
+
],
|
|
186287
|
+
DEFAULT_FONT_SIZE_OPTIONS: [
|
|
186288
|
+
{
|
|
186289
|
+
label: "8",
|
|
186290
|
+
value: "8pt"
|
|
186291
|
+
},
|
|
186292
|
+
{
|
|
186293
|
+
label: "9",
|
|
186294
|
+
value: "9pt"
|
|
186295
|
+
},
|
|
186296
|
+
{
|
|
186297
|
+
label: "10",
|
|
186298
|
+
value: "10pt"
|
|
186299
|
+
},
|
|
186300
|
+
{
|
|
186301
|
+
label: "11",
|
|
186302
|
+
value: "11pt"
|
|
186303
|
+
},
|
|
186304
|
+
{
|
|
186305
|
+
label: "12",
|
|
186306
|
+
value: "12pt"
|
|
186307
|
+
},
|
|
186308
|
+
{
|
|
186309
|
+
label: "14",
|
|
186310
|
+
value: "14pt"
|
|
186311
|
+
},
|
|
186312
|
+
{
|
|
186313
|
+
label: "18",
|
|
186314
|
+
value: "18pt"
|
|
186315
|
+
},
|
|
186316
|
+
{
|
|
186317
|
+
label: "24",
|
|
186318
|
+
value: "24pt"
|
|
186319
|
+
},
|
|
186320
|
+
{
|
|
186321
|
+
label: "30",
|
|
186322
|
+
value: "30pt"
|
|
186323
|
+
},
|
|
186324
|
+
{
|
|
186325
|
+
label: "36",
|
|
186326
|
+
value: "36pt"
|
|
186327
|
+
},
|
|
186328
|
+
{
|
|
186329
|
+
label: "48",
|
|
186330
|
+
value: "48pt"
|
|
186331
|
+
},
|
|
186332
|
+
{
|
|
186333
|
+
label: "60",
|
|
186334
|
+
value: "60pt"
|
|
186335
|
+
},
|
|
186336
|
+
{
|
|
186337
|
+
label: "72",
|
|
186338
|
+
value: "72pt"
|
|
186339
|
+
},
|
|
186340
|
+
{
|
|
186341
|
+
label: "96",
|
|
186342
|
+
value: "96pt"
|
|
186343
|
+
}
|
|
186344
|
+
],
|
|
186345
|
+
DEFAULT_FONT_FAMILY_OPTIONS: getDefaultFontFamilyOptions(),
|
|
186346
|
+
DEFAULT_TEXT_COLOR_OPTIONS: [
|
|
186347
|
+
{
|
|
186348
|
+
label: "Black",
|
|
186349
|
+
value: "#000000"
|
|
186350
|
+
},
|
|
186351
|
+
{
|
|
186352
|
+
label: "Dark Gray",
|
|
186353
|
+
value: "#434343"
|
|
186354
|
+
},
|
|
186355
|
+
{
|
|
186356
|
+
label: "Gray",
|
|
186357
|
+
value: "#666666"
|
|
186358
|
+
},
|
|
186359
|
+
{
|
|
186360
|
+
label: "Light Gray",
|
|
186361
|
+
value: "#999999"
|
|
186362
|
+
},
|
|
186363
|
+
{
|
|
186364
|
+
label: "Red",
|
|
186365
|
+
value: "#ff0000"
|
|
186366
|
+
},
|
|
186367
|
+
{
|
|
186368
|
+
label: "Orange",
|
|
186369
|
+
value: "#ff9900"
|
|
186370
|
+
},
|
|
186371
|
+
{
|
|
186372
|
+
label: "Yellow",
|
|
186373
|
+
value: "#ffff00"
|
|
186374
|
+
},
|
|
186375
|
+
{
|
|
186376
|
+
label: "Green",
|
|
186377
|
+
value: "#00ff00"
|
|
186378
|
+
},
|
|
186379
|
+
{
|
|
186380
|
+
label: "Cyan",
|
|
186381
|
+
value: "#00ffff"
|
|
186382
|
+
},
|
|
186383
|
+
{
|
|
186384
|
+
label: "Blue",
|
|
186385
|
+
value: "#0000ff"
|
|
186386
|
+
},
|
|
186387
|
+
{
|
|
186388
|
+
label: "Purple",
|
|
186389
|
+
value: "#9900ff"
|
|
186390
|
+
},
|
|
186391
|
+
{
|
|
186392
|
+
label: "Magenta",
|
|
186393
|
+
value: "#ff00ff"
|
|
186394
|
+
},
|
|
186395
|
+
{
|
|
186396
|
+
label: "None",
|
|
186397
|
+
value: "none"
|
|
186398
|
+
}
|
|
186399
|
+
],
|
|
186400
|
+
DEFAULT_HIGHLIGHT_COLOR_OPTIONS: [
|
|
186401
|
+
{
|
|
186402
|
+
label: "Yellow",
|
|
186403
|
+
value: "#ffff00"
|
|
186404
|
+
},
|
|
186405
|
+
{
|
|
186406
|
+
label: "Green",
|
|
186407
|
+
value: "#00ff00"
|
|
186408
|
+
},
|
|
186409
|
+
{
|
|
186410
|
+
label: "Cyan",
|
|
186411
|
+
value: "#00ffff"
|
|
186412
|
+
},
|
|
186413
|
+
{
|
|
186414
|
+
label: "Pink",
|
|
186415
|
+
value: "#ff00ff"
|
|
186416
|
+
},
|
|
186417
|
+
{
|
|
186418
|
+
label: "Blue",
|
|
186419
|
+
value: "#0000ff"
|
|
186420
|
+
},
|
|
186421
|
+
{
|
|
186422
|
+
label: "Red",
|
|
186423
|
+
value: "#ff0000"
|
|
186424
|
+
},
|
|
186425
|
+
{
|
|
186426
|
+
label: "Orange",
|
|
186427
|
+
value: "#ff9900"
|
|
186428
|
+
},
|
|
186429
|
+
{
|
|
186430
|
+
label: "None",
|
|
186431
|
+
value: "none"
|
|
186432
|
+
}
|
|
186433
|
+
]
|
|
186434
|
+
};
|
|
186435
|
+
MOD_ALIASES = new Set([
|
|
186436
|
+
"Mod",
|
|
186437
|
+
"Meta",
|
|
186438
|
+
"Cmd",
|
|
186439
|
+
"Command"
|
|
186440
|
+
]);
|
|
186441
|
+
ALT_ALIASES = new Set(["Alt", "Option"]);
|
|
186442
|
+
CTRL_ALIASES = new Set(["Control", "Ctrl"]);
|
|
186443
|
+
SHIFT_ALIASES = new Set(["Shift"]);
|
|
186444
|
+
BUILTIN_CONTEXT_MENU_GROUPS = [
|
|
186445
|
+
"format",
|
|
186446
|
+
"clipboard",
|
|
186447
|
+
"review",
|
|
186448
|
+
"comment",
|
|
186449
|
+
"link"
|
|
186450
|
+
];
|
|
186451
|
+
BUILTIN_GROUP_ORDER = new Map(BUILTIN_CONTEXT_MENU_GROUPS.map((g2, i4) => [g2, i4]));
|
|
186452
|
+
RESERVED_PROXY_PROPERTY_NAMES = new Set([
|
|
186453
|
+
"register",
|
|
186454
|
+
"get",
|
|
186455
|
+
"has",
|
|
186456
|
+
"require",
|
|
186457
|
+
"getContextMenuItems"
|
|
186458
|
+
]);
|
|
186459
|
+
ALL_TOOLBAR_COMMAND_IDS = Object.keys(createToolbarRegistry());
|
|
186460
|
+
EMPTY_ACTIVE_IDS = Object.freeze([]);
|
|
186461
|
+
});
|
|
186462
|
+
|
|
185238
186463
|
// ../../packages/superdoc/dist/chunks/eventemitter3-BnGqBE-Q.es.js
|
|
185239
186464
|
var import_eventemitter3;
|
|
185240
186465
|
var init_eventemitter3_BnGqBE_Q_es = __esm(() => {
|
|
@@ -185632,12 +186857,12 @@ var require_shared_cjs = __commonJS((exports) => {
|
|
|
185632
186857
|
return res.join(`
|
|
185633
186858
|
`);
|
|
185634
186859
|
}
|
|
185635
|
-
function
|
|
186860
|
+
function normalizeStyle2(value) {
|
|
185636
186861
|
if (isArray2(value)) {
|
|
185637
186862
|
const res = {};
|
|
185638
186863
|
for (let i4 = 0;i4 < value.length; i4++) {
|
|
185639
186864
|
const item = value[i4];
|
|
185640
|
-
const normalized = isString(item) ? parseStringStyle(item) :
|
|
186865
|
+
const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle2(item);
|
|
185641
186866
|
if (normalized) {
|
|
185642
186867
|
for (const key2 in normalized) {
|
|
185643
186868
|
res[key2] = normalized[key2];
|
|
@@ -185705,7 +186930,7 @@ var require_shared_cjs = __commonJS((exports) => {
|
|
|
185705
186930
|
props.class = normalizeClass(klass);
|
|
185706
186931
|
}
|
|
185707
186932
|
if (style) {
|
|
185708
|
-
props.style =
|
|
186933
|
+
props.style = normalizeStyle2(style);
|
|
185709
186934
|
}
|
|
185710
186935
|
return props;
|
|
185711
186936
|
}
|
|
@@ -185955,7 +187180,7 @@ var require_shared_cjs = __commonJS((exports) => {
|
|
|
185955
187180
|
exports.normalizeClass = normalizeClass;
|
|
185956
187181
|
exports.normalizeCssVarValue = normalizeCssVarValue;
|
|
185957
187182
|
exports.normalizeProps = normalizeProps;
|
|
185958
|
-
exports.normalizeStyle =
|
|
187183
|
+
exports.normalizeStyle = normalizeStyle2;
|
|
185959
187184
|
exports.objectToString = objectToString;
|
|
185960
187185
|
exports.parseStringStyle = parseStringStyle;
|
|
185961
187186
|
exports.propsToAttrMap = propsToAttrMap;
|
|
@@ -231751,7 +232976,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
231751
232976
|
init_remark_gfm_BhnWr3yf_es();
|
|
231752
232977
|
});
|
|
231753
232978
|
|
|
231754
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
232979
|
+
// ../../packages/superdoc/dist/chunks/src-BjtupAUl.es.js
|
|
231755
232980
|
function deleteProps(obj, propOrProps) {
|
|
231756
232981
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
231757
232982
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -253063,9 +254288,9 @@ function findDonorMarkerFont(abstract) {
|
|
|
253063
254288
|
continue;
|
|
253064
254289
|
if (rFontsHasSymbolFont(rFonts))
|
|
253065
254290
|
continue;
|
|
253066
|
-
const
|
|
253067
|
-
if (
|
|
253068
|
-
return
|
|
254291
|
+
const family2 = readRFontsFamily(rFonts);
|
|
254292
|
+
if (family2)
|
|
254293
|
+
return family2;
|
|
253069
254294
|
}
|
|
253070
254295
|
}
|
|
253071
254296
|
function normalizeLevelFontForNumFmt(lvlEl, newNumFmt) {
|
|
@@ -272214,238 +273439,6 @@ function computeTabWidth(currentPos, justification, tabs, hangingIndent, firstLi
|
|
|
272214
273439
|
tabWidth = nextDefaultTabStop - currentPos;
|
|
272215
273440
|
return tabWidth;
|
|
272216
273441
|
}
|
|
272217
|
-
function isSettled(status) {
|
|
272218
|
-
return SETTLED_STATUSES.includes(status);
|
|
272219
|
-
}
|
|
272220
|
-
function normalizeFamilyKey$2(family$1) {
|
|
272221
|
-
return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
|
|
272222
|
-
}
|
|
272223
|
-
function deriveBundledSubstitutes() {
|
|
272224
|
-
const substitutes = {};
|
|
272225
|
-
for (const row2 of SUBSTITUTION_EVIDENCE)
|
|
272226
|
-
if (row2.policyAction === "substitute" && row2.physicalFamily)
|
|
272227
|
-
substitutes[normalizeFamilyKey$2(row2.logicalFamily)] = row2.physicalFamily;
|
|
272228
|
-
return Object.freeze(substitutes);
|
|
272229
|
-
}
|
|
272230
|
-
function deriveCategoryFallbacks() {
|
|
272231
|
-
const fallbacks = {};
|
|
272232
|
-
for (const row2 of SUBSTITUTION_EVIDENCE)
|
|
272233
|
-
if (row2.policyAction === "category_fallback" && row2.physicalFamily)
|
|
272234
|
-
fallbacks[normalizeFamilyKey$2(row2.logicalFamily)] = row2.physicalFamily;
|
|
272235
|
-
return Object.freeze(fallbacks);
|
|
272236
|
-
}
|
|
272237
|
-
function stripFamilyQuotes(family$1) {
|
|
272238
|
-
return family$1.trim().replace(/^["']|["']$/g, "");
|
|
272239
|
-
}
|
|
272240
|
-
function splitStack(cssFontFamily) {
|
|
272241
|
-
return cssFontFamily.split(",").map((part) => part.trim()).filter(Boolean);
|
|
272242
|
-
}
|
|
272243
|
-
function createFontResolver() {
|
|
272244
|
-
return new FontResolver;
|
|
272245
|
-
}
|
|
272246
|
-
function resolveFontFamily2(logicalFamily) {
|
|
272247
|
-
return defaultResolver.resolveFontFamily(logicalFamily);
|
|
272248
|
-
}
|
|
272249
|
-
function resolvePhysicalFamily(cssFontFamily) {
|
|
272250
|
-
return defaultResolver.resolvePhysicalFamily(cssFontFamily);
|
|
272251
|
-
}
|
|
272252
|
-
function resolveFace(logicalFamily, face, hasFace) {
|
|
272253
|
-
return defaultResolver.resolveFace(logicalFamily, face, hasFace);
|
|
272254
|
-
}
|
|
272255
|
-
function getFontConfigVersion() {
|
|
272256
|
-
return fontConfigVersion;
|
|
272257
|
-
}
|
|
272258
|
-
function bumpFontConfigVersion() {
|
|
272259
|
-
return fontConfigVersion += 1;
|
|
272260
|
-
}
|
|
272261
|
-
function fourFaces(filePrefix) {
|
|
272262
|
-
return [
|
|
272263
|
-
{
|
|
272264
|
-
weight: "normal",
|
|
272265
|
-
style: "normal",
|
|
272266
|
-
file: `${filePrefix}-Regular.woff2`
|
|
272267
|
-
},
|
|
272268
|
-
{
|
|
272269
|
-
weight: "bold",
|
|
272270
|
-
style: "normal",
|
|
272271
|
-
file: `${filePrefix}-Bold.woff2`
|
|
272272
|
-
},
|
|
272273
|
-
{
|
|
272274
|
-
weight: "normal",
|
|
272275
|
-
style: "italic",
|
|
272276
|
-
file: `${filePrefix}-Italic.woff2`
|
|
272277
|
-
},
|
|
272278
|
-
{
|
|
272279
|
-
weight: "bold",
|
|
272280
|
-
style: "italic",
|
|
272281
|
-
file: `${filePrefix}-BoldItalic.woff2`
|
|
272282
|
-
}
|
|
272283
|
-
];
|
|
272284
|
-
}
|
|
272285
|
-
function family(name, filePrefix, license) {
|
|
272286
|
-
return {
|
|
272287
|
-
family: name,
|
|
272288
|
-
license,
|
|
272289
|
-
faces: fourFaces(filePrefix)
|
|
272290
|
-
};
|
|
272291
|
-
}
|
|
272292
|
-
function withTrailingSlash(base5) {
|
|
272293
|
-
return base5.endsWith("/") ? base5 : `${base5}/`;
|
|
272294
|
-
}
|
|
272295
|
-
function joinUrl(base5, file) {
|
|
272296
|
-
return `${withTrailingSlash(base5)}${file}`;
|
|
272297
|
-
}
|
|
272298
|
-
function weightToken(weight) {
|
|
272299
|
-
return weight === "bold" ? "700" : "400";
|
|
272300
|
-
}
|
|
272301
|
-
function bundledAssetSignature(resolve3) {
|
|
272302
|
-
const family$1 = BUNDLED_MANIFEST[0];
|
|
272303
|
-
const face = family$1?.faces[0];
|
|
272304
|
-
if (!family$1 || !face)
|
|
272305
|
-
return "";
|
|
272306
|
-
return resolve3({
|
|
272307
|
-
file: face.file,
|
|
272308
|
-
family: family$1.family,
|
|
272309
|
-
weight: weightToken(face.weight),
|
|
272310
|
-
style: face.style,
|
|
272311
|
-
source: "bundled-substitute"
|
|
272312
|
-
});
|
|
272313
|
-
}
|
|
272314
|
-
function installBundledSubstitutes(registry2, options = {}) {
|
|
272315
|
-
const resolve3 = options.resolveAssetUrl ?? ((context) => joinUrl(options.assetBaseUrl ?? defaultAssetBase, context.file));
|
|
272316
|
-
const signature = bundledAssetSignature(resolve3);
|
|
272317
|
-
const installed = installedRegistries.get(registry2);
|
|
272318
|
-
if (installed !== undefined) {
|
|
272319
|
-
if (installed !== signature)
|
|
272320
|
-
console.warn(`[superdoc] bundled fonts are already registered for this document from "${installed}"; a later fonts config resolving to "${signature}" is ignored. Use one fonts.assetBaseUrl / fonts.resolveAssetUrl per document.`);
|
|
272321
|
-
return;
|
|
272322
|
-
}
|
|
272323
|
-
installedRegistries.set(registry2, signature);
|
|
272324
|
-
for (const family$1 of BUNDLED_MANIFEST)
|
|
272325
|
-
for (const face of family$1.faces) {
|
|
272326
|
-
const context = {
|
|
272327
|
-
file: face.file,
|
|
272328
|
-
family: family$1.family,
|
|
272329
|
-
weight: weightToken(face.weight),
|
|
272330
|
-
style: face.style,
|
|
272331
|
-
source: "bundled-substitute"
|
|
272332
|
-
};
|
|
272333
|
-
registry2.register({
|
|
272334
|
-
family: family$1.family,
|
|
272335
|
-
source: `url(${resolve3(context)})`,
|
|
272336
|
-
descriptors: {
|
|
272337
|
-
weight: face.weight,
|
|
272338
|
-
style: face.style
|
|
272339
|
-
}
|
|
272340
|
-
});
|
|
272341
|
-
}
|
|
272342
|
-
}
|
|
272343
|
-
function buildFontReport(logicalFamilies, registry2, resolver2) {
|
|
272344
|
-
const seen = /* @__PURE__ */ new Set;
|
|
272345
|
-
const report = [];
|
|
272346
|
-
for (const logical of logicalFamilies) {
|
|
272347
|
-
if (!logical || seen.has(logical))
|
|
272348
|
-
continue;
|
|
272349
|
-
seen.add(logical);
|
|
272350
|
-
const { physicalFamily, reason } = resolver2 ? resolver2.resolveFontFamily(logical) : resolveFontFamily2(logical);
|
|
272351
|
-
const loadStatus = registry2.getStatus(physicalFamily);
|
|
272352
|
-
report.push({
|
|
272353
|
-
logicalFamily: logical,
|
|
272354
|
-
physicalFamily,
|
|
272355
|
-
reason,
|
|
272356
|
-
loadStatus,
|
|
272357
|
-
exportFamily: logical,
|
|
272358
|
-
missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded"
|
|
272359
|
-
});
|
|
272360
|
-
}
|
|
272361
|
-
return report;
|
|
272362
|
-
}
|
|
272363
|
-
function buildFaceReport(usedFaces, registry2, resolver2) {
|
|
272364
|
-
const hasFace = (family$1, weight, style2) => registry2.hasFace(family$1, weight, style2);
|
|
272365
|
-
const seen = /* @__PURE__ */ new Set;
|
|
272366
|
-
const report = [];
|
|
272367
|
-
for (const { logicalFamily, weight, style: style2 } of usedFaces) {
|
|
272368
|
-
if (!logicalFamily)
|
|
272369
|
-
continue;
|
|
272370
|
-
const key2 = `${logicalFamily.toLowerCase()}|${weight}|${style2}`;
|
|
272371
|
-
if (seen.has(key2))
|
|
272372
|
-
continue;
|
|
272373
|
-
seen.add(key2);
|
|
272374
|
-
const face = {
|
|
272375
|
-
weight,
|
|
272376
|
-
style: style2
|
|
272377
|
-
};
|
|
272378
|
-
const { physicalFamily, reason } = resolver2 ? resolver2.resolveFace(logicalFamily, face, hasFace) : resolveFace(logicalFamily, face, hasFace);
|
|
272379
|
-
const loadStatus = registry2.getFaceStatus({
|
|
272380
|
-
family: physicalFamily,
|
|
272381
|
-
weight,
|
|
272382
|
-
style: style2
|
|
272383
|
-
});
|
|
272384
|
-
const missing = reason === "fallback_face_absent" || reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded";
|
|
272385
|
-
report.push({
|
|
272386
|
-
logicalFamily,
|
|
272387
|
-
physicalFamily,
|
|
272388
|
-
reason,
|
|
272389
|
-
loadStatus,
|
|
272390
|
-
exportFamily: logicalFamily,
|
|
272391
|
-
missing,
|
|
272392
|
-
face
|
|
272393
|
-
});
|
|
272394
|
-
}
|
|
272395
|
-
return report;
|
|
272396
|
-
}
|
|
272397
|
-
function quoteFamily(family$1) {
|
|
272398
|
-
return `"${family$1.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`;
|
|
272399
|
-
}
|
|
272400
|
-
function canonicalizeFontSource(source) {
|
|
272401
|
-
const match$1 = /^\s*url\(\s*([\s\S]*?)\s*\)\s*$/i.exec(source);
|
|
272402
|
-
if (!match$1)
|
|
272403
|
-
return source;
|
|
272404
|
-
let inner = match$1[1].trim();
|
|
272405
|
-
if (inner.startsWith('"') && inner.endsWith('"') || inner.startsWith("'") && inner.endsWith("'"))
|
|
272406
|
-
inner = inner.slice(1, -1);
|
|
272407
|
-
return `url(${JSON.stringify(inner)})`;
|
|
272408
|
-
}
|
|
272409
|
-
function normalizeFamilyKey$1(family$1) {
|
|
272410
|
-
return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
|
|
272411
|
-
}
|
|
272412
|
-
function normalizeWeight(weight) {
|
|
272413
|
-
if (weight === undefined)
|
|
272414
|
-
return "400";
|
|
272415
|
-
const w = String(weight).trim().toLowerCase();
|
|
272416
|
-
if (w === "bold" || w === "bolder")
|
|
272417
|
-
return "700";
|
|
272418
|
-
const n = Number(w);
|
|
272419
|
-
return Number.isFinite(n) && n >= 600 ? "700" : "400";
|
|
272420
|
-
}
|
|
272421
|
-
function normalizeStyle$1(style2) {
|
|
272422
|
-
if (!style2)
|
|
272423
|
-
return "normal";
|
|
272424
|
-
const s2 = style2.trim().toLowerCase();
|
|
272425
|
-
return s2.startsWith("italic") || s2.startsWith("oblique") ? "italic" : "normal";
|
|
272426
|
-
}
|
|
272427
|
-
function faceKeyOf$1(family$1, weight, style2) {
|
|
272428
|
-
return `${normalizeFamilyKey$1(family$1)}|${weight}|${style2}`;
|
|
272429
|
-
}
|
|
272430
|
-
function faceProbe(family$1, weight, style2, size$1) {
|
|
272431
|
-
return `${style2 === "italic" ? "italic " : ""}${weight} ${size$1} ${quoteFamily(family$1)}`;
|
|
272432
|
-
}
|
|
272433
|
-
function getFontRegistryFor(fontSet, FontFaceCtor) {
|
|
272434
|
-
if (!fontSet) {
|
|
272435
|
-
if (!domlessRegistry)
|
|
272436
|
-
domlessRegistry = new FontRegistry({});
|
|
272437
|
-
return domlessRegistry;
|
|
272438
|
-
}
|
|
272439
|
-
let registry2 = registriesByFontSet.get(fontSet);
|
|
272440
|
-
if (!registry2) {
|
|
272441
|
-
registry2 = new FontRegistry({
|
|
272442
|
-
fontSet,
|
|
272443
|
-
FontFaceCtor
|
|
272444
|
-
});
|
|
272445
|
-
registriesByFontSet.set(fontSet, registry2);
|
|
272446
|
-
}
|
|
272447
|
-
return registry2;
|
|
272448
|
-
}
|
|
272449
273442
|
function isResolvedFragmentWithBorders(item) {
|
|
272450
273443
|
return item !== undefined && item.kind === "fragment" && "paragraphBorders" in item && item.paragraphBorders !== undefined;
|
|
272451
273444
|
}
|
|
@@ -280441,8 +281434,8 @@ function isTextRun$3(run2) {
|
|
|
280441
281434
|
function fontString(run2) {
|
|
280442
281435
|
const textRun = isTextRun$3(run2) ? run2 : null;
|
|
280443
281436
|
const size$1 = textRun?.fontSize ?? 16;
|
|
280444
|
-
const
|
|
280445
|
-
return `${textRun?.italic ? "italic " : ""}${textRun?.bold ? "bold " : ""}${size$1}px ${
|
|
281437
|
+
const family2 = textRun?.fontFamily ?? "Arial";
|
|
281438
|
+
return `${textRun?.italic ? "italic " : ""}${textRun?.bold ? "bold " : ""}${size$1}px ${family2}`.trim();
|
|
280446
281439
|
}
|
|
280447
281440
|
function runText(run2) {
|
|
280448
281441
|
if (isEmptySdtPlaceholderRun(run2))
|
|
@@ -291288,8 +292281,8 @@ function ensureEndnoteMarker(blocks2, id2, endnoteNumberById, endnoteNumberForma
|
|
|
291288
292281
|
}
|
|
291289
292282
|
runs2.unshift(markerRun);
|
|
291290
292283
|
}
|
|
291291
|
-
function
|
|
291292
|
-
return
|
|
292284
|
+
function normalizeFamilyKey2(family2) {
|
|
292285
|
+
return family2.trim().replace(/^["']|["']$/g, "").toLowerCase();
|
|
291293
292286
|
}
|
|
291294
292287
|
function normalizeWeightToken(weight) {
|
|
291295
292288
|
if (!weight)
|
|
@@ -291306,8 +292299,8 @@ function normalizeStyleToken(style2) {
|
|
|
291306
292299
|
const s2 = style2.trim().toLowerCase();
|
|
291307
292300
|
return s2.startsWith("italic") || s2.startsWith("oblique") ? "italic" : "normal";
|
|
291308
292301
|
}
|
|
291309
|
-
function
|
|
291310
|
-
return `${
|
|
292302
|
+
function faceKeyOf2(family2, weight, style2) {
|
|
292303
|
+
return `${normalizeFamilyKey2(family2)}|${weight}|${style2}`;
|
|
291311
292304
|
}
|
|
291312
292305
|
function summarize(results) {
|
|
291313
292306
|
const summary = emptySummary();
|
|
@@ -291331,9 +292324,9 @@ function summarizeFaces(results) {
|
|
|
291331
292324
|
worstByFamily.set(request.family, status);
|
|
291332
292325
|
}
|
|
291333
292326
|
const summary = emptySummary();
|
|
291334
|
-
for (const [
|
|
292327
|
+
for (const [family2, status] of worstByFamily) {
|
|
291335
292328
|
summary.results.push({
|
|
291336
|
-
family:
|
|
292329
|
+
family: family2,
|
|
291337
292330
|
status
|
|
291338
292331
|
});
|
|
291339
292332
|
if (status === "loaded")
|
|
@@ -291411,7 +292404,7 @@ function makeResolveFace(resolver2, hasFace) {
|
|
|
291411
292404
|
};
|
|
291412
292405
|
};
|
|
291413
292406
|
}
|
|
291414
|
-
function collect(acc, node3,
|
|
292407
|
+
function collect(acc, node3, resolveFace2) {
|
|
291415
292408
|
if (!node3 || typeof node3.fontFamily !== "string" || !node3.fontFamily)
|
|
291416
292409
|
return;
|
|
291417
292410
|
const weight = node3.bold === true ? "700" : "400";
|
|
@@ -291422,7 +292415,7 @@ function collect(acc, node3, resolveFace$1) {
|
|
|
291422
292415
|
const usedKey = `${logicalPrimary.toLowerCase()}|${weight}|${style2}`;
|
|
291423
292416
|
if (acc.usedFaces.has(usedKey))
|
|
291424
292417
|
return;
|
|
291425
|
-
const { physicalFamily, reason } =
|
|
292418
|
+
const { physicalFamily, reason } = resolveFace2(node3.fontFamily, {
|
|
291426
292419
|
weight,
|
|
291427
292420
|
style: style2
|
|
291428
292421
|
});
|
|
@@ -291448,7 +292441,7 @@ function collect(acc, node3, resolveFace$1) {
|
|
|
291448
292441
|
});
|
|
291449
292442
|
}
|
|
291450
292443
|
}
|
|
291451
|
-
function collectRuns(acc, runs2,
|
|
292444
|
+
function collectRuns(acc, runs2, resolveFace2) {
|
|
291452
292445
|
if (!runs2)
|
|
291453
292446
|
return;
|
|
291454
292447
|
for (const run2 of runs2) {
|
|
@@ -291457,48 +292450,48 @@ function collectRuns(acc, runs2, resolveFace$1) {
|
|
|
291457
292450
|
collect(acc, {
|
|
291458
292451
|
...bearing,
|
|
291459
292452
|
fontFamily: "Arial"
|
|
291460
|
-
},
|
|
292453
|
+
}, resolveFace2);
|
|
291461
292454
|
else
|
|
291462
|
-
collect(acc, bearing,
|
|
292455
|
+
collect(acc, bearing, resolveFace2);
|
|
291463
292456
|
}
|
|
291464
292457
|
}
|
|
291465
|
-
function collectParagraph(acc, paragraph2,
|
|
292458
|
+
function collectParagraph(acc, paragraph2, resolveFace2) {
|
|
291466
292459
|
if (!paragraph2)
|
|
291467
292460
|
return;
|
|
291468
|
-
collectRuns(acc, paragraph2.runs,
|
|
291469
|
-
collect(acc, paragraph2.attrs?.wordLayout?.marker?.run,
|
|
291470
|
-
collect(acc, paragraph2.attrs?.dropCapDescriptor?.run,
|
|
292461
|
+
collectRuns(acc, paragraph2.runs, resolveFace2);
|
|
292462
|
+
collect(acc, paragraph2.attrs?.wordLayout?.marker?.run, resolveFace2);
|
|
292463
|
+
collect(acc, paragraph2.attrs?.dropCapDescriptor?.run, resolveFace2);
|
|
291471
292464
|
}
|
|
291472
|
-
function collectTable(acc, table2,
|
|
292465
|
+
function collectTable(acc, table2, resolveFace2) {
|
|
291473
292466
|
for (const row2 of table2.rows)
|
|
291474
292467
|
for (const cell2 of row2.cells) {
|
|
291475
|
-
collectParagraph(acc, cell2.paragraph,
|
|
292468
|
+
collectParagraph(acc, cell2.paragraph, resolveFace2);
|
|
291476
292469
|
if (cell2.blocks)
|
|
291477
292470
|
for (const b$1 of cell2.blocks)
|
|
291478
|
-
collectBlock(acc, b$1,
|
|
292471
|
+
collectBlock(acc, b$1, resolveFace2);
|
|
291479
292472
|
}
|
|
291480
292473
|
}
|
|
291481
|
-
function collectList(acc, list5,
|
|
292474
|
+
function collectList(acc, list5, resolveFace2) {
|
|
291482
292475
|
for (const item of list5.items)
|
|
291483
|
-
collectParagraph(acc, item.paragraph,
|
|
292476
|
+
collectParagraph(acc, item.paragraph, resolveFace2);
|
|
291484
292477
|
}
|
|
291485
|
-
function collectBlock(acc, block,
|
|
292478
|
+
function collectBlock(acc, block, resolveFace2) {
|
|
291486
292479
|
switch (block.kind) {
|
|
291487
292480
|
case "paragraph":
|
|
291488
|
-
collectParagraph(acc, block,
|
|
292481
|
+
collectParagraph(acc, block, resolveFace2);
|
|
291489
292482
|
break;
|
|
291490
292483
|
case "table":
|
|
291491
|
-
collectTable(acc, block,
|
|
292484
|
+
collectTable(acc, block, resolveFace2);
|
|
291492
292485
|
break;
|
|
291493
292486
|
case "list":
|
|
291494
|
-
collectList(acc, block,
|
|
292487
|
+
collectList(acc, block, resolveFace2);
|
|
291495
292488
|
break;
|
|
291496
292489
|
default:
|
|
291497
292490
|
break;
|
|
291498
292491
|
}
|
|
291499
292492
|
}
|
|
291500
292493
|
function planFontFaces(blocks2, resolver2, hasFace) {
|
|
291501
|
-
const
|
|
292494
|
+
const resolveFace2 = makeResolveFace(resolver2, hasFace);
|
|
291502
292495
|
const acc = {
|
|
291503
292496
|
requiredFaces: /* @__PURE__ */ new Map,
|
|
291504
292497
|
usedFaces: /* @__PURE__ */ new Map,
|
|
@@ -291506,7 +292499,7 @@ function planFontFaces(blocks2, resolver2, hasFace) {
|
|
|
291506
292499
|
};
|
|
291507
292500
|
if (blocks2)
|
|
291508
292501
|
for (const block of blocks2)
|
|
291509
|
-
collectBlock(acc, block,
|
|
292502
|
+
collectBlock(acc, block, resolveFace2);
|
|
291510
292503
|
return {
|
|
291511
292504
|
requiredFaces: [...acc.requiredFaces.values()],
|
|
291512
292505
|
usedFaces: [...acc.usedFaces.values()],
|
|
@@ -313415,443 +314408,7 @@ menclose::after {
|
|
|
313415
314408
|
const minReadablePx = getMinimumReadableTextStartPx(markerContentEndPx, gutterWidthPx);
|
|
313416
314409
|
return Math.max(nextTabStopPx, minReadablePx);
|
|
313417
314410
|
}
|
|
313418
|
-
},
|
|
313419
|
-
#overrides = /* @__PURE__ */ new Map;
|
|
313420
|
-
#version = 0;
|
|
313421
|
-
#cachedSignature = null;
|
|
313422
|
-
map(logicalFamily, physicalFamily) {
|
|
313423
|
-
const key2 = normalizeFamilyKey$2(logicalFamily);
|
|
313424
|
-
const physical = physicalFamily?.trim();
|
|
313425
|
-
if (!key2 || !physical)
|
|
313426
|
-
return;
|
|
313427
|
-
if (this.#overrides.get(key2) === physical)
|
|
313428
|
-
return;
|
|
313429
|
-
if (key2 === normalizeFamilyKey$2(physical)) {
|
|
313430
|
-
if (this.#overrides.delete(key2)) {
|
|
313431
|
-
this.#version += 1;
|
|
313432
|
-
this.#cachedSignature = null;
|
|
313433
|
-
}
|
|
313434
|
-
return;
|
|
313435
|
-
}
|
|
313436
|
-
this.#overrides.set(key2, physical);
|
|
313437
|
-
this.#version += 1;
|
|
313438
|
-
this.#cachedSignature = null;
|
|
313439
|
-
}
|
|
313440
|
-
unmap(logicalFamily) {
|
|
313441
|
-
if (this.#overrides.delete(normalizeFamilyKey$2(logicalFamily))) {
|
|
313442
|
-
this.#version += 1;
|
|
313443
|
-
this.#cachedSignature = null;
|
|
313444
|
-
}
|
|
313445
|
-
}
|
|
313446
|
-
reset() {
|
|
313447
|
-
if (this.#overrides.size === 0)
|
|
313448
|
-
return;
|
|
313449
|
-
this.#overrides.clear();
|
|
313450
|
-
this.#version += 1;
|
|
313451
|
-
this.#cachedSignature = null;
|
|
313452
|
-
}
|
|
313453
|
-
get version() {
|
|
313454
|
-
return this.#version;
|
|
313455
|
-
}
|
|
313456
|
-
get signature() {
|
|
313457
|
-
if (this.#cachedSignature !== null)
|
|
313458
|
-
return this.#cachedSignature;
|
|
313459
|
-
this.#cachedSignature = this.#overrides.size === 0 ? "" : JSON.stringify([...this.#overrides.entries()].sort(([a2], [b$1]) => a2 < b$1 ? -1 : a2 > b$1 ? 1 : 0));
|
|
313460
|
-
return this.#cachedSignature;
|
|
313461
|
-
}
|
|
313462
|
-
#physicalFor(bareFamily) {
|
|
313463
|
-
const key2 = normalizeFamilyKey$2(bareFamily);
|
|
313464
|
-
const override = this.#overrides.get(key2);
|
|
313465
|
-
if (override)
|
|
313466
|
-
return {
|
|
313467
|
-
physical: override,
|
|
313468
|
-
reason: "custom_mapping"
|
|
313469
|
-
};
|
|
313470
|
-
const bundled = BUNDLED_SUBSTITUTES[key2];
|
|
313471
|
-
if (bundled)
|
|
313472
|
-
return {
|
|
313473
|
-
physical: bundled,
|
|
313474
|
-
reason: "bundled_substitute"
|
|
313475
|
-
};
|
|
313476
|
-
const category = CATEGORY_FALLBACKS[key2];
|
|
313477
|
-
if (category)
|
|
313478
|
-
return {
|
|
313479
|
-
physical: category,
|
|
313480
|
-
reason: "category_fallback"
|
|
313481
|
-
};
|
|
313482
|
-
return {
|
|
313483
|
-
physical: bareFamily,
|
|
313484
|
-
reason: "as_requested"
|
|
313485
|
-
};
|
|
313486
|
-
}
|
|
313487
|
-
#resolveFaceLadder(primary, face, hasFace) {
|
|
313488
|
-
const key2 = normalizeFamilyKey$2(primary);
|
|
313489
|
-
const override = this.#overrides.get(key2);
|
|
313490
|
-
if (override && hasFace(override, face.weight, face.style))
|
|
313491
|
-
return {
|
|
313492
|
-
physical: override,
|
|
313493
|
-
reason: "custom_mapping"
|
|
313494
|
-
};
|
|
313495
|
-
if (hasFace(primary, face.weight, face.style))
|
|
313496
|
-
return {
|
|
313497
|
-
physical: primary,
|
|
313498
|
-
reason: "registered_face"
|
|
313499
|
-
};
|
|
313500
|
-
const bundled = BUNDLED_SUBSTITUTES[key2];
|
|
313501
|
-
if (bundled && hasFace(bundled, face.weight, face.style))
|
|
313502
|
-
return {
|
|
313503
|
-
physical: bundled,
|
|
313504
|
-
reason: "bundled_substitute"
|
|
313505
|
-
};
|
|
313506
|
-
const category = CATEGORY_FALLBACKS[key2];
|
|
313507
|
-
if (category && hasFace(category, face.weight, face.style))
|
|
313508
|
-
return {
|
|
313509
|
-
physical: category,
|
|
313510
|
-
reason: "category_fallback"
|
|
313511
|
-
};
|
|
313512
|
-
if (override || bundled)
|
|
313513
|
-
return {
|
|
313514
|
-
physical: primary,
|
|
313515
|
-
reason: "fallback_face_absent"
|
|
313516
|
-
};
|
|
313517
|
-
return {
|
|
313518
|
-
physical: primary,
|
|
313519
|
-
reason: "as_requested"
|
|
313520
|
-
};
|
|
313521
|
-
}
|
|
313522
|
-
resolveFontFamily(logicalFamily) {
|
|
313523
|
-
const primary = splitStack(logicalFamily)[0] ?? logicalFamily;
|
|
313524
|
-
const { physical, reason } = this.#physicalFor(primary);
|
|
313525
|
-
return {
|
|
313526
|
-
logicalFamily,
|
|
313527
|
-
physicalFamily: stripFamilyQuotes(physical),
|
|
313528
|
-
reason
|
|
313529
|
-
};
|
|
313530
|
-
}
|
|
313531
|
-
resolvePhysicalFamily(cssFontFamily) {
|
|
313532
|
-
if (!cssFontFamily)
|
|
313533
|
-
return cssFontFamily;
|
|
313534
|
-
const parts = splitStack(cssFontFamily);
|
|
313535
|
-
if (parts.length === 0)
|
|
313536
|
-
return cssFontFamily;
|
|
313537
|
-
const { physical, reason } = this.#physicalFor(parts[0]);
|
|
313538
|
-
if (reason === "as_requested")
|
|
313539
|
-
return cssFontFamily;
|
|
313540
|
-
return [physical, ...parts.slice(1)].join(", ");
|
|
313541
|
-
}
|
|
313542
|
-
resolveFace(logicalFamily, face, hasFace) {
|
|
313543
|
-
const primary = splitStack(logicalFamily)[0] ?? logicalFamily;
|
|
313544
|
-
const { physical, reason } = this.#resolveFaceLadder(primary, face, hasFace);
|
|
313545
|
-
return {
|
|
313546
|
-
logicalFamily,
|
|
313547
|
-
physicalFamily: stripFamilyQuotes(physical),
|
|
313548
|
-
reason
|
|
313549
|
-
};
|
|
313550
|
-
}
|
|
313551
|
-
resolvePhysicalFamilyForFace(cssFontFamily, face, hasFace) {
|
|
313552
|
-
if (!cssFontFamily)
|
|
313553
|
-
return cssFontFamily;
|
|
313554
|
-
const parts = splitStack(cssFontFamily);
|
|
313555
|
-
if (parts.length === 0)
|
|
313556
|
-
return cssFontFamily;
|
|
313557
|
-
const { physical } = this.#resolveFaceLadder(parts[0], face, hasFace);
|
|
313558
|
-
if (normalizeFamilyKey$2(physical) !== normalizeFamilyKey$2(parts[0]))
|
|
313559
|
-
return [physical, ...parts.slice(1)].join(", ");
|
|
313560
|
-
return cssFontFamily;
|
|
313561
|
-
}
|
|
313562
|
-
resolvePrimaryPhysicalFamily(family$1) {
|
|
313563
|
-
const primary = splitStack(family$1)[0] ?? family$1;
|
|
313564
|
-
return this.#physicalFor(primary).physical;
|
|
313565
|
-
}
|
|
313566
|
-
resolvePhysicalFamilies(families) {
|
|
313567
|
-
const out = /* @__PURE__ */ new Set;
|
|
313568
|
-
for (const family$1 of families)
|
|
313569
|
-
if (family$1)
|
|
313570
|
-
out.add(this.resolvePrimaryPhysicalFamily(family$1));
|
|
313571
|
-
return [...out];
|
|
313572
|
-
}
|
|
313573
|
-
}, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, BUNDLED_MANIFEST, defaultAssetBase = "/fonts/", installedRegistries, DEFAULT_FONT_LOAD_TIMEOUT_MS = 3000, DEFAULT_PROBE_SIZE = "16px", FontRegistry = class {
|
|
313574
|
-
#fontSet;
|
|
313575
|
-
#FontFaceCtor;
|
|
313576
|
-
#probeSize;
|
|
313577
|
-
#scheduleTimeout;
|
|
313578
|
-
#cancelTimeout;
|
|
313579
|
-
#managed = /* @__PURE__ */ new Map;
|
|
313580
|
-
#status = /* @__PURE__ */ new Map;
|
|
313581
|
-
#sources = /* @__PURE__ */ new Map;
|
|
313582
|
-
#warnedFailures = /* @__PURE__ */ new Set;
|
|
313583
|
-
#inflight = /* @__PURE__ */ new Map;
|
|
313584
|
-
#faceStatus = /* @__PURE__ */ new Map;
|
|
313585
|
-
#faceInflight = /* @__PURE__ */ new Map;
|
|
313586
|
-
#faceSources = /* @__PURE__ */ new Map;
|
|
313587
|
-
#facesByFamily = /* @__PURE__ */ new Map;
|
|
313588
|
-
#providerFaceKeys = /* @__PURE__ */ new Set;
|
|
313589
|
-
#warnedFaceFailures = /* @__PURE__ */ new Set;
|
|
313590
|
-
constructor(options = {}) {
|
|
313591
|
-
this.#fontSet = options.fontSet ?? null;
|
|
313592
|
-
this.#FontFaceCtor = options.FontFaceCtor ?? null;
|
|
313593
|
-
this.#probeSize = options.probeSize ?? DEFAULT_PROBE_SIZE;
|
|
313594
|
-
this.#scheduleTimeout = options.scheduleTimeout ?? ((cb, ms) => globalThis.setTimeout(cb, ms));
|
|
313595
|
-
this.#cancelTimeout = options.cancelTimeout ?? ((handle3) => globalThis.clearTimeout(handle3));
|
|
313596
|
-
}
|
|
313597
|
-
register(descriptor) {
|
|
313598
|
-
const { family: family$1, source, descriptors: descriptors2 } = descriptor;
|
|
313599
|
-
const identitySource = typeof source === "string" ? canonicalizeFontSource(source) : source;
|
|
313600
|
-
const weight = normalizeWeight(descriptors2?.weight);
|
|
313601
|
-
const style2 = normalizeStyle$1(descriptors2?.style);
|
|
313602
|
-
const key2 = faceKeyOf$1(family$1, weight, style2);
|
|
313603
|
-
if (typeof identitySource === "string") {
|
|
313604
|
-
const existingSource = this.#faceSources.get(key2);
|
|
313605
|
-
if (existingSource === identitySource)
|
|
313606
|
-
return {
|
|
313607
|
-
family: family$1,
|
|
313608
|
-
status: this.getStatus(family$1),
|
|
313609
|
-
changed: false
|
|
313610
|
-
};
|
|
313611
|
-
if (existingSource !== undefined)
|
|
313612
|
-
throw new Error(`[superdoc] font face "${key2}" is already registered from a different source ("${existingSource}"); a registered face's source cannot be replaced`);
|
|
313613
|
-
}
|
|
313614
|
-
if (this.#FontFaceCtor && this.#fontSet) {
|
|
313615
|
-
const face = new this.#FontFaceCtor(family$1, source, {
|
|
313616
|
-
...descriptors2,
|
|
313617
|
-
weight,
|
|
313618
|
-
style: style2
|
|
313619
|
-
});
|
|
313620
|
-
this.#fontSet.add(face);
|
|
313621
|
-
this.#managed.set(family$1, face);
|
|
313622
|
-
}
|
|
313623
|
-
if (typeof source === "string") {
|
|
313624
|
-
const list5 = this.#sources.get(family$1) ?? [];
|
|
313625
|
-
if (!list5.includes(source))
|
|
313626
|
-
list5.push(source);
|
|
313627
|
-
this.#sources.set(family$1, list5);
|
|
313628
|
-
}
|
|
313629
|
-
if (!this.#status.has(family$1))
|
|
313630
|
-
this.#status.set(family$1, "unloaded");
|
|
313631
|
-
this.#providerFaceKeys.add(key2);
|
|
313632
|
-
this.#trackFace(family$1, key2);
|
|
313633
|
-
if (!this.#faceStatus.has(key2))
|
|
313634
|
-
this.#faceStatus.set(key2, "unloaded");
|
|
313635
|
-
if (typeof identitySource === "string" && !this.#faceSources.has(key2))
|
|
313636
|
-
this.#faceSources.set(key2, identitySource);
|
|
313637
|
-
return {
|
|
313638
|
-
family: family$1,
|
|
313639
|
-
status: this.getStatus(family$1),
|
|
313640
|
-
changed: true
|
|
313641
|
-
};
|
|
313642
|
-
}
|
|
313643
|
-
#trackFace(family$1, key2) {
|
|
313644
|
-
const fam = normalizeFamilyKey$1(family$1);
|
|
313645
|
-
const set = this.#facesByFamily.get(fam) ?? /* @__PURE__ */ new Set;
|
|
313646
|
-
set.add(key2);
|
|
313647
|
-
this.#facesByFamily.set(fam, set);
|
|
313648
|
-
}
|
|
313649
|
-
isManaged(family$1) {
|
|
313650
|
-
return this.#managed.has(family$1);
|
|
313651
|
-
}
|
|
313652
|
-
getStatus(family$1) {
|
|
313653
|
-
const statuses = [];
|
|
313654
|
-
const faceKeys = this.#facesByFamily.get(normalizeFamilyKey$1(family$1));
|
|
313655
|
-
if (faceKeys)
|
|
313656
|
-
for (const k$1 of faceKeys)
|
|
313657
|
-
statuses.push(this.#faceStatus.get(k$1) ?? "unloaded");
|
|
313658
|
-
const legacy = this.#status.get(family$1);
|
|
313659
|
-
if (legacy)
|
|
313660
|
-
statuses.push(legacy);
|
|
313661
|
-
if (statuses.length === 0)
|
|
313662
|
-
return "unloaded";
|
|
313663
|
-
for (const s2 of [
|
|
313664
|
-
"failed",
|
|
313665
|
-
"timed_out",
|
|
313666
|
-
"fallback_used",
|
|
313667
|
-
"loaded",
|
|
313668
|
-
"loading",
|
|
313669
|
-
"unloaded"
|
|
313670
|
-
])
|
|
313671
|
-
if (statuses.includes(s2))
|
|
313672
|
-
return s2;
|
|
313673
|
-
return "unloaded";
|
|
313674
|
-
}
|
|
313675
|
-
hasFace(family$1, weight, style2) {
|
|
313676
|
-
const key2 = faceKeyOf$1(family$1, weight, style2);
|
|
313677
|
-
return this.#providerFaceKeys.has(key2) && this.#faceStatus.get(key2) !== "failed";
|
|
313678
|
-
}
|
|
313679
|
-
isAvailable(family$1) {
|
|
313680
|
-
if (!this.#fontSet)
|
|
313681
|
-
return false;
|
|
313682
|
-
try {
|
|
313683
|
-
return this.#fontSet.check(`${this.#probeSize} ${quoteFamily(family$1)}`);
|
|
313684
|
-
} catch {
|
|
313685
|
-
return false;
|
|
313686
|
-
}
|
|
313687
|
-
}
|
|
313688
|
-
awaitFace(family$1, timeoutMs = DEFAULT_FONT_LOAD_TIMEOUT_MS) {
|
|
313689
|
-
if (this.#status.get(family$1) === "loaded")
|
|
313690
|
-
return Promise.resolve({
|
|
313691
|
-
family: family$1,
|
|
313692
|
-
status: "loaded"
|
|
313693
|
-
});
|
|
313694
|
-
const existing = this.#inflight.get(family$1);
|
|
313695
|
-
if (existing)
|
|
313696
|
-
return existing;
|
|
313697
|
-
const probe = this.#loadOne(family$1, timeoutMs).finally(() => {
|
|
313698
|
-
this.#inflight.delete(family$1);
|
|
313699
|
-
});
|
|
313700
|
-
this.#inflight.set(family$1, probe);
|
|
313701
|
-
return probe;
|
|
313702
|
-
}
|
|
313703
|
-
async awaitFaces(families, options = {}) {
|
|
313704
|
-
const unique$2 = [...new Set(families)];
|
|
313705
|
-
const timeoutMs = options.timeoutMs ?? 3000;
|
|
313706
|
-
return Promise.all(unique$2.map((family$1) => this.awaitFace(family$1, timeoutMs)));
|
|
313707
|
-
}
|
|
313708
|
-
getRequiredFaces(families, timeoutMs = DEFAULT_FONT_LOAD_TIMEOUT_MS) {
|
|
313709
|
-
return [...new Set(families)].map((family$1) => ({
|
|
313710
|
-
family: family$1,
|
|
313711
|
-
status: this.getStatus(family$1),
|
|
313712
|
-
ready: this.awaitFace(family$1, timeoutMs)
|
|
313713
|
-
}));
|
|
313714
|
-
}
|
|
313715
|
-
getStates() {
|
|
313716
|
-
return [...this.#status.entries()].map(([family$1, status]) => ({
|
|
313717
|
-
family: family$1,
|
|
313718
|
-
status
|
|
313719
|
-
}));
|
|
313720
|
-
}
|
|
313721
|
-
getFaceStatus(request) {
|
|
313722
|
-
return this.#faceStatus.get(faceKeyOf$1(request.family, request.weight, request.style)) ?? "unloaded";
|
|
313723
|
-
}
|
|
313724
|
-
awaitFaceRequest(request, timeoutMs = DEFAULT_FONT_LOAD_TIMEOUT_MS) {
|
|
313725
|
-
const key2 = faceKeyOf$1(request.family, request.weight, request.style);
|
|
313726
|
-
if (this.#faceStatus.get(key2) === "loaded")
|
|
313727
|
-
return Promise.resolve({
|
|
313728
|
-
request,
|
|
313729
|
-
status: "loaded"
|
|
313730
|
-
});
|
|
313731
|
-
const existing = this.#faceInflight.get(key2);
|
|
313732
|
-
if (existing)
|
|
313733
|
-
return existing;
|
|
313734
|
-
const probe = this.#loadOneFace(request, key2, timeoutMs).finally(() => {
|
|
313735
|
-
this.#faceInflight.delete(key2);
|
|
313736
|
-
});
|
|
313737
|
-
this.#faceInflight.set(key2, probe);
|
|
313738
|
-
return probe;
|
|
313739
|
-
}
|
|
313740
|
-
async awaitFaceRequests(requests, options = {}) {
|
|
313741
|
-
const timeoutMs = options.timeoutMs ?? 3000;
|
|
313742
|
-
const seen = /* @__PURE__ */ new Set;
|
|
313743
|
-
const unique$2 = [];
|
|
313744
|
-
for (const r$1 of requests) {
|
|
313745
|
-
const key2 = faceKeyOf$1(r$1.family, r$1.weight, r$1.style);
|
|
313746
|
-
if (seen.has(key2))
|
|
313747
|
-
continue;
|
|
313748
|
-
seen.add(key2);
|
|
313749
|
-
unique$2.push(r$1);
|
|
313750
|
-
}
|
|
313751
|
-
return Promise.all(unique$2.map((r$1) => this.awaitFaceRequest(r$1, timeoutMs)));
|
|
313752
|
-
}
|
|
313753
|
-
async#loadOneFace(request, key2, timeoutMs) {
|
|
313754
|
-
this.#trackFace(request.family, key2);
|
|
313755
|
-
const fontSet = this.#fontSet;
|
|
313756
|
-
if (!fontSet) {
|
|
313757
|
-
this.#faceStatus.set(key2, "fallback_used");
|
|
313758
|
-
return {
|
|
313759
|
-
request,
|
|
313760
|
-
status: "fallback_used"
|
|
313761
|
-
};
|
|
313762
|
-
}
|
|
313763
|
-
this.#faceStatus.set(key2, "loading");
|
|
313764
|
-
const probe = faceProbe(request.family, request.weight, request.style, this.#probeSize);
|
|
313765
|
-
const TIMEOUT = Symbol("timeout");
|
|
313766
|
-
let handle3;
|
|
313767
|
-
const timeout$1 = new Promise((resolve3) => {
|
|
313768
|
-
handle3 = this.#scheduleTimeout(() => resolve3(TIMEOUT), timeoutMs);
|
|
313769
|
-
});
|
|
313770
|
-
try {
|
|
313771
|
-
const settled = await Promise.race([fontSet.load(probe), timeout$1]);
|
|
313772
|
-
if (settled === TIMEOUT) {
|
|
313773
|
-
this.#faceStatus.set(key2, "timed_out");
|
|
313774
|
-
return {
|
|
313775
|
-
request,
|
|
313776
|
-
status: "timed_out"
|
|
313777
|
-
};
|
|
313778
|
-
}
|
|
313779
|
-
const status = settled.length > 0 ? "loaded" : "fallback_used";
|
|
313780
|
-
this.#faceStatus.set(key2, status);
|
|
313781
|
-
return {
|
|
313782
|
-
request,
|
|
313783
|
-
status
|
|
313784
|
-
};
|
|
313785
|
-
} catch {
|
|
313786
|
-
this.#faceStatus.set(key2, "failed");
|
|
313787
|
-
this.#warnFaceFailureOnce(request, key2);
|
|
313788
|
-
return {
|
|
313789
|
-
request,
|
|
313790
|
-
status: "failed"
|
|
313791
|
-
};
|
|
313792
|
-
} finally {
|
|
313793
|
-
this.#cancelTimeout(handle3);
|
|
313794
|
-
}
|
|
313795
|
-
}
|
|
313796
|
-
#warnFaceFailureOnce(request, key2) {
|
|
313797
|
-
if (this.#warnedFaceFailures.has(key2))
|
|
313798
|
-
return;
|
|
313799
|
-
this.#warnedFaceFailures.add(key2);
|
|
313800
|
-
const src = this.#faceSources.get(key2);
|
|
313801
|
-
const detail = src ? ` from ${src}` : "";
|
|
313802
|
-
console.warn(`[superdoc] font face failed to load: "${request.family}" ${request.weight} ${request.style}${detail}. Check fonts.assetBaseUrl / fonts.resolveAssetUrl so the bundled .woff2 are served.`);
|
|
313803
|
-
}
|
|
313804
|
-
async#loadOne(family$1, timeoutMs) {
|
|
313805
|
-
const fontSet = this.#fontSet;
|
|
313806
|
-
if (!fontSet) {
|
|
313807
|
-
this.#status.set(family$1, "fallback_used");
|
|
313808
|
-
return {
|
|
313809
|
-
family: family$1,
|
|
313810
|
-
status: "fallback_used"
|
|
313811
|
-
};
|
|
313812
|
-
}
|
|
313813
|
-
this.#status.set(family$1, "loading");
|
|
313814
|
-
const probe = `${this.#probeSize} ${quoteFamily(family$1)}`;
|
|
313815
|
-
const TIMEOUT = Symbol("timeout");
|
|
313816
|
-
let handle3;
|
|
313817
|
-
const timeout$1 = new Promise((resolve3) => {
|
|
313818
|
-
handle3 = this.#scheduleTimeout(() => resolve3(TIMEOUT), timeoutMs);
|
|
313819
|
-
});
|
|
313820
|
-
try {
|
|
313821
|
-
const settled = await Promise.race([fontSet.load(probe), timeout$1]);
|
|
313822
|
-
if (settled === TIMEOUT) {
|
|
313823
|
-
this.#status.set(family$1, "timed_out");
|
|
313824
|
-
return {
|
|
313825
|
-
family: family$1,
|
|
313826
|
-
status: "timed_out"
|
|
313827
|
-
};
|
|
313828
|
-
}
|
|
313829
|
-
const status = settled.length > 0 ? "loaded" : "fallback_used";
|
|
313830
|
-
this.#status.set(family$1, status);
|
|
313831
|
-
return {
|
|
313832
|
-
family: family$1,
|
|
313833
|
-
status
|
|
313834
|
-
};
|
|
313835
|
-
} catch {
|
|
313836
|
-
this.#status.set(family$1, "failed");
|
|
313837
|
-
this.#warnLoadFailureOnce(family$1);
|
|
313838
|
-
return {
|
|
313839
|
-
family: family$1,
|
|
313840
|
-
status: "failed"
|
|
313841
|
-
};
|
|
313842
|
-
} finally {
|
|
313843
|
-
this.#cancelTimeout(handle3);
|
|
313844
|
-
}
|
|
313845
|
-
}
|
|
313846
|
-
#warnLoadFailureOnce(family$1) {
|
|
313847
|
-
if (this.#warnedFailures.has(family$1))
|
|
313848
|
-
return;
|
|
313849
|
-
this.#warnedFailures.add(family$1);
|
|
313850
|
-
const sources = this.#sources.get(family$1);
|
|
313851
|
-
const detail = sources && sources.length ? ` from ${sources.join(", ")}` : "";
|
|
313852
|
-
console.warn(`[superdoc] font asset failed to load for "${family$1}"${detail}. Check fonts.assetBaseUrl / fonts.resolveAssetUrl so the bundled .woff2 are served.`);
|
|
313853
|
-
}
|
|
313854
|
-
}, registriesByFontSet, domlessRegistry = null, hashParagraphBorder$2 = (border) => {
|
|
314411
|
+
}, hashParagraphBorder$2 = (border) => {
|
|
313855
314412
|
const parts = [];
|
|
313856
314413
|
if (border.style !== undefined)
|
|
313857
314414
|
parts.push(`s:${border.style}`);
|
|
@@ -321764,8 +322321,8 @@ menclose::after {
|
|
|
321764
322321
|
return typeof width === "number" ? width : 0;
|
|
321765
322322
|
}, isLineBreakRun$1 = (run2) => run2.kind === "lineBreak" || run2.kind === "break" && run2.breakType === "line", markerFontString = (run2) => {
|
|
321766
322323
|
const size$1 = run2?.fontSize ?? 16;
|
|
321767
|
-
const
|
|
321768
|
-
return `${run2?.italic ? "italic " : ""}${run2?.bold ? "bold " : ""}${size$1}px ${
|
|
322324
|
+
const family2 = run2?.fontFamily ?? "Arial";
|
|
322325
|
+
return `${run2?.italic ? "italic " : ""}${run2?.bold ? "bold " : ""}${size$1}px ${family2}`.trim();
|
|
321769
322326
|
}, buildTabStopsPx$1 = (indent2, tabs, tabIntervalTwips) => {
|
|
321770
322327
|
const paragraphIndentTwips = {
|
|
321771
322328
|
left: pxToTwips$1(sanitizeIndent$1(indent2?.left)),
|
|
@@ -329207,7 +329764,7 @@ menclose::after {
|
|
|
329207
329764
|
const usedFaces = this.#getUsedFaces?.() ?? [];
|
|
329208
329765
|
const faceRows = buildFaceReport(usedFaces, registry2, resolver2);
|
|
329209
329766
|
const usedFamilies = new Set(usedFaces.map((u) => u.logicalFamily.toLowerCase()));
|
|
329210
|
-
const declaredRows = buildFontReport(declared.filter((
|
|
329767
|
+
const declaredRows = buildFontReport(declared.filter((family2) => family2 && !usedFamilies.has(family2.toLowerCase())), registry2, resolver2);
|
|
329211
329768
|
return [...faceRows, ...declaredRows];
|
|
329212
329769
|
}
|
|
329213
329770
|
async ensureReadyForMeasure() {
|
|
@@ -329225,7 +329782,7 @@ menclose::after {
|
|
|
329225
329782
|
}
|
|
329226
329783
|
const keyed = required.map((r$1) => ({
|
|
329227
329784
|
request: r$1,
|
|
329228
|
-
key:
|
|
329785
|
+
key: faceKeyOf2(r$1.family, r$1.weight, r$1.style)
|
|
329229
329786
|
}));
|
|
329230
329787
|
const signature = keyed.map((k$1) => k$1.key).sort().join("|");
|
|
329231
329788
|
if (signature === this.#requiredSignature && keyed.every((k$1) => registry2.getFaceStatus(k$1.request) === "loaded") && this.#lastSummary)
|
|
@@ -329242,7 +329799,7 @@ menclose::after {
|
|
|
329242
329799
|
}
|
|
329243
329800
|
const failedKeys = [];
|
|
329244
329801
|
for (const result of results) {
|
|
329245
|
-
const key2 =
|
|
329802
|
+
const key2 = faceKeyOf2(result.request.family, result.request.weight, result.request.style);
|
|
329246
329803
|
if (result.status === "loaded")
|
|
329247
329804
|
this.#seenAvailableFaces.add(key2);
|
|
329248
329805
|
else if (result.status === "failed" && !this.#seenFailedFaces.has(key2)) {
|
|
@@ -329264,7 +329821,7 @@ menclose::after {
|
|
|
329264
329821
|
return this.#lastSummary ?? emptySummary();
|
|
329265
329822
|
}
|
|
329266
329823
|
const signature = required.slice().sort().join("|");
|
|
329267
|
-
if (signature === this.#requiredSignature && required.every((
|
|
329824
|
+
if (signature === this.#requiredSignature && required.every((family2) => registry2.getStatus(family2) === "loaded") && this.#lastSummary)
|
|
329268
329825
|
return this.#lastSummary;
|
|
329269
329826
|
this.#requiredSignature = signature;
|
|
329270
329827
|
this.#requiredFamilies = new Set(required);
|
|
@@ -329352,7 +329909,7 @@ menclose::after {
|
|
|
329352
329909
|
return;
|
|
329353
329910
|
const changedKeys = [];
|
|
329354
329911
|
if (this.#requiredFaceKeys.size > 0) {
|
|
329355
|
-
const loadedFaceKeys = new Set(faces.map((face) =>
|
|
329912
|
+
const loadedFaceKeys = new Set(faces.map((face) => faceKeyOf2(face.family, normalizeWeightToken(face.weight), normalizeStyleToken(face.style))));
|
|
329356
329913
|
for (const key2 of this.#requiredFaceKeys) {
|
|
329357
329914
|
if (this.#seenAvailableFaces.has(key2))
|
|
329358
329915
|
continue;
|
|
@@ -329362,13 +329919,13 @@ menclose::after {
|
|
|
329362
329919
|
}
|
|
329363
329920
|
}
|
|
329364
329921
|
} else {
|
|
329365
|
-
const loadedFamilies = new Set(faces.map((face) =>
|
|
329366
|
-
for (const
|
|
329367
|
-
if (this.#seenAvailable.has(
|
|
329922
|
+
const loadedFamilies = new Set(faces.map((face) => normalizeFamilyKey2(face.family)));
|
|
329923
|
+
for (const family2 of this.#requiredFamilies) {
|
|
329924
|
+
if (this.#seenAvailable.has(family2))
|
|
329368
329925
|
continue;
|
|
329369
|
-
if (loadedFamilies.has(
|
|
329370
|
-
this.#seenAvailable.add(
|
|
329371
|
-
changedKeys.push(
|
|
329926
|
+
if (loadedFamilies.has(normalizeFamilyKey2(family2))) {
|
|
329927
|
+
this.#seenAvailable.add(family2);
|
|
329928
|
+
changedKeys.push(normalizeFamilyKey2(family2));
|
|
329372
329929
|
}
|
|
329373
329930
|
}
|
|
329374
329931
|
}
|
|
@@ -329405,8 +329962,8 @@ menclose::after {
|
|
|
329405
329962
|
}
|
|
329406
329963
|
unmap(families) {
|
|
329407
329964
|
const before2 = this.#resolver.signature;
|
|
329408
|
-
for (const
|
|
329409
|
-
this.#resolver.unmap(
|
|
329965
|
+
for (const family2 of Array.isArray(families) ? families : [families])
|
|
329966
|
+
this.#resolver.unmap(family2);
|
|
329410
329967
|
this.#reflowIfChanged(before2);
|
|
329411
329968
|
}
|
|
329412
329969
|
reset() {
|
|
@@ -329446,17 +330003,17 @@ menclose::after {
|
|
|
329446
330003
|
throw new Error("[superdoc] fonts.add: the font registry is not ready yet");
|
|
329447
330004
|
let changed = false;
|
|
329448
330005
|
for (const entry of families) {
|
|
329449
|
-
const
|
|
330006
|
+
const family2 = entry?.family;
|
|
329450
330007
|
const faces = entry?.faces;
|
|
329451
|
-
if (typeof
|
|
330008
|
+
if (typeof family2 !== "string" || !family2.trim())
|
|
329452
330009
|
throw new Error('[superdoc] fonts.add: each family needs a non-empty "family" name');
|
|
329453
330010
|
if (!Array.isArray(faces) || faces.length === 0)
|
|
329454
|
-
throw new Error(`[superdoc] fonts.add: family "${
|
|
330011
|
+
throw new Error(`[superdoc] fonts.add: family "${family2}" needs at least one face in "faces"`);
|
|
329455
330012
|
for (const face of faces) {
|
|
329456
330013
|
if (!face || typeof face.source !== "string" || !face.source.trim())
|
|
329457
|
-
throw new Error(`[superdoc] fonts.add: family "${
|
|
330014
|
+
throw new Error(`[superdoc] fonts.add: family "${family2}" has a face with no "source" URL`);
|
|
329458
330015
|
if (registry2.register({
|
|
329459
|
-
family:
|
|
330016
|
+
family: family2,
|
|
329460
330017
|
source: toCssFontSource(face.source),
|
|
329461
330018
|
descriptors: {
|
|
329462
330019
|
weight: face.weight == null ? undefined : String(face.weight),
|
|
@@ -329476,7 +330033,7 @@ menclose::after {
|
|
|
329476
330033
|
const registry2 = this.#getGate()?.resolveRegistry();
|
|
329477
330034
|
if (!registry2)
|
|
329478
330035
|
throw new Error("[superdoc] fonts.preload: the font registry is not ready yet");
|
|
329479
|
-
const hasFace = (
|
|
330036
|
+
const hasFace = (family2, weight, style2) => registry2.hasFace(family2, weight, style2);
|
|
329480
330037
|
const face = {
|
|
329481
330038
|
weight: "400",
|
|
329482
330039
|
style: "normal"
|
|
@@ -329599,7 +330156,7 @@ menclose::after {
|
|
|
329599
330156
|
return;
|
|
329600
330157
|
console.log(...args$1);
|
|
329601
330158
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions, TRACKED_MARK_NAMES;
|
|
329602
|
-
var
|
|
330159
|
+
var init_src_BjtupAUl_es = __esm(() => {
|
|
329603
330160
|
init_rolldown_runtime_Bg48TavK_es();
|
|
329604
330161
|
init_SuperConverter_bEQ45IUD_es();
|
|
329605
330162
|
init_jszip_C49i9kUs_es();
|
|
@@ -329613,6 +330170,7 @@ var init_src_BhZiOqOm_es = __esm(() => {
|
|
|
329613
330170
|
init_remark_stringify_6MMJfY0k_es();
|
|
329614
330171
|
init_DocxZipper_Bu2Fhqkw_es();
|
|
329615
330172
|
init__plugin_vue_export_helper_5t5P5NuM_es();
|
|
330173
|
+
init_create_super_doc_ui_tVaowTvG_es();
|
|
329616
330174
|
init_eventemitter3_BnGqBE_Q_es();
|
|
329617
330175
|
init_errors_CNaD6vcg_es();
|
|
329618
330176
|
init_blank_docx_1Y_uWgjm_es();
|
|
@@ -350251,44 +350809,15 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
350251
350809
|
};
|
|
350252
350810
|
}
|
|
350253
350811
|
}, [["__scopeId", "data-v-d25821a5"]]);
|
|
350254
|
-
TOOLBAR_FONTS =
|
|
350255
|
-
|
|
350256
|
-
|
|
350257
|
-
|
|
350258
|
-
|
|
350259
|
-
|
|
350260
|
-
|
|
350261
|
-
"data-item": "btn-fontFamily-option"
|
|
350262
|
-
}
|
|
350263
|
-
},
|
|
350264
|
-
{
|
|
350265
|
-
label: "Arial",
|
|
350266
|
-
key: "Arial, sans-serif",
|
|
350267
|
-
fontWeight: 400,
|
|
350268
|
-
props: {
|
|
350269
|
-
style: { fontFamily: "Arial, sans-serif" },
|
|
350270
|
-
"data-item": "btn-fontFamily-option"
|
|
350271
|
-
}
|
|
350272
|
-
},
|
|
350273
|
-
{
|
|
350274
|
-
label: "Courier New",
|
|
350275
|
-
key: "Courier New, monospace",
|
|
350276
|
-
fontWeight: 400,
|
|
350277
|
-
props: {
|
|
350278
|
-
style: { fontFamily: "Courier New, monospace" },
|
|
350279
|
-
"data-item": "btn-fontFamily-option"
|
|
350280
|
-
}
|
|
350281
|
-
},
|
|
350282
|
-
{
|
|
350283
|
-
label: "Times New Roman",
|
|
350284
|
-
key: "Times New Roman, serif",
|
|
350285
|
-
fontWeight: 400,
|
|
350286
|
-
props: {
|
|
350287
|
-
style: { fontFamily: "Times New Roman, serif" },
|
|
350288
|
-
"data-item": "btn-fontFamily-option"
|
|
350289
|
-
}
|
|
350812
|
+
TOOLBAR_FONTS = getDefaultFontOfferings().map((offering) => ({
|
|
350813
|
+
label: offering.logicalFamily,
|
|
350814
|
+
key: fontOfferingStack(offering),
|
|
350815
|
+
fontWeight: 400,
|
|
350816
|
+
props: {
|
|
350817
|
+
style: { fontFamily: fontOfferingRenderStack(offering) },
|
|
350818
|
+
"data-item": "btn-fontFamily-option"
|
|
350290
350819
|
}
|
|
350291
|
-
|
|
350820
|
+
}));
|
|
350292
350821
|
TOOLBAR_FONT_SIZES = [
|
|
350293
350822
|
{
|
|
350294
350823
|
label: "8",
|
|
@@ -356601,229 +357130,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
356601
357130
|
wave: 1,
|
|
356602
357131
|
doubleWave: 2
|
|
356603
357132
|
};
|
|
356604
|
-
SETTLED_STATUSES = [
|
|
356605
|
-
"loaded",
|
|
356606
|
-
"failed",
|
|
356607
|
-
"timed_out",
|
|
356608
|
-
"fallback_used"
|
|
356609
|
-
];
|
|
356610
|
-
SUBSTITUTION_EVIDENCE = Object.freeze([
|
|
356611
|
-
{
|
|
356612
|
-
evidenceId: "calibri",
|
|
356613
|
-
logicalFamily: "Calibri",
|
|
356614
|
-
physicalFamily: "Carlito",
|
|
356615
|
-
verdict: "metric_safe",
|
|
356616
|
-
faces: {
|
|
356617
|
-
regular: true,
|
|
356618
|
-
bold: true,
|
|
356619
|
-
italic: true,
|
|
356620
|
-
boldItalic: true
|
|
356621
|
-
},
|
|
356622
|
-
advance: {
|
|
356623
|
-
meanDelta: 0,
|
|
356624
|
-
maxDelta: 0
|
|
356625
|
-
},
|
|
356626
|
-
gates: {
|
|
356627
|
-
static: "pass",
|
|
356628
|
-
metric: "pass",
|
|
356629
|
-
layout: "pass",
|
|
356630
|
-
ship: "pass"
|
|
356631
|
-
},
|
|
356632
|
-
policyAction: "substitute",
|
|
356633
|
-
measurementRefs: ["calibri__carlito#analytic_advance#2026-06-03", "calibri__carlito#face_aggregate#2026-06-03"],
|
|
356634
|
-
candidateLicense: "OFL-1.1",
|
|
356635
|
-
exportRule: "preserve_original_name"
|
|
356636
|
-
},
|
|
356637
|
-
{
|
|
356638
|
-
evidenceId: "cambria",
|
|
356639
|
-
logicalFamily: "Cambria",
|
|
356640
|
-
physicalFamily: "Caladea",
|
|
356641
|
-
verdict: "visual_only",
|
|
356642
|
-
faceVerdicts: {
|
|
356643
|
-
regular: "metric_safe",
|
|
356644
|
-
bold: "metric_safe",
|
|
356645
|
-
italic: "metric_safe",
|
|
356646
|
-
boldItalic: "visual_only"
|
|
356647
|
-
},
|
|
356648
|
-
glyphExceptions: [{
|
|
356649
|
-
slot: "boldItalic",
|
|
356650
|
-
codepoint: 96,
|
|
356651
|
-
advanceDelta: 0.231,
|
|
356652
|
-
note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow."
|
|
356653
|
-
}],
|
|
356654
|
-
faces: {
|
|
356655
|
-
regular: true,
|
|
356656
|
-
bold: true,
|
|
356657
|
-
italic: true,
|
|
356658
|
-
boldItalic: true
|
|
356659
|
-
},
|
|
356660
|
-
advance: {
|
|
356661
|
-
meanDelta: 0.0002378,
|
|
356662
|
-
maxDelta: 0.2310758
|
|
356663
|
-
},
|
|
356664
|
-
gates: {
|
|
356665
|
-
static: "pass",
|
|
356666
|
-
metric: "pass",
|
|
356667
|
-
layout: "not_run",
|
|
356668
|
-
ship: "pass"
|
|
356669
|
-
},
|
|
356670
|
-
policyAction: "substitute",
|
|
356671
|
-
measurementRefs: [
|
|
356672
|
-
"cambria_regular__caladea#regular#w400#d2f6cad3#analytic_advance#2026-06-04",
|
|
356673
|
-
"cambria_bold__caladea#bold#w700#74eda4fc#analytic_advance#2026-06-04",
|
|
356674
|
-
"cambria_italic__caladea#italic#w400#9c968bf6#analytic_advance#2026-06-04",
|
|
356675
|
-
"cambria_boldItalic__caladea#boldItalic#w700#f47a35ad#analytic_advance#2026-06-04"
|
|
356676
|
-
],
|
|
356677
|
-
candidateLicense: "Apache-2.0",
|
|
356678
|
-
exportRule: "preserve_original_name"
|
|
356679
|
-
},
|
|
356680
|
-
{
|
|
356681
|
-
evidenceId: "arial",
|
|
356682
|
-
logicalFamily: "Arial",
|
|
356683
|
-
physicalFamily: "Liberation Sans",
|
|
356684
|
-
verdict: "metric_safe",
|
|
356685
|
-
faces: {
|
|
356686
|
-
regular: true,
|
|
356687
|
-
bold: true,
|
|
356688
|
-
italic: true,
|
|
356689
|
-
boldItalic: true
|
|
356690
|
-
},
|
|
356691
|
-
advance: {
|
|
356692
|
-
meanDelta: 0,
|
|
356693
|
-
maxDelta: 0
|
|
356694
|
-
},
|
|
356695
|
-
gates: {
|
|
356696
|
-
static: "pass",
|
|
356697
|
-
metric: "pass",
|
|
356698
|
-
layout: "not_run",
|
|
356699
|
-
ship: "pass"
|
|
356700
|
-
},
|
|
356701
|
-
policyAction: "substitute",
|
|
356702
|
-
measurementRefs: ["arial__liberation-sans#analytic_advance#2026-06-03"],
|
|
356703
|
-
candidateLicense: "OFL-1.1",
|
|
356704
|
-
exportRule: "preserve_original_name"
|
|
356705
|
-
},
|
|
356706
|
-
{
|
|
356707
|
-
evidenceId: "times-new-roman",
|
|
356708
|
-
logicalFamily: "Times New Roman",
|
|
356709
|
-
physicalFamily: "Liberation Serif",
|
|
356710
|
-
verdict: "metric_safe",
|
|
356711
|
-
faces: {
|
|
356712
|
-
regular: true,
|
|
356713
|
-
bold: true,
|
|
356714
|
-
italic: true,
|
|
356715
|
-
boldItalic: true
|
|
356716
|
-
},
|
|
356717
|
-
advance: {
|
|
356718
|
-
meanDelta: 0,
|
|
356719
|
-
maxDelta: 0
|
|
356720
|
-
},
|
|
356721
|
-
gates: {
|
|
356722
|
-
static: "pass",
|
|
356723
|
-
metric: "pass",
|
|
356724
|
-
layout: "not_run",
|
|
356725
|
-
ship: "pass"
|
|
356726
|
-
},
|
|
356727
|
-
policyAction: "substitute",
|
|
356728
|
-
measurementRefs: ["times-new-roman__liberation-serif#analytic_advance#2026-06-03"],
|
|
356729
|
-
candidateLicense: "OFL-1.1",
|
|
356730
|
-
exportRule: "preserve_original_name"
|
|
356731
|
-
},
|
|
356732
|
-
{
|
|
356733
|
-
evidenceId: "courier-new",
|
|
356734
|
-
logicalFamily: "Courier New",
|
|
356735
|
-
physicalFamily: "Liberation Mono",
|
|
356736
|
-
verdict: "metric_safe",
|
|
356737
|
-
faces: {
|
|
356738
|
-
regular: true,
|
|
356739
|
-
bold: true,
|
|
356740
|
-
italic: true,
|
|
356741
|
-
boldItalic: true
|
|
356742
|
-
},
|
|
356743
|
-
advance: {
|
|
356744
|
-
meanDelta: 0,
|
|
356745
|
-
maxDelta: 0
|
|
356746
|
-
},
|
|
356747
|
-
gates: {
|
|
356748
|
-
static: "pass",
|
|
356749
|
-
metric: "pass",
|
|
356750
|
-
layout: "not_run",
|
|
356751
|
-
ship: "pass"
|
|
356752
|
-
},
|
|
356753
|
-
policyAction: "substitute",
|
|
356754
|
-
measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
|
|
356755
|
-
candidateLicense: "OFL-1.1",
|
|
356756
|
-
exportRule: "preserve_original_name"
|
|
356757
|
-
},
|
|
356758
|
-
{
|
|
356759
|
-
evidenceId: "helvetica",
|
|
356760
|
-
logicalFamily: "Helvetica",
|
|
356761
|
-
physicalFamily: "Liberation Sans",
|
|
356762
|
-
verdict: "metric_safe",
|
|
356763
|
-
faces: {
|
|
356764
|
-
regular: true,
|
|
356765
|
-
bold: true,
|
|
356766
|
-
italic: true,
|
|
356767
|
-
boldItalic: true
|
|
356768
|
-
},
|
|
356769
|
-
advance: {
|
|
356770
|
-
meanDelta: 0,
|
|
356771
|
-
maxDelta: 0
|
|
356772
|
-
},
|
|
356773
|
-
gates: {
|
|
356774
|
-
static: "not_run",
|
|
356775
|
-
metric: "pass",
|
|
356776
|
-
layout: "not_run",
|
|
356777
|
-
ship: "fail"
|
|
356778
|
-
},
|
|
356779
|
-
policyAction: "substitute",
|
|
356780
|
-
measurementRefs: ["helvetica__liberation-sans#analytic_advance#2026-06-03"],
|
|
356781
|
-
candidateLicense: "OFL-1.1",
|
|
356782
|
-
exportRule: "preserve_original_name"
|
|
356783
|
-
},
|
|
356784
|
-
{
|
|
356785
|
-
evidenceId: "calibri-light",
|
|
356786
|
-
logicalFamily: "Calibri Light",
|
|
356787
|
-
physicalFamily: "Carlito",
|
|
356788
|
-
verdict: "visual_only",
|
|
356789
|
-
faces: {
|
|
356790
|
-
regular: false,
|
|
356791
|
-
bold: false,
|
|
356792
|
-
italic: false,
|
|
356793
|
-
boldItalic: false
|
|
356794
|
-
},
|
|
356795
|
-
advance: {
|
|
356796
|
-
meanDelta: 0.0148,
|
|
356797
|
-
maxDelta: 0.066
|
|
356798
|
-
},
|
|
356799
|
-
gates: {
|
|
356800
|
-
static: "not_run",
|
|
356801
|
-
metric: "fail",
|
|
356802
|
-
layout: "not_run",
|
|
356803
|
-
ship: "fail"
|
|
356804
|
-
},
|
|
356805
|
-
policyAction: "category_fallback",
|
|
356806
|
-
measurementRefs: ["calibri-light__carlito#analytic_advance#2026-06-05"],
|
|
356807
|
-
candidateLicense: "OFL-1.1",
|
|
356808
|
-
exportRule: "preserve_original_name"
|
|
356809
|
-
}
|
|
356810
|
-
]);
|
|
356811
|
-
BUNDLED_SUBSTITUTES = deriveBundledSubstitutes();
|
|
356812
|
-
CATEGORY_FALLBACKS = deriveCategoryFallbacks();
|
|
356813
|
-
defaultResolver = new FontResolver;
|
|
356814
|
-
DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
|
|
356815
|
-
resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
|
|
356816
|
-
fontSignature: ""
|
|
356817
|
-
});
|
|
356818
|
-
BUNDLED_MANIFEST = Object.freeze([
|
|
356819
|
-
family("Carlito", "Carlito", "OFL-1.1"),
|
|
356820
|
-
family("Caladea", "Caladea", "Apache-2.0"),
|
|
356821
|
-
family("Liberation Sans", "LiberationSans", "OFL-1.1"),
|
|
356822
|
-
family("Liberation Serif", "LiberationSerif", "OFL-1.1"),
|
|
356823
|
-
family("Liberation Mono", "LiberationMono", "OFL-1.1")
|
|
356824
|
-
]);
|
|
356825
|
-
installedRegistries = /* @__PURE__ */ new WeakMap;
|
|
356826
|
-
registriesByFontSet = /* @__PURE__ */ new WeakMap;
|
|
356827
357133
|
PX_PER_PT$12 = 96 / 72;
|
|
356828
357134
|
BORDER_SIDES3 = [
|
|
356829
357135
|
"top",
|
|
@@ -358109,7 +358415,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
358109
358415
|
});
|
|
358110
358416
|
#fontPlanBlocks = null;
|
|
358111
358417
|
#fontPlan = null;
|
|
358112
|
-
#hasFace = (
|
|
358418
|
+
#hasFace = (family2, weight, style2) => this.#fontGate ? this.#fontGate.resolveRegistry().hasFace(family2, weight, style2) : false;
|
|
358113
358419
|
#lastFontsChangedKey = null;
|
|
358114
358420
|
#lastFontsChangedVersion = -1;
|
|
358115
358421
|
#lastFontsChangedPayload = null;
|
|
@@ -364685,39 +364991,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
364685
364991
|
]);
|
|
364686
364992
|
});
|
|
364687
364993
|
|
|
364688
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-C2hkLuct.es.js
|
|
364689
|
-
var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
364690
|
-
var init_create_super_doc_ui_C2hkLuct_es = __esm(() => {
|
|
364691
|
-
init_SuperConverter_bEQ45IUD_es();
|
|
364692
|
-
init_create_headless_toolbar_BmFWtej0_es();
|
|
364693
|
-
MOD_ALIASES = new Set([
|
|
364694
|
-
"Mod",
|
|
364695
|
-
"Meta",
|
|
364696
|
-
"Cmd",
|
|
364697
|
-
"Command"
|
|
364698
|
-
]);
|
|
364699
|
-
ALT_ALIASES = new Set(["Alt", "Option"]);
|
|
364700
|
-
CTRL_ALIASES = new Set(["Control", "Ctrl"]);
|
|
364701
|
-
SHIFT_ALIASES = new Set(["Shift"]);
|
|
364702
|
-
BUILTIN_CONTEXT_MENU_GROUPS = [
|
|
364703
|
-
"format",
|
|
364704
|
-
"clipboard",
|
|
364705
|
-
"review",
|
|
364706
|
-
"comment",
|
|
364707
|
-
"link"
|
|
364708
|
-
];
|
|
364709
|
-
BUILTIN_GROUP_ORDER = new Map(BUILTIN_CONTEXT_MENU_GROUPS.map((g3, i4) => [g3, i4]));
|
|
364710
|
-
RESERVED_PROXY_PROPERTY_NAMES = new Set([
|
|
364711
|
-
"register",
|
|
364712
|
-
"get",
|
|
364713
|
-
"has",
|
|
364714
|
-
"require",
|
|
364715
|
-
"getContextMenuItems"
|
|
364716
|
-
]);
|
|
364717
|
-
ALL_TOOLBAR_COMMAND_IDS = Object.keys(createToolbarRegistry());
|
|
364718
|
-
EMPTY_ACTIVE_IDS = Object.freeze([]);
|
|
364719
|
-
});
|
|
364720
|
-
|
|
364721
364994
|
// ../../packages/superdoc/dist/chunks/ui-C5PAS9hY.es.js
|
|
364722
364995
|
var init_ui_C5PAS9hY_es = () => {};
|
|
364723
364996
|
|
|
@@ -364731,7 +365004,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
364731
365004
|
|
|
364732
365005
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
364733
365006
|
var init_super_editor_es = __esm(() => {
|
|
364734
|
-
|
|
365007
|
+
init_src_BjtupAUl_es();
|
|
364735
365008
|
init_SuperConverter_bEQ45IUD_es();
|
|
364736
365009
|
init_jszip_C49i9kUs_es();
|
|
364737
365010
|
init_xml_js_CqGKpaft_es();
|
|
@@ -364740,7 +365013,7 @@ var init_super_editor_es = __esm(() => {
|
|
|
364740
365013
|
init_dist_B8HfvhaK_es();
|
|
364741
365014
|
init_unified_Dsuw2be5_es();
|
|
364742
365015
|
init_DocxZipper_Bu2Fhqkw_es();
|
|
364743
|
-
|
|
365016
|
+
init_create_super_doc_ui_tVaowTvG_es();
|
|
364744
365017
|
init_ui_C5PAS9hY_es();
|
|
364745
365018
|
init_eventemitter3_BnGqBE_Q_es();
|
|
364746
365019
|
init_errors_CNaD6vcg_es();
|