@platforma-open/milaboratories.top-antibodies 5.0.0 → 5.1.0
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/block-pack/main.plj.gz +0 -0
- package/block-pack/manifest.json +1 -1
- package/block-pack/model.json +1 -1
- package/block-pack/published.json +1 -1
- package/block-pack/ui.tgz +0 -0
- package/dist/AGENTS.d.ts +131 -160
- package/dist/AGENTS.d.ts.map +1 -1
- package/dist/index.d.ts +131 -160
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +699 -1163
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-B-1-B7_t.js";
|
|
2
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
2
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/plugin_handle.js
|
|
3
3
|
const PLUGIN_OUTPUT_PREFIX = "plugin-output#";
|
|
4
4
|
/** Construct the output key for a plugin output in the block outputs map. */
|
|
5
5
|
function pluginOutputKey(handle, outputKey) {
|
|
6
6
|
return `${PLUGIN_OUTPUT_PREFIX}${handle}#${outputKey}`;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/block_storage.js
|
|
10
10
|
/**
|
|
11
11
|
* Discriminator key for BlockStorage format detection.
|
|
12
12
|
* This unique hash-based key identifies data as BlockStorage vs legacy formats.
|
|
@@ -3815,7 +3815,7 @@ objectType({
|
|
|
3815
3815
|
content: stringType()
|
|
3816
3816
|
});
|
|
3817
3817
|
//#endregion
|
|
3818
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
3818
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/bmodel/block_kind_ref.js
|
|
3819
3819
|
/**
|
|
3820
3820
|
* Compose a {@link BlockKindReference} from a kind's `name`/`version`.
|
|
3821
3821
|
*
|
|
@@ -3831,7 +3831,7 @@ objectType({
|
|
|
3831
3831
|
to: numberType().min(1)
|
|
3832
3832
|
});
|
|
3833
3833
|
//#endregion
|
|
3834
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
3834
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/util.js
|
|
3835
3835
|
function assertNever(x) {
|
|
3836
3836
|
throw new Error("Unexpected object: " + x);
|
|
3837
3837
|
}
|
|
@@ -3843,7 +3843,7 @@ function uniqueBy(array, makeId) {
|
|
|
3843
3843
|
return [...new Map(array.map((e) => [makeId(e), e])).values()];
|
|
3844
3844
|
}
|
|
3845
3845
|
//#endregion
|
|
3846
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
3846
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/data_info.js
|
|
3847
3847
|
/**
|
|
3848
3848
|
* Type guard function that checks if the given value is a valid DataInfo.
|
|
3849
3849
|
*
|
|
@@ -4034,7 +4034,7 @@ function entriesToDataInfo(dataInfoEntries) {
|
|
|
4034
4034
|
}
|
|
4035
4035
|
}
|
|
4036
4036
|
//#endregion
|
|
4037
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
4037
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/errors.js
|
|
4038
4038
|
var ServiceError = class extends Error {
|
|
4039
4039
|
name = "ServiceError";
|
|
4040
4040
|
};
|
|
@@ -4058,7 +4058,7 @@ function ensureError(value) {
|
|
|
4058
4058
|
return new Error(stringifyValue(value));
|
|
4059
4059
|
}
|
|
4060
4060
|
//#endregion
|
|
4061
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
4061
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/json.js
|
|
4062
4062
|
var import_canonicalize = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4063
4063
|
module.exports = function serialize(object) {
|
|
4064
4064
|
if (typeof object === "number" && isNaN(object)) throw new Error("NaN is not allowed");
|
|
@@ -4091,7 +4091,7 @@ function parseJsonSafely(value, fallback) {
|
|
|
4091
4091
|
}
|
|
4092
4092
|
}
|
|
4093
4093
|
//#endregion
|
|
4094
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
4094
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js
|
|
4095
4095
|
function readMetadata(metadata, key) {
|
|
4096
4096
|
return metadata?.[key];
|
|
4097
4097
|
}
|
|
@@ -4419,7 +4419,7 @@ function matchAxisId(query, target) {
|
|
|
4419
4419
|
return query.name === target.name && matchDomain$1(query.domain, target.domain) && matchDomain$1(query.contextDomain, target.contextDomain);
|
|
4420
4420
|
}
|
|
4421
4421
|
//#endregion
|
|
4422
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
4422
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/query/utils.js
|
|
4423
4423
|
const BOOLEAN_TYPES = /* @__PURE__ */ new Set([
|
|
4424
4424
|
"numericComparison",
|
|
4425
4425
|
"stringEquals",
|
|
@@ -4524,7 +4524,7 @@ function collectSpecQueryColumns(query) {
|
|
|
4524
4524
|
return result;
|
|
4525
4525
|
}
|
|
4526
4526
|
//#endregion
|
|
4527
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
4527
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_calculate.js
|
|
4528
4528
|
function mapPTableDef(def, cb) {
|
|
4529
4529
|
return {
|
|
4530
4530
|
...def,
|
|
@@ -4567,7 +4567,7 @@ function mapJoinEntry(entry, cb) {
|
|
|
4567
4567
|
}
|
|
4568
4568
|
}
|
|
4569
4569
|
//#endregion
|
|
4570
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
4570
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/table_common.js
|
|
4571
4571
|
function getPTableColumnId(spec) {
|
|
4572
4572
|
switch (spec.type) {
|
|
4573
4573
|
case "axis": return {
|
|
@@ -4581,7 +4581,7 @@ function getPTableColumnId(spec) {
|
|
|
4581
4581
|
}
|
|
4582
4582
|
}
|
|
4583
4583
|
//#endregion
|
|
4584
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
4584
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/filtered_column.js
|
|
4585
4585
|
function stringifyColumnFilteredId(key) {
|
|
4586
4586
|
return canonicalizeJson(createColumnFilteredKey(key));
|
|
4587
4587
|
}
|
|
@@ -4614,7 +4614,7 @@ function applyAxisFilters(spec, axisFilters) {
|
|
|
4614
4614
|
};
|
|
4615
4615
|
}
|
|
4616
4616
|
//#endregion
|
|
4617
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
4617
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/pool/spec.js
|
|
4618
4618
|
function isPObjectId(value) {
|
|
4619
4619
|
if (typeof value !== "string") return false;
|
|
4620
4620
|
return isPObjectKey(parseJsonSafely(value));
|
|
@@ -4740,7 +4740,7 @@ function throwError(v) {
|
|
|
4740
4740
|
else throw v;
|
|
4741
4741
|
}
|
|
4742
4742
|
//#endregion
|
|
4743
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
4743
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/discovered_column.js
|
|
4744
4744
|
function isColumnDiscoveredKey(obj) {
|
|
4745
4745
|
return typeof obj === "object" && obj !== null && "__isDiscovered" in obj;
|
|
4746
4746
|
}
|
|
@@ -4804,7 +4804,7 @@ function isString(value) {
|
|
|
4804
4804
|
return typeof value === "string";
|
|
4805
4805
|
}
|
|
4806
4806
|
//#endregion
|
|
4807
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
4807
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/ids.js
|
|
4808
4808
|
/**
|
|
4809
4809
|
* Canonically serializes a column key to a branded string id. Accepts both
|
|
4810
4810
|
* the new {@link ColumnUniversalKey} and the deprecated {@link UniversalPColumnId}
|
|
@@ -4978,7 +4978,7 @@ function extractPObjectId(id) {
|
|
|
4978
4978
|
throw new Error(`extractPObjectId: unrecognized column id structure: ${JSON.stringify(id)}`);
|
|
4979
4979
|
}
|
|
4980
4980
|
//#endregion
|
|
4981
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
4981
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/overridden.js
|
|
4982
4982
|
function isColumnOverriddenKey(obj) {
|
|
4983
4983
|
return typeof obj === "object" && obj !== null && "__isOverridden" in obj;
|
|
4984
4984
|
}
|
|
@@ -5100,7 +5100,7 @@ function mergeRecord(a, b) {
|
|
|
5100
5100
|
};
|
|
5101
5101
|
}
|
|
5102
5102
|
//#endregion
|
|
5103
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5103
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/anchored.js
|
|
5104
5104
|
function axisKey(axis) {
|
|
5105
5105
|
return (0, import_canonicalize.default)(getAxisId(axis));
|
|
5106
5106
|
}
|
|
@@ -5346,7 +5346,7 @@ function isAnchorAxisRef(value) {
|
|
|
5346
5346
|
return typeof value === "object" && "anchor" in value;
|
|
5347
5347
|
}
|
|
5348
5348
|
//#endregion
|
|
5349
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5349
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/selectors.js
|
|
5350
5350
|
/**
|
|
5351
5351
|
* Determines if an axis ID matches an axis selector.
|
|
5352
5352
|
*
|
|
@@ -5472,7 +5472,7 @@ function multiColumnSelectorsToPredicate(selectors) {
|
|
|
5472
5472
|
return (spec) => isPColumnSpec(spec) && arr.some((sel) => matchMultiColumnSelector(spec, sel));
|
|
5473
5473
|
}
|
|
5474
5474
|
//#endregion
|
|
5475
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5475
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/native_id.js
|
|
5476
5476
|
function deriveNativeId(spec) {
|
|
5477
5477
|
const result = {
|
|
5478
5478
|
kind: spec.kind,
|
|
@@ -5484,7 +5484,7 @@ function deriveNativeId(spec) {
|
|
|
5484
5484
|
return (0, import_canonicalize.default)(result);
|
|
5485
5485
|
}
|
|
5486
5486
|
//#endregion
|
|
5487
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5487
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/linker_columns.js
|
|
5488
5488
|
var LinkerMap = class LinkerMap {
|
|
5489
5489
|
/** Graph of linkers connected by axes (single or grouped by parents) */
|
|
5490
5490
|
data;
|
|
@@ -5662,7 +5662,7 @@ var LinkerMap = class LinkerMap {
|
|
|
5662
5662
|
}
|
|
5663
5663
|
};
|
|
5664
5664
|
//#endregion
|
|
5665
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5665
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/flags/block_flags.js
|
|
5666
5666
|
/**
|
|
5667
5667
|
* Required PFrames version. Bump this in lockstep with the `@milaboratories/pframes-rs-*`
|
|
5668
5668
|
* version in `pnpm-workspace.yaml` so blocks built against the new SDK refuse to load on
|
|
@@ -5725,7 +5725,7 @@ function createEnrichmentRef(hit, options = {}) {
|
|
|
5725
5725
|
};
|
|
5726
5726
|
}
|
|
5727
5727
|
//#endregion
|
|
5728
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5728
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/value_or_error.js
|
|
5729
5729
|
function mapValueInVOE(voe, cb) {
|
|
5730
5730
|
return voe.ok ? {
|
|
5731
5731
|
ok: true,
|
|
@@ -5733,7 +5733,7 @@ function mapValueInVOE(voe, cb) {
|
|
|
5733
5733
|
} : voe;
|
|
5734
5734
|
}
|
|
5735
5735
|
//#endregion
|
|
5736
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5736
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/resource_types.js
|
|
5737
5737
|
/** Well-known resource type names used across the platform. */
|
|
5738
5738
|
const ResourceTypeName = {
|
|
5739
5739
|
StreamManager: "StreamManager",
|
|
@@ -5782,7 +5782,7 @@ const ResourceTypeName = {
|
|
|
5782
5782
|
SharedEnvelope: "SharedEnvelope"
|
|
5783
5783
|
};
|
|
5784
5784
|
//#endregion
|
|
5785
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5785
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/services/service_types.js
|
|
5786
5786
|
const SERVICE_ID_PATTERN = /^[a-zA-Z][a-zA-Z0-9]*$/;
|
|
5787
5787
|
const { service, isNodeService, isWasmService, isMainService, getServiceKind, getServiceModelMethods, getServiceUiMethods } = (() => {
|
|
5788
5788
|
const typeMap = /* @__PURE__ */ new Map();
|
|
@@ -5821,7 +5821,7 @@ const { service, isNodeService, isWasmService, isMainService, getServiceKind, ge
|
|
|
5821
5821
|
};
|
|
5822
5822
|
})();
|
|
5823
5823
|
//#endregion
|
|
5824
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5824
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/services/service_declarations.js
|
|
5825
5825
|
const Services = {
|
|
5826
5826
|
PFrameSpec: service()({
|
|
5827
5827
|
type: "wasm",
|
|
@@ -5915,7 +5915,7 @@ function resolveRequiredServices(flags) {
|
|
|
5915
5915
|
}
|
|
5916
5916
|
Object.fromEntries(Object.keys(Services).map((key) => [`requires${key}`, true]));
|
|
5917
5917
|
//#endregion
|
|
5918
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5918
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/services/service_injectors.js
|
|
5919
5919
|
function buildMethodMap(pick) {
|
|
5920
5920
|
const result = {};
|
|
5921
5921
|
for (const id of Object.values(Services)) result[id] = [...pick(id)];
|
|
@@ -5924,7 +5924,7 @@ function buildMethodMap(pick) {
|
|
|
5924
5924
|
buildMethodMap(getServiceUiMethods);
|
|
5925
5925
|
buildMethodMap(getServiceModelMethods);
|
|
5926
5926
|
//#endregion
|
|
5927
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
5927
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/columns/accessor_traversal.js
|
|
5928
5928
|
/** Resource types that hold column collections — DFS stops here and collects. */
|
|
5929
5929
|
const COLLECT_TYPES = [ResourceTypeName.PFrame];
|
|
5930
5930
|
/** Resource types DFS descends through when looking for PFrames. */
|
|
@@ -6032,7 +6032,7 @@ function indexPoolBlock(block) {
|
|
|
6032
6032
|
return result;
|
|
6033
6033
|
}
|
|
6034
6034
|
//#endregion
|
|
6035
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
6035
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/columns/column_registry.js
|
|
6036
6036
|
/**
|
|
6037
6037
|
* Id-index over a set of {@link ColumnEntriesProvider}s. Sole job:
|
|
6038
6038
|
* {@link PObjectId} → {@link LeafEntry}. Generic over the accessor flavour, so
|
|
@@ -6069,7 +6069,7 @@ var ColumnRegistry = class {
|
|
|
6069
6069
|
}
|
|
6070
6070
|
};
|
|
6071
6071
|
//#endregion
|
|
6072
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
6072
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/columns/dedup.js
|
|
6073
6073
|
/**
|
|
6074
6074
|
* Two-track dedup over an item stream keyed by `ColumnUniversalId`:
|
|
6075
6075
|
*
|
|
@@ -6110,7 +6110,7 @@ function dedupColumns(items, getId, getSpec) {
|
|
|
6110
6110
|
return out;
|
|
6111
6111
|
}
|
|
6112
6112
|
//#endregion
|
|
6113
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
6113
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/columns/providers.js
|
|
6114
6114
|
/**
|
|
6115
6115
|
* Generic entries provider over a single accessor root. Walks `<root>` once
|
|
6116
6116
|
* from the supplied `rootPath`, builds an id → {@link LeafEntry} map and
|
|
@@ -6167,7 +6167,7 @@ var ResultPoolEntriesProvider = class {
|
|
|
6167
6167
|
}
|
|
6168
6168
|
};
|
|
6169
6169
|
//#endregion
|
|
6170
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
6170
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/template/template_ref_form.js
|
|
6171
6171
|
/**
|
|
6172
6172
|
* Whether `value` is a reference in the readable spelling.
|
|
6173
6173
|
*
|
|
@@ -6236,7 +6236,7 @@ function expandTemplatePlRef(ref) {
|
|
|
6236
6236
|
};
|
|
6237
6237
|
}
|
|
6238
6238
|
//#endregion
|
|
6239
|
-
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.
|
|
6239
|
+
//#region ../node_modules/.pnpm/@milaboratories+pl-model-common@1.54.0/node_modules/@milaboratories/pl-model-common/dist/template/template_relocate.js
|
|
6240
6240
|
/**
|
|
6241
6241
|
* Point every column identifier in a block's params at the blocks of the project being built.
|
|
6242
6242
|
*
|
|
@@ -6296,7 +6296,7 @@ function relocateBlockIds(params, blockIds) {
|
|
|
6296
6296
|
return walk(params);
|
|
6297
6297
|
}
|
|
6298
6298
|
//#endregion
|
|
6299
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
6299
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/block_migrations.js
|
|
6300
6300
|
/** Create a DataVersioned wrapper with correct shape */
|
|
6301
6301
|
function makeVersionedData(version, data) {
|
|
6302
6302
|
return {
|
|
@@ -6874,7 +6874,7 @@ var DataModel = class DataModel {
|
|
|
6874
6874
|
}
|
|
6875
6875
|
};
|
|
6876
6876
|
//#endregion
|
|
6877
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
6877
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/internal.js
|
|
6878
6878
|
/** Utility code helping to identify whether the code is running in actual UI environment */
|
|
6879
6879
|
function isInUI() {
|
|
6880
6880
|
return typeof globalThis.getPlatforma !== "undefined" || typeof globalThis.platforma !== "undefined";
|
|
@@ -6944,7 +6944,7 @@ function registerFutureAwait(handle, onResolve) {
|
|
|
6944
6944
|
futureResolves.get(handle).push(onResolve);
|
|
6945
6945
|
}
|
|
6946
6946
|
//#endregion
|
|
6947
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
6947
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/block_storage_facade.js
|
|
6948
6948
|
/**
|
|
6949
6949
|
* All facade callback names as constants.
|
|
6950
6950
|
* These are the source of truth - the interface is derived from these.
|
|
@@ -6982,7 +6982,7 @@ function registerFacadeCallbacks(callbacks) {
|
|
|
6982
6982
|
for (const key of Object.values(BlockStorageFacadeCallbacks)) tryRegisterCallback(key, callbacks[key]);
|
|
6983
6983
|
}
|
|
6984
6984
|
//#endregion
|
|
6985
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
6985
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/services/block_services.js
|
|
6986
6986
|
/**
|
|
6987
6987
|
* Services required by all V3 blocks by default.
|
|
6988
6988
|
* Edit this when a new service should be available to all blocks.
|
|
@@ -6998,7 +6998,7 @@ const BLOCK_SERVICE_FLAGS = {
|
|
|
6998
6998
|
};
|
|
6999
6999
|
resolveRequiredServices(BLOCK_SERVICE_FLAGS);
|
|
7000
7000
|
//#endregion
|
|
7001
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7001
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/render/future.js
|
|
7002
7002
|
var FutureRef = class FutureRef {
|
|
7003
7003
|
handle;
|
|
7004
7004
|
postProcess;
|
|
@@ -7026,7 +7026,7 @@ var FutureRef = class FutureRef {
|
|
|
7026
7026
|
}
|
|
7027
7027
|
};
|
|
7028
7028
|
//#endregion
|
|
7029
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7029
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/render/accessor.js
|
|
7030
7030
|
function ifDef(value, cb) {
|
|
7031
7031
|
return value === void 0 ? void 0 : cb(value);
|
|
7032
7032
|
}
|
|
@@ -7276,11 +7276,11 @@ var TreeNodeAccessor = class TreeNodeAccessor {
|
|
|
7276
7276
|
}
|
|
7277
7277
|
};
|
|
7278
7278
|
//#endregion
|
|
7279
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7279
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/render/internal.js
|
|
7280
7280
|
const MainAccessorName = "main";
|
|
7281
7281
|
const StagingAccessorName = "staging";
|
|
7282
7282
|
//#endregion
|
|
7283
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7283
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/render/util/axis_filtering.js
|
|
7284
7284
|
function filterDataInfoEntries(dataInfoEntries, axisFilters) {
|
|
7285
7285
|
const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
|
|
7286
7286
|
const { type } = dataInfoEntries;
|
|
@@ -7344,7 +7344,7 @@ function filterDataInfoEntries(dataInfoEntries, axisFilters) {
|
|
|
7344
7344
|
}
|
|
7345
7345
|
}
|
|
7346
7346
|
//#endregion
|
|
7347
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7347
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/labels/linked_column_postfix.js
|
|
7348
7348
|
/**
|
|
7349
7349
|
* Structural postfix derivation for linked columns (phase 2 of `deriveDistinctLabels`).
|
|
7350
7350
|
*
|
|
@@ -7516,7 +7516,10 @@ function resolveGroup(entries, indices, format) {
|
|
|
7516
7516
|
* linked columns by the difference between their sources.
|
|
7517
7517
|
*/
|
|
7518
7518
|
function derivePostfixes(entries, format = defaultLinkerFormatter) {
|
|
7519
|
-
const postfix = [...entries.reduce((acc, e, idx) =>
|
|
7519
|
+
const postfix = [...entries.reduce((acc, e, idx) => {
|
|
7520
|
+
const key = `${e.stem}\u0000${e.marker ?? ""}`;
|
|
7521
|
+
return acc.set(key, [...acc.get(key) ?? [], idx]);
|
|
7522
|
+
}, /* @__PURE__ */ new Map()).values()].reduce((acc, idxs) => {
|
|
7520
7523
|
if (idxs.length < 2) return acc;
|
|
7521
7524
|
const resolved = resolveGroup(idxs.map((i) => entries[i]), idxs, format);
|
|
7522
7525
|
return idxs.reduce((m, i, k) => m.set(i, resolved[k]), acc);
|
|
@@ -7527,7 +7530,7 @@ function derivePostfixes(entries, format = defaultLinkerFormatter) {
|
|
|
7527
7530
|
});
|
|
7528
7531
|
}
|
|
7529
7532
|
//#endregion
|
|
7530
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7533
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/labels/derive_distinct_labels.js
|
|
7531
7534
|
const DISTANCE_PENALTY = .001;
|
|
7532
7535
|
const LABEL_TYPE = "__LABEL__";
|
|
7533
7536
|
const LABEL_TYPE_FULL = "__LABEL__@1";
|
|
@@ -7549,9 +7552,10 @@ function isSyntheticType(t) {
|
|
|
7549
7552
|
function deriveDistinctLabels(values, options = {}) {
|
|
7550
7553
|
const stems = deriveStems(values, options);
|
|
7551
7554
|
return derivePostfixes(values.map((v, i) => {
|
|
7552
|
-
const { spec, linkerPath } = extractEntryParts(v);
|
|
7555
|
+
const { spec, linkerPath, marker } = extractEntryParts(v);
|
|
7553
7556
|
return {
|
|
7554
7557
|
stem: stems[i],
|
|
7558
|
+
marker,
|
|
7555
7559
|
hit: spec,
|
|
7556
7560
|
linkers: (linkerPath ?? []).map((s) => s.spec)
|
|
7557
7561
|
};
|
|
@@ -7603,13 +7607,15 @@ function extractEntryParts(entry) {
|
|
|
7603
7607
|
spec: entry,
|
|
7604
7608
|
extraTrace: void 0,
|
|
7605
7609
|
linkerPath: void 0,
|
|
7606
|
-
qualifications: void 0
|
|
7610
|
+
qualifications: void 0,
|
|
7611
|
+
marker: void 0
|
|
7607
7612
|
};
|
|
7608
7613
|
return {
|
|
7609
7614
|
spec: entry.spec,
|
|
7610
7615
|
extraTrace: entry.extraTrace,
|
|
7611
7616
|
linkerPath: entry.linkerPath,
|
|
7612
|
-
qualifications: entry.qualifications
|
|
7617
|
+
qualifications: entry.qualifications,
|
|
7618
|
+
marker: entry.marker
|
|
7613
7619
|
};
|
|
7614
7620
|
}
|
|
7615
7621
|
function formatQualification(q) {
|
|
@@ -7956,7 +7962,7 @@ function repairBareLabels(labels, minimized, records, stats, forceTraceElements,
|
|
|
7956
7962
|
return patched;
|
|
7957
7963
|
}
|
|
7958
7964
|
//#endregion
|
|
7959
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7965
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/render/util/label.js
|
|
7960
7966
|
/** @deprecated Use deriveDistinctLabels */
|
|
7961
7967
|
function deriveLabels(values, getSpec, options = {}) {
|
|
7962
7968
|
return deriveDistinctLabels(values.map(getSpec), options).map((label, i) => ({
|
|
@@ -7965,7 +7971,7 @@ function deriveLabels(values, getSpec, options = {}) {
|
|
|
7965
7971
|
}));
|
|
7966
7972
|
}
|
|
7967
7973
|
//#endregion
|
|
7968
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
7974
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/render/util/pcolumn_data.js
|
|
7969
7975
|
const RT_RESOURCE_MAP = "PColumnData/ResourceMap";
|
|
7970
7976
|
const RT_RESOURCE_MAP_PARTITIONED = "PColumnData/Partitioned/ResourceMap";
|
|
7971
7977
|
const RT_JSON_PARTITIONED = "PColumnData/JsonPartitioned";
|
|
@@ -8263,7 +8269,7 @@ function allPColumnsReady(columns) {
|
|
|
8263
8269
|
return columns.every(isPColumnReady);
|
|
8264
8270
|
}
|
|
8265
8271
|
//#endregion
|
|
8266
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
8272
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/render/util/column_collection.js
|
|
8267
8273
|
function isPColumnValues(value) {
|
|
8268
8274
|
if (!Array.isArray(value)) return false;
|
|
8269
8275
|
if (value.length === 0) return true;
|
|
@@ -8541,7 +8547,7 @@ var PColumnCollection = class {
|
|
|
8541
8547
|
}
|
|
8542
8548
|
};
|
|
8543
8549
|
//#endregion
|
|
8544
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
8550
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/services/service_bridge.js
|
|
8545
8551
|
/**
|
|
8546
8552
|
* Builds a ServiceProxy from a ServiceDispatch.
|
|
8547
8553
|
* Each service method call is forwarded to dispatch.callServiceMethod.
|
|
@@ -8550,7 +8556,7 @@ function createServiceProxy(dispatch) {
|
|
|
8550
8556
|
return ((serviceId) => Object.freeze(Object.fromEntries(dispatch.getServiceMethods(serviceId).map((method) => [method, (...args) => dispatch.callServiceMethod(serviceId, method, ...args)]))));
|
|
8551
8557
|
}
|
|
8552
8558
|
//#endregion
|
|
8553
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
8559
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/services/get_services.js
|
|
8554
8560
|
const cachedServices = /* @__PURE__ */ new WeakMap();
|
|
8555
8561
|
function getService(name, deps) {
|
|
8556
8562
|
const ctx = deps?.ctx ?? getCfgRenderCtx();
|
|
@@ -8564,7 +8570,7 @@ function getService(name, deps) {
|
|
|
8564
8570
|
})();
|
|
8565
8571
|
}
|
|
8566
8572
|
//#endregion
|
|
8567
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
8573
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/render/util/pframe_upgraders.js
|
|
8568
8574
|
function patchInSetFilters(filters) {
|
|
8569
8575
|
const inSetToOrEqual = (predicate) => {
|
|
8570
8576
|
if (predicate.operator !== "InSet") return predicate;
|
|
@@ -8602,7 +8608,7 @@ function patchInSetFilters(filters) {
|
|
|
8602
8608
|
return filters.map((filter) => mapFilter(filter, inSetToOrEqual));
|
|
8603
8609
|
}
|
|
8604
8610
|
//#endregion
|
|
8605
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
8611
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/render/api.js
|
|
8606
8612
|
/**
|
|
8607
8613
|
* Helper function to match domain objects
|
|
8608
8614
|
* @param query Optional domain to match against
|
|
@@ -9051,27 +9057,27 @@ var PluginRenderCtx = class extends RenderCtxBase {
|
|
|
9051
9057
|
}
|
|
9052
9058
|
};
|
|
9053
9059
|
//#endregion
|
|
9054
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9060
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/plugin_model.js
|
|
9055
9061
|
/** Internal plugin↔block handshake. `Symbol.for` (not `Symbol`) so it stays
|
|
9056
9062
|
* identical across multiple `@platforma-sdk/model` copies in one process. */
|
|
9057
9063
|
const CREATE_PLUGIN_MODEL = Symbol.for("@platforma-sdk/model:createPluginModel");
|
|
9058
9064
|
//#endregion
|
|
9059
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9060
|
-
const PlatformaSDKVersion = "1.
|
|
9065
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/version.js
|
|
9066
|
+
const PlatformaSDKVersion = "1.86.0";
|
|
9061
9067
|
//#endregion
|
|
9062
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9068
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/bconfig/types.js
|
|
9063
9069
|
function isConfigLambda(cfgOrFh) {
|
|
9064
9070
|
return cfgOrFh.__renderLambda === true;
|
|
9065
9071
|
}
|
|
9066
9072
|
//#endregion
|
|
9067
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9073
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/bconfig/normalization.js
|
|
9068
9074
|
function downgradeCfgOrLambda(data) {
|
|
9069
9075
|
if (data === void 0) return void 0;
|
|
9070
9076
|
if (isConfigLambda(data)) return data.handle;
|
|
9071
9077
|
return data;
|
|
9072
9078
|
}
|
|
9073
9079
|
//#endregion
|
|
9074
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9080
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/block_storage_callbacks.js
|
|
9075
9081
|
/**
|
|
9076
9082
|
* BlockStorage Callback Implementations - wired to facade callbacks in BlockModelV3.done().
|
|
9077
9083
|
*
|
|
@@ -9425,7 +9431,7 @@ function deriveTemplateParamsFromStorage(storageJson, deriveTemplateParams) {
|
|
|
9425
9431
|
}
|
|
9426
9432
|
}
|
|
9427
9433
|
//#endregion
|
|
9428
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9434
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/block_model.js
|
|
9429
9435
|
/**
|
|
9430
9436
|
* Merges two feature flag objects with type-aware logic:
|
|
9431
9437
|
* - `supports*` (boolean): OR — `true` if either side is `true`
|
|
@@ -9791,7 +9797,7 @@ var BlockModelV3 = class BlockModelV3 {
|
|
|
9791
9797
|
}
|
|
9792
9798
|
};
|
|
9793
9799
|
//#endregion
|
|
9794
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9800
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/pframe_utils/axes.js
|
|
9795
9801
|
/** Create id for column copy with added keys in axes domains */
|
|
9796
9802
|
const colId = (id, domains, contextDomains) => {
|
|
9797
9803
|
let wid = id.toString();
|
|
@@ -9897,7 +9903,7 @@ function getAdditionalColumnsForColumn(blockAxes, column) {
|
|
|
9897
9903
|
})];
|
|
9898
9904
|
}
|
|
9899
9905
|
//#endregion
|
|
9900
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
9906
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/column_recipes/leaf_rebrand.js
|
|
9901
9907
|
/**
|
|
9902
9908
|
* Replace every column leaf whose id equals `fromId` with `toId`, leaving
|
|
9903
9909
|
* other column refs (linkers, sub-anchors) intact. Wrapper recipes
|
|
@@ -9915,1187 +9921,647 @@ function rebrandLeafId(node, fromId, toId) {
|
|
|
9915
9921
|
return mapSpecQueryColumns(node, { column: (id) => id === fromId ? toId : id });
|
|
9916
9922
|
}
|
|
9917
9923
|
//#endregion
|
|
9918
|
-
//#region ../node_modules/.pnpm/lru-cache@11.
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
*/
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
};
|
|
9930
|
-
let AC = globalThis.AbortController;
|
|
9931
|
-
let AS = globalThis.AbortSignal;
|
|
9932
|
-
/* c8 ignore start */
|
|
9933
|
-
if (typeof AC === "undefined") {
|
|
9934
|
-
AS = class AbortSignal {
|
|
9935
|
-
onabort;
|
|
9936
|
-
_onabort = [];
|
|
9937
|
-
reason;
|
|
9938
|
-
aborted = false;
|
|
9939
|
-
addEventListener(_, fn) {
|
|
9940
|
-
this._onabort.push(fn);
|
|
9941
|
-
}
|
|
9942
|
-
};
|
|
9943
|
-
AC = class AbortController {
|
|
9944
|
-
constructor() {
|
|
9945
|
-
warnACPolyfill();
|
|
9946
|
-
}
|
|
9947
|
-
signal = new AS();
|
|
9948
|
-
abort(reason) {
|
|
9949
|
-
if (this.signal.aborted) return;
|
|
9950
|
-
this.signal.reason = reason;
|
|
9951
|
-
this.signal.aborted = true;
|
|
9952
|
-
for (const fn of this.signal._onabort) fn(reason);
|
|
9953
|
-
this.signal.onabort?.(reason);
|
|
9954
|
-
}
|
|
9955
|
-
};
|
|
9956
|
-
let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1";
|
|
9957
|
-
const warnACPolyfill = () => {
|
|
9958
|
-
if (!printACPolyfillWarning) return;
|
|
9959
|
-
printACPolyfillWarning = false;
|
|
9960
|
-
emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", warnACPolyfill);
|
|
9961
|
-
};
|
|
9962
|
-
}
|
|
9963
|
-
/* c8 ignore stop */
|
|
9964
|
-
const shouldWarn = (code) => !warned.has(code);
|
|
9965
|
-
const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
|
|
9966
|
-
/* c8 ignore start */
|
|
9967
|
-
const getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
|
|
9968
|
-
/* c8 ignore stop */
|
|
9969
|
-
var ZeroArray = class extends Array {
|
|
9970
|
-
constructor(size) {
|
|
9971
|
-
super(size);
|
|
9972
|
-
this.fill(0);
|
|
9973
|
-
}
|
|
9974
|
-
};
|
|
9975
|
-
var Stack = class Stack {
|
|
9924
|
+
//#region ../node_modules/.pnpm/lru-cache@11.5.3/node_modules/lru-cache/dist/esm/browser/index.min.js
|
|
9925
|
+
var L = { hasSubscribers: !1 }, S = L, W = L;
|
|
9926
|
+
var M = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
|
|
9927
|
+
var R = () => S.hasSubscribers || W.hasSubscribers, j = /* @__PURE__ */ new Set(), I = typeof process == "object" && process ? process : {}, P = (d, e, t, i) => {
|
|
9928
|
+
typeof I.emitWarning == "function" ? I.emitWarning(d, e, t, i) : console.error(`[${t}] ${e}: ${d}`);
|
|
9929
|
+
}, k = (d) => !j.has(d);
|
|
9930
|
+
var T = (d) => !!d && d === Math.floor(d) && d > 0 && isFinite(d), G = (d) => T(d) ? d <= Math.pow(2, 8) ? Uint8Array : d <= Math.pow(2, 16) ? Uint16Array : d <= Math.pow(2, 32) ? Uint32Array : d <= Number.MAX_SAFE_INTEGER ? O : null : null, O = class extends Array {
|
|
9931
|
+
constructor(e) {
|
|
9932
|
+
super(e), this.fill(0);
|
|
9933
|
+
}
|
|
9934
|
+
}, x = class d {
|
|
9976
9935
|
heap;
|
|
9977
9936
|
length;
|
|
9978
|
-
static #
|
|
9979
|
-
static create(
|
|
9980
|
-
|
|
9981
|
-
if (!
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
this.heap =
|
|
9992
|
-
this.length = 0;
|
|
9993
|
-
}
|
|
9994
|
-
push(n) {
|
|
9995
|
-
this.heap[this.length++] = n;
|
|
9937
|
+
static #o = !1;
|
|
9938
|
+
static create(e) {
|
|
9939
|
+
let t = G(e);
|
|
9940
|
+
if (!t) return [];
|
|
9941
|
+
d.#o = !0;
|
|
9942
|
+
let i = new d(e, t);
|
|
9943
|
+
return d.#o = !1, i;
|
|
9944
|
+
}
|
|
9945
|
+
constructor(e, t) {
|
|
9946
|
+
if (!d.#o) throw new TypeError("instantiate Stack using Stack.create(n)");
|
|
9947
|
+
this.heap = new t(e), this.length = 0;
|
|
9948
|
+
}
|
|
9949
|
+
push(e) {
|
|
9950
|
+
this.heap[this.length++] = e;
|
|
9996
9951
|
}
|
|
9997
9952
|
pop() {
|
|
9998
9953
|
return this.heap[--this.length];
|
|
9999
9954
|
}
|
|
10000
|
-
}
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
*
|
|
10010
|
-
* All properties from the options object (with the exception of `max`,
|
|
10011
|
-
* `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are
|
|
10012
|
-
* added as normal public members. (The listed options are read-only getters.)
|
|
10013
|
-
*
|
|
10014
|
-
* Changing any of these will alter the defaults for subsequent method calls.
|
|
10015
|
-
*/
|
|
10016
|
-
var LRUCache = class LRUCache {
|
|
10017
|
-
#max;
|
|
10018
|
-
#maxSize;
|
|
10019
|
-
#dispose;
|
|
10020
|
-
#onInsert;
|
|
10021
|
-
#disposeAfter;
|
|
10022
|
-
#fetchMethod;
|
|
10023
|
-
#memoMethod;
|
|
10024
|
-
#perf;
|
|
10025
|
-
/**
|
|
10026
|
-
* {@link LRUCache.OptionsBase.perf}
|
|
10027
|
-
*/
|
|
9955
|
+
}, U = class d {
|
|
9956
|
+
#o;
|
|
9957
|
+
#c;
|
|
9958
|
+
#S;
|
|
9959
|
+
#O;
|
|
9960
|
+
#w;
|
|
9961
|
+
#M;
|
|
9962
|
+
#I;
|
|
9963
|
+
#m;
|
|
10028
9964
|
get perf() {
|
|
10029
|
-
return this.#
|
|
9965
|
+
return this.#m;
|
|
10030
9966
|
}
|
|
10031
|
-
/**
|
|
10032
|
-
* {@link LRUCache.OptionsBase.ttl}
|
|
10033
|
-
*/
|
|
10034
9967
|
ttl;
|
|
10035
|
-
/**
|
|
10036
|
-
* {@link LRUCache.OptionsBase.ttlResolution}
|
|
10037
|
-
*/
|
|
10038
9968
|
ttlResolution;
|
|
10039
|
-
/**
|
|
10040
|
-
* {@link LRUCache.OptionsBase.ttlAutopurge}
|
|
10041
|
-
*/
|
|
10042
9969
|
ttlAutopurge;
|
|
10043
|
-
/**
|
|
10044
|
-
* {@link LRUCache.OptionsBase.updateAgeOnGet}
|
|
10045
|
-
*/
|
|
10046
9970
|
updateAgeOnGet;
|
|
10047
|
-
/**
|
|
10048
|
-
* {@link LRUCache.OptionsBase.updateAgeOnHas}
|
|
10049
|
-
*/
|
|
10050
9971
|
updateAgeOnHas;
|
|
10051
|
-
/**
|
|
10052
|
-
* {@link LRUCache.OptionsBase.allowStale}
|
|
10053
|
-
*/
|
|
10054
9972
|
allowStale;
|
|
10055
|
-
/**
|
|
10056
|
-
* {@link LRUCache.OptionsBase.noDisposeOnSet}
|
|
10057
|
-
*/
|
|
10058
9973
|
noDisposeOnSet;
|
|
10059
|
-
/**
|
|
10060
|
-
* {@link LRUCache.OptionsBase.noUpdateTTL}
|
|
10061
|
-
*/
|
|
10062
9974
|
noUpdateTTL;
|
|
10063
|
-
/**
|
|
10064
|
-
* {@link LRUCache.OptionsBase.maxEntrySize}
|
|
10065
|
-
*/
|
|
10066
9975
|
maxEntrySize;
|
|
10067
|
-
/**
|
|
10068
|
-
* {@link LRUCache.OptionsBase.sizeCalculation}
|
|
10069
|
-
*/
|
|
10070
9976
|
sizeCalculation;
|
|
10071
|
-
/**
|
|
10072
|
-
* {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
|
|
10073
|
-
*/
|
|
10074
9977
|
noDeleteOnFetchRejection;
|
|
10075
|
-
/**
|
|
10076
|
-
* {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
|
|
10077
|
-
*/
|
|
10078
9978
|
noDeleteOnStaleGet;
|
|
10079
|
-
/**
|
|
10080
|
-
* {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
|
|
10081
|
-
*/
|
|
10082
9979
|
allowStaleOnFetchAbort;
|
|
10083
|
-
/**
|
|
10084
|
-
* {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
|
|
10085
|
-
*/
|
|
10086
9980
|
allowStaleOnFetchRejection;
|
|
10087
|
-
/**
|
|
10088
|
-
* {@link LRUCache.OptionsBase.ignoreFetchAbort}
|
|
10089
|
-
*/
|
|
10090
9981
|
ignoreFetchAbort;
|
|
10091
|
-
|
|
10092
|
-
#
|
|
10093
|
-
#
|
|
10094
|
-
#
|
|
10095
|
-
#
|
|
10096
|
-
#
|
|
10097
|
-
#
|
|
10098
|
-
#
|
|
10099
|
-
#
|
|
10100
|
-
#
|
|
10101
|
-
#
|
|
10102
|
-
#
|
|
10103
|
-
#
|
|
10104
|
-
#
|
|
10105
|
-
#
|
|
10106
|
-
#
|
|
10107
|
-
#
|
|
10108
|
-
#
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
* object is modified in any way, strange breakage may occur.
|
|
10113
|
-
*
|
|
10114
|
-
* These fields are private for a reason!
|
|
10115
|
-
*
|
|
10116
|
-
* @internal
|
|
10117
|
-
*/
|
|
10118
|
-
static unsafeExposeInternals(c) {
|
|
9982
|
+
backgroundFetchSize;
|
|
9983
|
+
#n;
|
|
9984
|
+
#b;
|
|
9985
|
+
#s;
|
|
9986
|
+
#i;
|
|
9987
|
+
#t;
|
|
9988
|
+
#l;
|
|
9989
|
+
#u;
|
|
9990
|
+
#a;
|
|
9991
|
+
#h;
|
|
9992
|
+
#y;
|
|
9993
|
+
#r;
|
|
9994
|
+
#_;
|
|
9995
|
+
#F;
|
|
9996
|
+
#d;
|
|
9997
|
+
#g;
|
|
9998
|
+
#T;
|
|
9999
|
+
#U;
|
|
10000
|
+
#f;
|
|
10001
|
+
#D;
|
|
10002
|
+
static unsafeExposeInternals(e) {
|
|
10119
10003
|
return {
|
|
10120
|
-
starts:
|
|
10121
|
-
ttls:
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10004
|
+
starts: e.#F,
|
|
10005
|
+
ttls: e.#d,
|
|
10006
|
+
autopurgeTimers: e.#g,
|
|
10007
|
+
sizes: e.#_,
|
|
10008
|
+
keyMap: e.#s,
|
|
10009
|
+
keyList: e.#i,
|
|
10010
|
+
valList: e.#t,
|
|
10011
|
+
next: e.#l,
|
|
10012
|
+
prev: e.#u,
|
|
10128
10013
|
get head() {
|
|
10129
|
-
return
|
|
10014
|
+
return e.#a;
|
|
10130
10015
|
},
|
|
10131
10016
|
get tail() {
|
|
10132
|
-
return
|
|
10017
|
+
return e.#h;
|
|
10133
10018
|
},
|
|
10134
|
-
free:
|
|
10135
|
-
isBackgroundFetch: (
|
|
10136
|
-
backgroundFetch: (
|
|
10137
|
-
moveToTail: (
|
|
10138
|
-
indexes: (
|
|
10139
|
-
rindexes: (
|
|
10140
|
-
isStale: (
|
|
10019
|
+
free: e.#y,
|
|
10020
|
+
isBackgroundFetch: (t) => e.#e(t),
|
|
10021
|
+
backgroundFetch: (t, i, s, n) => e.#P(t, i, s, n),
|
|
10022
|
+
moveToTail: (t) => e.#L(t),
|
|
10023
|
+
indexes: (t) => e.#A(t),
|
|
10024
|
+
rindexes: (t) => e.#z(t),
|
|
10025
|
+
isStale: (t) => e.#p(t)
|
|
10141
10026
|
};
|
|
10142
10027
|
}
|
|
10143
|
-
/**
|
|
10144
|
-
* {@link LRUCache.OptionsBase.max} (read-only)
|
|
10145
|
-
*/
|
|
10146
10028
|
get max() {
|
|
10147
|
-
return this.#
|
|
10029
|
+
return this.#o;
|
|
10148
10030
|
}
|
|
10149
|
-
/**
|
|
10150
|
-
* {@link LRUCache.OptionsBase.maxSize} (read-only)
|
|
10151
|
-
*/
|
|
10152
10031
|
get maxSize() {
|
|
10153
|
-
return this.#
|
|
10032
|
+
return this.#c;
|
|
10154
10033
|
}
|
|
10155
|
-
/**
|
|
10156
|
-
* The total computed size of items in the cache (read-only)
|
|
10157
|
-
*/
|
|
10158
10034
|
get calculatedSize() {
|
|
10159
|
-
return this.#
|
|
10035
|
+
return this.#b;
|
|
10160
10036
|
}
|
|
10161
|
-
/**
|
|
10162
|
-
* The number of items stored in the cache (read-only)
|
|
10163
|
-
*/
|
|
10164
10037
|
get size() {
|
|
10165
|
-
return this.#
|
|
10038
|
+
return this.#n;
|
|
10166
10039
|
}
|
|
10167
|
-
/**
|
|
10168
|
-
* {@link LRUCache.OptionsBase.fetchMethod} (read-only)
|
|
10169
|
-
*/
|
|
10170
10040
|
get fetchMethod() {
|
|
10171
|
-
return this.#
|
|
10041
|
+
return this.#M;
|
|
10172
10042
|
}
|
|
10173
10043
|
get memoMethod() {
|
|
10174
|
-
return this.#
|
|
10044
|
+
return this.#I;
|
|
10175
10045
|
}
|
|
10176
|
-
/**
|
|
10177
|
-
* {@link LRUCache.OptionsBase.dispose} (read-only)
|
|
10178
|
-
*/
|
|
10179
10046
|
get dispose() {
|
|
10180
|
-
return this.#
|
|
10047
|
+
return this.#S;
|
|
10181
10048
|
}
|
|
10182
|
-
/**
|
|
10183
|
-
* {@link LRUCache.OptionsBase.onInsert} (read-only)
|
|
10184
|
-
*/
|
|
10185
10049
|
get onInsert() {
|
|
10186
|
-
return this.#
|
|
10050
|
+
return this.#O;
|
|
10187
10051
|
}
|
|
10188
|
-
/**
|
|
10189
|
-
* {@link LRUCache.OptionsBase.disposeAfter} (read-only)
|
|
10190
|
-
*/
|
|
10191
10052
|
get disposeAfter() {
|
|
10192
|
-
return this.#
|
|
10193
|
-
}
|
|
10194
|
-
constructor(
|
|
10195
|
-
|
|
10196
|
-
if (
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
if (
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
this
|
|
10206
|
-
this.
|
|
10207
|
-
|
|
10208
|
-
if (!this
|
|
10209
|
-
|
|
10210
|
-
}
|
|
10211
|
-
if (
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10215
|
-
this.#
|
|
10216
|
-
this
|
|
10217
|
-
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
this.#
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
this.#
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
|
|
10233
|
-
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
this
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
}
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
}
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10053
|
+
return this.#w;
|
|
10054
|
+
}
|
|
10055
|
+
constructor(e) {
|
|
10056
|
+
let { max: t = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: o, updateAgeOnHas: l, allowStale: h, dispose: r, onInsert: c, disposeAfter: m, noDisposeOnSet: _, noUpdateTTL: u, maxSize: g = 0, maxEntrySize: f = 0, sizeCalculation: y, fetchMethod: a, memoMethod: w, noDeleteOnFetchRejection: F, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: p, allowStaleOnFetchAbort: A, ignoreFetchAbort: z, backgroundFetchSize: C = 1, perf: E } = e;
|
|
10057
|
+
if (this.backgroundFetchSize = C, E !== void 0 && typeof E?.now != "function") throw new TypeError("perf option must have a now() method if specified");
|
|
10058
|
+
if (this.#m = E ?? M, t !== 0 && !T(t)) throw new TypeError("max option must be a nonnegative integer");
|
|
10059
|
+
let v = t ? G(t) : Array;
|
|
10060
|
+
if (!v) throw new Error("invalid max value: " + t);
|
|
10061
|
+
if (this.#o = t, this.#c = g, this.maxEntrySize = f || this.#c, this.sizeCalculation = y, this.sizeCalculation) {
|
|
10062
|
+
if (!this.#c && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
10063
|
+
if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
|
|
10064
|
+
}
|
|
10065
|
+
if (w !== void 0 && typeof w != "function") throw new TypeError("memoMethod must be a function if defined");
|
|
10066
|
+
if (this.#I = w, a !== void 0 && typeof a != "function") throw new TypeError("fetchMethod must be a function if specified");
|
|
10067
|
+
if (this.#M = a, this.#U = !!a, this.#s = /* @__PURE__ */ new Map(), this.#i = Array.from({ length: t }).fill(void 0), this.#t = Array.from({ length: t }).fill(void 0), this.#l = new v(t), this.#u = new v(t), this.#a = 0, this.#h = 0, this.#y = x.create(t), this.#n = 0, this.#b = 0, typeof r == "function" && (this.#S = r), typeof c == "function" && (this.#O = c), typeof m == "function" ? (this.#w = m, this.#r = []) : (this.#w = void 0, this.#r = void 0), this.#T = !!this.#S, this.#D = !!this.#O, this.#f = !!this.#w, this.noDisposeOnSet = !!_, this.noUpdateTTL = !!u, this.noDeleteOnFetchRejection = !!F, this.allowStaleOnFetchRejection = !!p, this.allowStaleOnFetchAbort = !!A, this.ignoreFetchAbort = !!z, this.maxEntrySize !== 0) {
|
|
10068
|
+
if (this.#c !== 0 && !T(this.#c)) throw new TypeError("maxSize must be a positive integer if specified");
|
|
10069
|
+
if (!T(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
10070
|
+
this.#X();
|
|
10071
|
+
}
|
|
10072
|
+
if (this.allowStale = !!h, this.noDeleteOnStaleGet = !!b, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!l, this.ttlResolution = T(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n, this.ttl = i || 0, this.ttl) {
|
|
10073
|
+
if (!T(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
|
|
10074
|
+
this.#k();
|
|
10075
|
+
}
|
|
10076
|
+
if (this.#o === 0 && this.ttl === 0 && this.#c === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
10077
|
+
if (!this.ttlAutopurge && !this.#o && !this.#c) {
|
|
10078
|
+
let D = "LRU_CACHE_UNBOUNDED";
|
|
10079
|
+
k(D) && (j.add(D), P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", D, d));
|
|
10080
|
+
}
|
|
10081
|
+
}
|
|
10082
|
+
getRemainingTTL(e) {
|
|
10083
|
+
return this.#s.has(e) ? Infinity : 0;
|
|
10084
|
+
}
|
|
10085
|
+
#k() {
|
|
10086
|
+
let e = new O(this.#o), t = new O(this.#o);
|
|
10087
|
+
this.#d = e, this.#F = t;
|
|
10088
|
+
let i = this.ttlAutopurge ? Array.from({ length: this.#o }) : void 0;
|
|
10089
|
+
this.#g = i, this.#H = (h, r, c = this.#m.now()) => {
|
|
10090
|
+
t[h] = r !== 0 ? c : 0, e[h] = r, s(h, r);
|
|
10091
|
+
}, this.#R = (h) => {
|
|
10092
|
+
t[h] = e[h] !== 0 ? this.#m.now() : 0, s(h, e[h]);
|
|
10093
|
+
};
|
|
10094
|
+
let s = this.ttlAutopurge ? (h, r) => {
|
|
10095
|
+
if (i?.[h] && (clearTimeout(i[h]), i[h] = void 0), r && r !== 0 && i) {
|
|
10096
|
+
let c = setTimeout(() => {
|
|
10097
|
+
this.#p(h) ? (this.#E(this.#i[h], "expire"), i[h] = void 0) : s(h, l(h));
|
|
10098
|
+
}, r + 1);
|
|
10099
|
+
c.unref && c.unref(), i[h] = c;
|
|
10100
|
+
}
|
|
10101
|
+
} : () => {};
|
|
10102
|
+
this.#v = (h, r) => {
|
|
10103
|
+
if (e[r]) {
|
|
10104
|
+
let c = e[r], m = t[r];
|
|
10105
|
+
if (!c || !m) return;
|
|
10106
|
+
h.ttl = c, h.start = m, h.now = n || o();
|
|
10107
|
+
h.remainingTTL = c - (h.now - m);
|
|
10108
|
+
}
|
|
10109
|
+
};
|
|
10110
|
+
let n = 0, o = () => {
|
|
10111
|
+
let h = this.#m.now();
|
|
10112
|
+
if (this.ttlResolution > 0) {
|
|
10113
|
+
n = h;
|
|
10114
|
+
let r = setTimeout(() => n = 0, this.ttlResolution);
|
|
10115
|
+
r.unref && r.unref();
|
|
10116
|
+
}
|
|
10117
|
+
return h;
|
|
10118
|
+
};
|
|
10119
|
+
this.getRemainingTTL = (h) => {
|
|
10120
|
+
let r = this.#s.get(h);
|
|
10121
|
+
return r === void 0 ? 0 : l(r);
|
|
10122
|
+
};
|
|
10123
|
+
let l = (h) => {
|
|
10124
|
+
let r = e[h], c = t[h];
|
|
10125
|
+
if (!r || !c) return Infinity;
|
|
10126
|
+
return r - ((n || o()) - c);
|
|
10127
|
+
};
|
|
10128
|
+
this.#p = (h) => {
|
|
10129
|
+
let r = t[h], c = e[h];
|
|
10130
|
+
return !!c && !!r && (n || o()) - r > c;
|
|
10131
|
+
};
|
|
10132
|
+
}
|
|
10133
|
+
#R = () => {};
|
|
10134
|
+
#v = () => {};
|
|
10135
|
+
#H = () => {};
|
|
10136
|
+
#p = () => !1;
|
|
10137
|
+
#X() {
|
|
10138
|
+
let e = new O(this.#o);
|
|
10139
|
+
this.#b = 0, this.#_ = e, this.#x = (t) => {
|
|
10140
|
+
this.#b -= e[t], e[t] = 0;
|
|
10141
|
+
}, this.#N = (t, i, s, n) => {
|
|
10142
|
+
if (!T(s)) {
|
|
10143
|
+
if (this.#e(i)) return this.backgroundFetchSize;
|
|
10144
|
+
if (n) {
|
|
10145
|
+
if (typeof n != "function") throw new TypeError("sizeCalculation must be a function");
|
|
10146
|
+
if (s = n(i, t), !T(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
10147
|
+
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
10268
10148
|
}
|
|
10269
|
-
|
|
10149
|
+
return s;
|
|
10150
|
+
}, this.#j = (t, i, s) => {
|
|
10151
|
+
if (e[t] = i, this.#c) {
|
|
10152
|
+
let n = this.#c - e[t];
|
|
10153
|
+
for (; this.#b > n;) this.#G(!0);
|
|
10154
|
+
}
|
|
10155
|
+
this.#b += e[t], s && (s.entrySize = i, s.totalCalculatedSize = this.#b);
|
|
10156
|
+
};
|
|
10270
10157
|
}
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
getRemainingTTL(key) {
|
|
10276
|
-
return this.#keyMap.has(key) ? Infinity : 0;
|
|
10277
|
-
}
|
|
10278
|
-
#initializeTTLTracking() {
|
|
10279
|
-
const ttls = new ZeroArray(this.#max);
|
|
10280
|
-
const starts = new ZeroArray(this.#max);
|
|
10281
|
-
this.#ttls = ttls;
|
|
10282
|
-
this.#starts = starts;
|
|
10283
|
-
this.#setItemTTL = (index, ttl, start = this.#perf.now()) => {
|
|
10284
|
-
starts[index] = ttl !== 0 ? start : 0;
|
|
10285
|
-
ttls[index] = ttl;
|
|
10286
|
-
if (ttl !== 0 && this.ttlAutopurge) {
|
|
10287
|
-
const t = setTimeout(() => {
|
|
10288
|
-
if (this.#isStale(index)) this.#delete(this.#keyList[index], "expire");
|
|
10289
|
-
}, ttl + 1);
|
|
10290
|
-
/* c8 ignore start */
|
|
10291
|
-
if (t.unref) t.unref();
|
|
10292
|
-
}
|
|
10293
|
-
};
|
|
10294
|
-
this.#updateItemAge = (index) => {
|
|
10295
|
-
starts[index] = ttls[index] !== 0 ? this.#perf.now() : 0;
|
|
10296
|
-
};
|
|
10297
|
-
this.#statusTTL = (status, index) => {
|
|
10298
|
-
if (ttls[index]) {
|
|
10299
|
-
const ttl = ttls[index];
|
|
10300
|
-
const start = starts[index];
|
|
10301
|
-
/* c8 ignore next */
|
|
10302
|
-
if (!ttl || !start) return;
|
|
10303
|
-
status.ttl = ttl;
|
|
10304
|
-
status.start = start;
|
|
10305
|
-
status.now = cachedNow || getNow();
|
|
10306
|
-
status.remainingTTL = ttl - (status.now - start);
|
|
10307
|
-
}
|
|
10308
|
-
};
|
|
10309
|
-
let cachedNow = 0;
|
|
10310
|
-
const getNow = () => {
|
|
10311
|
-
const n = this.#perf.now();
|
|
10312
|
-
if (this.ttlResolution > 0) {
|
|
10313
|
-
cachedNow = n;
|
|
10314
|
-
const t = setTimeout(() => cachedNow = 0, this.ttlResolution);
|
|
10315
|
-
/* c8 ignore start */
|
|
10316
|
-
if (t.unref) t.unref();
|
|
10317
|
-
}
|
|
10318
|
-
return n;
|
|
10319
|
-
};
|
|
10320
|
-
this.getRemainingTTL = (key) => {
|
|
10321
|
-
const index = this.#keyMap.get(key);
|
|
10322
|
-
if (index === void 0) return 0;
|
|
10323
|
-
const ttl = ttls[index];
|
|
10324
|
-
const start = starts[index];
|
|
10325
|
-
if (!ttl || !start) return Infinity;
|
|
10326
|
-
return ttl - ((cachedNow || getNow()) - start);
|
|
10327
|
-
};
|
|
10328
|
-
this.#isStale = (index) => {
|
|
10329
|
-
const s = starts[index];
|
|
10330
|
-
const t = ttls[index];
|
|
10331
|
-
return !!t && !!s && (cachedNow || getNow()) - s > t;
|
|
10332
|
-
};
|
|
10333
|
-
}
|
|
10334
|
-
#updateItemAge = () => {};
|
|
10335
|
-
#statusTTL = () => {};
|
|
10336
|
-
#setItemTTL = () => {};
|
|
10337
|
-
/* c8 ignore stop */
|
|
10338
|
-
#isStale = () => false;
|
|
10339
|
-
#initializeSizeTracking() {
|
|
10340
|
-
const sizes = new ZeroArray(this.#max);
|
|
10341
|
-
this.#calculatedSize = 0;
|
|
10342
|
-
this.#sizes = sizes;
|
|
10343
|
-
this.#removeItemSize = (index) => {
|
|
10344
|
-
this.#calculatedSize -= sizes[index];
|
|
10345
|
-
sizes[index] = 0;
|
|
10346
|
-
};
|
|
10347
|
-
this.#requireSize = (k, v, size, sizeCalculation) => {
|
|
10348
|
-
if (this.#isBackgroundFetch(v)) return 0;
|
|
10349
|
-
if (!isPosInt(size)) if (sizeCalculation) {
|
|
10350
|
-
if (typeof sizeCalculation !== "function") throw new TypeError("sizeCalculation must be a function");
|
|
10351
|
-
size = sizeCalculation(v, k);
|
|
10352
|
-
if (!isPosInt(size)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
10353
|
-
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
10354
|
-
return size;
|
|
10355
|
-
};
|
|
10356
|
-
this.#addItemSize = (index, size, status) => {
|
|
10357
|
-
sizes[index] = size;
|
|
10358
|
-
if (this.#maxSize) {
|
|
10359
|
-
const maxSize = this.#maxSize - sizes[index];
|
|
10360
|
-
while (this.#calculatedSize > maxSize) this.#evict(true);
|
|
10361
|
-
}
|
|
10362
|
-
this.#calculatedSize += sizes[index];
|
|
10363
|
-
if (status) {
|
|
10364
|
-
status.entrySize = size;
|
|
10365
|
-
status.totalCalculatedSize = this.#calculatedSize;
|
|
10366
|
-
}
|
|
10367
|
-
};
|
|
10368
|
-
}
|
|
10369
|
-
#removeItemSize = (_i) => {};
|
|
10370
|
-
#addItemSize = (_i, _s, _st) => {};
|
|
10371
|
-
#requireSize = (_k, _v, size, sizeCalculation) => {
|
|
10372
|
-
if (size || sizeCalculation) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
|
10158
|
+
#x = (e) => {};
|
|
10159
|
+
#j = (e, t, i) => {};
|
|
10160
|
+
#N = (e, t, i, s) => {
|
|
10161
|
+
if (i || s) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
|
10373
10162
|
return 0;
|
|
10374
10163
|
};
|
|
10375
|
-
*#
|
|
10376
|
-
if (this.#
|
|
10377
|
-
if (!this.#isValidIndex(i)) break;
|
|
10378
|
-
if (allowStale || !this.#isStale(i)) yield i;
|
|
10379
|
-
if (i === this.#head) break;
|
|
10380
|
-
else i = this.#prev[i];
|
|
10381
|
-
}
|
|
10164
|
+
*#A({ allowStale: e = this.allowStale } = {}) {
|
|
10165
|
+
if (this.#n) for (let t = this.#h; this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#a);) t = this.#u[t];
|
|
10382
10166
|
}
|
|
10383
|
-
*#
|
|
10384
|
-
if (this.#
|
|
10385
|
-
if (!this.#isValidIndex(i)) break;
|
|
10386
|
-
if (allowStale || !this.#isStale(i)) yield i;
|
|
10387
|
-
if (i === this.#tail) break;
|
|
10388
|
-
else i = this.#next[i];
|
|
10389
|
-
}
|
|
10167
|
+
*#z({ allowStale: e = this.allowStale } = {}) {
|
|
10168
|
+
if (this.#n) for (let t = this.#a; this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#h);) t = this.#l[t];
|
|
10390
10169
|
}
|
|
10391
|
-
#
|
|
10392
|
-
return
|
|
10170
|
+
#V(e) {
|
|
10171
|
+
return e !== void 0 && this.#s.get(this.#i[e]) === e;
|
|
10393
10172
|
}
|
|
10394
|
-
/**
|
|
10395
|
-
* Return a generator yielding `[key, value]` pairs,
|
|
10396
|
-
* in order from most recently used to least recently used.
|
|
10397
|
-
*/
|
|
10398
10173
|
*entries() {
|
|
10399
|
-
for (
|
|
10174
|
+
for (let e of this.#A()) this.#t[e] !== void 0 && this.#i[e] !== void 0 && !this.#e(this.#t[e]) && (yield [this.#i[e], this.#t[e]]);
|
|
10400
10175
|
}
|
|
10401
|
-
/**
|
|
10402
|
-
* Inverse order version of {@link LRUCache.entries}
|
|
10403
|
-
*
|
|
10404
|
-
* Return a generator yielding `[key, value]` pairs,
|
|
10405
|
-
* in order from least recently used to most recently used.
|
|
10406
|
-
*/
|
|
10407
10176
|
*rentries() {
|
|
10408
|
-
for (
|
|
10177
|
+
for (let e of this.#z()) this.#t[e] !== void 0 && this.#i[e] !== void 0 && !this.#e(this.#t[e]) && (yield [this.#i[e], this.#t[e]]);
|
|
10409
10178
|
}
|
|
10410
|
-
/**
|
|
10411
|
-
* Return a generator yielding the keys in the cache,
|
|
10412
|
-
* in order from most recently used to least recently used.
|
|
10413
|
-
*/
|
|
10414
10179
|
*keys() {
|
|
10415
|
-
for (
|
|
10416
|
-
|
|
10417
|
-
|
|
10180
|
+
for (let e of this.#A()) {
|
|
10181
|
+
let t = this.#i[e];
|
|
10182
|
+
t !== void 0 && !this.#e(this.#t[e]) && (yield t);
|
|
10418
10183
|
}
|
|
10419
10184
|
}
|
|
10420
|
-
/**
|
|
10421
|
-
* Inverse order version of {@link LRUCache.keys}
|
|
10422
|
-
*
|
|
10423
|
-
* Return a generator yielding the keys in the cache,
|
|
10424
|
-
* in order from least recently used to most recently used.
|
|
10425
|
-
*/
|
|
10426
10185
|
*rkeys() {
|
|
10427
|
-
for (
|
|
10428
|
-
|
|
10429
|
-
|
|
10186
|
+
for (let e of this.#z()) {
|
|
10187
|
+
let t = this.#i[e];
|
|
10188
|
+
t !== void 0 && !this.#e(this.#t[e]) && (yield t);
|
|
10430
10189
|
}
|
|
10431
10190
|
}
|
|
10432
|
-
/**
|
|
10433
|
-
* Return a generator yielding the values in the cache,
|
|
10434
|
-
* in order from most recently used to least recently used.
|
|
10435
|
-
*/
|
|
10436
10191
|
*values() {
|
|
10437
|
-
for (
|
|
10192
|
+
for (let e of this.#A()) this.#t[e] !== void 0 && !this.#e(this.#t[e]) && (yield this.#t[e]);
|
|
10438
10193
|
}
|
|
10439
|
-
/**
|
|
10440
|
-
* Inverse order version of {@link LRUCache.values}
|
|
10441
|
-
*
|
|
10442
|
-
* Return a generator yielding the values in the cache,
|
|
10443
|
-
* in order from least recently used to most recently used.
|
|
10444
|
-
*/
|
|
10445
10194
|
*rvalues() {
|
|
10446
|
-
for (
|
|
10195
|
+
for (let e of this.#z()) this.#t[e] !== void 0 && !this.#e(this.#t[e]) && (yield this.#t[e]);
|
|
10447
10196
|
}
|
|
10448
|
-
/**
|
|
10449
|
-
* Iterating over the cache itself yields the same results as
|
|
10450
|
-
* {@link LRUCache.entries}
|
|
10451
|
-
*/
|
|
10452
10197
|
[Symbol.iterator]() {
|
|
10453
10198
|
return this.entries();
|
|
10454
10199
|
}
|
|
10455
|
-
/**
|
|
10456
|
-
* A String value that is used in the creation of the default string
|
|
10457
|
-
* description of an object. Called by the built-in method
|
|
10458
|
-
* `Object.prototype.toString`.
|
|
10459
|
-
*/
|
|
10460
10200
|
[Symbol.toStringTag] = "LRUCache";
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
find(fn, getOptions = {}) {
|
|
10466
|
-
for (const i of this.#indexes()) {
|
|
10467
|
-
const v = this.#valList[i];
|
|
10468
|
-
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
10469
|
-
if (value === void 0) continue;
|
|
10470
|
-
if (fn(value, this.#keyList[i], this)) return this.get(this.#keyList[i], getOptions);
|
|
10201
|
+
find(e, t = {}) {
|
|
10202
|
+
for (let i of this.#A()) {
|
|
10203
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
10204
|
+
if (n !== void 0 && e(n, this.#i[i], this)) return this.#C(this.#i[i], t);
|
|
10471
10205
|
}
|
|
10472
10206
|
}
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
* `fn` is called as `fn(value, key, cache)`.
|
|
10478
|
-
*
|
|
10479
|
-
* If `thisp` is provided, function will be called in the `this`-context of
|
|
10480
|
-
* the provided object, or the cache if no `thisp` object is provided.
|
|
10481
|
-
*
|
|
10482
|
-
* Does not update age or recenty of use, or iterate over stale values.
|
|
10483
|
-
*/
|
|
10484
|
-
forEach(fn, thisp = this) {
|
|
10485
|
-
for (const i of this.#indexes()) {
|
|
10486
|
-
const v = this.#valList[i];
|
|
10487
|
-
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
10488
|
-
if (value === void 0) continue;
|
|
10489
|
-
fn.call(thisp, value, this.#keyList[i], this);
|
|
10207
|
+
forEach(e, t = this) {
|
|
10208
|
+
for (let i of this.#A()) {
|
|
10209
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
10210
|
+
n !== void 0 && e.call(t, n, this.#i[i], this);
|
|
10490
10211
|
}
|
|
10491
10212
|
}
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
rforEach(fn, thisp = this) {
|
|
10497
|
-
for (const i of this.#rindexes()) {
|
|
10498
|
-
const v = this.#valList[i];
|
|
10499
|
-
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
10500
|
-
if (value === void 0) continue;
|
|
10501
|
-
fn.call(thisp, value, this.#keyList[i], this);
|
|
10213
|
+
rforEach(e, t = this) {
|
|
10214
|
+
for (let i of this.#z()) {
|
|
10215
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
10216
|
+
n !== void 0 && e.call(t, n, this.#i[i], this);
|
|
10502
10217
|
}
|
|
10503
10218
|
}
|
|
10504
|
-
/**
|
|
10505
|
-
* Delete any stale entries. Returns true if anything was removed,
|
|
10506
|
-
* false otherwise.
|
|
10507
|
-
*/
|
|
10508
10219
|
purgeStale() {
|
|
10509
|
-
let
|
|
10510
|
-
for (
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
* Always returns stale values, if their info is found in the cache, so be
|
|
10525
|
-
* sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
|
|
10526
|
-
* if relevant.
|
|
10527
|
-
*/
|
|
10528
|
-
info(key) {
|
|
10529
|
-
const i = this.#keyMap.get(key);
|
|
10530
|
-
if (i === void 0) return void 0;
|
|
10531
|
-
const v = this.#valList[i];
|
|
10532
|
-
/* c8 ignore start - this isn't tested for the info function,
|
|
10533
|
-
* but it's the same logic as found in other places. */
|
|
10534
|
-
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
10535
|
-
if (value === void 0) return void 0;
|
|
10536
|
-
/* c8 ignore end */
|
|
10537
|
-
const entry = { value };
|
|
10538
|
-
if (this.#ttls && this.#starts) {
|
|
10539
|
-
const ttl = this.#ttls[i];
|
|
10540
|
-
const start = this.#starts[i];
|
|
10541
|
-
if (ttl && start) {
|
|
10542
|
-
entry.ttl = ttl - (this.#perf.now() - start);
|
|
10543
|
-
entry.start = Date.now();
|
|
10544
|
-
}
|
|
10545
|
-
}
|
|
10546
|
-
if (this.#sizes) entry.size = this.#sizes[i];
|
|
10547
|
-
return entry;
|
|
10220
|
+
let e = !1;
|
|
10221
|
+
for (let t of this.#z({ allowStale: !0 })) this.#p(t) && (this.#E(this.#i[t], "expire"), e = !0);
|
|
10222
|
+
return e;
|
|
10223
|
+
}
|
|
10224
|
+
info(e) {
|
|
10225
|
+
let t = this.#s.get(e);
|
|
10226
|
+
if (t === void 0) return;
|
|
10227
|
+
let i = this.#t[t], s = this.#e(i) ? i.__staleWhileFetching : i;
|
|
10228
|
+
if (s === void 0) return;
|
|
10229
|
+
let n = { value: s };
|
|
10230
|
+
if (this.#d && this.#F) {
|
|
10231
|
+
let o = this.#d[t], l = this.#F[t];
|
|
10232
|
+
if (o && l) n.ttl = o - (this.#m.now() - l), n.start = Date.now();
|
|
10233
|
+
}
|
|
10234
|
+
return this.#_ && (n.size = this.#_[t]), n;
|
|
10548
10235
|
}
|
|
10549
|
-
/**
|
|
10550
|
-
* Return an array of [key, {@link LRUCache.Entry}] tuples which can be
|
|
10551
|
-
* passed to {@link LRUCache#load}.
|
|
10552
|
-
*
|
|
10553
|
-
* The `start` fields are calculated relative to a portable `Date.now()`
|
|
10554
|
-
* timestamp, even if `performance.now()` is available.
|
|
10555
|
-
*
|
|
10556
|
-
* Stale entries are always included in the `dump`, even if
|
|
10557
|
-
* {@link LRUCache.OptionsBase.allowStale} is false.
|
|
10558
|
-
*
|
|
10559
|
-
* Note: this returns an actual array, not a generator, so it can be more
|
|
10560
|
-
* easily passed around.
|
|
10561
|
-
*/
|
|
10562
10236
|
dump() {
|
|
10563
|
-
|
|
10564
|
-
for (
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
if (
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
const age = this.#perf.now() - this.#starts[i];
|
|
10573
|
-
entry.start = Math.floor(Date.now() - age);
|
|
10574
|
-
}
|
|
10575
|
-
if (this.#sizes) entry.size = this.#sizes[i];
|
|
10576
|
-
arr.unshift([key, entry]);
|
|
10577
|
-
}
|
|
10578
|
-
return arr;
|
|
10579
|
-
}
|
|
10580
|
-
/**
|
|
10581
|
-
* Reset the cache and load in the items in entries in the order listed.
|
|
10582
|
-
*
|
|
10583
|
-
* The shape of the resulting cache may be different if the same options are
|
|
10584
|
-
* not used in both caches.
|
|
10585
|
-
*
|
|
10586
|
-
* The `start` fields are assumed to be calculated relative to a portable
|
|
10587
|
-
* `Date.now()` timestamp, even if `performance.now()` is available.
|
|
10588
|
-
*/
|
|
10589
|
-
load(arr) {
|
|
10590
|
-
this.clear();
|
|
10591
|
-
for (const [key, entry] of arr) {
|
|
10592
|
-
if (entry.start) {
|
|
10593
|
-
const age = Date.now() - entry.start;
|
|
10594
|
-
entry.start = this.#perf.now() - age;
|
|
10237
|
+
let e = [];
|
|
10238
|
+
for (let t of this.#A({ allowStale: !0 })) {
|
|
10239
|
+
let i = this.#i[t], s = this.#t[t], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
10240
|
+
if (n === void 0 || i === void 0) continue;
|
|
10241
|
+
let o = { value: n };
|
|
10242
|
+
if (this.#d && this.#F) {
|
|
10243
|
+
o.ttl = this.#d[t];
|
|
10244
|
+
let l = this.#m.now() - this.#F[t];
|
|
10245
|
+
o.start = Math.floor(Date.now() - l);
|
|
10595
10246
|
}
|
|
10596
|
-
this.
|
|
10247
|
+
this.#_ && (o.size = this.#_[t]), e.unshift([i, o]);
|
|
10597
10248
|
}
|
|
10249
|
+
return e;
|
|
10598
10250
|
}
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions;
|
|
10635
|
-
let { noUpdateTTL = this.noUpdateTTL } = setOptions;
|
|
10636
|
-
const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
|
|
10637
|
-
if (this.maxEntrySize && size > this.maxEntrySize) {
|
|
10638
|
-
if (status) {
|
|
10639
|
-
status.set = "miss";
|
|
10640
|
-
status.maxEntrySizeExceeded = true;
|
|
10641
|
-
}
|
|
10642
|
-
this.#delete(k, "set");
|
|
10643
|
-
return this;
|
|
10644
|
-
}
|
|
10645
|
-
let index = this.#size === 0 ? void 0 : this.#keyMap.get(k);
|
|
10646
|
-
if (index === void 0) {
|
|
10647
|
-
index = this.#size === 0 ? this.#tail : this.#free.length !== 0 ? this.#free.pop() : this.#size === this.#max ? this.#evict(false) : this.#size;
|
|
10648
|
-
this.#keyList[index] = k;
|
|
10649
|
-
this.#valList[index] = v;
|
|
10650
|
-
this.#keyMap.set(k, index);
|
|
10651
|
-
this.#next[this.#tail] = index;
|
|
10652
|
-
this.#prev[index] = this.#tail;
|
|
10653
|
-
this.#tail = index;
|
|
10654
|
-
this.#size++;
|
|
10655
|
-
this.#addItemSize(index, size, status);
|
|
10656
|
-
if (status) status.set = "add";
|
|
10657
|
-
noUpdateTTL = false;
|
|
10658
|
-
if (this.#hasOnInsert) this.#onInsert?.(v, k, "add");
|
|
10659
|
-
} else {
|
|
10660
|
-
this.#moveToTail(index);
|
|
10661
|
-
const oldVal = this.#valList[index];
|
|
10662
|
-
if (v !== oldVal) {
|
|
10663
|
-
if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
|
|
10664
|
-
oldVal.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
|
|
10665
|
-
const { __staleWhileFetching: s } = oldVal;
|
|
10666
|
-
if (s !== void 0 && !noDisposeOnSet) {
|
|
10667
|
-
if (this.#hasDispose) this.#dispose?.(s, k, "set");
|
|
10668
|
-
if (this.#hasDisposeAfter) this.#disposed?.push([
|
|
10669
|
-
s,
|
|
10670
|
-
k,
|
|
10671
|
-
"set"
|
|
10672
|
-
]);
|
|
10673
|
-
}
|
|
10674
|
-
} else if (!noDisposeOnSet) {
|
|
10675
|
-
if (this.#hasDispose) this.#dispose?.(oldVal, k, "set");
|
|
10676
|
-
if (this.#hasDisposeAfter) this.#disposed?.push([
|
|
10677
|
-
oldVal,
|
|
10678
|
-
k,
|
|
10251
|
+
load(e) {
|
|
10252
|
+
this.clear();
|
|
10253
|
+
for (let [t, i] of e) {
|
|
10254
|
+
if (i.start) {
|
|
10255
|
+
let s = Date.now() - i.start;
|
|
10256
|
+
i.start = this.#m.now() - s;
|
|
10257
|
+
}
|
|
10258
|
+
this.#W(t, i.value, i);
|
|
10259
|
+
}
|
|
10260
|
+
}
|
|
10261
|
+
set(e, t, i = {}) {
|
|
10262
|
+
let { status: s = S.hasSubscribers ? {} : void 0 } = i;
|
|
10263
|
+
i.status = s, s && (s.op = "set", s.key = e, t !== void 0 && (s.value = t), s.cache = this);
|
|
10264
|
+
let n = this.#W(e, t, i);
|
|
10265
|
+
return s && S.hasSubscribers && S.publish(s), n;
|
|
10266
|
+
}
|
|
10267
|
+
#W(e, t, i, s) {
|
|
10268
|
+
let { ttl: n = this.ttl, start: o, noDisposeOnSet: l = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: r } = i, c = this.#e(t);
|
|
10269
|
+
if (t === void 0) return r && (r.set = "deleted"), this.delete(e), this;
|
|
10270
|
+
let { noUpdateTTL: m = this.noUpdateTTL } = i;
|
|
10271
|
+
r && !c && (r.value = t);
|
|
10272
|
+
let _ = this.#N(e, t, i.size || 0, h, r);
|
|
10273
|
+
if (this.maxEntrySize && _ > this.maxEntrySize) return this.#E(e, "set"), r && (r.set = "miss", r.maxEntrySizeExceeded = !0), this;
|
|
10274
|
+
let u = this.#n === 0 ? void 0 : this.#s.get(e);
|
|
10275
|
+
if (u === void 0) u = this.#n === 0 ? this.#h : this.#y.length !== 0 ? this.#y.pop() : this.#n === this.#o ? this.#G(!1) : this.#n, this.#i[u] = e, this.#t[u] = t, this.#s.set(e, u), this.#l[this.#h] = u, this.#u[u] = this.#h, this.#h = u, this.#n++, this.#j(u, _, r), r && (r.set = "add"), m = !1, this.#D && !c && this.#O?.(t, e, "add");
|
|
10276
|
+
else {
|
|
10277
|
+
this.#L(u);
|
|
10278
|
+
let g = this.#t[u];
|
|
10279
|
+
if (t !== g) {
|
|
10280
|
+
if (!l) if (this.#e(g)) {
|
|
10281
|
+
g !== s && g.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
|
|
10282
|
+
let { __staleWhileFetching: f } = g;
|
|
10283
|
+
f !== void 0 && f !== t && (this.#T && this.#S?.(f, e, "set"), this.#f && this.#r?.push([
|
|
10284
|
+
f,
|
|
10285
|
+
e,
|
|
10679
10286
|
"set"
|
|
10680
|
-
]);
|
|
10681
|
-
}
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10287
|
+
]));
|
|
10288
|
+
} else this.#T && this.#S?.(g, e, "set"), this.#f && this.#r?.push([
|
|
10289
|
+
g,
|
|
10290
|
+
e,
|
|
10291
|
+
"set"
|
|
10292
|
+
]);
|
|
10293
|
+
if (this.#x(u), this.#j(u, _, r), this.#t[u] = t, !c) {
|
|
10294
|
+
let f = g && this.#e(g) ? g.__staleWhileFetching : g, y = f === void 0 ? "add" : t !== f ? "replace" : "update";
|
|
10295
|
+
r && (r.set = y, f !== void 0 && (r.oldValue = f)), this.#D && this.onInsert?.(t, e, y);
|
|
10689
10296
|
}
|
|
10690
|
-
} else
|
|
10691
|
-
if (this.#hasOnInsert) this.onInsert?.(v, k, v === oldVal ? "update" : "replace");
|
|
10692
|
-
}
|
|
10693
|
-
if (ttl !== 0 && !this.#ttls) this.#initializeTTLTracking();
|
|
10694
|
-
if (this.#ttls) {
|
|
10695
|
-
if (!noUpdateTTL) this.#setItemTTL(index, ttl, start);
|
|
10696
|
-
if (status) this.#statusTTL(status, index);
|
|
10297
|
+
} else c || (r && (r.set = "update"), this.#D && this.onInsert?.(t, e, "update"));
|
|
10697
10298
|
}
|
|
10698
|
-
if (!
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
while (task = dt?.shift()) this.#disposeAfter?.(...task);
|
|
10299
|
+
if (n !== 0 && !this.#d && this.#k(), this.#d && (m || this.#H(u, n, o), r && this.#v(r, u)), !l && this.#f && this.#r) {
|
|
10300
|
+
let g = this.#r, f;
|
|
10301
|
+
for (; f = g?.shift();) this.#w?.(...f);
|
|
10702
10302
|
}
|
|
10703
10303
|
return this;
|
|
10704
10304
|
}
|
|
10705
|
-
/**
|
|
10706
|
-
* Evict the least recently used item, returning its value or
|
|
10707
|
-
* `undefined` if cache is empty.
|
|
10708
|
-
*/
|
|
10709
10305
|
pop() {
|
|
10710
10306
|
try {
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
this.#
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
} else if (val !== void 0) return val;
|
|
10307
|
+
for (; this.#n;) {
|
|
10308
|
+
let e = this.#t[this.#a];
|
|
10309
|
+
if (this.#G(!0), this.#e(e)) {
|
|
10310
|
+
if (e.__staleWhileFetching) return e.__staleWhileFetching;
|
|
10311
|
+
} else if (e !== void 0) return e;
|
|
10717
10312
|
}
|
|
10718
10313
|
} finally {
|
|
10719
|
-
if (this.#
|
|
10720
|
-
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
this.#
|
|
10747
|
-
this.#
|
|
10748
|
-
} else
|
|
10749
|
-
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
* {@link LRUCache.OptionsBase.allowStale} is set.
|
|
10795
|
-
*/
|
|
10796
|
-
peek(k, peekOptions = {}) {
|
|
10797
|
-
const { allowStale = this.allowStale } = peekOptions;
|
|
10798
|
-
const index = this.#keyMap.get(k);
|
|
10799
|
-
if (index === void 0 || !allowStale && this.#isStale(index)) return;
|
|
10800
|
-
const v = this.#valList[index];
|
|
10801
|
-
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
10802
|
-
}
|
|
10803
|
-
#backgroundFetch(k, index, options, context) {
|
|
10804
|
-
const v = index === void 0 ? void 0 : this.#valList[index];
|
|
10805
|
-
if (this.#isBackgroundFetch(v)) return v;
|
|
10806
|
-
const ac = new AC();
|
|
10807
|
-
const { signal } = options;
|
|
10808
|
-
signal?.addEventListener("abort", () => ac.abort(signal.reason), { signal: ac.signal });
|
|
10809
|
-
const fetchOpts = {
|
|
10810
|
-
signal: ac.signal,
|
|
10811
|
-
options,
|
|
10812
|
-
context
|
|
10813
|
-
};
|
|
10814
|
-
const cb = (v, updateCache = false) => {
|
|
10815
|
-
const { aborted } = ac.signal;
|
|
10816
|
-
const ignoreAbort = options.ignoreFetchAbort && v !== void 0;
|
|
10817
|
-
if (options.status) if (aborted && !updateCache) {
|
|
10818
|
-
options.status.fetchAborted = true;
|
|
10819
|
-
options.status.fetchError = ac.signal.reason;
|
|
10820
|
-
if (ignoreAbort) options.status.fetchAbortIgnored = true;
|
|
10821
|
-
} else options.status.fetchResolved = true;
|
|
10822
|
-
if (aborted && !ignoreAbort && !updateCache) return fetchFail(ac.signal.reason);
|
|
10823
|
-
const bf = p;
|
|
10824
|
-
const vl = this.#valList[index];
|
|
10825
|
-
if (vl === p || ignoreAbort && updateCache && vl === void 0) if (v === void 0) if (bf.__staleWhileFetching !== void 0) this.#valList[index] = bf.__staleWhileFetching;
|
|
10826
|
-
else this.#delete(k, "fetch");
|
|
10827
|
-
else {
|
|
10828
|
-
if (options.status) options.status.fetchUpdated = true;
|
|
10829
|
-
this.set(k, v, fetchOpts.options);
|
|
10830
|
-
}
|
|
10831
|
-
return v;
|
|
10832
|
-
};
|
|
10833
|
-
const eb = (er) => {
|
|
10834
|
-
if (options.status) {
|
|
10835
|
-
options.status.fetchRejected = true;
|
|
10836
|
-
options.status.fetchError = er;
|
|
10837
|
-
}
|
|
10838
|
-
return fetchFail(er);
|
|
10839
|
-
};
|
|
10840
|
-
const fetchFail = (er) => {
|
|
10841
|
-
const { aborted } = ac.signal;
|
|
10842
|
-
const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
|
|
10843
|
-
const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
|
|
10844
|
-
const noDelete = allowStale || options.noDeleteOnFetchRejection;
|
|
10845
|
-
const bf = p;
|
|
10846
|
-
if (this.#valList[index] === p) {
|
|
10847
|
-
if (!noDelete || bf.__staleWhileFetching === void 0) this.#delete(k, "fetch");
|
|
10848
|
-
else if (!allowStaleAborted) this.#valList[index] = bf.__staleWhileFetching;
|
|
10849
|
-
}
|
|
10850
|
-
if (allowStale) {
|
|
10851
|
-
if (options.status && bf.__staleWhileFetching !== void 0) options.status.returnedStale = true;
|
|
10852
|
-
return bf.__staleWhileFetching;
|
|
10853
|
-
} else if (bf.__returned === bf) throw er;
|
|
10854
|
-
};
|
|
10855
|
-
const pcall = (res, rej) => {
|
|
10856
|
-
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
|
|
10857
|
-
if (fmp && fmp instanceof Promise) fmp.then((v) => res(v === void 0 ? void 0 : v), rej);
|
|
10858
|
-
ac.signal.addEventListener("abort", () => {
|
|
10859
|
-
if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
|
|
10860
|
-
res(void 0);
|
|
10861
|
-
if (options.allowStaleOnFetchAbort) res = (v) => cb(v, true);
|
|
10862
|
-
}
|
|
10863
|
-
});
|
|
10864
|
-
};
|
|
10865
|
-
if (options.status) options.status.fetchDispatched = true;
|
|
10866
|
-
const p = new Promise(pcall).then(cb, eb);
|
|
10867
|
-
const bf = Object.assign(p, {
|
|
10868
|
-
__abortController: ac,
|
|
10869
|
-
__staleWhileFetching: v,
|
|
10314
|
+
if (this.#f && this.#r) {
|
|
10315
|
+
let e = this.#r, t;
|
|
10316
|
+
for (; t = e?.shift();) this.#w?.(...t);
|
|
10317
|
+
}
|
|
10318
|
+
}
|
|
10319
|
+
}
|
|
10320
|
+
#G(e) {
|
|
10321
|
+
let t = this.#a, i = this.#i[t], s = this.#t[t], n = this.#e(s);
|
|
10322
|
+
n && s.__abortController.abort(/* @__PURE__ */ new Error("evicted"));
|
|
10323
|
+
let o = n ? s.__staleWhileFetching : s;
|
|
10324
|
+
return (this.#T || this.#f) && o !== void 0 && (this.#T && this.#S?.(o, i, "evict"), this.#f && this.#r?.push([
|
|
10325
|
+
o,
|
|
10326
|
+
i,
|
|
10327
|
+
"evict"
|
|
10328
|
+
])), this.#x(t), this.#g?.[t] && (clearTimeout(this.#g[t]), this.#g[t] = void 0), e && (this.#i[t] = void 0, this.#t[t] = void 0, this.#y.push(t)), this.#n === 1 ? (this.#a = this.#h = 0, this.#y.length = 0) : this.#a = this.#l[t], this.#s.delete(i), this.#n--, t;
|
|
10329
|
+
}
|
|
10330
|
+
has(e, t = {}) {
|
|
10331
|
+
let { status: i = S.hasSubscribers ? {} : void 0 } = t;
|
|
10332
|
+
t.status = i, i && (i.op = "has", i.key = e, i.cache = this);
|
|
10333
|
+
let s = this.#Y(e, t);
|
|
10334
|
+
return S.hasSubscribers && S.publish(i), s;
|
|
10335
|
+
}
|
|
10336
|
+
#Y(e, t = {}) {
|
|
10337
|
+
let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = t, n = this.#s.get(e);
|
|
10338
|
+
if (n !== void 0) {
|
|
10339
|
+
let o = this.#t[n];
|
|
10340
|
+
if (this.#e(o) && o.__staleWhileFetching === void 0) return !1;
|
|
10341
|
+
if (this.#p(n)) s && (s.has = "stale", this.#v(s, n));
|
|
10342
|
+
else return i && this.#R(n), s && (s.has = "hit", this.#v(s, n)), !0;
|
|
10343
|
+
} else s && (s.has = "miss");
|
|
10344
|
+
return !1;
|
|
10345
|
+
}
|
|
10346
|
+
peek(e, t = {}) {
|
|
10347
|
+
let { status: i = R() ? {} : void 0 } = t;
|
|
10348
|
+
i && (i.op = "peek", i.key = e, i.cache = this), t.status = i;
|
|
10349
|
+
let s = this.#J(e, t);
|
|
10350
|
+
return S.hasSubscribers && S.publish(i), s;
|
|
10351
|
+
}
|
|
10352
|
+
#J(e, t) {
|
|
10353
|
+
let { status: i, allowStale: s = this.allowStale } = t, n = this.#s.get(e);
|
|
10354
|
+
if (n === void 0 || !s && this.#p(n)) {
|
|
10355
|
+
i && (i.peek = n === void 0 ? "miss" : "stale");
|
|
10356
|
+
return;
|
|
10357
|
+
}
|
|
10358
|
+
let o = this.#t[n], l = this.#e(o) ? o.__staleWhileFetching : o;
|
|
10359
|
+
return i && (l !== void 0 ? (i.peek = "hit", i.value = l) : i.peek = "miss"), l;
|
|
10360
|
+
}
|
|
10361
|
+
#P(e, t, i, s) {
|
|
10362
|
+
let n = t === void 0 ? void 0 : this.#t[t];
|
|
10363
|
+
if (this.#e(n)) return n;
|
|
10364
|
+
let o = new AbortController(), { signal: l } = i;
|
|
10365
|
+
l?.addEventListener("abort", () => o.abort(l.reason), { signal: o.signal });
|
|
10366
|
+
let h = {
|
|
10367
|
+
signal: o.signal,
|
|
10368
|
+
options: i,
|
|
10369
|
+
context: s
|
|
10370
|
+
}, r = (f, y = !1) => {
|
|
10371
|
+
let { aborted: a } = o.signal, w = i.ignoreFetchAbort && f !== void 0, F = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && f !== void 0);
|
|
10372
|
+
if (i.status && (a && !y ? (i.status.fetchAborted = !0, i.status.fetchError = o.signal.reason, w && (i.status.fetchAbortIgnored = !0)) : i.status.fetchResolved = !0), a && !w && !y) return m(o.signal.reason, F);
|
|
10373
|
+
let b = u, p = this.#t[t];
|
|
10374
|
+
return (p === u || p === void 0 && w && y) && (f === void 0 ? b.__staleWhileFetching !== void 0 ? this.#t[t] = b.__staleWhileFetching : this.#E(e, "fetch") : (i.status && (i.status.fetchUpdated = !0), this.#W(e, f, h.options, b))), f;
|
|
10375
|
+
}, c = (f) => (i.status && (i.status.fetchRejected = !0, i.status.fetchError = f), m(f, !1)), m = (f, y) => {
|
|
10376
|
+
let { aborted: a } = o.signal, w = a && i.allowStaleOnFetchAbort, F = w || i.allowStaleOnFetchRejection, b = F || i.noDeleteOnFetchRejection, p = u;
|
|
10377
|
+
if (this.#t[t] === u && (!b || !y && p.__staleWhileFetching === void 0 ? this.#E(e, "fetch") : w || (this.#t[t] = p.__staleWhileFetching)), F) return i.status && p.__staleWhileFetching !== void 0 && (i.status.returnedStale = !0), p.__staleWhileFetching;
|
|
10378
|
+
if (p.__returned === p) throw f;
|
|
10379
|
+
}, _ = (f, y) => {
|
|
10380
|
+
let a = this.#M?.(e, n, h);
|
|
10381
|
+
o.signal.addEventListener("abort", () => {
|
|
10382
|
+
(!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (f(void 0), i.allowStaleOnFetchAbort && (f = (w) => r(w, !0)));
|
|
10383
|
+
}), a && a instanceof Promise ? a.then((w) => f(w === void 0 ? void 0 : w), y) : a !== void 0 && f(a);
|
|
10384
|
+
};
|
|
10385
|
+
i.status && (i.status.fetchDispatched = !0);
|
|
10386
|
+
let u = new Promise(_).then(r, c), g = Object.assign(u, {
|
|
10387
|
+
__abortController: o,
|
|
10388
|
+
__staleWhileFetching: n,
|
|
10870
10389
|
__returned: void 0
|
|
10871
10390
|
});
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
if (status) status.fetch = "miss";
|
|
10916
|
-
const p = this.#backgroundFetch(k, index, options, context);
|
|
10391
|
+
return t === void 0 ? (this.#W(e, g, {
|
|
10392
|
+
...h.options,
|
|
10393
|
+
status: void 0
|
|
10394
|
+
}), t = this.#s.get(e)) : this.#t[t] = g, g;
|
|
10395
|
+
}
|
|
10396
|
+
#e(e) {
|
|
10397
|
+
if (!this.#U) return !1;
|
|
10398
|
+
let t = e;
|
|
10399
|
+
return !!t && t instanceof Promise && t.hasOwnProperty("__staleWhileFetching") && t.__abortController instanceof AbortController;
|
|
10400
|
+
}
|
|
10401
|
+
fetch(e, t = {}) {
|
|
10402
|
+
let i = W.hasSubscribers, { status: s = R() ? {} : void 0 } = t;
|
|
10403
|
+
t.status = s, s && t.context && (s.context = t.context);
|
|
10404
|
+
let n = this.#B(e, t);
|
|
10405
|
+
return s && i && (s.trace = !0, W.tracePromise(() => n, s).catch(() => {})), n;
|
|
10406
|
+
}
|
|
10407
|
+
async #B(e, t = {}) {
|
|
10408
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: l = this.noDisposeOnSet, size: h = 0, sizeCalculation: r = this.sizeCalculation, noUpdateTTL: c = this.noUpdateTTL, noDeleteOnFetchRejection: m = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: _ = this.allowStaleOnFetchRejection, ignoreFetchAbort: u = this.ignoreFetchAbort, allowStaleOnFetchAbort: g = this.allowStaleOnFetchAbort, context: f, forceRefresh: y = !1, status: a, signal: w } = t;
|
|
10409
|
+
if (a && (a.op = "fetch", a.key = e, y && (a.forceRefresh = !0), a.cache = this), !this.#U) return a && (a.fetch = "get"), this.#C(e, {
|
|
10410
|
+
allowStale: i,
|
|
10411
|
+
updateAgeOnGet: s,
|
|
10412
|
+
noDeleteOnStaleGet: n,
|
|
10413
|
+
status: a
|
|
10414
|
+
});
|
|
10415
|
+
let F = {
|
|
10416
|
+
allowStale: i,
|
|
10417
|
+
updateAgeOnGet: s,
|
|
10418
|
+
noDeleteOnStaleGet: n,
|
|
10419
|
+
ttl: o,
|
|
10420
|
+
noDisposeOnSet: l,
|
|
10421
|
+
size: h,
|
|
10422
|
+
sizeCalculation: r,
|
|
10423
|
+
noUpdateTTL: c,
|
|
10424
|
+
noDeleteOnFetchRejection: m,
|
|
10425
|
+
allowStaleOnFetchRejection: _,
|
|
10426
|
+
allowStaleOnFetchAbort: g,
|
|
10427
|
+
ignoreFetchAbort: u,
|
|
10428
|
+
status: a,
|
|
10429
|
+
signal: w
|
|
10430
|
+
}, b = this.#s.get(e);
|
|
10431
|
+
if (b === void 0) {
|
|
10432
|
+
a && (a.fetch = "miss");
|
|
10433
|
+
let p = this.#P(e, b, F, f);
|
|
10917
10434
|
return p.__returned = p;
|
|
10918
10435
|
} else {
|
|
10919
|
-
|
|
10920
|
-
if (this.#
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10436
|
+
let p = this.#t[b];
|
|
10437
|
+
if (this.#e(p)) {
|
|
10438
|
+
let v = i && p.__staleWhileFetching !== void 0;
|
|
10439
|
+
return a && (a.fetch = "inflight", v && (a.returnedStale = !0)), v ? p.__staleWhileFetching : p.__returned = p;
|
|
10440
|
+
}
|
|
10441
|
+
let A = this.#p(b);
|
|
10442
|
+
if (!y && !A) return a && (a.fetch = "hit"), this.#L(b), s && this.#R(b), a && this.#v(a, b), p;
|
|
10443
|
+
let z = this.#P(e, b, F, f), E = z.__staleWhileFetching !== void 0 && i;
|
|
10444
|
+
return a && (a.fetch = A ? "stale" : "refresh", E && A && (a.returnedStale = !0)), E ? z.__staleWhileFetching : z.__returned = z;
|
|
10445
|
+
}
|
|
10446
|
+
}
|
|
10447
|
+
forceFetch(e, t = {}) {
|
|
10448
|
+
let i = W.hasSubscribers, { status: s = R() ? {} : void 0 } = t;
|
|
10449
|
+
t.status = s, s && t.context && (s.context = t.context);
|
|
10450
|
+
let n = this.#K(e, t);
|
|
10451
|
+
return s && i && (s.trace = !0, W.tracePromise(() => n, s).catch(() => {})), n;
|
|
10452
|
+
}
|
|
10453
|
+
async #K(e, t = {}) {
|
|
10454
|
+
let i = await this.#B(e, t);
|
|
10455
|
+
if (i === void 0) throw new Error("fetch() returned undefined");
|
|
10456
|
+
return i;
|
|
10457
|
+
}
|
|
10458
|
+
memo(e, t = {}) {
|
|
10459
|
+
let { status: i = S.hasSubscribers ? {} : void 0 } = t;
|
|
10460
|
+
t.status = i, i && (i.op = "memo", i.key = e, t.context && (i.context = t.context), i.cache = this);
|
|
10461
|
+
let s = this.#Q(e, t);
|
|
10462
|
+
return i && (i.value = s), S.hasSubscribers && S.publish(i), s;
|
|
10463
|
+
}
|
|
10464
|
+
#Q(e, t = {}) {
|
|
10465
|
+
let i = this.#I;
|
|
10466
|
+
if (!i) throw new Error("no memoMethod provided to constructor");
|
|
10467
|
+
let { context: s, status: n, forceRefresh: o, ...l } = t;
|
|
10468
|
+
n && o && (n.forceRefresh = !0);
|
|
10469
|
+
let h = this.#C(e, l), r = o || h === void 0;
|
|
10470
|
+
if (n && (n.memo = r ? "miss" : "hit", r || (n.value = h)), !r) return h;
|
|
10471
|
+
let c = i(e, h, {
|
|
10472
|
+
options: l,
|
|
10473
|
+
context: s
|
|
10474
|
+
});
|
|
10475
|
+
return n && (n.value = c), this.#W(e, c, l), c;
|
|
10476
|
+
}
|
|
10477
|
+
get(e, t = {}) {
|
|
10478
|
+
let { status: i = S.hasSubscribers ? {} : void 0 } = t;
|
|
10479
|
+
t.status = i, i && (i.op = "get", i.key = e, i.cache = this);
|
|
10480
|
+
let s = this.#C(e, t);
|
|
10481
|
+
return i && (s !== void 0 && (i.value = s), S.hasSubscribers && S.publish(i)), s;
|
|
10482
|
+
}
|
|
10483
|
+
#C(e, t = {}) {
|
|
10484
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: o } = t, l = this.#s.get(e);
|
|
10485
|
+
if (l === void 0) {
|
|
10486
|
+
o && (o.get = "miss");
|
|
10487
|
+
return;
|
|
10488
|
+
}
|
|
10489
|
+
let h = this.#t[l], r = this.#e(h);
|
|
10490
|
+
return o && this.#v(o, l), this.#p(l) ? r ? (o && (o.get = "stale-fetching"), i && h.__staleWhileFetching !== void 0 ? (o && (o.returnedStale = !0), h.__staleWhileFetching) : void 0) : (n || this.#E(e, "expire"), o && (o.get = "stale"), i ? (o && (o.returnedStale = !0), h) : void 0) : (o && (o.get = r ? "fetching" : "hit"), this.#L(l), s && this.#R(l), r ? h.__staleWhileFetching : h);
|
|
10962
10491
|
}
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
* entry found.
|
|
10966
|
-
*
|
|
10967
|
-
* If the key is not found, get() will return `undefined`.
|
|
10968
|
-
*/
|
|
10969
|
-
get(k, getOptions = {}) {
|
|
10970
|
-
const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions;
|
|
10971
|
-
const index = this.#keyMap.get(k);
|
|
10972
|
-
if (index !== void 0) {
|
|
10973
|
-
const value = this.#valList[index];
|
|
10974
|
-
const fetching = this.#isBackgroundFetch(value);
|
|
10975
|
-
if (status) this.#statusTTL(status, index);
|
|
10976
|
-
if (this.#isStale(index)) {
|
|
10977
|
-
if (status) status.get = "stale";
|
|
10978
|
-
if (!fetching) {
|
|
10979
|
-
if (!noDeleteOnStaleGet) this.#delete(k, "expire");
|
|
10980
|
-
if (status && allowStale) status.returnedStale = true;
|
|
10981
|
-
return allowStale ? value : void 0;
|
|
10982
|
-
} else {
|
|
10983
|
-
if (status && allowStale && value.__staleWhileFetching !== void 0) status.returnedStale = true;
|
|
10984
|
-
return allowStale ? value.__staleWhileFetching : void 0;
|
|
10985
|
-
}
|
|
10986
|
-
} else {
|
|
10987
|
-
if (status) status.get = "hit";
|
|
10988
|
-
if (fetching) return value.__staleWhileFetching;
|
|
10989
|
-
this.#moveToTail(index);
|
|
10990
|
-
if (updateAgeOnGet) this.#updateItemAge(index);
|
|
10991
|
-
return value;
|
|
10992
|
-
}
|
|
10993
|
-
} else if (status) status.get = "miss";
|
|
10492
|
+
#$(e, t) {
|
|
10493
|
+
this.#u[t] = e, this.#l[e] = t;
|
|
10994
10494
|
}
|
|
10995
|
-
#
|
|
10996
|
-
this.#
|
|
10997
|
-
this.#next[p] = n;
|
|
10495
|
+
#L(e) {
|
|
10496
|
+
e !== this.#h && (e === this.#a ? this.#a = this.#l[e] : this.#$(this.#u[e], this.#l[e]), this.#$(this.#h, e), this.#h = e);
|
|
10998
10497
|
}
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
if (index === this.#head) this.#head = this.#next[index];
|
|
11002
|
-
else this.#connect(this.#prev[index], this.#next[index]);
|
|
11003
|
-
this.#connect(this.#tail, index);
|
|
11004
|
-
this.#tail = index;
|
|
11005
|
-
}
|
|
10498
|
+
delete(e) {
|
|
10499
|
+
return this.#E(e, "delete");
|
|
11006
10500
|
}
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
if (this.#
|
|
10501
|
+
#E(e, t) {
|
|
10502
|
+
S.hasSubscribers && S.publish({
|
|
10503
|
+
op: "delete",
|
|
10504
|
+
delete: t,
|
|
10505
|
+
key: e,
|
|
10506
|
+
cache: this
|
|
10507
|
+
});
|
|
10508
|
+
let i = !1;
|
|
10509
|
+
if (this.#n !== 0) {
|
|
10510
|
+
let s = this.#s.get(e);
|
|
10511
|
+
if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g[s]), this.#g[s] = void 0), i = !0, this.#n === 1) this.#q(t);
|
|
10512
|
+
else {
|
|
10513
|
+
this.#x(s);
|
|
10514
|
+
let n = this.#t[s];
|
|
10515
|
+
if (this.#e(n) ? n.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#S?.(n, e, t), this.#f && this.#r?.push([
|
|
10516
|
+
n,
|
|
10517
|
+
e,
|
|
10518
|
+
t
|
|
10519
|
+
])), this.#s.delete(e), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#u[s];
|
|
10520
|
+
else if (s === this.#a) this.#a = this.#l[s];
|
|
11022
10521
|
else {
|
|
11023
|
-
this.#
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
if (this.#hasDispose) this.#dispose?.(v, k, reason);
|
|
11028
|
-
if (this.#hasDisposeAfter) this.#disposed?.push([
|
|
11029
|
-
v,
|
|
11030
|
-
k,
|
|
11031
|
-
reason
|
|
11032
|
-
]);
|
|
11033
|
-
}
|
|
11034
|
-
this.#keyMap.delete(k);
|
|
11035
|
-
this.#keyList[index] = void 0;
|
|
11036
|
-
this.#valList[index] = void 0;
|
|
11037
|
-
if (index === this.#tail) this.#tail = this.#prev[index];
|
|
11038
|
-
else if (index === this.#head) this.#head = this.#next[index];
|
|
11039
|
-
else {
|
|
11040
|
-
const pi = this.#prev[index];
|
|
11041
|
-
this.#next[pi] = this.#next[index];
|
|
11042
|
-
const ni = this.#next[index];
|
|
11043
|
-
this.#prev[ni] = this.#prev[index];
|
|
11044
|
-
}
|
|
11045
|
-
this.#size--;
|
|
11046
|
-
this.#free.push(index);
|
|
10522
|
+
let o = this.#u[s];
|
|
10523
|
+
this.#l[o] = this.#l[s];
|
|
10524
|
+
let l = this.#l[s];
|
|
10525
|
+
this.#u[l] = this.#u[s];
|
|
11047
10526
|
}
|
|
10527
|
+
this.#n--, this.#y.push(s);
|
|
11048
10528
|
}
|
|
11049
10529
|
}
|
|
11050
|
-
if (this.#
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
while (task = dt?.shift()) this.#disposeAfter?.(...task);
|
|
10530
|
+
if (this.#f && this.#r?.length) {
|
|
10531
|
+
let s = this.#r, n;
|
|
10532
|
+
for (; n = s?.shift();) this.#w?.(...n);
|
|
11054
10533
|
}
|
|
11055
|
-
return
|
|
10534
|
+
return i;
|
|
11056
10535
|
}
|
|
11057
|
-
/**
|
|
11058
|
-
* Clear the cache entirely, throwing away all values.
|
|
11059
|
-
*/
|
|
11060
10536
|
clear() {
|
|
11061
|
-
return this.#
|
|
10537
|
+
return this.#q("delete");
|
|
11062
10538
|
}
|
|
11063
|
-
#
|
|
11064
|
-
for (
|
|
11065
|
-
|
|
11066
|
-
if (this.#
|
|
10539
|
+
#q(e) {
|
|
10540
|
+
for (let t of this.#z({ allowStale: !0 })) {
|
|
10541
|
+
let i = this.#t[t];
|
|
10542
|
+
if (this.#e(i)) i.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
|
|
11067
10543
|
else {
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
reason
|
|
10544
|
+
let s = this.#i[t];
|
|
10545
|
+
this.#T && this.#S?.(i, s, e), this.#f && this.#r?.push([
|
|
10546
|
+
i,
|
|
10547
|
+
s,
|
|
10548
|
+
e
|
|
11074
10549
|
]);
|
|
11075
10550
|
}
|
|
11076
10551
|
}
|
|
11077
|
-
this.#
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
this.#ttls.fill(0);
|
|
11082
|
-
this.#starts.fill(0);
|
|
10552
|
+
if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#F) {
|
|
10553
|
+
this.#d.fill(0), this.#F.fill(0);
|
|
10554
|
+
for (let t of this.#g ?? []) t !== void 0 && clearTimeout(t);
|
|
10555
|
+
this.#g?.fill(void 0);
|
|
11083
10556
|
}
|
|
11084
|
-
if (this.#
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
this.#free.length = 0;
|
|
11088
|
-
this.#calculatedSize = 0;
|
|
11089
|
-
this.#size = 0;
|
|
11090
|
-
if (this.#hasDisposeAfter && this.#disposed) {
|
|
11091
|
-
const dt = this.#disposed;
|
|
11092
|
-
let task;
|
|
11093
|
-
while (task = dt?.shift()) this.#disposeAfter?.(...task);
|
|
10557
|
+
if (this.#_ && this.#_.fill(0), this.#a = 0, this.#h = 0, this.#y.length = 0, this.#b = 0, this.#n = 0, this.#f && this.#r) {
|
|
10558
|
+
let t = this.#r, i;
|
|
10559
|
+
for (; i = t?.shift();) this.#w?.(...i);
|
|
11094
10560
|
}
|
|
11095
10561
|
}
|
|
11096
10562
|
};
|
|
11097
10563
|
//#endregion
|
|
11098
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
10564
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/column_providers/providers.js
|
|
11099
10565
|
/**
|
|
11100
10566
|
* Unified memoised factory dispatching to the right provider flavour by the
|
|
11101
10567
|
* source shape:
|
|
@@ -11118,7 +10584,7 @@ function ColumnsProvider(source) {
|
|
|
11118
10584
|
* {@link AccessorColumnsProviderImpl}, so `indexAccessorRoot` runs once per
|
|
11119
10585
|
* accessor root (within the LRU window).
|
|
11120
10586
|
*/
|
|
11121
|
-
const _accessorProviderCache = new
|
|
10587
|
+
const _accessorProviderCache = new U({ max: 64 });
|
|
11122
10588
|
function AccessorColumnsProvider(root) {
|
|
11123
10589
|
let provider = _accessorProviderCache.get(root.handle);
|
|
11124
10590
|
if (provider === void 0) {
|
|
@@ -11132,7 +10598,7 @@ function AccessorColumnsProvider(root) {
|
|
|
11132
10598
|
* {@link ResultPoolColumnsProviderImpl}, so `indexPoolBlock` runs once per
|
|
11133
10599
|
* pool snapshot (within the LRU window).
|
|
11134
10600
|
*/
|
|
11135
|
-
const _resultPoolProviderCache = new
|
|
10601
|
+
const _resultPoolProviderCache = new U({ max: 4 });
|
|
11136
10602
|
function ResultPoolColumnsProvider(rawPool = getCfgRenderCtx().getUpstreamBlockCtx()) {
|
|
11137
10603
|
const key = hashRawPool(rawPool);
|
|
11138
10604
|
let provider = _resultPoolProviderCache.get(key);
|
|
@@ -11184,7 +10650,7 @@ function hashRawPool(rawPool) {
|
|
|
11184
10650
|
return rawPool.map((b) => `${b.blockId}\x1f${b.prodCtx ?? ""}\x1f${b.stagingCtx ?? ""}\x1f${b.prodIncomplete ? 1 : 0}\x1f${b.stagingIncomplete ? 1 : 0}`).join("");
|
|
11185
10651
|
}
|
|
11186
10652
|
//#endregion
|
|
11187
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
10653
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/column_providers/index.js
|
|
11188
10654
|
/**
|
|
11189
10655
|
* Build the default set of ColumnsProviders for the ambient render ctx:
|
|
11190
10656
|
* - `AccessorColumnsProvider` over `outputs` (if present)
|
|
@@ -11219,7 +10685,7 @@ function isColumnProvider(source) {
|
|
|
11219
10685
|
return typeof p.getColumns === "function" && typeof p.isFinal === "function";
|
|
11220
10686
|
}
|
|
11221
10687
|
//#endregion
|
|
11222
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
10688
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/data_column.js
|
|
11223
10689
|
/**
|
|
11224
10690
|
* Thrown by leaf-recipe factories when the requested column is provably
|
|
11225
10691
|
* absent in the active render ctx — i.e. every relevant accessor reports
|
|
@@ -11450,7 +10916,7 @@ const readDataStatus = memoizeByEntry(({ accessor, name }) => {
|
|
|
11450
10916
|
return accessor.getInputsLocked() ? "absent" : "resolving";
|
|
11451
10917
|
});
|
|
11452
10918
|
function memoizeByEntry(fn) {
|
|
11453
|
-
const cache = new
|
|
10919
|
+
const cache = new U({ max: 1e3 });
|
|
11454
10920
|
return (entry) => {
|
|
11455
10921
|
const key = `${entry.accessor.handle}:${entry.name}`;
|
|
11456
10922
|
let hit = cache.get(key);
|
|
@@ -11459,7 +10925,7 @@ function memoizeByEntry(fn) {
|
|
|
11459
10925
|
};
|
|
11460
10926
|
}
|
|
11461
10927
|
//#endregion
|
|
11462
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
10928
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/column_recipes/column_overrided_recipe.js
|
|
11463
10929
|
/**
|
|
11464
10930
|
* Recipe wrapper that overlays {@link SpecOverrides} on top of any other
|
|
11465
10931
|
* recipe. The id is `ColumnOverriddenKey { source: inner.id, specOverrides }`.
|
|
@@ -11597,7 +11063,7 @@ var DataColumnOverriddenRecipe = class extends ColumnOverriddenRecipe {
|
|
|
11597
11063
|
}
|
|
11598
11064
|
};
|
|
11599
11065
|
//#endregion
|
|
11600
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11066
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/column_recipes/column_filtered_recipe.js
|
|
11601
11067
|
/**
|
|
11602
11068
|
* Recipe wrapper that fixes the values of selected axes of an inner recipe
|
|
11603
11069
|
* (axis slicing). The id is `FilteredPColumnId { source: inner.id,
|
|
@@ -11723,7 +11189,7 @@ function toAxisSelector(axis) {
|
|
|
11723
11189
|
return selector;
|
|
11724
11190
|
}
|
|
11725
11191
|
//#endregion
|
|
11726
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11192
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/column_recipes/index.js
|
|
11727
11193
|
/**
|
|
11728
11194
|
* Build a `ColumnRecipe` from a stringified id. Dispatches to the matching
|
|
11729
11195
|
* concrete recipe variant based on the id's encoding and recurses on
|
|
@@ -11774,7 +11240,7 @@ function ColumnRecipeGetStatus(id, opts = {}) {
|
|
|
11774
11240
|
}
|
|
11775
11241
|
const ColumnRecipe = Object.assign(ColumnRecipeBuild, { getStatus: ColumnRecipeGetStatus });
|
|
11776
11242
|
//#endregion
|
|
11777
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11243
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/column_recipes/column_discovered_recipe.js
|
|
11778
11244
|
/**
|
|
11779
11245
|
* Recipe for columns identified by a {@link ColumnDiscoveredKey}: a base
|
|
11780
11246
|
* column + a `path` of linkers + qualifications.
|
|
@@ -11945,7 +11411,7 @@ function referencedUniIdsOf(key) {
|
|
|
11945
11411
|
return /* @__PURE__ */ new Set([key.column, ...(key.path ?? []).map((item) => item.column)]);
|
|
11946
11412
|
}
|
|
11947
11413
|
//#endregion
|
|
11948
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11414
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/column.js
|
|
11949
11415
|
/**
|
|
11950
11416
|
* Unified entry point — routes between the two top-level dispatchers:
|
|
11951
11417
|
* - string id (`PObjectId` / `ColumnUniversalId`) → {@link ColumnRecipe}
|
|
@@ -11959,7 +11425,7 @@ function Column(source, opts) {
|
|
|
11959
11425
|
return DataColumn(source, opts);
|
|
11960
11426
|
}
|
|
11961
11427
|
//#endregion
|
|
11962
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11428
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/columns_collection.js
|
|
11963
11429
|
/**
|
|
11964
11430
|
* Build a {@link ColumnsCollection} from sandbox-side source descriptors.
|
|
11965
11431
|
* Resolves the `columnsCollection` driver (either from `deps.driver` or via
|
|
@@ -12068,7 +11534,39 @@ function defaultCtxSources(ctx) {
|
|
|
12068
11534
|
return [...currentBlockSources(ctx), { kind: "result_pool" }];
|
|
12069
11535
|
}
|
|
12070
11536
|
//#endregion
|
|
12071
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11537
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/peer_links.js
|
|
11538
|
+
/** Main axes of the datasets: the second axis of every column marked `pl7.app/isAnchor`. */
|
|
11539
|
+
function collectDatasetAxes(specs) {
|
|
11540
|
+
return new Set(specs.flatMap((spec) => {
|
|
11541
|
+
const main = spec.axesSpec[1];
|
|
11542
|
+
return readAnnotation(spec, Annotation.IsAnchor) === "true" && main !== void 0 ? [canonicalizeAxisId(main)] : [];
|
|
11543
|
+
}));
|
|
11544
|
+
}
|
|
11545
|
+
/** {@link collectDatasetAxes} over the result pool. */
|
|
11546
|
+
function getResultPoolDatasetAxes() {
|
|
11547
|
+
return collectDatasetAxes(ResultPoolColumnsProvider().getColumns().map((c) => c.getSpec()));
|
|
11548
|
+
}
|
|
11549
|
+
/**
|
|
11550
|
+
* Labels of the peer links on a linker path. A peer link joins two datasets' main axes, e.g. one
|
|
11551
|
+
* clonotype to another, so the columns behind it describe a different clonotype than the row.
|
|
11552
|
+
*/
|
|
11553
|
+
function findPeerLinks(linkers, datasetAxes) {
|
|
11554
|
+
return uniq(linkers.flatMap((l) => {
|
|
11555
|
+
const peer = l.axesSpec.every((a) => datasetAxes.has(canonicalizeAxisId(a)));
|
|
11556
|
+
const label = readAnnotation(l, Annotation.LinkLabel) ?? readAnnotation(l, Annotation.Label);
|
|
11557
|
+
return peer && label ? [label] : [];
|
|
11558
|
+
}));
|
|
11559
|
+
}
|
|
11560
|
+
/** Hover text for the link icon. */
|
|
11561
|
+
function describePeerLinks(links) {
|
|
11562
|
+
return `Reached via ${links.join(", then ")}`;
|
|
11563
|
+
}
|
|
11564
|
+
/** Moves peer-linked items after the others, keeping the order within each group. */
|
|
11565
|
+
function peerLinkedLast(items, isPeerLinked) {
|
|
11566
|
+
return [...items.filter((i) => !isPeerLinked(i)), ...items.filter(isPeerLinked)];
|
|
11567
|
+
}
|
|
11568
|
+
//#endregion
|
|
11569
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/columns/utils.js
|
|
12072
11570
|
/**
|
|
12073
11571
|
* PObjectIds of every non-hit column referenced by `recipe.getQuery()`,
|
|
12074
11572
|
* deduped in traversal order. The hit column is
|
|
@@ -12099,6 +11597,11 @@ function collectLinkerIds(recipe) {
|
|
|
12099
11597
|
function collectLinkerColumns(recipe, opts = {}) {
|
|
12100
11598
|
return collectLinkerIds(recipe).map((id) => DataColumnImpl.fromId(id, opts) ?? throwError(`materializeLinkers: linker ${id} not resolvable`));
|
|
12101
11599
|
}
|
|
11600
|
+
/** Peer link labels for a column, checked against the result pool's datasets. */
|
|
11601
|
+
function createPeerLinkFinder() {
|
|
11602
|
+
const datasetAxes = getResultPoolDatasetAxes();
|
|
11603
|
+
return (recipe) => findPeerLinks(collectLinkerColumns(recipe).map((l) => l.getSpec()), datasetAxes);
|
|
11604
|
+
}
|
|
12102
11605
|
/**
|
|
12103
11606
|
* Hit-side axis qualifications for the recipe — the ones that should land on
|
|
12104
11607
|
* the outer-join entry wrapping this column at the consumer boundary.
|
|
@@ -12198,8 +11701,25 @@ function findDiscovered(recipe) {
|
|
|
12198
11701
|
function hasSingleDataColumn(recipe) {
|
|
12199
11702
|
return recipe.getReferencedIds().length === 1;
|
|
12200
11703
|
}
|
|
11704
|
+
/**
|
|
11705
|
+
* {@link ColumnOption}s for `recipes`, each with its recipe. Peer-linked columns go last, the rest
|
|
11706
|
+
* keep their order.
|
|
11707
|
+
*/
|
|
11708
|
+
function deriveRecipeOptions(recipes, labelOptions = {}) {
|
|
11709
|
+
const labels = deriveDistinctLabels(recipes.map((r) => r.getSpec()), labelOptions);
|
|
11710
|
+
const findPeerLinks = createPeerLinkFinder();
|
|
11711
|
+
return peerLinkedLast(recipes.map((recipe, i) => {
|
|
11712
|
+
const links = findPeerLinks(recipe);
|
|
11713
|
+
return {
|
|
11714
|
+
id: recipe.id,
|
|
11715
|
+
label: labels[i],
|
|
11716
|
+
linkHint: links.length > 0 ? describePeerLinks(links) : void 0,
|
|
11717
|
+
recipe
|
|
11718
|
+
};
|
|
11719
|
+
}), (o) => o.linkHint !== void 0);
|
|
11720
|
+
}
|
|
12201
11721
|
//#endregion
|
|
12202
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11722
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/pframe_utils/columns.js
|
|
12203
11723
|
function getAllRelatedColumns(ctx, predicate) {
|
|
12204
11724
|
const columns = new PColumnCollection();
|
|
12205
11725
|
columns.addColumnProvider(ctx.resultPool);
|
|
@@ -12275,7 +11795,7 @@ function discoverIntegrableColumnIds(ctx, rootColumns) {
|
|
|
12275
11795
|
}
|
|
12276
11796
|
}
|
|
12277
11797
|
//#endregion
|
|
12278
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11798
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/components/PFrameForGraphs.js
|
|
12279
11799
|
function isHiddenFromGraphColumn(column) {
|
|
12280
11800
|
return !!readAnnotationJson(column, Annotation.HideDataFromGraphs);
|
|
12281
11801
|
}
|
|
@@ -12304,7 +11824,7 @@ function createPFrameForGraphs(ctx, blockColumns) {
|
|
|
12304
11824
|
}));
|
|
12305
11825
|
}
|
|
12306
11826
|
//#endregion
|
|
12307
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11827
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/components/PlDatasetSelector/dataset_selection.js
|
|
12308
11828
|
function isDatasetSelection(value) {
|
|
12309
11829
|
return typeof value === "object" && value !== null && value.__isDatasetSelection === "v1" && "primary" in value;
|
|
12310
11830
|
}
|
|
@@ -12320,7 +11840,7 @@ function createDatasetSelection(primary, enrichments) {
|
|
|
12320
11840
|
};
|
|
12321
11841
|
}
|
|
12322
11842
|
//#endregion
|
|
12323
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11843
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/components/PlDatasetSelector/filter_discovery.js
|
|
12324
11844
|
/**
|
|
12325
11845
|
* Matches columns annotated `pl7.app/isSubset: "true"` whose axes ⊆ anchor axes.
|
|
12326
11846
|
*
|
|
@@ -12372,7 +11892,7 @@ function buildRefMap(entries) {
|
|
|
12372
11892
|
return new Map(entries.map((e) => [(0, import_canonicalize.default)(e.ref), e.ref]));
|
|
12373
11893
|
}
|
|
12374
11894
|
//#endregion
|
|
12375
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11895
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/components/PlDatasetSelector/enrichment_discovery.js
|
|
12376
11896
|
/**
|
|
12377
11897
|
* Linker-reached hits attached to the anchor primary. Drops zero-hop variants
|
|
12378
11898
|
* (filters / the primary itself) and structural hits (subset, linker, label
|
|
@@ -12432,7 +11952,7 @@ function enrichmentVariantsToRefs(variants, labelOptions) {
|
|
|
12432
11952
|
});
|
|
12433
11953
|
}
|
|
12434
11954
|
//#endregion
|
|
12435
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
11955
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/components/PlDatasetSelector/build_dataset_options.js
|
|
12436
11956
|
function toPredicate(opt) {
|
|
12437
11957
|
if (opt === void 0) return () => true;
|
|
12438
11958
|
return typeof opt === "function" ? opt : multiColumnSelectorsToPredicate(opt);
|
|
@@ -12482,7 +12002,7 @@ function buildDatasetOptions(ctx, opts) {
|
|
|
12482
12002
|
});
|
|
12483
12003
|
}
|
|
12484
12004
|
//#endregion
|
|
12485
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
12005
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/filters/traverse.js
|
|
12486
12006
|
/**
|
|
12487
12007
|
* Recursively traverses a FilterSpec tree bottom-up, applying visitor callbacks.
|
|
12488
12008
|
*
|
|
@@ -12521,7 +12041,7 @@ function collectFilterSpecColumns(filter) {
|
|
|
12521
12041
|
});
|
|
12522
12042
|
}
|
|
12523
12043
|
//#endregion
|
|
12524
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
12044
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/filters/converters/filterToQuery.js
|
|
12525
12045
|
/** Converts a QueryColumnId object into a SpecQueryExpression reference. */
|
|
12526
12046
|
function resolveColumnRef(col) {
|
|
12527
12047
|
return col.type === "axis" ? {
|
|
@@ -12859,7 +12379,7 @@ function isNumber(value) {
|
|
|
12859
12379
|
return typeof value === "number" || value instanceof Number;
|
|
12860
12380
|
}
|
|
12861
12381
|
//#endregion
|
|
12862
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
12382
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/filters/distill.js
|
|
12863
12383
|
/**
|
|
12864
12384
|
* Strips non-FilterSpec metadata (whitelist approach) and removes
|
|
12865
12385
|
* unfilled leaves (type is undefined or any required field is undefined).
|
|
@@ -12964,7 +12484,7 @@ const REQUIRED_KEYS_BY_TYPE = {
|
|
|
12964
12484
|
greaterThanColumnOrEqual: ["column", "rhs"]
|
|
12965
12485
|
};
|
|
12966
12486
|
//#endregion
|
|
12967
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
12487
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/state-migration.js
|
|
12968
12488
|
/** Upgrade PlDataTableStateV2 to the latest version */
|
|
12969
12489
|
function upgradePlDataTableStateV2(state) {
|
|
12970
12490
|
if (!state) return createPlDataTableStateV2();
|
|
@@ -13322,7 +12842,7 @@ function parseLegacyLeafColumn(s) {
|
|
|
13322
12842
|
return parsed;
|
|
13323
12843
|
}
|
|
13324
12844
|
//#endregion
|
|
13325
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
12845
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/utils.js
|
|
13326
12846
|
/** Adapt a {@link ColumnRecipe} to the plain {@link RuleColumn} shape. */
|
|
13327
12847
|
function toRuleColumn(col) {
|
|
13328
12848
|
return {
|
|
@@ -13416,11 +12936,12 @@ function deriveAllLabels(options) {
|
|
|
13416
12936
|
return deriveDistinctLabels(columns.map((c) => ({
|
|
13417
12937
|
spec: c.spec,
|
|
13418
12938
|
linkerPath: c.linkerPath?.map((step) => ({ spec: step.linker.spec })),
|
|
13419
|
-
qualifications: c.qualifications
|
|
12939
|
+
qualifications: c.qualifications,
|
|
12940
|
+
marker: c.marker
|
|
13420
12941
|
})), deriveLabelsOptions).reduce((acc, label, index) => (acc[columns[index].id] = label, acc), {});
|
|
13421
12942
|
}
|
|
13422
12943
|
//#endregion
|
|
13423
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
12944
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js
|
|
13424
12945
|
/**
|
|
13425
12946
|
* Assemble a ptable def directly from recipes. Each secondary recipe is its own
|
|
13426
12947
|
* outer-joined subtree: `getQuery()` encodes its linker chain, and its
|
|
@@ -13484,7 +13005,7 @@ function columnToJoinEntry(col, qualifications) {
|
|
|
13484
13005
|
};
|
|
13485
13006
|
}
|
|
13486
13007
|
//#endregion
|
|
13487
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
13008
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/columnResolver.js
|
|
13488
13009
|
function createColumnResolver(columns) {
|
|
13489
13010
|
const axisIds = [];
|
|
13490
13011
|
for (const c of columns) for (const ax of c.getSpec().axesSpec) axisIds.push(getAxisId(ax));
|
|
@@ -13506,7 +13027,7 @@ function createColumnResolver(columns) {
|
|
|
13506
13027
|
};
|
|
13507
13028
|
}
|
|
13508
13029
|
//#endregion
|
|
13509
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
13030
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/discoverColumns.js
|
|
13510
13031
|
/**
|
|
13511
13032
|
* Discover columns from sources/anchors and split them into primary
|
|
13512
13033
|
* (direct anchor hits — zero-hop, query is a bare column) and secondary
|
|
@@ -13552,7 +13073,7 @@ function discoverLabelColumns(ctx, primary) {
|
|
|
13552
13073
|
}).getColumns();
|
|
13553
13074
|
}
|
|
13554
13075
|
//#endregion
|
|
13555
|
-
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.
|
|
13076
|
+
//#region ../node_modules/.pnpm/@platforma-sdk+model@1.86.0/node_modules/@platforma-sdk/model/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js
|
|
13556
13077
|
function createPlDataTableV3(ctx, options) {
|
|
13557
13078
|
const state = upgradePlDataTableStateV2(options.tableState);
|
|
13558
13079
|
const primaryJoinType = options.primaryJoinType ?? "full";
|
|
@@ -13561,8 +13082,13 @@ function createPlDataTableV3(ctx, options) {
|
|
|
13561
13082
|
const { primary, secondary } = resolved;
|
|
13562
13083
|
if (primary.length === 0) return void 0;
|
|
13563
13084
|
const { direct, linked } = splitByTopology(secondary);
|
|
13085
|
+
const labelable = [...primary, ...secondary].map(toLabelableColumn);
|
|
13086
|
+
const linkHints = collectLinkHints(labelable);
|
|
13564
13087
|
const derivedLabels = deriveAllLabels({
|
|
13565
|
-
columns:
|
|
13088
|
+
columns: labelable.filter((c) => !isColumnHidden(c.spec)).map((c) => ({
|
|
13089
|
+
...c,
|
|
13090
|
+
marker: linkHints.get(c.id)
|
|
13091
|
+
})),
|
|
13566
13092
|
deriveLabelsOptions: {
|
|
13567
13093
|
includeNativeLabel: true,
|
|
13568
13094
|
...options.labelsOptions
|
|
@@ -13635,6 +13161,7 @@ function createPlDataTableV3(ctx, options) {
|
|
|
13635
13161
|
],
|
|
13636
13162
|
primaryColumns: primary,
|
|
13637
13163
|
derivedLabels,
|
|
13164
|
+
linkHints,
|
|
13638
13165
|
visibilityByColId,
|
|
13639
13166
|
orderByColId
|
|
13640
13167
|
});
|
|
@@ -13676,6 +13203,15 @@ function splitByTopology(columns) {
|
|
|
13676
13203
|
function collectLinkerSnapshots(linked) {
|
|
13677
13204
|
return uniqueBy(linked.flatMap((c) => collectLinkerColumns(c)), (c) => c.id);
|
|
13678
13205
|
}
|
|
13206
|
+
/** Link icon hover text per column, for columns reached through at least one peer link. */
|
|
13207
|
+
function collectLinkHints(columns) {
|
|
13208
|
+
if (!columns.some((c) => c.linkerPath?.length)) return /* @__PURE__ */ new Map();
|
|
13209
|
+
const datasetAxes = getResultPoolDatasetAxes();
|
|
13210
|
+
return new Map(columns.flatMap((c) => {
|
|
13211
|
+
const links = findPeerLinks(c.linkerPath?.map((step) => step.linker.spec) ?? [], datasetAxes);
|
|
13212
|
+
return links.length > 0 ? [[c.id, describePeerLinks(links)]] : [];
|
|
13213
|
+
}));
|
|
13214
|
+
}
|
|
13679
13215
|
function toLabelableColumn(col) {
|
|
13680
13216
|
return {
|
|
13681
13217
|
id: col.id,
|
|
@@ -13696,7 +13232,7 @@ function toLabelableColumn(col) {
|
|
|
13696
13232
|
* The UI overlays this onto the engine-emitted specs at render time.
|
|
13697
13233
|
*/
|
|
13698
13234
|
function buildColumnsMeta(params) {
|
|
13699
|
-
const { fullColumns, visibleColumns, primaryColumns, derivedLabels } = params;
|
|
13235
|
+
const { fullColumns, visibleColumns, primaryColumns, derivedLabels, linkHints } = params;
|
|
13700
13236
|
const { visibilityByColId, orderByColId } = params;
|
|
13701
13237
|
const visibleStatus = buildDataStatusMap(visibleColumns);
|
|
13702
13238
|
const columns = fullColumns.reduce((acc, c) => {
|
|
@@ -13705,7 +13241,8 @@ function buildColumnsMeta(params) {
|
|
|
13705
13241
|
label: derivedLabels[c.id],
|
|
13706
13242
|
visibility: getEffectiveVisibility(rc, visibilityByColId),
|
|
13707
13243
|
order: getOrderPriority(rc, orderByColId),
|
|
13708
|
-
status: visibleStatus[c.id]
|
|
13244
|
+
status: visibleStatus[c.id],
|
|
13245
|
+
linkHint: linkHints.get(c.id)
|
|
13709
13246
|
};
|
|
13710
13247
|
return acc;
|
|
13711
13248
|
}, {});
|
|
@@ -14618,7 +14155,7 @@ function convertFilterUI(filters) {
|
|
|
14618
14155
|
//#endregion
|
|
14619
14156
|
//#region ../kind/dist/package.js
|
|
14620
14157
|
var name = "@platforma-open/milaboratories.top-antibodies.kind";
|
|
14621
|
-
var version = "1.2.
|
|
14158
|
+
var version = "1.2.1";
|
|
14622
14159
|
//#endregion
|
|
14623
14160
|
//#region ../node_modules/.pnpm/@platforma-sdk+block-kind@1.1.0/node_modules/@platforma-sdk/block-kind/dist/params.js
|
|
14624
14161
|
/**
|
|
@@ -15122,13 +14659,12 @@ const platforma$1 = BlockModelV3.create({
|
|
|
15122
14659
|
if (!result || result.scoresPending) return void 0;
|
|
15123
14660
|
const datasetFilterId = inputFilter && anchorInitializedId(inputFilter);
|
|
15124
14661
|
const isDatasetFilter = (c) => datasetFilterId !== void 0 && extractPObjectId(c.id) === datasetFilterId;
|
|
15125
|
-
const filterableMatches = result.meta.allMatches.filter((c) => !isDatasetFilter(c));
|
|
15126
|
-
const labels = deriveDistinctLabels(filterableMatches.map((c) => c.getSpec()), { includeNativeLabel: true });
|
|
15127
14662
|
return {
|
|
15128
|
-
options:
|
|
14663
|
+
options: deriveRecipeOptions(result.meta.allMatches.filter((c) => !isDatasetFilter(c)), { includeNativeLabel: true }).map(({ recipe: c, label, linkHint }) => {
|
|
15129
14664
|
const spec = c.getSpec();
|
|
15130
14665
|
return {
|
|
15131
|
-
label
|
|
14666
|
+
label,
|
|
14667
|
+
linkHint,
|
|
15132
14668
|
value: matchToColumnId(c, inputAnchor),
|
|
15133
14669
|
column: {
|
|
15134
14670
|
id: c.id,
|
|
@@ -15149,15 +14685,15 @@ const platforma$1 = BlockModelV3.create({
|
|
|
15149
14685
|
if (!result || result.scoresPending) return void 0;
|
|
15150
14686
|
const rankedColumnIds = new Set(ctx.data.rankingOrder.flatMap((r) => r.value ? [r.value.column] : []));
|
|
15151
14687
|
const rankableMatches = result.meta.allMatches.filter((c) => c.getSpec().valueType !== "String").filter((c) => isRankableMatch(c, result.anchorSpec, rankedColumnIds));
|
|
15152
|
-
const labels = deriveDistinctLabels(rankableMatches.map((c) => c.getSpec()), { includeNativeLabel: true });
|
|
15153
14688
|
const levelLabels = rankingLevelLabels(result.anchorSpec);
|
|
15154
14689
|
const levelGroups = {
|
|
15155
14690
|
cluster: `${levelLabels.cluster} metrics`,
|
|
15156
14691
|
clonotype: `${levelLabels.clonotype} metrics`
|
|
15157
14692
|
};
|
|
15158
14693
|
return {
|
|
15159
|
-
options: rankableMatches.map((c,
|
|
15160
|
-
label
|
|
14694
|
+
options: deriveRecipeOptions(rankableMatches, { includeNativeLabel: true }).map(({ recipe: c, label, linkHint }) => ({
|
|
14695
|
+
label,
|
|
14696
|
+
linkHint,
|
|
15161
14697
|
value: matchToColumnId(c, inputAnchor),
|
|
15162
14698
|
group: levelGroups[rankingLevelOf(c.getSpec(), result.anchorSpec)]
|
|
15163
14699
|
})),
|