diff --git a/.babelrc b/.babelrc index 29815062..a7bf19af 100644 --- a/.babelrc +++ b/.babelrc @@ -8,7 +8,7 @@ } } ], - "@babel/preset-react", + "@babel/preset-react" ], "plugins": [ "@babel/plugin-proposal-class-properties" diff --git a/.eslintrc.json b/.eslintrc.json index e740de07..6d7a28ec 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -3,8 +3,7 @@ "@exabyte-io/eslint-config" ], "ignorePatterns": [ - "dist/", - "src/workflows/workflows.js" + "dist/" ], "settings": { "import/resolver": { diff --git a/.gitignore b/.gitignore index d8216a15..4e862dc4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,8 @@ build/ node_modules/ .eslintcache .nyc_output/ +coverage/ .idea/ -src/workflows/workflows.js .DS_Store # Python diff --git a/.nycrc b/.nycrc index e1ffae4d..c8908b69 100644 --- a/.nycrc +++ b/.nycrc @@ -2,6 +2,30 @@ "all": true, "include": [ "src/**/*.js", - "src/**/*.jsx" + "src/**/*.jsx", + "src/**/*.ts" + ], + "exclude": [ + "src/js/generated/**/*", + "tests/**/*", + "**/*.test.ts", + "**/*.spec.ts", + "**/*.d.ts" + ], + "reporter": [ + "text", + "html", + "lcov" + ], + "check-coverage": true, + "branches": 80, + "lines": 85, + "functions": 80, + "statements": 85, + "sourceMap": true, + "instrument": true, + "require": [ + "ts-node/register" ] } + diff --git a/build_workflows.js b/build_workflows.js deleted file mode 100644 index 90fdf024..00000000 --- a/build_workflows.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require("fs"); -const path = require("path"); -const yaml = require("js-yaml"); - -const allApplications = [ - "espresso", - "jupyterLab", - "nwchem", - "python", - "python/ml", - "shell", - "vasp", - "deepmd", -]; - -const allWorkflows = { workflows: {}, subworkflows: {} }; - -const JSONstringifyOrder = (obj, space) => { - const allKeys = new Set(); - // eslint-disable-next-line no-sequences - JSON.stringify(obj, (key, value) => (allKeys.add(key), value)); - return JSON.stringify(obj, Array.from(allKeys).sort(), space); -}; - -const loadFile = (name, dir, file, type) => { - const entryPath = path.resolve(dir, file); - if (!fs.statSync(entryPath).isFile()) { - console.log(`Skipping ${entryPath} as it is not a file.`); - return; - } - const obj = fs.readFileSync(path.resolve(dir, file), "utf8"); - const key = file.split(".")[0]; - allWorkflows[type][name][key] = yaml.load(obj); -}; - -allApplications.forEach((name) => { - allWorkflows.workflows[name] = {}; - allWorkflows.subworkflows[name] = {}; - const wfDir = path.resolve(__dirname, "assets", "workflows", name); - const swDir = path.resolve(__dirname, "assets", "subworkflows", name); - try { - const wfFiles = fs.readdirSync(wfDir); - const swFiles = fs.readdirSync(swDir); - console.log( - `Building ${name}: ${wfFiles.length} workflow(s) and ${swFiles.length} subworkflow(s)`, - ); - wfFiles.forEach((file) => loadFile(name, wfDir, file, "workflows")); - swFiles.forEach((file) => loadFile(name, swDir, file, "subworkflows")); - } catch (e) { - console.log(e); - } -}); - -const write_path = "workflows.js"; -// write to src for unit test coverage simplicity -fs.writeFileSync( - `./src/workflows/${write_path}`, - "module.exports = {workflowData: " + JSONstringifyOrder(allWorkflows) + "}", - "utf8", -); -fs.writeFileSync( - `./dist/workflows/${write_path}`, - "module.exports = {workflowData: " + JSONstringifyOrder(allWorkflows) + "}", - "utf8", -); diff --git a/dist/js/Subworkflow.d.ts b/dist/js/Subworkflow.d.ts new file mode 100644 index 00000000..dc2193ae --- /dev/null +++ b/dist/js/Subworkflow.d.ts @@ -0,0 +1,679 @@ +import { Application } from "@mat3ra/ade"; +import { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; +import { type DefaultableInMemoryEntityConstructor } from "@mat3ra/code/dist/js/entity/mixins/DefaultableMixin"; +import { type NamedInMemoryEntityConstructor } from "@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin"; +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; +import type { JobSchema, SubworkflowSchema } from "@mat3ra/esse/dist/js/types"; +import type { Material } from "@mat3ra/made"; +import { Model, ModelFactory } from "@mat3ra/mode"; +import type { MetaPropertyHolder } from "@mat3ra/prode"; +import type { MaterialExternalContext } from "./context/mixins/MaterialContextMixin"; +import type { MaterialsExternalContext } from "./context/mixins/MaterialsContextMixin"; +import type { MaterialsSetExternalContext } from "./context/mixins/MaterialsSetContextMixin"; +import type { JobExternalContext, WorkflowExternalContext } from "./context/providers/by_application/espresso/QEPWXInputDataManager"; +import { type SubworkflowSchemaMixin } from "./generated/SubworkflowSchemaMixin"; +import { SubworkflowUnit } from "./units"; +import type { AnySubworkflowUnit } from "./units/factory"; +type ConvergenceConfig = { + parameter: "N_k" | "N_k_nonuniform"; + parameterInitial: number | [number, number, number]; + parameterIncrement: number; + result: string; + resultInitial: number; + condition: string; + operator: string; + tolerance: number; + maxOccurrences: number; + externalContext: SubworkflowExternalContext; +}; +type Base = typeof InMemoryEntity & DefaultableInMemoryEntityConstructor & NamedInMemoryEntityConstructor & Constructor; +type SubworkflowExternalContext = MaterialExternalContext & MaterialsExternalContext & MaterialsSetExternalContext & WorkflowExternalContext & JobExternalContext; +declare const Subworkflow_base: Base; +export default class Subworkflow extends Subworkflow_base implements SubworkflowSchema { + private ModelFactory; + private applicationInstance; + unitsInstances: AnySubworkflowUnit[]; + modelInstance: Model; + properties: string[]; + repetition: number; + static createDefault: () => Subworkflow; + toJSON: () => SubworkflowSchema & AnyObject; + constructor(config: SubworkflowSchema, _ModelFactory?: typeof ModelFactory); + static get defaultConfig(): { + _id: any; + name: string; + application: import("node_modules/@mat3ra/ade/dist/js/applicationMixin").DefaultApplicationConfig; + model: { + method: { + readonly type: "pseudopotential"; + readonly subtype: "us"; + }; + type: "dft"; + subtype: "gga"; + }; + properties: never[]; + units: never[]; + }; + setRepetition(repetition: number): void; + getAsUnit(): SubworkflowUnit; + setApplication(application: Application): void; + setModel(model: Model): void; + private buildExternalContext; + render(context: SubworkflowExternalContext): void; + /** + * TODO: reuse workflow function instead + */ + private addUnit; + private setUnits; + removeUnit(flowchartId: string): void; + getUnit(flowchartId: string): AnySubworkflowUnit | undefined; + unitIndex(flowchartId: string): number; + replaceUnit(index: number, unit: AnySubworkflowUnit): void; + setIsDraft(bool: boolean): void; + get methodData(): { + [k: string]: unknown; + searchText?: string; + } | undefined; + /** + * @summary Calculates hash of the subworkflow. Meaningful fields are units, app and model. + * units must be sorted topologically before hashing (already sorted). + */ + calculateHash(): string; + private calculateModelHash; + findUnitById(id: string): { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + isDefault?: boolean; + preProcessors: { + name: string; + }[]; + postProcessors: { + name: string; + }[]; + monitors: { + name: string; + }[]; + results: { + name: string; + }[]; + tags?: string[]; + status?: "idle" | "active" | "warning" | "error" | "finished"; + statusTrack?: { + trackedAt: number; + status: string; + repetition?: number; + }[]; + isDraft?: boolean; + type: "io"; + head?: boolean; + flowchartId: string; + next?: string; + enableRender?: boolean; + subtype: "input" | "output" | "dataFrame"; + source: "api" | "object_storage"; + input: ({ + type: "api"; + endpoint: string; + endpoint_options: {}; + name?: string; + } | { + type: "object_storage"; + objectData: { + CONTAINER?: string; + NAME?: string; + PROVIDER?: string; + REGION?: string; + SIZE?: number; + TIMESTAMP?: string; + }; + overwrite?: boolean; + pathname?: string; + basename?: string; + filetype?: string; + })[]; + } | { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + isDefault?: boolean; + preProcessors: { + name: string; + }[]; + postProcessors: { + name: string; + }[]; + monitors: { + name: string; + }[]; + results: { + name: string; + }[]; + tags?: string[]; + status?: "idle" | "active" | "warning" | "error" | "finished"; + statusTrack?: { + trackedAt: number; + status: string; + repetition?: number; + }[]; + isDraft?: boolean; + type: "condition"; + head?: boolean; + flowchartId: string; + next?: string; + enableRender?: boolean; + input: { + scope: string; + name: string; + }[]; + statement: string; + then: string; + else: string; + maxOccurrences: number; + throwException?: boolean; + } | { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + isDefault?: boolean; + preProcessors: { + name: string; + }[]; + postProcessors: { + name: string; + }[]; + monitors: { + name: string; + }[]; + results: { + name: string; + }[]; + tags?: string[]; + status?: "idle" | "active" | "warning" | "error" | "finished"; + statusTrack?: { + trackedAt: number; + status: string; + repetition?: number; + }[]; + isDraft?: boolean; + type: "assertion"; + head?: boolean; + flowchartId: string; + next?: string; + enableRender?: boolean; + statement: string; + errorMessage?: string; + } | { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + isDefault?: boolean; + preProcessors: { + name: string; + }[]; + postProcessors: { + name: string; + }[]; + monitors: { + name: string; + }[]; + results: { + name: string; + }[]; + tags?: string[]; + status?: "idle" | "active" | "warning" | "error" | "finished"; + statusTrack?: { + trackedAt: number; + status: string; + repetition?: number; + }[]; + isDraft?: boolean; + type: "execution"; + head?: boolean; + flowchartId: string; + next?: string; + enableRender?: boolean; + application: { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + isDefault?: boolean; + shortName: string; + summary: string; + version: string; + build: string; + hasAdvancedComputeOptions?: boolean; + isLicensed?: boolean; + }; + executable: { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + isDefault?: boolean; + applicationName: string; + hasAdvancedComputeOptions?: boolean; + }; + flavor: { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + isDefault?: boolean; + preProcessors: { + name: string; + }[]; + postProcessors: { + name: string; + }[]; + monitors: { + name: string; + }[]; + results: { + name: string; + }[]; + executableName?: string; + applicationName?: string; + input: { + templateId?: string; + templateName?: string; + name?: string; + }[]; + supportedApplicationVersions?: string[]; + }; + input: { + template: { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + applicationName: string; + applicationVersion?: string; + executableName: string; + contextProviders: { + name: import("@mat3ra/esse/dist/js/types").ContextProviderNameEnum; + }[]; + content: string; + }; + rendered: string; + isManuallyChanged: boolean; + }[]; + context: ({ + name: "input"; + data: { + contextProviderName: "nwchem-total-energy"; + CHARGE: number; + MULT: number; + BASIS: string; + NAT: number; + NTYP: number; + ATOMIC_POSITIONS: string; + ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; + ATOMIC_SPECIES: string; + FUNCTIONAL: string; + CARTESIAN: boolean; + } | { + IBRAV: number; + RESTART_MODE: "from_scratch" | "restart"; + ATOMIC_SPECIES: { + X: string; + Mass_X: number; + PseudoPot_X: string; + }[]; + ATOMIC_SPECIES_WITH_LABELS: { + X: string; + Mass_X: number; + PseudoPot_X: string; + }[]; + NAT: number; + NTYP: number; + NTYP_WITH_LABELS: number; + ATOMIC_POSITIONS?: { + X?: string; + x: number; + y: number; + z: number; + "if_pos(1)"?: number; + "if_pos(2)"?: number; + "if_pos(3)"?: number; + }[]; + ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS?: string; + CELL_PARAMETERS: { + v1?: [number, number, number]; + v2?: [number, number, number]; + v3?: [number, number, number]; + }; + FIRST_IMAGE: { + X?: string; + x: number; + y: number; + z: number; + "if_pos(1)"?: number; + "if_pos(2)"?: number; + "if_pos(3)"?: number; + }[]; + LAST_IMAGE: { + X?: string; + x: number; + y: number; + z: number; + "if_pos(1)"?: number; + "if_pos(2)"?: number; + "if_pos(3)"?: number; + }[]; + INTERMEDIATE_IMAGES: { + X?: string; + x: number; + y: number; + z: number; + "if_pos(1)"?: number; + "if_pos(2)"?: number; + "if_pos(3)"?: number; + }[][]; + contextProviderName: "qe-neb"; + } | { + IBRAV: number; + RESTART_MODE: "from_scratch" | "restart"; + ATOMIC_SPECIES: { + X: string; + Mass_X: number; + PseudoPot_X: string; + }[]; + ATOMIC_SPECIES_WITH_LABELS: { + X: string; + Mass_X: number; + PseudoPot_X: string; + }[]; + NAT: number; + NTYP: number; + NTYP_WITH_LABELS: number; + ATOMIC_POSITIONS: { + X?: string; + x: number; + y: number; + z: number; + "if_pos(1)"?: number; + "if_pos(2)"?: number; + "if_pos(3)"?: number; + }[]; + ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; + CELL_PARAMETERS: { + v1?: [number, number, number]; + v2?: [number, number, number]; + v3?: [number, number, number]; + }; + contextProviderName: "qe-pwx"; + } | { + POSCAR: string; + POSCAR_WITH_CONSTRAINTS: string; + contextProviderName: "vasp"; + } | { + FIRST_IMAGE: string; + LAST_IMAGE: string; + INTERMEDIATE_IMAGES: string[]; + contextProviderName: "vasp-neb"; + }; + extraData: { + materialHash: string; + }; + isEdited: boolean; + } | { + name: "cutoffs"; + data: { + wavefunction?: number; + density?: number; + }; + isEdited: boolean; + extraData: {}; + } | { + name: "kgrid" | "qgrid" | "igrid"; + data: { + dimensions: [number, number, number] | [string, string, string]; + shifts?: [number, number, number]; + reciprocalVectorRatios?: [number, number, number]; + gridMetricType: "KPPRA" | "spacing"; + gridMetricValue: number; + preferGridMetric?: boolean; + }; + extraData: { + materialHash: string; + }; + isEdited: boolean; + } | { + name: "qpath" | "ipath" | "kpath" | "explicitKPath" | "explicitKPath2PIBA"; + data: [{ + point?: string; + steps: number; + coordinates: number[]; + }, ...{ + point?: string; + steps: number; + coordinates: number[]; + }[]]; + extraData: { + materialHash: string; + }; + isEdited: boolean; + } | { + name: "hubbard_j"; + data: [{ + paramType?: "U" | "J" | "B" | "E2" | "E3"; + atomicSpecies?: string; + atomicOrbital?: string; + value?: number; + }, ...{ + paramType?: "U" | "J" | "B" | "E2" | "E3"; + atomicSpecies?: string; + atomicOrbital?: string; + value?: number; + }[]]; + isEdited: boolean; + extraData: {}; + } | { + name: "hubbard_u"; + data: { + atomicSpecies?: string; + atomicOrbital?: string; + hubbardUValue?: number; + }[]; + extraData: { + materialHash: string; + }; + isEdited: boolean; + } | { + name: "hubbard_v"; + data: [{ + atomicSpecies?: string; + siteIndex?: number; + atomicOrbital?: string; + atomicSpecies2?: string; + siteIndex2?: number; + atomicOrbital2?: string; + hubbardVValue?: number; + }, ...{ + atomicSpecies?: string; + siteIndex?: number; + atomicOrbital?: string; + atomicSpecies2?: string; + siteIndex2?: number; + atomicOrbital2?: string; + hubbardVValue?: number; + }[]]; + isEdited: boolean; + extraData: {}; + } | { + name: "hubbard_legacy"; + data: [{ + atomicSpecies?: string; + atomicSpeciesIndex?: number; + hubbardUValue?: number; + }, ...{ + atomicSpecies?: string; + atomicSpeciesIndex?: number; + hubbardUValue?: number; + }[]]; + isEdited: boolean; + extraData: {}; + } | { + name: "neb"; + data: { + nImages?: number; + }; + isEdited: boolean; + extraData: {}; + } | { + name: "boundaryConditions"; + data: { + type?: "pbc" | "bc1" | "bc2" | "bc3"; + offset?: number; + electricField?: number; + targetFermiEnergy?: number; + }; + extraData: { + materialHash: string; + }; + isEdited: boolean; + } | { + name: "mlSettings"; + data: { + target_column_name?: string; + problem_category?: "regression" | "classification" | "clustering"; + }; + isEdited: boolean; + extraData: {}; + } | { + name: "mlTrainTestSplit"; + data: { + fraction_held_as_test_set?: number; + }; + isEdited: boolean; + extraData: {}; + } | { + name: "dynamics"; + data: { + numberOfSteps?: number; + timeStep?: number; + electronMass?: number; + temperature?: number; + }; + isEdited: boolean; + extraData: {}; + } | { + name: "collinearMagnetization"; + data: { + startingMagnetization: { + atomicSpecies: string; + value: number; + index: number; + }[]; + isTotalMagnetization: boolean; + totalMagnetization: number; + }; + extraData: { + materialHash: string; + }; + isEdited: boolean; + } | { + name: "nonCollinearMagnetization"; + data: { + isExistingChargeDensity?: boolean; + isStartingMagnetization?: boolean; + startingMagnetization?: { + index?: number; + atomicSpecies?: string; + value?: number; + }[]; + isArbitrarySpinAngle?: boolean; + isArbitrarySpinDirection?: boolean; + lforcet?: boolean; + spinAngles?: { + index?: number; + atomicSpecies?: string; + angle1?: number; + angle2?: number; + }[]; + isConstrainedMagnetization?: boolean; + constrainedMagnetization?: { + constrainType?: "none" | "total" | "atomic" | "total direction" | "atomic direction"; + lambda?: number; + }; + isFixedMagnetization?: boolean; + fixedMagnetization?: { + x?: number; + y?: number; + z?: number; + }; + }; + extraData: { + materialHash: string; + }; + isEdited: boolean; + })[]; + } | { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + isDefault?: boolean; + preProcessors: { + name: string; + }[]; + postProcessors: { + name: string; + }[]; + monitors: { + name: string; + }[]; + results: { + name: string; + }[]; + tags?: string[]; + status?: "idle" | "active" | "warning" | "error" | "finished"; + statusTrack?: { + trackedAt: number; + status: string; + repetition?: number; + }[]; + isDraft?: boolean; + type: "assignment"; + head?: boolean; + flowchartId: string; + next?: string; + enableRender?: boolean; + scope?: string; + input?: { + scope: string; + name: string; + }[]; + operand: string; + value: string | boolean | number; + } | undefined; + findUnitKeyById(id: string): string; + private findUnitWithTag; + get hasConvergence(): boolean; + get convergenceParam(): string | undefined; + get convergenceResult(): string | undefined; + convergenceSeries(scopeTrack: JobSchema["scopeTrack"]): { + x: number; + param: any; + y: any; + }[]; + updateMethodData(materials: Material[], metaProperties: MetaPropertyHolder[]): void; + addConvergence({ parameter, parameterInitial, parameterIncrement, result, resultInitial, condition, operator, tolerance, maxOccurrences, externalContext, }: ConvergenceConfig): void; +} +export {}; diff --git a/dist/js/Subworkflow.js b/dist/js/Subworkflow.js new file mode 100644 index 00000000..d6955d0f --- /dev/null +++ b/dist/js/Subworkflow.js @@ -0,0 +1,390 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const ade_1 = require("@mat3ra/ade"); +const entity_1 = require("@mat3ra/code/dist/js/entity"); +const DefaultableMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/DefaultableMixin"); +const NamedEntityMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin"); +const mode_1 = require("@mat3ra/mode"); +const standata_1 = require("@mat3ra/standata"); +const utils_1 = require("@mat3ra/utils"); +const factory_1 = require("./convergence/factory"); +const enums_1 = require("./enums"); +const SubworkflowSchemaMixin_1 = require("./generated/SubworkflowSchemaMixin"); +const units_1 = require("./units"); +class Subworkflow extends entity_1.InMemoryEntity { + constructor(config, _ModelFactory = mode_1.ModelFactory) { + super(config); + this.properties = []; + this.repetition = 0; + this.ModelFactory = _ModelFactory; + this.applicationInstance = new ade_1.Application(this.application); + this.modelInstance = this.ModelFactory.create({ + ...this.model, + application: this.application, + }); + this.setUnits(this.units.map((cfg) => units_1.UnitFactory.createInSubworkflow(cfg))); + } + static get defaultConfig() { + const defaultName = "New Subworkflow"; + return { + _id: utils_1.Utils.uuid.getUUID(), + name: defaultName, + application: ade_1.Application.defaultConfig, + model: mode_1.Model.defaultConfig, + properties: [], + units: [], + }; + } + setRepetition(repetition) { + this.repetition = repetition; + this.unitsInstances.forEach((u) => u.setRepetition(repetition)); + } + getAsUnit() { + return new units_1.SubworkflowUnit({ + type: enums_1.UnitType.subworkflow, + _id: this.id, + name: this.name, + preProcessors: [], + postProcessors: [], + monitors: [], + results: [], + flowchartId: "", + }); + } + setApplication(application) { + // TODO: adjust the logic above to take into account whether units need re-rendering after version change etc. + // reset units if application name changes + const previousApplicationName = this.application.name; + this.applicationInstance = application; + if (previousApplicationName !== application.name) { + // TODO: figure out how to set a default unit per new application instead of removing all + this.setUnits([]); + } + else { + // propagate new application version to all units + this.unitsInstances + .filter((unit) => unit.type === enums_1.UnitType.execution) + .forEach((unit) => { + unit.setApplication({ application }); + }); + } + this.application = application.toJSON(); + // set model to the default one for the application selected + this.setModel(this.ModelFactory.createFromApplication({ + application: this.application, + })); + } + setModel(model) { + this.modelInstance = model; + this.model = model.toJSON(); + } + buildExternalContext(context) { + const subworkflowContext = this.units + .filter((u) => u.type === enums_1.UnitType.assignment) + .reduce((acc, u) => { + return { + ...acc, + [u.operand]: u.value, + }; + }, {}); + return { + ...context, + application: this.applicationInstance.toJSON(), + methodData: this.model.method.data, + subworkflowContext, + }; + } + render(context) { + const ctx = this.buildExternalContext(context); + this.unitsInstances.forEach((u) => { + if (u.type === enums_1.UnitType.execution) { + u.render(ctx); + } + }); + } + /** + * TODO: reuse workflow function instead + */ + addUnit(unit, index = -1) { + const { unitsInstances } = this; + if (unitsInstances.length === 0) { + this.setUnits([unit]); + } + else { + if (index >= 0) { + unitsInstances.splice(index, 0, unit); + } + else { + unitsInstances.push(unit); + } + this.setUnits(unitsInstances); + } + } + setUnits(units) { + // TODO: remove the setNextLinks and setUnitsHead and handle the logic via flowchart designer + this.unitsInstances = (0, standata_1.setUnitLinks)(units); + this.units = units.map((x) => x.toJSON()); + this.properties = units.map((x) => x.resultNames).flat(); + } + removeUnit(flowchartId) { + const previousUnit = this.unitsInstances.find((x) => x.next === flowchartId); + if (previousUnit) { + previousUnit.unsetProp("next"); + } + this.setUnits(this.unitsInstances.filter((x) => x.flowchartId !== flowchartId)); + } + getUnit(flowchartId) { + return this.unitsInstances.find((x) => x.flowchartId === flowchartId); + } + unitIndex(flowchartId) { + return this.units.findIndex((unit) => { + return unit.flowchartId === flowchartId; + }); + } + replaceUnit(index, unit) { + this.unitsInstances[index] = unit; + this.setUnits(this.unitsInstances); + } + setIsDraft(bool) { + this.isDraft = bool; + } + get methodData() { + return this.modelInstance.Method.data; + } + /** + * @summary Calculates hash of the subworkflow. Meaningful fields are units, app and model. + * units must be sorted topologically before hashing (already sorted). + */ + calculateHash() { + const config = this.toJSON(); + const meaningfulFields = { + application: utils_1.Utils.specific.removeTimestampableKeysFromConfig(config.application), + model: this.calculateModelHash(), + units: this.unitsInstances.map((u) => u.calculateHash()).join(), + }; + return utils_1.Utils.hash.calculateHashFromObject(meaningfulFields); + } + calculateModelHash() { + const { model } = this.toJSON(); + // ignore empty data object + if (this.modelInstance.Method.omitInHashCalculation) { + delete model.method.data; + } + return utils_1.Utils.hash.calculateHashFromObject(model); + } + findUnitById(id) { + // TODO: come back and refactor after converting flowchartId to id + return this.units.find((u) => u.flowchartId === id); + } + findUnitKeyById(id) { + const index = this.units.findIndex((u) => u.flowchartId === id); + return `units.${index}`; + } + findUnitWithTag(tag) { + return this.units + .filter((unit) => unit.type === enums_1.UnitType.assignment) + .find((unit) => { var _a; return (_a = unit.tags) === null || _a === void 0 ? void 0 : _a.includes(tag); }); + } + get hasConvergence() { + return !!this.convergenceParam && !!this.convergenceResult; + } + get convergenceParam() { + var _a; + return (_a = this.findUnitWithTag(enums_1.UnitTag.hasConvergenceParam)) === null || _a === void 0 ? void 0 : _a.operand; + } + get convergenceResult() { + var _a; + return (_a = this.findUnitWithTag(enums_1.UnitTag.hasConvergenceResult)) === null || _a === void 0 ? void 0 : _a.operand; + } + convergenceSeries(scopeTrack) { + if (!this.hasConvergence || !(scopeTrack === null || scopeTrack === void 0 ? void 0 : scopeTrack.length)) { + return []; + } + let prevResult; + return scopeTrack + .map((scopeItem, i) => { + var _a, _b; + return { + x: i, + // TODO: fix types + // @ts-ignore + param: (_a = scopeItem.scope) === null || _a === void 0 ? void 0 : _a.global[this.convergenceParam], + // @ts-ignore + y: (_b = scopeItem.scope) === null || _b === void 0 ? void 0 : _b.global[this.convergenceResult], + }; + }) + .filter(({ y }) => { + const changed = prevResult !== y; + prevResult = y; + return changed; + }) + .map((item, i) => { + return { + x: i + 1, + param: item.param, + y: item.y, + }; + }); + } + updateMethodData(materials, metaProperties) { + const method = this.modelInstance.Method; + const { model } = this; + const uniqueElements = [...new Set(materials.map((m) => m.uniqueElements).flat())]; + const appName = this.application.name; + const methodDataItems = metaProperties + .filter((metaProperty) => { + return ( + // @ts-ignore TODO: fix types + uniqueElements.includes(metaProperty.data.element) && + metaProperty.data.apps.includes(appName)); + }) + .map((metaProperty) => metaProperty.property); + if (!(method instanceof mode_1.PseudopotentialMethod) || !methodDataItems.length) { + return; + } + const filters = { + appName, + exchangeCorrelation: { + approximation: model.subtype, + functional: "functional" in model ? model.functional : undefined, + }, + }; + // We cycle materials in reverse order below b/c of render(), + // since the default state index is zero, the last material thus corresponds to index 0. + // Without reversing, context providers in workflow consider material as changed when any update to the workflow + // is triggered. + // TODO: figure out how to simplify or remove the need for the above + (materials || []) + .concat() + .reverse() + .forEach((material) => { + // updates methodData & overwrites method in subworkflow.model + method.updateMethodDataByApplicationAndMaterials(methodDataItems, { + elements: material.uniqueElements, + ...filters, + }); + this.modelInstance.setMethod(method); + }); + // TODO: Try if/else instead of running both + if (materials.length > 1) { + method.updateMethodDataByApplicationAndMaterials(methodDataItems, { + elements: uniqueElements, + ...filters, + }); + this.modelInstance.setMethod(method); + } + } + addConvergence({ parameter, parameterInitial, parameterIncrement, result, resultInitial, condition, operator, tolerance, maxOccurrences, externalContext, }) { + // Find unit to converge: should contain passed result in its results list + // TODO: make user to select unit for convergence explicitly + const unitForConvergence = this.unitsInstances + .filter((x) => x.type === enums_1.UnitType.execution) + .find((x) => { + return x.resultNames.find((name) => name === result); + }); + if (!unitForConvergence) { + throw new Error(`Subworkflow does not contain unit with '${result}' as extracted property.`); + } + // initialize parameter + const convergenceParameter = (0, factory_1.createConvergenceParameter)({ + name: parameter, + initialValue: parameterInitial, + increment: parameterIncrement, + }); + const context = this.buildExternalContext(externalContext); + unitForConvergence.addConvergenceContext(convergenceParameter, context); + const prevResult = "prev_result"; + const iteration = "iteration"; + // Assignment with result's initial value + const prevResultInit = new units_1.AssignmentUnit({ + name: "init result", + head: true, + operand: prevResult, + value: resultInitial, + }); + // Assignment with initial value of convergence parameter + const paramInit = new units_1.AssignmentUnit({ + name: "init parameter", + operand: convergenceParameter.name, + value: convergenceParameter.initialValue, + tags: [enums_1.UnitTag.hasConvergenceParam], + }); + // Assignment with initial value of iteration counter + const iterInit = new units_1.AssignmentUnit({ + name: "init counter", + operand: iteration, + value: 1, + }); + // Assignment for storing iteration result: extracts 'result' from convergence unit scope + const storePrevResult = new units_1.AssignmentUnit({ + name: "store result", + input: [ + { + scope: unitForConvergence.flowchartId, + name: result, + }, + ], + operand: prevResult, + value: result, + }); + // Assignment for convergence param increase + const nextStep = new units_1.AssignmentUnit({ + name: "update parameter", + input: convergenceParameter.useVariablesFromUnitContext(unitForConvergence.flowchartId), + operand: convergenceParameter.name, + value: convergenceParameter.increment, + next: unitForConvergence.flowchartId, + }); + // Final step of convergence + const exit = new units_1.AssignmentUnit({ + name: "exit", + input: [], + operand: convergenceParameter.name, + value: convergenceParameter.finalValue, + }); + // Final step of convergence + const storeResult = new units_1.AssignmentUnit({ + name: "update result", + input: [ + { + scope: unitForConvergence.flowchartId, + name: result, + }, + ], + operand: result, + value: result, + tags: [enums_1.UnitTag.hasConvergenceResult], + }); + // Assign next iteration value + const nextIter = new units_1.AssignmentUnit({ + name: "update counter", + input: [], + operand: iteration, + value: `${iteration} + 1`, + }); + // Convergence condition unit + const conditionUnit = new units_1.ConditionUnit({ + name: "check convergence", + statement: `${condition} ${operator} ${tolerance}`, + then: exit.flowchartId, + else: storePrevResult.flowchartId, + maxOccurrences, + next: storePrevResult.flowchartId, + }); + this.addUnit(paramInit, 0); + this.addUnit(prevResultInit, 1); + this.addUnit(iterInit, 2); + this.addUnit(storeResult); + this.addUnit(conditionUnit); + this.addUnit(storePrevResult); + this.addUnit(nextIter); + this.addUnit(nextStep); + this.addUnit(exit); + // `addUnit` adjusts the `next` field, hence the below. + nextStep.next = unitForConvergence.flowchartId; + } +} +exports.default = Subworkflow; +(0, NamedEntityMixin_1.namedEntityMixin)(Subworkflow.prototype); +(0, DefaultableMixin_1.defaultableEntityMixin)(Subworkflow); +(0, SubworkflowSchemaMixin_1.subworkflowSchemaMixin)(Subworkflow.prototype); diff --git a/dist/js/Workflow.d.ts b/dist/js/Workflow.d.ts new file mode 100644 index 00000000..290ab8b1 --- /dev/null +++ b/dist/js/Workflow.d.ts @@ -0,0 +1,70 @@ +import { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; +import { type DefaultableInMemoryEntityConstructor } from "@mat3ra/code/dist/js/entity/mixins/DefaultableMixin"; +import { type NamedInMemoryEntityConstructor } from "@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin"; +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; +import type { ApplicationSchema, WorkflowSchema } from "@mat3ra/esse/dist/js/types"; +import type { Material } from "@mat3ra/made"; +import type { MetaPropertyHolder } from "@mat3ra/prode"; +import type { MaterialExternalContext } from "./context/mixins/MaterialContextMixin"; +import type { MaterialsExternalContext } from "./context/mixins/MaterialsContextMixin"; +import type { MaterialsSetExternalContext } from "./context/mixins/MaterialsSetContextMixin"; +import type { JobExternalContext } from "./context/providers/by_application/espresso/QEPWXInputDataManager"; +import { UnitType } from "./enums"; +import { type WorkflowSchemaMixin } from "./generated/WorkflowSchemaMixin"; +import Subworkflow from "./Subworkflow"; +import { MapUnit } from "./units"; +import { type AnyWorkflowUnit } from "./units/factory"; +type Base = typeof InMemoryEntity & DefaultableInMemoryEntityConstructor & NamedInMemoryEntityConstructor & Constructor; +/** Context passed to Workflow.render() before workflow reference is injected for subworkflows. */ +export type WorkflowRenderContext = MaterialExternalContext & MaterialsExternalContext & MaterialsSetExternalContext & JobExternalContext; +declare const Workflow_base: Base; +export declare class Workflow extends Workflow_base implements WorkflowSchema { + static readonly defaultConfig: WorkflowSchema; + _json: WorkflowSchema & AnyObject; + static get jsonSchema(): import("json-schema").JSONSchema7 | undefined; + subworkflowInstances: Subworkflow[]; + private unitInstances; + private workflowInstances; + repetition: number; + totalRepetitions: number; + setTotalRepetitions(totalRepetition: number): void; + setRepetition(repetition: number): void; + static fromSubworkflow(subworkflow: Subworkflow): Workflow; + constructor(config: WorkflowSchema & { + applicationName?: string; + }); + get workflows(): WorkflowSchema[]; + set workflows(value: WorkflowSchema[]); + addSubworkflow(subworkflow: Subworkflow, head?: boolean, index?: number): void; + updateMethodData(materials: Material[], metaProperties: MetaPropertyHolder[]): void; + removeSubworkflow(id: string): void; + setUnits(arr: AnyWorkflowUnit[]): void; + render(context: WorkflowRenderContext): void; + get usedApplications(): ApplicationSchema[]; + get usedApplicationNames(): string[]; + get usedApplicationVersions(): string[]; + get usedApplicationNamesWithVersions(): string[]; + getUsedModels(): ("dft" | "ml" | "unknown")[]; + getHumanReadableUsedModels(): string[]; + toJSON(): WorkflowSchema & AnyObject; + getHumanReadableProperties(): string[]; + getProperties(): string[]; + getSystemName(): string; + getDefaultDescription(): string; + private addUnit; + private removeUnit; + addUnitType(type: UnitType, head?: boolean, index?: number): void; + addMapUnit(mapUnit: MapUnit, mapWorkflow: Workflow): void; + get allSubworkflows(): Subworkflow[]; + /** + * @summary Calculates hash of the workflow. Meaningful fields are units and subworkflows. + * units and subworkflows must be sorted topologically before hashing (already sorted). + */ + calculateHash(): string; + get hasRelaxation(): boolean; + toggleRelaxation(): void; + private getStandataRelaxationSubworkflow; + private getRelaxationSubworkflow; +} +export {}; diff --git a/dist/js/Workflow.js b/dist/js/Workflow.js new file mode 100644 index 00000000..905346a2 --- /dev/null +++ b/dist/js/Workflow.js @@ -0,0 +1,256 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Workflow = void 0; +const entity_1 = require("@mat3ra/code/dist/js/entity"); +const DefaultableMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/DefaultableMixin"); +const NamedEntityMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin"); +const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); +const standata_1 = require("@mat3ra/standata"); +const utils_1 = require("@mat3ra/utils"); +const enums_1 = require("./enums"); +const WorkflowSchemaMixin_1 = require("./generated/WorkflowSchemaMixin"); +const Subworkflow_1 = __importDefault(require("./Subworkflow")); +const units_1 = require("./units"); +const factory_1 = require("./units/factory"); +const workflow_1 = require("./utils/workflow"); +const default_1 = __importDefault(require("./workflows/default")); +class Workflow extends entity_1.InMemoryEntity { + static get jsonSchema() { + return JSONSchemasInterface_1.default.getSchemaById("workflow"); + } + setTotalRepetitions(totalRepetition) { + this.totalRepetitions = totalRepetition; + } + setRepetition(repetition) { + this.repetition = repetition; + this.unitInstances.forEach((u) => u.setRepetition(repetition)); + this.subworkflowInstances.forEach((sw) => sw.setRepetition(repetition)); + this.workflowInstances.forEach((wf) => wf.setRepetition(repetition)); + } + static fromSubworkflow(subworkflow) { + const config = { + name: subworkflow.name, + subworkflows: [subworkflow.toJSON()], + units: [subworkflow.getAsUnit().toJSON()], + properties: subworkflow.properties, + applicationName: subworkflow.application.name, + workflows: [], + }; + return new this(config); + } + constructor(config) { + var _a; + super({ + ...config, + _id: config._id || utils_1.Utils.uuid.getUUID(), + }); + this.repetition = 0; + this.totalRepetitions = 1; + this.subworkflowInstances = this.subworkflows.map((x) => new Subworkflow_1.default(x)); + this.workflowInstances = ((_a = this.workflows) === null || _a === void 0 ? void 0 : _a.map((x) => new Workflow(x))) || []; + this.setUnits(this.units.map((unit) => factory_1.UnitFactory.createInWorkflow(unit))); + } + get workflows() { + return this.requiredProp("workflows"); + } + set workflows(value) { + this.setProp("workflows", value); + } + addSubworkflow(subworkflow, head = false, index = -1) { + const subworkflowUnit = subworkflow.getAsUnit(); + if (head) { + this.subworkflowInstances.unshift(subworkflow); + this.addUnit(subworkflowUnit, head, index); + } + else { + this.subworkflowInstances.push(subworkflow); + this.addUnit(subworkflowUnit, head, index); + } + } + updateMethodData(materials, metaProperties) { + this.subworkflowInstances.forEach((sw) => { + sw.updateMethodData(materials, metaProperties); + }); + } + removeSubworkflow(id) { + const subworkflowUnit = this.unitInstances.find((u) => u.id === id); + if (subworkflowUnit) { + this.removeUnit(subworkflowUnit.flowchartId); + } + } + setUnits(arr) { + this.unitInstances = (0, standata_1.setUnitLinks)(arr); + } + render(context) { + this.subworkflowInstances.forEach((sw) => { + sw.render({ + ...context, + workflow: this, + }); + }); + } + get usedApplications() { + return (0, workflow_1.getUsedApplications)(this); + } + // return application names + get usedApplicationNames() { + return this.usedApplications.map((a) => a.name); + } + get usedApplicationVersions() { + return this.usedApplications.map((a) => a.version); + } + get usedApplicationNamesWithVersions() { + return this.usedApplications.map((a) => `${a.name} ${a.version}`); + } + getUsedModels() { + return (0, workflow_1.getUsedModels)(this); + } + getHumanReadableUsedModels() { + return (0, workflow_1.getHumanReadableUsedModels)(this); + } + toJSON() { + return { + ...super.toJSON(), + name: this.name, + properties: (0, workflow_1.getProperties)(this), + units: this.unitInstances.map((x) => x.toJSON()), + subworkflows: this.subworkflowInstances.map((x) => x.toJSON()), + workflows: this.workflowInstances.map((x) => x.toJSON()), + }; + } + getHumanReadableProperties() { + return (0, workflow_1.getHumanReadableProperties)(this); + } + getProperties() { + return (0, workflow_1.getProperties)(this); + } + getSystemName() { + return (0, workflow_1.getSystemName)(this); + } + getDefaultDescription() { + return (0, workflow_1.getDefaultDescription)(this); + } + addUnit(unit, head = false, index = -1) { + const [...unitInstances] = this.unitInstances; + if (unitInstances.length === 0) { + this.setUnits([unit]); + } + else { + if (head) { + unitInstances.unshift(unit); + } + else if (index >= 0) { + unitInstances.splice(index, 0, unit); + } + else { + unitInstances.push(unit); + } + this.setUnits(unitInstances); + } + } + removeUnit(flowchartId) { + if (this.units.length < 2) { + return; + } + const unit = this.unitInstances.find((x) => x.flowchartId === flowchartId); + if (!unit) { + return; + } + const previousUnit = this.unitInstances.find((x) => x.next === unit.flowchartId); + if (previousUnit) { + delete previousUnit.next; + } + this.subworkflowInstances = this.subworkflowInstances.filter((x) => x.id !== unit.id); + this.setUnits(this.unitInstances.filter((x) => x.flowchartId !== flowchartId)); + } + /* + * @param type {String|Object} Unit type, map or subworkflow + * @param head {Boolean} + * @param index {Number} Index at which the unit will be added. -1 by default (ignored). + */ + addUnitType(type, head = false, index = -1) { + switch (type) { + case enums_1.UnitType.map: { + const mapWorkflowConfig = { + ...default_1.default, + _id: utils_1.Utils.uuid.getUUID(), + }; + const mapUnit = new units_1.MapUnit({ + workflowId: mapWorkflowConfig._id, + }); + this.workflows = [...(this.workflows || []), mapWorkflowConfig]; + this.workflowInstances = this.workflows.map((x) => new Workflow(x)); + this.addUnit(mapUnit, head, index); + break; + } + case enums_1.UnitType.subworkflow: + this.addSubworkflow(Subworkflow_1.default.createDefault(), head, index); + break; + default: + console.log(`unit_type=${type} unrecognized, skipping.`); + } + } + addMapUnit(mapUnit, mapWorkflow) { + const mapWorkflowConfig = { + _id: utils_1.Utils.uuid.getUUID(), + ...mapWorkflow.toJSON(), + }; + mapUnit.setWorkflowId(mapWorkflowConfig._id); + this.addUnit(mapUnit); + this.workflows = [...(this.workflows || []), mapWorkflowConfig]; + this.workflowInstances = this.workflows.map((x) => new Workflow(x)); + } + get allSubworkflows() { + const subworkflowsList = []; + this.subworkflowInstances.forEach((sw) => subworkflowsList.push(sw)); + this.workflowInstances.forEach((workflow) => { + return Array.prototype.push.apply(subworkflowsList, workflow.allSubworkflows); + }); + return subworkflowsList; + } + /** + * @summary Calculates hash of the workflow. Meaningful fields are units and subworkflows. + * units and subworkflows must be sorted topologically before hashing (already sorted). + */ + calculateHash() { + const meaningfulFields = { + units: this.unitInstances.map((u) => u.calculateHash()).join(), + subworkflows: this.subworkflowInstances.map((sw) => sw.calculateHash()).join(), + workflows: this.workflowInstances.map((w) => w.calculateHash()).join(), + }; + return utils_1.Utils.hash.calculateHashFromObject(meaningfulFields); + } + get hasRelaxation() { + return Boolean(this.getRelaxationSubworkflow()); + } + toggleRelaxation() { + const relaxSubworkflow = this.getRelaxationSubworkflow(); + if (relaxSubworkflow === null || relaxSubworkflow === void 0 ? void 0 : relaxSubworkflow._id) { + this.removeSubworkflow(relaxSubworkflow._id); + } + else { + const vcRelax = this.getStandataRelaxationSubworkflow(); + if (vcRelax) { + this.addSubworkflow(new Subworkflow_1.default(vcRelax), true); + } + } + } + getStandataRelaxationSubworkflow() { + // TODO: fix standata type + return new standata_1.SubworkflowStandata().getRelaxationSubworkflowByApplication(this.subworkflowInstances[0].application.name); + } + getRelaxationSubworkflow() { + const standataSubworkflow = this.getStandataRelaxationSubworkflow(); + return this.subworkflows.find((sw) => { + return standataSubworkflow && standataSubworkflow.systemName === sw.systemName; + }); + } +} +exports.Workflow = Workflow; +Workflow.defaultConfig = default_1.default; +(0, NamedEntityMixin_1.namedEntityMixin)(Workflow.prototype); +(0, DefaultableMixin_1.defaultableEntityMixin)(Workflow); +(0, WorkflowSchemaMixin_1.workflowSchemaMixin)(Workflow.prototype); diff --git a/dist/js/context/mixins/ApplicationContextMixin.d.ts b/dist/js/context/mixins/ApplicationContextMixin.d.ts index cb6fba53..4a05f834 100644 --- a/dist/js/context/mixins/ApplicationContextMixin.d.ts +++ b/dist/js/context/mixins/ApplicationContextMixin.d.ts @@ -1,10 +1,10 @@ -import type { Application } from "@mat3ra/ade"; +import type { ApplicationSchema } from "@mat3ra/esse/dist/js/types"; import type ContextProvider from "../providers/base/ContextProvider"; export type ApplicationContextMixin = { - readonly application: Application; + application: ApplicationSchema; initApplicationContextMixin(externalContext: ApplicationExternalContext): void; }; export type ApplicationExternalContext = { - application?: Application; + application: ApplicationSchema; }; -export declare function applicationContextMixin(item: ContextProvider): void; +export default function applicationContextMixin(item: ContextProvider): void; diff --git a/dist/js/context/mixins/ApplicationContextMixin.js b/dist/js/context/mixins/ApplicationContextMixin.js index b93cbee6..2da5900b 100644 --- a/dist/js/context/mixins/ApplicationContextMixin.js +++ b/dist/js/context/mixins/ApplicationContextMixin.js @@ -1,14 +1,11 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.applicationContextMixin = applicationContextMixin; -const settings_1 = require("../providers/settings"); +exports.default = applicationContextMixin; function applicationContextMixin(item) { // @ts-expect-error const properties = { initApplicationContextMixin(externalContext) { - var _a; - this.application = - (_a = externalContext.application) !== null && _a !== void 0 ? _a : settings_1.globalSettings.Application.createDefault(); + this.application = externalContext.application; }, }; Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); diff --git a/dist/js/context/mixins/ContextAndRenderFieldsMixin.d.ts b/dist/js/context/mixins/ContextAndRenderFieldsMixin.d.ts deleted file mode 100644 index 5edb0465..00000000 --- a/dist/js/context/mixins/ContextAndRenderFieldsMixin.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; -import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; -export type Context = AnyObject; -export type ContextMixin = { - context: Context; - renderingContext: Context; - getRenderingContext(): Context; - updateRenderingContext(ctx: Context): void; - getPersistentContext(): Context; - updatePersistentContext(ctx: Context): void; - getCombinedContext(): Context; -}; -type AbstractBase = { - render(ctx: Context): void; -}; -export declare function contextMixin(item: T): asserts item is T & ContextMixin; -export {}; diff --git a/dist/js/context/mixins/ContextAndRenderFieldsMixin.js b/dist/js/context/mixins/ContextAndRenderFieldsMixin.js deleted file mode 100644 index 7f0b0a7f..00000000 --- a/dist/js/context/mixins/ContextAndRenderFieldsMixin.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.contextMixin = contextMixin; -function contextMixin(item) { - // @ts-expect-error - const properties = { - get context() { - return this.requiredProp("context"); - }, - set context(ctx) { - this.setProp("context", ctx); - }, - renderingContext: {}, - updateRenderingContext(ctx) { - this.context = { ...this.renderingContext, ...ctx }; - }, - getRenderingContext() { - return this.renderingContext; - }, - getPersistentContext() { - return this.context; - }, - updatePersistentContext(ctx) { - this.context = { ...ctx }; - }, - getCombinedContext() { - return { - ...this.getPersistentContext(), - ...this.getRenderingContext(), - }; - }, - }; - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/dist/js/context/mixins/ImportantSettingsProviderMixin.d.ts b/dist/js/context/mixins/ImportantSettingsProviderMixin.d.ts deleted file mode 100644 index 6d9b33ac..00000000 --- a/dist/js/context/mixins/ImportantSettingsProviderMixin.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -export interface ContextProvider { - domain?: string; -} -export type ImportantSettingsProvider = { - important: object; - setImportant(key: string, value: unknown): void; - importantSettingsProviders: ContextProvider[]; - isImportantEdited: boolean | undefined; -}; -type AbstractBase = { - contextProviders: ContextProvider[]; -}; -export type ImportantSettingsProviderInMemoryEntityConstructor = Constructor; -export declare function importantSettingsProviderMixin(item: T): asserts item is T & ImportantSettingsProvider; -export {}; diff --git a/dist/js/context/mixins/ImportantSettingsProviderMixin.js b/dist/js/context/mixins/ImportantSettingsProviderMixin.js deleted file mode 100644 index 6be5ff2a..00000000 --- a/dist/js/context/mixins/ImportantSettingsProviderMixin.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.importantSettingsProviderMixin = importantSettingsProviderMixin; -const clone_1 = require("@mat3ra/code/dist/js/utils/clone"); -function importantSettingsProviderMixin(item) { - // @ts-expect-error - const properties = { - get important() { - return (0, clone_1.deepClone)(this._json.important || {}); - }, - setImportant(key, value) { - this.setProp("important", { [key]: value }); - }, - get importantSettingsProviders() { - return this.contextProviders.filter((p) => p.domain === "important"); - }, - get isImportantEdited() { - return this.prop("important.isEdited"); - }, - set isImportantEdited(bool) { - this.setProp("important", Object.assign(this.important, { isEdited: bool })); - }, - }; - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/dist/js/context/mixins/JobContextMixin.d.ts b/dist/js/context/mixins/JobContextMixin.d.ts deleted file mode 100644 index dd504945..00000000 --- a/dist/js/context/mixins/JobContextMixin.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { JobSchema } from "@mat3ra/esse/dist/js/types"; -import type ContextProvider from "../providers/base/ContextProvider"; -export type JobContextMixin = { - isEdited: boolean; - job: JobSchema; - initJobContextMixin(externalContext: JobExternalContext): void; -}; -export type JobExternalContext = { - job: JobSchema; -}; -export default function jobContextMixin(item: ContextProvider): void; diff --git a/dist/js/context/mixins/JobContextMixin.js b/dist/js/context/mixins/JobContextMixin.js deleted file mode 100644 index c19fa9a9..00000000 --- a/dist/js/context/mixins/JobContextMixin.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = jobContextMixin; -function jobContextMixin(item) { - // @ts-expect-error - const properties = { - isEdited: false, - initJobContextMixin(externalContext) { - this.job = externalContext.job; - this.isEdited = false; // we always get the `defaultData` (recalculated from scratch, not persistent) - }, - }; - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/dist/js/context/mixins/MaterialContextMixin.d.ts b/dist/js/context/mixins/MaterialContextMixin.d.ts index d22f2b79..373768f6 100644 --- a/dist/js/context/mixins/MaterialContextMixin.d.ts +++ b/dist/js/context/mixins/MaterialContextMixin.d.ts @@ -6,7 +6,7 @@ export type MaterialContextMixin = { readonly isMaterialCreatedDefault: boolean; readonly isMaterialUpdated: boolean; material: OrderedMaterial; - extraData?: { + extraData: { materialHash: string; }; initMaterialContextMixin(externalContext: MaterialExternalContext): void; diff --git a/dist/js/context/mixins/MaterialsSetContextMixin.d.ts b/dist/js/context/mixins/MaterialsSetContextMixin.d.ts index 4845cba3..4913657a 100644 --- a/dist/js/context/mixins/MaterialsSetContextMixin.d.ts +++ b/dist/js/context/mixins/MaterialsSetContextMixin.d.ts @@ -1,14 +1,15 @@ +import type ContextProvider from "../providers/base/ContextProvider"; import type { OrderedMaterial } from "./MaterialContextMixin"; type MaterialsSet = { _id: string; }; +export type MaterialsSetExternalContext = { + materialsSet?: MaterialsSet; +}; export type MaterialsSetContextMixin = { - materialsSet: MaterialsSet; - initMaterialsSetContextMixin(externalContext: MaterialsSetContextProvider): void; + materialsSet?: MaterialsSet; + initMaterialsSetContextMixin(externalContext: MaterialsSetExternalContext): void; sortMaterialsByIndexInSet(materials?: OrderedMaterial[]): OrderedMaterial[]; }; -type MaterialsSetContextProvider = { - materialsSet: MaterialsSet; -}; -export default function materialsSetContextMixin(item: MaterialsSetContextProvider): void; +export default function materialsSetContextMixin(item: ContextProvider): void; export {}; diff --git a/dist/js/context/mixins/MaterialsSetContextMixin.js b/dist/js/context/mixins/MaterialsSetContextMixin.js index c9ce29f5..a88c53a0 100644 --- a/dist/js/context/mixins/MaterialsSetContextMixin.js +++ b/dist/js/context/mixins/MaterialsSetContextMixin.js @@ -9,9 +9,13 @@ function materialsSetContextMixin(item) { this.materialsSet = externalContext.materialsSet; }, sortMaterialsByIndexInSet(materials = []) { + const { materialsSet } = this; + if (!materialsSet) { + return materials; + } // DO NOT SORT IN PLACE AS IT CHANGES THE ORDER IN `this.materials` AND HAS SIDE EFFECTS (MaterialViewer). - return materials.concat().sort((a, b) => { - return (0, utils_1.compareEntitiesInOrderedSetForSorting)(a, b, this.materialsSet._id, false); + return [...materials].sort((a, b) => { + return (0, utils_1.compareEntitiesInOrderedSetForSorting)(a, b, materialsSet._id, false); }); }, }; diff --git a/dist/js/context/mixins/MethodDataContextMixin.d.ts b/dist/js/context/mixins/MethodDataContextMixin.d.ts deleted file mode 100644 index 046bf8e7..00000000 --- a/dist/js/context/mixins/MethodDataContextMixin.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { BaseMethod } from "@mat3ra/esse/dist/js/types"; -import type { AtomicElementValue } from "@mat3ra/made/dist/js/basis/elements"; -import type ContextProvider from "../providers/base/ContextProvider"; -type MethodData = BaseMethod["data"] & { - pseudo?: { - element: AtomicElementValue; - filename?: string; - path?: string; - }[]; -}; -export type MethodDataContextMixin = { - methodData: MethodData; - isEdited: boolean; - initMethodDataContextMixin(externalContext: MethodDataExternalContext): void; -}; -export type MethodDataExternalContext = { - methodData?: MethodData; - isEdited?: boolean; -}; -export default function methodDataContextMixin(item: ContextProvider): void; -export {}; diff --git a/dist/js/context/mixins/MethodDataContextMixin.js b/dist/js/context/mixins/MethodDataContextMixin.js deleted file mode 100644 index 7ea27498..00000000 --- a/dist/js/context/mixins/MethodDataContextMixin.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = methodDataContextMixin; -function methodDataContextMixin(item) { - // @ts-expect-error - const properties = { - methodData: {}, - isEdited: false, - initMethodDataContextMixin(externalContext) { - this.methodData = externalContext.methodData || {}; - this.isEdited = Boolean(externalContext === null || externalContext === void 0 ? void 0 : externalContext.isEdited); - }, - }; - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/dist/js/context/mixins/WorkflowContextMixin.d.ts b/dist/js/context/mixins/WorkflowContextMixin.d.ts deleted file mode 100644 index 196a4f24..00000000 --- a/dist/js/context/mixins/WorkflowContextMixin.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { WorkflowSchema } from "@mat3ra/esse/dist/js/types"; -import type ContextProvider from "../providers/base/ContextProvider"; -type Workflow = WorkflowSchema & { - hasRelaxation?: boolean; -}; -export type WorkflowContextMixin = { - isEdited: boolean; - workflow: Workflow; - initWorkflowContextMixin(externalContext: WorkflowExternalContext): void; -}; -export type WorkflowExternalContext = { - workflow: Workflow; -}; -export default function workflowContextMixin(item: ContextProvider): void; -export {}; diff --git a/dist/js/context/mixins/WorkflowContextMixin.js b/dist/js/context/mixins/WorkflowContextMixin.js deleted file mode 100644 index d1fa0f25..00000000 --- a/dist/js/context/mixins/WorkflowContextMixin.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = workflowContextMixin; -function workflowContextMixin(item) { - // @ts-expect-error - const properties = { - isEdited: false, - initWorkflowContextMixin(externalContext) { - this.workflow = externalContext.workflow; - this.isEdited = false; - }, - }; - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/dist/js/context/providers.d.ts b/dist/js/context/providers.d.ts deleted file mode 100644 index 82ea9df5..00000000 --- a/dist/js/context/providers.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import BoundaryConditionsFormDataProvider from "./providers/BoundaryConditionsFormDataProvider"; -import QENEBContextProvider from "./providers/by_application/espresso/QENEBContextProvider"; -import QEPWXContextProvider from "./providers/by_application/espresso/QEPWXContextProvider"; -import NWChemTotalEnergyContextProvider from "./providers/by_application/nwchem/NWChemTotalEnergyContextProvider"; -import VASPContextProvider from "./providers/by_application/vasp/VASPContextProvider"; -import VASPNEBContextProvider from "./providers/by_application/vasp/VASPNEBContextProvider"; -import CollinearMagnetizationContextProvider from "./providers/CollinearMagnetizationContextProvider"; -import HubbardContextProviderLegacy from "./providers/Hubbard/HubbardContextProviderLegacy"; -import HubbardJContextProvider from "./providers/Hubbard/HubbardJContextProvider"; -import HubbardUContextProvider from "./providers/Hubbard/HubbardUContextProvider"; -import HubbardVContextProvider from "./providers/Hubbard/HubbardVContextProvider"; -import IonDynamicsContextProvider from "./providers/IonDynamicsContextProvider"; -import MLSettingsContextProvider from "./providers/MLSettingsContextProvider"; -import MLTrainTestSplitContextProvider from "./providers/MLTrainTestSplitContextProvider"; -import NEBFormDataProvider from "./providers/NEBFormDataProvider"; -import NonCollinearMagnetizationContextProvider from "./providers/NonCollinearMagnetizationContextProvider"; -import PlanewaveCutoffsContextProvider from "./providers/PlanewaveCutoffsContextProvider"; -import IGridFormDataManager from "./providers/PointsGrid/IGridFormDataManager"; -import KGridFormDataManager from "./providers/PointsGrid/KGridFormDataManager"; -import QGridFormDataManager from "./providers/PointsGrid/QGridFormDataManager"; -import ExplicitKPath2PIBAFormDataManager from "./providers/PointsPath/ExplicitKPath2PIBAFormDataManager"; -import ExplicitKPathFormDataManager from "./providers/PointsPath/ExplicitKPathFormDataManager"; -import IPathFormDataManager from "./providers/PointsPath/IPathFormDataManager"; -import KPathFormDataManager from "./providers/PointsPath/KPathFormDataManager"; -import QPathFormDataManager from "./providers/PointsPath/QPathFormDataManager"; -/** ******************************** - * Method-based context providers * - ********************************* */ -export declare const newWodeProviders: { - PlanewaveCutoffDataManager: typeof PlanewaveCutoffsContextProvider; - KGridFormDataManager: typeof KGridFormDataManager; - QGridFormDataManager: typeof QGridFormDataManager; - IGridFormDataManager: typeof IGridFormDataManager; - QPathFormDataManager: typeof QPathFormDataManager; - IPathFormDataManager: typeof IPathFormDataManager; - KPathFormDataManager: typeof KPathFormDataManager; - ExplicitKPathFormDataManager: typeof ExplicitKPathFormDataManager; - ExplicitKPath2PIBAFormDataManager: typeof ExplicitKPath2PIBAFormDataManager; - HubbardJContextManager: typeof HubbardJContextProvider; - HubbardUContextManager: typeof HubbardUContextProvider; - HubbardVContextManager: typeof HubbardVContextProvider; - HubbardContextManagerLegacy: typeof HubbardContextProviderLegacy; - NEBFormDataManager: typeof NEBFormDataProvider; - BoundaryConditionsFormDataManager: typeof BoundaryConditionsFormDataProvider; - MLSettingsDataManager: typeof MLSettingsContextProvider; - MLTrainTestSplitDataManager: typeof MLTrainTestSplitContextProvider; - IonDynamicsContextProvider: typeof IonDynamicsContextProvider; - CollinearMagnetizationDataManager: typeof CollinearMagnetizationContextProvider; - NonCollinearMagnetizationDataManager: typeof NonCollinearMagnetizationContextProvider; - QEPWXInputDataManager: typeof QEPWXContextProvider; - QENEBInputDataManager: typeof QENEBContextProvider; - VASPInputDataManager: typeof VASPContextProvider; - VASPNEBInputDataManager: typeof VASPNEBContextProvider; - NWChemInputDataManager: typeof NWChemTotalEnergyContextProvider; -}; diff --git a/dist/js/context/providers.js b/dist/js/context/providers.js deleted file mode 100644 index 21b20dea..00000000 --- a/dist/js/context/providers.js +++ /dev/null @@ -1,179 +0,0 @@ -"use strict"; -// import type { ContextProviderNameEnum as ProviderName } from "@mat3ra/esse/dist/js/types"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.newWodeProviders = void 0; -// import type ContextProvider from "./providers/base/ContextProvider"; -// import type { ContextItem } from "./providers/base/ContextProvider"; -const BoundaryConditionsFormDataProvider_1 = __importDefault(require("./providers/BoundaryConditionsFormDataProvider")); -const QENEBContextProvider_1 = __importDefault(require("./providers/by_application/espresso/QENEBContextProvider")); -const QEPWXContextProvider_1 = __importDefault(require("./providers/by_application/espresso/QEPWXContextProvider")); -const NWChemTotalEnergyContextProvider_1 = __importDefault(require("./providers/by_application/nwchem/NWChemTotalEnergyContextProvider")); -const VASPContextProvider_1 = __importDefault(require("./providers/by_application/vasp/VASPContextProvider")); -const VASPNEBContextProvider_1 = __importDefault(require("./providers/by_application/vasp/VASPNEBContextProvider")); -const CollinearMagnetizationContextProvider_1 = __importDefault(require("./providers/CollinearMagnetizationContextProvider")); -const HubbardContextProviderLegacy_1 = __importDefault(require("./providers/Hubbard/HubbardContextProviderLegacy")); -const HubbardJContextProvider_1 = __importDefault(require("./providers/Hubbard/HubbardJContextProvider")); -const HubbardUContextProvider_1 = __importDefault(require("./providers/Hubbard/HubbardUContextProvider")); -const HubbardVContextProvider_1 = __importDefault(require("./providers/Hubbard/HubbardVContextProvider")); -const IonDynamicsContextProvider_1 = __importDefault(require("./providers/IonDynamicsContextProvider")); -const MLSettingsContextProvider_1 = __importDefault(require("./providers/MLSettingsContextProvider")); -const MLTrainTestSplitContextProvider_1 = __importDefault(require("./providers/MLTrainTestSplitContextProvider")); -const NEBFormDataProvider_1 = __importDefault(require("./providers/NEBFormDataProvider")); -const NonCollinearMagnetizationContextProvider_1 = __importDefault(require("./providers/NonCollinearMagnetizationContextProvider")); -const PlanewaveCutoffsContextProvider_1 = __importDefault(require("./providers/PlanewaveCutoffsContextProvider")); -const IGridFormDataManager_1 = __importDefault(require("./providers/PointsGrid/IGridFormDataManager")); -const KGridFormDataManager_1 = __importDefault(require("./providers/PointsGrid/KGridFormDataManager")); -const QGridFormDataManager_1 = __importDefault(require("./providers/PointsGrid/QGridFormDataManager")); -const ExplicitKPath2PIBAFormDataManager_1 = __importDefault(require("./providers/PointsPath/ExplicitKPath2PIBAFormDataManager")); -const ExplicitKPathFormDataManager_1 = __importDefault(require("./providers/PointsPath/ExplicitKPathFormDataManager")); -const IPathFormDataManager_1 = __importDefault(require("./providers/PointsPath/IPathFormDataManager")); -const KPathFormDataManager_1 = __importDefault(require("./providers/PointsPath/KPathFormDataManager")); -const QPathFormDataManager_1 = __importDefault(require("./providers/PointsPath/QPathFormDataManager")); -// const CONTEXT_DOMAINS = { -// important: "important", // used to generate `ImportantSettings` form -// }; -// export type ProvidersConfig = Record< -// ProviderName, -// new ( -// config: ContextItem, -// domain?: string, -// entityName?: "unit" | "subworkflow", -// ) => ContextProvider -// >; -/** ******************************** - * Method-based context providers * - ********************************* */ -// export const wodeProviders = { -// // NOTE: subworkflow-level data manager. Will override the unit-level data with the same name via subworkflow context. -// PlanewaveCutoffDataManager: { -// providerCls: PlanewaveCutoffsContextProvider, -// config: _makeImportant({ name: "cutoffs", entityName: "subworkflow" }), -// }, -// KGridFormDataManager: { -// providerCls: PointsGridFormDataProvider, -// config: _makeImportant({ name: "kgrid" }), -// }, -// QGridFormDataManager: { -// providerCls: PointsGridFormDataProvider, -// config: _makeImportant({ name: "qgrid", divisor: 5 }), // Using less points for Qgrid by default -// }, -// IGridFormDataManager: { -// providerCls: PointsGridFormDataProvider, -// config: _makeImportant({ name: "igrid", divisor: 0.2 }), // Using more points for interpolated grid by default -// }, -// QPathFormDataManager: { -// providerCls: PointsPathFormDataProvider, -// config: _makeImportant({ name: "qpath" }), -// }, -// IPathFormDataManager: { -// providerCls: PointsPathFormDataProvider, -// config: _makeImportant({ name: "ipath" }), -// }, -// KPathFormDataManager: { -// providerCls: PointsPathFormDataProvider, -// config: _makeImportant({ name: "kpath" }), -// }, -// ExplicitKPathFormDataManager: { -// providerCls: ExplicitPointsPathFormDataProvider, -// config: _makeImportant({ name: "explicitKPath" }), -// }, -// ExplicitKPath2PIBAFormDataManager: { -// providerCls: ExplicitPointsPath2PIBAFormDataProvider, -// config: _makeImportant({ name: "explicitKPath2PIBA" }), -// }, -// HubbardJContextManager: { -// providerCls: HubbardJContextProvider, -// config: _makeImportant({ name: "hubbard_j" }), -// }, -// HubbardUContextManager: { -// providerCls: HubbardUContextProvider, -// config: _makeImportant({ name: "hubbard_u" }), -// }, -// HubbardVContextManager: { -// providerCls: HubbardVContextProvider, -// config: _makeImportant({ name: "hubbard_v" }), -// }, -// HubbardContextManagerLegacy: { -// providerCls: HubbardContextProviderLegacy, -// config: _makeImportant({ name: "hubbard_legacy" }), -// }, -// // NEBFormDataManager context is stored under the same key (`input`) as InputDataManager contexts. -// NEBFormDataManager: { -// providerCls: NEBFormDataProvider, -// config: _makeImportant({ name: "neb" }), -// }, -// BoundaryConditionsFormDataManager: { -// providerCls: BoundaryConditionsFormDataProvider, -// config: _makeImportant({ name: "boundaryConditions" }), -// }, -// MLSettingsDataManager: { -// providerCls: MLSettingsContextProvider, -// config: _makeImportant({ name: "mlSettings" }), -// }, -// MLTrainTestSplitDataManager: { -// providerCls: MLTrainTestSplitContextProvider, -// config: _makeImportant({ name: "mlTrainTestSplit" }), -// }, -// IonDynamicsContextProvider: { -// providerCls: IonDynamicsContextProvider, -// config: _makeImportant({ name: "dynamics" }), -// }, -// CollinearMagnetizationDataManager: { -// providerCls: CollinearMagnetizationContextProvider, -// config: _makeImportant({ name: "collinearMagnetization" }), -// }, -// NonCollinearMagnetizationDataManager: { -// providerCls: NonCollinearMagnetizationContextProvider, -// config: _makeImportant({ name: "nonCollinearMagnetization" }), -// }, -// QEPWXInputDataManager: { -// providerCls: QEPWXContextProvider, -// config: { name: "input" }, -// }, -// QENEBInputDataManager: { -// providerCls: QENEBContextProvider, -// config: { name: "input" }, -// }, -// VASPInputDataManager: { -// providerCls: VASPContextProvider, -// config: { name: "input" }, -// }, -// VASPNEBInputDataManager: { -// providerCls: VASPNEBContextProvider, -// config: { name: "input" }, -// }, -// NWChemInputDataManager: { -// providerCls: NWChemTotalEnergyContextProvider, -// config: { name: "input" }, -// }, -// }; -exports.newWodeProviders = { - PlanewaveCutoffDataManager: PlanewaveCutoffsContextProvider_1.default, - KGridFormDataManager: KGridFormDataManager_1.default, - QGridFormDataManager: QGridFormDataManager_1.default, - IGridFormDataManager: IGridFormDataManager_1.default, - QPathFormDataManager: QPathFormDataManager_1.default, - IPathFormDataManager: IPathFormDataManager_1.default, - KPathFormDataManager: KPathFormDataManager_1.default, - ExplicitKPathFormDataManager: ExplicitKPathFormDataManager_1.default, - ExplicitKPath2PIBAFormDataManager: ExplicitKPath2PIBAFormDataManager_1.default, - HubbardJContextManager: HubbardJContextProvider_1.default, - HubbardUContextManager: HubbardUContextProvider_1.default, - HubbardVContextManager: HubbardVContextProvider_1.default, - HubbardContextManagerLegacy: HubbardContextProviderLegacy_1.default, - NEBFormDataManager: NEBFormDataProvider_1.default, - BoundaryConditionsFormDataManager: BoundaryConditionsFormDataProvider_1.default, - MLSettingsDataManager: MLSettingsContextProvider_1.default, - MLTrainTestSplitDataManager: MLTrainTestSplitContextProvider_1.default, - IonDynamicsContextProvider: IonDynamicsContextProvider_1.default, - CollinearMagnetizationDataManager: CollinearMagnetizationContextProvider_1.default, - NonCollinearMagnetizationDataManager: NonCollinearMagnetizationContextProvider_1.default, - QEPWXInputDataManager: QEPWXContextProvider_1.default, - QENEBInputDataManager: QENEBContextProvider_1.default, - VASPInputDataManager: VASPContextProvider_1.default, - VASPNEBInputDataManager: VASPNEBContextProvider_1.default, - NWChemInputDataManager: NWChemTotalEnergyContextProvider_1.default, -}; diff --git a/dist/js/context/providers/BoundaryConditionsFormDataManager.d.ts b/dist/js/context/providers/BoundaryConditionsFormDataManager.d.ts new file mode 100644 index 00000000..7f72941e --- /dev/null +++ b/dist/js/context/providers/BoundaryConditionsFormDataManager.d.ts @@ -0,0 +1,30 @@ +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { BoundaryConditionsContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import { type MaterialContextMixin, type MaterialExternalContext } from "../mixins/MaterialContextMixin"; +import type { UnitContext } from "./base/ContextProvider"; +import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; +type Schema = BoundaryConditionsContextItemSchema; +type ExternalContext = JinjaExternalContext & MaterialExternalContext; +type Base = typeof JSONSchemaDataProvider & Constructor; +declare const BoundaryConditionsFormDataManager_base: Base; +export default class BoundaryConditionsFormDataManager extends BoundaryConditionsFormDataManager_base { + readonly name: "boundaryConditions"; + readonly domain: "important"; + readonly entityName: "unit"; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): BoundaryConditionsFormDataManager; + readonly humanName: "Boundary Conditions"; + readonly uiSchema: { + readonly type: { + readonly "ui:disabled": true; + }; + readonly offset: { + readonly "ui:disabled": true; + }; + readonly electricField: {}; + readonly targetFermiEnergy: {}; + }; + constructor(contextItem: Partial, externalContext: ExternalContext); + getDefaultData(): Schema["data"]; + get jsonSchema(): import("json-schema").JSONSchema7 | undefined; +} +export {}; diff --git a/dist/js/context/providers/BoundaryConditionsFormDataProvider.js b/dist/js/context/providers/BoundaryConditionsFormDataManager.js similarity index 83% rename from dist/js/context/providers/BoundaryConditionsFormDataProvider.js rename to dist/js/context/providers/BoundaryConditionsFormDataManager.js index 3dd1d4ca..bc686bfd 100644 --- a/dist/js/context/providers/BoundaryConditionsFormDataProvider.js +++ b/dist/js/context/providers/BoundaryConditionsFormDataManager.js @@ -7,11 +7,16 @@ const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/ess const MaterialContextMixin_1 = __importDefault(require("../mixins/MaterialContextMixin")); const JSONSchemaDataProvider_1 = __importDefault(require("./base/JSONSchemaDataProvider")); const jsonSchemaId = "context-providers-directory/boundary-conditions-data-provider"; -class BoundaryConditionsFormDataProvider extends JSONSchemaDataProvider_1.default { +class BoundaryConditionsFormDataManager extends JSONSchemaDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "boundaryConditions"); + return new BoundaryConditionsFormDataManager(contextItem, externalContext); + } constructor(contextItem, externalContext) { super(contextItem, externalContext); this.name = "boundaryConditions"; this.domain = "important"; + this.entityName = "unit"; this.humanName = "Boundary Conditions"; this.uiSchema = { type: { "ui:disabled": true }, @@ -47,5 +52,5 @@ class BoundaryConditionsFormDataProvider extends JSONSchemaDataProvider_1.defaul }); } } -exports.default = BoundaryConditionsFormDataProvider; -(0, MaterialContextMixin_1.default)(BoundaryConditionsFormDataProvider.prototype); +exports.default = BoundaryConditionsFormDataManager; +(0, MaterialContextMixin_1.default)(BoundaryConditionsFormDataManager.prototype); diff --git a/dist/js/context/providers/BoundaryConditionsFormDataProvider.d.ts b/dist/js/context/providers/BoundaryConditionsFormDataProvider.d.ts deleted file mode 100644 index 61f6d123..00000000 --- a/dist/js/context/providers/BoundaryConditionsFormDataProvider.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { BoundaryConditionsDataProviderSchema } from "@mat3ra/esse/dist/js/types"; -import { type MaterialContextMixin, type MaterialExternalContext } from "../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "./base/ContextProvider"; -import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; -type Name = "boundaryConditions"; -type Data = BoundaryConditionsDataProviderSchema; -type ExternalContext = JinjaExternalContext & MaterialExternalContext; -type Base = typeof JSONSchemaDataProvider & Constructor; -declare const BoundaryConditionsFormDataProvider_base: Base; -export default class BoundaryConditionsFormDataProvider extends BoundaryConditionsFormDataProvider_base { - readonly name: Name; - readonly domain: Domain; - readonly humanName = "Boundary Conditions"; - readonly uiSchema: { - type: { - "ui:disabled": boolean; - }; - offset: { - "ui:disabled": boolean; - }; - electricField: {}; - targetFermiEnergy: {}; - }; - constructor(contextItem: ContextItem, externalContext: ExternalContext); - getDefaultData(): Data; - get jsonSchema(): import("json-schema").JSONSchema7 | undefined; -} -export {}; diff --git a/dist/js/context/providers/CollinearMagnetizationContextProvider.d.ts b/dist/js/context/providers/CollinearMagnetizationDataManager.d.ts similarity index 58% rename from dist/js/context/providers/CollinearMagnetizationContextProvider.d.ts rename to dist/js/context/providers/CollinearMagnetizationDataManager.d.ts index 8d71423a..064bf74a 100644 --- a/dist/js/context/providers/CollinearMagnetizationContextProvider.d.ts +++ b/dist/js/context/providers/CollinearMagnetizationDataManager.d.ts @@ -1,22 +1,24 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { CollinearMagnetizationContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { CollinearMagnetizationContextItemSchema, CollinearMagnetizationContextProviderSchema } from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; import { type MaterialContextMixin, type MaterialExternalContext } from "../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "./base/ContextProvider"; +import type { UnitContext } from "./base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; -type Name = "collinearMagnetization"; type Data = CollinearMagnetizationContextProviderSchema; +type Schema = CollinearMagnetizationContextItemSchema; type ExternalContext = JinjaExternalContext & MaterialExternalContext; -type Base = typeof JSONSchemaDataProvider & Constructor; -declare const CollinearMagnetizationContextProvider_base: Base; -export default class CollinearMagnetizationContextProvider extends CollinearMagnetizationContextProvider_base { - readonly name: Name; - readonly domain: Domain; +type Base = typeof JSONSchemaDataProvider & Constructor; +declare const CollinearMagnetizationDataManager_base: Base; +export default class CollinearMagnetizationDataManager extends CollinearMagnetizationDataManager_base { + readonly name: "collinearMagnetization"; + readonly domain: "important"; + readonly entityName: "unit"; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): CollinearMagnetizationDataManager; readonly jsonSchema: JSONSchema7 | undefined; private readonly isTotalMagnetization; private readonly firstElement; private readonly uniqueElementsWithLabels; - constructor(contextItem: ContextItem, externalContext: ExternalContext); + constructor(contextItem: Partial, externalContext: ExternalContext); getDefaultData(): Data; setData(data: Data): void; get uiSchemaStyled(): { diff --git a/dist/js/context/providers/CollinearMagnetizationContextProvider.js b/dist/js/context/providers/CollinearMagnetizationDataManager.js similarity index 77% rename from dist/js/context/providers/CollinearMagnetizationContextProvider.js rename to dist/js/context/providers/CollinearMagnetizationDataManager.js index ec135ef6..98b95fcb 100644 --- a/dist/js/context/providers/CollinearMagnetizationContextProvider.js +++ b/dist/js/context/providers/CollinearMagnetizationDataManager.js @@ -6,13 +6,23 @@ Object.defineProperty(exports, "__esModule", { value: true }); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); const MaterialContextMixin_1 = __importDefault(require("../mixins/MaterialContextMixin")); const JSONSchemaDataProvider_1 = __importDefault(require("./base/JSONSchemaDataProvider")); +const defaultData = { + value: 0.0, + isTotalMagnetization: false, + totalMagnetization: 0.0, +}; const jsonSchemaId = "context-providers-directory/collinear-magnetization-context-provider"; -class CollinearMagnetizationContextProvider extends JSONSchemaDataProvider_1.default { +class CollinearMagnetizationDataManager extends JSONSchemaDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "collinearMagnetization"); + return new CollinearMagnetizationDataManager(contextItem, externalContext); + } constructor(contextItem, externalContext) { var _a, _b, _c, _d; super(contextItem, externalContext); this.name = "collinearMagnetization"; this.domain = "important"; + this.entityName = "unit"; this.initMaterialContextMixin(externalContext); this.uniqueElementsWithLabels = [ ...new Set(((_b = (_a = this.material) === null || _a === void 0 ? void 0 : _a.Basis) === null || _b === void 0 ? void 0 : _b.elementsWithLabelsArray) || []), @@ -29,13 +39,13 @@ class CollinearMagnetizationContextProvider extends JSONSchemaDataProvider_1.def default: this.firstElement, }, "properties.startingMagnetization.items.properties.value": { - default: 0.0, + default: defaultData.value, }, "properties.isTotalMagnetization": { - default: false, + default: defaultData.isTotalMagnetization, }, "properties.totalMagnetization": { - default: 0.0, + default: defaultData.totalMagnetization, }, }); } @@ -45,11 +55,11 @@ class CollinearMagnetizationContextProvider extends JSONSchemaDataProvider_1.def { index: 1, atomicSpecies: this.firstElement, - value: 0.0, + value: defaultData.value, }, ], - isTotalMagnetization: false, - totalMagnetization: 0.0, + isTotalMagnetization: defaultData.isTotalMagnetization, + totalMagnetization: defaultData.totalMagnetization, }; } setData(data) { @@ -83,5 +93,5 @@ class CollinearMagnetizationContextProvider extends JSONSchemaDataProvider_1.def }; } } -exports.default = CollinearMagnetizationContextProvider; -(0, MaterialContextMixin_1.default)(CollinearMagnetizationContextProvider.prototype); +exports.default = CollinearMagnetizationDataManager; +(0, MaterialContextMixin_1.default)(CollinearMagnetizationDataManager.prototype); diff --git a/dist/js/context/providers/Hubbard/HubbardContextManagerLegacy.d.ts b/dist/js/context/providers/Hubbard/HubbardContextManagerLegacy.d.ts new file mode 100644 index 00000000..a061cea6 --- /dev/null +++ b/dist/js/context/providers/Hubbard/HubbardContextManagerLegacy.d.ts @@ -0,0 +1,29 @@ +import type { HubbardLegacyContextItemSchema, HubbardLegacyContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import type { UnitContext } from "../base/ContextProvider"; +import HubbardContextProvider, { type HubbardExternalContext } from "./HubbardContextProvider"; +type Schema = HubbardLegacyContextItemSchema; +type Data = HubbardLegacyContextProviderSchema; +export default class HubbardContextManagerLegacy extends HubbardContextProvider { + readonly name: "hubbard_legacy"; + readonly domain: "important"; + readonly entityName: "unit"; + static createFromUnitContext(unitContext: UnitContext, externalContext: HubbardExternalContext): HubbardContextManagerLegacy; + readonly jsonSchema: JSONSchema7 | undefined; + readonly uiSchemaStyled: { + readonly "ui:options": { + readonly addable: true; + readonly orderable: false; + readonly removable: true; + }; + readonly items: { + readonly atomicSpeciesIndex: { + readonly "ui:readonly": true; + }; + }; + }; + constructor(contextItem: Partial, externalContext: HubbardExternalContext); + getDefaultData(): Data; + setData(data: Data): void; +} +export {}; diff --git a/dist/js/context/providers/Hubbard/HubbardContextProviderLegacy.js b/dist/js/context/providers/Hubbard/HubbardContextManagerLegacy.js similarity index 84% rename from dist/js/context/providers/Hubbard/HubbardContextProviderLegacy.js rename to dist/js/context/providers/Hubbard/HubbardContextManagerLegacy.js index cfb6db88..8aef72e2 100644 --- a/dist/js/context/providers/Hubbard/HubbardContextProviderLegacy.js +++ b/dist/js/context/providers/Hubbard/HubbardContextManagerLegacy.js @@ -9,11 +9,16 @@ const defaultHubbardConfig = { hubbardUValue: 1.0, }; const jsonSchemaId = "context-providers-directory/hubbard-legacy-context-provider"; -class HubbardContextProviderLegacy extends HubbardContextProvider_1.default { +class HubbardContextManagerLegacy extends HubbardContextProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "hubbard_legacy"); + return new HubbardContextManagerLegacy(contextItem, externalContext); + } constructor(contextItem, externalContext) { super(contextItem, externalContext); this.name = "hubbard_legacy"; this.domain = "important"; + this.entityName = "unit"; this.uiSchemaStyled = { "ui:options": { addable: true, @@ -57,4 +62,4 @@ class HubbardContextProviderLegacy extends HubbardContextProvider_1.default { super.setData(hubbardUValues); } } -exports.default = HubbardContextProviderLegacy; +exports.default = HubbardContextManagerLegacy; diff --git a/dist/js/context/providers/Hubbard/HubbardContextProvider.d.ts b/dist/js/context/providers/Hubbard/HubbardContextProvider.d.ts index a9bcbfc2..ac5e876f 100644 --- a/dist/js/context/providers/Hubbard/HubbardContextProvider.d.ts +++ b/dist/js/context/providers/Hubbard/HubbardContextProvider.d.ts @@ -1,19 +1,20 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { HubbardJContextItemSchema, HubbardLegacyContextItemSchema, HubbardUContextItemSchema, HubbardVContextItemSchema } from "@mat3ra/esse/dist/js/types"; import { type MaterialContextMixin, type MaterialExternalContext } from "../../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "../base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext } from "../base/JSONSchemaDataProvider"; -type HubbardName = "hubbard_u" | "hubbard_j" | "hubbard_v" | "hubbard_legacy"; +type Schema = HubbardJContextItemSchema | HubbardUContextItemSchema | HubbardVContextItemSchema | HubbardLegacyContextItemSchema; export type HubbardExternalContext = JinjaExternalContext & MaterialExternalContext; -type Base = typeof JSONSchemaDataProvider & Constructor; +type Base = typeof JSONSchemaDataProvider & Constructor; declare const HubbardContextProvider_base: Base; -export default abstract class HubbardContextProvider extends HubbardContextProvider_base { - abstract readonly name: N; - abstract getDefaultData(): D; - readonly domain: Domain; +export default abstract class HubbardContextProvider extends HubbardContextProvider_base { + abstract readonly name: S["name"]; + abstract getDefaultData(): S["data"]; + readonly domain: "important"; + readonly entityName: "unit"; protected readonly uniqueElementsWithLabels: string[]; protected readonly firstElement: string; protected readonly secondSpecies: string; protected readonly orbitalList: string[]; - constructor(contextItem: ContextItem, externalContext: EC); + constructor(contextItem: Partial, externalContext: EC); } export {}; diff --git a/dist/js/context/providers/Hubbard/HubbardContextProvider.js b/dist/js/context/providers/Hubbard/HubbardContextProvider.js index 2cfd1a4a..ec806d05 100644 --- a/dist/js/context/providers/Hubbard/HubbardContextProvider.js +++ b/dist/js/context/providers/Hubbard/HubbardContextProvider.js @@ -10,6 +10,7 @@ class HubbardContextProvider extends JSONSchemaDataProvider_1.default { var _a, _b, _c; super(contextItem, externalContext); this.domain = "important"; + this.entityName = "unit"; this.orbitalList = [ "2p", "3s", diff --git a/dist/js/context/providers/Hubbard/HubbardContextProviderLegacy.d.ts b/dist/js/context/providers/Hubbard/HubbardContextProviderLegacy.d.ts deleted file mode 100644 index 953b9c77..00000000 --- a/dist/js/context/providers/Hubbard/HubbardContextProviderLegacy.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { HubbardLegacyContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import type { ContextItem, Domain } from "../base/ContextProvider"; -import HubbardContextProvider, { type HubbardExternalContext } from "./HubbardContextProvider"; -type Name = "hubbard_legacy"; -type Data = HubbardLegacyContextProviderSchema; -export default class HubbardContextProviderLegacy extends HubbardContextProvider { - readonly name: Name; - readonly domain: Domain; - readonly jsonSchema: JSONSchema7 | undefined; - readonly uiSchemaStyled: { - "ui:options": { - addable: boolean; - orderable: boolean; - removable: boolean; - }; - items: { - atomicSpeciesIndex: { - "ui:readonly": boolean; - }; - }; - }; - constructor(contextItem: ContextItem, externalContext: HubbardExternalContext); - getDefaultData(): Data; - setData(data: Data): void; -} -export {}; diff --git a/dist/js/context/providers/Hubbard/HubbardJContextManager.d.ts b/dist/js/context/providers/Hubbard/HubbardJContextManager.d.ts new file mode 100644 index 00000000..b5c0313a --- /dev/null +++ b/dist/js/context/providers/Hubbard/HubbardJContextManager.d.ts @@ -0,0 +1,22 @@ +import type { HubbardJContextItemSchema, HubbardJContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import type { UnitContext } from "../base/ContextProvider"; +import HubbardContextProvider, { type HubbardExternalContext } from "./HubbardContextProvider"; +type Schema = HubbardJContextItemSchema; +type Data = HubbardJContextProviderSchema; +export default class HubbardJContextManager extends HubbardContextProvider { + readonly name: "hubbard_j"; + readonly entityName: "unit"; + static createFromUnitContext(unitContext: UnitContext, externalContext: HubbardExternalContext): HubbardJContextManager; + readonly uiSchemaStyled: { + readonly "ui:options": { + readonly addable: true; + readonly orderable: true; + readonly removable: true; + }; + }; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(contextItem: Partial, externalContext: HubbardExternalContext); + getDefaultData(): Data; +} +export {}; diff --git a/dist/js/context/providers/Hubbard/HubbardJContextProvider.js b/dist/js/context/providers/Hubbard/HubbardJContextManager.js similarity index 82% rename from dist/js/context/providers/Hubbard/HubbardJContextProvider.js rename to dist/js/context/providers/Hubbard/HubbardJContextManager.js index 928936df..cb3be3a8 100644 --- a/dist/js/context/providers/Hubbard/HubbardJContextProvider.js +++ b/dist/js/context/providers/Hubbard/HubbardJContextManager.js @@ -12,10 +12,15 @@ const defaultHubbardConfig = { value: 1.0, }; const jsonSchemaId = "context-providers-directory/hubbard-j-context-provider"; -class HubbardJContextProvider extends HubbardContextProvider_1.default { +class HubbardJContextManager extends HubbardContextProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "hubbard_j"); + return new HubbardJContextManager(contextItem, externalContext); + } constructor(contextItem, externalContext) { super(contextItem, externalContext); this.name = "hubbard_j"; + this.entityName = "unit"; this.uiSchemaStyled = { "ui:options": { addable: true, @@ -49,4 +54,4 @@ class HubbardJContextProvider extends HubbardContextProvider_1.default { ]; } } -exports.default = HubbardJContextProvider; +exports.default = HubbardJContextManager; diff --git a/dist/js/context/providers/Hubbard/HubbardJContextProvider.d.ts b/dist/js/context/providers/Hubbard/HubbardJContextProvider.d.ts deleted file mode 100644 index 0334c3d9..00000000 --- a/dist/js/context/providers/Hubbard/HubbardJContextProvider.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { HubbardJContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import type { ContextItem } from "../base/ContextProvider"; -import HubbardContextProvider, { type HubbardExternalContext } from "./HubbardContextProvider"; -type Name = "hubbard_j"; -type Data = HubbardJContextProviderSchema; -export default class HubbardJContextProvider extends HubbardContextProvider { - readonly name: Name; - readonly uiSchemaStyled: { - "ui:options": { - addable: boolean; - orderable: boolean; - removable: boolean; - }; - }; - readonly jsonSchema: JSONSchema7 | undefined; - constructor(contextItem: ContextItem, externalContext: HubbardExternalContext); - getDefaultData(): Data; -} -export {}; diff --git a/dist/js/context/providers/Hubbard/HubbardUContextManager.d.ts b/dist/js/context/providers/Hubbard/HubbardUContextManager.d.ts new file mode 100644 index 00000000..214a8011 --- /dev/null +++ b/dist/js/context/providers/Hubbard/HubbardUContextManager.d.ts @@ -0,0 +1,22 @@ +import type { HubbardUContextItemSchema, HubbardUContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import type { UnitContext } from "../base/ContextProvider"; +import HubbardContextProvider, { type HubbardExternalContext } from "./HubbardContextProvider"; +type Schema = HubbardUContextItemSchema; +type Data = HubbardUContextProviderSchema; +export default class HubbardUContextManager extends HubbardContextProvider { + readonly name: "hubbard_u"; + readonly entityName: "unit"; + static createFromUnitContext(unitContext: UnitContext, externalContext: HubbardExternalContext): HubbardUContextManager; + readonly uiSchemaStyled: { + readonly "ui:options": { + readonly addable: true; + readonly orderable: false; + readonly removable: true; + }; + }; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(contextItem: Partial, externalContext: HubbardExternalContext); + getDefaultData(): Data; +} +export {}; diff --git a/dist/js/context/providers/Hubbard/HubbardUContextProvider.js b/dist/js/context/providers/Hubbard/HubbardUContextManager.js similarity index 81% rename from dist/js/context/providers/Hubbard/HubbardUContextProvider.js rename to dist/js/context/providers/Hubbard/HubbardUContextManager.js index e1ad1be0..288024f0 100644 --- a/dist/js/context/providers/Hubbard/HubbardUContextProvider.js +++ b/dist/js/context/providers/Hubbard/HubbardUContextManager.js @@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); -const MaterialContextMixin_1 = __importDefault(require("../../mixins/MaterialContextMixin")); const HubbardContextProvider_1 = __importDefault(require("./HubbardContextProvider")); const defaultHubbardConfig = { atomicSpecies: "", @@ -12,10 +11,15 @@ const defaultHubbardConfig = { hubbardUValue: 1.0, }; const jsonSchemaId = "context-providers-directory/hubbard-u-context-provider"; -class HubbardUContextProvider extends HubbardContextProvider_1.default { +class HubbardUContextManager extends HubbardContextProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "hubbard_u"); + return new HubbardUContextManager(contextItem, externalContext); + } constructor(contextItem, externalContext) { super(contextItem, externalContext); this.name = "hubbard_u"; + this.entityName = "unit"; this.uiSchemaStyled = { "ui:options": { addable: true, @@ -46,5 +50,4 @@ class HubbardUContextProvider extends HubbardContextProvider_1.default { ]; } } -exports.default = HubbardUContextProvider; -(0, MaterialContextMixin_1.default)(HubbardUContextProvider.prototype); +exports.default = HubbardUContextManager; diff --git a/dist/js/context/providers/Hubbard/HubbardUContextProvider.d.ts b/dist/js/context/providers/Hubbard/HubbardUContextProvider.d.ts deleted file mode 100644 index de02ea73..00000000 --- a/dist/js/context/providers/Hubbard/HubbardUContextProvider.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { HubbardUContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import type { ContextItem } from "../base/ContextProvider"; -import HubbardContextProvider, { type HubbardExternalContext } from "./HubbardContextProvider"; -type Name = "hubbard_u"; -type Data = HubbardUContextProviderSchema; -export default class HubbardUContextProvider extends HubbardContextProvider { - readonly name: Name; - readonly uiSchemaStyled: { - "ui:options": { - addable: boolean; - orderable: boolean; - removable: boolean; - }; - }; - readonly jsonSchema: JSONSchema7 | undefined; - constructor(contextItem: ContextItem, externalContext: HubbardExternalContext); - getDefaultData(): Data; -} -export {}; diff --git a/dist/js/context/providers/Hubbard/HubbardVContextManager.d.ts b/dist/js/context/providers/Hubbard/HubbardVContextManager.d.ts new file mode 100644 index 00000000..0dda1f9f --- /dev/null +++ b/dist/js/context/providers/Hubbard/HubbardVContextManager.d.ts @@ -0,0 +1,22 @@ +import type { HubbardVContextItemSchema, HubbardVContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import type { UnitContext } from "../base/ContextProvider"; +import HubbardContextProvider, { type HubbardExternalContext } from "./HubbardContextProvider"; +type Schema = HubbardVContextItemSchema; +type Data = HubbardVContextProviderSchema; +export default class HubbardVContextManager extends HubbardContextProvider { + readonly name: "hubbard_v"; + readonly entityName: "unit"; + static createFromUnitContext(unitContext: UnitContext, externalContext: HubbardExternalContext): HubbardVContextManager; + readonly uiSchemaStyled: { + readonly "ui:options": { + readonly addable: true; + readonly orderable: true; + readonly removable: true; + }; + }; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(contextItem: Partial, externalContext: HubbardExternalContext); + getDefaultData(): Data; +} +export {}; diff --git a/dist/js/context/providers/Hubbard/HubbardVContextProvider.js b/dist/js/context/providers/Hubbard/HubbardVContextManager.js similarity index 87% rename from dist/js/context/providers/Hubbard/HubbardVContextProvider.js rename to dist/js/context/providers/Hubbard/HubbardVContextManager.js index c4adac75..d62354a9 100644 --- a/dist/js/context/providers/Hubbard/HubbardVContextProvider.js +++ b/dist/js/context/providers/Hubbard/HubbardVContextManager.js @@ -15,11 +15,16 @@ const defaultHubbardConfig = { hubbardVValue: 1.0, }; const jsonSchemaId = "context-providers-directory/hubbard-v-context-provider"; -class HubbardVContextProvider extends HubbardContextProvider_1.default { +class HubbardVContextManager extends HubbardContextProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "hubbard_v"); + return new HubbardVContextManager(contextItem, externalContext); + } constructor(contextItem, externalContext) { var _a; super(contextItem, externalContext); this.name = "hubbard_v"; + this.entityName = "unit"; this.uiSchemaStyled = { "ui:options": { addable: true, @@ -67,4 +72,4 @@ class HubbardVContextProvider extends HubbardContextProvider_1.default { ]; } } -exports.default = HubbardVContextProvider; +exports.default = HubbardVContextManager; diff --git a/dist/js/context/providers/Hubbard/HubbardVContextProvider.d.ts b/dist/js/context/providers/Hubbard/HubbardVContextProvider.d.ts deleted file mode 100644 index 0f28da97..00000000 --- a/dist/js/context/providers/Hubbard/HubbardVContextProvider.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { HubbardVContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import type { ContextItem } from "../base/ContextProvider"; -import HubbardContextProvider, { type HubbardExternalContext } from "./HubbardContextProvider"; -type Name = "hubbard_v"; -type Data = HubbardVContextProviderSchema; -export default class HubbardVContextProvider extends HubbardContextProvider { - readonly name: Name; - readonly uiSchemaStyled: { - "ui:options": { - addable: boolean; - orderable: boolean; - removable: boolean; - }; - }; - readonly jsonSchema: JSONSchema7 | undefined; - constructor(contextItem: ContextItem, externalContext: HubbardExternalContext); - getDefaultData(): Data; -} -export {}; diff --git a/dist/js/context/providers/IonDynamicsContextProvider.d.ts b/dist/js/context/providers/IonDynamicsContextProvider.d.ts deleted file mode 100644 index 8eca4e70..00000000 --- a/dist/js/context/providers/IonDynamicsContextProvider.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { IonDynamicsContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import type { ContextItem, Domain, ExternalContext } from "./base/ContextProvider"; -import JSONSchemaFormDataProvider from "./base/JSONSchemaFormDataProvider"; -type Data = IonDynamicsContextProviderSchema; -type Name = "dynamics"; -export default class IonDynamicsContextProvider extends JSONSchemaFormDataProvider { - readonly name: Name; - readonly domain: Domain; - readonly uiSchema: { - numberOfSteps: {}; - timeStep: {}; - electronMass: {}; - temperature: {}; - }; - readonly jsonSchema: JSONSchema7 | undefined; - constructor(contextItem: ContextItem, externalContext: ExternalContext); - getDefaultData(): { - numberOfSteps: number; - timeStep: number; - electronMass: number; - temperature: number; - }; -} -export {}; diff --git a/dist/js/context/providers/IonDynamicsDataManager.d.ts b/dist/js/context/providers/IonDynamicsDataManager.d.ts new file mode 100644 index 00000000..dbe897fb --- /dev/null +++ b/dist/js/context/providers/IonDynamicsDataManager.d.ts @@ -0,0 +1,27 @@ +import type { DynamicsContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import type { BaseExternalContext, UnitContext } from "./base/ContextProvider"; +import JSONSchemaFormDataProvider from "./base/JSONSchemaFormDataProvider"; +type Schema = DynamicsContextItemSchema; +export default class IonDynamicsDataManager extends JSONSchemaFormDataProvider { + readonly name: "dynamics"; + readonly domain: "important"; + readonly entityName: "unit"; + static createFromUnitContext(unitContext: UnitContext, externalContext: BaseExternalContext): IonDynamicsDataManager; + readonly uiSchema: { + readonly numberOfSteps: {}; + readonly timeStep: {}; + readonly electronMass: {}; + readonly temperature: {}; + }; + readonly extraData: {}; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(contextItem: Partial, externalContext: BaseExternalContext); + getDefaultData(): { + numberOfSteps: number; + timeStep: number; + electronMass: number; + temperature: number; + }; +} +export {}; diff --git a/dist/js/context/providers/IonDynamicsContextProvider.js b/dist/js/context/providers/IonDynamicsDataManager.js similarity index 77% rename from dist/js/context/providers/IonDynamicsContextProvider.js rename to dist/js/context/providers/IonDynamicsDataManager.js index cf5c4440..fed1a3cf 100644 --- a/dist/js/context/providers/IonDynamicsContextProvider.js +++ b/dist/js/context/providers/IonDynamicsDataManager.js @@ -12,17 +12,23 @@ const defaultData = { electronMass: 100.0, temperature: 300.0, }; -class IonDynamicsContextProvider extends JSONSchemaFormDataProvider_1.default { +class IonDynamicsDataManager extends JSONSchemaFormDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "dynamics"); + return new IonDynamicsDataManager(contextItem, externalContext); + } constructor(contextItem, externalContext) { super(contextItem, externalContext); this.name = "dynamics"; this.domain = "important"; + this.entityName = "unit"; this.uiSchema = { numberOfSteps: {}, timeStep: {}, electronMass: {}, temperature: {}, }; + this.extraData = {}; this.jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(jsonSchemaId, { numberOfSteps: { default: defaultData.numberOfSteps }, timeStep: { default: defaultData.timeStep }, @@ -35,4 +41,4 @@ class IonDynamicsContextProvider extends JSONSchemaFormDataProvider_1.default { return defaultData; } } -exports.default = IonDynamicsContextProvider; +exports.default = IonDynamicsDataManager; diff --git a/dist/js/context/providers/MLSettingsContextProvider.d.ts b/dist/js/context/providers/MLSettingsContextProvider.d.ts deleted file mode 100644 index 73d2512c..00000000 --- a/dist/js/context/providers/MLSettingsContextProvider.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { MLSettingsContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import { type ApplicationContextMixin } from "../mixins/ApplicationContextMixin"; -import { type ContextItem, type Domain } from "./base/ContextProvider"; -import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; -type Name = "mlSettings"; -type Data = MLSettingsContextProviderSchema; -type ExternalContext = JinjaExternalContext & ApplicationContextMixin; -type Base = typeof JSONSchemaDataProvider & Constructor; -declare const MLSettingsContextProvider_base: Base; -export default class MLSettingsContextProvider extends MLSettingsContextProvider_base { - readonly name: Name; - readonly domain: Domain; - readonly jsonSchema: JSONSchema7 | undefined; - readonly uiSchema: { - target_column_name: {}; - problem_category: {}; - }; - constructor(contextItem: ContextItem, externalContext: ExternalContext); - getDefaultData(): { - target_column_name: string; - problem_category: "regression"; - }; -} -export {}; diff --git a/dist/js/context/providers/MLSettingsDataManager.d.ts b/dist/js/context/providers/MLSettingsDataManager.d.ts new file mode 100644 index 00000000..64b30306 --- /dev/null +++ b/dist/js/context/providers/MLSettingsDataManager.d.ts @@ -0,0 +1,26 @@ +import type { MlSettingsContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import { type UnitContext } from "./base/ContextProvider"; +import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; +type Schema = MlSettingsContextItemSchema; +type ExternalContext = JinjaExternalContext; +type Base = typeof JSONSchemaDataProvider; +declare const MLSettingsDataManager_base: Base; +export default class MLSettingsDataManager extends MLSettingsDataManager_base { + readonly name: "mlSettings"; + readonly domain: "important"; + readonly entityName: "unit"; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): MLSettingsDataManager; + readonly jsonSchema: JSONSchema7 | undefined; + readonly uiSchema: { + readonly target_column_name: {}; + readonly problem_category: {}; + }; + readonly extraData: {}; + constructor(contextItem: Partial, externalContext: ExternalContext); + getDefaultData(): { + target_column_name: string; + problem_category: "regression"; + }; +} +export {}; diff --git a/dist/js/context/providers/MLSettingsContextProvider.js b/dist/js/context/providers/MLSettingsDataManager.js similarity index 75% rename from dist/js/context/providers/MLSettingsContextProvider.js rename to dist/js/context/providers/MLSettingsDataManager.js index e42f7717..f8342859 100644 --- a/dist/js/context/providers/MLSettingsContextProvider.js +++ b/dist/js/context/providers/MLSettingsDataManager.js @@ -4,23 +4,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); -const ApplicationContextMixin_1 = require("../mixins/ApplicationContextMixin"); const JSONSchemaDataProvider_1 = __importDefault(require("./base/JSONSchemaDataProvider")); const jsonSchemaId = "context-providers-directory/ml-settings-context-provider"; const defaultData = { target_column_name: "target", problem_category: "regression", }; -class MLSettingsContextProvider extends JSONSchemaDataProvider_1.default { +class MLSettingsDataManager extends JSONSchemaDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "mlSettings"); + return new MLSettingsDataManager(contextItem, externalContext); + } constructor(contextItem, externalContext) { super(contextItem, externalContext); this.name = "mlSettings"; this.domain = "important"; + this.entityName = "unit"; this.uiSchema = { target_column_name: {}, problem_category: {}, }; - this.initApplicationContextMixin(externalContext); + this.extraData = {}; this.jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(jsonSchemaId, { target_column_name: { default: defaultData.target_column_name }, problem_category: { default: defaultData.problem_category }, @@ -31,5 +35,4 @@ class MLSettingsContextProvider extends JSONSchemaDataProvider_1.default { return defaultData; } } -exports.default = MLSettingsContextProvider; -(0, ApplicationContextMixin_1.applicationContextMixin)(MLSettingsContextProvider.prototype); +exports.default = MLSettingsDataManager; diff --git a/dist/js/context/providers/MLTrainTestSplitContextProvider.d.ts b/dist/js/context/providers/MLTrainTestSplitContextProvider.d.ts deleted file mode 100644 index 69a3c3e6..00000000 --- a/dist/js/context/providers/MLTrainTestSplitContextProvider.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { MLTrainTestSplitContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import { type ApplicationContextMixin } from "../mixins/ApplicationContextMixin"; -import { type ContextItem, type Domain } from "./base/ContextProvider"; -import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; -type Name = "mlTrainTestSplit"; -type Data = MLTrainTestSplitContextProviderSchema; -type ExternalContext = JinjaExternalContext & ApplicationContextMixin; -type Base = typeof JSONSchemaDataProvider & Constructor; -declare const MLTrainTestSplitContextProvider_base: Base; -export default class MLTrainTestSplitContextProvider extends MLTrainTestSplitContextProvider_base { - readonly name: Name; - readonly domain: Domain; - readonly jsonSchema: JSONSchema7 | undefined; - readonly uiSchema: { - target_column_name: {}; - problem_category: {}; - }; - constructor(contextItem: ContextItem, externalContext: ExternalContext); - getDefaultData(): { - fraction_held_as_test_set: number; - }; -} -export {}; diff --git a/dist/js/context/providers/MLTrainTestSplitDataManager.d.ts b/dist/js/context/providers/MLTrainTestSplitDataManager.d.ts new file mode 100644 index 00000000..89a64a4d --- /dev/null +++ b/dist/js/context/providers/MLTrainTestSplitDataManager.d.ts @@ -0,0 +1,25 @@ +import type { MlTrainTestSplitContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import { type UnitContext } from "./base/ContextProvider"; +import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; +type Schema = MlTrainTestSplitContextItemSchema; +type ExternalContext = JinjaExternalContext; +type Base = typeof JSONSchemaDataProvider; +declare const MLTrainTestSplitDataManager_base: Base; +export default class MLTrainTestSplitDataManager extends MLTrainTestSplitDataManager_base { + readonly name: "mlTrainTestSplit"; + readonly domain: "important"; + readonly entityName: "unit"; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): MLTrainTestSplitDataManager; + readonly jsonSchema: JSONSchema7 | undefined; + readonly uiSchema: { + readonly target_column_name: {}; + readonly problem_category: {}; + }; + readonly extraData: {}; + constructor(contextItem: Partial, externalContext: ExternalContext); + getDefaultData(): { + fraction_held_as_test_set: number; + }; +} +export {}; diff --git a/dist/js/context/providers/MLTrainTestSplitContextProvider.js b/dist/js/context/providers/MLTrainTestSplitDataManager.js similarity index 73% rename from dist/js/context/providers/MLTrainTestSplitContextProvider.js rename to dist/js/context/providers/MLTrainTestSplitDataManager.js index 2e216c35..b02f281c 100644 --- a/dist/js/context/providers/MLTrainTestSplitContextProvider.js +++ b/dist/js/context/providers/MLTrainTestSplitDataManager.js @@ -4,22 +4,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); -const ApplicationContextMixin_1 = require("../mixins/ApplicationContextMixin"); const JSONSchemaDataProvider_1 = __importDefault(require("./base/JSONSchemaDataProvider")); const jsonSchemaId = "context-providers-directory/ml-train-test-split-context-provider"; const defaultData = { fraction_held_as_test_set: 0.2, }; -class MLTrainTestSplitContextProvider extends JSONSchemaDataProvider_1.default { +class MLTrainTestSplitDataManager extends JSONSchemaDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "mlTrainTestSplit"); + return new MLTrainTestSplitDataManager(contextItem, externalContext); + } constructor(contextItem, externalContext) { super(contextItem, externalContext); this.name = "mlTrainTestSplit"; this.domain = "important"; + this.entityName = "unit"; this.uiSchema = { target_column_name: {}, problem_category: {}, }; - this.initApplicationContextMixin(externalContext); + this.extraData = {}; this.jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(jsonSchemaId, { fraction_held_as_test_set: { default: defaultData.fraction_held_as_test_set }, }); @@ -29,5 +33,4 @@ class MLTrainTestSplitContextProvider extends JSONSchemaDataProvider_1.default { return defaultData; } } -exports.default = MLTrainTestSplitContextProvider; -(0, ApplicationContextMixin_1.applicationContextMixin)(MLTrainTestSplitContextProvider.prototype); +exports.default = MLTrainTestSplitDataManager; diff --git a/dist/js/context/providers/NEBFormDataManager.d.ts b/dist/js/context/providers/NEBFormDataManager.d.ts new file mode 100644 index 00000000..6b6ebb0a --- /dev/null +++ b/dist/js/context/providers/NEBFormDataManager.d.ts @@ -0,0 +1,23 @@ +import type { NebContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import type { UnitContext } from "./base/ContextProvider"; +import type { JinjaExternalContext } from "./base/JSONSchemaDataProvider"; +import JSONSchemaFormDataProvider from "./base/JSONSchemaFormDataProvider"; +type Schema = NebContextItemSchema; +type ExternalContext = JinjaExternalContext; +export default class NEBFormDataManager extends JSONSchemaFormDataProvider { + readonly name: "neb"; + readonly domain: "important"; + readonly entityName: "unit"; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): NEBFormDataManager; + readonly uiSchema: { + readonly nImages: {}; + }; + readonly jsonSchema: JSONSchema7 | undefined; + readonly extraData: {}; + constructor(contextItem: Partial, externalContext: ExternalContext); + getDefaultData(): { + nImages: number; + }; +} +export {}; diff --git a/dist/js/context/providers/NEBFormDataProvider.js b/dist/js/context/providers/NEBFormDataManager.js similarity index 72% rename from dist/js/context/providers/NEBFormDataProvider.js rename to dist/js/context/providers/NEBFormDataManager.js index fb0572ae..60d6f010 100644 --- a/dist/js/context/providers/NEBFormDataProvider.js +++ b/dist/js/context/providers/NEBFormDataManager.js @@ -9,14 +9,20 @@ const jsonSchemaId = "context-providers-directory/neb-data-provider"; const defaultData = { nImages: 1, }; -class NEBFormDataProvider extends JSONSchemaFormDataProvider_1.default { +class NEBFormDataManager extends JSONSchemaFormDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "neb"); + return new NEBFormDataManager(contextItem, externalContext); + } constructor(contextItem, externalContext) { super(contextItem, externalContext); this.name = "neb"; this.domain = "important"; + this.entityName = "unit"; this.uiSchema = { nImages: {}, }; + this.extraData = {}; this.jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(jsonSchemaId, { nImages: { default: defaultData.nImages }, }); @@ -26,4 +32,4 @@ class NEBFormDataProvider extends JSONSchemaFormDataProvider_1.default { return defaultData; } } -exports.default = NEBFormDataProvider; +exports.default = NEBFormDataManager; diff --git a/dist/js/context/providers/NEBFormDataProvider.d.ts b/dist/js/context/providers/NEBFormDataProvider.d.ts deleted file mode 100644 index 8b45d298..00000000 --- a/dist/js/context/providers/NEBFormDataProvider.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { NEBDataProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import type { ContextItem, Domain } from "./base/ContextProvider"; -import type { JinjaExternalContext } from "./base/JSONSchemaDataProvider"; -import JSONSchemaFormDataProvider from "./base/JSONSchemaFormDataProvider"; -type Name = "neb"; -type Data = NEBDataProviderSchema; -type ExternalContext = JinjaExternalContext; -export default class NEBFormDataProvider extends JSONSchemaFormDataProvider { - readonly name: Name; - readonly domain: Domain; - readonly uiSchema: { - nImages: {}; - }; - readonly jsonSchema: JSONSchema7 | undefined; - constructor(contextItem: ContextItem, externalContext: ExternalContext); - getDefaultData(): { - nImages: number; - }; -} -export {}; diff --git a/dist/js/context/providers/NonCollinearMagnetizationContextProvider.d.ts b/dist/js/context/providers/NonCollinearMagnetizationDataManager.d.ts similarity index 72% rename from dist/js/context/providers/NonCollinearMagnetizationContextProvider.d.ts rename to dist/js/context/providers/NonCollinearMagnetizationDataManager.d.ts index d5df390b..cc7d2927 100644 --- a/dist/js/context/providers/NonCollinearMagnetizationContextProvider.d.ts +++ b/dist/js/context/providers/NonCollinearMagnetizationDataManager.d.ts @@ -1,17 +1,19 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { NonCollinearMagnetizationContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { NonCollinearMagnetizationContextItemSchema, NonCollinearMagnetizationContextProviderSchema } from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; import { type MaterialContextMixin, type MaterialExternalContext } from "../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "./base/ContextProvider"; +import type { UnitContext } from "./base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; -type Name = "nonCollinearMagnetization"; type Data = NonCollinearMagnetizationContextProviderSchema; +type Schema = NonCollinearMagnetizationContextItemSchema; type ExternalContext = JinjaExternalContext & MaterialExternalContext; -type Base = typeof JSONSchemaDataProvider & Constructor; -declare const NonCollinearMagnetizationContextProvider_base: Base; -export default class NonCollinearMagnetizationContextProvider extends NonCollinearMagnetizationContextProvider_base { - readonly name: Name; - readonly domain: Domain; +type Base = typeof JSONSchemaDataProvider & Constructor; +declare const NonCollinearMagnetizationDataManager_base: Base; +export default class NonCollinearMagnetizationDataManager extends NonCollinearMagnetizationDataManager_base { + readonly name: "nonCollinearMagnetization"; + readonly domain: "important"; + readonly entityName: "unit"; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): NonCollinearMagnetizationDataManager; readonly isStartingMagnetization: boolean; readonly isConstrainedMagnetization: boolean; readonly isExistingChargeDensity: boolean; @@ -20,7 +22,7 @@ export default class NonCollinearMagnetizationContextProvider extends NonColline readonly constrainedMagnetization: Data["constrainedMagnetization"]; readonly jsonSchema: JSONSchema7 | undefined; private readonly uniqueElementsWithLabels; - constructor(contextItem: ContextItem, externalContext: ExternalContext); + constructor(contextItem: Partial, externalContext: ExternalContext); getDefaultData(): Data; get uiSchemaStyled(): { isExistingChargeDensity: {}; diff --git a/dist/js/context/providers/NonCollinearMagnetizationContextProvider.js b/dist/js/context/providers/NonCollinearMagnetizationDataManager.js similarity index 66% rename from dist/js/context/providers/NonCollinearMagnetizationContextProvider.js rename to dist/js/context/providers/NonCollinearMagnetizationDataManager.js index 79c16f9d..5cb68c1b 100644 --- a/dist/js/context/providers/NonCollinearMagnetizationContextProvider.js +++ b/dist/js/context/providers/NonCollinearMagnetizationDataManager.js @@ -6,13 +6,35 @@ Object.defineProperty(exports, "__esModule", { value: true }); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); const MaterialContextMixin_1 = __importDefault(require("../mixins/MaterialContextMixin")); const JSONSchemaDataProvider_1 = __importDefault(require("./base/JSONSchemaDataProvider")); +const defaultData = { + isExistingChargeDensity: false, + isStartingMagnetization: true, + isConstrainedMagnetization: false, + isArbitrarySpinAngle: false, + isArbitrarySpinDirection: false, + isFixedMagnetization: false, + lforcet: true, + value: 0.0, + angle1: 0.0, + angle2: 0.0, + constrainType: "atomic direction", + lambda: 0.0, + fixedMagnetizationX: 0.0, + fixedMagnetizationY: 0.0, + fixedMagnetizationZ: 0.0, +}; const jsonSchemaId = "context-providers-directory/non-collinear-magnetization-context-provider"; -class NonCollinearMagnetizationContextProvider extends JSONSchemaDataProvider_1.default { +class NonCollinearMagnetizationDataManager extends JSONSchemaDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "nonCollinearMagnetization"); + return new NonCollinearMagnetizationDataManager(contextItem, externalContext); + } constructor(contextItem, externalContext) { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; super(contextItem, externalContext); this.name = "nonCollinearMagnetization"; this.domain = "important"; + this.entityName = "unit"; this.initMaterialContextMixin(externalContext); this.isStartingMagnetization = (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.isStartingMagnetization) !== null && _b !== void 0 ? _b : true; this.isConstrainedMagnetization = (_d = (_c = this.data) === null || _c === void 0 ? void 0 : _c.isConstrainedMagnetization) !== null && _d !== void 0 ? _d : false; @@ -27,17 +49,17 @@ class NonCollinearMagnetizationContextProvider extends JSONSchemaDataProvider_1. ...new Set(((_p = (_o = this.material) === null || _o === void 0 ? void 0 : _o.Basis) === null || _p === void 0 ? void 0 : _p.elementsWithLabelsArray) || []), ]; this.jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(jsonSchemaId, { - isExistingChargeDensity: { default: false }, - isStartingMagnetization: { default: true }, - isArbitrarySpinAngle: { default: false }, - isConstrainedMagnetization: { default: false }, - isFixedMagnetization: { default: true }, + isExistingChargeDensity: { default: defaultData.isExistingChargeDensity }, + isStartingMagnetization: { default: defaultData.isStartingMagnetization }, + isArbitrarySpinAngle: { default: defaultData.isArbitrarySpinAngle }, + isConstrainedMagnetization: { default: defaultData.isConstrainedMagnetization }, + isFixedMagnetization: { default: defaultData.isFixedMagnetization }, startingMagnetization: { minItems: this.uniqueElementsWithLabels.length, maxItems: this.uniqueElementsWithLabels.length, }, "startingMagnetization.items.properties.value": { - default: 0.0, + default: defaultData.value, minimum: -1.0, maximum: 1.0, }, @@ -45,15 +67,15 @@ class NonCollinearMagnetizationContextProvider extends JSONSchemaDataProvider_1. minItems: this.uniqueElementsWithLabels.length, maxItems: this.uniqueElementsWithLabels.length, }, - "spinAngles.items.properties.angle1": { default: 0.0 }, - "spinAngles.items.properties.angle2": { default: 0.0 }, + "spinAngles.items.properties.angle1": { default: defaultData.angle1 }, + "spinAngles.items.properties.angle2": { default: defaultData.angle2 }, "constrainedMagnetization.properties.constrainType": { - default: "atomic direction", + default: defaultData.constrainType, }, - "constrainedMagnetization.properties.lambda": { default: 0.0 }, - "fixedMagnetization.properties.x": { default: 0.0 }, - "fixedMagnetization.properties.y": { default: 0.0 }, - "fixedMagnetization.properties.z": { default: 0.0 }, + "constrainedMagnetization.properties.lambda": { default: defaultData.lambda }, + "fixedMagnetization.properties.x": { default: defaultData.fixedMagnetizationX }, + "fixedMagnetization.properties.y": { default: defaultData.fixedMagnetizationY }, + "fixedMagnetization.properties.z": { default: defaultData.fixedMagnetizationZ }, }); } getDefaultData() { @@ -61,35 +83,35 @@ class NonCollinearMagnetizationContextProvider extends JSONSchemaDataProvider_1. return { index: index + 1, atomicSpecies: element, - value: 0.0, + value: defaultData.value, }; }); const spinAngles = this.uniqueElementsWithLabels.map((element, index) => { return { index: index + 1, atomicSpecies: element, - angle1: 0.0, - angle2: 0.0, + angle1: defaultData.angle1, + angle2: defaultData.angle2, }; }); return { - isExistingChargeDensity: false, - isStartingMagnetization: true, - isConstrainedMagnetization: false, - isArbitrarySpinAngle: false, - isArbitrarySpinDirection: false, - isFixedMagnetization: false, - lforcet: true, + isExistingChargeDensity: defaultData.isExistingChargeDensity, + isStartingMagnetization: defaultData.isStartingMagnetization, + isConstrainedMagnetization: defaultData.isConstrainedMagnetization, + isArbitrarySpinAngle: defaultData.isArbitrarySpinAngle, + isArbitrarySpinDirection: defaultData.isArbitrarySpinDirection, + isFixedMagnetization: defaultData.isFixedMagnetization, + lforcet: defaultData.lforcet, spinAngles, startingMagnetization, constrainedMagnetization: { - lambda: 0.0, - constrainType: "atomic direction", + lambda: defaultData.lambda, + constrainType: defaultData.constrainType, }, fixedMagnetization: { - x: 0.0, - y: 0.0, - z: 0.0, + x: defaultData.fixedMagnetizationX, + y: defaultData.fixedMagnetizationY, + z: defaultData.fixedMagnetizationZ, }, }; } @@ -151,5 +173,5 @@ class NonCollinearMagnetizationContextProvider extends JSONSchemaDataProvider_1. }; } } -exports.default = NonCollinearMagnetizationContextProvider; -(0, MaterialContextMixin_1.default)(NonCollinearMagnetizationContextProvider.prototype); +exports.default = NonCollinearMagnetizationDataManager; +(0, MaterialContextMixin_1.default)(NonCollinearMagnetizationDataManager.prototype); diff --git a/dist/js/context/providers/PlanewaveCutoffDataManager.d.ts b/dist/js/context/providers/PlanewaveCutoffDataManager.d.ts new file mode 100644 index 00000000..c8bfdcc5 --- /dev/null +++ b/dist/js/context/providers/PlanewaveCutoffDataManager.d.ts @@ -0,0 +1,27 @@ +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { CutoffsContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import { type ApplicationContextMixin, type ApplicationExternalContext } from "../mixins/ApplicationContextMixin"; +import ContextProvider, { type BaseExternalContext, type UnitContext } from "./base/ContextProvider"; +type Schema = CutoffsContextItemSchema; +type PlanewaveExternalContext = BaseExternalContext & ApplicationExternalContext; +type Base = typeof ContextProvider & Constructor; +declare const PlanewaveCutoffDataManager_base: Base; +export default class PlanewaveCutoffDataManager extends PlanewaveCutoffDataManager_base { + readonly name: "cutoffs"; + readonly domain: "important"; + readonly entityName: "subworkflow"; + readonly jsonSchema: JSONSchema7 | undefined; + readonly uiSchema: { + readonly wavefunction: {}; + readonly density: {}; + }; + readonly extraData: {}; + static createFromUnitContext(unitContext: UnitContext, externalContext: PlanewaveExternalContext): PlanewaveCutoffDataManager; + constructor(contextItem: Partial, externalContext: PlanewaveExternalContext); + getDefaultData(): { + wavefunction: number | undefined; + density: number | undefined; + }; +} +export {}; diff --git a/dist/js/context/providers/PlanewaveCutoffDataManager.js b/dist/js/context/providers/PlanewaveCutoffDataManager.js new file mode 100644 index 00000000..880a21ca --- /dev/null +++ b/dist/js/context/providers/PlanewaveCutoffDataManager.js @@ -0,0 +1,65 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); +const ApplicationContextMixin_1 = __importDefault(require("../mixins/ApplicationContextMixin")); +const ContextProvider_1 = __importDefault(require("./base/ContextProvider")); +// Type guard to check if a string is a valid ApplicationName +function isApplicationName(name) { + return name === "vasp" || name === "espresso"; +} +// TODO: create a task to move this handling to standata +const cutoffConfig = { + vasp: { wavefunction: undefined, density: undefined }, + espresso: { wavefunction: 40, density: 200 }, +}; +const defaultData = { + wavefunction: undefined, + density: undefined, +}; +const jsonSchemaId = "context-providers-directory/planewave-cutoffs-context-provider"; +class PlanewaveCutoffDataManager extends ContextProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "cutoffs"); + return new PlanewaveCutoffDataManager(contextItem, externalContext); + } + constructor(contextItem, externalContext) { + super(contextItem, externalContext); + this.name = "cutoffs"; + this.domain = "important"; + this.entityName = "subworkflow"; + this.uiSchema = { + wavefunction: {}, + density: {}, + }; + this.extraData = {}; + this.initApplicationContextMixin(externalContext); + const { wavefunction, density } = this.getDefaultData(); + this.jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(jsonSchemaId, { + wavefunction: { default: wavefunction }, + density: { default: density }, + }); + } + getDefaultData() { + const applicationName = this.application.name; + // Type-safe check: ensure application name is valid and exists in config + if (!isApplicationName(applicationName)) { + // Fallback to default values if application is not supported + return defaultData; + } + const config = cutoffConfig[applicationName]; + if (!config) { + // Fallback to default values if application is not in cutoffConfig + return defaultData; + } + const { wavefunction, density } = config; + return { + wavefunction: wavefunction !== null && wavefunction !== void 0 ? wavefunction : defaultData.wavefunction, + density: density !== null && density !== void 0 ? density : defaultData.density, + }; + } +} +exports.default = PlanewaveCutoffDataManager; +(0, ApplicationContextMixin_1.default)(PlanewaveCutoffDataManager.prototype); diff --git a/dist/js/context/providers/PlanewaveCutoffsContextProvider.d.ts b/dist/js/context/providers/PlanewaveCutoffsContextProvider.d.ts deleted file mode 100644 index 22b39a64..00000000 --- a/dist/js/context/providers/PlanewaveCutoffsContextProvider.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { PlanewaveCutoffsContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import { type ApplicationContextMixin } from "../mixins/ApplicationContextMixin"; -import ContextProvider, { type ContextItem, type Domain, type EntityName, type ExternalContext } from "./base/ContextProvider"; -type Name = "cutoffs"; -type Data = PlanewaveCutoffsContextProviderSchema; -type PlanewaveExternalContext = ExternalContext & ApplicationContextMixin; -type Base = typeof ContextProvider & Constructor; -declare const PlanewaveCutoffsContextProvider_base: Base; -export default class PlanewaveCutoffsContextProvider extends PlanewaveCutoffsContextProvider_base { - readonly name: Name; - readonly domain: Domain; - readonly entityName: EntityName; - readonly jsonSchema: JSONSchema7 | undefined; - readonly uiSchema: { - wavefunction: {}; - density: {}; - }; - constructor(contextItem: ContextItem, externalContext: PlanewaveExternalContext); - getDefaultData(): { - wavefunction: number | undefined; - density: number | undefined; - }; -} -export {}; diff --git a/dist/js/context/providers/PlanewaveCutoffsContextProvider.js b/dist/js/context/providers/PlanewaveCutoffsContextProvider.js deleted file mode 100644 index 643cc145..00000000 --- a/dist/js/context/providers/PlanewaveCutoffsContextProvider.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); -const ApplicationContextMixin_1 = require("../mixins/ApplicationContextMixin"); -const ContextProvider_1 = __importDefault(require("./base/ContextProvider")); -const cutoffConfig = { - vasp: { wavefunction: undefined, density: undefined }, - espresso: { wavefunction: 40, density: 200 }, -}; -const jsonSchemaId = "context-providers-directory/planewave-cutoffs-context-provider"; -class PlanewaveCutoffsContextProvider extends ContextProvider_1.default { - constructor(contextItem, externalContext) { - super(contextItem, externalContext); - this.name = "cutoffs"; - this.domain = "important"; - this.entityName = "subworkflow"; - this.uiSchema = { - wavefunction: {}, - density: {}, - }; - this.initApplicationContextMixin(externalContext); - const { wavefunction, density } = this.getDefaultData(); - this.jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(jsonSchemaId, { - wavefunction: { default: wavefunction }, - density: { default: density }, - }); - } - getDefaultData() { - // TODO-QUESTION: what if the application is not in the cutoffConfig? - const { wavefunction, density } = cutoffConfig[this.application.name] || {}; - return { - wavefunction, - density, - }; - } -} -exports.default = PlanewaveCutoffsContextProvider; -(0, ApplicationContextMixin_1.applicationContextMixin)(PlanewaveCutoffsContextProvider.prototype); diff --git a/dist/js/context/providers/PointsGrid/IGridFormDataManager.d.ts b/dist/js/context/providers/PointsGrid/IGridFormDataManager.d.ts index eceea505..feb2cbe3 100644 --- a/dist/js/context/providers/PointsGrid/IGridFormDataManager.d.ts +++ b/dist/js/context/providers/PointsGrid/IGridFormDataManager.d.ts @@ -1,7 +1,14 @@ -import PointsGridFormDataProvider from "./PointsGridFormDataProvider"; +import type { GridContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import type { UnitContext } from "../base/ContextProvider"; +import PointsGridFormDataProvider, { type ExternalContext } from "./PointsGridFormDataProvider"; type Name = "igrid"; +type Schema = GridContextItemSchema; export default class IGridFormDataManager extends PointsGridFormDataProvider { - readonly name: Name; - readonly divisor: number; + readonly name: "igrid"; + readonly divisor: 0.2; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(contextItem: Partial, externalContext: ExternalContext); + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): IGridFormDataManager; } export {}; diff --git a/dist/js/context/providers/PointsGrid/IGridFormDataManager.js b/dist/js/context/providers/PointsGrid/IGridFormDataManager.js index 3d13f9aa..5a8095a8 100644 --- a/dist/js/context/providers/PointsGrid/IGridFormDataManager.js +++ b/dist/js/context/providers/PointsGrid/IGridFormDataManager.js @@ -3,12 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); +const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); const PointsGridFormDataProvider_1 = __importDefault(require("./PointsGridFormDataProvider")); class IGridFormDataManager extends PointsGridFormDataProvider_1.default { - constructor() { - super(...arguments); + constructor(contextItem, externalContext) { + super(contextItem, externalContext); this.name = "igrid"; this.divisor = 0.2; + this.jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(this.jsonSchemaId, this.jsonSchemaPatchConfig); + } + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "igrid"); + return new IGridFormDataManager(contextItem, externalContext); } } exports.default = IGridFormDataManager; diff --git a/dist/js/context/providers/PointsGrid/KGridFormDataManager.d.ts b/dist/js/context/providers/PointsGrid/KGridFormDataManager.d.ts index e23b1f43..073292b8 100644 --- a/dist/js/context/providers/PointsGrid/KGridFormDataManager.d.ts +++ b/dist/js/context/providers/PointsGrid/KGridFormDataManager.d.ts @@ -1,6 +1,16 @@ -import PointsGridFormDataProvider from "./PointsGridFormDataProvider"; +import type { GridContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import ConvergenceParameter from "../../../convergence/ConvergenceParameter"; +import type { UnitContext } from "../base/ContextProvider"; +import PointsGridFormDataProvider, { type ExternalContext } from "./PointsGridFormDataProvider"; type Name = "kgrid"; +type Schema = GridContextItemSchema; export default class KGridFormDataManager extends PointsGridFormDataProvider { - readonly name: Name; + readonly name: "kgrid"; + readonly divisor: 1; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(contextItem: Partial, externalContext: ExternalContext); + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): KGridFormDataManager; + applyConvergenceParameter(parameter: ConvergenceParameter): void; } export {}; diff --git a/dist/js/context/providers/PointsGrid/KGridFormDataManager.js b/dist/js/context/providers/PointsGrid/KGridFormDataManager.js index 991c2ee4..f6546b08 100644 --- a/dist/js/context/providers/PointsGrid/KGridFormDataManager.js +++ b/dist/js/context/providers/PointsGrid/KGridFormDataManager.js @@ -3,11 +3,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); +const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); const PointsGridFormDataProvider_1 = __importDefault(require("./PointsGridFormDataProvider")); class KGridFormDataManager extends PointsGridFormDataProvider_1.default { - constructor() { - super(...arguments); + constructor(contextItem, externalContext) { + super(contextItem, externalContext); this.name = "kgrid"; + this.divisor = 1; + this.jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(this.jsonSchemaId, this.jsonSchemaPatchConfig); + } + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "kgrid"); + return new KGridFormDataManager(contextItem, externalContext); + } + applyConvergenceParameter(parameter) { + const unitContext = parameter.unitContext.data; + const data = this.getData(); + this.setData({ + ...data, + ...unitContext, + }); + this.setIsEdited(true); } } exports.default = KGridFormDataManager; diff --git a/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.d.ts b/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.d.ts index dc33023b..a08c303a 100644 --- a/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.d.ts +++ b/dist/js/context/providers/PointsGrid/PointsGridFormDataProvider.d.ts @@ -1,60 +1,118 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { PointsGridDataProviderSchema, Vector3DSchema } from "@mat3ra/esse/dist/js/types"; +import type { GridContextItemSchema, PointsGridDataProviderSchema } from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; import { type MaterialContextMixin, type MaterialExternalContext } from "../../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "../base/ContextProvider"; import type { JinjaExternalContext } from "../base/JSONSchemaDataProvider"; import JSONSchemaFormDataProvider from "../base/JSONSchemaFormDataProvider"; -type Name = string; +type Schema = GridContextItemSchema; type Data = PointsGridDataProviderSchema; -type EContext = JinjaExternalContext & MaterialExternalContext & { - divisor: number; -}; -type Base = typeof JSONSchemaFormDataProvider & Constructor; +export type ExternalContext = JinjaExternalContext & MaterialExternalContext; +type Base = typeof JSONSchemaFormDataProvider & Constructor; declare const PointsGridFormDataProvider_base: Base; -export default abstract class PointsGridFormDataProvider extends PointsGridFormDataProvider_base { +export default abstract class PointsGridFormDataProvider extends PointsGridFormDataProvider_base { abstract readonly name: N; - readonly domain: Domain; - dimensions: Vector3DSchema; - shifts: Vector3DSchema; + readonly domain: "important"; + readonly entityName: "unit"; + readonly jsonSchemaId = "context-providers-directory/points-grid-data-provider"; + dimensions: Data["dimensions"]; + shifts: Data["shifts"]; private reciprocalLattice; private gridMetricType; private gridMetricValue; private preferGridMetric; private defaultDimensions; private reciprocalVectorRatios; + abstract readonly divisor: number; private defaultMetric; - readonly jsonSchema: JSONSchema7 | undefined; - constructor(contextItem: ContextItem, externalContext: EContext); + abstract readonly jsonSchema: JSONSchema7 | undefined; + constructor(contextItem: Partial, externalContext: ExternalContext); private initInstanceFields; private getDefaultGridMetricValue; getDefaultData(): PointsGridDataProviderSchema; - private get jsonSchemaPatchConfig(); - get uiSchema(): { + protected get jsonSchemaPatchConfig(): { dimensions: { - "ui:options": { - addable: boolean; - orderable: boolean; - removable: boolean; - }; + default?: any[] | undefined; + type: string; items: { - "ui:disabled": boolean; - "ui:placeholder": string; - "ui:emptyValue": number; - "ui:label": boolean; + default?: string | number | readonly string[] | readonly number[] | undefined; + type: string; }; + minItems: number; + maxItems: number; }; shifts: { - "ui:options": { - addable: boolean; - orderable: boolean; - removable: boolean; + default?: any[] | undefined; + type: string; + items: { + default?: string | number | readonly string[] | readonly number[] | undefined; + type: string; }; + minItems: number; + maxItems: number; + }; + reciprocalVectorRatios: { + default?: any[] | undefined; + type: string; items: { - "ui:disabled": boolean; - "ui:placeholder": string; - "ui:emptyValue": number; - "ui:label": boolean; + default?: string | number | readonly string[] | readonly number[] | undefined; + type: string; + }; + minItems: number; + maxItems: number; + }; + gridMetricType: { + default: "KPPRA" | "spacing"; + }; + description: string; + required: string[]; + dependencies: { + gridMetricType: { + oneOf: { + properties: { + gridMetricType: { + enum: string[]; + }; + gridMetricValue: { + type: string; + minimum: number; + title: string; + default: number; + }; + preferGridMetric: { + type: string; + title: string; + default: boolean; + }; + }; + }[]; + }; + }; + }; + get uiSchema(): { + dimensions: { + readonly "ui:options": { + readonly addable: false; + readonly orderable: false; + readonly removable: false; + }; + readonly items: { + readonly "ui:disabled": boolean; + readonly "ui:placeholder": "1"; + readonly "ui:emptyValue": number; + readonly "ui:label": false; + }; + }; + shifts: { + readonly "ui:options": { + readonly addable: false; + readonly orderable: false; + readonly removable: false; + }; + readonly items: { + readonly "ui:disabled": boolean; + readonly "ui:placeholder": "1"; + readonly "ui:emptyValue": number; + readonly "ui:label": false; }; }; gridMetricType: { @@ -81,6 +139,6 @@ export default abstract class PointsGridFormDataProvider { const isArray = Array.isArray(defaultValue); return { @@ -25,20 +22,19 @@ const vector = (defaultValue, isStringType = false) => { ...(isArray ? { default: defaultValue } : {}), }; }; -const jsonSchemaId = "context-providers-directory/points-grid-data-provider"; const defaultShift = 0; const defaultShifts = [defaultShift, defaultShift, defaultShift]; class PointsGridFormDataProvider extends JSONSchemaFormDataProvider_1.default { constructor(contextItem, externalContext) { super(contextItem, externalContext); this.domain = "important"; + this.entityName = "unit"; + this.jsonSchemaId = "context-providers-directory/points-grid-data-provider"; this.initMaterialContextMixin(externalContext); this.initInstanceFields(); - const { jsonSchemaPatchConfig } = this; - this.jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(jsonSchemaId, jsonSchemaPatchConfig); } initInstanceFields() { - var _a, _b, _c, _d, _e, _f; + var _a, _b, _c, _d, _e; this.defaultMetric = { type: "KPPRA", value: this.getDefaultGridMetricValue("KPPRA"), @@ -47,22 +43,15 @@ class PointsGridFormDataProvider extends JSONSchemaFormDataProvider_1.default { this.gridMetricType = ((_b = this.data) === null || _b === void 0 ? void 0 : _b.gridMetricType) || this.defaultMetric.type; this.gridMetricValue = ((_c = this.data) === null || _c === void 0 ? void 0 : _c.gridMetricValue) || this.defaultMetric.value; this.preferGridMetric = ((_d = this.data) === null || _d === void 0 ? void 0 : _d.preferGridMetric) || false; - this.reciprocalLattice = new made_1.Made.ReciprocalLattice((_e = this.material) === null || _e === void 0 ? void 0 : _e.lattice); - this.defaultDimensions = this.calculateDimensions({ - gridMetricType: this.defaultMetric.type, - gridMetricValue: this.defaultMetric.value, - }); - this.dimensions = ((_f = this.data) === null || _f === void 0 ? void 0 : _f.dimensions) || this.defaultDimensions; + this.reciprocalLattice = new made_1.Made.ReciprocalLattice(this.material.lattice); + this.defaultDimensions = this.calculateDimensions(this.defaultMetric.type, this.defaultMetric.value); + this.dimensions = ((_e = this.data) === null || _e === void 0 ? void 0 : _e.dimensions) || this.defaultDimensions; this.reciprocalVectorRatios = this.reciprocalLattice.reciprocalVectorRatios.map((r) => Number(math_1.math.numberToPrecision(r, 3))); } getDefaultGridMetricValue(metric) { - var _a; switch (metric) { - case "KPPRA": { - const divisor = ((_a = this.externalContext) === null || _a === void 0 ? void 0 : _a.divisor) || 1; - const { defaultKPPRA } = settings_1.globalSettings; - return Math.floor(defaultKPPRA / divisor); - } + case "KPPRA": + return Math.floor(settings_1.globalSettings.defaultKPPRA / this.divisor); case "spacing": return 0.3; default: @@ -84,7 +73,7 @@ class PointsGridFormDataProvider extends JSONSchemaFormDataProvider_1.default { // if `data` is present and material is updated, prioritize `data` when `preferGridMetric` is not set return this.preferGridMetric ? { - dimensions: this.calculateDimensions({ gridMetricType, gridMetricValue }), + dimensions: this.calculateDimensions(gridMetricType, gridMetricValue), shifts: defaultShifts, gridMetricType, gridMetricValue, @@ -190,7 +179,7 @@ class PointsGridFormDataProvider extends JSONSchemaFormDataProvider_1.default { }, }; } - calculateDimensions({ gridMetricType, gridMetricValue, }) { + calculateDimensions(gridMetricType, gridMetricValue) { switch (gridMetricType) { case "KPPRA": { const nAtoms = this.material ? this.material.Basis.nAtoms : 1; @@ -202,36 +191,35 @@ class PointsGridFormDataProvider extends JSONSchemaFormDataProvider_1.default { return [1, 1, 1]; } } - calculateGridMetric({ gridMetricType, dimensions, }) { + calculateGridMetric(gridMetricType, dimensions) { switch (gridMetricType) { case "KPPRA": { const nAtoms = this.material ? this.material.Basis.nAtoms : 1; return dimensions.reduce((a, b) => a * b) * nAtoms; } case "spacing": - return lodash_1.default.round(this.reciprocalLattice.getSpacingFromDimensions(dimensions, constants_1.Units.angstrom), 3); + return Number(this.reciprocalLattice + .getSpacingFromDimensions(dimensions, constants_1.Units.angstrom) + .toFixed(3)); default: return 1; } } setData(data) { - var _a; - const canTransform = ((data === null || data === void 0 ? void 0 : data.preferGridMetric) && (data === null || data === void 0 ? void 0 : data.gridMetricType) && (data === null || data === void 0 ? void 0 : data.gridMetricValue)) || - (!(data === null || data === void 0 ? void 0 : data.preferGridMetric) && ((_a = data === null || data === void 0 ? void 0 : data.dimensions) === null || _a === void 0 ? void 0 : _a.every((d) => typeof d === "number"))); - if (!data || !canTransform) { - return super.setData(data); - } - // dimensions are calculated from grid metric or vice versa - if (data.preferGridMetric) { + const { dimensions, gridMetricType, preferGridMetric, gridMetricValue } = data; + if (preferGridMetric && gridMetricType && gridMetricValue) { return super.setData({ ...data, - dimensions: this.calculateDimensions(data), + dimensions: this.calculateDimensions(gridMetricType, gridMetricValue), + }); + } + if (!preferGridMetric && dimensions.every((d) => typeof d === "number")) { + super.setData({ + ...data, + gridMetricValue: this.calculateGridMetric(gridMetricType, dimensions), }); } - super.setData({ - ...data, - gridMetricValue: this.calculateGridMetric(data), - }); + return super.setData(data); } } exports.default = PointsGridFormDataProvider; diff --git a/dist/js/context/providers/PointsGrid/QGridFormDataManager.d.ts b/dist/js/context/providers/PointsGrid/QGridFormDataManager.d.ts index da727057..a13c4b1e 100644 --- a/dist/js/context/providers/PointsGrid/QGridFormDataManager.d.ts +++ b/dist/js/context/providers/PointsGrid/QGridFormDataManager.d.ts @@ -1,7 +1,14 @@ -import PointsGridFormDataProvider from "./PointsGridFormDataProvider"; +import type { GridContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import type { UnitContext } from "../base/ContextProvider"; +import PointsGridFormDataProvider, { type ExternalContext } from "./PointsGridFormDataProvider"; type Name = "qgrid"; +type Schema = GridContextItemSchema; export default class QGridFormDataManager extends PointsGridFormDataProvider { - readonly name: Name; - readonly divisor: number; + readonly name: "qgrid"; + readonly divisor: 5; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(contextItem: Partial, externalContext: ExternalContext); + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): QGridFormDataManager; } export {}; diff --git a/dist/js/context/providers/PointsGrid/QGridFormDataManager.js b/dist/js/context/providers/PointsGrid/QGridFormDataManager.js index 6d38fe7d..cb74bb23 100644 --- a/dist/js/context/providers/PointsGrid/QGridFormDataManager.js +++ b/dist/js/context/providers/PointsGrid/QGridFormDataManager.js @@ -3,12 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); +const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); const PointsGridFormDataProvider_1 = __importDefault(require("./PointsGridFormDataProvider")); class QGridFormDataManager extends PointsGridFormDataProvider_1.default { - constructor() { - super(...arguments); + constructor(contextItem, externalContext) { + super(contextItem, externalContext); this.name = "qgrid"; this.divisor = 5; + this.jsonSchema = JSONSchemasInterface_1.default.getPatchedSchemaById(this.jsonSchemaId, this.jsonSchemaPatchConfig); + } + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "qgrid"); + return new QGridFormDataManager(contextItem, externalContext); } } exports.default = QGridFormDataManager; diff --git a/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.d.ts b/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.d.ts index 9470d2cd..000b83d1 100644 --- a/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.d.ts +++ b/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.d.ts @@ -1,8 +1,10 @@ -import PointsPathFormDataProvider from "./PointsPathFormDataProvider"; +import type { UnitContext } from "../base/ContextProvider"; +import PointsPathFormDataProvider, { type PointsPathFormDataProviderExternalContext } from "./PointsPathFormDataProvider"; type Name = "explicitKPath2PIBA"; export default class ExplicitKPath2PIBAFormDataManager extends PointsPathFormDataProvider { - readonly name: Name; + readonly name: "explicitKPath2PIBA"; readonly is2PIBA = true; readonly useExplicitPath = true; + static createFromUnitContext(unitContext: UnitContext, externalContext: PointsPathFormDataProviderExternalContext): ExplicitKPath2PIBAFormDataManager; } export {}; diff --git a/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.js b/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.js index 1c6653b3..4f478b11 100644 --- a/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.js +++ b/dist/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.js @@ -11,5 +11,9 @@ class ExplicitKPath2PIBAFormDataManager extends PointsPathFormDataProvider_1.def this.is2PIBA = true; this.useExplicitPath = true; } + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "explicitKPath2PIBA"); + return new ExplicitKPath2PIBAFormDataManager(contextItem, externalContext); + } } exports.default = ExplicitKPath2PIBAFormDataManager; diff --git a/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.d.ts b/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.d.ts index 64c6a064..493eac26 100644 --- a/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.d.ts +++ b/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.d.ts @@ -1,7 +1,9 @@ -import PointsPathFormDataProvider from "./PointsPathFormDataProvider"; +import type { UnitContext } from "../base/ContextProvider"; +import PointsPathFormDataProvider, { type PointsPathFormDataProviderExternalContext } from "./PointsPathFormDataProvider"; type Name = "explicitKPath"; export default class ExplicitKPathFormDataManager extends PointsPathFormDataProvider { - readonly name: Name; + readonly name: "explicitKPath"; readonly useExplicitPath = true; + static createFromUnitContext(unitContext: UnitContext, externalContext: PointsPathFormDataProviderExternalContext): ExplicitKPathFormDataManager; } export {}; diff --git a/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.js b/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.js index 76c930bd..eaaff96e 100644 --- a/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.js +++ b/dist/js/context/providers/PointsPath/ExplicitKPathFormDataManager.js @@ -10,5 +10,9 @@ class ExplicitKPathFormDataManager extends PointsPathFormDataProvider_1.default this.name = "explicitKPath"; this.useExplicitPath = true; } + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "explicitKPath"); + return new ExplicitKPathFormDataManager(contextItem, externalContext); + } } exports.default = ExplicitKPathFormDataManager; diff --git a/dist/js/context/providers/PointsPath/IPathFormDataManager.d.ts b/dist/js/context/providers/PointsPath/IPathFormDataManager.d.ts index e756e575..44cfa2ca 100644 --- a/dist/js/context/providers/PointsPath/IPathFormDataManager.d.ts +++ b/dist/js/context/providers/PointsPath/IPathFormDataManager.d.ts @@ -1,6 +1,8 @@ -import PointsPathFormDataProvider from "./PointsPathFormDataProvider"; +import type { UnitContext } from "../base/ContextProvider"; +import PointsPathFormDataProvider, { type PointsPathFormDataProviderExternalContext } from "./PointsPathFormDataProvider"; type Name = "ipath"; export default class IPathFormDataManager extends PointsPathFormDataProvider { - readonly name: Name; + readonly name: "ipath"; + static createFromUnitContext(unitContext: UnitContext, externalContext: PointsPathFormDataProviderExternalContext): IPathFormDataManager; } export {}; diff --git a/dist/js/context/providers/PointsPath/IPathFormDataManager.js b/dist/js/context/providers/PointsPath/IPathFormDataManager.js index a1011782..0c2bcd1c 100644 --- a/dist/js/context/providers/PointsPath/IPathFormDataManager.js +++ b/dist/js/context/providers/PointsPath/IPathFormDataManager.js @@ -9,5 +9,9 @@ class IPathFormDataManager extends PointsPathFormDataProvider_1.default { super(...arguments); this.name = "ipath"; } + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "ipath"); + return new IPathFormDataManager(contextItem, externalContext); + } } exports.default = IPathFormDataManager; diff --git a/dist/js/context/providers/PointsPath/KPathFormDataManager.d.ts b/dist/js/context/providers/PointsPath/KPathFormDataManager.d.ts index cc3b49be..1d8a59bd 100644 --- a/dist/js/context/providers/PointsPath/KPathFormDataManager.d.ts +++ b/dist/js/context/providers/PointsPath/KPathFormDataManager.d.ts @@ -1,6 +1,8 @@ -import PointsPathFormDataProvider from "./PointsPathFormDataProvider"; +import type { UnitContext } from "../base/ContextProvider"; +import PointsPathFormDataProvider, { type PointsPathFormDataProviderExternalContext } from "./PointsPathFormDataProvider"; type Name = "kpath"; export default class KPathFormDataManager extends PointsPathFormDataProvider { - readonly name: Name; + readonly name: "kpath"; + static createFromUnitContext(unitContext: UnitContext, externalContext: PointsPathFormDataProviderExternalContext): KPathFormDataManager; } export {}; diff --git a/dist/js/context/providers/PointsPath/KPathFormDataManager.js b/dist/js/context/providers/PointsPath/KPathFormDataManager.js index fe70575f..30119999 100644 --- a/dist/js/context/providers/PointsPath/KPathFormDataManager.js +++ b/dist/js/context/providers/PointsPath/KPathFormDataManager.js @@ -9,5 +9,9 @@ class KPathFormDataManager extends PointsPathFormDataProvider_1.default { super(...arguments); this.name = "kpath"; } + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "kpath"); + return new KPathFormDataManager(contextItem, externalContext); + } } exports.default = KPathFormDataManager; diff --git a/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.d.ts b/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.d.ts index 3c00fee8..70f43261 100644 --- a/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.d.ts +++ b/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.d.ts @@ -1,23 +1,26 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { PointsPathDataProviderSchema } from "@mat3ra/esse/dist/js/types"; -import { type ApplicationContextMixin } from "../../mixins/ApplicationContextMixin"; +import type { PathContextItemSchema, PointsPathDataProviderSchema } from "@mat3ra/esse/dist/js/types"; +import { type ApplicationContextMixin, type ApplicationExternalContext } from "../../mixins/ApplicationContextMixin"; import { type MaterialContextMixin, type MaterialExternalContext } from "../../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "../base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext } from "../base/JSONSchemaDataProvider"; -type Data = PointsPathDataProviderSchema; -type ExternalContext = JinjaExternalContext & MaterialExternalContext & ApplicationContextMixin; -type Base = typeof JSONSchemaDataProvider & Constructor & Constructor; +export type PointsPathFormDataProviderData = PointsPathDataProviderSchema; +export type PointsPathFormDataProviderExternalContext = JinjaExternalContext & MaterialExternalContext & ApplicationExternalContext; +type Data = PointsPathFormDataProviderData; +type Schema = PathContextItemSchema; +type ExternalContext = PointsPathFormDataProviderExternalContext; +type Base = typeof JSONSchemaDataProvider & Constructor & Constructor; declare const MixinsContextProvider_base: Base; declare abstract class MixinsContextProvider extends MixinsContextProvider_base { - constructor(contextItem: ContextItem, externalContext: ExternalContext); + constructor(contextItem: Partial, externalContext: ExternalContext); } -declare abstract class PointsPathFormDataProvider extends MixinsContextProvider { +declare abstract class PointsPathFormDataProvider extends MixinsContextProvider { abstract name: N; - readonly domain: Domain; + readonly domain: "important"; + readonly entityName: "unit"; private reciprocalLattice; readonly useExplicitPath: boolean; readonly is2PIBA: boolean; - constructor(config: ContextItem, externalContext: ExternalContext); + constructor(config: Partial, externalContext: ExternalContext); getDefaultData(): Data; updateMaterialHash(): void; get jsonSchema(): import("json-schema").JSONSchema7 | undefined; diff --git a/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.js b/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.js index c84169cd..5acaaa3d 100644 --- a/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.js +++ b/dist/js/context/providers/PointsPath/PointsPathFormDataProvider.js @@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const math_1 = require("@mat3ra/code/dist/js/math"); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); const made_1 = require("@mat3ra/made"); -const underscore_string_1 = __importDefault(require("underscore.string")); -const ApplicationContextMixin_1 = require("../../mixins/ApplicationContextMixin"); +const ApplicationContextMixin_1 = __importDefault(require("../../mixins/ApplicationContextMixin")); const MaterialContextMixin_1 = __importDefault(require("../../mixins/MaterialContextMixin")); const JSONSchemaDataProvider_1 = __importDefault(require("../base/JSONSchemaDataProvider")); const defaultPoint = "Г"; @@ -21,11 +20,12 @@ class MixinsContextProvider extends JSONSchemaDataProvider_1.default { } } (0, MaterialContextMixin_1.default)(MixinsContextProvider.prototype); -(0, ApplicationContextMixin_1.applicationContextMixin)(MixinsContextProvider.prototype); +(0, ApplicationContextMixin_1.default)(MixinsContextProvider.prototype); class PointsPathFormDataProvider extends MixinsContextProvider { constructor(config, externalContext) { super(config, externalContext); this.domain = "important"; + this.entityName = "unit"; this.is2PIBA = false; this.reciprocalLattice = new made_1.Made.ReciprocalLattice(this.material.lattice); this.useExplicitPath = this.application.name === "vasp"; @@ -72,7 +72,7 @@ class PointsPathFormDataProvider extends MixinsContextProvider { : p.coordinates; return { ...p, - coordinates: coordinates.map((c) => +underscore_string_1.default.sprintf("%14.9f", c)), + coordinates: coordinates.map((c) => Number(c.toFixed(9))), }; }); super.setData(newData); @@ -88,7 +88,6 @@ class PointsPathFormDataProvider extends MixinsContextProvider { } const middlePoints = math_1.math.calculateSegmentsBetweenPoints3D(startPoint.coordinates, nextPoint.coordinates, startPoint.steps); const steps = 1; - // TODO-QUESTION: confirm that "point" property should be present after transformation; point was missing in original implementation acc.push({ steps, coordinates: startPoint.coordinates, @@ -96,8 +95,8 @@ class PointsPathFormDataProvider extends MixinsContextProvider { }, ...middlePoints.map((coordinates) => ({ steps, coordinates, - // TODO-QUESTION: is this correct? - point: startPoint.point, + // TODO: make point optional + // point: startPoint.point, }))); // nextPoint is the last point in the path if (path.length - 2 === index) { diff --git a/dist/js/context/providers/PointsPath/QPathFormDataManager.d.ts b/dist/js/context/providers/PointsPath/QPathFormDataManager.d.ts index dcc2e11c..3aca765a 100644 --- a/dist/js/context/providers/PointsPath/QPathFormDataManager.d.ts +++ b/dist/js/context/providers/PointsPath/QPathFormDataManager.d.ts @@ -1,6 +1,8 @@ -import PointsPathFormDataProvider from "./PointsPathFormDataProvider"; +import type { UnitContext } from "../base/ContextProvider"; +import PointsPathFormDataProvider, { type PointsPathFormDataProviderExternalContext } from "./PointsPathFormDataProvider"; type Name = "qpath"; export default class QPathFormDataManager extends PointsPathFormDataProvider { - readonly name: Name; + readonly name: "qpath"; + static createFromUnitContext(unitContext: UnitContext, externalContext: PointsPathFormDataProviderExternalContext): QPathFormDataManager; } export {}; diff --git a/dist/js/context/providers/PointsPath/QPathFormDataManager.js b/dist/js/context/providers/PointsPath/QPathFormDataManager.js index bf0acf10..9c664359 100644 --- a/dist/js/context/providers/PointsPath/QPathFormDataManager.js +++ b/dist/js/context/providers/PointsPath/QPathFormDataManager.js @@ -9,5 +9,9 @@ class QPathFormDataManager extends PointsPathFormDataProvider_1.default { super(...arguments); this.name = "qpath"; } + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "qpath"); + return new QPathFormDataManager(contextItem, externalContext); + } } exports.default = QPathFormDataManager; diff --git a/dist/js/context/providers/base/ContextProvider.d.ts b/dist/js/context/providers/base/ContextProvider.d.ts index 219e43fb..59956bd5 100644 --- a/dist/js/context/providers/base/ContextProvider.d.ts +++ b/dist/js/context/providers/base/ContextProvider.d.ts @@ -1,41 +1,35 @@ -import { ContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -export interface ContextProviderInstance { - constructor: typeof ContextProvider; - config: ContextProviderSchema; -} -export type ContextProviderConfig = { - name: N; - data?: D; - extraData?: ED; - domain?: string; - entityName?: EntityName; - isEdited?: boolean; -}; -export type ContextItem = { +import { type ContextItemSchema } from "@mat3ra/esse/dist/js/types"; +export type UnitContext = ContextItemSchema[]; +export type ContextName = ContextItemSchema["name"]; +export type ContextExtraData = ContextItemSchema["extraData"]; +export type ContextData = ContextItemSchema["data"]; +export type ContextItem = { data?: D; extraData?: ED; isEdited?: boolean; }; -export type ExtendedContextItem = ContextItem & { - name: N; - isEdited: boolean; -}; export type Domain = "executable" | "important"; export type EntityName = "unit" | "subworkflow"; -export type ExternalContext = object; -declare abstract class ContextProvider implements ContextProviderConfig { - abstract name: N; +/** Minimal bound for provider external context; the full contract is ExternalContext in context/providers/index.ts */ +export type BaseExternalContext = object; +declare abstract class ContextProvider { + abstract name: S["name"]; abstract readonly domain: Domain; abstract readonly entityName: EntityName; - protected abstract getDefaultData(): D; - data?: D; - readonly extraData?: ED; + protected abstract getDefaultData(): S["data"]; + protected data?: S["data"]; + abstract extraData: S["extraData"]; readonly externalContext: EC; isEdited: boolean; - constructor(contextItem: ContextItem, externalContext: EC); + constructor(contextItem: Partial, externalContext: EC); setIsEdited(isEdited: boolean): void; - getData(): D; - setData(data?: D): void; - getContextItem(): ExtendedContextItem; + getData(): S["data"]; + setData(data: S["data"]): void; + getContextItemData(): S; + /** + * Helper method to find a context item from a unit context array by name. + * Returns a partial schema object that can be safely passed to constructors. + */ + protected static findContextItem(unitContext: UnitContext, contextName: ContextName): Partial; } export default ContextProvider; diff --git a/dist/js/context/providers/base/ContextProvider.js b/dist/js/context/providers/base/ContextProvider.js index 0966fc2f..127f8e33 100644 --- a/dist/js/context/providers/base/ContextProvider.js +++ b/dist/js/context/providers/base/ContextProvider.js @@ -4,9 +4,10 @@ const utils_1 = require("@mat3ra/utils"); class ContextProvider { constructor(contextItem, externalContext) { this.externalContext = externalContext; - this.extraData = contextItem.extraData; this.isEdited = contextItem.isEdited || false; - this.setData(contextItem.data); + if (contextItem.data) { + this.setData(contextItem.data); + } } setIsEdited(isEdited) { this.isEdited = isEdited; @@ -15,9 +16,9 @@ class ContextProvider { return this.isEdited && this.data ? this.data : this.getDefaultData(); } setData(data) { - this.data = data ? utils_1.Utils.clone.deepClone(data) : undefined; + this.data = utils_1.Utils.clone.deepClone(data); } - getContextItem() { + getContextItemData() { return { name: this.name, isEdited: this.isEdited, @@ -25,5 +26,13 @@ class ContextProvider { extraData: this.extraData, }; } + /** + * Helper method to find a context item from a unit context array by name. + * Returns a partial schema object that can be safely passed to constructors. + */ + static findContextItem(unitContext, contextName) { + const item = unitContext.find((item) => item.name === contextName); + return item || {}; + } } exports.default = ContextProvider; diff --git a/dist/js/context/providers/base/JSONSchemaDataProvider.d.ts b/dist/js/context/providers/base/JSONSchemaDataProvider.d.ts index 8e4d5c0a..a4834134 100644 --- a/dist/js/context/providers/base/JSONSchemaDataProvider.d.ts +++ b/dist/js/context/providers/base/JSONSchemaDataProvider.d.ts @@ -1,16 +1,16 @@ import type { JSONSchema } from "@mat3ra/esse/dist/js/esse/utils"; -import type { ContextItem, EntityName, ExternalContext } from "./ContextProvider"; +import type { ContextItemSchema } from "@mat3ra/esse/dist/js/types"; import ContextProvider from "./ContextProvider"; -export interface JinjaExternalContext extends ExternalContext { +export interface JinjaExternalContext { isUsingJinjaVariables?: boolean; } /** * @summary Provides jsonSchema only. */ -declare abstract class JSONSchemaDataProvider extends ContextProvider { +declare abstract class JSONSchemaDataProvider extends ContextProvider { abstract readonly jsonSchema: JSONSchema | undefined; - readonly entityName: EntityName; + readonly entityName: "unit"; isUsingJinjaVariables: boolean; - constructor(contextItem: ContextItem, externalContext: EC); + constructor(contextItem: Partial, externalContext: EC); } export default JSONSchemaDataProvider; diff --git a/dist/js/context/providers/base/JSONSchemaFormDataProvider.d.ts b/dist/js/context/providers/base/JSONSchemaFormDataProvider.d.ts index ab44f43a..533aaea6 100644 --- a/dist/js/context/providers/base/JSONSchemaFormDataProvider.d.ts +++ b/dist/js/context/providers/base/JSONSchemaFormDataProvider.d.ts @@ -1,3 +1,4 @@ +import type { ContextItemSchema } from "@mat3ra/esse/dist/js/types"; import type { UiSchema } from "react-jsonschema-form"; import JSONSchemaDataProvider, { type JinjaExternalContext } from "./JSONSchemaDataProvider"; /** @@ -10,7 +11,7 @@ import JSONSchemaDataProvider, { type JinjaExternalContext } from "./JSONSchemaD * formData={provider.getData(unit.important)} /> * ``` */ -declare abstract class JSONSchemaFormDataProvider extends JSONSchemaDataProvider { +declare abstract class JSONSchemaFormDataProvider extends JSONSchemaDataProvider { fields: object; protected abstract uiSchema: UiSchema; get uiSchemaStyled(): UiSchema; diff --git a/dist/js/context/providers/by_application/espresso/QENEBContextProvider.d.ts b/dist/js/context/providers/by_application/espresso/QENEBContextProvider.d.ts deleted file mode 100644 index ac0e54a0..00000000 --- a/dist/js/context/providers/by_application/espresso/QENEBContextProvider.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { QENEBContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import { type JobContextMixin, type JobExternalContext } from "../../../mixins/JobContextMixin"; -import { type MaterialContextMixin, type MaterialExternalContext } from "../../../mixins/MaterialContextMixin"; -import { type MaterialsContextMixin, type MaterialsExternalContext } from "../../../mixins/MaterialsContextMixin"; -import { type MaterialsSetContextMixin } from "../../../mixins/MaterialsSetContextMixin"; -import { type MethodDataContextMixin, type MethodDataExternalContext } from "../../../mixins/MethodDataContextMixin"; -import { type WorkflowContextMixin, type WorkflowExternalContext } from "../../../mixins/WorkflowContextMixin"; -import type { ContextItem, Domain } from "../../base/ContextProvider"; -import JSONSchemaDataProvider, { type JinjaExternalContext } from "../../base/JSONSchemaDataProvider"; -type Name = "input"; -type Data = QENEBContextProviderSchema; -type ExternalContext = JinjaExternalContext & WorkflowExternalContext & JobExternalContext & MaterialsExternalContext & MethodDataExternalContext & MaterialsSetContextMixin & MaterialExternalContext; -type Base = typeof JSONSchemaDataProvider & Constructor & Constructor & Constructor & Constructor & Constructor & Constructor; -declare const QENEBContextProvider_base: Base; -export default class QENEBContextProvider extends QENEBContextProvider_base { - readonly name: Name; - readonly domain: Domain; - readonly jsonSchema: JSONSchema7 | undefined; - constructor(config: ContextItem, externalContext: ExternalContext); - getDefaultData(): Data; -} -export {}; diff --git a/dist/js/context/providers/by_application/espresso/QENEBInputDataManager.d.ts b/dist/js/context/providers/by_application/espresso/QENEBInputDataManager.d.ts new file mode 100644 index 00000000..7dc6ca79 --- /dev/null +++ b/dist/js/context/providers/by_application/espresso/QENEBInputDataManager.d.ts @@ -0,0 +1,27 @@ +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { InputContextItemSchema, QENEBContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import { type MaterialContextMixin, type MaterialExternalContext } from "../../../mixins/MaterialContextMixin"; +import { type MaterialsContextMixin, type MaterialsExternalContext } from "../../../mixins/MaterialsContextMixin"; +import { type MaterialsSetContextMixin, type MaterialsSetExternalContext } from "../../../mixins/MaterialsSetContextMixin"; +import type { UnitContext } from "../../base/ContextProvider"; +import JSONSchemaDataProvider, { type JinjaExternalContext } from "../../base/JSONSchemaDataProvider"; +import { type MethodDataExternalContext, type WorkflowExternalContext } from "./QEPWXInputDataManager"; +type Data = QENEBContextProviderSchema; +type Schema = InputContextItemSchema & { + data: Data; +}; +type ExternalContext = JinjaExternalContext & WorkflowExternalContext & MaterialsExternalContext & MethodDataExternalContext & MaterialsSetExternalContext & MaterialExternalContext; +type Base = typeof JSONSchemaDataProvider & Constructor & Constructor & Constructor; +declare const QENEBInputDataManager_base: Base; +export default class QENEBInputDataManager extends QENEBInputDataManager_base { + readonly name: "input"; + readonly domain: "executable"; + readonly entityName: "unit"; + isEdited: boolean; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): QENEBInputDataManager; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(config: Partial, externalContext: ExternalContext); + getDefaultData(): Data; +} +export {}; diff --git a/dist/js/context/providers/by_application/espresso/QENEBContextProvider.js b/dist/js/context/providers/by_application/espresso/QENEBInputDataManager.js similarity index 62% rename from dist/js/context/providers/by_application/espresso/QENEBContextProvider.js rename to dist/js/context/providers/by_application/espresso/QENEBInputDataManager.js index ffb4d594..be1771a1 100644 --- a/dist/js/context/providers/by_application/espresso/QENEBContextProvider.js +++ b/dist/js/context/providers/by_application/espresso/QENEBInputDataManager.js @@ -4,31 +4,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); -const JobContextMixin_1 = __importDefault(require("../../../mixins/JobContextMixin")); const MaterialContextMixin_1 = __importDefault(require("../../../mixins/MaterialContextMixin")); const MaterialsContextMixin_1 = __importDefault(require("../../../mixins/MaterialsContextMixin")); const MaterialsSetContextMixin_1 = __importDefault(require("../../../mixins/MaterialsSetContextMixin")); -const MethodDataContextMixin_1 = __importDefault(require("../../../mixins/MethodDataContextMixin")); -const WorkflowContextMixin_1 = __importDefault(require("../../../mixins/WorkflowContextMixin")); const JSONSchemaDataProvider_1 = __importDefault(require("../../base/JSONSchemaDataProvider")); -const QEPWXContextProvider_1 = __importDefault(require("./QEPWXContextProvider")); +const QEPWXInputDataManager_1 = __importDefault(require("./QEPWXInputDataManager")); const jsonSchemaId = "context-providers-directory/by-application/qe-neb-context-provider"; -class QENEBContextProvider extends JSONSchemaDataProvider_1.default { +class QENEBInputDataManager extends JSONSchemaDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "input"); + return new QENEBInputDataManager(contextItem, externalContext); + } constructor(config, externalContext) { super(config, externalContext); this.name = "input"; this.domain = "executable"; - this.initJobContextMixin(externalContext); + this.entityName = "unit"; + this.isEdited = false; this.initMaterialsContextMixin(externalContext); - this.initMethodDataContextMixin(externalContext); - this.initWorkflowContextMixin(externalContext); this.initMaterialContextMixin(externalContext); this.initMaterialsSetContextMixin(externalContext); this.jsonSchema = JSONSchemasInterface_1.default.getSchemaById(jsonSchemaId); } getDefaultData() { const PWXContexts = this.sortMaterialsByIndexInSet(this.materials).map((material) => { - return new QEPWXContextProvider_1.default({}, { ...this.externalContext, material }).getData(); + return new QEPWXInputDataManager_1.default({}, { ...this.externalContext, material }).getData(); }); const { ATOMIC_POSITIONS, // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -40,13 +40,11 @@ class QENEBContextProvider extends JSONSchemaDataProvider_1.default { INTERMEDIATE_IMAGES: PWXContexts.slice(1, PWXContexts.length - 1).map((data) => { return data.ATOMIC_POSITIONS; }), + contextProviderName: "qe-neb", }; } } -exports.default = QENEBContextProvider; -(0, MaterialContextMixin_1.default)(QENEBContextProvider.prototype); -(0, MaterialsContextMixin_1.default)(QENEBContextProvider.prototype); -(0, MethodDataContextMixin_1.default)(QENEBContextProvider.prototype); -(0, WorkflowContextMixin_1.default)(QENEBContextProvider.prototype); -(0, JobContextMixin_1.default)(QENEBContextProvider.prototype); -(0, MaterialsSetContextMixin_1.default)(QENEBContextProvider.prototype); +exports.default = QENEBInputDataManager; +(0, MaterialContextMixin_1.default)(QENEBInputDataManager.prototype); +(0, MaterialsContextMixin_1.default)(QENEBInputDataManager.prototype); +(0, MaterialsSetContextMixin_1.default)(QENEBInputDataManager.prototype); diff --git a/dist/js/context/providers/by_application/espresso/QEPWXContextProvider.d.ts b/dist/js/context/providers/by_application/espresso/QEPWXContextProvider.d.ts deleted file mode 100644 index b8476b3c..00000000 --- a/dist/js/context/providers/by_application/espresso/QEPWXContextProvider.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { QEPwxContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import { type JobContextMixin, type JobExternalContext } from "../../../mixins/JobContextMixin"; -import { type MaterialContextMixin, type MaterialExternalContext } from "../../../mixins/MaterialContextMixin"; -import { type MaterialsContextMixin, type MaterialsExternalContext } from "../../../mixins/MaterialsContextMixin"; -import { type MethodDataContextMixin, type MethodDataExternalContext } from "../../../mixins/MethodDataContextMixin"; -import { type WorkflowContextMixin, type WorkflowExternalContext } from "../../../mixins/WorkflowContextMixin"; -import type { ContextItem, Domain } from "../../base/ContextProvider"; -import JSONSchemaDataProvider, { type JinjaExternalContext } from "../../base/JSONSchemaDataProvider"; -type Name = "input"; -type Data = QEPwxContextProviderSchema; -type ExternalContext = JinjaExternalContext & WorkflowExternalContext & MaterialExternalContext & JobExternalContext & MethodDataExternalContext & MaterialsExternalContext; -type Base = typeof JSONSchemaDataProvider & Constructor & Constructor & Constructor & Constructor & Constructor; -declare const QEPWXContextProvider_base: Base; -export default class QEPWXContextProvider extends QEPWXContextProvider_base { - readonly name: Name; - readonly domain: Domain; - readonly jsonSchema: JSONSchema7 | undefined; - constructor(config: ContextItem, externalContext: ExternalContext); - private buildQEPWXContext; - private getDataPerMaterial; - getDefaultData(): { - perMaterial?: undefined; - IBRAV: number; - RESTART_MODE: "from_scratch" | "restart"; - ATOMIC_SPECIES: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - ATOMIC_SPECIES_WITH_LABELS: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - NAT: number; - NTYP: number; - NTYP_WITH_LABELS: number; - ATOMIC_POSITIONS: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; - CELL_PARAMETERS: { - v1?: [number, number, number]; - v2?: [number, number, number]; - v3?: [number, number, number]; - }; - contextProviderName: "qe-pwx"; - } | { - perMaterial: QEPwxContextProviderSchema[]; - IBRAV: number; - RESTART_MODE: "from_scratch" | "restart"; - ATOMIC_SPECIES: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - ATOMIC_SPECIES_WITH_LABELS: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - NAT: number; - NTYP: number; - NTYP_WITH_LABELS: number; - ATOMIC_POSITIONS: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; - CELL_PARAMETERS: { - v1?: [number, number, number]; - v2?: [number, number, number]; - v3?: [number, number, number]; - }; - contextProviderName: "qe-pwx"; - }; -} -export {}; diff --git a/dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.d.ts b/dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.d.ts new file mode 100644 index 00000000..7ec7ed07 --- /dev/null +++ b/dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.d.ts @@ -0,0 +1,80 @@ +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { BaseMethod, InputContextItemSchema, JobSchema, QEPwxContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { AtomicElementValue } from "@mat3ra/made/dist/js/basis/elements"; +import type { JSONSchema7 } from "json-schema"; +import type { Workflow } from "src/js/Workflow"; +import { type MaterialContextMixin, type MaterialExternalContext } from "../../../mixins/MaterialContextMixin"; +import { type MaterialsContextMixin, type MaterialsExternalContext } from "../../../mixins/MaterialsContextMixin"; +import type { UnitContext } from "../../base/ContextProvider"; +import JSONSchemaDataProvider, { type JinjaExternalContext } from "../../base/JSONSchemaDataProvider"; +type MethodData = BaseMethod["data"] & { + pseudo?: { + element: AtomicElementValue; + filename?: string; + path?: string; + }[]; +}; +export type MethodDataExternalContext = { + methodData?: MethodData; +}; +export type JobExternalContext = { + job?: Pick; +}; +export type WorkflowExternalContext = { + workflow: Workflow; +}; +type Data = QEPwxContextProviderSchema; +type Schema = InputContextItemSchema & { + data: Data; +}; +type ExternalContext = JinjaExternalContext & WorkflowExternalContext & MaterialExternalContext & JobExternalContext & MethodDataExternalContext & MaterialsExternalContext; +type Base = typeof JSONSchemaDataProvider & Constructor & Constructor; +declare const QEPWXInputDataManager_base: Base; +export default class QEPWXInputDataManager extends QEPWXInputDataManager_base { + readonly name: "input"; + readonly domain: "executable"; + readonly entityName: "unit"; + isEdited: boolean; + methodData?: MethodData; + job?: Pick; + workflow: Workflow; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): QEPWXInputDataManager; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(config: Partial, externalContext: ExternalContext); + private buildQEPWXContext; + getDefaultData(): { + perMaterial: QEPwxContextProviderSchema[]; + IBRAV: number; + RESTART_MODE: "from_scratch" | "restart"; + ATOMIC_SPECIES: { + X: string; + Mass_X: number; + PseudoPot_X: string; + }[]; + ATOMIC_SPECIES_WITH_LABELS: { + X: string; + Mass_X: number; + PseudoPot_X: string; + }[]; + NAT: number; + NTYP: number; + NTYP_WITH_LABELS: number; + ATOMIC_POSITIONS: { + X?: string; + x: number; + y: number; + z: number; + "if_pos(1)"?: number; + "if_pos(2)"?: number; + "if_pos(3)"?: number; + }[]; + ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; + CELL_PARAMETERS: { + v1?: [number, number, number]; + v2?: [number, number, number]; + v3?: [number, number, number]; + }; + contextProviderName: "qe-pwx"; + }; +} +export {}; diff --git a/dist/js/context/providers/by_application/espresso/QEPWXContextProvider.js b/dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.js similarity index 69% rename from dist/js/context/providers/by_application/espresso/QEPWXContextProvider.js rename to dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.js index f1ac66e2..82dcdb84 100644 --- a/dist/js/context/providers/by_application/espresso/QEPWXContextProvider.js +++ b/dist/js/context/providers/by_application/espresso/QEPWXInputDataManager.js @@ -6,23 +6,26 @@ Object.defineProperty(exports, "__esModule", { value: true }); const periodic_table_js_1 = require("@exabyte-io/periodic-table.js"); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); const path_1 = __importDefault(require("path")); -const JobContextMixin_1 = __importDefault(require("../../../mixins/JobContextMixin")); const MaterialContextMixin_1 = __importDefault(require("../../../mixins/MaterialContextMixin")); const MaterialsContextMixin_1 = __importDefault(require("../../../mixins/MaterialsContextMixin")); -const MethodDataContextMixin_1 = __importDefault(require("../../../mixins/MethodDataContextMixin")); -const WorkflowContextMixin_1 = __importDefault(require("../../../mixins/WorkflowContextMixin")); const JSONSchemaDataProvider_1 = __importDefault(require("../../base/JSONSchemaDataProvider")); const jsonSchemaId = "context-providers-directory/by-application/qe-pwx-context-provider"; -class QEPWXContextProvider extends JSONSchemaDataProvider_1.default { +class QEPWXInputDataManager extends JSONSchemaDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "input"); + return new QEPWXInputDataManager(contextItem, externalContext); + } constructor(config, externalContext) { super(config, externalContext); this.name = "input"; this.domain = "executable"; + this.entityName = "unit"; + this.isEdited = false; this.initMaterialsContextMixin(externalContext); - this.initMethodDataContextMixin(externalContext); - this.initWorkflowContextMixin(externalContext); - this.initJobContextMixin(externalContext); this.initMaterialContextMixin(externalContext); + this.methodData = externalContext.methodData || {}; + this.job = externalContext.job; + this.workflow = externalContext.workflow; this.jsonSchema = JSONSchemasInterface_1.default.getSchemaById(jsonSchemaId); } buildQEPWXContext(material) { @@ -36,8 +39,7 @@ class QEPWXContextProvider extends JSONSchemaDataProvider_1.default { Mass_X: periodic_table_js_1.PERIODIC_TABLE[symbol].atomic_mass, PseudoPot_X: (pseudo === null || pseudo === void 0 ? void 0 : pseudo.filename) || path_1.default.basename((pseudo === null || pseudo === void 0 ? void 0 : pseudo.path) || ""), }; - // return s.sprintf("%s %f %s", symbol, el.atomic_mass, filename) || ""; - }); // .join("\n"); + }); const uniqueElementsWithLabels = [...new Set(basis.elementsWithLabelsArray)]; const ATOMIC_SPECIES_WITH_LABELS = uniqueElementsWithLabels.map((symbol) => { var _a, _b; @@ -49,18 +51,12 @@ class QEPWXContextProvider extends JSONSchemaDataProvider_1.default { Mass_X: periodic_table_js_1.PERIODIC_TABLE[symbol].atomic_mass, PseudoPot_X: (pseudo === null || pseudo === void 0 ? void 0 : pseudo.filename) || path_1.default.basename((pseudo === null || pseudo === void 0 ? void 0 : pseudo.path) || ""), }; - // return s.sprintf("%s%s %f %s", symbol, label, el.atomic_mass, filename) || ""; - }); // .join("\n"); - // Format numbers with 14 total width, 9 decimal places (equivalent to %14.9f) - // const formatNumber = (num: number) => { - // return Number(num.toFixed(9).padStart(14).trim()); - // }; + }); const CELL_PARAMETERS = { v1: lattice.vectorArrays[0], v2: lattice.vectorArrays[1], v3: lattice.vectorArrays[2], }; - // const ATOMIC_POSITIONS = basis.getAtomicPositionsWithConstraintsAsStrings().join("\n"); const ATOMIC_POSITIONS = basis.elementsCoordinatesConstraintsArray.map(([element, label, coordinate, constraint]) => { return { X: `${element}${label}`, @@ -73,8 +69,8 @@ class QEPWXContextProvider extends JSONSchemaDataProvider_1.default { }; }); return { - IBRAV: 0, // use CELL_PARAMETERS to define Bravais lattice - RESTART_MODE: job.parent || workflow.hasRelaxation ? "restart" : "from_scratch", + IBRAV: 0, + RESTART_MODE: (job === null || job === void 0 ? void 0 : job.parent) || workflow.hasRelaxation ? "restart" : "from_scratch", ATOMIC_SPECIES, ATOMIC_SPECIES_WITH_LABELS, NAT: basis.atomicPositions.length, @@ -83,26 +79,22 @@ class QEPWXContextProvider extends JSONSchemaDataProvider_1.default { ATOMIC_POSITIONS, ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: basis.atomicPositions.join("\n"), CELL_PARAMETERS, + contextProviderName: "qe-pwx", }; } - getDataPerMaterial() { - if (!this.materials || this.materials.length <= 1) - return {}; - return { perMaterial: this.materials.map((material) => this.buildQEPWXContext(material)) }; - } getDefaultData() { // the below values are read from PlanewaveDataManager instead // ECUTWFC = 40; // ECUTRHO = 200; return { ...this.buildQEPWXContext(this.material), - ...this.getDataPerMaterial(), + perMaterial: this.materials.map((material) => this.buildQEPWXContext(material)), }; } } -exports.default = QEPWXContextProvider; -(0, MaterialContextMixin_1.default)(QEPWXContextProvider.prototype); -(0, MaterialsContextMixin_1.default)(QEPWXContextProvider.prototype); -(0, MethodDataContextMixin_1.default)(QEPWXContextProvider.prototype); -(0, WorkflowContextMixin_1.default)(QEPWXContextProvider.prototype); -(0, JobContextMixin_1.default)(QEPWXContextProvider.prototype); +exports.default = QEPWXInputDataManager; +(0, MaterialContextMixin_1.default)(QEPWXInputDataManager.prototype); +(0, MaterialsContextMixin_1.default)(QEPWXInputDataManager.prototype); +// methodDataContextMixin(QEPWXInputDataManager.prototype); +// workflowContextMixin(QEPWXInputDataManager.prototype); +// jobContextMixin(QEPWXInputDataManager.prototype); diff --git a/dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.d.ts b/dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.d.ts new file mode 100644 index 00000000..587baada --- /dev/null +++ b/dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.d.ts @@ -0,0 +1,37 @@ +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { InputContextItemSchema, NWChemTotalEnergyContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import { type MaterialContextMixin, type MaterialExternalContext } from "../../../mixins/MaterialContextMixin"; +import type { UnitContext } from "../../base/ContextProvider"; +import JSONSchemaDataProvider, { type JinjaExternalContext } from "../../base/JSONSchemaDataProvider"; +type Data = NWChemTotalEnergyContextProviderSchema; +type Schema = InputContextItemSchema & { + data: Data; +}; +type ExternalContext = JinjaExternalContext & MaterialExternalContext; +type Base = typeof JSONSchemaDataProvider & Constructor; +declare const NWChemInputDataManager_base: Base; +export default class NWChemInputDataManager extends NWChemInputDataManager_base { + readonly name: "input"; + readonly domain: "executable"; + readonly entityName: "unit"; + isEdited: boolean; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): NWChemInputDataManager; + readonly contextProviderName: "nwchem-total-energy"; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(config: Partial, externalContext: ExternalContext); + getDefaultData(): { + CHARGE: number; + MULT: number; + BASIS: string; + NAT: number; + NTYP: number; + ATOMIC_POSITIONS: string; + ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; + ATOMIC_SPECIES: string; + FUNCTIONAL: string; + CARTESIAN: boolean; + contextProviderName: "nwchem-total-energy"; + }; +} +export {}; diff --git a/dist/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.js b/dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.js similarity index 68% rename from dist/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.js rename to dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.js index 02b09dd3..1c1b1f7d 100644 --- a/dist/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.js +++ b/dist/js/context/providers/by_application/nwchem/NWChemInputDataManager.js @@ -5,20 +5,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); const periodic_table_js_1 = require("@exabyte-io/periodic-table.js"); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); -const JobContextMixin_1 = __importDefault(require("../../../mixins/JobContextMixin")); const MaterialContextMixin_1 = __importDefault(require("../../../mixins/MaterialContextMixin")); -const MethodDataContextMixin_1 = __importDefault(require("../../../mixins/MethodDataContextMixin")); -const WorkflowContextMixin_1 = __importDefault(require("../../../mixins/WorkflowContextMixin")); const JSONSchemaDataProvider_1 = __importDefault(require("../../base/JSONSchemaDataProvider")); const jsonSchemaId = "context-providers-directory/by-application/nwchem-total-energy-context-provider"; -class NWChemTotalEnergyContextProvider extends JSONSchemaDataProvider_1.default { +class NWChemInputDataManager extends JSONSchemaDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "input"); + return new NWChemInputDataManager(contextItem, externalContext); + } constructor(config, externalContext) { super(config, externalContext); this.name = "input"; this.domain = "executable"; - this.initMethodDataContextMixin(externalContext); - this.initWorkflowContextMixin(externalContext); - this.initJobContextMixin(externalContext); + this.entityName = "unit"; + this.isEdited = false; + this.contextProviderName = "nwchem-total-energy"; this.initMaterialContextMixin(externalContext); this.jsonSchema = JSONSchemasInterface_1.default.getSchemaById(jsonSchemaId); } @@ -45,11 +46,9 @@ class NWChemTotalEnergyContextProvider extends JSONSchemaDataProvider_1.default ATOMIC_SPECIES, FUNCTIONAL: "B3LYP", CARTESIAN: basis.toCartesian !== undefined, + contextProviderName: this.contextProviderName, }; } } -exports.default = NWChemTotalEnergyContextProvider; -(0, MaterialContextMixin_1.default)(NWChemTotalEnergyContextProvider.prototype); -(0, MethodDataContextMixin_1.default)(NWChemTotalEnergyContextProvider.prototype); -(0, WorkflowContextMixin_1.default)(NWChemTotalEnergyContextProvider.prototype); -(0, JobContextMixin_1.default)(NWChemTotalEnergyContextProvider.prototype); +exports.default = NWChemInputDataManager; +(0, MaterialContextMixin_1.default)(NWChemInputDataManager.prototype); diff --git a/dist/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.d.ts b/dist/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.d.ts deleted file mode 100644 index 81ffabf4..00000000 --- a/dist/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { NWChemTotalEnergyContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import { type JobContextMixin, type JobExternalContext } from "../../../mixins/JobContextMixin"; -import { type MaterialContextMixin, type MaterialExternalContext } from "../../../mixins/MaterialContextMixin"; -import { type MethodDataContextMixin, type MethodDataExternalContext } from "../../../mixins/MethodDataContextMixin"; -import { type WorkflowContextMixin, type WorkflowExternalContext } from "../../../mixins/WorkflowContextMixin"; -import type { ContextItem, Domain } from "../../base/ContextProvider"; -import JSONSchemaDataProvider, { type JinjaExternalContext } from "../../base/JSONSchemaDataProvider"; -type Name = "input"; -type Data = NWChemTotalEnergyContextProviderSchema; -type ExternalContext = JinjaExternalContext & WorkflowExternalContext & JobExternalContext & MethodDataExternalContext & MaterialExternalContext; -type Base = typeof JSONSchemaDataProvider & Constructor & Constructor & Constructor & Constructor; -declare const NWChemTotalEnergyContextProvider_base: Base; -export default class NWChemTotalEnergyContextProvider extends NWChemTotalEnergyContextProvider_base { - readonly name: Name; - readonly domain: Domain; - readonly jsonSchema: JSONSchema7 | undefined; - constructor(config: ContextItem, externalContext: ExternalContext); - getDefaultData(): { - CHARGE: number; - MULT: number; - BASIS: string; - NAT: number; - NTYP: number; - ATOMIC_POSITIONS: string; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; - ATOMIC_SPECIES: string; - FUNCTIONAL: string; - CARTESIAN: boolean; - }; -} -export {}; diff --git a/dist/js/context/providers/by_application/vasp/VASPContextProvider.d.ts b/dist/js/context/providers/by_application/vasp/VASPContextProvider.d.ts deleted file mode 100644 index 0420cdcb..00000000 --- a/dist/js/context/providers/by_application/vasp/VASPContextProvider.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { VASPContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import { type JobContextMixin, type JobExternalContext } from "../../../mixins/JobContextMixin"; -import { type MaterialContextMixin, type MaterialExternalContext } from "../../../mixins/MaterialContextMixin"; -import { type MaterialsContextMixin } from "../../../mixins/MaterialsContextMixin"; -import { type MethodDataContextMixin, type MethodDataExternalContext } from "../../../mixins/MethodDataContextMixin"; -import { type WorkflowContextMixin, type WorkflowExternalContext } from "../../../mixins/WorkflowContextMixin"; -import type { ContextItem, Domain } from "../../base/ContextProvider"; -import JSONSchemaDataProvider, { type JinjaExternalContext } from "../../base/JSONSchemaDataProvider"; -type Name = "input"; -type Data = VASPContextProviderSchema; -type ExternalContext = JinjaExternalContext & WorkflowExternalContext & JobExternalContext & MaterialExternalContext & MethodDataExternalContext & MaterialsContextMixin; -type Base = typeof JSONSchemaDataProvider & Constructor & Constructor & Constructor & Constructor & Constructor; -declare const VASPContextProvider_base: Base; -export default class VASPContextProvider extends VASPContextProvider_base { - readonly name: Name; - readonly domain: Domain; - readonly jsonSchema: JSONSchema7 | undefined; - constructor(config: ContextItem, externalContext: ExternalContext); - private buildVASPContext; - private getDataPerMaterial; - getDefaultData(): { - perMaterial?: undefined; - POSCAR: string; - POSCAR_WITH_CONSTRAINTS: string; - contextProviderName: "vasp"; - } | { - perMaterial: VASPContextProviderSchema[]; - POSCAR: string; - POSCAR_WITH_CONSTRAINTS: string; - contextProviderName: "vasp"; - }; -} -export {}; diff --git a/dist/js/context/providers/by_application/vasp/VASPInputDataManager.d.ts b/dist/js/context/providers/by_application/vasp/VASPInputDataManager.d.ts new file mode 100644 index 00000000..cc5e1b45 --- /dev/null +++ b/dist/js/context/providers/by_application/vasp/VASPInputDataManager.d.ts @@ -0,0 +1,37 @@ +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { InputContextItemSchema, VASPContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import { type MaterialContextMixin, type MaterialExternalContext } from "../../../mixins/MaterialContextMixin"; +import { type MaterialsContextMixin, type MaterialsExternalContext } from "../../../mixins/MaterialsContextMixin"; +import type { UnitContext } from "../../base/ContextProvider"; +import JSONSchemaDataProvider, { type JinjaExternalContext } from "../../base/JSONSchemaDataProvider"; +type Data = VASPContextProviderSchema; +type Schema = InputContextItemSchema & { + data: Data; +}; +type ExternalContext = JinjaExternalContext & MaterialExternalContext & MaterialsExternalContext; +type Base = typeof JSONSchemaDataProvider & Constructor & Constructor; +declare const VASPInputDataManager_base: Base; +export default class VASPInputDataManager extends VASPInputDataManager_base { + readonly name: "input"; + readonly domain: "executable"; + readonly entityName: "unit"; + isEdited: boolean; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): VASPInputDataManager; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(config: Partial, externalContext: ExternalContext); + private buildVASPContext; + private getDataPerMaterial; + getDefaultData(): { + perMaterial?: undefined; + POSCAR: string; + POSCAR_WITH_CONSTRAINTS: string; + contextProviderName: "vasp"; + } | { + perMaterial: VASPContextProviderSchema[]; + POSCAR: string; + POSCAR_WITH_CONSTRAINTS: string; + contextProviderName: "vasp"; + }; +} +export {}; diff --git a/dist/js/context/providers/by_application/vasp/VASPContextProvider.js b/dist/js/context/providers/by_application/vasp/VASPInputDataManager.js similarity index 66% rename from dist/js/context/providers/by_application/vasp/VASPContextProvider.js rename to dist/js/context/providers/by_application/vasp/VASPInputDataManager.js index 3f3eff90..61d7004b 100644 --- a/dist/js/context/providers/by_application/vasp/VASPContextProvider.js +++ b/dist/js/context/providers/by_application/vasp/VASPInputDataManager.js @@ -4,22 +4,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); -const JobContextMixin_1 = __importDefault(require("../../../mixins/JobContextMixin")); const MaterialContextMixin_1 = __importDefault(require("../../../mixins/MaterialContextMixin")); const MaterialsContextMixin_1 = __importDefault(require("../../../mixins/MaterialsContextMixin")); -const MethodDataContextMixin_1 = __importDefault(require("../../../mixins/MethodDataContextMixin")); -const WorkflowContextMixin_1 = __importDefault(require("../../../mixins/WorkflowContextMixin")); const JSONSchemaDataProvider_1 = __importDefault(require("../../base/JSONSchemaDataProvider")); const jsonSchemaId = "context-providers-directory/by-application/vasp-context-provider"; -class VASPContextProvider extends JSONSchemaDataProvider_1.default { +class VASPInputDataManager extends JSONSchemaDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "input"); + return new VASPInputDataManager(contextItem, externalContext); + } constructor(config, externalContext) { super(config, externalContext); this.name = "input"; this.domain = "executable"; - this.initJobContextMixin(externalContext); + this.entityName = "unit"; + this.isEdited = false; this.initMaterialsContextMixin(externalContext); - this.initMethodDataContextMixin(externalContext); - this.initWorkflowContextMixin(externalContext); this.initMaterialContextMixin(externalContext); this.jsonSchema = JSONSchemasInterface_1.default.getSchemaById(jsonSchemaId); } @@ -29,12 +29,12 @@ class VASPContextProvider extends JSONSchemaDataProvider_1.default { // TODO: figure out whether we need two separate POSCARS, maybe one is enough POSCAR: material.getAsPOSCAR(true, true), POSCAR_WITH_CONSTRAINTS: material.getAsPOSCAR(true), + contextProviderName: "vasp", }; } getDataPerMaterial() { if (!this.materials || this.materials.length <= 1) return {}; - // TODO-QUESTION: perMaterial is not defined in the schema return { perMaterial: this.materials.map((material) => this.buildVASPContext(material)) }; } getDefaultData() { @@ -47,9 +47,6 @@ class VASPContextProvider extends JSONSchemaDataProvider_1.default { }; } } -exports.default = VASPContextProvider; -(0, MaterialContextMixin_1.default)(VASPContextProvider.prototype); -(0, MaterialsContextMixin_1.default)(VASPContextProvider.prototype); -(0, MethodDataContextMixin_1.default)(VASPContextProvider.prototype); -(0, WorkflowContextMixin_1.default)(VASPContextProvider.prototype); -(0, JobContextMixin_1.default)(VASPContextProvider.prototype); +exports.default = VASPInputDataManager; +(0, MaterialContextMixin_1.default)(VASPInputDataManager.prototype); +(0, MaterialsContextMixin_1.default)(VASPInputDataManager.prototype); diff --git a/dist/js/context/providers/by_application/vasp/VASPNEBContextProvider.d.ts b/dist/js/context/providers/by_application/vasp/VASPNEBContextProvider.d.ts deleted file mode 100644 index fa42d1e2..00000000 --- a/dist/js/context/providers/by_application/vasp/VASPNEBContextProvider.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { VASPNEBContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; -import { type JobContextMixin, type JobExternalContext } from "../../../mixins/JobContextMixin"; -import { type MaterialContextMixin, type MaterialExternalContext } from "../../../mixins/MaterialContextMixin"; -import { type MaterialsContextMixin } from "../../../mixins/MaterialsContextMixin"; -import { type MaterialsSetContextMixin } from "../../../mixins/MaterialsSetContextMixin"; -import { type MethodDataContextMixin, type MethodDataExternalContext } from "../../../mixins/MethodDataContextMixin"; -import { type WorkflowContextMixin, type WorkflowExternalContext } from "../../../mixins/WorkflowContextMixin"; -import type { ContextItem, Domain } from "../../base/ContextProvider"; -import JSONSchemaDataProvider, { type JinjaExternalContext } from "../../base/JSONSchemaDataProvider"; -type Name = "input"; -type Data = VASPNEBContextProviderSchema; -type ExternalContext = JinjaExternalContext & WorkflowExternalContext & JobExternalContext & MaterialExternalContext & MethodDataExternalContext & MaterialsContextMixin & MaterialsSetContextMixin; -type Base = typeof JSONSchemaDataProvider & Constructor & Constructor & Constructor & Constructor & Constructor & Constructor; -declare const VASPNEBContextProvider_base: Base; -export default class VASPNEBContextProvider extends VASPNEBContextProvider_base { - readonly name: Name; - readonly domain: Domain; - readonly jsonSchema: JSONSchema7 | undefined; - constructor(config: ContextItem, externalContext: ExternalContext); - getDefaultData(): { - FIRST_IMAGE: string; - LAST_IMAGE: string; - INTERMEDIATE_IMAGES: string[]; - }; -} -export {}; diff --git a/dist/js/context/providers/by_application/vasp/VASPNEBInputDataManager.d.ts b/dist/js/context/providers/by_application/vasp/VASPNEBInputDataManager.d.ts new file mode 100644 index 00000000..ffdd1026 --- /dev/null +++ b/dist/js/context/providers/by_application/vasp/VASPNEBInputDataManager.d.ts @@ -0,0 +1,31 @@ +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { InputContextItemSchema, VASPNEBContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; +import { type MaterialContextMixin, type MaterialExternalContext } from "../../../mixins/MaterialContextMixin"; +import { type MaterialsContextMixin, type MaterialsExternalContext } from "../../../mixins/MaterialsContextMixin"; +import { type MaterialsSetContextMixin, type MaterialsSetExternalContext } from "../../../mixins/MaterialsSetContextMixin"; +import type { UnitContext } from "../../base/ContextProvider"; +import JSONSchemaDataProvider, { type JinjaExternalContext } from "../../base/JSONSchemaDataProvider"; +type Data = VASPNEBContextProviderSchema; +type Schema = InputContextItemSchema & { + data: Data; +}; +type ExternalContext = JinjaExternalContext & MaterialExternalContext & MaterialsExternalContext & MaterialsSetExternalContext; +type Base = typeof JSONSchemaDataProvider & Constructor & Constructor & Constructor; +declare const VASPNEBInputDataManager_base: Base; +export default class VASPNEBInputDataManager extends VASPNEBInputDataManager_base { + readonly name: "input"; + readonly domain: "executable"; + readonly entityName: "unit"; + isEdited: boolean; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext): VASPNEBInputDataManager; + readonly jsonSchema: JSONSchema7 | undefined; + constructor(config: Partial, externalContext: ExternalContext); + getDefaultData(): { + FIRST_IMAGE: string; + LAST_IMAGE: string; + INTERMEDIATE_IMAGES: string[]; + contextProviderName: "vasp-neb"; + }; +} +export {}; diff --git a/dist/js/context/providers/by_application/vasp/VASPNEBContextProvider.js b/dist/js/context/providers/by_application/vasp/VASPNEBInputDataManager.js similarity index 59% rename from dist/js/context/providers/by_application/vasp/VASPNEBContextProvider.js rename to dist/js/context/providers/by_application/vasp/VASPNEBInputDataManager.js index 23e1e892..396d597a 100644 --- a/dist/js/context/providers/by_application/vasp/VASPNEBContextProvider.js +++ b/dist/js/context/providers/by_application/vasp/VASPNEBInputDataManager.js @@ -4,31 +4,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); -const JobContextMixin_1 = __importDefault(require("../../../mixins/JobContextMixin")); const MaterialContextMixin_1 = __importDefault(require("../../../mixins/MaterialContextMixin")); const MaterialsContextMixin_1 = __importDefault(require("../../../mixins/MaterialsContextMixin")); const MaterialsSetContextMixin_1 = __importDefault(require("../../../mixins/MaterialsSetContextMixin")); -const MethodDataContextMixin_1 = __importDefault(require("../../../mixins/MethodDataContextMixin")); -const WorkflowContextMixin_1 = __importDefault(require("../../../mixins/WorkflowContextMixin")); const JSONSchemaDataProvider_1 = __importDefault(require("../../base/JSONSchemaDataProvider")); -const VASPContextProvider_1 = __importDefault(require("./VASPContextProvider")); +const VASPInputDataManager_1 = __importDefault(require("./VASPInputDataManager")); const jsonSchemaId = "context-providers-directory/by-application/vasp-neb-context-provider"; -class VASPNEBContextProvider extends JSONSchemaDataProvider_1.default { +class VASPNEBInputDataManager extends JSONSchemaDataProvider_1.default { + static createFromUnitContext(unitContext, externalContext) { + const contextItem = this.findContextItem(unitContext, "input"); + return new VASPNEBInputDataManager(contextItem, externalContext); + } constructor(config, externalContext) { super(config, externalContext); this.name = "input"; this.domain = "executable"; + this.entityName = "unit"; + this.isEdited = false; this.initMaterialContextMixin(externalContext); this.initMaterialsContextMixin(externalContext); this.initMaterialsSetContextMixin(externalContext); - this.initMethodDataContextMixin(externalContext); - this.initWorkflowContextMixin(externalContext); - this.initJobContextMixin(externalContext); this.jsonSchema = JSONSchemasInterface_1.default.getSchemaById(jsonSchemaId); } getDefaultData() { const VASPContexts = this.sortMaterialsByIndexInSet(this.materials).map((material) => { - return new VASPContextProvider_1.default({}, { ...this.externalContext, material }).getData(); + return new VASPInputDataManager_1.default({}, { ...this.externalContext, material }).getData(); }); return { FIRST_IMAGE: VASPContexts[0].POSCAR_WITH_CONSTRAINTS, @@ -36,13 +36,11 @@ class VASPNEBContextProvider extends JSONSchemaDataProvider_1.default { INTERMEDIATE_IMAGES: VASPContexts.slice(1, VASPContexts.length - 1).map((data) => { return data.POSCAR_WITH_CONSTRAINTS; }), + contextProviderName: "vasp-neb", }; } } -exports.default = VASPNEBContextProvider; -(0, MaterialContextMixin_1.default)(VASPNEBContextProvider.prototype); -(0, MaterialsContextMixin_1.default)(VASPNEBContextProvider.prototype); -(0, MaterialsSetContextMixin_1.default)(VASPNEBContextProvider.prototype); -(0, MethodDataContextMixin_1.default)(VASPNEBContextProvider.prototype); -(0, WorkflowContextMixin_1.default)(VASPNEBContextProvider.prototype); -(0, JobContextMixin_1.default)(VASPNEBContextProvider.prototype); +exports.default = VASPNEBInputDataManager; +(0, MaterialContextMixin_1.default)(VASPNEBInputDataManager.prototype); +(0, MaterialsContextMixin_1.default)(VASPNEBInputDataManager.prototype); +(0, MaterialsSetContextMixin_1.default)(VASPNEBInputDataManager.prototype); diff --git a/dist/js/context/providers/index.d.ts b/dist/js/context/providers/index.d.ts new file mode 100644 index 00000000..21a60a45 --- /dev/null +++ b/dist/js/context/providers/index.d.ts @@ -0,0 +1,92 @@ +import type { AssignmentUnitSchema } from "@mat3ra/esse/dist/js/types"; +import type { ApplicationExternalContext } from "../mixins/ApplicationContextMixin"; +import type { MaterialExternalContext } from "../mixins/MaterialContextMixin"; +import type { MaterialsExternalContext } from "../mixins/MaterialsContextMixin"; +import type { MaterialsSetExternalContext } from "../mixins/MaterialsSetContextMixin"; +import type { UnitContext } from "./base/ContextProvider"; +import type { JinjaExternalContext } from "./base/JSONSchemaDataProvider"; +import BoundaryConditionsFormDataManager from "./BoundaryConditionsFormDataManager"; +import QENEBInputDataManager from "./by_application/espresso/QENEBInputDataManager"; +import QEPWXInputDataManager, { type JobExternalContext, type MethodDataExternalContext, type WorkflowExternalContext } from "./by_application/espresso/QEPWXInputDataManager"; +import NWChemInputDataManager from "./by_application/nwchem/NWChemInputDataManager"; +import VASPInputDataManager from "./by_application/vasp/VASPInputDataManager"; +import VASPNEBInputDataManager from "./by_application/vasp/VASPNEBInputDataManager"; +import CollinearMagnetizationDataManager from "./CollinearMagnetizationDataManager"; +import HubbardContextManagerLegacy from "./Hubbard/HubbardContextManagerLegacy"; +import HubbardJContextManager from "./Hubbard/HubbardJContextManager"; +import HubbardUContextManager from "./Hubbard/HubbardUContextManager"; +import HubbardVContextManager from "./Hubbard/HubbardVContextManager"; +import IonDynamicsDataManager from "./IonDynamicsDataManager"; +import MLSettingsDataManager from "./MLSettingsDataManager"; +import MLTrainTestSplitDataManager from "./MLTrainTestSplitDataManager"; +import NEBFormDataManager from "./NEBFormDataManager"; +import NonCollinearMagnetizationDataManager from "./NonCollinearMagnetizationDataManager"; +import PlanewaveCutoffDataManager from "./PlanewaveCutoffDataManager"; +import IGridFormDataManager from "./PointsGrid/IGridFormDataManager"; +import KGridFormDataManager from "./PointsGrid/KGridFormDataManager"; +import QGridFormDataManager from "./PointsGrid/QGridFormDataManager"; +import ExplicitKPath2PIBAFormDataManager from "./PointsPath/ExplicitKPath2PIBAFormDataManager"; +import ExplicitKPathFormDataManager from "./PointsPath/ExplicitKPathFormDataManager"; +import IPathFormDataManager from "./PointsPath/IPathFormDataManager"; +import KPathFormDataManager from "./PointsPath/KPathFormDataManager"; +import QPathFormDataManager from "./PointsPath/QPathFormDataManager"; +/** + * Registry mapping provider names (as they appear in templates) to their classes. + * This is the single source of truth for provider mappings. + */ +export declare const PROVIDER_REGISTRY: { + readonly PlanewaveCutoffDataManager: typeof PlanewaveCutoffDataManager; + readonly KGridFormDataManager: typeof KGridFormDataManager; + readonly QGridFormDataManager: typeof QGridFormDataManager; + readonly IGridFormDataManager: typeof IGridFormDataManager; + readonly QPathFormDataManager: typeof QPathFormDataManager; + readonly IPathFormDataManager: typeof IPathFormDataManager; + readonly KPathFormDataManager: typeof KPathFormDataManager; + readonly ExplicitKPathFormDataManager: typeof ExplicitKPathFormDataManager; + readonly ExplicitKPath2PIBAFormDataManager: typeof ExplicitKPath2PIBAFormDataManager; + readonly HubbardJContextManager: typeof HubbardJContextManager; + readonly HubbardUContextManager: typeof HubbardUContextManager; + readonly HubbardVContextManager: typeof HubbardVContextManager; + readonly HubbardContextManagerLegacy: typeof HubbardContextManagerLegacy; + readonly NEBFormDataManager: typeof NEBFormDataManager; + readonly BoundaryConditionsFormDataManager: typeof BoundaryConditionsFormDataManager; + readonly MLSettingsDataManager: typeof MLSettingsDataManager; + readonly MLTrainTestSplitDataManager: typeof MLTrainTestSplitDataManager; + readonly IonDynamicsContextProvider: typeof IonDynamicsDataManager; + readonly CollinearMagnetizationDataManager: typeof CollinearMagnetizationDataManager; + readonly NonCollinearMagnetizationDataManager: typeof NonCollinearMagnetizationDataManager; + readonly QEPWXInputDataManager: typeof QEPWXInputDataManager; + readonly QENEBInputDataManager: typeof QENEBInputDataManager; + readonly VASPInputDataManager: typeof VASPInputDataManager; + readonly VASPNEBInputDataManager: typeof VASPNEBInputDataManager; + readonly NWChemInputDataManager: typeof NWChemInputDataManager; +}; +export type AssignmentContext = Record; +export type SubworkflowContext = { + subworkflowContext: AssignmentContext; +}; +/** + * External context type used by ExecutionUnitInput when creating providers. + * This type is always expected to be present when providers are instantiated. + */ +export type ExternalContext = ApplicationExternalContext & WorkflowExternalContext & JobExternalContext & MaterialsExternalContext & MethodDataExternalContext & MaterialsSetExternalContext & MaterialExternalContext & JinjaExternalContext & SubworkflowContext; +/** + * Type for provider names as they appear in templates. + */ +export type ProviderName = keyof typeof PROVIDER_REGISTRY; +/** + * Union type of all context provider instances. + * Derived from the registry for type safety. + */ +export type AnyContextProvider = InstanceType<(typeof PROVIDER_REGISTRY)[ProviderName]>; +/** + * Factory function to create a context provider instance from its name. + * + * @param name - The provider name as it appears in templates + * @param context - The unit context + * @param externalContext - The external context (must match the ExternalContext type defined in this file) + * @returns An instance of the requested context provider + * @throws Error if the provider name is unknown + */ +export declare function createProvider(name: ProviderName, context: UnitContext, externalContext: ExternalContext): AnyContextProvider; +export { BoundaryConditionsFormDataManager, QENEBInputDataManager, QEPWXInputDataManager, NWChemInputDataManager, VASPInputDataManager, VASPNEBInputDataManager, CollinearMagnetizationDataManager, HubbardContextManagerLegacy, HubbardJContextManager, HubbardUContextManager, HubbardVContextManager, IonDynamicsDataManager, MLSettingsDataManager, MLTrainTestSplitDataManager, NEBFormDataManager, NonCollinearMagnetizationDataManager, PlanewaveCutoffDataManager, IGridFormDataManager, KGridFormDataManager, QGridFormDataManager, ExplicitKPath2PIBAFormDataManager, ExplicitKPathFormDataManager, IPathFormDataManager, KPathFormDataManager, QPathFormDataManager, }; diff --git a/dist/js/context/providers/index.js b/dist/js/context/providers/index.js new file mode 100644 index 00000000..9ec302f6 --- /dev/null +++ b/dist/js/context/providers/index.js @@ -0,0 +1,107 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.QPathFormDataManager = exports.KPathFormDataManager = exports.IPathFormDataManager = exports.ExplicitKPathFormDataManager = exports.ExplicitKPath2PIBAFormDataManager = exports.QGridFormDataManager = exports.KGridFormDataManager = exports.IGridFormDataManager = exports.PlanewaveCutoffDataManager = exports.NonCollinearMagnetizationDataManager = exports.NEBFormDataManager = exports.MLTrainTestSplitDataManager = exports.MLSettingsDataManager = exports.IonDynamicsDataManager = exports.HubbardVContextManager = exports.HubbardUContextManager = exports.HubbardJContextManager = exports.HubbardContextManagerLegacy = exports.CollinearMagnetizationDataManager = exports.VASPNEBInputDataManager = exports.VASPInputDataManager = exports.NWChemInputDataManager = exports.QEPWXInputDataManager = exports.QENEBInputDataManager = exports.BoundaryConditionsFormDataManager = exports.PROVIDER_REGISTRY = void 0; +exports.createProvider = createProvider; +const BoundaryConditionsFormDataManager_1 = __importDefault(require("./BoundaryConditionsFormDataManager")); +exports.BoundaryConditionsFormDataManager = BoundaryConditionsFormDataManager_1.default; +const QENEBInputDataManager_1 = __importDefault(require("./by_application/espresso/QENEBInputDataManager")); +exports.QENEBInputDataManager = QENEBInputDataManager_1.default; +const QEPWXInputDataManager_1 = __importDefault(require("./by_application/espresso/QEPWXInputDataManager")); +exports.QEPWXInputDataManager = QEPWXInputDataManager_1.default; +const NWChemInputDataManager_1 = __importDefault(require("./by_application/nwchem/NWChemInputDataManager")); +exports.NWChemInputDataManager = NWChemInputDataManager_1.default; +const VASPInputDataManager_1 = __importDefault(require("./by_application/vasp/VASPInputDataManager")); +exports.VASPInputDataManager = VASPInputDataManager_1.default; +const VASPNEBInputDataManager_1 = __importDefault(require("./by_application/vasp/VASPNEBInputDataManager")); +exports.VASPNEBInputDataManager = VASPNEBInputDataManager_1.default; +const CollinearMagnetizationDataManager_1 = __importDefault(require("./CollinearMagnetizationDataManager")); +exports.CollinearMagnetizationDataManager = CollinearMagnetizationDataManager_1.default; +const HubbardContextManagerLegacy_1 = __importDefault(require("./Hubbard/HubbardContextManagerLegacy")); +exports.HubbardContextManagerLegacy = HubbardContextManagerLegacy_1.default; +const HubbardJContextManager_1 = __importDefault(require("./Hubbard/HubbardJContextManager")); +exports.HubbardJContextManager = HubbardJContextManager_1.default; +const HubbardUContextManager_1 = __importDefault(require("./Hubbard/HubbardUContextManager")); +exports.HubbardUContextManager = HubbardUContextManager_1.default; +const HubbardVContextManager_1 = __importDefault(require("./Hubbard/HubbardVContextManager")); +exports.HubbardVContextManager = HubbardVContextManager_1.default; +const IonDynamicsDataManager_1 = __importDefault(require("./IonDynamicsDataManager")); +exports.IonDynamicsDataManager = IonDynamicsDataManager_1.default; +const MLSettingsDataManager_1 = __importDefault(require("./MLSettingsDataManager")); +exports.MLSettingsDataManager = MLSettingsDataManager_1.default; +const MLTrainTestSplitDataManager_1 = __importDefault(require("./MLTrainTestSplitDataManager")); +exports.MLTrainTestSplitDataManager = MLTrainTestSplitDataManager_1.default; +const NEBFormDataManager_1 = __importDefault(require("./NEBFormDataManager")); +exports.NEBFormDataManager = NEBFormDataManager_1.default; +const NonCollinearMagnetizationDataManager_1 = __importDefault(require("./NonCollinearMagnetizationDataManager")); +exports.NonCollinearMagnetizationDataManager = NonCollinearMagnetizationDataManager_1.default; +const PlanewaveCutoffDataManager_1 = __importDefault(require("./PlanewaveCutoffDataManager")); +exports.PlanewaveCutoffDataManager = PlanewaveCutoffDataManager_1.default; +const IGridFormDataManager_1 = __importDefault(require("./PointsGrid/IGridFormDataManager")); +exports.IGridFormDataManager = IGridFormDataManager_1.default; +const KGridFormDataManager_1 = __importDefault(require("./PointsGrid/KGridFormDataManager")); +exports.KGridFormDataManager = KGridFormDataManager_1.default; +const QGridFormDataManager_1 = __importDefault(require("./PointsGrid/QGridFormDataManager")); +exports.QGridFormDataManager = QGridFormDataManager_1.default; +const ExplicitKPath2PIBAFormDataManager_1 = __importDefault(require("./PointsPath/ExplicitKPath2PIBAFormDataManager")); +exports.ExplicitKPath2PIBAFormDataManager = ExplicitKPath2PIBAFormDataManager_1.default; +const ExplicitKPathFormDataManager_1 = __importDefault(require("./PointsPath/ExplicitKPathFormDataManager")); +exports.ExplicitKPathFormDataManager = ExplicitKPathFormDataManager_1.default; +const IPathFormDataManager_1 = __importDefault(require("./PointsPath/IPathFormDataManager")); +exports.IPathFormDataManager = IPathFormDataManager_1.default; +const KPathFormDataManager_1 = __importDefault(require("./PointsPath/KPathFormDataManager")); +exports.KPathFormDataManager = KPathFormDataManager_1.default; +const QPathFormDataManager_1 = __importDefault(require("./PointsPath/QPathFormDataManager")); +exports.QPathFormDataManager = QPathFormDataManager_1.default; +/** + * Registry mapping provider names (as they appear in templates) to their classes. + * This is the single source of truth for provider mappings. + */ +exports.PROVIDER_REGISTRY = { + PlanewaveCutoffDataManager: PlanewaveCutoffDataManager_1.default, + KGridFormDataManager: KGridFormDataManager_1.default, + QGridFormDataManager: QGridFormDataManager_1.default, + IGridFormDataManager: IGridFormDataManager_1.default, + QPathFormDataManager: QPathFormDataManager_1.default, + IPathFormDataManager: IPathFormDataManager_1.default, + KPathFormDataManager: KPathFormDataManager_1.default, + ExplicitKPathFormDataManager: ExplicitKPathFormDataManager_1.default, + ExplicitKPath2PIBAFormDataManager: ExplicitKPath2PIBAFormDataManager_1.default, + HubbardJContextManager: HubbardJContextManager_1.default, + HubbardUContextManager: HubbardUContextManager_1.default, + HubbardVContextManager: HubbardVContextManager_1.default, + HubbardContextManagerLegacy: HubbardContextManagerLegacy_1.default, + NEBFormDataManager: NEBFormDataManager_1.default, + BoundaryConditionsFormDataManager: BoundaryConditionsFormDataManager_1.default, + MLSettingsDataManager: MLSettingsDataManager_1.default, + MLTrainTestSplitDataManager: MLTrainTestSplitDataManager_1.default, + IonDynamicsContextProvider: IonDynamicsDataManager_1.default, // Note: name mismatch preserved from original + CollinearMagnetizationDataManager: // Note: name mismatch preserved from original + CollinearMagnetizationDataManager_1.default, + NonCollinearMagnetizationDataManager: NonCollinearMagnetizationDataManager_1.default, + QEPWXInputDataManager: QEPWXInputDataManager_1.default, + QENEBInputDataManager: QENEBInputDataManager_1.default, + VASPInputDataManager: VASPInputDataManager_1.default, + VASPNEBInputDataManager: VASPNEBInputDataManager_1.default, + NWChemInputDataManager: NWChemInputDataManager_1.default, +}; +/** + * Factory function to create a context provider instance from its name. + * + * @param name - The provider name as it appears in templates + * @param context - The unit context + * @param externalContext - The external context (must match the ExternalContext type defined in this file) + * @returns An instance of the requested context provider + * @throws Error if the provider name is unknown + */ +function createProvider(name, context, externalContext) { + const ProviderClass = exports.PROVIDER_REGISTRY[name]; + if (!ProviderClass) { + throw new Error(`Unknown provider: ${name}`); + } + // The full ExternalContext is a superset of each provider's expected context type, + // so passing it to every provider's createFromUnitContext is type-safe (no assertion). + return ProviderClass.createFromUnitContext(context, externalContext); +} diff --git a/dist/js/context/providers/settings.d.ts b/dist/js/context/providers/settings.d.ts index a900c581..fa6b391a 100644 --- a/dist/js/context/providers/settings.d.ts +++ b/dist/js/context/providers/settings.d.ts @@ -1,15 +1,16 @@ -import { Application } from "@mat3ra/ade"; -import { Made } from "@mat3ra/made"; +import type { ApplicationStandata } from "@mat3ra/standata"; +type Instance = InstanceType; +export interface ApplicationsDriver { + getExecutableAndFlavorByName: Instance["getExecutableAndFlavorByName"]; + getInput: Instance["getInput"]; +} declare class GlobalSettings { "PointsGridFormDataProvider.defaultKPPRA": number; - Material: typeof import("@mat3ra/made").Material; - Application: typeof Application; - constructor(); get defaultKPPRA(): number; - setApplication(application: typeof Application): void; - setMaterial(material: typeof Made.Material): void; setDefaultKPPRA(kppra: number): void; - resetDefaults(): void; + private applicationsDriver; + setupApplicationsDriver(driver: ApplicationsDriver): void; + getApplicationsDriver(): ApplicationsDriver; } export declare const globalSettings: GlobalSettings; export {}; diff --git a/dist/js/context/providers/settings.js b/dist/js/context/providers/settings.js index 6ed19f81..2219508f 100644 --- a/dist/js/context/providers/settings.js +++ b/dist/js/context/providers/settings.js @@ -1,31 +1,25 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.globalSettings = void 0; -const ade_1 = require("@mat3ra/ade"); -const made_1 = require("@mat3ra/made"); class GlobalSettings { constructor() { this["PointsGridFormDataProvider.defaultKPPRA"] = 5; - this.Material = made_1.Made.Material; - this.Application = ade_1.Application; - this.resetDefaults(); + this.applicationsDriver = null; } get defaultKPPRA() { return this["PointsGridFormDataProvider.defaultKPPRA"]; } - setApplication(application) { - this.Application = application; - } - setMaterial(material) { - this.Material = material; - } setDefaultKPPRA(kppra) { this["PointsGridFormDataProvider.defaultKPPRA"] = kppra; } - resetDefaults() { - this.Material = made_1.Made.Material; - this.Application = ade_1.Application; - this["PointsGridFormDataProvider.defaultKPPRA"] = 5; + setupApplicationsDriver(driver) { + this.applicationsDriver = driver; + } + getApplicationsDriver() { + if (!this.applicationsDriver) { + throw new Error("Wode Applications driver not set"); + } + return this.applicationsDriver; } } exports.globalSettings = new GlobalSettings(); diff --git a/dist/js/convergence/ConvergenceParameter.d.ts b/dist/js/convergence/ConvergenceParameter.d.ts new file mode 100644 index 00000000..fbdab43c --- /dev/null +++ b/dist/js/convergence/ConvergenceParameter.d.ts @@ -0,0 +1,26 @@ +interface ConvergenceParameterProps { + initialValue: number | [number, number, number]; +} +export type ConvergenceParameterConfig = ConvergenceParameterProps & { + increment?: string | number; +}; +export type UnitContext = { + data: { + dimensions: [string, string, string]; + shifts: [0, 0, 0]; + }; + isUsingJinjaVariables: true; +}; +export default abstract class ConvergenceParameter { + abstract readonly name: "N_k" | "N_k_nonuniform"; + abstract readonly finalValue: string; + abstract readonly increment: string; + abstract readonly unitContext: UnitContext; + readonly initialValue: string; + constructor({ initialValue }: ConvergenceParameterProps); + useVariablesFromUnitContext(_flowchartId: string): { + scope: string; + name: string; + }[]; +} +export {}; diff --git a/dist/js/convergence/ConvergenceParameter.js b/dist/js/convergence/ConvergenceParameter.js new file mode 100644 index 00000000..1f776252 --- /dev/null +++ b/dist/js/convergence/ConvergenceParameter.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class ConvergenceParameter { + constructor({ initialValue }) { + this.initialValue = + typeof initialValue === "string" ? initialValue : JSON.stringify(initialValue); + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this + useVariablesFromUnitContext(_flowchartId) { + return []; + } +} +exports.default = ConvergenceParameter; diff --git a/dist/js/convergence/NonUniformKGridConvergence.d.ts b/dist/js/convergence/NonUniformKGridConvergence.d.ts new file mode 100644 index 00000000..786e70a4 --- /dev/null +++ b/dist/js/convergence/NonUniformKGridConvergence.d.ts @@ -0,0 +1,12 @@ +import ConvergenceParameter, { type ConvergenceParameterConfig, type UnitContext } from "./ConvergenceParameter"; +export default class NonUniformKGridConvergence extends ConvergenceParameter { + readonly increment: string; + readonly name: "N_k_nonuniform"; + readonly finalValue: "N_k_nonuniform"; + readonly unitContext: UnitContext; + constructor({ initialValue, increment }: ConvergenceParameterConfig); + useVariablesFromUnitContext(flowchartId: string): { + scope: string; + name: string; + }[]; +} diff --git a/dist/js/convergence/NonUniformKGridConvergence.js b/dist/js/convergence/NonUniformKGridConvergence.js new file mode 100644 index 00000000..b2503dd0 --- /dev/null +++ b/dist/js/convergence/NonUniformKGridConvergence.js @@ -0,0 +1,31 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const ConvergenceParameter_1 = __importDefault(require("./ConvergenceParameter")); +class NonUniformKGridConvergence extends ConvergenceParameter_1.default { + constructor({ initialValue, increment }) { + super({ initialValue }); + this.name = "N_k_nonuniform"; + this.finalValue = "N_k_nonuniform"; + this.unitContext = { + data: { + dimensions: [`{{${this.name}[0]}}`, `{{${this.name}[1]}}`, `{{${this.name}[2]}}`], + shifts: [0, 0, 0], + }, + isUsingJinjaVariables: true, + }; + this.increment = `[${this.initialValue}[i] + math.floor(iteration * ${increment || ""} * float(context['kgrid']['reciprocalVectorRatios'][i])) for i in range(3)]`; + } + // eslint-disable-next-line class-methods-use-this + useVariablesFromUnitContext(flowchartId) { + return [ + { + scope: flowchartId, + name: "context", + }, + ]; + } +} +exports.default = NonUniformKGridConvergence; diff --git a/dist/js/convergence/UniformKGridConvergence.d.ts b/dist/js/convergence/UniformKGridConvergence.d.ts new file mode 100644 index 00000000..6247faed --- /dev/null +++ b/dist/js/convergence/UniformKGridConvergence.d.ts @@ -0,0 +1,8 @@ +import ConvergenceParameter, { type ConvergenceParameterConfig, type UnitContext } from "./ConvergenceParameter"; +export default class UniformKGridConvergence extends ConvergenceParameter { + readonly increment: string; + readonly name: "N_k"; + readonly finalValue: "N_k + 0"; + readonly unitContext: UnitContext; + constructor({ initialValue, increment }: ConvergenceParameterConfig); +} diff --git a/dist/js/convergence/UniformKGridConvergence.js b/dist/js/convergence/UniformKGridConvergence.js new file mode 100644 index 00000000..4ce590ec --- /dev/null +++ b/dist/js/convergence/UniformKGridConvergence.js @@ -0,0 +1,22 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const ConvergenceParameter_1 = __importDefault(require("./ConvergenceParameter")); +class UniformKGridConvergence extends ConvergenceParameter_1.default { + constructor({ initialValue, increment }) { + super({ initialValue }); + this.name = "N_k"; + this.finalValue = `${this.name} + 0`; + this.unitContext = { + data: { + dimensions: [`{{${this.name}}}`, `{{${this.name}}}`, `{{${this.name}}}`], + shifts: [0, 0, 0], + }, + isUsingJinjaVariables: true, + }; + this.increment = `${this.name} + ${increment || ""}`; + } +} +exports.default = UniformKGridConvergence; diff --git a/dist/js/convergence/factory.d.ts b/dist/js/convergence/factory.d.ts new file mode 100644 index 00000000..4415c167 --- /dev/null +++ b/dist/js/convergence/factory.d.ts @@ -0,0 +1,8 @@ +import { type ConvergenceParameterConfig } from "./ConvergenceParameter"; +import NonUniformKGridConvergence from "./NonUniformKGridConvergence"; +import UniformKGridConvergence from "./UniformKGridConvergence"; +type FactoryParams = ConvergenceParameterConfig & { + name: "N_k" | "N_k_nonuniform"; +}; +export declare function createConvergenceParameter({ name, ...params }: FactoryParams): NonUniformKGridConvergence | UniformKGridConvergence; +export {}; diff --git a/dist/js/convergence/factory.js b/dist/js/convergence/factory.js new file mode 100644 index 00000000..b3e90d3a --- /dev/null +++ b/dist/js/convergence/factory.js @@ -0,0 +1,18 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createConvergenceParameter = createConvergenceParameter; +const NonUniformKGridConvergence_1 = __importDefault(require("./NonUniformKGridConvergence")); +const UniformKGridConvergence_1 = __importDefault(require("./UniformKGridConvergence")); +function createConvergenceParameter({ name, ...params }) { + switch (name) { + case "N_k": + return new UniformKGridConvergence_1.default(params); + case "N_k_nonuniform": + return new NonUniformKGridConvergence_1.default(params); + default: + throw new Error(`Invalid convergence parameter name: ${name}`); + } +} diff --git a/dist/js/enums.d.ts b/dist/js/enums.d.ts index 22ab6b5e..da08eaf7 100644 --- a/dist/js/enums.d.ts +++ b/dist/js/enums.d.ts @@ -1,20 +1,14 @@ -/** - * THIS ENUMS ARE SHARED WITH TESTS. - * DO NOT IMPORT ANYTHINGS IN THIS MODULE. - */ -export declare const IO_ID_COLUMN = "exabyteId"; export declare const UNIT_TYPES: { - convergence: string; - exit: string; - execution: string; - map: string; - reduce: string; - assignment: string; - condition: string; - subworkflow: string; - processing: string; - io: string; - assertion: string; + readonly convergence: "convergence"; + readonly exit: "exit"; + readonly execution: "execution"; + readonly map: "map"; + readonly reduce: "reduce"; + readonly assignment: "assignment"; + readonly condition: "condition"; + readonly subworkflow: "subworkflow"; + readonly io: "io"; + readonly assertion: "assertion"; }; export declare enum UnitType { convergence = "convergence", @@ -25,45 +19,44 @@ export declare enum UnitType { assignment = "assignment", condition = "condition", subworkflow = "subworkflow", - processing = "processing", io = "io", assertion = "assertion" } -export declare const UNIT_STATUSES: { - idle: string; - active: string; - finished: string; - error: string; - warning: string; -}; -export declare const UNIT_TAGS: { - hasConvergenceParam: string; - hasConvergenceResult: string; -}; +export declare enum UnitTag { + hasConvergenceParam = "hasConvergenceParam", + hasConvergenceResult = "hasConvergenceResult" +} +export declare enum UnitStatus { + idle = "idle", + active = "active", + finished = "finished", + error = "error", + warning = "warning" +} export declare const WORKFLOW_STATUSES: { - "up-to-date": string; - outdated: string; + readonly "up-to-date": "up-to-date"; + readonly outdated: "outdated"; }; export declare const TAB_NAVIGATION_CONFIG: { - overview: { - itemName: string; - className: string; - href: string; + readonly overview: { + readonly itemName: "Overview"; + readonly className: ""; + readonly href: "sw-overview"; }; - importantSettings: { - itemName: string; - className: string; - href: string; + readonly importantSettings: { + readonly itemName: "Important settings"; + readonly className: ""; + readonly href: "sw-important-settings"; }; - detailedView: { - itemName: string; - className: string; - href: string; + readonly detailedView: { + readonly itemName: "Detailed view"; + readonly className: ""; + readonly href: "sw-detailed-view"; }; - compute: { - itemName: string; - className: string; - href: string; + readonly compute: { + readonly itemName: "Compute"; + readonly className: ""; + readonly href: "sw-compute"; }; }; export declare const UNIT_NAME_INVALID_CHARS = "/"; diff --git a/dist/js/enums.js b/dist/js/enums.js index 1e91c562..180edf9a 100644 --- a/dist/js/enums.js +++ b/dist/js/enums.js @@ -1,11 +1,6 @@ "use strict"; -/** - * THIS ENUMS ARE SHARED WITH TESTS. - * DO NOT IMPORT ANYTHINGS IN THIS MODULE. - */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.UNIT_NAME_INVALID_CHARS = exports.TAB_NAVIGATION_CONFIG = exports.WORKFLOW_STATUSES = exports.UNIT_TAGS = exports.UNIT_STATUSES = exports.UnitType = exports.UNIT_TYPES = exports.IO_ID_COLUMN = void 0; -exports.IO_ID_COLUMN = "exabyteId"; +exports.UNIT_NAME_INVALID_CHARS = exports.TAB_NAVIGATION_CONFIG = exports.WORKFLOW_STATUSES = exports.UnitStatus = exports.UnitTag = exports.UnitType = exports.UNIT_TYPES = void 0; exports.UNIT_TYPES = { // not currently used convergence: "convergence", @@ -17,7 +12,6 @@ exports.UNIT_TYPES = { assignment: "assignment", condition: "condition", subworkflow: "subworkflow", - processing: "processing", io: "io", assertion: "assertion", }; @@ -31,21 +25,22 @@ var UnitType; UnitType["assignment"] = "assignment"; UnitType["condition"] = "condition"; UnitType["subworkflow"] = "subworkflow"; - UnitType["processing"] = "processing"; UnitType["io"] = "io"; UnitType["assertion"] = "assertion"; })(UnitType || (exports.UnitType = UnitType = {})); -exports.UNIT_STATUSES = { - idle: "idle", - active: "active", - finished: "finished", - error: "error", - warning: "warning", -}; -exports.UNIT_TAGS = { - hasConvergenceParam: "hasConvergenceParam", - hasConvergenceResult: "hasConvergenceResult", -}; +var UnitTag; +(function (UnitTag) { + UnitTag["hasConvergenceParam"] = "hasConvergenceParam"; + UnitTag["hasConvergenceResult"] = "hasConvergenceResult"; +})(UnitTag || (exports.UnitTag = UnitTag = {})); +var UnitStatus; +(function (UnitStatus) { + UnitStatus["idle"] = "idle"; + UnitStatus["active"] = "active"; + UnitStatus["finished"] = "finished"; + UnitStatus["error"] = "error"; + UnitStatus["warning"] = "warning"; +})(UnitStatus || (exports.UnitStatus = UnitStatus = {})); exports.WORKFLOW_STATUSES = { "up-to-date": "up-to-date", outdated: "outdated", diff --git a/dist/js/generated/ExecutionUnitSchemaMixin.js b/dist/js/generated/ExecutionUnitSchemaMixin.js index 89de9ce7..1a109d0f 100644 --- a/dist/js/generated/ExecutionUnitSchemaMixin.js +++ b/dist/js/generated/ExecutionUnitSchemaMixin.js @@ -5,7 +5,7 @@ function executionUnitSchemaMixin(item) { // @ts-expect-error const properties = { get type() { - return this.prop("type"); + return this.requiredProp("type"); }, set type(value) { this.setProp("type", value); @@ -17,13 +17,13 @@ function executionUnitSchemaMixin(item) { this.setProp("application", value); }, get executable() { - return this.prop("executable"); + return this.requiredProp("executable"); }, set executable(value) { this.setProp("executable", value); }, get flavor() { - return this.prop("flavor"); + return this.requiredProp("flavor"); }, set flavor(value) { this.setProp("flavor", value); @@ -35,7 +35,7 @@ function executionUnitSchemaMixin(item) { this.setProp("input", value); }, get context() { - return this.prop("context"); + return this.requiredProp("context"); }, set context(value) { this.setProp("context", value); diff --git a/dist/js/generated/ProcessingUnitSchemaMixin.d.ts b/dist/js/generated/ProcessingUnitSchemaMixin.d.ts deleted file mode 100644 index eb59cea2..00000000 --- a/dist/js/generated/ProcessingUnitSchemaMixin.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; -import type { ProcessingUnitMixinSchema } from "@mat3ra/esse/dist/js/types"; -export type ProcessingUnitSchemaMixin = ProcessingUnitMixinSchema; -export type ProcessingUnitInMemoryEntity = InMemoryEntity & ProcessingUnitSchemaMixin; -export declare function processingUnitSchemaMixin(item: InMemoryEntity): asserts item is T & ProcessingUnitSchemaMixin; diff --git a/dist/js/generated/ProcessingUnitSchemaMixin.js b/dist/js/generated/ProcessingUnitSchemaMixin.js deleted file mode 100644 index 1d556e93..00000000 --- a/dist/js/generated/ProcessingUnitSchemaMixin.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.processingUnitSchemaMixin = processingUnitSchemaMixin; -function processingUnitSchemaMixin(item) { - // @ts-expect-error - const properties = { - get type() { - return this.prop("type"); - }, - set type(value) { - this.setProp("type", value); - }, - get operation() { - return this.requiredProp("operation"); - }, - set operation(value) { - this.setProp("operation", value); - }, - get operationType() { - return this.requiredProp("operationType"); - }, - set operationType(value) { - this.setProp("operationType", value); - }, - get inputData() { - return this.requiredProp("inputData"); - }, - set inputData(value) { - this.setProp("inputData", value); - }, - }; - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/dist/js/generated/SubworkflowSchemaMixin.js b/dist/js/generated/SubworkflowSchemaMixin.js index 859e8d5f..7d0ee411 100644 --- a/dist/js/generated/SubworkflowSchemaMixin.js +++ b/dist/js/generated/SubworkflowSchemaMixin.js @@ -5,7 +5,7 @@ function subworkflowSchemaMixin(item) { // @ts-expect-error const properties = { get properties() { - return this.prop("properties"); + return this.requiredProp("properties"); }, set properties(value) { this.setProp("properties", value); @@ -34,6 +34,12 @@ function subworkflowSchemaMixin(item) { set application(value) { this.setProp("application", value); }, + get isMultiMaterial() { + return this.prop("isMultiMaterial"); + }, + set isMultiMaterial(value) { + this.setProp("isMultiMaterial", value); + }, get isDraft() { return this.prop("isDraft"); }, diff --git a/dist/js/generated/WorkflowSchemaMixin.d.ts b/dist/js/generated/WorkflowSchemaMixin.d.ts new file mode 100644 index 00000000..6e481558 --- /dev/null +++ b/dist/js/generated/WorkflowSchemaMixin.d.ts @@ -0,0 +1,5 @@ +import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; +import type { BaseWorkflowSchema } from "@mat3ra/esse/dist/js/types"; +export type WorkflowSchemaMixin = BaseWorkflowSchema; +export type WorkflowInMemoryEntity = InMemoryEntity & WorkflowSchemaMixin; +export declare function workflowSchemaMixin(item: InMemoryEntity): asserts item is T & WorkflowSchemaMixin; diff --git a/dist/js/generated/WorkflowSchemaMixin.js b/dist/js/generated/WorkflowSchemaMixin.js new file mode 100644 index 00000000..b0ca0f49 --- /dev/null +++ b/dist/js/generated/WorkflowSchemaMixin.js @@ -0,0 +1,51 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.workflowSchemaMixin = workflowSchemaMixin; +function workflowSchemaMixin(item) { + // @ts-expect-error + const properties = { + get properties() { + return this.requiredProp("properties"); + }, + set properties(value) { + this.setProp("properties", value); + }, + get isUsingDataset() { + return this.prop("isUsingDataset"); + }, + set isUsingDataset(value) { + this.setProp("isUsingDataset", value); + }, + get isMultiMaterial() { + return this.prop("isMultiMaterial"); + }, + set isMultiMaterial(value) { + this.setProp("isMultiMaterial", value); + }, + get subworkflows() { + return this.requiredProp("subworkflows"); + }, + set subworkflows(value) { + this.setProp("subworkflows", value); + }, + get units() { + return this.requiredProp("units"); + }, + set units(value) { + this.setProp("units", value); + }, + get application() { + return this.prop("application"); + }, + set application(value) { + this.setProp("application", value); + }, + get tags() { + return this.prop("tags"); + }, + set tags(value) { + this.setProp("tags", value); + }, + }; + Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); +} diff --git a/dist/js/index.d.ts b/dist/js/index.d.ts index e228fc47..c95b776b 100644 --- a/dist/js/index.d.ts +++ b/dist/js/index.d.ts @@ -1,26 +1,10 @@ -import { Subworkflow } from "./subworkflows"; -import { Workflow } from "./workflows"; -import { createWorkflow } from "./workflows"; -import { createWorkflows } from "./workflows"; -import { createWorkflowConfigs } from "./workflows"; -import { createSubworkflowByName } from "./subworkflows"; +import PointsPathFormDataProvider from "./context/providers/PointsPath/PointsPathFormDataProvider"; +import { globalSettings } from "./context/providers/settings"; +import { TAB_NAVIGATION_CONFIG, UNIT_NAME_INVALID_CHARS, WORKFLOW_STATUSES } from "./enums"; +import Subworkflow from "./Subworkflow"; +import { AssertionUnit, AssignmentUnit, BaseUnit, ConditionUnit, ExecutionUnit, IOUnit, MapUnit, ReduceUnit, SubworkflowUnit } from "./units"; import { UnitFactory } from "./units/factory"; -import { builders } from "./units/builders"; -import { UNIT_TYPES } from "./enums"; -import { UNIT_STATUSES } from "./enums"; -import { TAB_NAVIGATION_CONFIG } from "./enums"; -import { UNIT_NAME_INVALID_CHARS } from "./enums"; -import { WORKFLOW_STATUSES } from "./enums"; -import { BaseUnit } from "./units"; -import { ExecutionUnit } from "./units"; -import { AssertionUnit } from "./units"; -import { AssignmentUnit } from "./units"; -import { ConditionUnit } from "./units"; -import { IOUnit } from "./units"; -import { MapUnit } from "./units"; -import { ProcessingUnit } from "./units"; -import { ReduceUnit } from "./units"; -import { SubworkflowUnit } from "./units"; import { defaultMapConfig } from "./units/MapUnit"; -import { globalSettings } from "./context/providers/settings"; -export { Subworkflow, Workflow, createWorkflow, createWorkflows, createWorkflowConfigs, createSubworkflowByName, UnitFactory, builders, UNIT_TYPES, UNIT_STATUSES, TAB_NAVIGATION_CONFIG, UNIT_NAME_INVALID_CHARS, WORKFLOW_STATUSES, BaseUnit, ExecutionUnit, AssertionUnit, AssignmentUnit, ConditionUnit, IOUnit, MapUnit, ProcessingUnit, ReduceUnit, SubworkflowUnit, defaultMapConfig, wodeProviders, PointsPathFormDataProvider, globalSettings }; +import * as utils from "./utils"; +import { Workflow } from "./Workflow"; +export { Subworkflow, Workflow, UnitFactory, TAB_NAVIGATION_CONFIG, UNIT_NAME_INVALID_CHARS, WORKFLOW_STATUSES, BaseUnit, ExecutionUnit, AssertionUnit, AssignmentUnit, ConditionUnit, IOUnit, MapUnit, ReduceUnit, SubworkflowUnit, defaultMapConfig, PointsPathFormDataProvider, globalSettings, utils, }; diff --git a/dist/js/index.js b/dist/js/index.js index 466e746a..b02d7773 100644 --- a/dist/js/index.js +++ b/dist/js/index.js @@ -1,21 +1,52 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.globalSettings = exports.PointsPathFormDataProvider = exports.wodeProviders = exports.defaultMapConfig = exports.SubworkflowUnit = exports.ReduceUnit = exports.ProcessingUnit = exports.MapUnit = exports.IOUnit = exports.ConditionUnit = exports.AssignmentUnit = exports.AssertionUnit = exports.ExecutionUnit = exports.BaseUnit = exports.WORKFLOW_STATUSES = exports.UNIT_NAME_INVALID_CHARS = exports.TAB_NAVIGATION_CONFIG = exports.UNIT_STATUSES = exports.UNIT_TYPES = exports.builders = exports.UnitFactory = exports.createSubworkflowByName = exports.createWorkflowConfigs = exports.createWorkflows = exports.createWorkflow = exports.Workflow = exports.Subworkflow = void 0; -const providers_1 = require("./context/providers"); -Object.defineProperty(exports, "wodeProviders", { enumerable: true, get: function () { return providers_1.wodeProviders; } }); -const PointsPathFormDataProvider_1 = require("./context/providers/PointsPath/PointsPathFormDataProvider"); -Object.defineProperty(exports, "PointsPathFormDataProvider", { enumerable: true, get: function () { return PointsPathFormDataProvider_1.PointsPathFormDataProvider; } }); +exports.utils = exports.globalSettings = exports.PointsPathFormDataProvider = exports.defaultMapConfig = exports.SubworkflowUnit = exports.ReduceUnit = exports.MapUnit = exports.IOUnit = exports.ConditionUnit = exports.AssignmentUnit = exports.AssertionUnit = exports.ExecutionUnit = exports.BaseUnit = exports.WORKFLOW_STATUSES = exports.UNIT_NAME_INVALID_CHARS = exports.TAB_NAVIGATION_CONFIG = exports.UnitFactory = exports.Workflow = exports.Subworkflow = void 0; +const PointsPathFormDataProvider_1 = __importDefault(require("./context/providers/PointsPath/PointsPathFormDataProvider")); +exports.PointsPathFormDataProvider = PointsPathFormDataProvider_1.default; const settings_1 = require("./context/providers/settings"); Object.defineProperty(exports, "globalSettings", { enumerable: true, get: function () { return settings_1.globalSettings; } }); const enums_1 = require("./enums"); Object.defineProperty(exports, "TAB_NAVIGATION_CONFIG", { enumerable: true, get: function () { return enums_1.TAB_NAVIGATION_CONFIG; } }); Object.defineProperty(exports, "UNIT_NAME_INVALID_CHARS", { enumerable: true, get: function () { return enums_1.UNIT_NAME_INVALID_CHARS; } }); -Object.defineProperty(exports, "UNIT_STATUSES", { enumerable: true, get: function () { return enums_1.UNIT_STATUSES; } }); -Object.defineProperty(exports, "UNIT_TYPES", { enumerable: true, get: function () { return enums_1.UNIT_TYPES; } }); Object.defineProperty(exports, "WORKFLOW_STATUSES", { enumerable: true, get: function () { return enums_1.WORKFLOW_STATUSES; } }); -const subworkflows_1 = require("./subworkflows"); -Object.defineProperty(exports, "createSubworkflowByName", { enumerable: true, get: function () { return subworkflows_1.createSubworkflowByName; } }); -Object.defineProperty(exports, "Subworkflow", { enumerable: true, get: function () { return subworkflows_1.Subworkflow; } }); +const Subworkflow_1 = __importDefault(require("./Subworkflow")); +exports.Subworkflow = Subworkflow_1.default; const units_1 = require("./units"); Object.defineProperty(exports, "AssertionUnit", { enumerable: true, get: function () { return units_1.AssertionUnit; } }); Object.defineProperty(exports, "AssignmentUnit", { enumerable: true, get: function () { return units_1.AssignmentUnit; } }); @@ -24,17 +55,13 @@ Object.defineProperty(exports, "ConditionUnit", { enumerable: true, get: functio Object.defineProperty(exports, "ExecutionUnit", { enumerable: true, get: function () { return units_1.ExecutionUnit; } }); Object.defineProperty(exports, "IOUnit", { enumerable: true, get: function () { return units_1.IOUnit; } }); Object.defineProperty(exports, "MapUnit", { enumerable: true, get: function () { return units_1.MapUnit; } }); -Object.defineProperty(exports, "ProcessingUnit", { enumerable: true, get: function () { return units_1.ProcessingUnit; } }); Object.defineProperty(exports, "ReduceUnit", { enumerable: true, get: function () { return units_1.ReduceUnit; } }); Object.defineProperty(exports, "SubworkflowUnit", { enumerable: true, get: function () { return units_1.SubworkflowUnit; } }); -const builders_1 = require("./units/builders"); -Object.defineProperty(exports, "builders", { enumerable: true, get: function () { return builders_1.builders; } }); const factory_1 = require("./units/factory"); Object.defineProperty(exports, "UnitFactory", { enumerable: true, get: function () { return factory_1.UnitFactory; } }); const MapUnit_1 = require("./units/MapUnit"); Object.defineProperty(exports, "defaultMapConfig", { enumerable: true, get: function () { return MapUnit_1.defaultMapConfig; } }); -const workflows_1 = require("./workflows"); -Object.defineProperty(exports, "createWorkflow", { enumerable: true, get: function () { return workflows_1.createWorkflow; } }); -Object.defineProperty(exports, "createWorkflowConfigs", { enumerable: true, get: function () { return workflows_1.createWorkflowConfigs; } }); -Object.defineProperty(exports, "createWorkflows", { enumerable: true, get: function () { return workflows_1.createWorkflows; } }); -Object.defineProperty(exports, "Workflow", { enumerable: true, get: function () { return workflows_1.Workflow; } }); +const utils = __importStar(require("./utils")); +exports.utils = utils; +const Workflow_1 = require("./Workflow"); +Object.defineProperty(exports, "Workflow", { enumerable: true, get: function () { return Workflow_1.Workflow; } }); diff --git a/dist/js/subworkflows/convergence.d.ts b/dist/js/subworkflows/convergence.d.ts deleted file mode 100644 index fced1616..00000000 --- a/dist/js/subworkflows/convergence.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export function ConvergenceMixin(superclass: any): { - new (): { - [x: string]: any; - get convergenceParam(): any; - get convergenceResult(): any; - convergenceSeries(scopeTrack: any): any; - addConvergence({ parameter, parameterInitial, parameterIncrement, result, resultInitial, condition, operator, tolerance, maxOccurrences, }: { - parameter: any; - parameterInitial: any; - parameterIncrement: any; - result: any; - resultInitial: any; - condition: any; - operator: any; - tolerance: any; - maxOccurrences: any; - }): void; - }; - [x: string]: any; -}; diff --git a/dist/js/subworkflows/convergence.js b/dist/js/subworkflows/convergence.js deleted file mode 100644 index bb1d109d..00000000 --- a/dist/js/subworkflows/convergence.js +++ /dev/null @@ -1,173 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ConvergenceMixin = void 0; -const merge_1 = __importDefault(require("lodash/merge")); -const enums_1 = require("../enums"); -const factory_1 = require("./convergence/factory"); -const ConvergenceMixin = (superclass) => class extends superclass { - get convergenceParam() { - var _a; - return ((_a = this.findUnitWithTag("hasConvergenceParam")) === null || _a === void 0 ? void 0 : _a.operand) || undefined; - } - get convergenceResult() { - var _a; - return ((_a = this.findUnitWithTag("hasConvergenceResult")) === null || _a === void 0 ? void 0 : _a.operand) || undefined; - } - convergenceSeries(scopeTrack) { - if (!this.hasConvergence || !(scopeTrack === null || scopeTrack === void 0 ? void 0 : scopeTrack.length)) - return []; - let lastResult; - const series = scopeTrack - .map((scopeItem, i) => { - var _a, _b; - return ({ - x: i, - param: (_a = scopeItem.scope) === null || _a === void 0 ? void 0 : _a.global[this.convergenceParam], - y: (_b = scopeItem.scope) === null || _b === void 0 ? void 0 : _b.global[this.convergenceResult], - }); - }) - .filter(({ y }) => { - const isNewResult = y !== undefined && y !== lastResult; - lastResult = y; - return isNewResult; - }); - return series.map((item, i) => { - return { - x: i + 1, - param: item.param, - y: item.y, - }; - }); - } - addConvergence({ parameter, parameterInitial, parameterIncrement, result, resultInitial, condition, operator, tolerance, maxOccurrences, }) { - // RF: added TODO comments for future improvements - const { units } = this; - // Find unit to converge: should contain passed result in its results list - // TODO: make user to select unit for convergence explicitly - const unitForConvergence = units.find((x) => x.resultNames.find((name) => name === result)); - if (!unitForConvergence) { - // eslint-disable-next-line no-undef - sAlert.error(`Subworkflow does not contain unit with '${result}' as extracted property.`); - throw new Error("There is no result to converge"); - } - // initialize parameter - const param = (0, factory_1.createConvergenceParameter)({ - name: parameter, - initialValue: parameterInitial, - increment: parameterIncrement, - }); - // Replace kgrid to be ready for convergence - // TODO: kgrid should be abstracted and selected by user - const providers = unitForConvergence.importantSettingsProviders; - const gridProvider = providers.find((p) => p.name === "kgrid" || p.name === "qgrid"); - let mergedContext = param.unitContext; - if (gridProvider) { - mergedContext = (0, merge_1.default)(gridProvider.yieldData(), param.unitContext); - gridProvider.setData(mergedContext); - gridProvider.setIsEdited(true); - } - unitForConvergence.updateContext(mergedContext); - const prevResult = "prev_result"; - const iteration = "iteration"; - // Assignment with result's initial value - const prevResultInit = this._UnitFactory.create({ - name: "init result", - type: enums_1.UNIT_TYPES.assignment, - head: true, - operand: prevResult, - value: resultInitial, - }); - // Assignment with initial value of convergence parameter - const paramInit = this._UnitFactory.create({ - name: "init parameter", - type: enums_1.UNIT_TYPES.assignment, - operand: param.name, - value: param.initialValue, - tags: [enums_1.UNIT_TAGS.hasConvergenceParam], - }); - // Assignment with initial value of iteration counter - const iterInit = this._UnitFactory.create({ - name: "init counter", - type: enums_1.UNIT_TYPES.assignment, - operand: iteration, - value: 1, - }); - // Assignment for storing iteration result: extracts 'result' from convergence unit scope - const storePrevResult = this._UnitFactory.create({ - name: "store result", - type: enums_1.UNIT_TYPES.assignment, - input: [ - { - scope: unitForConvergence.flowchartId, - name: result, - }, - ], - operand: prevResult, - value: result, - }); - // Assignment for convergence param increase - const nextStep = this._UnitFactory.create({ - name: "update parameter", - type: enums_1.UNIT_TYPES.assignment, - input: param.useVariablesFromUnitContext(unitForConvergence.flowchartId), - operand: param.name, - value: param.increment, - next: unitForConvergence.flowchartId, - }); - // Final step of convergence - const exit = this._UnitFactory.create({ - type: enums_1.UNIT_TYPES.assignment, - name: "exit", - input: [], - operand: param.name, - value: param.finalValue, - }); - // Final step of convergence - const storeResult = this._UnitFactory.create({ - name: "update result", - type: enums_1.UNIT_TYPES.assignment, - input: [ - { - scope: unitForConvergence.flowchartId, - name: result, - }, - ], - operand: result, - value: result, - tags: [enums_1.UNIT_TAGS.hasConvergenceResult], - }); - // Assign next iteration value - const nextIter = this._UnitFactory.create({ - name: "update counter", - type: enums_1.UNIT_TYPES.assignment, - input: [], - operand: iteration, - value: `${iteration} + 1`, - }); - // Convergence condition unit - const conditionUnit = this._UnitFactory.create({ - name: "check convergence", - type: enums_1.UNIT_TYPES.condition, - statement: `${condition} ${operator} ${tolerance}`, - then: exit.flowchartId, - else: storePrevResult.flowchartId, - maxOccurrences, - next: storePrevResult.flowchartId, - }); - this.addUnit(paramInit, 0); - this.addUnit(prevResultInit, 1); - this.addUnit(iterInit, 2); - this.addUnit(storeResult); - this.addUnit(conditionUnit); - this.addUnit(storePrevResult); - this.addUnit(nextIter); - this.addUnit(nextStep); - this.addUnit(exit); - // `addUnit` adjusts the `next` field, hence the below. - nextStep.next = unitForConvergence.flowchartId; - } -}; -exports.ConvergenceMixin = ConvergenceMixin; diff --git a/dist/js/subworkflows/convergence/factory.d.ts b/dist/js/subworkflows/convergence/factory.d.ts deleted file mode 100644 index 067badb5..00000000 --- a/dist/js/subworkflows/convergence/factory.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function createConvergenceParameter({ name, initialValue, increment }: { - name: any; - initialValue: any; - increment: any; -}): ConvergenceParameter; -import { ConvergenceParameter } from "./parameter"; diff --git a/dist/js/subworkflows/convergence/factory.js b/dist/js/subworkflows/convergence/factory.js deleted file mode 100644 index c016fd8f..00000000 --- a/dist/js/subworkflows/convergence/factory.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createConvergenceParameter = createConvergenceParameter; -const non_uniform_kgrid_1 = require("./non_uniform_kgrid"); -const parameter_1 = require("./parameter"); -const uniform_kgrid_1 = require("./uniform_kgrid"); -function createConvergenceParameter({ name, initialValue, increment }) { - switch (name) { - case "N_k": - return new uniform_kgrid_1.UniformKGridConvergence({ name, initialValue, increment }); - case "N_k_nonuniform": - return new non_uniform_kgrid_1.NonUniformKGridConvergence({ name, initialValue, increment }); - default: - return new parameter_1.ConvergenceParameter({ name, initialValue, increment }); - } -} diff --git a/dist/js/subworkflows/convergence/non_uniform_kgrid.d.ts b/dist/js/subworkflows/convergence/non_uniform_kgrid.d.ts deleted file mode 100644 index 780802f3..00000000 --- a/dist/js/subworkflows/convergence/non_uniform_kgrid.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export class NonUniformKGridConvergence extends ConvergenceParameter { - get unitContext(): { - kgrid: { - dimensions: string[]; - shifts: number[]; - }; - isKgridEdited: boolean; - isUsingJinjaVariables: boolean; - }; - useVariablesFromUnitContext(flowchartId: any): { - scope: any; - name: string; - }[]; -} -import { ConvergenceParameter } from "./parameter"; diff --git a/dist/js/subworkflows/convergence/non_uniform_kgrid.js b/dist/js/subworkflows/convergence/non_uniform_kgrid.js deleted file mode 100644 index 680a963f..00000000 --- a/dist/js/subworkflows/convergence/non_uniform_kgrid.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NonUniformKGridConvergence = void 0; -const parameter_1 = require("./parameter"); -class NonUniformKGridConvergence extends parameter_1.ConvergenceParameter { - get increment() { - return `[${this.initialValue}[i] + math.floor(iteration * ${this._increment} * float(context['kgrid']['reciprocalVectorRatios'][i])) for i in range(3)]`; - } - get unitContext() { - return { - kgrid: { - dimensions: [`{{${this.name}[0]}}`, `{{${this.name}[1]}}`, `{{${this.name}[2]}}`], - shifts: [0, 0, 0], - }, - isKgridEdited: true, - isUsingJinjaVariables: true, - }; - } - // eslint-disable-next-line class-methods-use-this - useVariablesFromUnitContext(flowchartId) { - return [ - { - scope: flowchartId, - name: "context", - }, - ]; - } -} -exports.NonUniformKGridConvergence = NonUniformKGridConvergence; diff --git a/dist/js/subworkflows/convergence/parameter.d.ts b/dist/js/subworkflows/convergence/parameter.d.ts deleted file mode 100644 index 2cbff560..00000000 --- a/dist/js/subworkflows/convergence/parameter.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -export class ConvergenceParameter { - constructor({ name, initialValue, increment }: { - name: any; - initialValue: any; - increment: any; - }); - name: any; - _initialValue: any; - _increment: any; - /** - * Getter for initial value as string. - * Note: this will be used in assignment unit. - * @return {string} - */ - get initialValue(): string; - /** - * @summary Defines how to increment the parameter. - * @return {string} - increment operation used in assignment unit - */ - get increment(): string; - /** - * Defines content for updating the unit context - * @return {Object} - */ - get unitContext(): Object; - /** - * Defines value once convergence is reached (for 'exit' unit). - * Note: This is used in assignment unit and most often the variable will be assigned to itself. - * @return {string} - */ - get finalValue(): string; - /** - * Create list of variables to fetch from a unit. - * Note: this is used for the `input` field for an assignment unit. - * @param {string} flowchartId - flowchartId of unit containing context variables - * @return {Object|{scope, name}} - */ - useVariablesFromUnitContext(flowchartId: string): Object | { - scope: any; - name: any; - }; -} diff --git a/dist/js/subworkflows/convergence/parameter.js b/dist/js/subworkflows/convergence/parameter.js deleted file mode 100644 index 1bc2db91..00000000 --- a/dist/js/subworkflows/convergence/parameter.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ConvergenceParameter = void 0; -/* eslint-disable class-methods-use-this */ -const lodash_1 = __importDefault(require("lodash")); -class ConvergenceParameter { - constructor({ name, initialValue, increment }) { - this.name = name; - this._initialValue = initialValue; - this._increment = increment; - } - /** - * Getter for initial value as string. - * Note: this will be used in assignment unit. - * @return {string} - */ - get initialValue() { - if (!lodash_1.default.isString(this._initialValue)) { - return JSON.stringify(this._initialValue); - } - return this._initialValue; - } - /** - * @summary Defines how to increment the parameter. - * @return {string} - increment operation used in assignment unit - */ - get increment() { - return ""; // overwrite in derived class - } - /** - * Defines content for updating the unit context - * @return {Object} - */ - get unitContext() { - return {}; - } - /** - * Defines value once convergence is reached (for 'exit' unit). - * Note: This is used in assignment unit and most often the variable will be assigned to itself. - * @return {string} - */ - get finalValue() { - return `${this.name}`; - } - /** - * Create list of variables to fetch from a unit. - * Note: this is used for the `input` field for an assignment unit. - * @param {string} flowchartId - flowchartId of unit containing context variables - * @return {Object|{scope, name}} - */ - // eslint-disable-next-line class-methods-use-this, no-unused-vars - useVariablesFromUnitContext(flowchartId) { - return []; - } -} -exports.ConvergenceParameter = ConvergenceParameter; diff --git a/dist/js/subworkflows/convergence/uniform_kgrid.d.ts b/dist/js/subworkflows/convergence/uniform_kgrid.d.ts deleted file mode 100644 index eb7d79ed..00000000 --- a/dist/js/subworkflows/convergence/uniform_kgrid.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export class UniformKGridConvergence extends ConvergenceParameter { - get unitContext(): { - kgrid: { - dimensions: string[]; - shifts: number[]; - }; - isKgridEdited: boolean; - isUsingJinjaVariables: boolean; - }; -} -import { ConvergenceParameter } from "./parameter"; diff --git a/dist/js/subworkflows/convergence/uniform_kgrid.js b/dist/js/subworkflows/convergence/uniform_kgrid.js deleted file mode 100644 index 0cbf07b5..00000000 --- a/dist/js/subworkflows/convergence/uniform_kgrid.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UniformKGridConvergence = void 0; -const parameter_1 = require("./parameter"); -class UniformKGridConvergence extends parameter_1.ConvergenceParameter { - get increment() { - return `${this.name} + ${this._increment}`; - } - get unitContext() { - return { - kgrid: { - dimensions: [`{{${this.name}}}`, `{{${this.name}}}`, `{{${this.name}}}`], - shifts: [0, 0, 0], - }, - isKgridEdited: true, - isUsingJinjaVariables: true, - }; - } - get finalValue() { - return `${this.name} + 0`; - } -} -exports.UniformKGridConvergence = UniformKGridConvergence; diff --git a/dist/js/subworkflows/create.d.ts b/dist/js/subworkflows/create.d.ts deleted file mode 100644 index a42f6bd4..00000000 --- a/dist/js/subworkflows/create.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @summary Create workflow unit from JSON configuration - * Supports applying functions to the builder prior to building via "functions" - * Supports applying attributes to the builder after building via "attributes" - * @param config {Object} unit config - * @param application {*} application - * @param unitBuilders {Object} workflow unit builders - * @param unitFactoryCls {*} workflow unit class factory - * @returns {*|{head: boolean, preProcessors: [], postProcessors: [], name: *, flowchartId: *, type: *, results: [], monitors: []}} - */ -export function createUnit({ config, application, unitBuilders, unitFactoryCls, cache }: Object): any | { - head: boolean; - preProcessors: []; - postProcessors: []; - name: any; - flowchartId: any; - type: any; - results: []; - monitors: []; -}; -export function createSubworkflow({ subworkflowData, cache, AppRegistry, modelFactoryCls, methodFactoryCls, subworkflowCls, unitFactoryCls, unitBuilders, }: { - subworkflowData: any; - cache?: never[] | undefined; - AppRegistry?: typeof ApplicationRegistry | undefined; - modelFactoryCls?: typeof ModelFactory | undefined; - methodFactoryCls?: typeof MethodFactory | undefined; - subworkflowCls?: typeof Subworkflow | undefined; - unitFactoryCls?: typeof UnitFactory | undefined; - unitBuilders?: { - UnitConfigBuilder: typeof import("../units/builders/UnitConfigBuilder").UnitConfigBuilder; - AssignmentUnitConfigBuilder: typeof import("../units/builders/AssignmentUnitConfigBuilder").AssignmentUnitConfigBuilder; - AssertionUnitConfigBuilder: typeof import("../units/builders/AssertionUnitConfigBuilder").AssertionUnitConfigBuilder; - ExecutionUnitConfigBuilder: typeof import("../units/builders/ExecutionUnitConfigBuilder").ExecutionUnitConfigBuilder; - IOUnitConfigBuilder: typeof import("../units/builders/IOUnitConfigBuilder").IOUnitConfigBuilder; - } | undefined; -}): Subworkflow; -/** - * @summary Convenience wrapper around createSubworkflow to create by app name and swf name - * @param appName {String} application name - * @param swfName {String} subworkflow name (snake_case.yml) - * @param workflowSubworkflowMapByApplication {Object} object containing all workflow/subworkflow map by application - * @param swArgs {Object} classes for instantiation - * @returns {*} subworkflow object - */ -export function createSubworkflowByName({ appName, swfName, workflowSubworkflowMapByApplication, ...swArgs }: string): any; -import { ApplicationRegistry } from "@mat3ra/ade"; -import { ModelFactory } from "@mat3ra/mode"; -import { MethodFactory } from "@mat3ra/mode"; -import { Subworkflow } from "./subworkflow"; -import { UnitFactory } from "../units"; diff --git a/dist/js/subworkflows/create.js b/dist/js/subworkflows/create.js deleted file mode 100644 index ed8ad415..00000000 --- a/dist/js/subworkflows/create.js +++ /dev/null @@ -1,177 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createUnit = createUnit; -exports.createSubworkflow = createSubworkflow; -exports.createSubworkflowByName = createSubworkflowByName; -const ade_1 = require("@mat3ra/ade"); -const mode_1 = require("@mat3ra/mode"); -const standata_1 = require("@mat3ra/standata"); -const lodash_1 = __importDefault(require("lodash")); -const units_1 = require("../units"); -const builders_1 = require("../units/builders"); -const utils_1 = require("../utils"); -const dynamic_1 = require("./dynamic"); -const subworkflow_1 = require("./subworkflow"); -// NOTE: DFTModel => DFTModelConfig, configs should have the same name as the model/method class + "Config" at the end -function _getConfigFromModelOrMethodName(name, kind) { - const configs = kind === "Model" ? mode_1.default_models : mode_1.default_methods; - if (!configs[`${name}Config`]) { - // eslint-disable-next-line no-param-reassign - name = `Unknown${kind}`; - } - return configs[`${name}Config`]; -} -/** - * @summary Create model from subworkflow data - * @param config {Object} model config - * @param modelFactoryCls {any} model factory to use - * @returns {DFTModel|Model} - */ -function createModel({ config, modelFactoryCls }) { - const { name, config: modelConfig = {} } = config; - const defaultConfig = _getConfigFromModelOrMethodName(name, "Model"); - return modelFactoryCls.create({ ...defaultConfig, ...modelConfig }); -} -/** - * @summary Create method from subworkflow data - * @param config {Object} method configuration - * @param methodFactoryCls {any} - * @param applicationConfig {Object} application configuration - * @returns {{method, setSearchText}} - */ -function createMethod({ config, methodFactoryCls, applicationConfig = {} }) { - const { name, setSearchText = null, config: methodConfig = {} } = config; - const defaultConfig = _getConfigFromModelOrMethodName(name, "Method"); - const defaultConfigForApp = new standata_1.ApplicationMethodStandata().getDefaultMethodConfigForApplication(applicationConfig); - const defaultConfigForAppSimple = defaultConfigForApp && defaultConfigForApp.units - ? mode_1.MethodConversionHandler.convertToSimple(defaultConfigForApp) - : defaultConfigForApp; - const method = methodFactoryCls.create({ - ...defaultConfig, - ...defaultConfigForAppSimple, - ...methodConfig, - }); - return { method, setSearchText }; -} -/** - * @summary Create top-level objects used in subworkflow initialization - * @param subworkflowData {Object} subworkflow data - * @param AppRegistry - * @param modelFactoryCls {any} model factory class - * @param methodFactoryCls {any} method factory class - * @returns {{application: *, method: *, model: (DFTModel|Model), setSearchText: String|null}} - */ -function createTopLevel({ subworkflowData, modelFactoryCls, methodFactoryCls, AppRegistry }) { - const { application: appConfig, model: modelConfig, method: methodConfig } = subworkflowData; - const application = AppRegistry.createApplication(appConfig); - const model = createModel({ config: modelConfig, modelFactoryCls }); - const { method, setSearchText } = createMethod({ - config: methodConfig, - methodFactoryCls, - applicationConfig: appConfig, - }); - return { - application, - model, - method, - setSearchText, - }; -} -/** - * @summary Create workflow unit from JSON configuration - * Supports applying functions to the builder prior to building via "functions" - * Supports applying attributes to the builder after building via "attributes" - * @param config {Object} unit config - * @param application {*} application - * @param unitBuilders {Object} workflow unit builders - * @param unitFactoryCls {*} workflow unit class factory - * @returns {*|{head: boolean, preProcessors: [], postProcessors: [], name: *, flowchartId: *, type: *, results: [], monitors: []}} - */ -function createUnit({ config, application, unitBuilders, unitFactoryCls, cache = [] }) { - const { type, config: unitConfig } = config; - if (type === "executionBuilder") { - const { name, execName, flavorName, flowchartId } = unitConfig; - const builder = new unitBuilders.ExecutionUnitConfigBuilder(name, application, execName, flavorName, flowchartId, cache); - // config should contain "functions" and "attributes" - const cfg = (0, utils_1.applyConfig)({ obj: builder, config, callBuild: true }); - return unitFactoryCls.create(cfg); - } - return unitFactoryCls.create({ type, ...unitConfig }); -} -/** - * @summary Dynamically create subworkflow units - * @param dynamicSubworkflow {String} name of unit creation function - * @param units {Array} configured units to provide to dynamic unit creation - * @param unitBuilders {Object} unit configuration builders - * @param unitFactoryCls {*} unit factory class - * @param application {*} application (optional) - * @returns {*} - */ -function createDynamicUnits({ dynamicSubworkflow, units, unitBuilders, unitFactoryCls, application = null, }) { - const { name, subfolder } = dynamicSubworkflow; - const func = subfolder && lodash_1.default.get(dynamic_1.dynamicSubworkflowsByApp, `${subfolder}.${name}`, () => { }); - switch (name) { - case "surfaceEnergy": - // eslint-disable-next-line no-case-declarations - const [scfUnit] = units; - return (0, dynamic_1.getSurfaceEnergySubworkflowUnits)({ scfUnit, unitBuilders }); - case "getQpointIrrep": - return func({ unitBuilders, unitFactoryCls, application }); - default: - throw new Error(`dynamicSubworkflow=${name} not recognized`); - } -} -function createSubworkflow({ subworkflowData, cache = [], AppRegistry = ade_1.ApplicationRegistry, modelFactoryCls = mode_1.ModelFactory, methodFactoryCls = mode_1.MethodFactory, subworkflowCls = subworkflow_1.Subworkflow, unitFactoryCls = units_1.UnitFactory, unitBuilders = builders_1.builders, }) { - const { application, model, method, setSearchText } = createTopLevel({ - subworkflowData, - AppRegistry, - modelFactoryCls, - methodFactoryCls, - }); - let units = []; - const { name, units: unitConfigs, config = {}, dynamicSubworkflow = null } = subworkflowData; - unitConfigs.forEach((_config) => { - units.push(createUnit({ - config: _config, - application, - unitBuilders, - unitFactoryCls, - cache, - })); - }); - if (dynamicSubworkflow) { - units = createDynamicUnits({ - dynamicSubworkflow, - units, - unitBuilders, - unitFactoryCls, - application, - }); - } - let subworkflow = subworkflowCls.fromArguments(application, model, method, name, units, config); - const { functions = {}, attributes = {} } = config; - subworkflow = (0, utils_1.applyConfig)({ obj: subworkflow, config: { functions, attributes } }); - if (setSearchText) - subworkflow.model.Method.setSearchText(setSearchText); - return subworkflow; -} -/** - * @summary Convenience wrapper around createSubworkflow to create by app name and swf name - * @param appName {String} application name - * @param swfName {String} subworkflow name (snake_case.yml) - * @param workflowSubworkflowMapByApplication {Object} object containing all workflow/subworkflow map by application - * @param swArgs {Object} classes for instantiation - * @returns {*} subworkflow object - */ -function createSubworkflowByName({ appName, swfName, workflowSubworkflowMapByApplication, ...swArgs }) { - const { subworkflows } = workflowSubworkflowMapByApplication; - const { [appName]: allSubworkflowData } = subworkflows; - const { [swfName]: subworkflowData } = allSubworkflowData; - return createSubworkflow({ - subworkflowData, - ...swArgs, - }); -} diff --git a/dist/js/subworkflows/dynamic/espresso/getQpointIrrep.d.ts b/dist/js/subworkflows/dynamic/espresso/getQpointIrrep.d.ts deleted file mode 100644 index 7c5bdc2f..00000000 --- a/dist/js/subworkflows/dynamic/espresso/getQpointIrrep.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @summary Get QptIrr units used in phonon map calculations - * @param unitBuilders {Object} unit builders - * @param unitFactoryCls {*} unit factory class - * @param application {*} application instance - * @returns {[{head: boolean, preProcessors: [], postProcessors: [], name: *, flowchartId: *, type: *, results: [], monitors: []},*]} - */ -export function getQpointIrrep({ unitBuilders, unitFactoryCls, application }: Object): [{ - head: boolean; - preProcessors: []; - postProcessors: []; - name: any; - flowchartId: any; - type: any; - results: []; - monitors: []; -}, any]; diff --git a/dist/js/subworkflows/dynamic/espresso/getQpointIrrep.js b/dist/js/subworkflows/dynamic/espresso/getQpointIrrep.js deleted file mode 100644 index fba0720b..00000000 --- a/dist/js/subworkflows/dynamic/espresso/getQpointIrrep.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getQpointIrrep = getQpointIrrep; -const enums_1 = require("../../../enums"); -/** - * @summary Get QptIrr units used in phonon map calculations - * @param unitBuilders {Object} unit builders - * @param unitFactoryCls {*} unit factory class - * @param application {*} application instance - * @returns {[{head: boolean, preProcessors: [], postProcessors: [], name: *, flowchartId: *, type: *, results: [], monitors: []},*]} - */ -function getQpointIrrep({ unitBuilders, unitFactoryCls, application }) { - const { ExecutionUnitConfigBuilder } = unitBuilders; - const pythonUnit = new ExecutionUnitConfigBuilder("python", application, "python", "espresso_xml_get_qpt_irr").build(); - const assignmentUnit = unitFactoryCls.create({ - type: enums_1.UNIT_TYPES.assignment, - input: [ - { - scope: pythonUnit.flowchartId, - name: "STDOUT", - }, - ], - operand: "Q_POINTS", - value: "json.loads(STDOUT)", - }); - return [pythonUnit, assignmentUnit]; -} diff --git a/dist/js/subworkflows/dynamic/index.d.ts b/dist/js/subworkflows/dynamic/index.d.ts deleted file mode 100644 index 6192c868..00000000 --- a/dist/js/subworkflows/dynamic/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { getSurfaceEnergySubworkflowUnits } from "./surfaceEnergy"; -export namespace dynamicSubworkflowsByApp { - namespace espresso { - export { getQpointIrrep }; - } -} -import { getQpointIrrep } from "./espresso/getQpointIrrep"; -export { getSurfaceEnergySubworkflowUnits }; diff --git a/dist/js/subworkflows/dynamic/index.js b/dist/js/subworkflows/dynamic/index.js deleted file mode 100644 index bd706c58..00000000 --- a/dist/js/subworkflows/dynamic/index.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.dynamicSubworkflowsByApp = exports.getSurfaceEnergySubworkflowUnits = void 0; -const getQpointIrrep_1 = require("./espresso/getQpointIrrep"); -const surfaceEnergy_1 = require("./surfaceEnergy"); -Object.defineProperty(exports, "getSurfaceEnergySubworkflowUnits", { enumerable: true, get: function () { return surfaceEnergy_1.getSurfaceEnergySubworkflowUnits; } }); -const dynamicSubworkflowsByApp = { - espresso: { getQpointIrrep: getQpointIrrep_1.getQpointIrrep }, -}; -exports.dynamicSubworkflowsByApp = dynamicSubworkflowsByApp; diff --git a/dist/js/subworkflows/dynamic/surfaceEnergy.d.ts b/dist/js/subworkflows/dynamic/surfaceEnergy.d.ts deleted file mode 100644 index b2b79dcc..00000000 --- a/dist/js/subworkflows/dynamic/surfaceEnergy.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function getSurfaceEnergySubworkflowUnits({ scfUnit, unitBuilders }: { - scfUnit: any; - unitBuilders: any; -}): any[]; diff --git a/dist/js/subworkflows/dynamic/surfaceEnergy.js b/dist/js/subworkflows/dynamic/surfaceEnergy.js deleted file mode 100644 index 60667d4e..00000000 --- a/dist/js/subworkflows/dynamic/surfaceEnergy.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getSurfaceEnergySubworkflowUnits = getSurfaceEnergySubworkflowUnits; -const utils_1 = require("@mat3ra/utils"); -function getIOUnitEndpointOptions(query, projection = "{}") { - return { - params: { - query, - projection, - }, - }; -} -function getAssignmentUnitInput(unit, name) { - return [ - { - name, - scope: unit.flowchartId, - }, - ]; -} -function getSurfaceEnergySubworkflowUnits({ scfUnit, unitBuilders }) { - const { IOUnitConfigBuilder, AssignmentUnitConfigBuilder, AssertionUnitConfigBuilder } = unitBuilders; - let input, endpointOptions; - endpointOptions = getIOUnitEndpointOptions("{'_id': MATERIAL_ID}"); - const getSlabUnit = new IOUnitConfigBuilder("io-slab", "materials", endpointOptions).build(); - input = getAssignmentUnitInput(getSlabUnit, "DATA"); - const setSlabUnit = new AssignmentUnitConfigBuilder("slab", "SLAB", "DATA[0]", input).build(); - endpointOptions = getIOUnitEndpointOptions("{'_id': SLAB.metadata.bulkId}"); - const getBulkUnit = new IOUnitConfigBuilder("io-bulk", "materials", endpointOptions).build(); - const BULKValue = "DATA[0] if DATA else None"; - input = getAssignmentUnitInput(getBulkUnit, "DATA"); - const setBulkUnit = new AssignmentUnitConfigBuilder("bulk", "BULK", BULKValue, input).build(); - const assertBulkUnit = new AssertionUnitConfigBuilder("assert-bulk", "BULK != None", "Bulk material does not exist!").build(); - const query = utils_1.Utils.str.removeNewLinesAndExtraSpaces(`{ - 'exabyteId': BULK.exabyteId, - 'data.name': 'total_energy', - 'group': {'$regex': ''.join((SUBWORKFLOW.application.shortName, ':'))} - }`); - // Do not confuse `sort` with `$sort`. `sort` is used in meteor collections and `$sort` is used in Mongo queries. - const projection = "{'sort': {'precision.value': -1}, 'limit': 1}"; - endpointOptions = getIOUnitEndpointOptions(query, projection); - const getEBulkUnit = new IOUnitConfigBuilder("io-e-bulk", "refined-properties", endpointOptions).build(); - input = getAssignmentUnitInput(getEBulkUnit, "DATA"); - const EBULKValue = "DATA[0].data.value if DATA else None"; - const setEBulkUnit = new AssignmentUnitConfigBuilder("e-bulk", "E_BULK", EBULKValue, input).build(); - const assertEBulkUnit = new AssertionUnitConfigBuilder("assert-e-bulk", "E_BULK != None", "E_BULK does not exist!").build(); - const AValue = "np.linalg.norm(np.cross(SLAB.lattice.vectors.a, SLAB.lattice.vectors.b))"; - const setSurfaceUnit = new AssignmentUnitConfigBuilder("surface", "A", AValue).build(); - const setNBulkUnit = new AssignmentUnitConfigBuilder("n-bulk", "N_BULK", "len(BULK.basis.elements)").build(); - const setNSlabUnit = new AssignmentUnitConfigBuilder("n-slab", "N_SLAB", "len(SLAB.basis.elements)").build(); - input = getAssignmentUnitInput(scfUnit, "total_energy"); - const setESlabUnit = new AssignmentUnitConfigBuilder("e-slab", "E_SLAB", "total_energy", input).build(); - const results = [{ name: "surface_energy" }]; - const SEValue = "1 / (2 * A) * (E_SLAB - E_BULK * (N_SLAB/N_BULK))"; - const surfaceEnergyUnit = new AssignmentUnitConfigBuilder("surface-energy", "SURFACE_ENERGY", SEValue, [], results).build(); - return [ - getSlabUnit, - setSlabUnit, - getBulkUnit, - setBulkUnit, - assertBulkUnit, - getEBulkUnit, - setEBulkUnit, - assertEBulkUnit, - setSurfaceUnit, - setNBulkUnit, - setNSlabUnit, - scfUnit, - setESlabUnit, - surfaceEnergyUnit, - ]; -} diff --git a/dist/js/subworkflows/index.d.ts b/dist/js/subworkflows/index.d.ts deleted file mode 100644 index 48390ca0..00000000 --- a/dist/js/subworkflows/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { Subworkflow } from "./subworkflow"; -export { createSubworkflowByName } from "./create"; diff --git a/dist/js/subworkflows/index.js b/dist/js/subworkflows/index.js deleted file mode 100644 index ac2896d6..00000000 --- a/dist/js/subworkflows/index.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createSubworkflowByName = exports.Subworkflow = void 0; -var subworkflow_1 = require("./subworkflow"); -Object.defineProperty(exports, "Subworkflow", { enumerable: true, get: function () { return subworkflow_1.Subworkflow; } }); -var create_1 = require("./create"); -Object.defineProperty(exports, "createSubworkflowByName", { enumerable: true, get: function () { return create_1.createSubworkflowByName; } }); diff --git a/dist/js/subworkflows/subworkflow.d.ts b/dist/js/subworkflows/subworkflow.d.ts deleted file mode 100644 index 643a897b..00000000 --- a/dist/js/subworkflows/subworkflow.d.ts +++ /dev/null @@ -1,1904 +0,0 @@ -import { Application } from "@mat3ra/ade"; -import { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; -import { type DefaultableInMemoryEntityConstructor } from "@mat3ra/code/dist/js/entity/mixins/DefaultableMixin"; -import { type NamedInMemoryEntityConstructor } from "@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin"; -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { ApplicationSchema, BaseMethod, BaseModel } from "@mat3ra/esse/dist/js/types"; -import { type Method, Model, ModelFactory } from "@mat3ra/mode"; -import { type SubworkflowSchemaMixin } from "../generated/SubworkflowSchemaMixin"; -import { type BaseUnit, UnitFactory } from "../units"; -type Base = typeof InMemoryEntity & DefaultableInMemoryEntityConstructor & NamedInMemoryEntityConstructor & Constructor; -declare const Subworkflow_base: Base; -export declare class Subworkflow extends Subworkflow_base { - static usePredefinedIds: boolean; - private ModelFactory; - private UnitFactory; - private applicationInstance; - private modelInstance; - private unitsInstances; - constructor(config: SubworkflowSchemaMixin, _ModelFactory?: typeof ModelFactory, _UnitFactory?: typeof UnitFactory); - static generateSubworkflowId(name: string, application?: ApplicationSchema, model?: BaseModel, method?: BaseMethod): any; - static get defaultConfig(): { - _id: any; - name: string; - application: import("node_modules/@mat3ra/ade/dist/js/applicationMixin").DefaultApplicationConfig; - model: { - method: { - readonly type: "pseudopotential"; - readonly subtype: "us"; - }; - type: "dft"; - subtype: "gga"; - }; - properties: never[]; - units: never[]; - }; - getAsUnit(): BaseUnit; - static fromArguments(application: Application, model: Model, method: Method, name: string, units?: BaseUnit[], config?: {}, Cls?: typeof Subworkflow): Subworkflow; - setApplication(application: Application): void; - setModel(model: Model): void; - setUnits(units: BaseUnit[]): void; - toJSON(exclude?: string[]): { - compute?: { - queue: "D" | "OR" | "OF" | "OFplus" | "SR" | "SF" | "SFplus" | "GPOF" | "GP2OF" | "GP4OF" | "GPSF" | "GP2SF" | "GP4SF" | "OR4" | "OR8" | "OR16" | "SR4" | "SR8" | "SR16" | "GOF" | "G4OF" | "G8OF" | "GSF" | "G4SF" | "G8SF"; - nodes: number; - ppn: number; - timeLimit: string; - timeLimitType?: "per single attempt" | "compound"; - isRestartable?: boolean; - notify?: string; - email?: string; - maxCPU?: number; - arguments?: { - nimage?: number; - npools?: number; - nband?: number; - ntg?: number; - ndiag?: number; - }; - cluster?: { - fqdn?: string; - jid?: string; - }; - errors?: { - domain?: "rupy" | "alfred" | "celim" | "webapp"; - reason?: string; - message?: string; - traceback?: string; - }[]; - excludeFilesPattern?: string; - } | undefined; - model: import("@mat3ra/esse/dist/js/types").AnyModelSchema & import("@mat3ra/esse/dist/js/esse/types").AnyObject; - units: import("@mat3ra/esse/dist/js/esse/types").AnyObject[]; - }; - get contextProviders(): any[]; - /** - * Extracts a reduced version of the entity config to be stored inside redux state. - * This is used to track changes to context, monitors, properties, etc. when multiple materials are in state. - */ - extractReducedExternalDependentConfig(): { - id: string; - context: any; - units: any[]; - }; - /** - * Applies the reduced config obtained from extractReducedExternalDependentConfig on the entity. - */ - applyReducedExternalDependentConfig(config: any): void; - get contextFromAssignmentUnits(): {}; - render(context?: {}): void; - /** - * TODO: reuse workflow function instead - */ - addUnit(unit: BaseUnit, index?: number): void; - removeUnit(flowchartId: string): void; - get properties(): any[]; - getUnit(flowchartId: string): { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "io"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - subtype: "input" | "output" | "dataFrame"; - source: "api" | "db" | "object_storage"; - input: ({ - type: "db_ids"; - ids: string[]; - } | { - type: "db_collection"; - collection: string; - draft: boolean; - } | { - type: "object_storage"; - objectData: { - CONTAINER?: string; - NAME?: string; - PROVIDER?: string; - REGION?: string; - SIZE?: number; - TIMESTAMP?: string; - }; - overwrite?: boolean; - pathname?: string; - basename?: string; - filetype?: string; - })[]; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "condition"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - input: { - scope: string; - name: string; - }[]; - statement: string; - then: string; - else: string; - maxOccurrences: number; - throwException?: boolean; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "assertion"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - statement: string; - errorMessage?: string; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "execution"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - application: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - shortName: string; - summary: string; - version: string; - build: string; - hasAdvancedComputeOptions?: boolean; - isLicensed?: boolean; - }; - executable: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - applicationId: string[]; - hasAdvancedComputeOptions?: boolean; - }; - flavor: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - executableId: string; - executableName?: string; - applicationName?: string; - input: { - templateId?: string; - templateName?: string; - name?: string; - }[]; - supportedApplicationVersions?: string[]; - }; - input: { - template: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - applicationName: string; - applicationVersion?: string; - executableName: string; - contextProviders: { - name: import("@mat3ra/esse/dist/js/types").ContextProviderNameEnum; - }[]; - content: string; - }; - rendered: string; - isManuallyChanged: boolean; - }[]; - context: ({ - name: "input"; - data: { - contextProviderName: "nwchem-total-energy"; - CHARGE: number; - MULT: number; - BASIS: string; - NAT: number; - NTYP: number; - ATOMIC_POSITIONS: string; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; - ATOMIC_SPECIES: string; - FUNCTIONAL: string; - CARTESIAN: boolean; - } | { - IBRAV: number; - RESTART_MODE: "from_scratch" | "restart"; - ATOMIC_SPECIES: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - ATOMIC_SPECIES_WITH_LABELS: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - NAT: number; - NTYP: number; - NTYP_WITH_LABELS: number; - ATOMIC_POSITIONS?: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS?: string; - CELL_PARAMETERS: { - v1?: [number, number, number]; - v2?: [number, number, number]; - v3?: [number, number, number]; - }; - FIRST_IMAGE: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - LAST_IMAGE: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - INTERMEDIATE_IMAGES: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[][]; - contextProviderName: "qe-neb"; - } | { - IBRAV: number; - RESTART_MODE: "from_scratch" | "restart"; - ATOMIC_SPECIES: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - ATOMIC_SPECIES_WITH_LABELS: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - NAT: number; - NTYP: number; - NTYP_WITH_LABELS: number; - ATOMIC_POSITIONS: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; - CELL_PARAMETERS: { - v1?: [number, number, number]; - v2?: [number, number, number]; - v3?: [number, number, number]; - }; - contextProviderName: "qe-pwx"; - } | { - POSCAR: string; - POSCAR_WITH_CONSTRAINTS: string; - contextProviderName: "vasp"; - } | { - FIRST_IMAGE: string; - LAST_IMAGE: string; - INTERMEDIATE_IMAGES: string[]; - contextProviderName: "vasp-neb"; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "cutoffs"; - data: { - wavefunction?: number; - density?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "kgrid" | "qgrid" | "igrid"; - data: { - dimensions: [number, number, number] | [string, string, string]; - shifts?: [number, number, number]; - reciprocalVectorRatios?: [number, number, number]; - gridMetricType: "KPPRA" | "spacing"; - gridMetricValue: number; - preferGridMetric?: boolean; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "qpath" | "ipath" | "kpath" | "explicitKPath" | "explicitKPath2PIBA"; - data: [{ - point?: string; - steps: number; - coordinates: number[]; - }, ...{ - point?: string; - steps: number; - coordinates: number[]; - }[]]; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "hubbard_j"; - data: [{ - paramType?: "U" | "J" | "B" | "E2" | "E3"; - atomicSpecies?: string; - atomicOrbital?: string; - value?: number; - }, ...{ - paramType?: "U" | "J" | "B" | "E2" | "E3"; - atomicSpecies?: string; - atomicOrbital?: string; - value?: number; - }[]]; - isEdited: boolean; - extraData: {}; - } | { - name: "hubbard_u"; - data: { - atomicSpecies?: string; - atomicOrbital?: string; - hubbardUValue?: number; - }[]; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "hubbard_v"; - data: [{ - atomicSpecies?: string; - siteIndex?: number; - atomicOrbital?: string; - atomicSpecies2?: string; - siteIndex2?: number; - atomicOrbital2?: string; - hubbardVValue?: number; - }, ...{ - atomicSpecies?: string; - siteIndex?: number; - atomicOrbital?: string; - atomicSpecies2?: string; - siteIndex2?: number; - atomicOrbital2?: string; - hubbardVValue?: number; - }[]]; - isEdited: boolean; - extraData: {}; - } | { - name: "hubbard_legacy"; - data: [{ - atomicSpecies?: string; - atomicSpeciesIndex?: number; - hubbardUValue?: number; - }, ...{ - atomicSpecies?: string; - atomicSpeciesIndex?: number; - hubbardUValue?: number; - }[]]; - isEdited: boolean; - extraData: {}; - } | { - name: "neb"; - data: { - nImages?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "boundaryConditions"; - data: { - type?: "pbc" | "bc1" | "bc2" | "bc3"; - offset?: number; - electricField?: number; - targetFermiEnergy?: number; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "mlSettings"; - data: { - target_column_name?: string; - problem_category?: "regression" | "classification" | "clustering"; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "mlTrainTestSplit"; - data: { - fraction_held_as_test_set?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "dynamics"; - data: { - numberOfSteps?: number; - timeStep?: number; - electronMass?: number; - temperature?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "collinearMagnetization"; - data: { - startingMagnetization: { - atomicSpecies: string; - value: number; - index: number; - }[]; - isTotalMagnetization: boolean; - totalMagnetization: number; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "nonCollinearMagnetization"; - data: { - isExistingChargeDensity?: boolean; - isStartingMagnetization?: boolean; - startingMagnetization?: { - index?: number; - atomicSpecies?: string; - value?: number; - }[]; - isArbitrarySpinAngle?: boolean; - isArbitrarySpinDirection?: boolean; - lforcet?: boolean; - spinAngles?: { - index?: number; - atomicSpecies?: string; - angle1?: number; - angle2?: number; - }[]; - isConstrainedMagnetization?: boolean; - constrainedMagnetization?: { - constrainType?: "none" | "total" | "atomic" | "total direction" | "atomic direction"; - lambda?: number; - }; - isFixedMagnetization?: boolean; - fixedMagnetization?: { - x?: number; - y?: number; - z?: number; - }; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - })[]; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "assignment"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - scope?: string; - input?: { - scope: string; - name: string; - }[]; - operand: string; - value: string | boolean | number; - } | undefined; - unitIndex(flowchartId: string): number; - replaceUnit(index: number, unit: BaseUnit): void; - get scopeVariables(): string[]; - get scalarResults(): string[]; - get isMultiMaterial(): boolean; - get isDraft(): boolean; - setIsDraft(bool: boolean): void; - get methodData(): any; - /** - * @summary Calculates hash of the subworkflow. Meaningful fields are units, app and model. - * units must be sorted topologically before hashing (already sorted). - */ - calculateHash(): string; - _calculateModelHash(): string; - findUnitById(id: string): { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "io"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - subtype: "input" | "output" | "dataFrame"; - source: "api" | "db" | "object_storage"; - input: ({ - type: "db_ids"; - ids: string[]; - } | { - type: "db_collection"; - collection: string; - draft: boolean; - } | { - type: "object_storage"; - objectData: { - CONTAINER?: string; - NAME?: string; - PROVIDER?: string; - REGION?: string; - SIZE?: number; - TIMESTAMP?: string; - }; - overwrite?: boolean; - pathname?: string; - basename?: string; - filetype?: string; - })[]; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "condition"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - input: { - scope: string; - name: string; - }[]; - statement: string; - then: string; - else: string; - maxOccurrences: number; - throwException?: boolean; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "assertion"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - statement: string; - errorMessage?: string; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "execution"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - application: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - shortName: string; - summary: string; - version: string; - build: string; - hasAdvancedComputeOptions?: boolean; - isLicensed?: boolean; - }; - executable: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - applicationId: string[]; - hasAdvancedComputeOptions?: boolean; - }; - flavor: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - executableId: string; - executableName?: string; - applicationName?: string; - input: { - templateId?: string; - templateName?: string; - name?: string; - }[]; - supportedApplicationVersions?: string[]; - }; - input: { - template: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - applicationName: string; - applicationVersion?: string; - executableName: string; - contextProviders: { - name: import("@mat3ra/esse/dist/js/types").ContextProviderNameEnum; - }[]; - content: string; - }; - rendered: string; - isManuallyChanged: boolean; - }[]; - context: ({ - name: "input"; - data: { - contextProviderName: "nwchem-total-energy"; - CHARGE: number; - MULT: number; - BASIS: string; - NAT: number; - NTYP: number; - ATOMIC_POSITIONS: string; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; - ATOMIC_SPECIES: string; - FUNCTIONAL: string; - CARTESIAN: boolean; - } | { - IBRAV: number; - RESTART_MODE: "from_scratch" | "restart"; - ATOMIC_SPECIES: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - ATOMIC_SPECIES_WITH_LABELS: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - NAT: number; - NTYP: number; - NTYP_WITH_LABELS: number; - ATOMIC_POSITIONS?: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS?: string; - CELL_PARAMETERS: { - v1?: [number, number, number]; - v2?: [number, number, number]; - v3?: [number, number, number]; - }; - FIRST_IMAGE: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - LAST_IMAGE: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - INTERMEDIATE_IMAGES: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[][]; - contextProviderName: "qe-neb"; - } | { - IBRAV: number; - RESTART_MODE: "from_scratch" | "restart"; - ATOMIC_SPECIES: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - ATOMIC_SPECIES_WITH_LABELS: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - NAT: number; - NTYP: number; - NTYP_WITH_LABELS: number; - ATOMIC_POSITIONS: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; - CELL_PARAMETERS: { - v1?: [number, number, number]; - v2?: [number, number, number]; - v3?: [number, number, number]; - }; - contextProviderName: "qe-pwx"; - } | { - POSCAR: string; - POSCAR_WITH_CONSTRAINTS: string; - contextProviderName: "vasp"; - } | { - FIRST_IMAGE: string; - LAST_IMAGE: string; - INTERMEDIATE_IMAGES: string[]; - contextProviderName: "vasp-neb"; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "cutoffs"; - data: { - wavefunction?: number; - density?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "kgrid" | "qgrid" | "igrid"; - data: { - dimensions: [number, number, number] | [string, string, string]; - shifts?: [number, number, number]; - reciprocalVectorRatios?: [number, number, number]; - gridMetricType: "KPPRA" | "spacing"; - gridMetricValue: number; - preferGridMetric?: boolean; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "qpath" | "ipath" | "kpath" | "explicitKPath" | "explicitKPath2PIBA"; - data: [{ - point?: string; - steps: number; - coordinates: number[]; - }, ...{ - point?: string; - steps: number; - coordinates: number[]; - }[]]; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "hubbard_j"; - data: [{ - paramType?: "U" | "J" | "B" | "E2" | "E3"; - atomicSpecies?: string; - atomicOrbital?: string; - value?: number; - }, ...{ - paramType?: "U" | "J" | "B" | "E2" | "E3"; - atomicSpecies?: string; - atomicOrbital?: string; - value?: number; - }[]]; - isEdited: boolean; - extraData: {}; - } | { - name: "hubbard_u"; - data: { - atomicSpecies?: string; - atomicOrbital?: string; - hubbardUValue?: number; - }[]; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "hubbard_v"; - data: [{ - atomicSpecies?: string; - siteIndex?: number; - atomicOrbital?: string; - atomicSpecies2?: string; - siteIndex2?: number; - atomicOrbital2?: string; - hubbardVValue?: number; - }, ...{ - atomicSpecies?: string; - siteIndex?: number; - atomicOrbital?: string; - atomicSpecies2?: string; - siteIndex2?: number; - atomicOrbital2?: string; - hubbardVValue?: number; - }[]]; - isEdited: boolean; - extraData: {}; - } | { - name: "hubbard_legacy"; - data: [{ - atomicSpecies?: string; - atomicSpeciesIndex?: number; - hubbardUValue?: number; - }, ...{ - atomicSpecies?: string; - atomicSpeciesIndex?: number; - hubbardUValue?: number; - }[]]; - isEdited: boolean; - extraData: {}; - } | { - name: "neb"; - data: { - nImages?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "boundaryConditions"; - data: { - type?: "pbc" | "bc1" | "bc2" | "bc3"; - offset?: number; - electricField?: number; - targetFermiEnergy?: number; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "mlSettings"; - data: { - target_column_name?: string; - problem_category?: "regression" | "classification" | "clustering"; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "mlTrainTestSplit"; - data: { - fraction_held_as_test_set?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "dynamics"; - data: { - numberOfSteps?: number; - timeStep?: number; - electronMass?: number; - temperature?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "collinearMagnetization"; - data: { - startingMagnetization: { - atomicSpecies: string; - value: number; - index: number; - }[]; - isTotalMagnetization: boolean; - totalMagnetization: number; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "nonCollinearMagnetization"; - data: { - isExistingChargeDensity?: boolean; - isStartingMagnetization?: boolean; - startingMagnetization?: { - index?: number; - atomicSpecies?: string; - value?: number; - }[]; - isArbitrarySpinAngle?: boolean; - isArbitrarySpinDirection?: boolean; - lforcet?: boolean; - spinAngles?: { - index?: number; - atomicSpecies?: string; - angle1?: number; - angle2?: number; - }[]; - isConstrainedMagnetization?: boolean; - constrainedMagnetization?: { - constrainType?: "none" | "total" | "atomic" | "total direction" | "atomic direction"; - lambda?: number; - }; - isFixedMagnetization?: boolean; - fixedMagnetization?: { - x?: number; - y?: number; - z?: number; - }; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - })[]; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "assignment"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - scope?: string; - input?: { - scope: string; - name: string; - }[]; - operand: string; - value: string | boolean | number; - } | undefined; - findUnitKeyById(id: string): string; - findUnitWithTag(tag: string): { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "io"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - subtype: "input" | "output" | "dataFrame"; - source: "api" | "db" | "object_storage"; - input: ({ - type: "db_ids"; - ids: string[]; - } | { - type: "db_collection"; - collection: string; - draft: boolean; - } | { - type: "object_storage"; - objectData: { - CONTAINER?: string; - NAME?: string; - PROVIDER?: string; - REGION?: string; - SIZE?: number; - TIMESTAMP?: string; - }; - overwrite?: boolean; - pathname?: string; - basename?: string; - filetype?: string; - })[]; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "condition"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - input: { - scope: string; - name: string; - }[]; - statement: string; - then: string; - else: string; - maxOccurrences: number; - throwException?: boolean; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "assertion"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - statement: string; - errorMessage?: string; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "execution"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - application: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - shortName: string; - summary: string; - version: string; - build: string; - hasAdvancedComputeOptions?: boolean; - isLicensed?: boolean; - }; - executable: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - applicationId: string[]; - hasAdvancedComputeOptions?: boolean; - }; - flavor: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - executableId: string; - executableName?: string; - applicationName?: string; - input: { - templateId?: string; - templateName?: string; - name?: string; - }[]; - supportedApplicationVersions?: string[]; - }; - input: { - template: { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - applicationName: string; - applicationVersion?: string; - executableName: string; - contextProviders: { - name: import("@mat3ra/esse/dist/js/types").ContextProviderNameEnum; - }[]; - content: string; - }; - rendered: string; - isManuallyChanged: boolean; - }[]; - context: ({ - name: "input"; - data: { - contextProviderName: "nwchem-total-energy"; - CHARGE: number; - MULT: number; - BASIS: string; - NAT: number; - NTYP: number; - ATOMIC_POSITIONS: string; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; - ATOMIC_SPECIES: string; - FUNCTIONAL: string; - CARTESIAN: boolean; - } | { - IBRAV: number; - RESTART_MODE: "from_scratch" | "restart"; - ATOMIC_SPECIES: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - ATOMIC_SPECIES_WITH_LABELS: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - NAT: number; - NTYP: number; - NTYP_WITH_LABELS: number; - ATOMIC_POSITIONS?: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS?: string; - CELL_PARAMETERS: { - v1?: [number, number, number]; - v2?: [number, number, number]; - v3?: [number, number, number]; - }; - FIRST_IMAGE: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - LAST_IMAGE: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - INTERMEDIATE_IMAGES: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[][]; - contextProviderName: "qe-neb"; - } | { - IBRAV: number; - RESTART_MODE: "from_scratch" | "restart"; - ATOMIC_SPECIES: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - ATOMIC_SPECIES_WITH_LABELS: { - X: string; - Mass_X: number; - PseudoPot_X: string; - }[]; - NAT: number; - NTYP: number; - NTYP_WITH_LABELS: number; - ATOMIC_POSITIONS: { - X?: string; - x: number; - y: number; - z: number; - "if_pos(1)"?: number; - "if_pos(2)"?: number; - "if_pos(3)"?: number; - }[]; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: string; - CELL_PARAMETERS: { - v1?: [number, number, number]; - v2?: [number, number, number]; - v3?: [number, number, number]; - }; - contextProviderName: "qe-pwx"; - } | { - POSCAR: string; - POSCAR_WITH_CONSTRAINTS: string; - contextProviderName: "vasp"; - } | { - FIRST_IMAGE: string; - LAST_IMAGE: string; - INTERMEDIATE_IMAGES: string[]; - contextProviderName: "vasp-neb"; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "cutoffs"; - data: { - wavefunction?: number; - density?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "kgrid" | "qgrid" | "igrid"; - data: { - dimensions: [number, number, number] | [string, string, string]; - shifts?: [number, number, number]; - reciprocalVectorRatios?: [number, number, number]; - gridMetricType: "KPPRA" | "spacing"; - gridMetricValue: number; - preferGridMetric?: boolean; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "qpath" | "ipath" | "kpath" | "explicitKPath" | "explicitKPath2PIBA"; - data: [{ - point?: string; - steps: number; - coordinates: number[]; - }, ...{ - point?: string; - steps: number; - coordinates: number[]; - }[]]; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "hubbard_j"; - data: [{ - paramType?: "U" | "J" | "B" | "E2" | "E3"; - atomicSpecies?: string; - atomicOrbital?: string; - value?: number; - }, ...{ - paramType?: "U" | "J" | "B" | "E2" | "E3"; - atomicSpecies?: string; - atomicOrbital?: string; - value?: number; - }[]]; - isEdited: boolean; - extraData: {}; - } | { - name: "hubbard_u"; - data: { - atomicSpecies?: string; - atomicOrbital?: string; - hubbardUValue?: number; - }[]; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "hubbard_v"; - data: [{ - atomicSpecies?: string; - siteIndex?: number; - atomicOrbital?: string; - atomicSpecies2?: string; - siteIndex2?: number; - atomicOrbital2?: string; - hubbardVValue?: number; - }, ...{ - atomicSpecies?: string; - siteIndex?: number; - atomicOrbital?: string; - atomicSpecies2?: string; - siteIndex2?: number; - atomicOrbital2?: string; - hubbardVValue?: number; - }[]]; - isEdited: boolean; - extraData: {}; - } | { - name: "hubbard_legacy"; - data: [{ - atomicSpecies?: string; - atomicSpeciesIndex?: number; - hubbardUValue?: number; - }, ...{ - atomicSpecies?: string; - atomicSpeciesIndex?: number; - hubbardUValue?: number; - }[]]; - isEdited: boolean; - extraData: {}; - } | { - name: "neb"; - data: { - nImages?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "boundaryConditions"; - data: { - type?: "pbc" | "bc1" | "bc2" | "bc3"; - offset?: number; - electricField?: number; - targetFermiEnergy?: number; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "mlSettings"; - data: { - target_column_name?: string; - problem_category?: "regression" | "classification" | "clustering"; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "mlTrainTestSplit"; - data: { - fraction_held_as_test_set?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "dynamics"; - data: { - numberOfSteps?: number; - timeStep?: number; - electronMass?: number; - temperature?: number; - }; - isEdited: boolean; - extraData: {}; - } | { - name: "collinearMagnetization"; - data: { - startingMagnetization: { - atomicSpecies: string; - value: number; - index: number; - }[]; - isTotalMagnetization: boolean; - totalMagnetization: number; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - } | { - name: "nonCollinearMagnetization"; - data: { - isExistingChargeDensity?: boolean; - isStartingMagnetization?: boolean; - startingMagnetization?: { - index?: number; - atomicSpecies?: string; - value?: number; - }[]; - isArbitrarySpinAngle?: boolean; - isArbitrarySpinDirection?: boolean; - lforcet?: boolean; - spinAngles?: { - index?: number; - atomicSpecies?: string; - angle1?: number; - angle2?: number; - }[]; - isConstrainedMagnetization?: boolean; - constrainedMagnetization?: { - constrainType?: "none" | "total" | "atomic" | "total direction" | "atomic direction"; - lambda?: number; - }; - isFixedMagnetization?: boolean; - fixedMagnetization?: { - x?: number; - y?: number; - z?: number; - }; - }; - extraData: { - materialHash: string; - }; - isEdited: boolean; - })[]; - } | { - _id?: string; - slug?: string; - systemName?: string; - schemaVersion?: string; - name: string; - isDefault?: boolean; - preProcessors: { - name: string; - }[]; - postProcessors: { - name: string; - }[]; - monitors: { - name: string; - }[]; - results: { - name: string; - }[]; - tags?: string[]; - status?: "idle" | "active" | "warning" | "error" | "finished"; - statusTrack?: { - trackedAt: number; - status: string; - repetition?: number; - }[]; - isDraft?: boolean; - type: "assignment"; - head?: boolean; - flowchartId: string; - next?: string; - enableRender?: boolean; - scope?: string; - input?: { - scope: string; - name: string; - }[]; - operand: string; - value: string | boolean | number; - } | undefined; - get hasConvergence(): boolean; -} -export {}; diff --git a/dist/js/subworkflows/subworkflow.js b/dist/js/subworkflows/subworkflow.js deleted file mode 100644 index 418fbdf8..00000000 --- a/dist/js/subworkflows/subworkflow.js +++ /dev/null @@ -1,266 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Subworkflow = void 0; -const ade_1 = require("@mat3ra/ade"); -const entity_1 = require("@mat3ra/code/dist/js/entity"); -const DefaultableMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/DefaultableMixin"); -const NamedEntityMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin"); -const mode_1 = require("@mat3ra/mode"); -const utils_1 = require("@mat3ra/utils"); -const lodash_1 = __importDefault(require("lodash")); -const underscore_1 = __importDefault(require("underscore")); -const enums_1 = require("../enums"); -const SubworkflowSchemaMixin_1 = require("../generated/SubworkflowSchemaMixin"); -const units_1 = require("../units"); -const utils_2 = require("../utils"); -class Subworkflow extends entity_1.InMemoryEntity { - constructor(config, _ModelFactory = mode_1.ModelFactory, _UnitFactory = units_1.UnitFactory) { - super(config); - this.ModelFactory = _ModelFactory; - this.UnitFactory = _UnitFactory; - this.applicationInstance = new ade_1.Application(this.application); - this.modelInstance = this.ModelFactory.create({ - ...this.model, - application: this.application, - }); - this.unitsInstances = (0, utils_2.setNextLinks)((0, utils_2.setUnitsHead)(this.units || []).map((cfg) => { - return this.UnitFactory.create({ ...cfg, application: this.application }); - })); - } - static generateSubworkflowId(name, application, model, method) { - const appName = (application === null || application === void 0 ? void 0 : application.name) || ""; - const modelInfo = model ? `${model.type}-${model.subtype || ""}` : ""; - const methodInfo = method ? `${method.type}-${method.subtype || ""}` : ""; - const seed = [`subworkflow-${name}`, appName, modelInfo, methodInfo] - .filter((p) => p) - .join("-"); - return this.usePredefinedIds ? utils_1.Utils.uuid.getUUIDFromNamespace(seed) : utils_1.Utils.uuid.getUUID(); - } - static get defaultConfig() { - const defaultName = "New Subworkflow"; - return { - _id: this.generateSubworkflowId(defaultName), - name: defaultName, - application: ade_1.Application.defaultConfig, - model: mode_1.Model.defaultConfig, - properties: [], - units: [], - }; - } - /* - * @returns {SubworkflowUnit} - */ - getAsUnit() { - return this.UnitFactory.create({ - type: enums_1.UnitType.subworkflow, - _id: this.id, - name: this.name, - }); - } - /* - * @summary Used to generate initial application tree, therefore omit setting application. - */ - static fromArguments(application, model, method, name, units = [], config = {}, Cls = Subworkflow) { - var _a; - const nameForIdGeneration = ((_a = config.attributes) === null || _a === void 0 ? void 0 : _a.name) || name; - const { functions, attributes, ...cleanConfig } = config; - // Set the method on the model so it can be properly serialized - model.setMethod(method); - return new Cls({ - ...cleanConfig, - _id: Cls.generateSubworkflowId(nameForIdGeneration, application, model, method), - name, - application: application.toJSON(), - properties: lodash_1.default.sortedUniq(lodash_1.default.flatten(units.filter((x) => x.resultNames).map((x) => x.resultNames))), - model: { - ...model.toJSON(), - method: method.toJSON(), - }, - units: units.map((unit) => (unit.toJSON ? unit.toJSON() : unit)), - }); - } - setApplication(application) { - // TODO: adjust the logic above to take into account whether units need re-rendering after version change etc. - // reset units if application name changes - const previousApplicationName = this.application.name; - this.applicationInstance = application; - if (previousApplicationName !== application.name) { - // TODO: figure out how to set a default unit per new application instead of removing all - this.setUnits([]); - } - else { - // propagate new application version to all units - this.units - .filter((unit) => typeof unit.setApplication === "function") - .forEach((unit) => unit.setApplication(this.applicationInstance, true)); - } - this.application = application.toJSON(); - // set model to the default one for the application selected - this.setModel(this.ModelFactory.createFromApplication({ - application: this.application, - })); - } - setModel(model) { - this.modelInstance = model; - } - setUnits(units) { - this.unitsInstances = units; - } - toJSON(exclude = []) { - return { - ...super.toJSON(exclude), - model: this.modelInstance.toJSON(), - units: this.unitsInstances.map((x) => x.toJSON()), - ...(this.compute ? { compute: this.compute } : {}), // {"compute": null } won't pass esse validation - }; - } - get contextProviders() { - const unitsWithContextProviders = this.units.filter((u) => u.allContextProviders && u.allContextProviders.length); - const allContextProviders = underscore_1.default.flatten(unitsWithContextProviders.map((u) => u.allContextProviders)); - const subworkflowContextProviders = allContextProviders.filter((p) => p.entityName === "subworkflow"); - return underscore_1.default.uniq(subworkflowContextProviders, (p) => p.name); - } - /** - * Extracts a reduced version of the entity config to be stored inside redux state. - * This is used to track changes to context, monitors, properties, etc. when multiple materials are in state. - */ - extractReducedExternalDependentConfig() { - return { - id: this.id, - context: this.context || {}, - units: this.units.map((unit) => unit.extractReducedExternalDependentConfig()), - }; - } - /** - * Applies the reduced config obtained from extractReducedExternalDependentConfig on the entity. - */ - applyReducedExternalDependentConfig(config) { - this.context = config.context || {}; - this.units.forEach((unit) => { - const unitConfig = (config.units || []).find((c) => c.id === unit.flowchartId); - unit.applyReducedExternalDependentConfig(unitConfig || {}); - }); - } - get contextFromAssignmentUnits() { - const ctx = {}; - this.units - .filter((u) => u.type === enums_1.UNIT_TYPES.assignment) - .forEach((u) => { - ctx[u.operand] = u.value; - }); - return ctx; - } - render(context = {}) { - const ctx = { - ...context, - application: this.application, - methodData: this.model.Method.data, - model: this.model.toJSON(), - // context below is assembled from context providers and passed to units to override theirs - ...this.context, - subworkflowContext: this.contextFromAssignmentUnits, - }; - this.units.forEach((u) => u.render(ctx)); - } - /** - * TODO: reuse workflow function instead - */ - addUnit(unit, index = -1) { - const { units } = this; - if (units.length === 0) { - unit.head = true; - this.setUnits([unit]); - } - else { - if (index >= 0) - units.splice(index, 0, unit); - else - units.push(unit); - this.setUnits((0, utils_2.setNextLinks)((0, utils_2.setUnitsHead)(units))); - } - } - removeUnit(flowchartId) { - const previousUnit = this.units.find((x) => x.next === flowchartId); - if (previousUnit) - previousUnit.unsetProp("next"); - // TODO: remove the setNextLinks and setUnitsHead and handle the logic via flowchart designer - this.setUnits((0, utils_2.setNextLinks)((0, utils_2.setUnitsHead)(this.units.filter((x) => x.flowchartId !== flowchartId)))); - } - get properties() { - return lodash_1.default.flatten(this.units.map((x) => x.resultNames)); - } - getUnit(flowchartId) { - return this.units.find((x) => x.flowchartId === flowchartId); - } - unitIndex(flowchartId) { - return lodash_1.default.findIndex(this.units, (unit) => { - return unit.flowchartId === flowchartId; - }); - } - replaceUnit(index, unit) { - this.units[index] = unit; - this.setUnits((0, utils_2.setNextLinks)((0, utils_2.setUnitsHead)(this.units))); - } - // eslint-disable-next-line class-methods-use-this - get scopeVariables() { - return ["N_k", "N_k_nonuniform"]; - } - // eslint-disable-next-line class-methods-use-this - get scalarResults() { - return ["total_energy", "pressure"]; - } - get isMultiMaterial() { - return this.prop("isMultiMaterial", false); - } - get isDraft() { - return this.prop("isDraft", false); - } - setIsDraft(bool) { - return this.setProp("isDraft", bool); - } - get methodData() { - return this.model.Method.data; - } - /** - * @summary Calculates hash of the subworkflow. Meaningful fields are units, app and model. - * units must be sorted topologically before hashing (already sorted). - */ - calculateHash() { - const config = this.toJSON(); - const meaningfulFields = { - application: utils_1.Utils.specific.removeTimestampableKeysFromConfig(config.application), - model: this._calculateModelHash(), - units: underscore_1.default.map(this.units, (u) => u.calculateHash()).join(), - }; - return utils_1.Utils.hash.calculateHashFromObject(meaningfulFields); - } - _calculateModelHash() { - const { model } = this.toJSON(); - // ignore empty data object - if (this.model.Method.omitInHashCalculation) - delete model.method.data; - return utils_1.Utils.hash.calculateHashFromObject(model); - } - findUnitById(id) { - // TODO: come back and refactor after converting flowchartId to id - return this.units.find((u) => u.flowchartId === id); - } - findUnitKeyById(id) { - const index = this.units.findIndex((u) => u.flowchartId === id); - return `units.${index}`; - } - findUnitWithTag(tag) { - return this.units.find((unit) => unit.tags.includes(tag)); - } - get hasConvergence() { - return !!this.convergenceParam && !!this.convergenceResult && !!this.convergenceSeries; - } -} -exports.Subworkflow = Subworkflow; -Subworkflow.usePredefinedIds = false; -(0, NamedEntityMixin_1.namedEntityMixin)(Subworkflow.prototype); -(0, DefaultableMixin_1.defaultableEntityMixin)(Subworkflow); -(0, SubworkflowSchemaMixin_1.subworkflowSchemaMixin)(Subworkflow.prototype); diff --git a/dist/js/units/AssertionUnit.d.ts b/dist/js/units/AssertionUnit.d.ts index 50b4fd43..d9cf02c2 100644 --- a/dist/js/units/AssertionUnit.d.ts +++ b/dist/js/units/AssertionUnit.d.ts @@ -1,15 +1,18 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { AssertionUnitSchema } from "@mat3ra/esse/dist/js/types"; import { type AssertionUnitSchemaMixin } from "../generated/AssertionUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = AssertionUnitSchema; type Base = typeof BaseUnit & Constructor; declare const AssertionUnit_base: Base; -export declare class AssertionUnit extends AssertionUnit_base implements Schema { +declare class AssertionUnit extends AssertionUnit_base implements Schema { + toJSON: () => Schema & AnyObject; + _json: Schema & AnyObject; constructor(config: Partial); getHashObject(): { statement: string; errorMessage: string | undefined; }; } -export {}; +export default AssertionUnit; diff --git a/dist/js/units/AssertionUnit.js b/dist/js/units/AssertionUnit.js index 1516fefb..0e6694b5 100644 --- a/dist/js/units/AssertionUnit.js +++ b/dist/js/units/AssertionUnit.js @@ -1,10 +1,12 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.AssertionUnit = void 0; const enums_1 = require("../enums"); const AssertionUnitSchemaMixin_1 = require("../generated/AssertionUnitSchemaMixin"); -const BaseUnit_1 = require("./BaseUnit"); -class AssertionUnit extends BaseUnit_1.BaseUnit { +const BaseUnit_1 = __importDefault(require("./BaseUnit")); +class AssertionUnit extends BaseUnit_1.default { constructor(config) { super({ name: enums_1.UnitType.assertion, @@ -18,5 +20,5 @@ class AssertionUnit extends BaseUnit_1.BaseUnit { return { statement: this.statement, errorMessage: this.errorMessage }; } } -exports.AssertionUnit = AssertionUnit; (0, AssertionUnitSchemaMixin_1.assertionUnitSchemaMixin)(AssertionUnit.prototype); +exports.default = AssertionUnit; diff --git a/dist/js/units/AssignmentUnit.d.ts b/dist/js/units/AssignmentUnit.d.ts index 122ab4c2..0c426380 100644 --- a/dist/js/units/AssignmentUnit.d.ts +++ b/dist/js/units/AssignmentUnit.d.ts @@ -1,12 +1,15 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { AssignmentUnitSchema } from "@mat3ra/esse/dist/js/types"; import { type AssignmentUnitSchemaMixin } from "../generated/AssignmentUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = AssignmentUnitSchema; type Base = typeof BaseUnit & Constructor; declare const AssignmentUnit_base: Base; -export declare class AssignmentUnit extends AssignmentUnit_base implements Schema { +declare class AssignmentUnit extends AssignmentUnit_base implements Schema { + toJSON: () => Schema & AnyObject; + _json: Schema & AnyObject; constructor(config: Partial); getHashObject(): object; } -export {}; +export default AssignmentUnit; diff --git a/dist/js/units/AssignmentUnit.js b/dist/js/units/AssignmentUnit.js index 560af1ba..a25ad31d 100644 --- a/dist/js/units/AssignmentUnit.js +++ b/dist/js/units/AssignmentUnit.js @@ -1,10 +1,12 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.AssignmentUnit = void 0; const enums_1 = require("../enums"); const AssignmentUnitSchemaMixin_1 = require("../generated/AssignmentUnitSchemaMixin"); -const BaseUnit_1 = require("./BaseUnit"); -class AssignmentUnit extends BaseUnit_1.BaseUnit { +const BaseUnit_1 = __importDefault(require("./BaseUnit")); +class AssignmentUnit extends BaseUnit_1.default { constructor(config) { super({ name: enums_1.UnitType.assignment, @@ -19,5 +21,5 @@ class AssignmentUnit extends BaseUnit_1.BaseUnit { return { input: this.input, operand: this.operand, value: this.value }; } } -exports.AssignmentUnit = AssignmentUnit; (0, AssignmentUnitSchemaMixin_1.assignmentUnitSchemaMixin)(AssignmentUnit.prototype); +exports.default = AssignmentUnit; diff --git a/dist/js/units/BaseUnit.d.ts b/dist/js/units/BaseUnit.d.ts index a0e1ed5b..f5720e1b 100644 --- a/dist/js/units/BaseUnit.d.ts +++ b/dist/js/units/BaseUnit.d.ts @@ -1,29 +1,26 @@ import { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; import { type Defaultable } from "@mat3ra/code/dist/js/entity/mixins/DefaultableMixin"; import { HashedEntity } from "@mat3ra/code/dist/js/entity/mixins/HashedEntityMixin"; -import { HasRepetition } from "@mat3ra/code/dist/js/entity/mixins/HasRepetitionMixin"; import { type NamedEntity } from "@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin"; import { type RuntimeItems } from "@mat3ra/code/dist/js/entity/mixins/RuntimeItemsMixin"; import { Taggable } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin"; import type { NameResultSchema } from "@mat3ra/code/dist/js/utils/object"; import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { StatusSchema, WorkflowBaseUnitSchema } from "@mat3ra/esse/dist/js/types"; import { type BaseUnitSchemaMixin } from "../generated/BaseUnitSchemaMixin"; import { type StatusSchemaMixin } from "../generated/StatusSchemaMixin"; -import { type RuntimeItemsUILogic } from "../RuntimeItemsUILogicMixin"; -type Base = typeof InMemoryEntity & Constructor & Constructor & Constructor & Constructor & Constructor & Constructor & Constructor & Constructor & Constructor; +import { type RuntimeItemsUILogic } from "./mixins/RuntimeItemsUILogicMixin"; +type Base = typeof InMemoryEntity & Constructor & Constructor & Constructor & Constructor & Constructor & Constructor & Constructor & Constructor; type Schema = WorkflowBaseUnitSchema; declare const BaseUnit_base: Base; -export declare class BaseUnit extends BaseUnit_base implements Schema { - static usePredefinedIds: boolean; - static generateFlowChartId(name: string): any; +declare class BaseUnit extends BaseUnit_base implements Schema { + toJSON: () => Schema & AnyObject; defaultResults: NameResultSchema[]; defaultMonitors: NameResultSchema[]; defaultPostProcessors: NameResultSchema[]; defaultPreProcessors: NameResultSchema[]; - allowedResults: NameResultSchema[]; - allowedMonitors: NameResultSchema[]; - allowedPostProcessors: NameResultSchema[]; + repetition: number; constructor(config: Partial & Pick); get lastStatusUpdate(): { trackedAt: number; @@ -33,5 +30,6 @@ export declare class BaseUnit extends BaseUnit_base i getHashObject(): object; isInStatus(status: StatusSchema["status"]): boolean; clone(extraContext: object): this; + setRepetition(repetition: number): void; } -export {}; +export default BaseUnit; diff --git a/dist/js/units/BaseUnit.js b/dist/js/units/BaseUnit.js index 822f5494..af44917b 100644 --- a/dist/js/units/BaseUnit.js +++ b/dist/js/units/BaseUnit.js @@ -1,11 +1,8 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseUnit = void 0; -/* eslint-disable class-methods-use-this */ const entity_1 = require("@mat3ra/code/dist/js/entity"); const DefaultableMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/DefaultableMixin"); const HashedEntityMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/HashedEntityMixin"); -const HasRepetitionMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/HasRepetitionMixin"); const NamedEntityMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin"); const RuntimeItemsMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/RuntimeItemsMixin"); const TaggableMixin_1 = require("@mat3ra/code/dist/js/entity/mixins/TaggableMixin"); @@ -13,15 +10,8 @@ const utils_1 = require("@mat3ra/utils"); const enums_1 = require("../enums"); const BaseUnitSchemaMixin_1 = require("../generated/BaseUnitSchemaMixin"); const StatusSchemaMixin_1 = require("../generated/StatusSchemaMixin"); -const RuntimeItemsUILogicMixin_1 = require("../RuntimeItemsUILogicMixin"); -// eslint-disable-next-line prettier/prettier +const RuntimeItemsUILogicMixin_1 = require("./mixins/RuntimeItemsUILogicMixin"); class BaseUnit extends entity_1.InMemoryEntity { - static generateFlowChartId(name) { - if (this.usePredefinedIds) { - return utils_1.Utils.uuid.getUUIDFromNamespace(`flowchart-${name}`); - } - return utils_1.Utils.uuid.getUUID(); - } constructor(config) { super({ results: [], @@ -29,22 +19,22 @@ class BaseUnit extends entity_1.InMemoryEntity { preProcessors: [], postProcessors: [], ...config, - status: config.status || enums_1.UNIT_STATUSES.idle, + status: config.status || enums_1.UnitStatus.idle, statusTrack: config.statusTrack || [], - flowchartId: config.flowchartId || BaseUnit.generateFlowChartId(config.name), + flowchartId: config.flowchartId || utils_1.Utils.uuid.getUUID(), tags: config.tags || [], }); this.defaultResults = []; this.defaultMonitors = []; this.defaultPostProcessors = []; this.defaultPreProcessors = []; - this.allowedResults = []; - this.allowedMonitors = []; - this.allowedPostProcessors = []; + this.repetition = 0; this._initRuntimeItems(config); } get lastStatusUpdate() { - const statusTrack = (this.statusTrack || []).filter((s) => (s.repetition || 0) === this.repetition); + const statusTrack = (this.statusTrack || []).filter((s) => { + return (s.repetition || 0) === this.repetition; + }); const sortedStatusTrack = statusTrack.sort((a, b) => a.trackedAt - b.trackedAt); // lodash.sortBy(statusTrack, (x) => x.trackedAt); return sortedStatusTrack[sortedStatusTrack.length - 1]; } @@ -56,20 +46,21 @@ class BaseUnit extends entity_1.InMemoryEntity { } clone(extraContext) { const flowchartIDOverrideConfigAsExtraContext = { - flowchartId: BaseUnit.generateFlowChartId(this.name), + flowchartId: utils_1.Utils.uuid.getUUID(), ...extraContext, }; return super.clone(flowchartIDOverrideConfigAsExtraContext); } + setRepetition(repetition) { + this.repetition = repetition; + } } -exports.BaseUnit = BaseUnit; -BaseUnit.usePredefinedIds = false; (0, TaggableMixin_1.taggableMixin)(BaseUnit.prototype); (0, HashedEntityMixin_1.hashedEntityMixin)(BaseUnit.prototype); -(0, HasRepetitionMixin_1.hasRepetitionMixin)(BaseUnit.prototype); (0, RuntimeItemsMixin_1.runtimeItemsMixin)(BaseUnit.prototype); (0, RuntimeItemsUILogicMixin_1.runtimeItemsUILogicMixin)(BaseUnit.prototype); (0, BaseUnitSchemaMixin_1.baseUnitSchemaMixin)(BaseUnit.prototype); (0, StatusSchemaMixin_1.statusSchemaMixin)(BaseUnit.prototype); (0, NamedEntityMixin_1.namedEntityMixin)(BaseUnit.prototype); (0, DefaultableMixin_1.defaultableEntityMixin)(BaseUnit); +exports.default = BaseUnit; diff --git a/dist/js/units/ConditionUnit.d.ts b/dist/js/units/ConditionUnit.d.ts index bccbca4c..573a3f8b 100644 --- a/dist/js/units/ConditionUnit.d.ts +++ b/dist/js/units/ConditionUnit.d.ts @@ -1,12 +1,15 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { ConditionUnitSchema } from "@mat3ra/esse/dist/js/types"; import { type ConditionUnitSchemaMixin } from "../generated/ConditionUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = ConditionUnitSchema; type Base = typeof BaseUnit & Constructor; declare const ConditionUnit_base: Base; -export declare class ConditionUnit extends ConditionUnit_base implements Schema { +declare class ConditionUnit extends ConditionUnit_base implements Schema { + toJSON: () => Schema & AnyObject; + _json: Schema & AnyObject; constructor(config: Partial); getHashObject(): object; } -export {}; +export default ConditionUnit; diff --git a/dist/js/units/ConditionUnit.js b/dist/js/units/ConditionUnit.js index dda98e43..379ccaeb 100644 --- a/dist/js/units/ConditionUnit.js +++ b/dist/js/units/ConditionUnit.js @@ -1,10 +1,12 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ConditionUnit = void 0; const enums_1 = require("../enums"); const ConditionUnitSchemaMixin_1 = require("../generated/ConditionUnitSchemaMixin"); -const BaseUnit_1 = require("./BaseUnit"); -class ConditionUnit extends BaseUnit_1.BaseUnit { +const BaseUnit_1 = __importDefault(require("./BaseUnit")); +class ConditionUnit extends BaseUnit_1.default { constructor(config) { super({ name: enums_1.UnitType.condition, @@ -24,5 +26,5 @@ class ConditionUnit extends BaseUnit_1.BaseUnit { return { statement: this.statement, maxOccurrences: this.maxOccurrences }; } } -exports.ConditionUnit = ConditionUnit; (0, ConditionUnitSchemaMixin_1.conditionUnitSchemaMixin)(ConditionUnit.prototype); +exports.default = ConditionUnit; diff --git a/dist/js/units/ExecutionUnit.d.ts b/dist/js/units/ExecutionUnit.d.ts index e7e21145..56073b46 100644 --- a/dist/js/units/ExecutionUnit.d.ts +++ b/dist/js/units/ExecutionUnit.d.ts @@ -1,51 +1,86 @@ -import { Application, Executable, Flavor } from "@mat3ra/ade"; +import { Flavor } from "@mat3ra/ade"; import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; -import type { ExecutableSchema, ExecutionUnitSchemaBase, FlavorSchema } from "@mat3ra/esse/dist/js/types"; -import { type ImportantSettingsProvider } from "../context/mixins/ImportantSettingsProviderMixin"; -import type { ContextItem } from "../context/providers/base/ContextProvider"; -import ExecutionUnitInput from "../ExecutionUnitInput"; +import type { ExecutionUnitSchema, FlavorSchema } from "@mat3ra/esse/dist/js/types"; +import { type ExternalContext } from "../context/providers"; +import type ConvergenceParameter from "../convergence/ConvergenceParameter"; import { type ExecutionUnitSchemaMixin } from "../generated/ExecutionUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; -type Schema = ExecutionUnitSchemaBase; -type Base = typeof BaseUnit & Constructor & Constructor; -interface SetApplicationProps { - application: Application; - executable?: Executable | ExecutableSchema; - flavor?: Flavor | FlavorSchema; -} -interface SetExecutableProps { - executable?: Executable | ExecutableSchema; - flavor?: Flavor | FlavorSchema; -} -export type ExecutionUnitSchema = Schema; +import BaseUnit from "./BaseUnit"; +import ExecutionUnitInput from "./ExecutionUnitInput"; +type Schema = ExecutionUnitSchema; +type Base = typeof BaseUnit & Constructor; +type ExecutionUnitConfig = Omit & SetExecutableProps; +type SetApplicationProps = Pick & SetExecutableProps; +type SetExecutableProps = Partial>; declare const ExecutionUnit_base: Base; -export declare class ExecutionUnit extends ExecutionUnit_base implements Schema { - applicationInstance: Application; - executableInstance: Executable; - flavorInstance: Flavor; +declare class ExecutionUnit extends ExecutionUnit_base implements Schema { inputInstances: ExecutionUnitInput[]; - renderingContext: ContextItem[]; - constructor(config: Schema); + renderingContext: Partial; + toJSON: () => Schema & AnyObject; + _json: Schema & AnyObject; + constructor(config: ExecutionUnitConfig); setApplication({ application, executable, flavor }: SetApplicationProps): void; setExecutable({ executable, flavor }: SetExecutableProps): void; setFlavor(flavor?: Flavor | FlavorSchema): void; setDefaultInput(): void; - get allContextProviders(): import("../context/providers/base/ContextProvider").default[]; - get contextProviders(): import("../context/providers/base/ContextProvider").default[]; - /** Update rendering context and persistent context - * Note: this function is sometimes being called without passing a context! - */ - render(context?: AnyObject): void; - /** - * @summary Calculates hash on unit-specific fields. - * The meaningful fields of processing unit are operation, flavor and input at the moment. - */ + render(externalContext: ExternalContext): void; + getContextProvidersInstances(externalContext: ExternalContext): import("../context/providers").AnyContextProvider[]; + addConvergenceContext(parameter: ConvergenceParameter, externalContext: ExternalContext): void; + private saveContext; getHashObject(): { - application: {}; - executable: {}; - flavor: {} | undefined; + application: { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + isDefault?: boolean; + shortName: string; + summary: string; + version: string; + build: string; + hasAdvancedComputeOptions?: boolean; + isLicensed?: boolean; + }; + executable: { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + isDefault?: boolean; + applicationName: string; + hasAdvancedComputeOptions?: boolean; + }; + flavor: { + _id?: string; + slug?: string; + systemName?: string; + schemaVersion?: string; + name: string; + isDefault?: boolean; + preProcessors: { + name: string; + }[]; + postProcessors: { + name: string; + }[]; + monitors: { + name: string; + }[]; + results: { + name: string; + }[]; + executableName?: string; + applicationName?: string; + input: { + templateId?: string; + templateName?: string; + name?: string; + }[]; + supportedApplicationVersions?: string[]; + }; input: string; }; } -export {}; +export default ExecutionUnit; diff --git a/dist/js/units/ExecutionUnit.js b/dist/js/units/ExecutionUnit.js index dfe92ff8..5e3fcf8e 100644 --- a/dist/js/units/ExecutionUnit.js +++ b/dist/js/units/ExecutionUnit.js @@ -3,114 +3,119 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExecutionUnit = void 0; -const ade_1 = require("@mat3ra/ade"); const utils_1 = require("@mat3ra/utils"); -const ContextAndRenderFieldsMixin_1 = require("../context/mixins/ContextAndRenderFieldsMixin"); -const ImportantSettingsProviderMixin_1 = require("../context/mixins/ImportantSettingsProviderMixin"); -const ExecutionUnitInput_1 = __importDefault(require("../ExecutionUnitInput")); +const providers_1 = require("../context/providers"); +const settings_1 = require("../context/providers/settings"); const ExecutionUnitSchemaMixin_1 = require("../generated/ExecutionUnitSchemaMixin"); -const BaseUnit_1 = require("./BaseUnit"); -class ExecutionUnit extends BaseUnit_1.BaseUnit { +const BaseUnit_1 = __importDefault(require("./BaseUnit")); +const ExecutionUnitInput_1 = __importDefault(require("./ExecutionUnitInput")); +class ExecutionUnit extends BaseUnit_1.default { constructor(config) { var _a; super(config); this.inputInstances = []; - this.renderingContext = []; + this.renderingContext = {}; const { application, executable, flavor } = config; - const applicationInstance = ade_1.ApplicationRegistry.createApplication(application); - const executableInstance = ade_1.ApplicationRegistry.getExecutableByConfig(application.name, executable); - const flavorInstance = ade_1.ApplicationRegistry.getFlavorByConfig(executableInstance, flavor); - if (!flavorInstance) { - throw new Error("Flavor is not set"); - } - this.setApplication({ - application: applicationInstance, - executable: executableInstance, - flavor: flavorInstance, - }); + this.setApplication({ application, executable, flavor }); this.name = this.name || ((_a = this.flavor) === null || _a === void 0 ? void 0 : _a.name) || ""; } setApplication({ application, executable, flavor }) { - this.applicationInstance = application; - this.setProp("application", application.toJSON()); + this.setProp("application", application); this.setExecutable({ executable, flavor }); } setExecutable({ executable, flavor }) { - const defaultExecutable = ade_1.ApplicationRegistry.getExecutableByName(this.application.name); - const instance = executable instanceof ade_1.Executable - ? executable - : new ade_1.Executable(executable !== null && executable !== void 0 ? executable : defaultExecutable.toJSON()); - this.allowedResults = instance.results; - this.allowedMonitors = instance.monitors; - this.allowedPostProcessors = instance.postProcessors; - this.setProp("executable", instance.toJSON()); + const { executable: executablePlain } = settings_1.globalSettings + .getApplicationsDriver() + .getExecutableAndFlavorByName({ + appName: this.application.name, + appVersion: this.application.version, + }); + const finalExecutable = executable || executablePlain; + this.setProp("executable", finalExecutable); this.setFlavor(flavor); } setFlavor(flavor) { - const defaultFlavor = ade_1.ApplicationRegistry.getFlavorByConfig(this.executableInstance); - const instance = flavor instanceof ade_1.Flavor ? flavor : new ade_1.Flavor(flavor !== null && flavor !== void 0 ? flavor : defaultFlavor === null || defaultFlavor === void 0 ? void 0 : defaultFlavor.toJSON()); - if (!instance) { - throw new Error("Flavor is not found for executable"); - } - this.flavorInstance = instance; - this.defaultMonitors = instance.monitors; - this.defaultResults = instance.results; - this.defaultPostProcessors = instance.postProcessors; - this.setProp("flavor", instance.toJSON()); + const { executable, application } = this; + const { flavor: defaultFlavor } = settings_1.globalSettings + .getApplicationsDriver() + .getExecutableAndFlavorByName({ + appName: application.name, + appVersion: application.version, + execName: executable.name, + }); + const finalFlavor = flavor || defaultFlavor; + this.defaultMonitors = finalFlavor.monitors; + this.defaultResults = finalFlavor.results; + this.defaultPostProcessors = finalFlavor.postProcessors; + this.setProp("flavor", finalFlavor); this.setRuntimeItemsToDefaultValues(); this.setDefaultInput(); } setDefaultInput() { - const inputs = ade_1.ApplicationRegistry.getInput(this.flavorInstance); - this.inputInstances = inputs.map(ExecutionUnitInput_1.default.createFromTemplate); + this.inputInstances = settings_1.globalSettings + .getApplicationsDriver() + .getInput(this.flavor) + .map(ExecutionUnitInput_1.default.createFromTemplate); } - get allContextProviders() { - return this.inputInstances.map((input) => input.contextProvidersInstances).flat(); + render(externalContext) { + const contextProviders = this.getContextProvidersInstances(externalContext); + const fullContext = contextProviders.map((provider) => provider.getContextItemData()); + this.saveContext(fullContext, externalContext); + this.input = this.inputInstances.map((input) => { + return input.render(this.renderingContext).toJSON(); + }); } - get contextProviders() { - return this.allContextProviders.filter((p) => p.entityName === "unit"); + getContextProvidersInstances(externalContext) { + const uniqueContextProviderNames = [ + ...new Set(this.input + .map((input) => { + return input.template.contextProviders.map((provider) => { + return provider.name; + }); + }) + .flat()), + ]; + return uniqueContextProviderNames.map((name) => { + return (0, providers_1.createProvider)(name, this.context, externalContext); + }); } - /** Update rendering context and persistent context - * Note: this function is sometimes being called without passing a context! - */ - render(context = {}) { - this.renderingContext = { ...this.renderingContext, ...context }; - const newInput = []; - const newPersistentContext = []; - const newRenderingContext = []; - this.inputInstances.forEach((input) => { - input.setContext(this.renderingContext); - input.render(); - const inputJSON = input.toJSON(); - const context = input.getFullContext(); - newInput.push(inputJSON); - newRenderingContext.push(...context); - newPersistentContext.push(...context.filter((c) => c.isEdited)); + addConvergenceContext(parameter, externalContext) { + // TODO: kgrid should be abstracted and selected by user + const parameterToContextProviderMap = { + N_k: "kgrid", + N_k_nonuniform: "kgrid", + }; + const contextName = parameterToContextProviderMap[parameter.name]; + const contextProviders = this.getContextProvidersInstances(externalContext); + const fullContext = contextProviders.map((provider) => { + if (provider.name === contextName) { + provider.applyConvergenceParameter(parameter); + return provider.getContextItemData(); + } + return provider.getContextItemData(); }); - this.input = newInput; - this.renderingContext = newRenderingContext; - this.context = newPersistentContext; + this.saveContext(fullContext, externalContext); + } + saveContext(fullContext, externalContext) { + // persistent context + this.context = fullContext.filter((c) => c.isEdited); + this.renderingContext = { + ...Object.fromEntries(fullContext.map((context) => [context.name, context.data])), + ...externalContext, + }; } - /** - * @summary Calculates hash on unit-specific fields. - * The meaningful fields of processing unit are operation, flavor and input at the moment. - */ getHashObject() { + const { application, executable, flavor, input } = this.toJSON(); return { ...super.getHashObject(), - application: utils_1.Utils.specific.removeTimestampableKeysFromConfig(this.applicationInstance.toJSON()), - executable: utils_1.Utils.specific.removeTimestampableKeysFromConfig(this.executableInstance.toJSON()), - flavor: this.flavorInstance - ? utils_1.Utils.specific.removeTimestampableKeysFromConfig(this.flavorInstance.toJSON()) - : undefined, - input: utils_1.Utils.hash.calculateHashFromObject(this.input.map((i) => { - return utils_1.Utils.str.removeEmptyLinesFromString(utils_1.Utils.str.removeCommentsFromSourceCode(i.template.content)); + application, + executable, + flavor, + input: utils_1.Utils.hash.calculateHashFromObject(input.map(({ template }) => { + return utils_1.Utils.str.removeEmptyLinesFromString(utils_1.Utils.str.removeCommentsFromSourceCode(template.content)); })), }; } } -exports.ExecutionUnit = ExecutionUnit; (0, ExecutionUnitSchemaMixin_1.executionUnitSchemaMixin)(ExecutionUnit.prototype); -(0, ContextAndRenderFieldsMixin_1.contextMixin)(ExecutionUnit.prototype); -(0, ImportantSettingsProviderMixin_1.importantSettingsProviderMixin)(ExecutionUnit.prototype); +exports.default = ExecutionUnit; diff --git a/dist/js/ExecutionUnitInput.d.ts b/dist/js/units/ExecutionUnitInput.d.ts similarity index 57% rename from dist/js/ExecutionUnitInput.d.ts rename to dist/js/units/ExecutionUnitInput.d.ts index 2f94e2ed..f653daab 100644 --- a/dist/js/ExecutionUnitInput.d.ts +++ b/dist/js/units/ExecutionUnitInput.d.ts @@ -3,26 +3,21 @@ import { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { TemplateSchema } from "@mat3ra/esse/dist/js/types"; -import type { ContextItem } from "./context/providers/base/ContextProvider"; -import type ContextProvider from "./context/providers/base/ContextProvider"; -import type { ExecutionUnitInputSchemaMixin } from "./generated/ExecutionUnitInputSchemaMixin"; +import { ExecutionUnitInputSchemaMixin } from "../generated/ExecutionUnitInputSchemaMixin"; type Schema = ExecutionUnitInputSchemaMixin; +type JSON = Schema & AnyObject; type Base = typeof InMemoryEntity & Constructor; type ConstructorConfig = Schema | (Omit & { template: Template; }); declare const ExecutionUnitInput_base: Base; export default class ExecutionUnitInput extends ExecutionUnitInput_base implements Schema { - _json: Schema & AnyObject; - toJSON: () => Schema & AnyObject; - toJSONQuick: () => Schema & AnyObject; + _json: JSON; + toJSON: () => JSON; + toJSONQuick: () => JSON; static get jsonSchema(): import("json-schema").JSONSchema7 | undefined; - contextProvidersInstances: ContextProvider[]; - readonly templateInstance: Template; static createFromTemplate(template: Template | TemplateSchema): ExecutionUnitInput; constructor(config: ConstructorConfig); - setContext(context: ContextItem[]): this; - render(): this; - getFullContext(): import("./context/providers/base/ContextProvider").ExtendedContextItem[]; + render(renderingContext: Record): this; } export {}; diff --git a/dist/js/ExecutionUnitInput.js b/dist/js/units/ExecutionUnitInput.js similarity index 51% rename from dist/js/ExecutionUnitInput.js rename to dist/js/units/ExecutionUnitInput.js index f7c588cf..0558ccf9 100644 --- a/dist/js/ExecutionUnitInput.js +++ b/dist/js/units/ExecutionUnitInput.js @@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); const ade_1 = require("@mat3ra/ade"); const entity_1 = require("@mat3ra/code/dist/js/entity"); const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); +const standata_1 = require("@mat3ra/standata"); const nunjucks_1 = __importDefault(require("nunjucks")); -const providers_1 = require("./context/providers"); +const ExecutionUnitInputSchemaMixin_1 = require("../generated/ExecutionUnitInputSchemaMixin"); +const env = (0, standata_1.setupNunjucksEnvironment)(new nunjucks_1.default.Environment()); class ExecutionUnitInput extends entity_1.InMemoryEntity { static get jsonSchema() { return JSONSchemasInterface_1.default.getSchemaById("workflow/unit/input/-inputItem"); @@ -23,36 +25,23 @@ class ExecutionUnitInput extends entity_1.InMemoryEntity { const { template } = config; const templateInstance = template instanceof ade_1.Template ? template : new ade_1.Template(template); super({ ...config, template: templateInstance.toJSON() }); - this.contextProvidersInstances = []; - this.templateInstance = templateInstance; } - setContext(context) { - this.contextProvidersInstances = this.template.contextProviders.map(({ name }) => { - if (!providers_1.providers) { - throw new Error("Providers config not set"); - } - const ContextProvider = providers_1.providers[name]; - const contextItem = context.find((c) => c.name === name); - if (!contextItem) { - throw new Error(`Context item for provider ${name} not found`); - } - return new ContextProvider(contextItem); - }); - return this; - } - render() { + render(renderingContext) { if (this.isManuallyChanged) { return this; } - const fullContext = this.getFullContext(); - const rendered = nunjucks_1.default.compile(this.template.content).render(fullContext); - this.rendered = rendered || this.template.content; - return this; - } - getFullContext() { - return this.contextProvidersInstances.map((contextProvider) => { - return contextProvider.getContextItem(); - }); + try { + const rendered = nunjucks_1.default.compile(this.template.content, env).render(renderingContext); + this.rendered = rendered || this.template.content; + return this; + } + catch (error) { + console.error("Error rendering template", this.template.content); + console.error("Rendering context: ", JSON.stringify(renderingContext)); + console.error("Error", error); + throw error; + } } } exports.default = ExecutionUnitInput; +(0, ExecutionUnitInputSchemaMixin_1.executionUnitInputSchemaMixin)(ExecutionUnitInput.prototype); diff --git a/dist/js/units/IOUnit.d.ts b/dist/js/units/IOUnit.d.ts index 65fb01bf..5a170d2e 100644 --- a/dist/js/units/IOUnit.d.ts +++ b/dist/js/units/IOUnit.d.ts @@ -1,11 +1,14 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { DataIOUnitSchema } from "@mat3ra/esse/dist/js/types"; import { type IOUnitSchemaMixin } from "../generated/IOUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = DataIOUnitSchema; type Base = typeof BaseUnit & Constructor; declare const IOUnit_base: Base; -export declare class IOUnit extends IOUnit_base implements Schema { +declare class IOUnit extends IOUnit_base implements Schema { + toJSON: () => Schema & AnyObject; + _json: Schema & AnyObject; constructor(config: Partial); } -export {}; +export default IOUnit; diff --git a/dist/js/units/IOUnit.js b/dist/js/units/IOUnit.js index 350ae782..3695adc5 100644 --- a/dist/js/units/IOUnit.js +++ b/dist/js/units/IOUnit.js @@ -1,13 +1,15 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.IOUnit = void 0; const enums_1 = require("../enums"); const IOUnitSchemaMixin_1 = require("../generated/IOUnitSchemaMixin"); -const BaseUnit_1 = require("./BaseUnit"); -class IOUnit extends BaseUnit_1.BaseUnit { +const BaseUnit_1 = __importDefault(require("./BaseUnit")); +class IOUnit extends BaseUnit_1.default { constructor(config) { super({ name: enums_1.UnitType.io, subtype: "input", ...config, type: enums_1.UnitType.io }); } } -exports.IOUnit = IOUnit; (0, IOUnitSchemaMixin_1.iOUnitSchemaMixin)(IOUnit.prototype); +exports.default = IOUnit; diff --git a/dist/js/units/MapUnit.d.ts b/dist/js/units/MapUnit.d.ts index b2f91acf..ef5e3c99 100644 --- a/dist/js/units/MapUnit.d.ts +++ b/dist/js/units/MapUnit.d.ts @@ -1,8 +1,9 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { MapUnitSchema } from "@mat3ra/esse/dist/js/types"; import { UnitType } from "../enums"; import { type MapUnitSchemaMixin } from "../generated/MapUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = MapUnitSchema; export declare const defaultMapConfig: { name: string; @@ -18,8 +19,10 @@ export declare const defaultMapConfig: { }; type Base = typeof BaseUnit & Constructor; declare const MapUnit_base: Base; -export declare class MapUnit extends MapUnit_base implements Schema { - constructor(config: Partial); +declare class MapUnit extends MapUnit_base implements Schema { + toJSON: () => Schema & AnyObject; + _json: Schema & AnyObject; + constructor(config?: Partial); setWorkflowId(id: string): void; } -export {}; +export default MapUnit; diff --git a/dist/js/units/MapUnit.js b/dist/js/units/MapUnit.js index a412f06f..add27dd0 100644 --- a/dist/js/units/MapUnit.js +++ b/dist/js/units/MapUnit.js @@ -1,9 +1,12 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.MapUnit = exports.defaultMapConfig = void 0; +exports.defaultMapConfig = void 0; const enums_1 = require("../enums"); const MapUnitSchemaMixin_1 = require("../generated/MapUnitSchemaMixin"); -const BaseUnit_1 = require("./BaseUnit"); +const BaseUnit_1 = __importDefault(require("./BaseUnit")); exports.defaultMapConfig = { name: enums_1.UnitType.map, type: enums_1.UnitType.map, @@ -16,7 +19,7 @@ exports.defaultMapConfig = { useValues: false, }, }; -class MapUnit extends BaseUnit_1.BaseUnit { +class MapUnit extends BaseUnit_1.default { constructor(config) { super({ ...exports.defaultMapConfig, ...config }); } @@ -24,5 +27,5 @@ class MapUnit extends BaseUnit_1.BaseUnit { this.setProp("workflowId", id); } } -exports.MapUnit = MapUnit; (0, MapUnitSchemaMixin_1.mapUnitSchemaMixin)(MapUnit.prototype); +exports.default = MapUnit; diff --git a/dist/js/units/ProcessingUnit.d.ts b/dist/js/units/ProcessingUnit.d.ts deleted file mode 100644 index 05d1c5db..00000000 --- a/dist/js/units/ProcessingUnit.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { ProcessingUnitSchema } from "@mat3ra/esse/dist/js/types"; -import { type ProcessingUnitSchemaMixin } from "../generated/ProcessingUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; -type Schema = ProcessingUnitSchema; -type Base = typeof BaseUnit & Constructor; -declare const ProcessingUnit_base: Base; -export declare class ProcessingUnit extends ProcessingUnit_base implements Schema { - constructor(config: Partial); - setOperation(op: ProcessingUnitSchema["operation"]): void; - setOperationType(type: ProcessingUnitSchema["operationType"]): void; - setInput(input: ProcessingUnitSchema["inputData"]): void; -} -export {}; diff --git a/dist/js/units/ProcessingUnit.js b/dist/js/units/ProcessingUnit.js deleted file mode 100644 index c861e349..00000000 --- a/dist/js/units/ProcessingUnit.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ProcessingUnit = void 0; -const enums_1 = require("../enums"); -const ProcessingUnitSchemaMixin_1 = require("../generated/ProcessingUnitSchemaMixin"); -const BaseUnit_1 = require("./BaseUnit"); -class ProcessingUnit extends BaseUnit_1.BaseUnit { - constructor(config) { - super({ - name: enums_1.UnitType.processing, - type: enums_1.UnitType.processing, - ...config, - }); - } - setOperation(op) { - this.setProp("operation", op); - } - setOperationType(type) { - this.setProp("operationType", type); - } - setInput(input) { - this.setProp("inputData", input); - } -} -exports.ProcessingUnit = ProcessingUnit; -(0, ProcessingUnitSchemaMixin_1.processingUnitSchemaMixin)(ProcessingUnit.prototype); diff --git a/dist/js/units/ReduceUnit.d.ts b/dist/js/units/ReduceUnit.d.ts index 6ff8fd18..cd57cbb2 100644 --- a/dist/js/units/ReduceUnit.d.ts +++ b/dist/js/units/ReduceUnit.d.ts @@ -1,11 +1,14 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { ReduceUnitSchema } from "@mat3ra/esse/dist/js/types"; import { type ReduceUnitSchemaMixin } from "../generated/ReduceUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = ReduceUnitSchema; type Base = typeof BaseUnit & Constructor; declare const ReduceUnit_base: Base; -export declare class ReduceUnit extends ReduceUnit_base implements Schema { - constructor(unitName: string, mapUnit: string, input: ReduceUnitSchema["input"]); +declare class ReduceUnit extends ReduceUnit_base implements Schema { + toJSON: () => Schema & AnyObject; + _json: Schema & AnyObject; + constructor(config: Omit); } -export {}; +export default ReduceUnit; diff --git a/dist/js/units/ReduceUnit.js b/dist/js/units/ReduceUnit.js index e1a4bf82..b720dea8 100644 --- a/dist/js/units/ReduceUnit.js +++ b/dist/js/units/ReduceUnit.js @@ -1,13 +1,15 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ReduceUnit = void 0; const enums_1 = require("../enums"); const ReduceUnitSchemaMixin_1 = require("../generated/ReduceUnitSchemaMixin"); -const BaseUnit_1 = require("./BaseUnit"); -class ReduceUnit extends BaseUnit_1.BaseUnit { - constructor(unitName, mapUnit, input) { - super({ type: enums_1.UnitType.reduce, name: unitName, mapFlowchartId: mapUnit, input }); +const BaseUnit_1 = __importDefault(require("./BaseUnit")); +class ReduceUnit extends BaseUnit_1.default { + constructor(config) { + super({ ...config, type: enums_1.UnitType.reduce }); } } -exports.ReduceUnit = ReduceUnit; (0, ReduceUnitSchemaMixin_1.reduceUnitSchemaMixin)(ReduceUnit.prototype); +exports.default = ReduceUnit; diff --git a/dist/js/units/SubworkflowUnit.d.ts b/dist/js/units/SubworkflowUnit.d.ts index 6514b002..02e43b83 100644 --- a/dist/js/units/SubworkflowUnit.d.ts +++ b/dist/js/units/SubworkflowUnit.d.ts @@ -1,11 +1,14 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { SubworkflowUnitSchema } from "@mat3ra/esse/dist/js/types"; import { type SubworkflowUnitSchemaMixin } from "../generated/SubworkflowUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = SubworkflowUnitSchema; type Base = typeof BaseUnit & Constructor; declare const SubworkflowUnit_base: Base; -export declare class SubworkflowUnit extends SubworkflowUnit_base implements Schema { +declare class SubworkflowUnit extends SubworkflowUnit_base implements Schema { + toJSON: () => Schema & AnyObject; + _json: Schema & AnyObject; constructor(config: Partial); } -export {}; +export default SubworkflowUnit; diff --git a/dist/js/units/SubworkflowUnit.js b/dist/js/units/SubworkflowUnit.js index fadfe201..0455f0c3 100644 --- a/dist/js/units/SubworkflowUnit.js +++ b/dist/js/units/SubworkflowUnit.js @@ -1,13 +1,15 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.SubworkflowUnit = void 0; const enums_1 = require("../enums"); const SubworkflowUnitSchemaMixin_1 = require("../generated/SubworkflowUnitSchemaMixin"); -const BaseUnit_1 = require("./BaseUnit"); -class SubworkflowUnit extends BaseUnit_1.BaseUnit { +const BaseUnit_1 = __importDefault(require("./BaseUnit")); +class SubworkflowUnit extends BaseUnit_1.default { constructor(config) { super({ name: "New Subworkflow", ...config, type: enums_1.UnitType.subworkflow }); } } -exports.SubworkflowUnit = SubworkflowUnit; (0, SubworkflowUnitSchemaMixin_1.subworkflowUnitSchemaMixin)(SubworkflowUnit.prototype); +exports.default = SubworkflowUnit; diff --git a/dist/js/units/builders/AssertionUnitConfigBuilder.d.ts b/dist/js/units/builders/AssertionUnitConfigBuilder.d.ts deleted file mode 100644 index 85878114..00000000 --- a/dist/js/units/builders/AssertionUnitConfigBuilder.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export class AssertionUnitConfigBuilder extends UnitConfigBuilder { - constructor(name: any, statement: any, errorMessage: any); - _statement: any; - _errorMessage: any; - statement(str: any): this; - errorMessage(str: any): this; - build(): { - statement: any; - errorMessage: any; - type: any; - name: any; - head: boolean; - results: any[]; - monitors: any[]; - flowchartId: any; - preProcessors: any[]; - postProcessors: any[]; - }; -} -import { UnitConfigBuilder } from "./UnitConfigBuilder"; diff --git a/dist/js/units/builders/AssertionUnitConfigBuilder.js b/dist/js/units/builders/AssertionUnitConfigBuilder.js deleted file mode 100644 index 3bf740fd..00000000 --- a/dist/js/units/builders/AssertionUnitConfigBuilder.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AssertionUnitConfigBuilder = void 0; -const enums_1 = require("../../enums"); -const UnitConfigBuilder_1 = require("./UnitConfigBuilder"); -class AssertionUnitConfigBuilder extends UnitConfigBuilder_1.UnitConfigBuilder { - constructor(name, statement, errorMessage) { - super({ name, type: enums_1.UNIT_TYPES.assertion }); - this._statement = statement; - this._errorMessage = errorMessage; - } - statement(str) { - this._statement = str; - return this; - } - errorMessage(str) { - this._errorMessage = str; - return this; - } - build() { - return { - ...super.build(), - statement: this._statement, - errorMessage: this._errorMessage, - }; - } -} -exports.AssertionUnitConfigBuilder = AssertionUnitConfigBuilder; diff --git a/dist/js/units/builders/AssignmentUnitConfigBuilder.d.ts b/dist/js/units/builders/AssignmentUnitConfigBuilder.d.ts deleted file mode 100644 index a1d509eb..00000000 --- a/dist/js/units/builders/AssignmentUnitConfigBuilder.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export class AssignmentUnitConfigBuilder extends UnitConfigBuilder { - constructor(name: any, variableName: any, variableValue: any, input?: any[], results?: any[]); - _variableName: any; - _variableValue: any; - _input: any[]; - input(arr: any): this; - variableName(str: any): this; - variableValue(str: any): this; - build(): { - input: any[]; - operand: any; - value: any; - type: any; - name: any; - head: boolean; - results: any[]; - monitors: any[]; - flowchartId: any; - preProcessors: any[]; - postProcessors: any[]; - }; -} -import { UnitConfigBuilder } from "./UnitConfigBuilder"; diff --git a/dist/js/units/builders/AssignmentUnitConfigBuilder.js b/dist/js/units/builders/AssignmentUnitConfigBuilder.js deleted file mode 100644 index e7991665..00000000 --- a/dist/js/units/builders/AssignmentUnitConfigBuilder.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AssignmentUnitConfigBuilder = void 0; -const enums_1 = require("../../enums"); -const UnitConfigBuilder_1 = require("./UnitConfigBuilder"); -class AssignmentUnitConfigBuilder extends UnitConfigBuilder_1.UnitConfigBuilder { - constructor(name, variableName, variableValue, input = [], results = []) { - super({ name, type: enums_1.UNIT_TYPES.assignment }); - this._variableName = variableName; - this._variableValue = variableValue; - this._input = input; - this._results = results; - } - input(arr) { - this._input = arr; - return this; - } - variableName(str) { - this._variableName = str; - return this; - } - variableValue(str) { - this._variableValue = str; - return this; - } - build() { - return { - ...super.build(), - input: this._input, - operand: this._variableName, - value: this._variableValue, - }; - } -} -exports.AssignmentUnitConfigBuilder = AssignmentUnitConfigBuilder; diff --git a/dist/js/units/builders/ExecutionUnitConfigBuilder.d.ts b/dist/js/units/builders/ExecutionUnitConfigBuilder.d.ts deleted file mode 100644 index 1536482a..00000000 --- a/dist/js/units/builders/ExecutionUnitConfigBuilder.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export class ExecutionUnitConfigBuilder extends UnitConfigBuilder { - constructor(name: any, application: any, execName: any, flavorName: any, flowchartId: any, cache?: any[]); - _results: any; - _monitors: any; - _preProcessors: any; - _postProcessors: any; - initialize(application: any, execName: any, flavorName: any): void; - application: any; - executable: any; - flavor: any; - build(): { - application: any; - executable: any; - flavor: any; - type: any; - name: any; - head: boolean; - results: any[]; - monitors: any[]; - flowchartId: any; - preProcessors: any[]; - postProcessors: any[]; - }; - /** - * Creates an executable instance. This method is intended to be overridden in subclasses. - * @param {Application} application - The application object - * @param {string} execName - The name of the executable - * @returns {Executable} The created executable instance - */ - _createExecutable(application: Application, execName: string): Executable; - /** - * Creates a flavor instance. This method is intended to be overridden in subclasses. - * @param {Executable} executable - The executable object - * @param {string} flavorName - The name of the flavor - * @returns {Flavor} The created flavor instance - */ - _createFlavor(executable: Executable, flavorName: string): Flavor; -} -import { UnitConfigBuilder } from "./UnitConfigBuilder"; diff --git a/dist/js/units/builders/ExecutionUnitConfigBuilder.js b/dist/js/units/builders/ExecutionUnitConfigBuilder.js deleted file mode 100644 index 5aec8df3..00000000 --- a/dist/js/units/builders/ExecutionUnitConfigBuilder.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExecutionUnitConfigBuilder = void 0; -/* eslint-disable class-methods-use-this */ -const ade_1 = require("@mat3ra/ade"); -const enums_1 = require("../../enums"); -const UnitConfigBuilder_1 = require("./UnitConfigBuilder"); -class ExecutionUnitConfigBuilder extends UnitConfigBuilder_1.UnitConfigBuilder { - constructor(name, application, execName, flavorName, flowchartId, cache = []) { - super({ name, type: enums_1.UNIT_TYPES.execution, flowchartId, cache }); - try { - this.initialize(application, execName, flavorName); - } - catch (e) { - console.error(`Can't initialize executable/flavor: ${execName}/${flavorName}`); - throw e; - } - // initialize runtimeItems - this._results = this.flavor.results; - this._monitors = this.flavor.monitors; - this._preProcessors = this.flavor.preProcessors; - this._postProcessors = this.flavor.postProcessors; - } - initialize(application, execName, flavorName) { - this.application = application; - this.executable = this._createExecutable(this.application, execName); - this.flavor = this._createFlavor(this.executable, flavorName); - } - build() { - return { - ...super.build(), - application: this.application.toJSON(), - executable: this.executable.toJSON(), - flavor: this.flavor.toJSON(), - }; - } - /** - * Creates an executable instance. This method is intended to be overridden in subclasses. - * @param {Application} application - The application object - * @param {string} execName - The name of the executable - * @returns {Executable} The created executable instance - */ - _createExecutable(application, execName) { - return ade_1.ApplicationRegistry.getExecutableByName(application.name, execName); - } - /** - * Creates a flavor instance. This method is intended to be overridden in subclasses. - * @param {Executable} executable - The executable object - * @param {string} flavorName - The name of the flavor - * @returns {Flavor} The created flavor instance - */ - _createFlavor(executable, flavorName) { - return ade_1.ApplicationRegistry.getFlavorByName(executable, flavorName); - } -} -exports.ExecutionUnitConfigBuilder = ExecutionUnitConfigBuilder; diff --git a/dist/js/units/builders/IOUnitConfigBuilder.d.ts b/dist/js/units/builders/IOUnitConfigBuilder.d.ts deleted file mode 100644 index d560f789..00000000 --- a/dist/js/units/builders/IOUnitConfigBuilder.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export class IOUnitConfigBuilder extends UnitConfigBuilder { - constructor(name: any, endpointName: any, endpointOptions: any); - _endpointName: any; - _endpointOptions: any; - _variableName: string; - _subtype: string; - _source: string; - endpointName(str: any): this; - endpointOptions(options: any): this; - variableName(str: any): this; - subtype(str: any): this; - source(str: any): this; - build(): { - subtype: string; - source: string; - input: { - endpoint: any; - endpoint_options: any; - name: string; - }[]; - type: any; - name: any; - head: boolean; - results: any[]; - monitors: any[]; - flowchartId: any; - preProcessors: any[]; - postProcessors: any[]; - }; -} -import { UnitConfigBuilder } from "./UnitConfigBuilder"; diff --git a/dist/js/units/builders/IOUnitConfigBuilder.js b/dist/js/units/builders/IOUnitConfigBuilder.js deleted file mode 100644 index 53990f63..00000000 --- a/dist/js/units/builders/IOUnitConfigBuilder.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.IOUnitConfigBuilder = void 0; -const enums_1 = require("../../enums"); -const UnitConfigBuilder_1 = require("./UnitConfigBuilder"); -class IOUnitConfigBuilder extends UnitConfigBuilder_1.UnitConfigBuilder { - constructor(name, endpointName, endpointOptions) { - super({ name, type: enums_1.UNIT_TYPES.io }); - this._endpointName = endpointName; - this._endpointOptions = endpointOptions; - this._variableName = "DATA"; - this._subtype = "input"; - this._source = "api"; - } - endpointName(str) { - this._endpointName = str; - return this; - } - endpointOptions(options) { - this._endpointOptions = options; - return this; - } - variableName(str) { - this._variableName = str; - return this; - } - subtype(str) { - this._subtype = str; - return this; - } - source(str) { - this._source = str; - return this; - } - build() { - return { - ...super.build(), - subtype: this._subtype, - source: this._source, - input: [ - { - endpoint: this._endpointName, - endpoint_options: this._endpointOptions, - name: this._variableName, - }, - ], - }; - } -} -exports.IOUnitConfigBuilder = IOUnitConfigBuilder; diff --git a/dist/js/units/builders/UnitConfigBuilder.d.ts b/dist/js/units/builders/UnitConfigBuilder.d.ts deleted file mode 100644 index 8df2407b..00000000 --- a/dist/js/units/builders/UnitConfigBuilder.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -export class UnitConfigBuilder { - static usePredefinedIds: boolean; - static _stringArrayToNamedObject(array: any): any; - constructor({ name, type, flowchartId, cache }: { - name: any; - type: any; - flowchartId: any; - cache?: never[] | undefined; - }); - type: any; - _name: any; - _head: boolean; - _results: any[]; - _monitors: any[]; - _preProcessors: any[]; - _postProcessors: any[]; - cache: any[]; - _flowchartId: any; - name(str: any): this; - head(bool: any): this; - generateFlowChartId(seed: any, countInCache?: number): any; - flowchartId(flowchartId: any): this; - addPreProcessors(preProcessorNames: any): this; - addPostProcessors(postProcessorNames: any): this; - addResults(resultNames: any): this; - addMonitors(monitorNames: any): this; - build(): { - type: any; - name: any; - head: boolean; - results: any[]; - monitors: any[]; - flowchartId: any; - preProcessors: any[]; - postProcessors: any[]; - }; -} diff --git a/dist/js/units/builders/UnitConfigBuilder.js b/dist/js/units/builders/UnitConfigBuilder.js deleted file mode 100644 index 5c042b8d..00000000 --- a/dist/js/units/builders/UnitConfigBuilder.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnitConfigBuilder = void 0; -const utils_1 = require("@mat3ra/utils"); -const underscore_1 = __importDefault(require("underscore")); -class UnitConfigBuilder { - constructor({ name, type, flowchartId, cache = [] }) { - this.type = type; - this._name = name; - this._head = false; - this._results = []; - this._monitors = []; - this._preProcessors = []; - this._postProcessors = []; - this.cache = cache; - const countInCache = this.cache.filter((s) => s === name).length; - this.cache.push(name); - this._flowchartId = flowchartId || this.generateFlowChartId(name, countInCache); - } - name(str) { - this._name = str; - return this; - } - head(bool) { - this._head = bool; - return this; - } - generateFlowChartId(seed, countInCache = 0) { - const suffix = countInCache > 0 ? `-${countInCache}` : ""; - const seedWithSuffix = `${seed}${suffix}`; - if (this.constructor.usePredefinedIds) - return utils_1.Utils.uuid.getUUIDFromNamespace(seedWithSuffix); - return utils_1.Utils.uuid.getUUID(); - } - flowchartId(flowchartId) { - this._flowchartId = flowchartId; - return this; - } - static _stringArrayToNamedObject(array) { - return array.map((name) => (underscore_1.default.isString(name) ? { name } : name)); - } - addPreProcessors(preProcessorNames) { - this._preProcessors = underscore_1.default.union(this.constructor._stringArrayToNamedObject(preProcessorNames), this._preProcessors); - return this; - } - addPostProcessors(postProcessorNames) { - this._postProcessors = underscore_1.default.union(this.constructor._stringArrayToNamedObject(postProcessorNames), this._postProcessors); - return this; - } - addResults(resultNames) { - this._results = underscore_1.default.union(this.constructor._stringArrayToNamedObject(resultNames), this._results); - return this; - } - addMonitors(monitorNames) { - this._monitors = underscore_1.default.union(this.constructor._stringArrayToNamedObject(monitorNames), this._monitors); - return this; - } - build() { - return { - type: this.type, - name: this._name, - head: this._head, - results: this._results, - monitors: this._monitors, - flowchartId: this._flowchartId, - preProcessors: this._preProcessors, - postProcessors: this._postProcessors, - }; - } -} -exports.UnitConfigBuilder = UnitConfigBuilder; -UnitConfigBuilder.usePredefinedIds = false; diff --git a/dist/js/units/builders/index.d.ts b/dist/js/units/builders/index.d.ts deleted file mode 100644 index 2271d086..00000000 --- a/dist/js/units/builders/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export namespace builders { - export { UnitConfigBuilder }; - export { AssignmentUnitConfigBuilder }; - export { AssertionUnitConfigBuilder }; - export { ExecutionUnitConfigBuilder }; - export { IOUnitConfigBuilder }; -} -import { UnitConfigBuilder } from "./UnitConfigBuilder"; -import { AssignmentUnitConfigBuilder } from "./AssignmentUnitConfigBuilder"; -import { AssertionUnitConfigBuilder } from "./AssertionUnitConfigBuilder"; -import { ExecutionUnitConfigBuilder } from "./ExecutionUnitConfigBuilder"; -import { IOUnitConfigBuilder } from "./IOUnitConfigBuilder"; diff --git a/dist/js/units/builders/index.js b/dist/js/units/builders/index.js deleted file mode 100644 index bd53bfa5..00000000 --- a/dist/js/units/builders/index.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.builders = void 0; -const AssertionUnitConfigBuilder_1 = require("./AssertionUnitConfigBuilder"); -const AssignmentUnitConfigBuilder_1 = require("./AssignmentUnitConfigBuilder"); -const ExecutionUnitConfigBuilder_1 = require("./ExecutionUnitConfigBuilder"); -const IOUnitConfigBuilder_1 = require("./IOUnitConfigBuilder"); -const UnitConfigBuilder_1 = require("./UnitConfigBuilder"); -const builders = { - UnitConfigBuilder: UnitConfigBuilder_1.UnitConfigBuilder, - AssignmentUnitConfigBuilder: AssignmentUnitConfigBuilder_1.AssignmentUnitConfigBuilder, - AssertionUnitConfigBuilder: AssertionUnitConfigBuilder_1.AssertionUnitConfigBuilder, - ExecutionUnitConfigBuilder: ExecutionUnitConfigBuilder_1.ExecutionUnitConfigBuilder, - IOUnitConfigBuilder: IOUnitConfigBuilder_1.IOUnitConfigBuilder, -}; -exports.builders = builders; diff --git a/dist/js/units/factory.d.ts b/dist/js/units/factory.d.ts index 4c24e16f..8243944f 100644 --- a/dist/js/units/factory.d.ts +++ b/dist/js/units/factory.d.ts @@ -1,8 +1,15 @@ -import type { AssertionUnitSchema, AssignmentUnitSchema, ConditionUnitSchema, DataIOUnitSchema, MapUnitSchema, ProcessingUnitSchema, SubworkflowUnitSchema } from "@mat3ra/esse/dist/js/types"; -import { BaseUnit } from "./BaseUnit"; -import { type ExecutionUnitSchema } from "./ExecutionUnit"; -type UnitConfig = ExecutionUnitSchema | AssignmentUnitSchema | ConditionUnitSchema | DataIOUnitSchema | ProcessingUnitSchema | MapUnitSchema | SubworkflowUnitSchema | AssertionUnitSchema; +import type { WorkflowSubworkflowUnitSchema, WorkflowUnitSchema } from "@mat3ra/esse/dist/js/types"; +import AssertionUnit from "./AssertionUnit"; +import AssignmentUnit from "./AssignmentUnit"; +import ConditionUnit from "./ConditionUnit"; +import ExecutionUnit from "./ExecutionUnit"; +import IOUnit from "./IOUnit"; +import MapUnit from "./MapUnit"; +import ReduceUnit from "./ReduceUnit"; +import SubworkflowUnit from "./SubworkflowUnit"; +export type AnyWorkflowUnit = MapUnit | SubworkflowUnit | ReduceUnit; +export type AnySubworkflowUnit = ExecutionUnit | AssignmentUnit | ConditionUnit | IOUnit | AssertionUnit; export declare class UnitFactory { - static create(config: UnitConfig): BaseUnit; + static createInWorkflow(config: WorkflowUnitSchema): AnyWorkflowUnit; + static createInSubworkflow(config: WorkflowSubworkflowUnitSchema): AnySubworkflowUnit; } -export {}; diff --git a/dist/js/units/factory.js b/dist/js/units/factory.js index 5f395545..5596d097 100644 --- a/dist/js/units/factory.js +++ b/dist/js/units/factory.js @@ -1,34 +1,43 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnitFactory = void 0; const enums_1 = require("../enums"); -const AssertionUnit_1 = require("./AssertionUnit"); -const AssignmentUnit_1 = require("./AssignmentUnit"); -const ConditionUnit_1 = require("./ConditionUnit"); -const ExecutionUnit_1 = require("./ExecutionUnit"); -const IOUnit_1 = require("./IOUnit"); -const MapUnit_1 = require("./MapUnit"); -const ProcessingUnit_1 = require("./ProcessingUnit"); -const SubworkflowUnit_1 = require("./SubworkflowUnit"); +const AssertionUnit_1 = __importDefault(require("./AssertionUnit")); +const AssignmentUnit_1 = __importDefault(require("./AssignmentUnit")); +const ConditionUnit_1 = __importDefault(require("./ConditionUnit")); +const ExecutionUnit_1 = __importDefault(require("./ExecutionUnit")); +const IOUnit_1 = __importDefault(require("./IOUnit")); +const MapUnit_1 = __importDefault(require("./MapUnit")); +const ReduceUnit_1 = __importDefault(require("./ReduceUnit")); +const SubworkflowUnit_1 = __importDefault(require("./SubworkflowUnit")); class UnitFactory { - static create(config) { + static createInWorkflow(config) { + switch (config.type) { + case enums_1.UnitType.map: + return new MapUnit_1.default(config); + case enums_1.UnitType.subworkflow: + return new SubworkflowUnit_1.default(config); + case enums_1.UnitType.reduce: + return new ReduceUnit_1.default(config); + default: + throw new Error(`Unknown unit type: ${config.type}`); + } + } + static createInSubworkflow(config) { switch (config.type) { case enums_1.UnitType.execution: - return new ExecutionUnit_1.ExecutionUnit(config); + return new ExecutionUnit_1.default(config); case enums_1.UnitType.assignment: - return new AssignmentUnit_1.AssignmentUnit(config); + return new AssignmentUnit_1.default(config); case enums_1.UnitType.condition: - return new ConditionUnit_1.ConditionUnit(config); + return new ConditionUnit_1.default(config); case enums_1.UnitType.io: - return new IOUnit_1.IOUnit(config); - case enums_1.UnitType.processing: - return new ProcessingUnit_1.ProcessingUnit(config); - case enums_1.UnitType.map: - return new MapUnit_1.MapUnit(config); - case enums_1.UnitType.subworkflow: - return new SubworkflowUnit_1.SubworkflowUnit(config); + return new IOUnit_1.default(config); case enums_1.UnitType.assertion: - return new AssertionUnit_1.AssertionUnit(config); + return new AssertionUnit_1.default(config); default: throw new Error(`Unknown unit type: ${config.type}`); } diff --git a/dist/js/units/index.d.ts b/dist/js/units/index.d.ts index 08eb9db7..6e55879d 100644 --- a/dist/js/units/index.d.ts +++ b/dist/js/units/index.d.ts @@ -1,12 +1,11 @@ -import { AssertionUnit } from "./AssertionUnit"; -import { AssignmentUnit } from "./AssignmentUnit"; -import { BaseUnit } from "./BaseUnit"; -import { ConditionUnit } from "./ConditionUnit"; -import { ExecutionUnit } from "./ExecutionUnit"; +import AssertionUnit from "./AssertionUnit"; +import AssignmentUnit from "./AssignmentUnit"; +import BaseUnit from "./BaseUnit"; +import ConditionUnit from "./ConditionUnit"; +import ExecutionUnit from "./ExecutionUnit"; import { UnitFactory } from "./factory"; -import { IOUnit } from "./IOUnit"; -import { MapUnit } from "./MapUnit"; -import { ProcessingUnit } from "./ProcessingUnit"; -import { ReduceUnit } from "./ReduceUnit"; -import { SubworkflowUnit } from "./SubworkflowUnit"; -export { BaseUnit, AssertionUnit, AssignmentUnit, ConditionUnit, ExecutionUnit, IOUnit, MapUnit, ProcessingUnit, ReduceUnit, SubworkflowUnit, UnitFactory, }; +import IOUnit from "./IOUnit"; +import MapUnit from "./MapUnit"; +import ReduceUnit from "./ReduceUnit"; +import SubworkflowUnit from "./SubworkflowUnit"; +export { BaseUnit, AssertionUnit, AssignmentUnit, ConditionUnit, ExecutionUnit, IOUnit, MapUnit, ReduceUnit, SubworkflowUnit, UnitFactory, }; diff --git a/dist/js/units/index.js b/dist/js/units/index.js index 0be195c9..cc4989c7 100644 --- a/dist/js/units/index.js +++ b/dist/js/units/index.js @@ -1,25 +1,26 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnitFactory = exports.SubworkflowUnit = exports.ReduceUnit = exports.ProcessingUnit = exports.MapUnit = exports.IOUnit = exports.ExecutionUnit = exports.ConditionUnit = exports.AssignmentUnit = exports.AssertionUnit = exports.BaseUnit = void 0; -const AssertionUnit_1 = require("./AssertionUnit"); -Object.defineProperty(exports, "AssertionUnit", { enumerable: true, get: function () { return AssertionUnit_1.AssertionUnit; } }); -const AssignmentUnit_1 = require("./AssignmentUnit"); -Object.defineProperty(exports, "AssignmentUnit", { enumerable: true, get: function () { return AssignmentUnit_1.AssignmentUnit; } }); -const BaseUnit_1 = require("./BaseUnit"); -Object.defineProperty(exports, "BaseUnit", { enumerable: true, get: function () { return BaseUnit_1.BaseUnit; } }); -const ConditionUnit_1 = require("./ConditionUnit"); -Object.defineProperty(exports, "ConditionUnit", { enumerable: true, get: function () { return ConditionUnit_1.ConditionUnit; } }); -const ExecutionUnit_1 = require("./ExecutionUnit"); -Object.defineProperty(exports, "ExecutionUnit", { enumerable: true, get: function () { return ExecutionUnit_1.ExecutionUnit; } }); +exports.UnitFactory = exports.SubworkflowUnit = exports.ReduceUnit = exports.MapUnit = exports.IOUnit = exports.ExecutionUnit = exports.ConditionUnit = exports.AssignmentUnit = exports.AssertionUnit = exports.BaseUnit = void 0; +const AssertionUnit_1 = __importDefault(require("./AssertionUnit")); +exports.AssertionUnit = AssertionUnit_1.default; +const AssignmentUnit_1 = __importDefault(require("./AssignmentUnit")); +exports.AssignmentUnit = AssignmentUnit_1.default; +const BaseUnit_1 = __importDefault(require("./BaseUnit")); +exports.BaseUnit = BaseUnit_1.default; +const ConditionUnit_1 = __importDefault(require("./ConditionUnit")); +exports.ConditionUnit = ConditionUnit_1.default; +const ExecutionUnit_1 = __importDefault(require("./ExecutionUnit")); +exports.ExecutionUnit = ExecutionUnit_1.default; const factory_1 = require("./factory"); Object.defineProperty(exports, "UnitFactory", { enumerable: true, get: function () { return factory_1.UnitFactory; } }); -const IOUnit_1 = require("./IOUnit"); -Object.defineProperty(exports, "IOUnit", { enumerable: true, get: function () { return IOUnit_1.IOUnit; } }); -const MapUnit_1 = require("./MapUnit"); -Object.defineProperty(exports, "MapUnit", { enumerable: true, get: function () { return MapUnit_1.MapUnit; } }); -const ProcessingUnit_1 = require("./ProcessingUnit"); -Object.defineProperty(exports, "ProcessingUnit", { enumerable: true, get: function () { return ProcessingUnit_1.ProcessingUnit; } }); -const ReduceUnit_1 = require("./ReduceUnit"); -Object.defineProperty(exports, "ReduceUnit", { enumerable: true, get: function () { return ReduceUnit_1.ReduceUnit; } }); -const SubworkflowUnit_1 = require("./SubworkflowUnit"); -Object.defineProperty(exports, "SubworkflowUnit", { enumerable: true, get: function () { return SubworkflowUnit_1.SubworkflowUnit; } }); +const IOUnit_1 = __importDefault(require("./IOUnit")); +exports.IOUnit = IOUnit_1.default; +const MapUnit_1 = __importDefault(require("./MapUnit")); +exports.MapUnit = MapUnit_1.default; +const ReduceUnit_1 = __importDefault(require("./ReduceUnit")); +exports.ReduceUnit = ReduceUnit_1.default; +const SubworkflowUnit_1 = __importDefault(require("./SubworkflowUnit")); +exports.SubworkflowUnit = SubworkflowUnit_1.default; diff --git a/dist/js/RuntimeItemsUILogicMixin.d.ts b/dist/js/units/mixins/RuntimeItemsUILogicMixin.d.ts similarity index 100% rename from dist/js/RuntimeItemsUILogicMixin.d.ts rename to dist/js/units/mixins/RuntimeItemsUILogicMixin.d.ts diff --git a/dist/js/RuntimeItemsUILogicMixin.js b/dist/js/units/mixins/RuntimeItemsUILogicMixin.js similarity index 97% rename from dist/js/RuntimeItemsUILogicMixin.js rename to dist/js/units/mixins/RuntimeItemsUILogicMixin.js index 4572573a..7ead000f 100644 --- a/dist/js/RuntimeItemsUILogicMixin.js +++ b/dist/js/units/mixins/RuntimeItemsUILogicMixin.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.runtimeItemsUILogicMixin = runtimeItemsUILogicMixin; // @ts-expect-error -const propertiesMixn = { +const propertiesMixin = { setRuntimeItemsToDefaultValues() { this.results = this.defaultResults; this.monitors = this.defaultMonitors; @@ -52,5 +52,5 @@ const propertiesMixn = { }, }; function runtimeItemsUILogicMixin(item) { - Object.defineProperties(item, Object.getOwnPropertyDescriptors(propertiesMixn)); + Object.defineProperties(item, Object.getOwnPropertyDescriptors(propertiesMixin)); } diff --git a/dist/js/utils.d.ts b/dist/js/utils.d.ts deleted file mode 100644 index cf6bc75e..00000000 --- a/dist/js/utils.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @summary set the head of an array of units - * @param units - * @returns {Unit[]} - */ -export function setUnitsHead(units: any): Unit[]; -/** - * @summary Re-establishes the linked `next => flowchartId` logic in an array of units - * @params units {Unit[]} - * @returns units {Unit[]} - */ -export function setNextLinks(units: any): any; -/** - * @summary Apply configuration data to an object - * @param obj {*} object / class containing methods or attributes to be set - * @param config { functions: {}, attributes: {} } functions to call and attributes to set - * @param callBuild {boolean} if true; call build between applying functions and attributes - * @returns {*} updated object - */ -export function applyConfig({ obj, config, callBuild }: any): any; -/** - * @summary Safely extract unit object from subworkflow data - * @param subworkflowData {Object} subworkflow data - * @param index {number} index of subworkflow unit - * @param type {string} type of subworkflow unit - * @returns {Object|null} subworkflow unit object (not a unit class instance!) - */ -export function findUnit({ subworkflowData, index, type }: Object): Object | null; diff --git a/dist/js/utils.js b/dist/js/utils.js deleted file mode 100644 index 697fff99..00000000 --- a/dist/js/utils.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setUnitsHead = setUnitsHead; -exports.setNextLinks = setNextLinks; -exports.applyConfig = applyConfig; -exports.findUnit = findUnit; -const lodash_1 = __importDefault(require("lodash")); -/** - * @summary set the head of an array of units - * @param units - * @returns {Unit[]} - */ -function setUnitsHead(units) { - if (units.length > 0) { - units[0].head = true; - lodash_1.default.tail(units).map((x) => (x.head = false)); - } - return units; -} -// TODO: fix setNextLinks on unit removal and convergence logic. -/** - * @summary Re-establishes the linked `next => flowchartId` logic in an array of units - * @params units {Unit[]} - * @returns units {Unit[]} - */ -function setNextLinks(units) { - const flowchartIds = units.map((u) => u.flowchartId); - for (let i = 0; i < units.length - 1; i++) { - if (!units[i].next) { - // newly added units don't have next set yet => set it - units[i].next = units[i + 1].flowchartId; - if (i > 0) - units[i - 1].next = units[i].flowchartId; - } - else if (!flowchartIds.includes(units[i].next)) { - // newly removed units may create broken next links => fix it - units[i].next = units[i + 1].flowchartId; - } - } - return units; -} -/** - * @summary Apply configuration data to an object - * @param obj {*} object / class containing methods or attributes to be set - * @param config { functions: {}, attributes: {} } functions to call and attributes to set - * @param callBuild {boolean} if true; call build between applying functions and attributes - * @returns {*} updated object - */ -function applyConfig({ obj, config = {}, callBuild = false }) { - const { functions = {}, attributes = {} } = config; - // eslint-disable-next-line no-restricted-syntax - for (const [func, args] of Object.entries(functions)) { - // eslint-disable-next-line no-nested-ternary - if (obj[func]) { - if (args) - obj[func](args); - else - obj[func](); - } - } - const modified = callBuild ? obj.build() : obj; - // eslint-disable-next-line no-restricted-syntax - for (const [key, values] of Object.entries(attributes)) { - modified[key] = values; - } - return modified; -} -/** - * @summary Safely extract unit object from subworkflow data - * @param subworkflowData {Object} subworkflow data - * @param index {number} index of subworkflow unit - * @param type {string} type of subworkflow unit - * @returns {Object|null} subworkflow unit object (not a unit class instance!) - */ -function findUnit({ subworkflowData, index, type }) { - const unit = subworkflowData.units[index]; - if (unit.type !== type) - throw new Error("findUnit() error: unit type does not match!"); - return unit; -} diff --git a/dist/js/utils/index.d.ts b/dist/js/utils/index.d.ts new file mode 100644 index 00000000..7551e979 --- /dev/null +++ b/dist/js/utils/index.d.ts @@ -0,0 +1 @@ +export * as workflow from "./workflow"; diff --git a/dist/js/utils/index.js b/dist/js/utils/index.js new file mode 100644 index 00000000..28fd23b7 --- /dev/null +++ b/dist/js/utils/index.js @@ -0,0 +1,37 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.workflow = void 0; +exports.workflow = __importStar(require("./workflow")); diff --git a/dist/js/utils/underscoreStringSlugify.d.ts b/dist/js/utils/underscoreStringSlugify.d.ts new file mode 100644 index 00000000..d39498a8 --- /dev/null +++ b/dist/js/utils/underscoreStringSlugify.d.ts @@ -0,0 +1,6 @@ +/** + * Same behavior as `underscore.string` slugify (v3.3.x): cleanDiacritics, replace + * non-word chars except whitespace and hyphen, lowercase, dasherize, trim hyphens. + * @see https://github.com/esamattis/underscore.string/blob/master/slugify.js + */ +export declare function underscoreStringSlugify(value: unknown): string; diff --git a/dist/js/utils/underscoreStringSlugify.js b/dist/js/utils/underscoreStringSlugify.js new file mode 100644 index 00000000..f3cbf44f --- /dev/null +++ b/dist/js/utils/underscoreStringSlugify.js @@ -0,0 +1,32 @@ +"use strict"; +/** + * Same behavior as `underscore.string` slugify (v3.3.x): cleanDiacritics, replace + * non-word chars except whitespace and hyphen, lowercase, dasherize, trim hyphens. + * @see https://github.com/esamattis/underscore.string/blob/master/slugify.js + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.underscoreStringSlugify = underscoreStringSlugify; +function cleanDiacritics(str) { + let from = "ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșşšŝťțţŭùúüűûñÿýçżźž"; + let to = "aaaaaaaaaccceeeeeghiiiijllnnoooooooossssstttuuuuuunyyczzz"; + from += from.toUpperCase(); + to += to.toUpperCase(); + const toChars = to.split(""); + from += "ß"; + toChars.push("ss"); + return str.replace(/./g, (ch) => { + const i = from.indexOf(ch); + return i === -1 ? ch : toChars[i]; + }); +} +function dasherize(str) { + return str + .trim() + .replace(/([A-Z])/g, "-$1") + .replace(/[-_\s]+/g, "-") + .toLowerCase(); +} +function underscoreStringSlugify(value) { + const str = value == null ? "" : String(value); + return dasherize(cleanDiacritics(str).replace(/[^\w\s-]/g, "-").toLowerCase()).replace(/^-+|-+$/g, ""); +} diff --git a/dist/js/utils/workflow.d.ts b/dist/js/utils/workflow.d.ts new file mode 100644 index 00000000..8844da80 --- /dev/null +++ b/dist/js/utils/workflow.d.ts @@ -0,0 +1,8 @@ +import type { ApplicationSchema, WorkflowSchema } from "@mat3ra/esse/dist/js/types"; +export declare function getUsedApplications(workflow: WorkflowSchema): ApplicationSchema[]; +export declare function getSystemName(workflow: WorkflowSchema): string; +export declare function getUsedModels(workflow: WorkflowSchema): ("dft" | "ml" | "unknown")[]; +export declare function getDefaultDescription(workflow: WorkflowSchema): string; +export declare function getProperties(workflow: WorkflowSchema): string[]; +export declare function getHumanReadableProperties(workflow: WorkflowSchema): string[]; +export declare function getHumanReadableUsedModels(workflow: WorkflowSchema): string[]; diff --git a/dist/js/utils/workflow.js b/dist/js/utils/workflow.js new file mode 100644 index 00000000..e79dadce --- /dev/null +++ b/dist/js/utils/workflow.js @@ -0,0 +1,52 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getUsedApplications = getUsedApplications; +exports.getSystemName = getSystemName; +exports.getUsedModels = getUsedModels; +exports.getDefaultDescription = getDefaultDescription; +exports.getProperties = getProperties; +exports.getHumanReadableProperties = getHumanReadableProperties; +exports.getHumanReadableUsedModels = getHumanReadableUsedModels; +const tree_1 = require("@mat3ra/mode/dist/js/tree"); +const underscore_string_1 = __importDefault(require("underscore.string")); +function getUsedApplications(workflow) { + const swApplications = workflow.subworkflows.map((sw) => sw.application); + const nestedWorkflows = workflow.workflows; + const wfApplications = nestedWorkflows.map(getUsedApplications).flat(); + return [...swApplications, ...wfApplications].reduce((acc, app) => { + if (!acc.some((a) => a.name === app.name)) { + acc.push(app); + } + return acc; + }, []); +} +function getSystemName(workflow) { + const applicationNames = getUsedApplications(workflow).map((a) => a.name); + return underscore_string_1.default.slugify(`${applicationNames.join(":")}-${workflow.name}`); +} +function getUsedModels(workflow) { + return workflow.subworkflows.map((sw) => sw.model.type); +} +function getDefaultDescription(workflow) { + const applicationNames = getUsedApplications(workflow).map((a) => a.name); + return `${getUsedModels(workflow) + .join(", ") + .toUpperCase()} workflow using ${applicationNames.join(", ")}.`; +} +function getProperties(workflow) { + return [...new Set(workflow.subworkflows.map((sw) => sw.properties || []).flat())]; +} +function getHumanReadableProperties(workflow) { + return getProperties(workflow).map((name) => name + .split("_") + .map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()) + .join(" ")); +} +function getHumanReadableUsedModels(workflow) { + return getUsedModels(workflow) + .filter((m) => m !== "unknown") + .map((m) => tree_1.MODEL_NAMES[m]); +} diff --git a/dist/js/workflows/create.d.ts b/dist/js/workflows/create.d.ts deleted file mode 100644 index 546e92ce..00000000 --- a/dist/js/workflows/create.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function createWorkflow({ appName, workflowData, workflowSubworkflowMapByApplication, workflowCls, ...swArgs }: { - [x: string]: any; - appName: any; - workflowData: any; - workflowSubworkflowMapByApplication: any; - workflowCls?: typeof Workflow | undefined; -}): any[]; -import { Workflow } from "./workflow"; diff --git a/dist/js/workflows/create.js b/dist/js/workflows/create.js deleted file mode 100644 index a9805eb6..00000000 --- a/dist/js/workflows/create.js +++ /dev/null @@ -1,211 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createWorkflow = createWorkflow; -const create_1 = require("../subworkflows/create"); -const units_1 = require("../units"); -const map_1 = require("../units/map"); -const utils_1 = require("../utils"); -const workflow_1 = require("./workflow"); -/** - * @summary Helper for creating Map units for complex workflows - * @param config {Object} map unit configuration - * @param unitFactoryCls {*} class factory for map unit - * @returns {*} map unit - */ -function createMapUnit({ config, unitFactoryCls = units_1.UnitFactory }) { - let { input: defaultInput } = map_1.defaultMapConfig; - if (config.input) { - defaultInput = { ...defaultInput, ...config.input }; - } - const unit = unitFactoryCls.create({ ...map_1.defaultMapConfig, input: defaultInput }); - return unit; -} -/** - * @summary Update subworkflow units with patch configuration defined in the workflow config - * @param subworkflowData {Object} subworkflow data - * @param unitConfigs {Array} array of patch configs for subworkflow units - * @returns subworkflowData {Object} subworkflowData with patches applied to units - */ -function updateUnitConfigs({ subworkflowData, unitConfigs }) { - unitConfigs.forEach((config) => { - const { index, type, config: unitConfig } = config; // unitConfig should contain 'attributes' key - const unit = (0, utils_1.findUnit)({ subworkflowData, index, type }); - console.log(` patching ${type} unit ${index} of subworkflow ${subworkflowData.name}`); - unit.config = (0, utils_1.applyConfig)({ obj: unit.config, config: unitConfig }); - return null; - }); - return subworkflowData; -} -/** - * @summary Use subworkflow.createSubworkflow to create a Subworkflow unit - * @param appName {String} application name - * @param unitData {*} object containing subworkflow configuration data - * @param workflowData {*} object containing all workflow configuration data - * @param swArgs {*} subworkflow classes - * @returns {*} subworkflow object - */ -function createSubworkflowUnit({ appName, unitData, workflowData, cache, ...swArgs }) { - const { name: unitName, unitConfigs, config } = unitData; - const { subworkflows } = workflowData; - const { [appName]: dataByApp } = subworkflows; - let { [unitName]: subworkflowData } = dataByApp; - subworkflowData.config = { ...subworkflowData.config, ...config }; - if (unitConfigs) - subworkflowData = updateUnitConfigs({ subworkflowData, unitConfigs }); - return (0, create_1.createSubworkflow)({ - subworkflowData, - cache, - ...swArgs, - }); -} -/** - * @summary Create the first workflow object specified in a workflow configuration - * @param workflow {*|null} the workflow (if already initialized, no-op) - * @param unit {*} workflow unit object - * @param type {String} value in ["workflow", "subworkflow"] - * @param workflowCls {*} workflow class - * @returns {Workflow|*} workflow object - */ -function createWorkflowHead({ workflow, unit, type, workflowCls }) { - if (workflow) - return workflow; - let wf; - switch (type) { - case "workflow": - wf = unit; - break; - case "subworkflow": - wf = workflowCls.fromSubworkflow(unit); - break; - default: - throw new Error(`workflow type=${type} not understood.`); - } - return wf; -} -/** - * @summary Combine workflow units together - * @param workflow {*} the workflow object - * @param unit {*} workflow/subworkflow object - * @param config {*} additional configuration for e.g. map units - * @param type {String} value in ["workflow", "subworkflow"] - * @param unitFactoryCls {*} unit factory class for e.g. map units - * @returns {*} modified workflow - */ -function composeWorkflow({ workflow, unit, config, type, unitFactoryCls }) { - /* eslint-disable no-case-declarations */ - switch (type) { - case "workflow": - const { mapUnit: isMapUnit, ...mapUnitConfig } = config; - if (isMapUnit) { - const mapUnit = createMapUnit({ config: mapUnitConfig, unitFactoryCls }); - workflow.addMapUnit(mapUnit, unit); - } - else { - console.log("adding workflows directly to workflows is not supported."); - } - break; - case "subworkflow": - workflow.addSubworkflow(unit); - break; - default: - throw new Error(`workflow type=${type} not understood.`); - } - /* eslint-enable no-case-declarations */ - return workflow; -} -/** - * @summary Convert a flattened array of workflow units to a properly constructed workflow - * @param wfUnits {Array} array of workflow units - * @param workflowCls {*} workflow class - * @param unitFactoryCls {*} unit factory class - * @returns {*} constructed workflow - */ -function createFromWorkflowUnits({ wfUnits, workflowCls, unitFactoryCls }) { - let workflow, unit, config, type; - wfUnits.map((wfUnit) => { - ({ unit, config, type } = wfUnit); - if (!workflow) { - workflow = createWorkflowHead({ - workflow, - unit, - type, - workflowCls, - }); - } - else { - workflow = composeWorkflow({ - workflow, - unit, - config, - type, - unitFactoryCls, - }); - } - return null; - }); - return (0, utils_1.applyConfig)({ obj: workflow, config }); -} -/** - * @summary Creates a flattened array of workflow units from nested workflow/subworkflow - * configuration data comprising a simple or complex workflow - * @param appName - * @param units - * @param swArgs - * @returns {*[]} - */ -function createWorkflowUnits({ appName, workflowData, workflowSubworkflowMapByApplication, workflowCls, cache = [], ...swArgs }) { - const wfUnits = []; - const { units } = workflowData; - let unit, config; - units.map((unitData) => { - const { type } = unitData; - switch (type) { - case "workflow": - ({ config } = unitData); - unit = createWorkflowUnits({ - appName, - workflowData: unitData, - workflowSubworkflowMapByApplication, - workflowCls, - ...swArgs, - }); - break; - case "subworkflow": - ({ config } = workflowData); - unit = createSubworkflowUnit({ - appName, - unitData, - workflowData: workflowSubworkflowMapByApplication, - cache, - ...swArgs, - }); - break; - default: - break; - } - wfUnits.push({ config, unit, type }); - return null; - }); - return createFromWorkflowUnits({ - wfUnits, - workflowCls, - subworkflowCls: swArgs.subworkflowCls, - unitFactoryCls: swArgs.unitFactoryCls, - }); -} -function createWorkflow({ appName, workflowData, workflowSubworkflowMapByApplication, workflowCls = workflow_1.Workflow, ...swArgs }) { - const cache = []; - const { name } = workflowData; - console.log(`wode: creating ${appName} workflow ${name}`); - const wf = createWorkflowUnits({ - appName, - workflowData, - workflowSubworkflowMapByApplication, - workflowCls, - cache, - ...swArgs, - }); - wf.setName(name); - wf.applicationName = appName; - return wf; -} diff --git a/dist/js/workflows/default.d.ts b/dist/js/workflows/default.d.ts index 1a74f6f7..4beac8a8 100644 --- a/dist/js/workflows/default.d.ts +++ b/dist/js/workflows/default.d.ts @@ -1,36 +1,3 @@ -declare namespace _default { - let name: string; - let properties: never[]; - let subworkflows: { - _id: string; - application: { - name: string; - summary: string; - version: string; - }; - model: { - method: { - subtype: string; - type: string; - }; - subtype: string; - type: string; - }; - name: string; - properties: never[]; - units: never[]; - }[]; - let workflows: never[]; - let units: { - _id: string; - flowchartId: string; - head: boolean; - monitors: never[]; - postProcessors: never[]; - preProcessors: never[]; - results: never[]; - type: string; - name: string; - }[]; -} -export default _default; +import type { WorkflowSchema } from "@mat3ra/esse/dist/js/types"; +declare const defaultWorkflowConfig: WorkflowSchema; +export default defaultWorkflowConfig; diff --git a/dist/js/workflows/default.js b/dist/js/workflows/default.js index ed743f2a..ed07c47d 100644 --- a/dist/js/workflows/default.js +++ b/dist/js/workflows/default.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = { +const defaultWorkflowConfig = { name: "New Workflow", properties: [], subworkflows: [ @@ -8,7 +8,9 @@ exports.default = { _id: "c6e9dbbee8929de01f4e76ee", application: { name: "espresso", + shortName: "espresso", summary: "Quantum Espresso", + build: "6.3", version: "6.3", }, model: { @@ -18,6 +20,7 @@ exports.default = { }, subtype: "gga", type: "dft", + functional: "other", }, name: "New Subworkflow", properties: [], @@ -39,3 +42,4 @@ exports.default = { }, ], }; +exports.default = defaultWorkflowConfig; diff --git a/dist/js/workflows/index.d.ts b/dist/js/workflows/index.d.ts deleted file mode 100644 index f84e75a6..00000000 --- a/dist/js/workflows/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Workflow } from "./workflow"; -export function createWorkflows({ appName, workflowCls, workflowSubworkflowMapByApplication, ...swArgs }: { - [x: string]: any; - appName?: null | undefined; - workflowCls?: typeof Workflow | undefined; - workflowSubworkflowMapByApplication: any; -}): any[]; -/** - * @summary Create workflow configurations for all applications - * @param applications {Array} array of application names - * @param workflowCls {*} workflow class to instantiate - * @param workflowSubworkflowMapByApplication {Object} object containing all workflow/subworkflow map by application - * @param swArgs {Object} other classes for instantiation - * @returns {Array} array of workflow configurations - */ -export function createWorkflowConfigs({ applications, workflowCls, workflowSubworkflowMapByApplication, ...swArgs }: Array): Array; -import { createWorkflow } from "./create"; -export { Workflow, createWorkflow }; diff --git a/dist/js/workflows/index.js b/dist/js/workflows/index.js deleted file mode 100644 index 64462631..00000000 --- a/dist/js/workflows/index.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createWorkflow = exports.Workflow = void 0; -exports.createWorkflows = createWorkflows; -exports.createWorkflowConfigs = createWorkflowConfigs; -const ade_1 = require("@mat3ra/ade"); -const JSONSchemasInterface_1 = __importDefault(require("@mat3ra/esse/dist/js/esse/JSONSchemasInterface")); -const schemas_json_1 = __importDefault(require("@mat3ra/esse/dist/js/schemas.json")); -// Import Template here to apply context provider patch -// eslint-disable-next-line no-unused-vars -const patch_1 = require("../patch"); -const create_1 = require("./create"); -Object.defineProperty(exports, "createWorkflow", { enumerable: true, get: function () { return create_1.createWorkflow; } }); -const workflow_1 = require("./workflow"); -Object.defineProperty(exports, "Workflow", { enumerable: true, get: function () { return workflow_1.Workflow; } }); -// Running this to set schemas for validation, removing the redundant data from application-flavors tree: `flavors` -JSONSchemasInterface_1.default.setSchemas(schemas_json_1.default); -/* - Workflow construction follows these rules: - 1. Workflow is constructed as a collection of subworkflows defined in JSON - 2. A "units" key should contain at least one object referencing the workflow itself - 3. Additional workflows are added in order specified in the same "units" array - 4. map units are added along with their workflows according to data in "units" - 5. top-level subworkflows are added directly in the order also specified by "units" - */ -function createWorkflows({ appName = null, workflowCls = workflow_1.Workflow, workflowSubworkflowMapByApplication, ...swArgs }) { - let apps = appName !== null ? [appName] : ade_1.allApplications; - const allApplicationsFromWorkflowData = Object.keys(workflowSubworkflowMapByApplication.workflows); - // output warning if allApplications and allApplicationsFromWorkflowData do not match - if (appName === null) { - if (apps && apps.sort().join(",") !== allApplicationsFromWorkflowData.sort().join(",")) { - // eslint-disable-next-line no-console - console.warn(`Warning: allApplications and allApplicationsFromWorkflowData do not match: - ${apps.sort().join(",")} !== ${allApplicationsFromWorkflowData.sort().join(",")}`); - console.warn("Using allApplicationsFromWorkflowData"); - } - apps = allApplicationsFromWorkflowData; - } - const wfs = []; - const { workflows } = workflowSubworkflowMapByApplication; - apps.map((name) => { - const { [name]: dataByApp } = workflows; - Object.values(dataByApp).map((workflowDataForApp) => { - wfs.push((0, create_1.createWorkflow)({ - appName: name, - workflowData: workflowDataForApp, - workflowSubworkflowMapByApplication, - workflowCls, - ...swArgs, - })); - return null; - }); - return null; - }); - return wfs; -} -/** - * @summary Create workflow configurations for all applications - * @param applications {Array} array of application names - * @param workflowCls {*} workflow class to instantiate - * @param workflowSubworkflowMapByApplication {Object} object containing all workflow/subworkflow map by application - * @param swArgs {Object} other classes for instantiation - * @returns {Array} array of workflow configurations - */ -function createWorkflowConfigs({ applications, workflowCls = workflow_1.Workflow, workflowSubworkflowMapByApplication, ...swArgs }) { - const configs = []; - applications.forEach((app) => { - const workflows = createWorkflows({ - appName: app, - workflowCls, - workflowSubworkflowMapByApplication, - ...swArgs, - }); - workflows.forEach((wf) => { - configs.push({ - application: app, - name: wf.prop("name"), - config: wf.toJSON(), - }); - }); - }); - return configs; -} diff --git a/dist/js/workflows/relaxation.d.ts b/dist/js/workflows/relaxation.d.ts deleted file mode 100644 index 060471fc..00000000 --- a/dist/js/workflows/relaxation.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function RelaxationLogicMixin(superclass: any): { - new (): { - [x: string]: any; - get relaxationSubworkflow(): any; - isRelaxationSubworkflow(subworkflow: any): boolean; - get hasRelaxation(): any; - toggleRelaxation(): void; - }; - [x: string]: any; -}; diff --git a/dist/js/workflows/relaxation.js b/dist/js/workflows/relaxation.js deleted file mode 100644 index 13214f2f..00000000 --- a/dist/js/workflows/relaxation.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RelaxationLogicMixin = void 0; -const standata_1 = require("@mat3ra/standata"); -const RelaxationLogicMixin = (superclass) => class extends superclass { - get relaxationSubworkflow() { - var _a, _b; - const appName = (_b = (_a = this.subworkflows[0]) === null || _a === void 0 ? void 0 : _a.application) === null || _b === void 0 ? void 0 : _b.name; - if (!appName) - return undefined; - const subworkflowStandata = new standata_1.SubworkflowStandata(); - const relaxationSubworkflow = subworkflowStandata.getRelaxationSubworkflowByApplication(appName); - if (!relaxationSubworkflow) - return undefined; - return new this._Subworkflow(relaxationSubworkflow); - } - isRelaxationSubworkflow(subworkflow) { - const { relaxationSubworkflow } = this; - return ((relaxationSubworkflow === null || relaxationSubworkflow === void 0 ? void 0 : relaxationSubworkflow.systemName) !== undefined && - relaxationSubworkflow.systemName === subworkflow.systemName); - } - get hasRelaxation() { - return this.subworkflows.some((subworkflow) => this.isRelaxationSubworkflow(subworkflow)); - } - toggleRelaxation() { - if (this.hasRelaxation) { - const relaxSubworkflow = this.subworkflows.find((sw) => this.isRelaxationSubworkflow(sw)); - this.removeSubworkflow(relaxSubworkflow.id); - } - else { - const vcRelax = this.relaxationSubworkflow; - if (vcRelax) { - this.addSubworkflow(vcRelax, true); - } - } - } -}; -exports.RelaxationLogicMixin = RelaxationLogicMixin; diff --git a/dist/js/workflows/workflow.d.ts b/dist/js/workflows/workflow.d.ts deleted file mode 100644 index bb88caae..00000000 --- a/dist/js/workflows/workflow.d.ts +++ /dev/null @@ -1,4453 +0,0 @@ -export class Workflow extends BaseWorkflow { - static getDefaultComputeConfig: any; - static jsonSchema: { - $id: string; - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - workflows: { - description: string; - type: string; - items: { - type: string; - }; - }; - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - metadata: { - type: string; - }; - properties: { - description: string; - type: string; - items: { - description: string; - type: string; - }; - }; - isUsingDataset: { - description: string; - type: string; - }; - subworkflows: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - properties: { - description: string; - type: string; - items: { - description: string; - type: string; - }; - }; - compute: { - $schema: string; - title: string; - description: string; - type: string; - required: string[]; - properties: { - queue: { - description: string; - type: string; - enum: string[]; - }; - nodes: { - description: string; - type: string; - }; - ppn: { - description: string; - type: string; - }; - timeLimit: { - description: string; - type: string; - }; - timeLimitType: { - description: string; - type: string; - default: string; - enum: string[]; - }; - isRestartable: { - description: string; - type: string; - default: boolean; - }; - notify: { - description: string; - type: string; - }; - email: { - description: string; - type: string; - }; - maxCPU: { - description: string; - type: string; - }; - arguments: { - description: string; - default: {}; - $schema: string; - title: string; - type: string; - additionalProperties: boolean; - properties: { - nimage: { - description: string; - type: string; - default: number; - minimum: number; - maximum: number; - }; - npools: { - description: string; - type: string; - default: number; - minimum: number; - maximum: number; - }; - nband: { - description: string; - type: string; - default: number; - minimum: number; - maximum: number; - }; - ntg: { - description: string; - type: string; - default: number; - minimum: number; - maximum: number; - }; - ndiag: { - description: string; - type: string; - default: number; - minimum: number; - maximum: number; - }; - }; - }; - cluster: { - description: string; - type: string; - properties: { - fqdn: { - description: string; - type: string; - }; - jid: { - description: string; - type: string; - }; - }; - }; - errors: { - description: string; - type: string; - items: { - type: string; - properties: { - domain: { - description: string; - type: string; - enum: string[]; - }; - reason: { - description: string; - type: string; - }; - message: { - description: string; - type: string; - }; - traceback: { - description: string; - type: string; - }; - }; - }; - }; - excludeFilesPattern: { - description: string; - type: string; - }; - }; - }; - units: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - oneOf: ({ - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - preProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - postProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - monitors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - results: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - tags: { - description: string; - type: string; - items: { - type: string; - }; - }; - status: { - type: string; - description: string; - enum: string[]; - }; - statusTrack: { - type: string; - items: { - type: string; - required: string[]; - properties: { - trackedAt: { - type: string; - }; - status: { - type: string; - }; - repetition: { - type: string; - }; - }; - }; - }; - isDraft: { - type: string; - }; - type: { - description: string; - type: string; - const: string; - }; - head: { - description: string; - type: string; - }; - flowchartId: { - description: string; - type: string; - }; - next: { - description: string; - type: string; - }; - enableRender: { - description: string; - type: string; - }; - subtype: { - enum: string[]; - }; - source: { - enum: string[]; - }; - input: { - type: string; - items: { - oneOf: ({ - $schema: string; - title: string; - type: string; - properties: { - type: { - const: string; - }; - ids: { - description: string; - type: string; - items: { - type: string; - }; - }; - collection?: undefined; - draft?: undefined; - objectData?: undefined; - overwrite?: undefined; - pathname?: undefined; - basename?: undefined; - filetype?: undefined; - }; - required: string[]; - } | { - $schema: string; - title: string; - type: string; - properties: { - type: { - const: string; - }; - collection: { - description: string; - type: string; - }; - draft: { - description: string; - type: string; - }; - ids?: undefined; - objectData?: undefined; - overwrite?: undefined; - pathname?: undefined; - basename?: undefined; - filetype?: undefined; - }; - required: string[]; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - type: { - const: string; - }; - objectData: { - $schema: string; - title: string; - type: string; - properties: { - CONTAINER: { - description: string; - type: string; - }; - NAME: { - description: string; - type: string; - }; - PROVIDER: { - description: string; - type: string; - }; - REGION: { - description: string; - type: string; - }; - SIZE: { - description: string; - type: string; - }; - TIMESTAMP: { - description: string; - type: string; - }; - }; - }; - overwrite: { - description: string; - type: string; - }; - pathname: { - description: string; - type: string; - }; - basename: { - description: string; - type: string; - $comment: string; - }; - filetype: { - description: string; - type: string; - }; - ids?: undefined; - collection?: undefined; - draft?: undefined; - }; - })[]; - discriminator: { - propertyName: string; - }; - $schema?: undefined; - title?: undefined; - type?: undefined; - required?: undefined; - properties?: undefined; - }; - description?: undefined; - }; - statement?: undefined; - then?: undefined; - else?: undefined; - maxOccurrences?: undefined; - throwException?: undefined; - errorMessage?: undefined; - application?: undefined; - executable?: undefined; - flavor?: undefined; - context?: undefined; - scope?: undefined; - operand?: undefined; - value?: undefined; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - preProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - postProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - monitors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - results: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - tags: { - description: string; - type: string; - items: { - type: string; - }; - }; - status: { - type: string; - description: string; - enum: string[]; - }; - statusTrack: { - type: string; - items: { - type: string; - required: string[]; - properties: { - trackedAt: { - type: string; - }; - status: { - type: string; - }; - repetition: { - type: string; - }; - }; - }; - }; - isDraft: { - type: string; - }; - type: { - description: string; - type: string; - const: string; - }; - head: { - description: string; - type: string; - }; - flowchartId: { - description: string; - type: string; - }; - next: { - description: string; - type: string; - }; - enableRender: { - description: string; - type: string; - }; - input: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - scope: { - description: string; - type: string; - }; - name: { - description: string; - type: string; - }; - template?: undefined; - rendered?: undefined; - isManuallyChanged?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - }; - }; - statement: { - description: string; - type: string; - }; - then: { - description: string; - type: string; - }; - else: { - description: string; - type: string; - }; - maxOccurrences: { - description: string; - type: string; - }; - throwException: { - description: string; - type: string; - }; - subtype?: undefined; - source?: undefined; - errorMessage?: undefined; - application?: undefined; - executable?: undefined; - flavor?: undefined; - context?: undefined; - scope?: undefined; - operand?: undefined; - value?: undefined; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - preProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - postProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - monitors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - results: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - tags: { - description: string; - type: string; - items: { - type: string; - }; - }; - status: { - type: string; - description: string; - enum: string[]; - }; - statusTrack: { - type: string; - items: { - type: string; - required: string[]; - properties: { - trackedAt: { - type: string; - }; - status: { - type: string; - }; - repetition: { - type: string; - }; - }; - }; - }; - isDraft: { - type: string; - }; - type: { - description: string; - type: string; - const: string; - }; - head: { - description: string; - type: string; - }; - flowchartId: { - description: string; - type: string; - }; - next: { - description: string; - type: string; - }; - enableRender: { - description: string; - type: string; - }; - statement: { - type: string; - description: string; - }; - errorMessage: { - type: string; - description: string; - }; - subtype?: undefined; - source?: undefined; - input?: undefined; - then?: undefined; - else?: undefined; - maxOccurrences?: undefined; - throwException?: undefined; - application?: undefined; - executable?: undefined; - flavor?: undefined; - context?: undefined; - scope?: undefined; - operand?: undefined; - value?: undefined; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - preProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - postProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - monitors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - results: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - tags: { - description: string; - type: string; - items: { - type: string; - }; - }; - status: { - type: string; - description: string; - enum: string[]; - }; - statusTrack: { - type: string; - items: { - type: string; - required: string[]; - properties: { - trackedAt: { - type: string; - }; - status: { - type: string; - }; - repetition: { - type: string; - }; - }; - }; - }; - isDraft: { - type: string; - }; - type: { - description: string; - type: string; - const: string; - }; - head: { - description: string; - type: string; - }; - flowchartId: { - description: string; - type: string; - }; - next: { - description: string; - type: string; - }; - enableRender: { - description: string; - type: string; - }; - application: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - shortName: { - description: string; - type: string; - }; - summary: { - description: string; - type: string; - }; - version: { - description: string; - type: string; - }; - build: { - description: string; - type: string; - }; - hasAdvancedComputeOptions: { - description: string; - type: string; - }; - isLicensed: { - description: string; - type: string; - }; - }; - }; - executable: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - preProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - postProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - monitors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - results: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - applicationId: { - description: string; - type: string; - items: { - type: string; - }; - }; - hasAdvancedComputeOptions: { - description: string; - type: string; - }; - }; - }; - flavor: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - preProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - postProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - monitors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - results: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - executableId: { - description: string; - type: string; - }; - executableName: { - description: string; - type: string; - }; - applicationName: { - description: string; - type: string; - }; - input: { - title: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - additionalProperties: boolean; - properties: { - templateId: { - type: string; - }; - templateName: { - type: string; - }; - name: { - description: string; - type: string; - }; - }; - }; - }; - supportedApplicationVersions: { - description: string; - type: string; - items: { - type: string; - }; - }; - }; - }; - input: { - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - template: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - applicationName: { - type: string; - }; - applicationVersion: { - type: string; - }; - executableName: { - type: string; - }; - contextProviders: { - type: string; - items: { - description: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - tsType: string; - }; - }; - }; - }; - content: { - description: string; - type: string; - }; - }; - }; - rendered: { - description: string; - type: string; - }; - isManuallyChanged: { - type: string; - default: boolean; - }; - scope?: undefined; - name?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - }; - description?: undefined; - }; - context: { - type: string; - items: { - $schema: string; - title: string; - oneOf: ({ - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - oneOf: ({ - $schema: string; - title: string; - description: string; - type: string; - properties: { - contextProviderName: { - type: string; - const: string; - description: string; - }; - CHARGE: { - type: string; - description: string; - }; - MULT: { - type: string; - description: string; - }; - BASIS: { - type: string; - description: string; - }; - NAT: { - type: string; - description: string; - }; - NTYP: { - type: string; - description: string; - }; - ATOMIC_POSITIONS: { - type: string; - description: string; - items?: undefined; - }; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: { - type: string; - description: string; - }; - ATOMIC_SPECIES: { - type: string; - description: string; - items?: undefined; - }; - FUNCTIONAL: { - type: string; - description: string; - }; - CARTESIAN: { - type: string; - description: string; - }; - IBRAV?: undefined; - RESTART_MODE?: undefined; - ATOMIC_SPECIES_WITH_LABELS?: undefined; - NTYP_WITH_LABELS?: undefined; - CELL_PARAMETERS?: undefined; - FIRST_IMAGE?: undefined; - LAST_IMAGE?: undefined; - INTERMEDIATE_IMAGES?: undefined; - POSCAR?: undefined; - POSCAR_WITH_CONSTRAINTS?: undefined; - }; - required: string[]; - } | { - $schema: string; - title: string; - description: string; - type: string; - required: string[]; - properties: { - IBRAV: { - type: string; - }; - RESTART_MODE: { - type: string; - enum: string[]; - default: string; - }; - ATOMIC_SPECIES: { - type: string; - items: { - type: string; - required: string[]; - additionalProperties: boolean; - properties: { - X: { - type: string; - description: string; - }; - Mass_X: { - type: string; - description: string; - }; - PseudoPot_X: { - type: string; - description: string; - }; - }; - }; - description?: undefined; - }; - ATOMIC_SPECIES_WITH_LABELS: { - type: string; - items: { - type: string; - required: string[]; - additionalProperties: boolean; - properties: { - X: { - type: string; - description: string; - }; - Mass_X: { - type: string; - description: string; - }; - PseudoPot_X: { - type: string; - description: string; - }; - }; - }; - }; - NAT: { - type: string; - description: string; - }; - NTYP: { - type: string; - description: string; - }; - NTYP_WITH_LABELS: { - type: string; - description: string; - minimum: number; - }; - ATOMIC_POSITIONS: { - type: string; - items: { - type: string; - required: string[]; - additionalProperties: boolean; - properties: { - X: { - type: string; - description: string; - }; - x: { - type: string; - description: string; - }; - y: { - type: string; - description: string; - }; - z: { - type: string; - description: string; - }; - "if_pos(1)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - "if_pos(2)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - "if_pos(3)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - }; - }; - description?: undefined; - }; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: { - type: string; - description: string; - }; - CELL_PARAMETERS: { - type: string; - additionalProperties: boolean; - properties: { - v1: { - $schema: string; - title: string; - type: string; - minItems: number; - maxItems: number; - items: { - type: string; - }; - }; - v2: { - $schema: string; - title: string; - type: string; - minItems: number; - maxItems: number; - items: { - type: string; - }; - }; - v3: { - $schema: string; - title: string; - type: string; - minItems: number; - maxItems: number; - items: { - type: string; - }; - }; - }; - }; - FIRST_IMAGE: { - type: string; - items: { - type: string; - required: string[]; - additionalProperties: boolean; - properties: { - X: { - type: string; - description: string; - }; - x: { - type: string; - description: string; - }; - y: { - type: string; - description: string; - }; - z: { - type: string; - description: string; - }; - "if_pos(1)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - "if_pos(2)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - "if_pos(3)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - }; - }; - description?: undefined; - }; - LAST_IMAGE: { - type: string; - items: { - type: string; - required: string[]; - additionalProperties: boolean; - properties: { - X: { - type: string; - description: string; - }; - x: { - type: string; - description: string; - }; - y: { - type: string; - description: string; - }; - z: { - type: string; - description: string; - }; - "if_pos(1)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - "if_pos(2)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - "if_pos(3)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - }; - }; - description?: undefined; - }; - INTERMEDIATE_IMAGES: { - type: string; - description: string; - items: { - type: string; - items: { - type: string; - required: string[]; - additionalProperties: boolean; - properties: { - X: { - type: string; - description: string; - }; - x: { - type: string; - description: string; - }; - y: { - type: string; - description: string; - }; - z: { - type: string; - description: string; - }; - "if_pos(1)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - "if_pos(2)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - "if_pos(3)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - }; - }; - }; - }; - contextProviderName: { - type: string; - const: string; - description: string; - }; - CHARGE?: undefined; - MULT?: undefined; - BASIS?: undefined; - FUNCTIONAL?: undefined; - CARTESIAN?: undefined; - POSCAR?: undefined; - POSCAR_WITH_CONSTRAINTS?: undefined; - }; - } | { - $schema: string; - title: string; - description: string; - type: string; - required: string[]; - properties: { - IBRAV: { - type: string; - }; - RESTART_MODE: { - type: string; - enum: string[]; - default: string; - }; - ATOMIC_SPECIES: { - type: string; - items: { - type: string; - required: string[]; - additionalProperties: boolean; - properties: { - X: { - type: string; - description: string; - }; - Mass_X: { - type: string; - description: string; - }; - PseudoPot_X: { - type: string; - description: string; - }; - }; - }; - description?: undefined; - }; - ATOMIC_SPECIES_WITH_LABELS: { - type: string; - items: { - type: string; - required: string[]; - additionalProperties: boolean; - properties: { - X: { - type: string; - description: string; - }; - Mass_X: { - type: string; - description: string; - }; - PseudoPot_X: { - type: string; - description: string; - }; - }; - }; - }; - NAT: { - type: string; - description: string; - }; - NTYP: { - type: string; - description: string; - }; - NTYP_WITH_LABELS: { - type: string; - description: string; - minimum: number; - }; - ATOMIC_POSITIONS: { - type: string; - items: { - type: string; - required: string[]; - additionalProperties: boolean; - properties: { - X: { - type: string; - description: string; - }; - x: { - type: string; - description: string; - }; - y: { - type: string; - description: string; - }; - z: { - type: string; - description: string; - }; - "if_pos(1)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - "if_pos(2)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - "if_pos(3)": { - $schema: string; - title: string; - type: string; - minimum: number; - maximum: number; - }; - }; - }; - description?: undefined; - }; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: { - type: string; - description: string; - }; - CELL_PARAMETERS: { - type: string; - additionalProperties: boolean; - properties: { - v1: { - $schema: string; - title: string; - type: string; - minItems: number; - maxItems: number; - items: { - type: string; - }; - }; - v2: { - $schema: string; - title: string; - type: string; - minItems: number; - maxItems: number; - items: { - type: string; - }; - }; - v3: { - $schema: string; - title: string; - type: string; - minItems: number; - maxItems: number; - items: { - type: string; - }; - }; - }; - }; - contextProviderName: { - type: string; - const: string; - description: string; - }; - CHARGE?: undefined; - MULT?: undefined; - BASIS?: undefined; - FUNCTIONAL?: undefined; - CARTESIAN?: undefined; - FIRST_IMAGE?: undefined; - LAST_IMAGE?: undefined; - INTERMEDIATE_IMAGES?: undefined; - POSCAR?: undefined; - POSCAR_WITH_CONSTRAINTS?: undefined; - }; - } | { - $schema: string; - title: string; - description: string; - type: string; - properties: { - POSCAR: { - type: string; - description: string; - }; - POSCAR_WITH_CONSTRAINTS: { - type: string; - description: string; - }; - contextProviderName: { - type: string; - const: string; - description: string; - }; - CHARGE?: undefined; - MULT?: undefined; - BASIS?: undefined; - NAT?: undefined; - NTYP?: undefined; - ATOMIC_POSITIONS?: undefined; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS?: undefined; - ATOMIC_SPECIES?: undefined; - FUNCTIONAL?: undefined; - CARTESIAN?: undefined; - IBRAV?: undefined; - RESTART_MODE?: undefined; - ATOMIC_SPECIES_WITH_LABELS?: undefined; - NTYP_WITH_LABELS?: undefined; - CELL_PARAMETERS?: undefined; - FIRST_IMAGE?: undefined; - LAST_IMAGE?: undefined; - INTERMEDIATE_IMAGES?: undefined; - }; - required: string[]; - } | { - $schema: string; - title: string; - description: string; - type: string; - properties: { - FIRST_IMAGE: { - type: string; - description: string; - items?: undefined; - }; - LAST_IMAGE: { - type: string; - description: string; - items?: undefined; - }; - INTERMEDIATE_IMAGES: { - type: string; - description: string; - items: { - type: string; - items?: undefined; - }; - }; - contextProviderName: { - type: string; - const: string; - description: string; - }; - CHARGE?: undefined; - MULT?: undefined; - BASIS?: undefined; - NAT?: undefined; - NTYP?: undefined; - ATOMIC_POSITIONS?: undefined; - ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS?: undefined; - ATOMIC_SPECIES?: undefined; - FUNCTIONAL?: undefined; - CARTESIAN?: undefined; - IBRAV?: undefined; - RESTART_MODE?: undefined; - ATOMIC_SPECIES_WITH_LABELS?: undefined; - NTYP_WITH_LABELS?: undefined; - CELL_PARAMETERS?: undefined; - POSCAR?: undefined; - POSCAR_WITH_CONSTRAINTS?: undefined; - }; - required: string[]; - })[]; - discriminator: { - propertyName: string; - }; - $schema?: undefined; - title?: undefined; - description?: undefined; - type?: undefined; - properties?: undefined; - required?: undefined; - minItems?: undefined; - items?: undefined; - uniqueItems?: undefined; - }; - extraData: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - materialHash: { - type: string; - }; - }; - }; - isEdited: { - type: string; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - properties: { - wavefunction: { - type: string; - }; - density: { - type: string; - }; - dimensions?: undefined; - shifts?: undefined; - reciprocalVectorRatios?: undefined; - gridMetricType?: undefined; - gridMetricValue?: undefined; - preferGridMetric?: undefined; - nImages?: undefined; - type?: undefined; - offset?: undefined; - electricField?: undefined; - targetFermiEnergy?: undefined; - target_column_name?: undefined; - problem_category?: undefined; - fraction_held_as_test_set?: undefined; - numberOfSteps?: undefined; - timeStep?: undefined; - electronMass?: undefined; - temperature?: undefined; - startingMagnetization?: undefined; - isTotalMagnetization?: undefined; - totalMagnetization?: undefined; - isExistingChargeDensity?: undefined; - isStartingMagnetization?: undefined; - isArbitrarySpinAngle?: undefined; - isArbitrarySpinDirection?: undefined; - lforcet?: undefined; - spinAngles?: undefined; - isConstrainedMagnetization?: undefined; - constrainedMagnetization?: undefined; - isFixedMagnetization?: undefined; - fixedMagnetization?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - required?: undefined; - minItems?: undefined; - items?: undefined; - uniqueItems?: undefined; - }; - isEdited: { - type: string; - }; - extraData: { - type: string; - $schema?: undefined; - title?: undefined; - required?: undefined; - properties?: undefined; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - enum: string[]; - const?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - required: string[]; - properties: { - dimensions: { - oneOf: { - type: string; - items: { - type: string; - }; - minItems: number; - maxItems: number; - }[]; - }; - shifts: { - type: string; - minItems: number; - maxItems: number; - items: { - type: string; - }; - }; - reciprocalVectorRatios: { - type: string; - minItems: number; - maxItems: number; - items: { - type: string; - }; - }; - gridMetricType: { - type: string; - enum: string[]; - }; - gridMetricValue: { - type: string; - }; - preferGridMetric: { - type: string; - }; - wavefunction?: undefined; - density?: undefined; - nImages?: undefined; - type?: undefined; - offset?: undefined; - electricField?: undefined; - targetFermiEnergy?: undefined; - target_column_name?: undefined; - problem_category?: undefined; - fraction_held_as_test_set?: undefined; - numberOfSteps?: undefined; - timeStep?: undefined; - electronMass?: undefined; - temperature?: undefined; - startingMagnetization?: undefined; - isTotalMagnetization?: undefined; - totalMagnetization?: undefined; - isExistingChargeDensity?: undefined; - isStartingMagnetization?: undefined; - isArbitrarySpinAngle?: undefined; - isArbitrarySpinDirection?: undefined; - lforcet?: undefined; - spinAngles?: undefined; - isConstrainedMagnetization?: undefined; - constrainedMagnetization?: undefined; - isFixedMagnetization?: undefined; - fixedMagnetization?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - minItems?: undefined; - items?: undefined; - uniqueItems?: undefined; - }; - extraData: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - materialHash: { - type: string; - }; - }; - }; - isEdited: { - type: string; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - enum: string[]; - const?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - minItems: number; - items: { - type: string; - required: string[]; - properties: { - point: { - type: string; - }; - steps: { - type: string; - }; - coordinates: { - type: string; - items: { - type: string; - }; - }; - paramType?: undefined; - atomicSpecies?: undefined; - atomicOrbital?: undefined; - value?: undefined; - hubbardUValue?: undefined; - siteIndex?: undefined; - atomicSpecies2?: undefined; - siteIndex2?: undefined; - atomicOrbital2?: undefined; - hubbardVValue?: undefined; - atomicSpeciesIndex?: undefined; - }; - }; - oneOf?: undefined; - discriminator?: undefined; - properties?: undefined; - required?: undefined; - uniqueItems?: undefined; - }; - extraData: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - materialHash: { - type: string; - }; - }; - }; - isEdited: { - type: string; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - minItems: number; - items: { - type: string; - properties: { - paramType: { - type: string; - title: string; - enum: string[]; - }; - atomicSpecies: { - type: string; - title: string; - }; - atomicOrbital: { - type: string; - title: string; - }; - value: { - type: string; - title: string; - }; - point?: undefined; - steps?: undefined; - coordinates?: undefined; - hubbardUValue?: undefined; - siteIndex?: undefined; - atomicSpecies2?: undefined; - siteIndex2?: undefined; - atomicOrbital2?: undefined; - hubbardVValue?: undefined; - atomicSpeciesIndex?: undefined; - }; - required?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - properties?: undefined; - required?: undefined; - uniqueItems?: undefined; - }; - isEdited: { - type: string; - }; - extraData: { - type: string; - $schema?: undefined; - title?: undefined; - required?: undefined; - properties?: undefined; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - items: { - type: string; - properties: { - atomicSpecies: { - type: string; - title: string; - }; - atomicOrbital: { - type: string; - title: string; - }; - hubbardUValue: { - type: string; - title: string; - }; - point?: undefined; - steps?: undefined; - coordinates?: undefined; - paramType?: undefined; - value?: undefined; - siteIndex?: undefined; - atomicSpecies2?: undefined; - siteIndex2?: undefined; - atomicOrbital2?: undefined; - hubbardVValue?: undefined; - atomicSpeciesIndex?: undefined; - }; - required?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - properties?: undefined; - required?: undefined; - minItems?: undefined; - uniqueItems?: undefined; - }; - extraData: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - materialHash: { - type: string; - }; - }; - }; - isEdited: { - type: string; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - minItems: number; - items: { - type: string; - properties: { - atomicSpecies: { - type: string; - title: string; - }; - siteIndex: { - type: string; - title: string; - }; - atomicOrbital: { - type: string; - title: string; - }; - atomicSpecies2: { - type: string; - title: string; - }; - siteIndex2: { - type: string; - title: string; - }; - atomicOrbital2: { - type: string; - title: string; - }; - hubbardVValue: { - type: string; - title: string; - }; - point?: undefined; - steps?: undefined; - coordinates?: undefined; - paramType?: undefined; - value?: undefined; - hubbardUValue?: undefined; - atomicSpeciesIndex?: undefined; - }; - required?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - properties?: undefined; - required?: undefined; - uniqueItems?: undefined; - }; - isEdited: { - type: string; - }; - extraData: { - type: string; - $schema?: undefined; - title?: undefined; - required?: undefined; - properties?: undefined; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - uniqueItems: boolean; - minItems: number; - items: { - type: string; - properties: { - atomicSpecies: { - type: string; - title: string; - }; - atomicSpeciesIndex: { - type: string; - title: string; - }; - hubbardUValue: { - type: string; - title: string; - }; - point?: undefined; - steps?: undefined; - coordinates?: undefined; - paramType?: undefined; - atomicOrbital?: undefined; - value?: undefined; - siteIndex?: undefined; - atomicSpecies2?: undefined; - siteIndex2?: undefined; - atomicOrbital2?: undefined; - hubbardVValue?: undefined; - }; - required?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - properties?: undefined; - required?: undefined; - }; - isEdited: { - type: string; - }; - extraData: { - type: string; - $schema?: undefined; - title?: undefined; - required?: undefined; - properties?: undefined; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - properties: { - nImages: { - type: string; - }; - wavefunction?: undefined; - density?: undefined; - dimensions?: undefined; - shifts?: undefined; - reciprocalVectorRatios?: undefined; - gridMetricType?: undefined; - gridMetricValue?: undefined; - preferGridMetric?: undefined; - type?: undefined; - offset?: undefined; - electricField?: undefined; - targetFermiEnergy?: undefined; - target_column_name?: undefined; - problem_category?: undefined; - fraction_held_as_test_set?: undefined; - numberOfSteps?: undefined; - timeStep?: undefined; - electronMass?: undefined; - temperature?: undefined; - startingMagnetization?: undefined; - isTotalMagnetization?: undefined; - totalMagnetization?: undefined; - isExistingChargeDensity?: undefined; - isStartingMagnetization?: undefined; - isArbitrarySpinAngle?: undefined; - isArbitrarySpinDirection?: undefined; - lforcet?: undefined; - spinAngles?: undefined; - isConstrainedMagnetization?: undefined; - constrainedMagnetization?: undefined; - isFixedMagnetization?: undefined; - fixedMagnetization?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - required?: undefined; - minItems?: undefined; - items?: undefined; - uniqueItems?: undefined; - }; - isEdited: { - type: string; - }; - extraData: { - type: string; - $schema?: undefined; - title?: undefined; - required?: undefined; - properties?: undefined; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - type: string; - properties: { - type: { - type: string; - enum: string[]; - default: string; - description: string; - }; - offset: { - type: string; - }; - electricField: { - type: string; - title: string; - }; - targetFermiEnergy: { - type: string; - title: string; - }; - wavefunction?: undefined; - density?: undefined; - dimensions?: undefined; - shifts?: undefined; - reciprocalVectorRatios?: undefined; - gridMetricType?: undefined; - gridMetricValue?: undefined; - preferGridMetric?: undefined; - nImages?: undefined; - target_column_name?: undefined; - problem_category?: undefined; - fraction_held_as_test_set?: undefined; - numberOfSteps?: undefined; - timeStep?: undefined; - electronMass?: undefined; - temperature?: undefined; - startingMagnetization?: undefined; - isTotalMagnetization?: undefined; - totalMagnetization?: undefined; - isExistingChargeDensity?: undefined; - isStartingMagnetization?: undefined; - isArbitrarySpinAngle?: undefined; - isArbitrarySpinDirection?: undefined; - lforcet?: undefined; - spinAngles?: undefined; - isConstrainedMagnetization?: undefined; - constrainedMagnetization?: undefined; - isFixedMagnetization?: undefined; - fixedMagnetization?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - description?: undefined; - required?: undefined; - minItems?: undefined; - items?: undefined; - uniqueItems?: undefined; - }; - extraData: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - materialHash: { - type: string; - }; - }; - }; - isEdited: { - type: string; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - properties: { - target_column_name: { - type: string; - }; - problem_category: { - type: string; - enum: string[]; - }; - wavefunction?: undefined; - density?: undefined; - dimensions?: undefined; - shifts?: undefined; - reciprocalVectorRatios?: undefined; - gridMetricType?: undefined; - gridMetricValue?: undefined; - preferGridMetric?: undefined; - nImages?: undefined; - type?: undefined; - offset?: undefined; - electricField?: undefined; - targetFermiEnergy?: undefined; - fraction_held_as_test_set?: undefined; - numberOfSteps?: undefined; - timeStep?: undefined; - electronMass?: undefined; - temperature?: undefined; - startingMagnetization?: undefined; - isTotalMagnetization?: undefined; - totalMagnetization?: undefined; - isExistingChargeDensity?: undefined; - isStartingMagnetization?: undefined; - isArbitrarySpinAngle?: undefined; - isArbitrarySpinDirection?: undefined; - lforcet?: undefined; - spinAngles?: undefined; - isConstrainedMagnetization?: undefined; - constrainedMagnetization?: undefined; - isFixedMagnetization?: undefined; - fixedMagnetization?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - required?: undefined; - minItems?: undefined; - items?: undefined; - uniqueItems?: undefined; - }; - isEdited: { - type: string; - }; - extraData: { - type: string; - $schema?: undefined; - title?: undefined; - required?: undefined; - properties?: undefined; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - properties: { - fraction_held_as_test_set: { - type: string; - minimum: number; - maximum: number; - }; - wavefunction?: undefined; - density?: undefined; - dimensions?: undefined; - shifts?: undefined; - reciprocalVectorRatios?: undefined; - gridMetricType?: undefined; - gridMetricValue?: undefined; - preferGridMetric?: undefined; - nImages?: undefined; - type?: undefined; - offset?: undefined; - electricField?: undefined; - targetFermiEnergy?: undefined; - target_column_name?: undefined; - problem_category?: undefined; - numberOfSteps?: undefined; - timeStep?: undefined; - electronMass?: undefined; - temperature?: undefined; - startingMagnetization?: undefined; - isTotalMagnetization?: undefined; - totalMagnetization?: undefined; - isExistingChargeDensity?: undefined; - isStartingMagnetization?: undefined; - isArbitrarySpinAngle?: undefined; - isArbitrarySpinDirection?: undefined; - lforcet?: undefined; - spinAngles?: undefined; - isConstrainedMagnetization?: undefined; - constrainedMagnetization?: undefined; - isFixedMagnetization?: undefined; - fixedMagnetization?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - required?: undefined; - minItems?: undefined; - items?: undefined; - uniqueItems?: undefined; - }; - isEdited: { - type: string; - }; - extraData: { - type: string; - $schema?: undefined; - title?: undefined; - required?: undefined; - properties?: undefined; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - properties: { - numberOfSteps: { - type: string; - title: string; - }; - timeStep: { - type: string; - title: string; - }; - electronMass: { - type: string; - title: string; - }; - temperature: { - type: string; - title: string; - }; - wavefunction?: undefined; - density?: undefined; - dimensions?: undefined; - shifts?: undefined; - reciprocalVectorRatios?: undefined; - gridMetricType?: undefined; - gridMetricValue?: undefined; - preferGridMetric?: undefined; - nImages?: undefined; - type?: undefined; - offset?: undefined; - electricField?: undefined; - targetFermiEnergy?: undefined; - target_column_name?: undefined; - problem_category?: undefined; - fraction_held_as_test_set?: undefined; - startingMagnetization?: undefined; - isTotalMagnetization?: undefined; - totalMagnetization?: undefined; - isExistingChargeDensity?: undefined; - isStartingMagnetization?: undefined; - isArbitrarySpinAngle?: undefined; - isArbitrarySpinDirection?: undefined; - lforcet?: undefined; - spinAngles?: undefined; - isConstrainedMagnetization?: undefined; - constrainedMagnetization?: undefined; - isFixedMagnetization?: undefined; - fixedMagnetization?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - required?: undefined; - minItems?: undefined; - items?: undefined; - uniqueItems?: undefined; - }; - isEdited: { - type: string; - }; - extraData: { - type: string; - $schema?: undefined; - title?: undefined; - required?: undefined; - properties?: undefined; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - required: string[]; - properties: { - startingMagnetization: { - type: string; - items: { - type: string; - required: string[]; - properties: { - atomicSpecies: { - type: string; - title: string; - }; - value: { - type: string; - title: string; - minimum: number; - maximum: number; - }; - index: { - type: string; - title: string; - }; - }; - }; - }; - isTotalMagnetization: { - type: string; - title: string; - }; - totalMagnetization: { - type: string; - title: string; - }; - wavefunction?: undefined; - density?: undefined; - dimensions?: undefined; - shifts?: undefined; - reciprocalVectorRatios?: undefined; - gridMetricType?: undefined; - gridMetricValue?: undefined; - preferGridMetric?: undefined; - nImages?: undefined; - type?: undefined; - offset?: undefined; - electricField?: undefined; - targetFermiEnergy?: undefined; - target_column_name?: undefined; - problem_category?: undefined; - fraction_held_as_test_set?: undefined; - numberOfSteps?: undefined; - timeStep?: undefined; - electronMass?: undefined; - temperature?: undefined; - isExistingChargeDensity?: undefined; - isStartingMagnetization?: undefined; - isArbitrarySpinAngle?: undefined; - isArbitrarySpinDirection?: undefined; - lforcet?: undefined; - spinAngles?: undefined; - isConstrainedMagnetization?: undefined; - constrainedMagnetization?: undefined; - isFixedMagnetization?: undefined; - fixedMagnetization?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - minItems?: undefined; - items?: undefined; - uniqueItems?: undefined; - }; - extraData: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - materialHash: { - type: string; - }; - }; - }; - isEdited: { - type: string; - }; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - type: string; - const: string; - enum?: undefined; - }; - data: { - $schema: string; - title: string; - description: string; - type: string; - properties: { - isExistingChargeDensity: { - type: string; - title: string; - }; - isStartingMagnetization: { - type: string; - title: string; - }; - startingMagnetization: { - type: string; - items: { - type: string; - properties: { - index: { - type: string; - title: string; - }; - atomicSpecies: { - type: string; - title: string; - }; - value: { - type: string; - title: string; - minimum?: undefined; - maximum?: undefined; - }; - }; - required?: undefined; - }; - }; - isArbitrarySpinAngle: { - type: string; - title: string; - }; - isArbitrarySpinDirection: { - type: string; - title: string; - }; - lforcet: { - type: string; - }; - spinAngles: { - type: string; - items: { - type: string; - properties: { - index: { - type: string; - title: string; - }; - atomicSpecies: { - type: string; - title: string; - }; - angle1: { - type: string; - title: string; - }; - angle2: { - type: string; - title: string; - }; - }; - }; - }; - isConstrainedMagnetization: { - type: string; - title: string; - }; - constrainedMagnetization: { - type: string; - properties: { - constrainType: { - type: string; - title: string; - enum: string[]; - }; - lambda: { - type: string; - title: string; - }; - }; - }; - isFixedMagnetization: { - type: string; - title: string; - }; - fixedMagnetization: { - type: string; - properties: { - x: { - type: string; - title: string; - }; - y: { - type: string; - title: string; - }; - z: { - type: string; - title: string; - }; - }; - }; - wavefunction?: undefined; - density?: undefined; - dimensions?: undefined; - shifts?: undefined; - reciprocalVectorRatios?: undefined; - gridMetricType?: undefined; - gridMetricValue?: undefined; - preferGridMetric?: undefined; - nImages?: undefined; - type?: undefined; - offset?: undefined; - electricField?: undefined; - targetFermiEnergy?: undefined; - target_column_name?: undefined; - problem_category?: undefined; - fraction_held_as_test_set?: undefined; - numberOfSteps?: undefined; - timeStep?: undefined; - electronMass?: undefined; - temperature?: undefined; - isTotalMagnetization?: undefined; - totalMagnetization?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - required?: undefined; - minItems?: undefined; - items?: undefined; - uniqueItems?: undefined; - }; - extraData: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - materialHash: { - type: string; - }; - }; - }; - isEdited: { - type: string; - }; - }; - })[]; - }; - }; - subtype?: undefined; - source?: undefined; - statement?: undefined; - then?: undefined; - else?: undefined; - maxOccurrences?: undefined; - throwException?: undefined; - errorMessage?: undefined; - scope?: undefined; - operand?: undefined; - value?: undefined; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - preProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - postProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - monitors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - results: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - tags: { - description: string; - type: string; - items: { - type: string; - }; - }; - status: { - type: string; - description: string; - enum: string[]; - }; - statusTrack: { - type: string; - items: { - type: string; - required: string[]; - properties: { - trackedAt: { - type: string; - }; - status: { - type: string; - }; - repetition: { - type: string; - }; - }; - }; - }; - isDraft: { - type: string; - }; - type: { - description: string; - type: string; - const: string; - }; - head: { - description: string; - type: string; - }; - flowchartId: { - description: string; - type: string; - }; - next: { - description: string; - type: string; - }; - enableRender: { - description: string; - type: string; - }; - scope: { - type: string; - }; - input: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - scope: { - description: string; - type: string; - }; - name: { - description: string; - type: string; - }; - template?: undefined; - rendered?: undefined; - isManuallyChanged?: undefined; - }; - oneOf?: undefined; - discriminator?: undefined; - }; - }; - operand: { - description: string; - type: string; - }; - value: { - description: string; - oneOf: { - type: string; - }[]; - }; - subtype?: undefined; - source?: undefined; - statement?: undefined; - then?: undefined; - else?: undefined; - maxOccurrences?: undefined; - throwException?: undefined; - errorMessage?: undefined; - application?: undefined; - executable?: undefined; - flavor?: undefined; - context?: undefined; - }; - })[]; - discriminator: { - propertyName: string; - }; - required: string[]; - }; - }; - model: { - $schema: string; - title: string; - type: string; - oneOf: ({ - $schema: string; - title: string; - type: string; - definitions: { - lda: { - required: string[]; - properties: { - type: { - const: string; - }; - subtype: { - const: string; - }; - functional: { - enum: string[]; - }; - method: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - type: { - description: string; - type: string; - }; - subtype: { - description: string; - type: string; - }; - precision: { - description: string; - type: string; - }; - data: { - description: string; - type: string; - }; - }; - }; - }; - }; - gga: { - required: string[]; - properties: { - type: { - const: string; - }; - subtype: { - const: string; - }; - functional: { - enum: string[]; - }; - method: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - type: { - description: string; - type: string; - }; - subtype: { - description: string; - type: string; - }; - precision: { - description: string; - type: string; - }; - data: { - description: string; - type: string; - }; - }; - }; - }; - }; - hybrid: { - required: string[]; - properties: { - type: { - const: string; - }; - subtype: { - const: string; - }; - functional: { - enum: string[]; - }; - method: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - type: { - description: string; - type: string; - }; - subtype: { - description: string; - type: string; - }; - precision: { - description: string; - type: string; - }; - data: { - description: string; - type: string; - }; - }; - }; - }; - }; - }; - oneOf: { - properties: { - type: { - const: string; - }; - subtype: { - const: string; - }; - functional: { - enum: string[]; - }; - method: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - type: { - description: string; - type: string; - }; - subtype: { - description: string; - type: string; - }; - precision: { - description: string; - type: string; - }; - data: { - description: string; - type: string; - }; - }; - }; - }; - required: string[]; - }[]; - discriminator: { - propertyName: string; - }; - required: string[]; - properties: { - type: { - const: string; - enum?: undefined; - }; - subtype?: undefined; - method?: undefined; - }; - } | { - $schema: string; - title: string; - type: string; - properties: { - type: { - enum: string[]; - const?: undefined; - }; - subtype: { - enum: string[]; - }; - method: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - type: { - description: string; - type: string; - }; - subtype: { - description: string; - type: string; - }; - precision: { - description: string; - type: string; - }; - data: { - description: string; - type: string; - }; - }; - }; - }; - required: string[]; - definitions?: undefined; - oneOf?: undefined; - discriminator?: undefined; - })[]; - discriminator: { - propertyName: string; - }; - }; - application: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - shortName: { - description: string; - type: string; - }; - summary: { - description: string; - type: string; - }; - version: { - description: string; - type: string; - }; - build: { - description: string; - type: string; - }; - hasAdvancedComputeOptions: { - description: string; - type: string; - }; - isLicensed: { - description: string; - type: string; - }; - }; - }; - isDraft: { - description: string; - type: string; - default: boolean; - }; - }; - }; - }; - units: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - oneOf: ({ - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - preProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - postProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - monitors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - results: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - tags: { - description: string; - type: string; - items: { - type: string; - }; - }; - status: { - type: string; - description: string; - enum: string[]; - }; - statusTrack: { - type: string; - items: { - type: string; - required: string[]; - properties: { - trackedAt: { - type: string; - }; - status: { - type: string; - }; - repetition: { - type: string; - }; - }; - }; - }; - isDraft: { - type: string; - }; - type: { - description: string; - type: string; - const: string; - }; - head: { - description: string; - type: string; - }; - flowchartId: { - description: string; - type: string; - }; - next: { - description: string; - type: string; - }; - enableRender: { - description: string; - type: string; - }; - workflowId: { - description: string; - type: string; - }; - input: { - description: string; - type: string; - required: string[]; - properties: { - target: { - description: string; - type: string; - }; - scope: { - description: string; - type: string; - }; - name: { - description: string; - type: string; - }; - values: { - description: string; - type: string; - items: { - oneOf: { - type: string; - }[]; - }; - }; - useValues: { - type: string; - }; - }; - items?: undefined; - }; - mapFlowchartId?: undefined; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - preProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - postProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - monitors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - results: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - tags: { - description: string; - type: string; - items: { - type: string; - }; - }; - status: { - type: string; - description: string; - enum: string[]; - }; - statusTrack: { - type: string; - items: { - type: string; - required: string[]; - properties: { - trackedAt: { - type: string; - }; - status: { - type: string; - }; - repetition: { - type: string; - }; - }; - }; - }; - isDraft: { - type: string; - }; - type: { - description: string; - type: string; - const: string; - }; - head: { - description: string; - type: string; - }; - flowchartId: { - description: string; - type: string; - }; - next: { - description: string; - type: string; - }; - enableRender: { - description: string; - type: string; - }; - mapFlowchartId: { - description: string; - type: string; - }; - input: { - description: string; - type: string; - items: { - type: string; - required: string[]; - properties: { - operation: { - description: string; - type: string; - }; - arguments: { - description: string; - type: string; - items: { - type: string; - }; - }; - }; - }; - required?: undefined; - properties?: undefined; - }; - workflowId?: undefined; - }; - } | { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - _id: { - description: string; - type: string; - }; - slug: { - description: string; - type: string; - }; - systemName: { - type: string; - }; - schemaVersion: { - description: string; - type: string; - default: string; - }; - name: { - description: string; - type: string; - }; - isDefault: { - description: string; - type: string; - default: boolean; - }; - preProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - postProcessors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - monitors: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - results: { - description: string; - type: string; - items: { - $schema: string; - title: string; - type: string; - required: string[]; - properties: { - name: { - description: string; - type: string; - }; - }; - }; - }; - tags: { - description: string; - type: string; - items: { - type: string; - }; - }; - status: { - type: string; - description: string; - enum: string[]; - }; - statusTrack: { - type: string; - items: { - type: string; - required: string[]; - properties: { - trackedAt: { - type: string; - }; - status: { - type: string; - }; - repetition: { - type: string; - }; - }; - }; - }; - isDraft: { - type: string; - }; - type: { - description: string; - type: string; - const: string; - }; - head: { - description: string; - type: string; - }; - flowchartId: { - description: string; - type: string; - }; - next: { - description: string; - type: string; - }; - enableRender: { - description: string; - type: string; - }; - workflowId?: undefined; - input?: undefined; - mapFlowchartId?: undefined; - }; - })[]; - discriminator: { - propertyName: string; - }; - required: string[]; - }; - }; - }; - }; - static usePredefinedIds: boolean; - static get defaultConfig(): { - name: string; - properties: never[]; - subworkflows: { - _id: string; - application: { - name: string; - summary: string; - version: string; - }; - model: { - method: { - subtype: string; - type: string; - }; - subtype: string; - type: string; - }; - name: string; - properties: never[]; - units: never[]; - }[]; - workflows: never[]; - units: { - _id: string; - flowchartId: string; - head: boolean; - monitors: never[]; - postProcessors: never[]; - preProcessors: never[]; - results: never[]; - type: string; - name: string; - }[]; - }; - static generateWorkflowId(name: any, properties?: null, subworkflows?: null, applicationName?: null): any; - static fromSubworkflow(subworkflow: any, ClsConstructor?: typeof Workflow): Workflow; - static fromSubworkflows(name: any, ClsConstructor?: typeof Workflow, ...subworkflows: any[]): Workflow; - constructor(config: any, _Subworkflow?: typeof Subworkflow, _UnitFactory?: typeof UnitFactory, _Workflow?: typeof Workflow, _MapUnit?: typeof MapUnit); - _Subworkflow: typeof Subworkflow; - _UnitFactory: typeof UnitFactory; - _Workflow: typeof Workflow; - _MapUnit: typeof MapUnit; - initialize(): void; - _subworkflows: any; - _units: any; - _workflows: any; - /** - * @summary Adds subworkflow to current workflow. - * @param subworkflow {Subworkflow} - * @param head {Boolean} - */ - addSubworkflow(subworkflow: Subworkflow, head?: boolean, index?: number): void; - removeSubworkflow(id: any): void; - subworkflowId(index: any): any; - replaceSubworkflowAtIndex(index: any, newSubworkflow: any): void; - get units(): any; - setUnits(arr: any): void; - get usedApplications(): any[]; - get usedApplicationNames(): any[]; - get usedApplicationVersions(): any[]; - get usedApplicationNamesWithVersions(): string[]; - get usedModels(): any[]; - get humanReadableUsedModels(): any[]; - toJSON(exclude?: any[]): lodash.Omit; - get isDefault(): any; - set isMultiMaterial(value: any); - get isMultiMaterial(): any; - set isUsingDataset(value: boolean); - get isUsingDataset(): boolean; - get properties(): any[]; - get humanReadableProperties(): string[]; - get systemName(): string; - get defaultDescription(): string; - get exabyteId(): any; - get hash(): any; - get isOutdated(): any; - get history(): any; - setMethodData(methodData: any): void; - /** - * @param unit {Unit} - * @param head {Boolean} - * @param index {Number} - */ - addUnit(unit: Unit, head?: boolean, index?: number): void; - removeUnit(flowchartId: any): void; - /** - * @return Subworkflow[] - */ - get subworkflows(): any; - get workflows(): any; - addUnitType(type: any, head?: boolean, index?: number): void; - addMapUnit(mapUnit: any, mapWorkflow: any): void; - findSubworkflowById(id: any): any; - get allSubworkflows(): any[]; - /** - * @summary Calculates hash of the workflow. Meaningful fields are units and subworkflows. - * units and subworkflows must be sorted topologically before hashing (already sorted). - */ - calculateHash(): string; -} -declare class BaseWorkflow { -} -import { Subworkflow } from "../subworkflows/subworkflow"; -import { UnitFactory } from "../units/factory"; -import { MapUnit } from "../units"; -import lodash from "lodash"; -export {}; diff --git a/dist/js/workflows/workflow.js b/dist/js/workflows/workflow.js deleted file mode 100644 index 0f6706d0..00000000 --- a/dist/js/workflows/workflow.js +++ /dev/null @@ -1,314 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Workflow = void 0; -/* eslint-disable max-classes-per-file */ -const entity_1 = require("@mat3ra/code/dist/js/entity"); -const workflow_json_1 = __importDefault(require("@mat3ra/esse/dist/js/schema/workflow.json")); -const ide_1 = require("@mat3ra/ide"); -const mode_1 = require("@mat3ra/mode"); -const utils_1 = require("@mat3ra/utils"); -const lodash_1 = __importDefault(require("lodash")); -const mixwith_1 = require("mixwith"); -const underscore_1 = __importDefault(require("underscore")); -const underscore_string_1 = __importDefault(require("underscore.string")); -const enums_1 = require("../enums"); -const subworkflow_1 = require("../subworkflows/subworkflow"); -const units_1 = require("../units"); -const factory_1 = require("../units/factory"); -const utils_2 = require("../utils"); -const default_1 = __importDefault(require("./default")); -const relaxation_1 = require("./relaxation"); -const { MODEL_NAMES } = mode_1.tree; -class BaseWorkflow extends (0, mixwith_1.mix)(entity_1.NamedDefaultableRepetitionContextAndRenderInMemoryEntity).with(ide_1.ComputedEntityMixin, relaxation_1.RelaxationLogicMixin) { -} -class Workflow extends BaseWorkflow { - constructor(config, _Subworkflow = subworkflow_1.Subworkflow, _UnitFactory = factory_1.UnitFactory, _Workflow = Workflow, _MapUnit = units_1.MapUnit) { - if (!config._id) { - config._id = Workflow.generateWorkflowId(config.name, config.properties, config.subworkflows, config.applicationName); - } - super(config); - this._Subworkflow = _Subworkflow; - this._UnitFactory = _UnitFactory; - this._Workflow = _Workflow; - this._MapUnit = _MapUnit; - if (!config.skipInitialize) - this.initialize(); - } - initialize() { - const me = this; - this._subworkflows = this.prop("subworkflows").map((x) => new me._Subworkflow(x)); - this._units = this.prop("units").map((unit) => me._UnitFactory.create(unit)); - this._json.workflows = this._json.workflows || []; - this._workflows = this.prop("workflows").map((x) => new me._Workflow(x)); - } - static get defaultConfig() { - return default_1.default; - } - static generateWorkflowId(name, properties = null, subworkflows = null, applicationName = null) { - const propsInfo = (properties === null || properties === void 0 ? void 0 : properties.length) ? properties.sort().join(",") : ""; - const swInfo = (subworkflows === null || subworkflows === void 0 ? void 0 : subworkflows.length) - ? subworkflows.map((sw) => sw.name || "unknown").join(",") - : ""; - const seed = [`workflow-${name}`, applicationName, propsInfo, swInfo] - .filter((p) => p) - .join("-"); - if (this.usePredefinedIds) - return utils_1.Utils.uuid.getUUIDFromNamespace(seed); - return utils_1.Utils.uuid.getUUID(); - } - static fromSubworkflow(subworkflow, ClsConstructor = Workflow) { - const config = { - name: subworkflow.name, - subworkflows: [subworkflow.toJSON()], - units: (0, utils_2.setNextLinks)((0, utils_2.setUnitsHead)([subworkflow.getAsUnit().toJSON()])), - properties: subworkflow.properties, - applicationName: subworkflow.application.name, - }; - return new ClsConstructor(config); - } - static fromSubworkflows(name, ClsConstructor = Workflow, ...subworkflows) { - return new ClsConstructor(name, subworkflows, subworkflows.map((sw) => sw.getAsUnit())); - } - /** - * @summary Adds subworkflow to current workflow. - * @param subworkflow {Subworkflow} - * @param head {Boolean} - */ - addSubworkflow(subworkflow, head = false, index = -1) { - const subworkflowUnit = subworkflow.getAsUnit(); - if (head) { - this.subworkflows.unshift(subworkflow); - this.addUnit(subworkflowUnit, head, index); - } - else { - this.subworkflows.push(subworkflow); - this.addUnit(subworkflowUnit, head, index); - } - } - removeSubworkflow(id) { - const subworkflowUnit = this.units.find((u) => u.id === id); - if (subworkflowUnit) - this.removeUnit(subworkflowUnit.flowchartId); - } - subworkflowId(index) { - const sw = this.prop(`subworkflows[${index}]`); - return sw ? sw._id : null; - } - replaceSubworkflowAtIndex(index, newSubworkflow) { - this._subworkflows[index] = newSubworkflow; - this.setUnits((0, utils_2.setNextLinks)((0, utils_2.setUnitsHead)(this._units))); - } - get units() { - return this._units; - } - setUnits(arr) { - this._units = arr; - } - // returns a list of `app` Classes - get usedApplications() { - const swApplications = this.subworkflows.map((sw) => sw.application); - const wfApplications = lodash_1.default.flatten(this.workflows.map((w) => w.usedApplications)); - return lodash_1.default.uniqBy(swApplications.concat(wfApplications), (a) => a.name); - } - // return application names - get usedApplicationNames() { - return this.usedApplications.map((a) => a.name); - } - get usedApplicationVersions() { - return this.usedApplications.map((a) => a.version); - } - get usedApplicationNamesWithVersions() { - return this.usedApplications.map((a) => `${a.name} ${a.version}`); - } - get usedModels() { - return lodash_1.default.uniq(this.subworkflows.map((sw) => sw.model.type)); - } - get humanReadableUsedModels() { - return this.usedModels.filter((m) => m !== "unknown").map((m) => MODEL_NAMES[m]); - } - toJSON(exclude = []) { - return lodash_1.default.omit({ - ...super.toJSON(), - units: this._units.map((x) => x.toJSON()), - subworkflows: this._subworkflows.map((x) => x.toJSON()), - workflows: this.workflows.map((x) => x.toJSON()), - ...(this.compute ? { compute: this.compute } : {}), // {"compute": null } won't pass esse validation - }, exclude); - } - get isDefault() { - return this.prop("isDefault", false); - } - get isMultiMaterial() { - const fromSubworkflows = this.subworkflows.some((sw) => sw.isMultiMaterial); - return this.prop("isMultiMaterial") || fromSubworkflows; - } - set isMultiMaterial(value) { - this.setProp("isMultiMaterial", value); - } - set isUsingDataset(value) { - this.setProp("isUsingDataset", value); - } - get isUsingDataset() { - return !!this.prop("isUsingDataset", false); - } - get properties() { - return lodash_1.default.uniq(lodash_1.default.flatten(this._subworkflows.map((x) => x.properties))); - } - get humanReadableProperties() { - return this.properties.map((name) => underscore_string_1.default.humanize(name)); - } - get systemName() { - return underscore_string_1.default.slugify(`${this.usedApplicationNames.join(":")}-${this.name.toLowerCase()}`); - } - get defaultDescription() { - return `${this.usedModels - .join(", ") - .toUpperCase()} workflow using ${this.usedApplicationNames.join(", ")}.`; - } - get exabyteId() { - return this.prop("exabyteId"); - } - get hash() { - return this.prop("hash", ""); - } - get isOutdated() { - return this.prop("isOutdated", false); - } - get history() { - return this.prop("history", []); - } - setMethodData(methodData) { - this.subworkflows.forEach((sw) => { - const method = methodData.getMethodBySubworkflow(sw); - if (method) - sw.model.setMethod(method); - }); - this.workflows.forEach((wf) => { - wf.subworkflows.forEach((sw) => { - const method = methodData.getMethodBySubworkflow(sw); - if (method) - sw.model.setMethod(method); - }); - }); - } - /** - * @param unit {Unit} - * @param head {Boolean} - * @param index {Number} - */ - addUnit(unit, head = false, index = -1) { - const { units } = this; - if (units.length === 0) { - unit.head = true; - this.setUnits([unit]); - } - else { - if (head) { - units.unshift(unit); - } - else if (index >= 0) { - units.splice(index, 0, unit); - } - else { - units.push(unit); - } - this.setUnits((0, utils_2.setNextLinks)((0, utils_2.setUnitsHead)(units))); - } - } - removeUnit(flowchartId) { - if (this.units.length < 2) - return; - const unit = this.units.find((x) => x.flowchartId === flowchartId); - const previousUnit = this.units.find((x) => x.next === unit.flowchartId); - if (previousUnit) { - delete previousUnit.next; - } - this._subworkflows = this._subworkflows.filter((x) => x.id !== unit.id); - this._units = (0, utils_2.setNextLinks)((0, utils_2.setUnitsHead)(this._units.filter((x) => x.flowchartId !== flowchartId))); - } - /** - * @return Subworkflow[] - */ - get subworkflows() { - return this._subworkflows; - } - get workflows() { - return this._workflows; - } - /* - * @param type {String|Object} Unit type, map or subworkflow - * @param head {Boolean} - * @param index {Number} Index at which the unit will be added. -1 by default (ignored). - */ - addUnitType(type, head = false, index = -1) { - switch (type) { - case enums_1.UNIT_TYPES.map: - // eslint-disable-next-line no-case-declarations - const workflowConfig = default_1.default; - // eslint-disable-next-line no-case-declarations - const mapUnit = new this._MapUnit(); - workflowConfig._id = this._Workflow.generateWorkflowId(workflowConfig.name, workflowConfig.properties, workflowConfig.subworkflows, this.applicationName); - this.prop("workflows").push(workflowConfig); - this._workflows = this.prop("workflows").map((x) => new this._Workflow(x)); - mapUnit.setWorkflowId(workflowConfig._id); - this.addUnit(mapUnit, head, index); - break; - case enums_1.UNIT_TYPES.subworkflow: - this.addSubworkflow(this._Subworkflow.createDefault(), head, index); - break; - default: - console.log(`unit_type=${type} unrecognized, skipping.`); - } - } - addMapUnit(mapUnit, mapWorkflow) { - const mapWorkflowConfig = mapWorkflow.toJSON(); - if (!mapWorkflowConfig._id) { - mapWorkflowConfig._id = this._Workflow.generateWorkflowId(mapWorkflowConfig.name, mapWorkflowConfig.properties, mapWorkflowConfig.subworkflows, mapWorkflow.applicationName || this.applicationName); - } - mapUnit.setWorkflowId(mapWorkflowConfig._id); - this.addUnit(mapUnit); - this._json.workflows.push(mapWorkflowConfig); - const me = this; - this._workflows = this.prop("workflows").map((x) => new me._Workflow(x)); - } - findSubworkflowById(id) { - if (!id) - return; - const workflows = this.workflows || []; - const subworkflows = this.subworkflows || []; - const subworkflow = subworkflows.find((sw) => sw.id === id); - if (subworkflow) - return subworkflow; - const workflow = workflows.find((w) => w.findSubworkflowById(id)); - if (workflow) - return workflow.findSubworkflowById(id); - console.warn("attempted to find a non-existing subworkflow"); - } - get allSubworkflows() { - const subworkflowsList = []; - this.subworkflows.forEach((sw) => subworkflowsList.push(sw)); - this.workflows.forEach((workflow) => { - return Array.prototype.push.apply(subworkflowsList, workflow.allSubworkflows); - }); - return subworkflowsList; - } - /** - * @summary Calculates hash of the workflow. Meaningful fields are units and subworkflows. - * units and subworkflows must be sorted topologically before hashing (already sorted). - */ - calculateHash() { - const meaningfulFields = { - units: underscore_1.default.map(this.units, (u) => u.calculateHash()).join(), - subworkflows: underscore_1.default.map(this.subworkflows, (sw) => sw.calculateHash()).join(), - workflows: underscore_1.default.map(this.workflows, (w) => w.calculateHash()).join(), - }; - return utils_1.Utils.hash.calculateHashFromObject(meaningfulFields); - } -} -exports.Workflow = Workflow; -Workflow.getDefaultComputeConfig = ide_1.getDefaultComputeConfig; -Workflow.jsonSchema = workflow_json_1.default; -Workflow.usePredefinedIds = false; diff --git a/package-lock.json b/package-lock.json index 3694f3a7..b38867bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,30 +11,22 @@ "dependencies": { "@exabyte-io/periodic-table.js": "2022.6.8-0", "@types/json-schema": "^7.0.15", - "@types/nunjucks": "^3.2.6", "@types/react-jsonschema-form": "^1.7.13", - "crypto-js": "^4.2.0", - "js-yaml": "^4.1.0", - "lodash": "^4.17.21", - "mixwith": "^0.1.1", "nunjucks": "^3.2.4", - "ts-node": "^10.9.2", - "typescript": "^5.6.6", - "underscore": "^1.13.3", - "underscore.string": "^3.3.4", - "v20": "^0.1.0" + "underscore.string": "^3.3.6" }, "devDependencies": { "@exabyte-io/eslint-config": "2025.5.13-0", - "@mat3ra/ade": "git+https://github.com/Exabyte-io/ade#6d494337d83e1b22fe272ff74cc1b6842a7c6561", - "@mat3ra/code": "git+https://github.com/Exabyte-io/code.git#cb3fa59e2cc143d744f9019322208d928ff8de88", - "@mat3ra/esse": "git+https://github.com/Exabyte-io/esse#b324747a87f4b3363936974f512e75fe255b52a9", - "@mat3ra/ide": "2025.11.19-0", - "@mat3ra/made": "git+https://github.com/Exabyte-io/made.git#47b3e12a859c45fa72079ed4ddd1675a6a32b4fe", - "@mat3ra/mode": "2025.11.13-0", - "@mat3ra/standata": "2026.1.12-0", + "@mat3ra/ade": "git+https://github.com/Exabyte-io/ade#0099ff1695e122c7c95183413ddf42aed809c7e4", + "@mat3ra/code": "git+https://github.com/Exabyte-io/code.git#c3c9e5eb177fe70b8bc221832b6f9d93104d7e2d", + "@mat3ra/esse": "git+https://github.com/Exabyte-io/esse#fa6f8dcd343e73d9193c945a01a546c1e4acdd9b", + "@mat3ra/made": "git+https://github.com/Exabyte-io/made.git#75f9a788a20decc18570d6db68e6d83068fab37f", + "@mat3ra/mode": "git+https://github.com/Exabyte-io/mode.git#5b0c40080fed20429496e5e60c69c162147c31f6", + "@mat3ra/prode": "git+https://github.com/Exabyte-io/prode.git#beac801b06ccd70c09301e240eaa739c208e6bd1", + "@mat3ra/standata": "git+https://github.com/Exabyte-io/standata.git#03f6861665ec72045ade00c4d5c91b7d5ab97c24", "@mat3ra/tsconfig": "^2024.6.3-0", "@mat3ra/utils": "2025.9.20-0", + "@types/nunjucks": "^3.2.6", "chai": "^4.3.4", "eslint": "^7.32.0", "eslint-config-airbnb": "^19.0.2", @@ -53,7 +45,9 @@ "lint-staged": "^12.1.2", "mocha": "^9.1.3", "nyc": "^15.1.0", - "prettier": "^2.7.1" + "prettier": "^2.7.1", + "ts-node": "^10.9.2", + "typescript": "^5.6.6" }, "engines": { "node": ">=20.0.0" @@ -62,20 +56,14 @@ "@mat3ra/ade": "*", "@mat3ra/code": "*", "@mat3ra/esse": "*", - "@mat3ra/ide": "*", "@mat3ra/made": "*", "@mat3ra/mode": "*", "@mat3ra/standata": "*", "@mat3ra/utils": "*" } }, - "../../../lib/ade.js": { - "extraneous": true - }, "node_modules/@ampproject/remapping": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -88,8 +76,6 @@ }, "node_modules/@apidevtools/json-schema-ref-parser": { "version": "11.9.3", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.9.3.tgz", - "integrity": "sha512-60vepv88RwcJtSHrD6MjIL6Ta3SOYbgfnkHb+ppAVK+o9mXprRtulx7VlRl3lN3bbvysAfCS7WMVfhUYemB0IQ==", "dev": true, "license": "MIT", "dependencies": { @@ -106,8 +92,6 @@ }, "node_modules/@babel/cli": { "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.16.0.tgz", - "integrity": "sha512-WLrM42vKX/4atIoQB+eb0ovUof53UUvecb4qGjU2PDDWRiZr50ZpiV8NpcLo7iSxeGYrRG0Mqembsa+UrTAV6Q==", "license": "MIT", "dependencies": { "commander": "^4.0.1", @@ -134,12 +118,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -148,9 +132,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", - "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -158,8 +142,6 @@ }, "node_modules/@babel/core": { "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.0.tgz", - "integrity": "sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==", "license": "MIT", "dependencies": { "@babel/code-frame": "^7.16.0", @@ -188,8 +170,6 @@ }, "node_modules/@babel/eslint-parser": { "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.16.3.tgz", - "integrity": "sha512-iB4ElZT0jAt7PKVaeVulOECdGe6UnmA/O0P9jlF5g5GBOwDVbna8AXhHRu4s27xQf6OkveyA8iTDv1jHdDejgQ==", "license": "MIT", "dependencies": { "eslint-scope": "^5.1.1", @@ -205,13 +185,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", - "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.5", - "@babel/types": "^7.28.5", + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -222,8 +202,6 @@ }, "node_modules/@babel/helper-annotate-as-pure": { "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", - "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", "license": "MIT", "dependencies": { "@babel/types": "^7.27.3" @@ -233,12 +211,12 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", - "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.27.2", + "@babel/compat-data": "^7.28.6", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", @@ -249,17 +227,17 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.5.tgz", - "integrity": "sha512-q3WC4JfdODypvxArsJQROfupPBq9+lMwjKq7C33GhbFYJsufD0yd/ziwD+hJucLeWsnFPWZjsU2DNFqBPE7jwQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.6.tgz", + "integrity": "sha512-dTOdvsjnG3xNT9Y0AUg1wAl38y+4Rl4sf9caSQZOXdNqVn+H+HbbJ4IyyHaIqNR6SW9oJpA/RuRjsjCw2IdIow==", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", "@babel/helper-member-expression-to-functions": "^7.28.5", "@babel/helper-optimise-call-expression": "^7.27.1", - "@babel/helper-replace-supers": "^7.27.1", + "@babel/helper-replace-supers": "^7.28.6", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", - "@babel/traverse": "^7.28.5", + "@babel/traverse": "^7.28.6", "semver": "^6.3.1" }, "engines": { @@ -271,8 +249,6 @@ }, "node_modules/@babel/helper-create-regexp-features-plugin": { "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.28.5.tgz", - "integrity": "sha512-N1EhvLtHzOvj7QQOUCCS3NrPJP8c5W6ZXCHDn7Yialuy1iu4r5EmIYkXlKNqT99Ciw+W0mDqWoR6HWMZlFP3hw==", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", @@ -288,8 +264,6 @@ }, "node_modules/@babel/helper-define-polyfill-provider": { "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", - "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.17.7", @@ -305,8 +279,6 @@ }, "node_modules/@babel/helper-environment-visitor": { "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", "license": "MIT", "dependencies": { "@babel/types": "^7.24.7" @@ -317,8 +289,6 @@ }, "node_modules/@babel/helper-globals": { "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", - "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -326,8 +296,6 @@ }, "node_modules/@babel/helper-member-expression-to-functions": { "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz", - "integrity": "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==", "license": "MIT", "dependencies": { "@babel/traverse": "^7.28.5", @@ -338,27 +306,27 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", - "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", "license": "MIT", "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", - "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.28.3" + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -369,8 +337,6 @@ }, "node_modules/@babel/helper-optimise-call-expression": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz", - "integrity": "sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==", "license": "MIT", "dependencies": { "@babel/types": "^7.27.1" @@ -380,9 +346,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", - "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -390,8 +356,6 @@ }, "node_modules/@babel/helper-remap-async-to-generator": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.27.1.tgz", - "integrity": "sha512-7fiA521aVw8lSPeI4ZOD3vRFkoqkJcS+z4hFo82bFSH/2tNd6eJ5qCVMS5OzDmZh/kaHQeBaeyxK6wljcPtveA==", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.1", @@ -406,14 +370,14 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.27.1.tgz", - "integrity": "sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.28.6.tgz", + "integrity": "sha512-mq8e+laIk94/yFec3DxSjCRD2Z0TAjhVbEJY3UQrlwVo15Lmt7C2wAUbK4bjnTs4APkwsYLTahXRraQXhb1WCg==", "license": "MIT", "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.27.1", + "@babel/helper-member-expression-to-functions": "^7.28.5", "@babel/helper-optimise-call-expression": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -424,8 +388,6 @@ }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz", - "integrity": "sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==", "license": "MIT", "dependencies": { "@babel/traverse": "^7.27.1", @@ -437,8 +399,6 @@ }, "node_modules/@babel/helper-string-parser": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -446,8 +406,6 @@ }, "node_modules/@babel/helper-validator-identifier": { "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", - "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -455,8 +413,6 @@ }, "node_modules/@babel/helper-validator-option": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", - "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -464,8 +420,6 @@ }, "node_modules/@babel/helper-wrap-function": { "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.28.3.tgz", - "integrity": "sha512-zdf983tNfLZFletc0RRXYrHrucBEg95NIFMkn6K9dbeMYnsgHaSBGcQqdsCSStG2PYwRre0Qc2NNSCXbG+xc6g==", "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", @@ -477,13 +431,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", - "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", "license": "MIT", "dependencies": { - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.4" + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" }, "engines": { "node": ">=6.9.0" @@ -491,8 +445,6 @@ }, "node_modules/@babel/highlight": { "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.9.tgz", - "integrity": "sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==", "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", @@ -506,8 +458,6 @@ }, "node_modules/@babel/highlight/node_modules/ansi-styles": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "license": "MIT", "dependencies": { "color-convert": "^1.9.0" @@ -518,8 +468,6 @@ }, "node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", @@ -532,8 +480,6 @@ }, "node_modules/@babel/highlight/node_modules/color-convert": { "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "license": "MIT", "dependencies": { "color-name": "1.1.3" @@ -541,14 +487,10 @@ }, "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "license": "MIT" }, "node_modules/@babel/highlight/node_modules/escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "license": "MIT", "engines": { "node": ">=0.8.0" @@ -556,8 +498,6 @@ }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "license": "MIT", "engines": { "node": ">=4" @@ -565,8 +505,6 @@ }, "node_modules/@babel/highlight/node_modules/supports-color": { "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "license": "MIT", "dependencies": { "has-flag": "^3.0.0" @@ -576,12 +514,12 @@ } }, "node_modules/@babel/parser": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", - "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", "license": "MIT", "dependencies": { - "@babel/types": "^7.28.5" + "@babel/types": "^7.29.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -625,8 +563,6 @@ }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.27.1.tgz", - "integrity": "sha512-g4L7OYun04N1WyqMNjldFwlfPCLVkgB54A/YCXICZYBsvJJE3kByKv9c9+R/nAfmIfjl2rKYLNyMHboYbZaWaA==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -640,8 +576,6 @@ }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.27.1.tgz", - "integrity": "sha512-oO02gcONcD5O1iTLi/6frMJBIwWEHceWGSGqrpCmEL8nogiS6J9PBlE48CaK20/Jx1LuRml9aDftLgdjXT8+Cw==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", @@ -656,14 +590,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.28.3.tgz", - "integrity": "sha512-b6YTX108evsvE4YgWyQ921ZAFFQm3Bn+CA3+ZXlNVnPhx+UfsVURoPjfGAPCjBgrqo30yX/C2nZGX96DxvR9Iw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.28.6.tgz", + "integrity": "sha512-a0aBScVTlNaiUe35UtfxAN7A/tehvvG4/ByO6+46VPKTRSlfnAFsgKy0FUh+qAkQrDTmhDkT+IBOKlOoMUxQ0g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/traverse": "^7.28.3" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -674,9 +608,6 @@ }, "node_modules/@babel/plugin-proposal-async-generator-functions": { "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz", - "integrity": "sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.", "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.18.9", @@ -693,9 +624,6 @@ }, "node_modules/@babel/plugin-proposal-class-properties": { "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.0.tgz", - "integrity": "sha512-mCF3HcuZSY9Fcx56Lbn+CGdT44ioBMMvjNVldpKtj8tpniETdLjnxdHI1+sDWXIM1nNt+EanJOZ3IG9lzVjs7A==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.", "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.16.0", @@ -710,9 +638,6 @@ }, "node_modules/@babel/plugin-proposal-class-static-block": { "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz", - "integrity": "sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-static-block instead.", "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.21.0", @@ -728,9 +653,6 @@ }, "node_modules/@babel/plugin-proposal-dynamic-import": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead.", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.18.6", @@ -745,9 +667,6 @@ }, "node_modules/@babel/plugin-proposal-export-namespace-from": { "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", - "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead.", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.18.9", @@ -762,9 +681,6 @@ }, "node_modules/@babel/plugin-proposal-json-strings": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.18.6", @@ -779,9 +695,6 @@ }, "node_modules/@babel/plugin-proposal-logical-assignment-operators": { "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz", - "integrity": "sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead.", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.20.2", @@ -796,9 +709,6 @@ }, "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.18.6", @@ -813,9 +723,6 @@ }, "node_modules/@babel/plugin-proposal-numeric-separator": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.18.6", @@ -830,9 +737,6 @@ }, "node_modules/@babel/plugin-proposal-object-rest-spread": { "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", - "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.", "license": "MIT", "dependencies": { "@babel/compat-data": "^7.20.5", @@ -850,9 +754,6 @@ }, "node_modules/@babel/plugin-proposal-optional-catch-binding": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.18.6", @@ -867,9 +768,6 @@ }, "node_modules/@babel/plugin-proposal-optional-chaining": { "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz", - "integrity": "sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.20.2", @@ -885,9 +783,6 @@ }, "node_modules/@babel/plugin-proposal-private-methods": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.", "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.18.6", @@ -902,9 +797,6 @@ }, "node_modules/@babel/plugin-proposal-private-property-in-object": { "version": "7.21.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz", - "integrity": "sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", @@ -921,9 +813,6 @@ }, "node_modules/@babel/plugin-proposal-unicode-property-regex": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.", "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.18.6", @@ -938,8 +827,6 @@ }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -950,8 +837,6 @@ }, "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" @@ -962,8 +847,6 @@ }, "node_modules/@babel/plugin-syntax-class-static-block": { "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" @@ -977,8 +860,6 @@ }, "node_modules/@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -989,8 +870,6 @@ }, "node_modules/@babel/plugin-syntax-export-namespace-from": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.3" @@ -1000,13 +879,13 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.27.1.tgz", - "integrity": "sha512-UT/Jrhw57xg4ILHLFnzFpPDlMbcdEicaAtjPQpbj9wa8T4r5KVWCimHcL/460g8Ht0DMxDyjsLgiWSkVjnwPFg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.28.6.tgz", + "integrity": "sha512-pSJUpFHdx9z5nqTSirOCMtYVP2wFgoWhP0p3g8ONK/4IHhLIBd0B9NYqAvIUAhq+OkhO4VM1tENCt0cjlsNShw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1016,13 +895,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", - "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz", + "integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1033,8 +912,6 @@ }, "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -1045,8 +922,6 @@ }, "node_modules/@babel/plugin-syntax-jsx": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", - "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", "dev": true, "license": "MIT", "dependencies": { @@ -1061,8 +936,6 @@ }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" @@ -1073,8 +946,6 @@ }, "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -1085,8 +956,6 @@ }, "node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" @@ -1097,8 +966,6 @@ }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -1109,8 +976,6 @@ }, "node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -1121,8 +986,6 @@ }, "node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -1133,8 +996,6 @@ }, "node_modules/@babel/plugin-syntax-private-property-in-object": { "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" @@ -1148,8 +1009,6 @@ }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" @@ -1163,8 +1022,6 @@ }, "node_modules/@babel/plugin-syntax-typescript": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", - "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1196,8 +1053,6 @@ }, "node_modules/@babel/plugin-transform-arrow-functions": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.27.1.tgz", - "integrity": "sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -1210,15 +1065,15 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.28.0.tgz", - "integrity": "sha512-BEOdvX4+M765icNPZeidyADIvQ1m1gmunXufXxvRESy/jNNyfovIqUyE7MVgGBjWktCoJlzvFA1To2O4ymIO3Q==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.29.0.tgz", + "integrity": "sha512-va0VdWro4zlBr2JsXC+ofCPB2iG12wPtVGTWFx2WLDOM3nYQZZIGP82qku2eW/JR83sD+k2k+CsNtyEbUqhU6w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-remap-async-to-generator": "^7.27.1", - "@babel/traverse": "^7.28.0" + "@babel/traverse": "^7.29.0" }, "engines": { "node": ">=6.9.0" @@ -1228,13 +1083,13 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.27.1.tgz", - "integrity": "sha512-NREkZsZVJS4xmTr8qzE5y8AfIPqsdQfRuUiLRTEzb7Qii8iFWCyDKaUV2c0rCuh4ljDZ98ALHP/PetiBV2nddA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.28.6.tgz", + "integrity": "sha512-ilTRcmbuXjsMmcZ3HASTe4caH5Tpo93PkTxF9oG2VZsSWsahydmcEHhix9Ik122RcTnZnUzPbmux4wh1swfv7g==", "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-remap-async-to-generator": "^7.27.1" }, "engines": { @@ -1246,8 +1101,6 @@ }, "node_modules/@babel/plugin-transform-block-scoped-functions": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.27.1.tgz", - "integrity": "sha512-cnqkuOtZLapWYZUYM5rVIdv1nXYuFVIltZ6ZJ7nIj585QsjKM5dhL2Fu/lICXZ1OyIAFc7Qy+bvDAtTXqGrlhg==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -1260,12 +1113,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.5.tgz", - "integrity": "sha512-45DmULpySVvmq9Pj3X9B+62Xe+DJGov27QravQJU1LLcapR6/10i+gYVAucGGJpHBp5mYxIMK4nDAT/QDLr47g==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.6.tgz", + "integrity": "sha512-tt/7wOtBmwHPNMPu7ax4pdPz6shjFrmHDghvNC+FG9Qvj7D6mJcoRQIF5dy4njmxR941l6rgtvfSB2zX3VlUIw==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1275,14 +1128,14 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.27.1.tgz", - "integrity": "sha512-D0VcalChDMtuRvJIu3U/fwWjf8ZMykz5iZsg77Nuj821vCKI3zCyRLwRdWbsuJ/uRwZhZ002QtCqIkwC/ZkvbA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.28.6.tgz", + "integrity": "sha512-dY2wS3I2G7D697VHndN91TJr8/AAfXQNt5ynCTI/MpxMsSzHp+52uNivYT5wCPax3whc47DR8Ba7cmlQMg24bw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1292,14 +1145,14 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.28.3.tgz", - "integrity": "sha512-LtPXlBbRoc4Njl/oh1CeD/3jC+atytbnf/UqLoqTDcEYGUPj022+rvfkbDYieUrSj3CaV4yHDByPE+T2HwfsJg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.28.6.tgz", + "integrity": "sha512-rfQ++ghVwTWTqQ7w8qyDxL1XGihjBss4CmTgGRCTAC9RIbhVpyp4fOeZtta0Lbf+dTNIVJer6ych2ibHwkZqsQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.28.3", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1309,17 +1162,17 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.4.tgz", - "integrity": "sha512-cFOlhIYPBv/iBoc+KS3M6et2XPtbT2HiCRfBXWtfpc9OAyostldxIf9YAYB6ypURBBbx+Qv6nyrLzASfJe+hBA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.6.tgz", + "integrity": "sha512-EF5KONAqC5zAqT783iMGuM2ZtmEBy+mJMOKl2BCvPZ2lVrwvXnB6o+OBWCS+CoeCCpVRF2sA2RBKUxvT8tQT5Q==", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", - "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-compilation-targets": "^7.28.6", "@babel/helper-globals": "^7.28.0", - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/helper-replace-supers": "^7.27.1", - "@babel/traverse": "^7.28.4" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-replace-supers": "^7.28.6", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1329,13 +1182,13 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.27.1.tgz", - "integrity": "sha512-lj9PGWvMTVksbWiDT2tW68zGS/cyo4AkZ/QTp0sQT0mjPopCmrSkzxeXkznjqBxzDI6TclZhOJbBmbBLjuOZUw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.28.6.tgz", + "integrity": "sha512-bcc3k0ijhHbc2lEfpFHgx7eYw9KNXqOerKWfzbxEHUGKnS3sz9C4CNL9OiFN1297bDNfUiSO7DaLzbvHQQQ1BQ==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/template": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/template": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1346,8 +1199,6 @@ }, "node_modules/@babel/plugin-transform-destructuring": { "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.5.tgz", - "integrity": "sha512-Kl9Bc6D0zTUcFUvkNuQh4eGXPKKNDOJQXVyyM4ZAQPMveniJdxi8XMJwLo+xSoW3MIq81bD33lcUe9kZpl0MCw==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", @@ -1361,13 +1212,13 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.27.1.tgz", - "integrity": "sha512-gEbkDVGRvjj7+T1ivxrfgygpT7GUd4vmODtYpbs0gZATdkX8/iSnOtZSxiZnsgm1YjTgjI6VKBGSJJevkrclzw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.28.6.tgz", + "integrity": "sha512-SljjowuNKB7q5Oayv4FoPzeB74g3QgLt8IVJw9ADvWy3QnUb/01aw8I4AVv8wYnPvQz2GDDZ/g3GhcNyDBI4Bg==", "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1378,8 +1229,6 @@ }, "node_modules/@babel/plugin-transform-duplicate-keys": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.27.1.tgz", - "integrity": "sha512-MTyJk98sHvSs+cvZ4nOauwTTG1JeonDjSGvGGUNHreGQns+Mpt6WX/dVzWBHgg+dYZhkC4X+zTDfkTU+Vy9y7Q==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -1392,14 +1241,14 @@ } }, "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.27.1.tgz", - "integrity": "sha512-hkGcueTEzuhB30B3eJCbCYeCaaEQOmQR0AdvzpD4LoN0GXMWzzGSuRrxR2xTnCrvNbVwK9N6/jQ92GSLfiZWoQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.29.0.tgz", + "integrity": "sha512-zBPcW2lFGxdiD8PUnPwJjag2J9otbcLQzvbiOzDxpYXyCuYX9agOwMPGn1prVH0a4qzhCKu24rlH4c1f7yA8rw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1425,14 +1274,14 @@ } }, "node_modules/@babel/plugin-transform-explicit-resource-management": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.28.0.tgz", - "integrity": "sha512-K8nhUcn3f6iB+P3gwCv/no7OdzOZQcKchW6N389V6PD8NUWKZHzndOd9sPDVbMoBsbmjMqlB4L9fm+fEFNVlwQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.28.6.tgz", + "integrity": "sha512-Iao5Konzx2b6g7EPqTy40UZbcdXE126tTxVFr/nAIj+WItNxjKSYTEw3RC+A2/ZetmdJsgueL1KhaMCQHkLPIg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/plugin-transform-destructuring": "^7.28.0" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/plugin-transform-destructuring": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1442,12 +1291,12 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.28.5.tgz", - "integrity": "sha512-D4WIMaFtwa2NizOp+dnoFjRez/ClKiC2BqqImwKd1X28nqBtZEyCYJ2ozQrrzlxAFrcrjxo39S6khe9RNDlGzw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.28.6.tgz", + "integrity": "sha512-WitabqiGjV/vJ0aPOLSFfNY1u9U3R7W36B03r5I2KoNix+a3sOhJ3pKFB3R5It9/UiK78NiO0KE9P21cMhlPkw==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1474,8 +1323,6 @@ }, "node_modules/@babel/plugin-transform-for-of": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.27.1.tgz", - "integrity": "sha512-BfbWFFEJFQzLCQ5N8VocnCtA8J1CLkNTe2Ms2wocj75dd6VpiqS5Z5quTYcUoo4Yq+DN0rtikODccuv7RU81sw==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", @@ -1490,8 +1337,6 @@ }, "node_modules/@babel/plugin-transform-function-name": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.27.1.tgz", - "integrity": "sha512-1bQeydJF9Nr1eBCMMbC+hdwmRlsv5XYOMu03YSWFwNs0HsAmtSxxF1fyuYPqemVldVyFmlCU7w8UE14LupUSZQ==", "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.27.1", @@ -1506,13 +1351,13 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.27.1.tgz", - "integrity": "sha512-6WVLVJiTjqcQauBhn1LkICsR2H+zm62I3h9faTDKt1qP4jn2o72tSvqMwtGFKGTpojce0gJs+76eZ2uCHRZh0Q==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.28.6.tgz", + "integrity": "sha512-Nr+hEN+0geQkzhbdgQVPoqr47lZbm+5fCUmO70722xJZd0Mvb59+33QLImGj6F+DkK3xgDi1YVysP8whD6FQAw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1523,8 +1368,6 @@ }, "node_modules/@babel/plugin-transform-literals": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.27.1.tgz", - "integrity": "sha512-0HCFSepIpLTkLcsi86GG3mTUzxV5jpmbv97hTETW3yzrAij8aqlD36toB1D0daVFJM8NK6GvKO0gslVQmm+zZA==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -1537,13 +1380,13 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.5.tgz", - "integrity": "sha512-axUuqnUTBuXyHGcJEVVh9pORaN6wC5bYfE7FGzPiaWa3syib9m7g+/IT/4VgCOe2Upef43PHzeAvcrVek6QuuA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.6.tgz", + "integrity": "sha512-+anKKair6gpi8VsM/95kmomGNMD0eLz1NQ8+Pfw5sAwWH9fGYXT50E55ZpV0pHUHWf6IUTWPM+f/7AAff+wr9A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1554,8 +1397,6 @@ }, "node_modules/@babel/plugin-transform-member-expression-literals": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.27.1.tgz", - "integrity": "sha512-hqoBX4dcZ1I33jCSWcXrP+1Ku7kdqXf1oeah7ooKOIiAdKQ+uqftgCFNOSzA5AMS2XIHEYeGFg4cKRCdpxzVOQ==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -1569,8 +1410,6 @@ }, "node_modules/@babel/plugin-transform-modules-amd": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.27.1.tgz", - "integrity": "sha512-iCsytMg/N9/oFq6n+gFTvUYDZQOMK5kEdeYxmxt91fcJGycfxVP9CnrxoliM0oumFERba2i8ZtwRUCMhvP1LnA==", "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.27.1", @@ -1584,13 +1423,13 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.27.1.tgz", - "integrity": "sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.28.6.tgz", + "integrity": "sha512-jppVbf8IV9iWWwWTQIxJMAJCWBuuKx71475wHwYytrRGQ2CWiDvYlADQno3tcYpS/T2UUWFQp3nVtYfK/YBQrA==", "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1600,15 +1439,15 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.28.5.tgz", - "integrity": "sha512-vn5Jma98LCOeBy/KpeQhXcV2WZgaRUtjwQmjoBuLNlOmkg0fB5pdvYVeWRYI69wWKwK2cD1QbMiUQnoujWvrew==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.0.tgz", + "integrity": "sha512-PrujnVFbOdUpw4UHiVwKvKRLMMic8+eC0CuNlxjsyZUiBjhFdPsewdXCkveh2KqBA9/waD0W1b4hXSOBQJezpQ==", "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.28.3", - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-validator-identifier": "^7.28.5", - "@babel/traverse": "^7.28.5" + "@babel/traverse": "^7.29.0" }, "engines": { "node": ">=6.9.0" @@ -1619,8 +1458,6 @@ }, "node_modules/@babel/plugin-transform-modules-umd": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.27.1.tgz", - "integrity": "sha512-iQBE/xC5BV1OxJbp6WG7jq9IWiD+xxlZhLrdwpPkTX3ydmXdvoCpyfJN7acaIBZaOqTfr76pgzqBJflNbeRK+w==", "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.27.1", @@ -1634,13 +1471,13 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.27.1.tgz", - "integrity": "sha512-SstR5JYy8ddZvD6MhV0tM/j16Qds4mIpJTOd1Yu9J9pJjH93bxHECF7pgtc28XvkzTD6Pxcm/0Z73Hvk7kb3Ng==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.29.0.tgz", + "integrity": "sha512-1CZQA5KNAD6ZYQLPw7oi5ewtDNxH/2vuCh+6SmvgDfhumForvs8a1o9n0UrEoBD8HU4djO2yWngTQlXl1NDVEQ==", "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1651,8 +1488,6 @@ }, "node_modules/@babel/plugin-transform-new-target": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.27.1.tgz", - "integrity": "sha512-f6PiYeqXQ05lYq3TIfIDu/MtliKUbNwkGApPUvyo6+tc7uaR4cPjPe7DFPr15Uyycg2lZU6btZ575CuQoYh7MQ==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -1665,13 +1500,13 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.27.1.tgz", - "integrity": "sha512-aGZh6xMo6q9vq1JGcw58lZ1Z0+i0xB2x0XaauNIUXd6O1xXc3RwoWEBlsTQrY4KQ9Jf0s5rgD6SiNkaUdJegTA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.28.6.tgz", + "integrity": "sha512-3wKbRgmzYbw24mDJXT7N+ADXw8BC/imU9yo9c9X9NKaLF1fW+e5H1U5QjMUBe4Qo4Ox/o++IyUkl1sVCLgevKg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1681,13 +1516,13 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.27.1.tgz", - "integrity": "sha512-fdPKAcujuvEChxDBJ5c+0BTaS6revLV7CJL08e4m3de8qJfNIuCc2nc7XJYOjBoTMJeqSmwXJ0ypE14RCjLwaw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.28.6.tgz", + "integrity": "sha512-SJR8hPynj8outz+SlStQSwvziMN4+Bq99it4tMIf5/Caq+3iOc0JtKyse8puvyXkk3eFRIA5ID/XfunGgO5i6w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1697,17 +1532,17 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.4.tgz", - "integrity": "sha512-373KA2HQzKhQCYiRVIRr+3MjpCObqzDlyrM6u4I201wL8Mp2wHf7uB8GhDwis03k2ti8Zr65Zyyqs1xOxUF/Ew==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.6.tgz", + "integrity": "sha512-5rh+JR4JBC4pGkXLAcYdLHZjXudVxWMXbB6u6+E9lRL5TrGVbHt1TjxGbZ8CkmYw9zjkB7jutzOROArsqtncEA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/plugin-transform-destructuring": "^7.28.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/plugin-transform-destructuring": "^7.28.5", "@babel/plugin-transform-parameters": "^7.27.7", - "@babel/traverse": "^7.28.4" + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1718,8 +1553,6 @@ }, "node_modules/@babel/plugin-transform-object-super": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.27.1.tgz", - "integrity": "sha512-SFy8S9plRPbIcxlJ8A6mT/CxFdJx/c04JEctz4jf8YZaVS2px34j7NXRrlGlHkN/M2gnpL37ZpGRGVFLd3l8Ng==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", @@ -1733,13 +1566,13 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.27.1.tgz", - "integrity": "sha512-txEAEKzYrHEX4xSZN4kJ+OfKXFVSWKB2ZxM9dpcE3wT7smwkNmXo5ORRlVzMVdJbD+Q8ILTgSD7959uj+3Dm3Q==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.28.6.tgz", + "integrity": "sha512-R8ja/Pyrv0OGAvAXQhSTmWyPJPml+0TMqXlO5w+AsMEiwb2fg3WkOvob7UxFSL3OIttFSGSRFKQsOhJ/X6HQdQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1749,12 +1582,12 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.5.tgz", - "integrity": "sha512-N6fut9IZlPnjPwgiQkXNhb+cT8wQKFlJNqcZkWlcTqkcqx6/kU4ynGmLFoa4LViBSirn05YAwk+sQBbPfxtYzQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.6.tgz", + "integrity": "sha512-A4zobikRGJTsX9uqVFdafzGkqD30t26ck2LmOzAuLL8b2x6k3TIqRiT2xVvA9fNmFeTX484VpsdgmKNA0bS23w==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "engines": { @@ -1766,8 +1599,6 @@ }, "node_modules/@babel/plugin-transform-parameters": { "version": "7.27.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.7.tgz", - "integrity": "sha512-qBkYTYCb76RRxUM6CcZA5KRu8K4SM8ajzVeUgVdMVO9NN9uI/GaVmBg/WKJJGnNokV9SY8FxNOVWGXzqzUidBg==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -1780,14 +1611,14 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.27.1.tgz", - "integrity": "sha512-10FVt+X55AjRAYI9BrdISN9/AQWHqldOeZDUoLyif1Kn05a56xVBXb8ZouL8pZ9jem8QpXaOt8TS7RHUIS+GPA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.28.6.tgz", + "integrity": "sha512-piiuapX9CRv7+0st8lmuUlRSmX6mBcVeNQ1b4AYzJxfCMuBfB0vBXDiGSmm03pKJw1v6cZ8KSeM+oUnM6yAExg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1797,15 +1628,15 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.27.1.tgz", - "integrity": "sha512-5J+IhqTi1XPa0DXF83jYOaARrX+41gOewWbkPyjMNRDqgOCqdffGh8L3f/Ek5utaEBZExjSAzcyjmV9SSAWObQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.28.6.tgz", + "integrity": "sha512-b97jvNSOb5+ehyQmBpmhOCiUC5oVK4PMnpRvO7+ymFBoqYjeDHIU9jnrNUuwHOiL9RpGDoKBpSViarV+BU+eVA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.27.1", - "@babel/helper-create-class-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1816,8 +1647,6 @@ }, "node_modules/@babel/plugin-transform-property-literals": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.27.1.tgz", - "integrity": "sha512-oThy3BCuCha8kDZ8ZkgOg2exvPYUlprMukKQXI1r1pJ47NCvxfkEy8vK+r/hT9nF0Aa4H1WUPZZjHTFtAhGfmQ==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -1831,8 +1660,6 @@ }, "node_modules/@babel/plugin-transform-react-display-name": { "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.28.0.tgz", - "integrity": "sha512-D6Eujc2zMxKjfa4Zxl4GHMsmhKKZ9VpcqIchJLvwTxad9zWIYulwYItBovpDOoNLISpcZSXoDJ5gaGbQUDqViA==", "dev": true, "license": "MIT", "dependencies": { @@ -1847,8 +1674,6 @@ }, "node_modules/@babel/plugin-transform-react-jsx": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.27.1.tgz", - "integrity": "sha512-2KH4LWGSrJIkVf5tSiBFYuXDAoWRq2MMwgivCf+93dd0GQi8RXLjKA/0EvRnVV5G0hrHczsquXuD01L8s6dmBw==", "dev": true, "license": "MIT", "dependencies": { @@ -1867,8 +1692,6 @@ }, "node_modules/@babel/plugin-transform-react-jsx-development": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.27.1.tgz", - "integrity": "sha512-ykDdF5yI4f1WrAolLqeF3hmYU12j9ntLQl/AOG1HAS21jxyg1Q0/J/tpREuYLfatGdGmXp/3yS0ZA76kOlVq9Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1883,8 +1706,6 @@ }, "node_modules/@babel/plugin-transform-react-pure-annotations": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.27.1.tgz", - "integrity": "sha512-JfuinvDOsD9FVMTHpzA/pBLisxpv1aSf+OIV8lgH3MuWrks19R27e6a6DipIg4aX1Zm9Wpb04p8wljfKrVSnPA==", "dev": true, "license": "MIT", "dependencies": { @@ -1899,12 +1720,12 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.28.4.tgz", - "integrity": "sha512-+ZEdQlBoRg9m2NnzvEeLgtvBMO4tkFBw5SQIUgLICgTrumLoU7lr+Oghi6km2PFj+dbUt2u1oby2w3BDO9YQnA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.29.0.tgz", + "integrity": "sha512-FijqlqMA7DmRdg/aINBSs04y8XNTYw/lr1gJ2WsmBnnaNw1iS43EPkJW+zK7z65auG3AWRFXWj+NcTQwYptUog==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1914,14 +1735,14 @@ } }, "node_modules/@babel/plugin-transform-regexp-modifiers": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.27.1.tgz", - "integrity": "sha512-TtEciroaiODtXvLZv4rmfMhkCv8jx3wgKpL68PuiPh2M4fvz5jhsA7697N1gMvkvr/JTF13DrFYyEbY9U7cVPA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.28.6.tgz", + "integrity": "sha512-QGWAepm9qxpaIs7UM9FvUSnCGlb8Ua1RhyM4/veAxLwt3gMat/LSGrZixyuj4I6+Kn9iwvqCyPTtbdxanYoWYg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1932,8 +1753,6 @@ }, "node_modules/@babel/plugin-transform-reserved-words": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.27.1.tgz", - "integrity": "sha512-V2ABPHIJX4kC7HegLkYoDpfg9PVmuWy/i6vUM5eGK22bx4YVFD3M5F0QQnWQoDs6AGsUWTVOopBiMFQgHaSkVw==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -1947,8 +1766,6 @@ }, "node_modules/@babel/plugin-transform-shorthand-properties": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.27.1.tgz", - "integrity": "sha512-N/wH1vcn4oYawbJ13Y/FxcQrWk63jhfNa7jef0ih7PHSIHX2LB7GWE1rkPrOnka9kwMxb6hMl19p7lidA+EHmQ==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -1961,12 +1778,12 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.27.1.tgz", - "integrity": "sha512-kpb3HUqaILBJcRFVhFUs6Trdd4mkrzcGXss+6/mxUd273PfbWqSDHRzMT2234gIg2QYfAjvXLSquP1xECSg09Q==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.28.6.tgz", + "integrity": "sha512-9U4QObUC0FtJl05AsUcodau/RWDytrU6uKgkxu09mLR9HLDAtUMoPuuskm5huQsoktmsYpI+bGmq+iapDcriKA==", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "engines": { @@ -1978,8 +1795,6 @@ }, "node_modules/@babel/plugin-transform-sticky-regex": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.27.1.tgz", - "integrity": "sha512-lhInBO5bi/Kowe2/aLdBAawijx+q1pQzicSgnkB6dUPc1+RC8QmJHKf2OjvU+NZWitguJHEaEmbV6VWEouT58g==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -1993,8 +1808,6 @@ }, "node_modules/@babel/plugin-transform-template-literals": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.27.1.tgz", - "integrity": "sha512-fBJKiV7F2DxZUkg5EtHKXQdbsbURW3DZKQUWphDum0uRP6eHGGa/He9mc0mypL680pb+e/lDIthRohlv8NCHkg==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -2008,8 +1821,6 @@ }, "node_modules/@babel/plugin-transform-typeof-symbol": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.27.1.tgz", - "integrity": "sha512-RiSILC+nRJM7FY5srIyc4/fGIwUhyDuuBSdWn4y6yT6gm652DpCHZjIipgn6B7MQ1ITOUnAKWixEUjQRIBIcLw==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -2023,8 +1834,6 @@ }, "node_modules/@babel/plugin-transform-typescript": { "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.5.tgz", - "integrity": "sha512-x2Qa+v/CuEoX7Dr31iAfr0IhInrVOWZU/2vJMJ00FOR/2nM0BcBEclpaf9sWCDc+v5e9dMrhSH8/atq/kX7+bA==", "dev": true, "license": "MIT", "dependencies": { @@ -2043,8 +1852,6 @@ }, "node_modules/@babel/plugin-transform-unicode-escapes": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.27.1.tgz", - "integrity": "sha512-Ysg4v6AmF26k9vpfFuTZg8HRfVWzsh1kVfowA23y9j/Gu6dOuahdUVhkLqpObp3JIv27MLSii6noRnuKN8H0Mg==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" @@ -2057,14 +1864,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.27.1.tgz", - "integrity": "sha512-uW20S39PnaTImxp39O5qFlHLS9LJEmANjMG7SxIhap8rCHqu0Ik+tLEPX5DKmHn6CsWQ7j3lix2tFOa5YtL12Q==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.28.6.tgz", + "integrity": "sha512-4Wlbdl/sIZjzi/8St0evF0gEZrgOswVO6aOzqxh1kDZOl9WmLrHq2HtGhnOJZmHZYKP8WZ1MDLCt5DAWwRo57A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -2075,8 +1882,6 @@ }, "node_modules/@babel/plugin-transform-unicode-regex": { "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.27.1.tgz", - "integrity": "sha512-xvINq24TRojDuyt6JGtHmkVkrfVV3FPT16uytxImLeBZqW3/H52yN+kM1MGuyPkIQxrzKwPHs5U/MP3qKyzkGw==", "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.27.1", @@ -2090,14 +1895,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.27.1.tgz", - "integrity": "sha512-EtkOujbc4cgvb0mlpQefi4NTPBzhSIevblFevACNLUspmrALgmEBdL/XfnyyITfd8fKBZrZys92zOWcik7j9Tw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.28.6.tgz", + "integrity": "sha512-/wHc/paTUmsDYN7SZkpWxogTOBNnlx7nBQYfy6JJlCT7G3mVhltk3e++N7zV0XfgGsrqBxd4rJQt9H16I21Y1Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -2108,8 +1913,6 @@ }, "node_modules/@babel/preset-env": { "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.4.tgz", - "integrity": "sha512-v0QtNd81v/xKj4gNKeuAerQ/azeNn/G1B1qMLeXOcV8+4TWlD2j3NV1u8q29SDFBXx/NBq5kyEAO+0mpRgacjA==", "license": "MIT", "dependencies": { "@babel/compat-data": "^7.16.4", @@ -2196,8 +1999,6 @@ }, "node_modules/@babel/preset-modules": { "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6.tgz", - "integrity": "sha512-ID2yj6K/4lKfhuU3+EX4UvNbIt7eACFbHmNUjzA+ep+B5971CknnA/9DEWKbRokfbbtblxxxXFJJrH47UEAMVg==", "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", @@ -2212,8 +2013,6 @@ }, "node_modules/@babel/preset-react": { "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.7.tgz", - "integrity": "sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA==", "dev": true, "license": "MIT", "dependencies": { @@ -2233,8 +2032,6 @@ }, "node_modules/@babel/preset-typescript": { "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.28.5.tgz", - "integrity": "sha512-+bQy5WOI2V6LJZpPVxY+yp66XdZ2yifu0Mc1aP5CQKgjn4QM5IN2i5fAZ4xKop47pr8rpVhiAeu+nDQa12C8+g==", "dev": true, "license": "MIT", "dependencies": { @@ -2252,9 +2049,9 @@ } }, "node_modules/@babel/register": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.28.3.tgz", - "integrity": "sha512-CieDOtd8u208eI49bYl4z1J22ySFw87IGwE+IswFEExH7e3rLgKb0WNQeumnacQ1+VoDJLYI5QFA3AJZuyZQfA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.28.6.tgz", + "integrity": "sha512-pgcbbEl/dWQYb6L6Yew6F94rdwygfuv+vJ/tXfwIOYAfPB6TNWpXUMEtEq3YuTeHRdvMIhvz13bkT9CNaS+wqA==", "dev": true, "license": "MIT", "dependencies": { @@ -2273,8 +2070,6 @@ }, "node_modules/@babel/runtime": { "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", "dev": true, "license": "MIT", "engines": { @@ -2283,8 +2078,6 @@ }, "node_modules/@babel/runtime-corejs3": { "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.8.tgz", - "integrity": "sha512-3fKhuICS1lMz0plI5ktOE/yEtBRMVxplzRkdn6mJQ197XiY0JnrzYV0+Mxozq3JZ8SBV9Ecurmw1XsGbwOf+Sg==", "dev": true, "license": "MIT", "dependencies": { @@ -2296,31 +2089,31 @@ } }, "node_modules/@babel/template": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", - "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.2", - "@babel/types": "^7.27.1" + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", - "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.5", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", "debug": "^4.3.1" }, "engines": { @@ -2328,9 +2121,9 @@ } }, "node_modules/@babel/types": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", - "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", @@ -2342,8 +2135,7 @@ }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" @@ -2354,8 +2146,7 @@ }, "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -2364,8 +2155,6 @@ }, "node_modules/@es-joy/jsdoccomment": { "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.12.0.tgz", - "integrity": "sha512-Gw4/j9v36IKY8ET+W0GoOzrRw17xjf21EIFFRL3zx21fF5MnqmeNpNi+PU/LKjqLpPb2Pw2XdlJbYM31VVo/PQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2379,8 +2168,6 @@ }, "node_modules/@es-joy/jsdoccomment/node_modules/comment-parser": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.2.4.tgz", - "integrity": "sha512-pm0b+qv+CkWNriSTMsfnjChF9kH0kxz55y44Wo5le9qLxMj5xDQAaEd9ZN1ovSuk9CsrncWaFwgpOMg7ClJwkw==", "dev": true, "license": "MIT", "engines": { @@ -2389,8 +2176,6 @@ }, "node_modules/@es-joy/jsdoccomment/node_modules/jsdoc-type-pratt-parser": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-2.0.0.tgz", - "integrity": "sha512-sUuj2j48wxrEpbFjDp1sAesAxPiLT+z0SWVmMafyIINs6Lj5gIPKh3VrkBZu4E/Dv+wHpOot0m6H8zlHQjwqeQ==", "dev": true, "license": "MIT", "engines": { @@ -2399,8 +2184,6 @@ }, "node_modules/@eslint-community/eslint-utils": { "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", - "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, "license": "MIT", "peer": true, @@ -2419,8 +2202,6 @@ }, "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -2433,8 +2214,6 @@ }, "node_modules/@eslint-community/regexpp": { "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, "license": "MIT", "peer": true, @@ -2444,8 +2223,6 @@ }, "node_modules/@eslint/eslintrc": { "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", "license": "MIT", "dependencies": { "ajv": "^6.12.4", @@ -2464,8 +2241,6 @@ }, "node_modules/@eslint/eslintrc/node_modules/ajv": { "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -2480,8 +2255,6 @@ }, "node_modules/@eslint/eslintrc/node_modules/argparse": { "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" @@ -2489,8 +2262,6 @@ }, "node_modules/@eslint/eslintrc/node_modules/ignore": { "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "license": "MIT", "engines": { "node": ">= 4" @@ -2498,8 +2269,6 @@ }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "license": "MIT", "dependencies": { "argparse": "^1.0.7", @@ -2511,20 +2280,14 @@ }, "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "license": "MIT" }, "node_modules/@eslint/eslintrc/node_modules/sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "license": "BSD-3-Clause" }, "node_modules/@exabyte-io/eslint-config": { "version": "2025.5.13-0", - "resolved": "https://registry.npmjs.org/@exabyte-io/eslint-config/-/eslint-config-2025.5.13-0.tgz", - "integrity": "sha512-uZcq9jzmDHl+N71GYEM7l0z6mwyYfuZdNA/bIyql6Mp2H++Oot62nIoMhgvds1r7dbrtL/3jD3Xv0YDj12NiYw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2558,8 +2321,6 @@ }, "node_modules/@exabyte-io/periodic-table.js": { "version": "2022.6.8-0", - "resolved": "https://registry.npmjs.org/@exabyte-io/periodic-table.js/-/periodic-table.js-2022.6.8-0.tgz", - "integrity": "sha512-tN9V+Q6AUo/RVn9qrgx4dV+1VI5GbBjwJGbx4+K+zIw2W8Rnwp2l22lj123Xj9wdFLpygyPruETCM04XJkPNuw==", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { @@ -2577,8 +2338,6 @@ }, "node_modules/@exabyte-io/periodic-table.js/node_modules/@babel/register": { "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.16.0.tgz", - "integrity": "sha512-lzl4yfs0zVXnooeLE0AAfYaT7F3SPA8yB2Bj4W1BiZwLbMS3MZH35ZvCWSRHvneUugwuM+Wsnrj7h0F7UmU3NQ==", "license": "MIT", "dependencies": { "clone-deep": "^4.0.1", @@ -2596,15 +2355,10 @@ }, "node_modules/@exabyte-io/periodic-table.js/node_modules/underscore": { "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha512-5WsVTFcH1ut/kkhAaHf4PVgI8c7++GiVcpCGxPouI6ZVjsqPnSDf8h/8HtVqc0t4fzRXwnMK70EcZeAs3PIddg==", "license": "MIT" }, "node_modules/@humanwhocodes/config-array": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "deprecated": "Use @eslint/config-array instead", "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^1.2.0", @@ -2617,15 +2371,10 @@ }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "deprecated": "Use @eslint/object-schema instead", "license": "BSD-3-Clause" }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, "license": "ISC", "dependencies": { @@ -2641,8 +2390,6 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "license": "MIT", "dependencies": { @@ -2651,8 +2398,6 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "license": "MIT", "dependencies": { @@ -2665,8 +2410,6 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "license": "MIT", "dependencies": { @@ -2679,8 +2422,6 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "license": "MIT", "dependencies": { @@ -2692,8 +2433,6 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "license": "MIT", "dependencies": { @@ -2708,8 +2447,6 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "license": "MIT", "dependencies": { @@ -2721,8 +2458,6 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, "license": "MIT", "engines": { @@ -2731,15 +2466,11 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true, "license": "BSD-3-Clause" }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, "license": "MIT", "engines": { @@ -2748,8 +2479,6 @@ }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", @@ -2758,8 +2487,6 @@ }, "node_modules/@jridgewell/remapping": { "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2769,8 +2496,6 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "license": "MIT", "engines": { "node": ">=6.0.0" @@ -2778,14 +2503,10 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -2794,15 +2515,13 @@ }, "node_modules/@jsdevtools/ono": { "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", "dev": true, "license": "MIT" }, "node_modules/@mat3ra/ade": { "version": "0.0.0", - "resolved": "git+ssh://git@github.com/Exabyte-io/ade.git#6d494337d83e1b22fe272ff74cc1b6842a7c6561", - "integrity": "sha512-6c0/WS3y8i1Su1PDiIQKWkAktlFlJN8etFHGVUmYBWEwb7yFlg4fGccvOpLAhqga5Yk/SPcA7NEuMB+BwnpyXQ==", + "resolved": "git+ssh://git@github.com/Exabyte-io/ade.git#0099ff1695e122c7c95183413ddf42aed809c7e4", + "integrity": "sha512-FrIeaxKP6fHKtFsiuxguX2scf4EHIqdhiMpkQd1Bj+LElNek9U52k2DZprp8tUWCU3ABVHOD/pcC5sAzAe5KDw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2821,8 +2540,8 @@ }, "node_modules/@mat3ra/code": { "version": "0.0.0", - "resolved": "git+ssh://git@github.com/Exabyte-io/code.git#cb3fa59e2cc143d744f9019322208d928ff8de88", - "integrity": "sha512-lxmiLW3kCYWc2of2BWbrE+NNU4DcRNGtaJYJ7C9UA7y2JQXjuHYX1dqCDh5hN3A6esu8giEOXsBwf+b64M9EYQ==", + "resolved": "git+ssh://git@github.com/Exabyte-io/code.git#c3c9e5eb177fe70b8bc221832b6f9d93104d7e2d", + "integrity": "sha512-FLGHrGSba7qj1FnOnvDIaevDPGRJ2xVODFrDvsnF2Qqj/GRER+pb+e4DTBaBK7+CvtJapq2wJ6yU6BMtVabMtw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2848,8 +2567,6 @@ }, "node_modules/@mat3ra/code/node_modules/semver": { "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -2861,42 +2578,42 @@ }, "node_modules/@mat3ra/esse": { "version": "0.0.0", - "resolved": "git+ssh://git@github.com/Exabyte-io/esse.git#b324747a87f4b3363936974f512e75fe255b52a9", - "integrity": "sha512-2oi8jV/427kyC8USMPJavMbi9qHas+9OeC70jOrhb4yFdVkeZ8U4dgDYuzKzZYXHnItETnQdFhP/3JXKMfcLBA==", + "resolved": "git+ssh://git@github.com/Exabyte-io/esse.git#fa6f8dcd343e73d9193c945a01a546c1e4acdd9b", + "integrity": "sha512-hN/ChQqe1+jbW5Z5F1vbykSKoeBD7k4CYVMUbS0Z/H7Xza+MxCthRKs/vXYcS/1lJUKfVyocFsRhLZ7dqZassg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@babel/cli": "^7.27.0", - "@babel/core": "^7.26.10", - "@babel/eslint-parser": "^7.27.0", + "@babel/cli": "^7.28.6", + "@babel/core": "^7.29.0", + "@babel/eslint-parser": "^7.28.6", "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/preset-env": "^7.26.9", - "@babel/preset-react": "^7.26.3", - "@babel/preset-typescript": "^7.27.0", - "@babel/register": "^7.25.9", - "@babel/runtime-corejs3": "^7.27.0", - "@mat3ra/utils": "^2025.11.20-0", + "@babel/preset-env": "^7.29.0", + "@babel/preset-react": "^7.28.5", + "@babel/preset-typescript": "^7.28.5", + "@babel/register": "^7.28.6", + "@babel/runtime-corejs3": "^7.29.0", + "@mat3ra/utils": "2026.3.7-0", "@types/chai": "^4.3.20", "@types/js-yaml": "^4.0.9", "@types/json-schema-merge-allof": "^0.6.5", "@types/mocha": "^10.0.10", - "ajv": "^8.17.1", + "ajv": "^8.18.0", "ajv-formats": "^2.1.1", - "js-yaml": "^4.1.0", + "js-yaml": "^4.1.1", "json-schema": "^0.4.0", "json-schema-deref-sync": "0.14.0", "json-schema-merge-allof": "^0.8.1", "json-schema-to-typescript": "^15.0.4", - "lodash": "4.17.21" + "lodash": "4.17.23" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@mat3ra/esse/node_modules/@babel/cli": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.28.3.tgz", - "integrity": "sha512-n1RU5vuCX0CsaqaXm9I0KUCNKNQMy5epmzl/xdSSm70bSqhg9GWhgeosypyQLc0bK24+Xpk1WGzZlI9pJtkZdg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.28.6.tgz", + "integrity": "sha512-6EUNcuBbNkj08Oj4gAZ+BUU8yLCgKzgVX4gaTh09Ya2C8ICM4P+G30g4m3akRxSYAp3A/gnWchrNst7px4/nUQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2924,21 +2641,21 @@ } }, "node_modules/@mat3ra/esse/node_modules/@babel/core": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", - "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-module-transforms": "^7.28.3", - "@babel/helpers": "^7.28.4", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/traverse": "^7.28.5", - "@babel/types": "^7.28.5", + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -2955,9 +2672,9 @@ } }, "node_modules/@mat3ra/esse/node_modules/@babel/eslint-parser": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.28.5.tgz", - "integrity": "sha512-fcdRcWahONYo+JRnJg1/AekOacGvKx12Gu0qXJXFi2WBqQA1i7+O5PaxRB7kxE/Op94dExnCiiar6T09pvdHpA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.28.6.tgz", + "integrity": "sha512-QGmsKi2PBO/MHSQk+AAgA9R6OHQr+VqnniFE0eMWZcVcfBZoA2dKn2hUsl3Csg/Plt9opRUWdY7//VXsrIlEiA==", "dev": true, "license": "MIT", "dependencies": { @@ -2974,17 +2691,17 @@ } }, "node_modules/@mat3ra/esse/node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.5.tgz", - "integrity": "sha512-uJnGFcPsWQK8fvjgGP5LZUZZsYGIoPeRjSF5PGwrelYgq7Q15/Ft9NGFp1zglwgIv//W0uG4BevRuSJRyylZPg==", + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.8.tgz", + "integrity": "sha512-47UwBLPpQi1NoWzLuHNjRoHlYXMwIJoBf7MFou6viC/sIHWYygpvr0B6IAyh5sBdA2nr2LPIRww8lfaUVQINBA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-plugin-utils": "^7.27.1", - "debug": "^4.4.1", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "debug": "^4.4.3", "lodash.debounce": "^4.0.8", - "resolve": "^1.22.10" + "resolve": "^1.22.11" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -2992,9 +2709,6 @@ }, "node_modules/@mat3ra/esse/node_modules/@babel/plugin-proposal-class-properties": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.", "dev": true, "license": "MIT", "dependencies": { @@ -3022,81 +2736,81 @@ } }, "node_modules/@mat3ra/esse/node_modules/@babel/preset-env": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.28.5.tgz", - "integrity": "sha512-S36mOoi1Sb6Fz98fBfE+UZSpYw5mJm0NUHtIKrOuNcqeFauy1J6dIvXm2KRVKobOSaGq4t/hBXdN4HGU3wL9Wg==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.29.2.tgz", + "integrity": "sha512-DYD23veRYGvBFhcTY1iUvJnDNpuqNd/BzBwCvzOTKUnJjKg5kpUBh3/u9585Agdkgj+QuygG7jLfOPWMa2KVNw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.28.5", - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/compat-data": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-validator-option": "^7.27.1", "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.28.5", "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.27.1", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.27.1", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.27.1", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.28.3", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.28.6", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-import-assertions": "^7.27.1", - "@babel/plugin-syntax-import-attributes": "^7.27.1", + "@babel/plugin-syntax-import-assertions": "^7.28.6", + "@babel/plugin-syntax-import-attributes": "^7.28.6", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.27.1", - "@babel/plugin-transform-async-generator-functions": "^7.28.0", - "@babel/plugin-transform-async-to-generator": "^7.27.1", + "@babel/plugin-transform-async-generator-functions": "^7.29.0", + "@babel/plugin-transform-async-to-generator": "^7.28.6", "@babel/plugin-transform-block-scoped-functions": "^7.27.1", - "@babel/plugin-transform-block-scoping": "^7.28.5", - "@babel/plugin-transform-class-properties": "^7.27.1", - "@babel/plugin-transform-class-static-block": "^7.28.3", - "@babel/plugin-transform-classes": "^7.28.4", - "@babel/plugin-transform-computed-properties": "^7.27.1", + "@babel/plugin-transform-block-scoping": "^7.28.6", + "@babel/plugin-transform-class-properties": "^7.28.6", + "@babel/plugin-transform-class-static-block": "^7.28.6", + "@babel/plugin-transform-classes": "^7.28.6", + "@babel/plugin-transform-computed-properties": "^7.28.6", "@babel/plugin-transform-destructuring": "^7.28.5", - "@babel/plugin-transform-dotall-regex": "^7.27.1", + "@babel/plugin-transform-dotall-regex": "^7.28.6", "@babel/plugin-transform-duplicate-keys": "^7.27.1", - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.27.1", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.29.0", "@babel/plugin-transform-dynamic-import": "^7.27.1", - "@babel/plugin-transform-explicit-resource-management": "^7.28.0", - "@babel/plugin-transform-exponentiation-operator": "^7.28.5", + "@babel/plugin-transform-explicit-resource-management": "^7.28.6", + "@babel/plugin-transform-exponentiation-operator": "^7.28.6", "@babel/plugin-transform-export-namespace-from": "^7.27.1", "@babel/plugin-transform-for-of": "^7.27.1", "@babel/plugin-transform-function-name": "^7.27.1", - "@babel/plugin-transform-json-strings": "^7.27.1", + "@babel/plugin-transform-json-strings": "^7.28.6", "@babel/plugin-transform-literals": "^7.27.1", - "@babel/plugin-transform-logical-assignment-operators": "^7.28.5", + "@babel/plugin-transform-logical-assignment-operators": "^7.28.6", "@babel/plugin-transform-member-expression-literals": "^7.27.1", "@babel/plugin-transform-modules-amd": "^7.27.1", - "@babel/plugin-transform-modules-commonjs": "^7.27.1", - "@babel/plugin-transform-modules-systemjs": "^7.28.5", + "@babel/plugin-transform-modules-commonjs": "^7.28.6", + "@babel/plugin-transform-modules-systemjs": "^7.29.0", "@babel/plugin-transform-modules-umd": "^7.27.1", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.27.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.29.0", "@babel/plugin-transform-new-target": "^7.27.1", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.27.1", - "@babel/plugin-transform-numeric-separator": "^7.27.1", - "@babel/plugin-transform-object-rest-spread": "^7.28.4", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.28.6", + "@babel/plugin-transform-numeric-separator": "^7.28.6", + "@babel/plugin-transform-object-rest-spread": "^7.28.6", "@babel/plugin-transform-object-super": "^7.27.1", - "@babel/plugin-transform-optional-catch-binding": "^7.27.1", - "@babel/plugin-transform-optional-chaining": "^7.28.5", + "@babel/plugin-transform-optional-catch-binding": "^7.28.6", + "@babel/plugin-transform-optional-chaining": "^7.28.6", "@babel/plugin-transform-parameters": "^7.27.7", - "@babel/plugin-transform-private-methods": "^7.27.1", - "@babel/plugin-transform-private-property-in-object": "^7.27.1", + "@babel/plugin-transform-private-methods": "^7.28.6", + "@babel/plugin-transform-private-property-in-object": "^7.28.6", "@babel/plugin-transform-property-literals": "^7.27.1", - "@babel/plugin-transform-regenerator": "^7.28.4", - "@babel/plugin-transform-regexp-modifiers": "^7.27.1", + "@babel/plugin-transform-regenerator": "^7.29.0", + "@babel/plugin-transform-regexp-modifiers": "^7.28.6", "@babel/plugin-transform-reserved-words": "^7.27.1", "@babel/plugin-transform-shorthand-properties": "^7.27.1", - "@babel/plugin-transform-spread": "^7.27.1", + "@babel/plugin-transform-spread": "^7.28.6", "@babel/plugin-transform-sticky-regex": "^7.27.1", "@babel/plugin-transform-template-literals": "^7.27.1", "@babel/plugin-transform-typeof-symbol": "^7.27.1", "@babel/plugin-transform-unicode-escapes": "^7.27.1", - "@babel/plugin-transform-unicode-property-regex": "^7.27.1", + "@babel/plugin-transform-unicode-property-regex": "^7.28.6", "@babel/plugin-transform-unicode-regex": "^7.27.1", - "@babel/plugin-transform-unicode-sets-regex": "^7.27.1", + "@babel/plugin-transform-unicode-sets-regex": "^7.28.6", "@babel/preset-modules": "0.1.6-no-external-plugins", - "babel-plugin-polyfill-corejs2": "^0.4.14", - "babel-plugin-polyfill-corejs3": "^0.13.0", - "babel-plugin-polyfill-regenerator": "^0.6.5", - "core-js-compat": "^3.43.0", + "babel-plugin-polyfill-corejs2": "^0.4.15", + "babel-plugin-polyfill-corejs3": "^0.14.0", + "babel-plugin-polyfill-regenerator": "^0.6.6", + "core-js-compat": "^3.48.0", "semver": "^6.3.1" }, "engines": { @@ -3123,8 +2837,6 @@ }, "node_modules/@mat3ra/esse/node_modules/@babel/preset-react": { "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.28.5.tgz", - "integrity": "sha512-Z3J8vhRq7CeLjdC58jLv4lnZ5RKFUJWqH5emvxmv9Hv3BD1T9R/Im713R4MTKwvFaV74ejZ3sM01LyEKk4ugNQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3143,22 +2855,22 @@ } }, "node_modules/@mat3ra/esse/node_modules/@babel/runtime-corejs3": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.28.4.tgz", - "integrity": "sha512-h7iEYiW4HebClDEhtvFObtPmIvrd1SSfpI9EhOeKk4CtIK/ngBWFpuhCzhdmRKtg71ylcue+9I6dv54XYO1epQ==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.29.2.tgz", + "integrity": "sha512-Lc94FOD5+0aXhdb0Tdg3RUtqT6yWbI/BbFWvlaSJ3gAb9Ks+99nHRDKADVqC37er4eCB0fHyWT+y+K3QOvJKbw==", "dev": true, "license": "MIT", "dependencies": { - "core-js-pure": "^3.43.0" + "core-js-pure": "^3.48.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@mat3ra/esse/node_modules/@mat3ra/utils": { - "version": "2025.11.20-0", - "resolved": "https://registry.npmjs.org/@mat3ra/utils/-/utils-2025.11.20-0.tgz", - "integrity": "sha512-igkswFIPrvIsOKiGdLE6ifgKGa3nruepjq2pPs9us+gHRn4tCaFNsBJqHw3ysw1dLgCtoYhHyYbMdpQu46+FCw==", + "version": "2026.3.7-0", + "resolved": "https://registry.npmjs.org/@mat3ra/utils/-/utils-2026.3.7-0.tgz", + "integrity": "sha512-qUxsyzo4s1G8MjHYbF+QHdXq0KgymJ3ey3x+dswCak69WiB0w8OuO5IOqyXS0RWoEB2mj7Ccm4ZN7uTSWZLHxw==", "dev": true, "license": "ISC", "dependencies": { @@ -3573,9 +3285,9 @@ } }, "node_modules/@mat3ra/esse/node_modules/@mat3ra/utils/node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", "bin": { @@ -3586,14 +3298,14 @@ } }, "node_modules/@mat3ra/esse/node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.14.tgz", - "integrity": "sha512-Co2Y9wX854ts6U8gAAPXfn0GmAyctHuK8n0Yhfjd6t30g7yvKjspvvOo9yG+z52PZRgFErt7Ka2pYnXCjLKEpg==", + "version": "0.4.17", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.17.tgz", + "integrity": "sha512-aTyf30K/rqAsNwN76zYrdtx8obu0E4KoUME29B1xj+B3WxgvWkp943vYQ+z8Mv3lw9xHXMHpvSPOBxzAkIa94w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.27.7", - "@babel/helper-define-polyfill-provider": "^0.6.5", + "@babel/compat-data": "^7.28.6", + "@babel/helper-define-polyfill-provider": "^0.6.8", "semver": "^6.3.1" }, "peerDependencies": { @@ -3601,27 +3313,27 @@ } }, "node_modules/@mat3ra/esse/node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.13.0.tgz", - "integrity": "sha512-U+GNwMdSFgzVmfhNm8GJUX88AadB3uo9KpJqS3FaqNIPKgySuvMb+bHPsOmmuWyIcuqZj/pzt1RUIUZns4y2+A==", + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.14.2.tgz", + "integrity": "sha512-coWpDLJ410R781Npmn/SIBZEsAetR4xVi0SxLMXPaMO4lSf1MwnkGYMtkFxew0Dn8B3/CpbpYxN0JCgg8mn67g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.5", - "core-js-compat": "^3.43.0" + "@babel/helper-define-polyfill-provider": "^0.6.8", + "core-js-compat": "^3.48.0" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/@mat3ra/esse/node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.5.tgz", - "integrity": "sha512-ISqQ2frbiNU9vIJkzg7dlPpznPZ4jOiUQ1uSmB0fEHeowtN3COYRsXr/xexn64NpU13P06jc/L5TgiJXOgrbEg==", + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.8.tgz", + "integrity": "sha512-M762rNHfSF1EV3SLtnCJXFoQbbIIz0OyRwnCmV0KPC7qosSfCO0QLTSuJX3ayAebubhE6oYBAYPrBA5ljowaZg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.5" + "@babel/helper-define-polyfill-provider": "^0.6.8" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -3653,8 +3365,6 @@ }, "node_modules/@mat3ra/esse/node_modules/convert-source-map": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true, "license": "MIT" }, @@ -3672,6 +3382,19 @@ "url": "https://github.com/sponsors/rawify" } }, + "node_modules/@mat3ra/esse/node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@mat3ra/esse/node_modules/mathjs": { "version": "12.4.1", "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-12.4.1.tgz", @@ -3720,38 +3443,10 @@ "node": ">=4.2.0" } }, - "node_modules/@mat3ra/ide": { - "version": "2025.11.19-0", - "resolved": "https://registry.npmjs.org/@mat3ra/ide/-/ide-2025.11.19-0.tgz", - "integrity": "sha512-RG/qKLgOZ7akAkv4LWTn6WtMF/sx1JECdZF9CF7dHDR2o1jbYurXRyvccVZbb823SDZWB4rUdWu9+b/mOkDeCA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/cli": "7.16.0", - "@babel/core": "7.16.0", - "@babel/eslint-parser": "7.16.3", - "@babel/plugin-proposal-class-properties": "7.16.0", - "@babel/preset-env": "7.16.4", - "@babel/preset-react": "7.16.7", - "@babel/register": "^7.16.0", - "@babel/runtime-corejs3": "7.16.8", - "chai": "^4.3.4", - "lodash": "^4.17.21", - "moment": "^2.17.1", - "pluralize": "^3.0.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "@mat3ra/code": "*", - "@mat3ra/esse": "*" - } - }, "node_modules/@mat3ra/made": { "version": "0.0.0", - "resolved": "git+ssh://git@github.com/Exabyte-io/made.git#47b3e12a859c45fa72079ed4ddd1675a6a32b4fe", - "integrity": "sha512-07+f5AUKW1SpkftRqr84/s/KSP114PmuT5cAH30Pn+V3OTIfQrvf5vBWuRjYuoDg/HK2UZzqmv2FE/dY43gfTw==", + "resolved": "git+ssh://git@github.com/Exabyte-io/made.git#75f9a788a20decc18570d6db68e6d83068fab37f", + "integrity": "sha512-jnMwm1Nx61jlD1MDKxnfblN6rriYSn+UEcqxSW7EjOUB+2wJUoGyeda0pA8jfdoKHmO5JvdyPMsokt3Ngmck8g==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -3779,8 +3474,6 @@ }, "node_modules/@mat3ra/made/node_modules/@babel/core": { "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.1.tgz", - "integrity": "sha512-F82udohVyIgGAY2VVj/g34TpFUG606rumIHjTfVbssPg2zTR7PuuEpZcX8JA6sgBfIYmJrFtWgPvHQuJamVqZQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3810,8 +3503,6 @@ }, "node_modules/@mat3ra/made/node_modules/@babel/register": { "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.16.0.tgz", - "integrity": "sha512-lzl4yfs0zVXnooeLE0AAfYaT7F3SPA8yB2Bj4W1BiZwLbMS3MZH35ZvCWSRHvneUugwuM+Wsnrj7h0F7UmU3NQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3830,8 +3521,6 @@ }, "node_modules/@mat3ra/made/node_modules/@exabyte-io/periodic-table.js": { "version": "2022.5.28-0", - "resolved": "https://registry.npmjs.org/@exabyte-io/periodic-table.js/-/periodic-table.js-2022.5.28-0.tgz", - "integrity": "sha512-BA+u07dkt4e8yqcBHTv5szXXeMyNFcW0G2Ki3Vbugv6ku6dfl4+Sji8cs5PUr+hkYptc7rTg5r89lfr6Vt+oJw==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -3850,8 +3539,6 @@ }, "node_modules/@mat3ra/made/node_modules/@exabyte-io/periodic-table.js/node_modules/@babel/core": { "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.0.tgz", - "integrity": "sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3881,22 +3568,16 @@ }, "node_modules/@mat3ra/made/node_modules/@exabyte-io/periodic-table.js/node_modules/convert-source-map": { "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true, "license": "MIT" }, "node_modules/@mat3ra/made/node_modules/convert-source-map": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true, "license": "MIT" }, "node_modules/@mat3ra/made/node_modules/typescript": { "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "license": "Apache-2.0", "bin": { @@ -3909,15 +3590,13 @@ }, "node_modules/@mat3ra/made/node_modules/underscore": { "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha512-5WsVTFcH1ut/kkhAaHf4PVgI8c7++GiVcpCGxPouI6ZVjsqPnSDf8h/8HtVqc0t4fzRXwnMK70EcZeAs3PIddg==", "dev": true, "license": "MIT" }, "node_modules/@mat3ra/mode": { - "version": "2025.11.13-0", - "resolved": "https://registry.npmjs.org/@mat3ra/mode/-/mode-2025.11.13-0.tgz", - "integrity": "sha512-wXXz0HddP35svfUmfUEJ4VvWPkj0T2ovaVLCQ+e4l7LBxjlehoApNeSU0Ra5+FSjOO8MMnuzx3XCO3GlfjztcA==", + "version": "0.0.0", + "resolved": "git+ssh://git@github.com/Exabyte-io/mode.git#5b0c40080fed20429496e5e60c69c162147c31f6", + "integrity": "sha512-J2ivB8KsBE80TX1+sPM3noYI0FQXJJJpoixhBtnxczpQFEgJtWjFS5Mx1oVEmjB3WjRnkYZzQZsWqGDytYFf+w==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -3929,6 +3608,7 @@ "@babel/preset-react": "7.16.7", "@babel/register": "^7.16.0", "@babel/runtime-corejs3": "7.16.8", + "@mat3ra/utils": "^2026.3.2-0", "@types/lodash": "^4.14.202", "@types/node": "^20.11.30", "@types/underscore": "^1.11.14", @@ -3947,15 +3627,15 @@ "peerDependencies": { "@mat3ra/code": "*", "@mat3ra/esse": "*", - "@mat3ra/standata": "*" + "@mat3ra/prode": "*" } }, - "node_modules/@mat3ra/standata": { - "version": "2026.1.12-0", - "resolved": "https://registry.npmjs.org/@mat3ra/standata/-/standata-2026.1.12-0.tgz", - "integrity": "sha512-XsDvjqrNKQHnDNcCzwIRJnDrcC2pKZF+rzG1PGX7Iw7M+BdygxS790zZjcnch2YrgESb81Qc4GjXvpFCjOemHQ==", + "node_modules/@mat3ra/mode/node_modules/@mat3ra/utils": { + "version": "2026.3.2-0", + "resolved": "https://registry.npmjs.org/@mat3ra/utils/-/utils-2026.3.2-0.tgz", + "integrity": "sha512-lZcG/gsiA35wqGTqGiXcZCwfEG3hqoIVHNhSquKO2aPhmJfne4CJEg+J/QpaO2zbgOXB+hA+L36HcTkpLQCs0A==", "dev": true, - "license": "Apache-2.0", + "license": "ISC", "dependencies": { "@babel/cli": "7.16.0", "@babel/core": "7.24.1", @@ -3966,17 +3646,22 @@ "@babel/preset-typescript": "^7.22.5", "@babel/register": "^7.16.0", "@babel/runtime-corejs3": "7.16.8", - "cmd-ts": "^0.13.0", + "crypto-js": "^4.1.1", "js-yaml": "^4.1.0", "lodash": "^4.17.21", + "mathjs": "12.4.1", + "semver": "^7.5.3", "ts-node": "^10.9.1", - "typescript": "^4.5.5" + "typescript": "^4.5.5", + "underscore": "^1.13.3", + "underscore.string": "^3.3.4", + "uuid": "8.3.2" }, "engines": { "node": ">=20.0.0" } }, - "node_modules/@mat3ra/standata/node_modules/@babel/core": { + "node_modules/@mat3ra/mode/node_modules/@mat3ra/utils/node_modules/@babel/core": { "version": "7.24.1", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.1.tgz", "integrity": "sha512-F82udohVyIgGAY2VVj/g34TpFUG606rumIHjTfVbssPg2zTR7PuuEpZcX8JA6sgBfIYmJrFtWgPvHQuJamVqZQ==", @@ -4007,14 +3692,30 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@mat3ra/standata/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "node_modules/@mat3ra/mode/node_modules/@mat3ra/utils/node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "MIT" + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } }, - "node_modules/@mat3ra/standata/node_modules/typescript": { + "node_modules/@mat3ra/mode/node_modules/@mat3ra/utils/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@mat3ra/mode/node_modules/@mat3ra/utils/node_modules/typescript": { "version": "4.9.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", @@ -4028,10 +3729,116 @@ "node": ">=4.2.0" } }, + "node_modules/@mat3ra/mode/node_modules/complex.js": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.4.3.tgz", + "integrity": "sha512-UrQVSUur14tNX6tiP4y8T4w4FeJAX3bi2cIv0pu/DTLFNxoq7z2Yh83Vfzztj6Px3X/lubqQ9IrPp7Bpn6p4MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/@mat3ra/mode/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@mat3ra/mode/node_modules/fraction.js": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.4.tgz", + "integrity": "sha512-pwiTgt0Q7t+GHZA4yaLjObx4vXmmdcS0iSJ19o8d/goUGgItX9UZWKWNnLHehxviD8wU2IWRsnR8cD5+yOJP2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/@mat3ra/mode/node_modules/mathjs": { + "version": "12.4.1", + "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-12.4.1.tgz", + "integrity": "sha512-welnW3khgwYjPYvECFHO+xkCxAx9IKIIPDDWPi8B5rKAvmgoEHnQX9slEmHKZTNaJiE+OS4qrJJcB4sfDn/4sw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime": "^7.24.0", + "complex.js": "^2.1.1", + "decimal.js": "^10.4.3", + "escape-latex": "^1.2.0", + "fraction.js": "4.3.4", + "javascript-natural-sort": "^0.7.1", + "seedrandom": "^3.0.5", + "tiny-emitter": "^2.1.0", + "typed-function": "^4.1.1" + }, + "bin": { + "mathjs": "bin/cli.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@mat3ra/mode/node_modules/typed-function": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-4.2.2.tgz", + "integrity": "sha512-VwaXim9Gp1bngi/q3do8hgttYn2uC3MoT/gfuMWylnj1IeZBUAyPddHZlo1K05BDoj8DYPpMdiHqH1dDYdJf2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@mat3ra/prode": { + "version": "0.0.0", + "resolved": "git+ssh://git@github.com/Exabyte-io/prode.git#beac801b06ccd70c09301e240eaa739c208e6bd1", + "integrity": "sha512-VaQ31TRDSJlJwEK2V0kzrvBvnvMG7g2gUG2LGgQlLwLakd34hlbPplL9G+78PsyP/yCWleqtoGt8U7y/V3AQyQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/highcharts": "^5.0.44", + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "@mat3ra/code": "*", + "@mat3ra/esse": "*", + "@mat3ra/made": "*" + } + }, + "node_modules/@mat3ra/standata": { + "version": "0.0.0", + "resolved": "git+ssh://git@github.com/Exabyte-io/standata.git#03f6861665ec72045ade00c4d5c91b7d5ab97c24", + "integrity": "sha512-+eF1HCYK3XPtYO09yysbLL6XMITVU0GIB0AHIrnVnCosWR5hkwvHWr/GpfpW7r/GR8M2B01gW84HvGMPS1T6BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "cmd-ts": "^0.13.0", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "nunjucks": "^3.2.4", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "@mat3ra/esse": "*" + } + }, "node_modules/@mat3ra/tsconfig": { "version": "2024.6.3-0", - "resolved": "https://registry.npmjs.org/@mat3ra/tsconfig/-/tsconfig-2024.6.3-0.tgz", - "integrity": "sha512-dA3gKDSl9+vlZvot1DN+UXfZPgxPSyHkZrkfVCTOWvzwm/3NdJ4cTzrTxjBIWUrZukpVVtH5ao8FbXLB6RDQzQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4040,8 +3847,6 @@ }, "node_modules/@mat3ra/utils": { "version": "2025.9.20-0", - "resolved": "https://registry.npmjs.org/@mat3ra/utils/-/utils-2025.9.20-0.tgz", - "integrity": "sha512-Jnnu+GtfzaJ5VrXA8vwOP6ry7sUzjRV31FibDOCCoKqYXIEKRmudcydG+RoHWdYpmGdKxkKDKEphNJIIlFbU4g==", "dev": true, "license": "ISC", "dependencies": { @@ -4071,8 +3876,6 @@ }, "node_modules/@mat3ra/utils/node_modules/@babel/core": { "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.1.tgz", - "integrity": "sha512-F82udohVyIgGAY2VVj/g34TpFUG606rumIHjTfVbssPg2zTR7PuuEpZcX8JA6sgBfIYmJrFtWgPvHQuJamVqZQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4102,8 +3905,6 @@ }, "node_modules/@mat3ra/utils/node_modules/@babel/core/node_modules/semver": { "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "license": "ISC", "bin": { @@ -4112,8 +3913,6 @@ }, "node_modules/@mat3ra/utils/node_modules/complex.js": { "version": "2.4.2", - "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.4.2.tgz", - "integrity": "sha512-qtx7HRhPGSCBtGiST4/WGHuW+zeaND/6Ld+db6PbrulIB1i2Ev/2UPiqcmpQNPSyfBKraC0EOvOKCB5dGZKt3g==", "dev": true, "license": "MIT", "engines": { @@ -4126,15 +3925,11 @@ }, "node_modules/@mat3ra/utils/node_modules/convert-source-map": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true, "license": "MIT" }, "node_modules/@mat3ra/utils/node_modules/fraction.js": { "version": "4.3.4", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.4.tgz", - "integrity": "sha512-pwiTgt0Q7t+GHZA4yaLjObx4vXmmdcS0iSJ19o8d/goUGgItX9UZWKWNnLHehxviD8wU2IWRsnR8cD5+yOJP2Q==", "dev": true, "license": "MIT", "engines": { @@ -4147,8 +3942,6 @@ }, "node_modules/@mat3ra/utils/node_modules/mathjs": { "version": "12.4.1", - "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-12.4.1.tgz", - "integrity": "sha512-welnW3khgwYjPYvECFHO+xkCxAx9IKIIPDDWPi8B5rKAvmgoEHnQX9slEmHKZTNaJiE+OS4qrJJcB4sfDn/4sw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -4171,8 +3964,6 @@ }, "node_modules/@mat3ra/utils/node_modules/semver": { "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -4184,8 +3975,6 @@ }, "node_modules/@mat3ra/utils/node_modules/typed-function": { "version": "4.2.1", - "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-4.2.1.tgz", - "integrity": "sha512-EGjWssW7Tsk4DGfE+5yluuljS1OGYWiI1J6e8puZz9nTMM51Oug8CD5Zo4gWMsOhq5BI+1bF+rWTm4Vbj3ivRA==", "dev": true, "license": "MIT", "engines": { @@ -4194,8 +3983,6 @@ }, "node_modules/@mat3ra/utils/node_modules/typescript": { "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "license": "Apache-2.0", "bin": { @@ -4208,8 +3995,6 @@ }, "node_modules/@nicolo-ribaudo/chokidar-2": { "version": "2.1.8-no-fsevents.3", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", - "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", "license": "MIT", "optional": true }, @@ -4225,8 +4010,6 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "license": "MIT", "peer": true, @@ -4240,8 +4023,6 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "license": "MIT", "peer": true, @@ -4251,8 +4032,6 @@ }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "license": "MIT", "peer": true, @@ -4266,8 +4045,6 @@ }, "node_modules/@pkgr/core": { "version": "0.2.9", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", - "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", "dev": true, "license": "MIT", "peer": true, @@ -4280,62 +4057,65 @@ }, "node_modules/@tsconfig/node10": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, "license": "MIT" }, "node_modules/@tsconfig/node12": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, "license": "MIT" }, "node_modules/@tsconfig/node14": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, "license": "MIT" }, "node_modules/@tsconfig/node16": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, "license": "MIT" }, "node_modules/@types/chai": { "version": "4.3.20", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", - "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", "dev": true, "license": "MIT" }, "node_modules/@types/chai-almost": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/chai-almost/-/chai-almost-1.0.3.tgz", - "integrity": "sha512-NMLjvnFjgxS0Z36whNuoma2p/2Fu6m+dV8eddO8tRAztMAqTqYxFYGyJNsAsOlwx89siUMfxQ1Wdqew2xXsiEg==", "dev": true, "license": "MIT", "dependencies": { "@types/chai": "*" } }, + "node_modules/@types/geojson": { + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/highcharts": { + "version": "5.0.44", + "resolved": "https://registry.npmjs.org/@types/highcharts/-/highcharts-5.0.44.tgz", + "integrity": "sha512-Rby1gj3GbK7zzsbK/g9T9hoybUfM+x0sBIXrOlTnj25TIvuTkLend3nKRLLz2upvLJNo36GntO6KmTFoVQXWZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/geojson": "*" + } + }, "node_modules/@types/js-yaml": { "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", - "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", "dev": true, "license": "MIT" }, "node_modules/@types/json-schema": { "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "license": "MIT" }, "node_modules/@types/json-schema-merge-allof": { "version": "0.6.5", - "resolved": "https://registry.npmjs.org/@types/json-schema-merge-allof/-/json-schema-merge-allof-0.6.5.tgz", - "integrity": "sha512-5mS11ZUTyFNUVEMpK3uKoPb6BWL/nLgW/ln2VOiI8OOxKEYC4Gl9O3WjS5P49yqVTfkcbCAPKw3T1O4erUah5g==", "dev": true, "license": "MIT", "dependencies": { @@ -4344,22 +4124,16 @@ }, "node_modules/@types/json5": { "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true, "license": "MIT" }, "node_modules/@types/lodash": { "version": "4.17.20", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==", "dev": true, "license": "MIT" }, "node_modules/@types/mathjs": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@types/mathjs/-/mathjs-5.0.1.tgz", - "integrity": "sha512-EFBuueI+BRed9bnUO6/9my55b4FH+VQIvqMm58h9JGbtaGCkqr3YSDhnmVbM1SJjF//8SURERSypzNwejOk7lA==", "dev": true, "license": "MIT", "dependencies": { @@ -4368,15 +4142,12 @@ }, "node_modules/@types/mocha": { "version": "10.0.10", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", - "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", "dev": true, "license": "MIT" }, "node_modules/@types/node": { "version": "20.19.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.24.tgz", - "integrity": "sha512-FE5u0ezmi6y9OZEzlJfg37mqqf6ZDSF2V/NLjUyGrR9uTZ7Sb9F7bLNZ03S4XVUNRWGA7Ck4c1kK+YnuWjl+DA==", + "dev": true, "license": "MIT", "dependencies": { "undici-types": "~6.21.0" @@ -4384,14 +4155,11 @@ }, "node_modules/@types/nunjucks": { "version": "3.2.6", - "resolved": "https://registry.npmjs.org/@types/nunjucks/-/nunjucks-3.2.6.tgz", - "integrity": "sha512-pHiGtf83na1nCzliuAdq8GowYiXvH5l931xZ0YEHaLMNFgynpEqx+IPStlu7UaDkehfvl01e4x/9Tpwhy7Ue3w==", + "dev": true, "license": "MIT" }, "node_modules/@types/react": { "version": "19.2.7", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", - "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", "license": "MIT", "dependencies": { "csstype": "^3.2.2" @@ -4399,8 +4167,6 @@ }, "node_modules/@types/react-jsonschema-form": { "version": "1.7.13", - "resolved": "https://registry.npmjs.org/@types/react-jsonschema-form/-/react-jsonschema-form-1.7.13.tgz", - "integrity": "sha512-C2jgO7/ow76oCSfUK++jKKox17R0A7ryMYNE5hJ2dR1Ske9jhuvjIlurvzMePh+Xjk8wey0nzB2C7HFKe2pRdg==", "license": "MIT", "dependencies": { "@types/json-schema": "*", @@ -4409,23 +4175,17 @@ }, "node_modules/@types/semver": { "version": "7.7.1", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==", "dev": true, "license": "MIT", "peer": true }, "node_modules/@types/underscore": { "version": "1.13.0", - "resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.13.0.tgz", - "integrity": "sha512-L6LBgy1f0EFQZ+7uSA57+n2g/s4Qs5r06Vwrwn0/nuK1de+adz00NWaztRQ30aEqw5qOaWbPI8u2cGQ52lj6VA==", "dev": true, "license": "MIT" }, "node_modules/@types/underscore.string": { "version": "0.0.40", - "resolved": "https://registry.npmjs.org/@types/underscore.string/-/underscore.string-0.0.40.tgz", - "integrity": "sha512-6J3Wp6PnuXhSxVSVaSoh9SKiormScoa2pPLKpZk5QsjKD3RKQZQj/mwBVfULd2MUl5gM/UlLSvr+cynd/7VWQA==", "dev": true, "license": "MIT", "dependencies": { @@ -4434,8 +4194,6 @@ }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", - "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", "dev": true, "license": "MIT", "peer": true, @@ -4470,8 +4228,6 @@ }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "peer": true, @@ -4484,8 +4240,6 @@ }, "node_modules/@typescript-eslint/parser": { "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, "license": "BSD-2-Clause", "peer": true, @@ -4513,8 +4267,6 @@ }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", "dev": true, "license": "MIT", "peer": true, @@ -4532,8 +4284,6 @@ }, "node_modules/@typescript-eslint/type-utils": { "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", "dev": true, "license": "MIT", "peer": true, @@ -4561,8 +4311,6 @@ }, "node_modules/@typescript-eslint/types": { "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", "dev": true, "license": "MIT", "peer": true, @@ -4576,8 +4324,6 @@ }, "node_modules/@typescript-eslint/typescript-estree": { "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", "dev": true, "license": "BSD-2-Clause", "peer": true, @@ -4605,8 +4351,6 @@ }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "peer": true, @@ -4619,8 +4363,6 @@ }, "node_modules/@typescript-eslint/utils": { "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", "dev": true, "license": "MIT", "peer": true, @@ -4647,8 +4389,6 @@ }, "node_modules/@typescript-eslint/utils/node_modules/semver": { "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "peer": true, @@ -4661,8 +4401,6 @@ }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", "dev": true, "license": "MIT", "peer": true, @@ -4680,8 +4418,6 @@ }, "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -4694,21 +4430,15 @@ }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true, "license": "ISC" }, "node_modules/a-sync-waterfall": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", - "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==", "license": "MIT" }, "node_modules/acorn": { "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -4719,8 +4449,6 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -4728,8 +4456,7 @@ }, "node_modules/acorn-walk": { "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, "license": "MIT", "dependencies": { "acorn": "^8.11.0" @@ -4740,8 +4467,7 @@ }, "node_modules/acorn-walk/node_modules/acorn": { "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -4752,8 +4478,6 @@ }, "node_modules/aggregate-error": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "license": "MIT", "dependencies": { @@ -4765,9 +4489,9 @@ } }, "node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -4782,8 +4506,6 @@ }, "node_modules/ajv-formats": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", "dev": true, "license": "MIT", "dependencies": { @@ -4800,22 +4522,16 @@ }, "node_modules/almost-equal": { "version": "0.0.0", - "resolved": "https://registry.npmjs.org/almost-equal/-/almost-equal-0.0.0.tgz", - "integrity": "sha512-/wvWNupeAr7sp7J2ZXvQvd97uyxsokx4TXdV6YMhd/EDwctlgY3wUGZCgQx1sJQyxU+c8EWRCWsLGOumdiS9aw==", "dev": true, "license": "MIT" }, "node_modules/an-array": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/an-array/-/an-array-1.0.0.tgz", - "integrity": "sha512-M175GYI7RmsYu24Ok383yZQa3eveDfNnmhTe3OQ3bm70bEovz2gWenH+ST/n32M8lrwLWk74hcPds5CDRPe2wg==", "dev": true, "license": "MIT" }, "node_modules/ansi-colors": { "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "license": "MIT", "engines": { "node": ">=6" @@ -4823,8 +4539,6 @@ }, "node_modules/ansi-escapes": { "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4839,8 +4553,6 @@ }, "node_modules/ansi-escapes/node_modules/type-fest": { "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -4852,8 +4564,6 @@ }, "node_modules/ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "license": "MIT", "engines": { "node": ">=8" @@ -4861,8 +4571,6 @@ }, "node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -4876,8 +4584,6 @@ }, "node_modules/anymatch": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "devOptional": true, "license": "ISC", "dependencies": { @@ -4890,8 +4596,6 @@ }, "node_modules/append-transform": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", "dev": true, "license": "MIT", "dependencies": { @@ -4903,27 +4607,21 @@ }, "node_modules/archy": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true, "license": "MIT" }, "node_modules/arg": { "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, "license": "MIT" }, "node_modules/argparse": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, "license": "Python-2.0" }, "node_modules/aria-query": { "version": "4.2.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -4936,8 +4634,6 @@ }, "node_modules/array-almost-equal": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-almost-equal/-/array-almost-equal-1.0.0.tgz", - "integrity": "sha512-NiQJq0vH5nEebm7FMs52fli23nwCh+RBKZZtA5g5qUmqGAkb9n8/WOTW8zjDocLADXXM1CRanFfPTMdrI2yZwg==", "dev": true, "license": "MIT", "dependencies": { @@ -4947,8 +4643,6 @@ }, "node_modules/array-buffer-byte-length": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", "dev": true, "license": "MIT", "dependencies": { @@ -4964,8 +4658,6 @@ }, "node_modules/array-includes": { "version": "3.1.9", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", - "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4987,8 +4679,6 @@ }, "node_modules/array-union": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, "license": "MIT", "peer": true, @@ -4998,8 +4688,6 @@ }, "node_modules/array.prototype.flat": { "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", - "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", "dev": true, "license": "MIT", "dependencies": { @@ -5017,8 +4705,6 @@ }, "node_modules/array.prototype.flatmap": { "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", "dev": true, "license": "MIT", "dependencies": { @@ -5036,8 +4722,6 @@ }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5058,14 +4742,10 @@ }, "node_modules/asap": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "license": "MIT" }, "node_modules/assertion-error": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, "license": "MIT", "engines": { @@ -5074,15 +4754,11 @@ }, "node_modules/ast-types-flow": { "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", - "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", "dev": true, "license": "ISC" }, "node_modules/astral-regex": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "license": "MIT", "engines": { "node": ">=8" @@ -5090,8 +4766,6 @@ }, "node_modules/async-function": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", - "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", "dev": true, "license": "MIT", "engines": { @@ -5100,8 +4774,6 @@ }, "node_modules/available-typed-arrays": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5116,8 +4788,6 @@ }, "node_modules/axe-core": { "version": "4.11.0", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.11.0.tgz", - "integrity": "sha512-ilYanEU8vxxBexpJd8cWM4ElSQq4QctCLKih0TSfjIfCQTeyH/6zVrmIJfLPrKTKJRbiG+cfnZbQIjAlJmF1jQ==", "dev": true, "license": "MPL-2.0", "engines": { @@ -5126,15 +4796,11 @@ }, "node_modules/axobject-query": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", - "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", "dev": true, "license": "Apache-2.0" }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", - "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", "license": "MIT", "dependencies": { "@babel/compat-data": "^7.17.7", @@ -5147,8 +4813,6 @@ }, "node_modules/babel-plugin-polyfill-corejs3": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.4.0.tgz", - "integrity": "sha512-YxFreYwUfglYKdLUGvIF2nJEsGwj+RhWSX/ije3D2vQPOXuyMLMtg/cCGMDpOA7Nd+MwlNdnGODbd2EwUZPlsw==", "license": "MIT", "dependencies": { "@babel/helper-define-polyfill-provider": "^0.3.0", @@ -5160,8 +4824,6 @@ }, "node_modules/babel-plugin-polyfill-regenerator": { "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", - "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", "license": "MIT", "dependencies": { "@babel/helper-define-polyfill-provider": "^0.3.1" @@ -5172,23 +4834,22 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.24", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.24.tgz", - "integrity": "sha512-uUhTRDPXamakPyghwrUcjaGvvBqGrWvBHReoiULMIpOJVM9IYzQh83Xk2Onx5HlGI2o10NNCzcs9TG/S3TkwrQ==", + "version": "2.10.13", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.13.tgz", + "integrity": "sha512-BL2sTuHOdy0YT1lYieUxTw/QMtPBC3pmlJC6xk8BBYVv6vcw3SGdKemQ+Xsx9ik2F/lYDO9tqsFQH1r9PFuHKw==", "license": "Apache-2.0", "bin": { - "baseline-browser-mapping": "dist/cli.js" + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" } }, "node_modules/binary-extensions": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "devOptional": true, "license": "MIT", "engines": { @@ -5200,8 +4861,6 @@ }, "node_modules/brace-expansion": { "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -5210,8 +4869,6 @@ }, "node_modules/braces": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "devOptional": true, "license": "MIT", "dependencies": { @@ -5223,15 +4880,13 @@ }, "node_modules/browser-stdout": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true, "license": "ISC" }, "node_modules/browserslist": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", - "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", "funding": [ { "type": "opencollective", @@ -5248,11 +4903,11 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.8.19", - "caniuse-lite": "^1.0.30001751", - "electron-to-chromium": "^1.5.238", - "node-releases": "^2.0.26", - "update-browserslist-db": "^1.1.4" + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" @@ -5263,14 +4918,10 @@ }, "node_modules/buffer-from": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "license": "MIT" }, "node_modules/caching-transform": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", "dev": true, "license": "MIT", "dependencies": { @@ -5285,8 +4936,6 @@ }, "node_modules/caching-transform/node_modules/make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "license": "MIT", "dependencies": { @@ -5301,8 +4950,6 @@ }, "node_modules/call-bind": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "dev": true, "license": "MIT", "dependencies": { @@ -5320,8 +4967,6 @@ }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5334,8 +4979,6 @@ }, "node_modules/call-bound": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", "dev": true, "license": "MIT", "dependencies": { @@ -5351,8 +4994,6 @@ }, "node_modules/callsites": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "license": "MIT", "engines": { "node": ">=6" @@ -5360,8 +5001,6 @@ }, "node_modules/camelcase": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, "license": "MIT", "engines": { @@ -5369,9 +5008,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001753", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001753.tgz", - "integrity": "sha512-Bj5H35MD/ebaOV4iDLqPEtiliTN29qkGtEHCwawWn4cYm+bPJM2NsaP30vtZcnERClMzp52J4+aw2UNbK4o+zw==", + "version": "1.0.30001784", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001784.tgz", + "integrity": "sha512-WU346nBTklUV9YfUl60fqRbU5ZqyXlqvo1SgigE1OAXK5bFL8LL9q1K7aap3N739l4BvNqnkm3YrGHiY9sfUQw==", "funding": [ { "type": "opencollective", @@ -5390,8 +5029,6 @@ }, "node_modules/chai": { "version": "4.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", - "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "license": "MIT", "dependencies": { @@ -5409,8 +5046,6 @@ }, "node_modules/chalk": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -5425,8 +5060,6 @@ }, "node_modules/charenc": { "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -5435,8 +5068,6 @@ }, "node_modules/check-error": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, "license": "MIT", "dependencies": { @@ -5448,8 +5079,6 @@ }, "node_modules/chokidar": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "license": "MIT", "optional": true, "dependencies": { @@ -5473,8 +5102,6 @@ }, "node_modules/clean-stack": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, "license": "MIT", "engines": { @@ -5483,8 +5110,6 @@ }, "node_modules/cli-cursor": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, "license": "MIT", "dependencies": { @@ -5496,8 +5121,6 @@ }, "node_modules/cli-truncate": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", "dev": true, "license": "MIT", "dependencies": { @@ -5513,8 +5136,6 @@ }, "node_modules/cliui": { "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "license": "ISC", "dependencies": { @@ -5525,15 +5146,11 @@ }, "node_modules/cliui/node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "license": "MIT" }, "node_modules/cliui/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", "engines": { @@ -5542,8 +5159,6 @@ }, "node_modules/cliui/node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { @@ -5557,8 +5172,6 @@ }, "node_modules/clone": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", "dev": true, "license": "MIT", "engines": { @@ -5567,8 +5180,6 @@ }, "node_modules/clone-deep": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", "license": "MIT", "dependencies": { "is-plain-object": "^2.0.4", @@ -5581,8 +5192,6 @@ }, "node_modules/cmd-ts": { "version": "0.13.0", - "resolved": "https://registry.npmjs.org/cmd-ts/-/cmd-ts-0.13.0.tgz", - "integrity": "sha512-nsnxf6wNIM/JAS7T/x/1JmbEsjH0a8tezXqqpaL0O6+eV0/aDEnRxwjxpu0VzDdRcaC1ixGSbRlUuf/IU59I4g==", "dev": true, "license": "MIT", "dependencies": { @@ -5594,8 +5203,6 @@ }, "node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -5606,21 +5213,15 @@ }, "node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, "node_modules/colorette": { "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true, "license": "MIT" }, "node_modules/commander": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "license": "MIT", "engines": { "node": ">= 6" @@ -5628,8 +5229,6 @@ }, "node_modules/comment-parser": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.0.tgz", - "integrity": "sha512-hRpmWIKgzd81vn0ydoWoyPoALEOnF4wt8yKD35Ib1D6XC2siLiYaiqfGkYrunuKdsXGwpBpHU3+9r+RVw2NZfA==", "dev": true, "license": "MIT", "engines": { @@ -5638,14 +5237,10 @@ }, "node_modules/commondir": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "license": "MIT" }, "node_modules/complex.js": { "version": "2.0.11", - "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.0.11.tgz", - "integrity": "sha512-6IArJLApNtdg1P1dFtn3dnyzoZBEF0MwMnrfF1exSBRpZYoy4yieMkpZhQDC0uwctw48vii0CFVyHfpgZ/DfGw==", "dev": true, "license": "MIT OR GPL-2.0", "engines": { @@ -5654,8 +5249,6 @@ }, "node_modules/compute-gcd": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.1.tgz", - "integrity": "sha512-TwMbxBNz0l71+8Sc4czv13h4kEqnchV9igQZBi6QUaz09dnz13juGnnaWWJTRsP3brxOoxeB4SA2WELLw1hCtg==", "dev": true, "dependencies": { "validate.io-array": "^1.0.3", @@ -5665,8 +5258,6 @@ }, "node_modules/compute-lcm": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/compute-lcm/-/compute-lcm-1.1.2.tgz", - "integrity": "sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ==", "dev": true, "dependencies": { "compute-gcd": "^1.2.1", @@ -5677,30 +5268,24 @@ }, "node_modules/concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "license": "MIT" }, "node_modules/confusing-browser-globals": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", - "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", "dev": true, "license": "MIT" }, "node_modules/convert-source-map": { "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "license": "MIT" }, "node_modules/core-js-compat": { - "version": "3.46.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz", - "integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==", + "version": "3.49.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.49.0.tgz", + "integrity": "sha512-VQXt1jr9cBz03b331DFDCCP90b3fanciLkgiOoy8SBHy06gNf+vQ1A3WFLqG7I8TipYIKeYK9wxd0tUrvHcOZA==", "license": "MIT", "dependencies": { - "browserslist": "^4.26.3" + "browserslist": "^4.28.1" }, "funding": { "type": "opencollective", @@ -5708,9 +5293,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.46.0", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.46.0.tgz", - "integrity": "sha512-NMCW30bHNofuhwLhYPt66OLOKTMbOhgTTatKVbaQC3KRHpTCiRIBYvtshr+NBYSnBxwAFhjW/RfJ0XbIjS16rw==", + "version": "3.49.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.49.0.tgz", + "integrity": "sha512-XM4RFka59xATyJv/cS3O3Kml72hQXUeGRuuTmMYFxwzc9/7C8OYTaIR/Ji+Yt8DXzsFLNhat15cE/JP15HrCgw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -5721,14 +5306,11 @@ }, "node_modules/create-require": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, "license": "MIT" }, "node_modules/cross-spawn": { "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -5741,8 +5323,6 @@ }, "node_modules/crypt": { "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -5751,34 +5331,25 @@ }, "node_modules/crypto-js": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", - "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "dev": true, "license": "MIT" }, "node_modules/csstype": { "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", "license": "MIT" }, "node_modules/dag-map": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/dag-map/-/dag-map-1.0.2.tgz", - "integrity": "sha512-+LSAiGFwQ9dRnRdOeaj7g47ZFJcOUPukAP8J3A3fuZ1g9Y44BG+P1sgApjLXTQPOzC4+7S9Wr8kXsfpINM4jpw==", "dev": true, "license": "MIT" }, "node_modules/damerau-levenshtein": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", - "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", "dev": true, "license": "BSD-2-Clause" }, "node_modules/data-view-buffer": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5795,8 +5366,6 @@ }, "node_modules/data-view-byte-length": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5813,8 +5382,6 @@ }, "node_modules/data-view-byte-offset": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5831,8 +5398,6 @@ }, "node_modules/debug": { "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -5848,8 +5413,6 @@ }, "node_modules/decamelize": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, "license": "MIT", "engines": { @@ -5858,15 +5421,11 @@ }, "node_modules/decimal.js": { "version": "10.6.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", - "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", "dev": true, "license": "MIT" }, "node_modules/deep-eql": { "version": "4.1.4", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", - "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, "license": "MIT", "dependencies": { @@ -5878,14 +5437,10 @@ }, "node_modules/deep-is": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "license": "MIT" }, "node_modules/default-require-extensions": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", - "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", "dev": true, "license": "MIT", "dependencies": { @@ -5900,8 +5455,6 @@ }, "node_modules/define-data-property": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, "license": "MIT", "dependencies": { @@ -5918,8 +5471,6 @@ }, "node_modules/define-properties": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "license": "MIT", "dependencies": { @@ -5936,15 +5487,11 @@ }, "node_modules/didyoumean": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", "dev": true, "license": "Apache-2.0" }, "node_modules/diff": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -5953,8 +5500,6 @@ }, "node_modules/diff-sequences": { "version": "27.5.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", - "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", "dev": true, "license": "MIT", "peer": true, @@ -5964,8 +5509,6 @@ }, "node_modules/dir-glob": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "license": "MIT", "peer": true, @@ -5978,8 +5521,6 @@ }, "node_modules/doctrine": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" @@ -5990,8 +5531,6 @@ }, "node_modules/dunder-proto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "dev": true, "license": "MIT", "dependencies": { @@ -6005,28 +5544,22 @@ }, "node_modules/eastasianwidth": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.245", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.245.tgz", - "integrity": "sha512-rdmGfW47ZhL/oWEJAY4qxRtdly2B98ooTJ0pdEI4jhVLZ6tNf8fPtov2wS1IRKwFJT92le3x4Knxiwzl7cPPpQ==", + "version": "1.5.330", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.330.tgz", + "integrity": "sha512-jFNydB5kFtYUobh4IkWUnXeyDbjf/r9gcUEXe1xcrcUxIGfTdzPXA+ld6zBRbwvgIGVzDll/LTIiDztEtckSnA==", "license": "ISC" }, "node_modules/emoji-regex": { "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "license": "MIT" }, "node_modules/enquirer": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", - "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1", @@ -6038,8 +5571,6 @@ }, "node_modules/es-abstract": { "version": "1.24.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", - "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", "dev": true, "license": "MIT", "dependencies": { @@ -6107,8 +5638,6 @@ }, "node_modules/es-define-property": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, "license": "MIT", "engines": { @@ -6117,8 +5646,6 @@ }, "node_modules/es-errors": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, "license": "MIT", "engines": { @@ -6127,8 +5654,6 @@ }, "node_modules/es-object-atoms": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", "dev": true, "license": "MIT", "dependencies": { @@ -6140,8 +5665,6 @@ }, "node_modules/es-set-tostringtag": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "dev": true, "license": "MIT", "dependencies": { @@ -6156,8 +5679,6 @@ }, "node_modules/es-shim-unscopables": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", - "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", "dev": true, "license": "MIT", "dependencies": { @@ -6169,8 +5690,6 @@ }, "node_modules/es-to-primitive": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", - "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", "dev": true, "license": "MIT", "dependencies": { @@ -6187,15 +5706,11 @@ }, "node_modules/es6-error": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true, "license": "MIT" }, "node_modules/escalade": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "license": "MIT", "engines": { "node": ">=6" @@ -6203,15 +5718,11 @@ }, "node_modules/escape-latex": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/escape-latex/-/escape-latex-1.2.0.tgz", - "integrity": "sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw==", "dev": true, "license": "MIT" }, "node_modules/escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "license": "MIT", "engines": { "node": ">=10" @@ -6222,9 +5733,6 @@ }, "node_modules/eslint": { "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "license": "MIT", "dependencies": { "@babel/code-frame": "7.12.11", @@ -6280,8 +5788,6 @@ }, "node_modules/eslint-compat-utils": { "version": "0.6.5", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.6.5.tgz", - "integrity": "sha512-vAUHYzue4YAa2hNACjB8HvUQj5yehAZgiClyFVVom9cP8z5NSFq3PwB/TtJslN2zAMgRX6FCFCjYBbQh71g5RQ==", "dev": true, "license": "MIT", "peer": true, @@ -6297,8 +5803,6 @@ }, "node_modules/eslint-compat-utils/node_modules/semver": { "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "peer": true, @@ -6311,8 +5815,6 @@ }, "node_modules/eslint-config-airbnb": { "version": "19.0.2", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-19.0.2.tgz", - "integrity": "sha512-4v5DEMVSl043LaCT+gsxPcoiIk0iYG5zxJKKjIy80H/D//2E0vtuOBWkb0CBDxjF+y26yQzspIXYuY6wMmt9Cw==", "dev": true, "license": "MIT", "dependencies": { @@ -6333,8 +5835,6 @@ }, "node_modules/eslint-config-airbnb-base": { "version": "15.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", - "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "dev": true, "license": "MIT", "dependencies": { @@ -6353,8 +5853,6 @@ }, "node_modules/eslint-config-prettier": { "version": "8.10.2", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.2.tgz", - "integrity": "sha512-/IGJ6+Dka158JnP5n5YFMOszjDWrXggGz1LaK/guZq9vZTmniaKlHcsscvkAhn9y4U+BU3JuUdYvtAMcv30y4A==", "dev": true, "license": "MIT", "bin": { @@ -6366,8 +5864,6 @@ }, "node_modules/eslint-import-resolver-exports": { "version": "1.0.0-beta.5", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-exports/-/eslint-import-resolver-exports-1.0.0-beta.5.tgz", - "integrity": "sha512-o6t0w7muUpXr7MkUVzD5igQoDfAQvTmcPp8HEAJdNF8eOuAO+yn6I/TTyMxz9ecCwzX7e02vzlkHURoScUuidg==", "dev": true, "license": "MIT", "dependencies": { @@ -6380,8 +5876,6 @@ }, "node_modules/eslint-import-resolver-meteor": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-meteor/-/eslint-import-resolver-meteor-0.4.0.tgz", - "integrity": "sha512-BSqvgt6QZvk9EGhDGnM4azgbxyBD8b0y6FYA52WFzpWpHcZV9ys8PxM33bx8dlCy3HyopRLLsMUnlhTpZzsZmQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6394,8 +5888,6 @@ }, "node_modules/eslint-import-resolver-node": { "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, "license": "MIT", "dependencies": { @@ -6406,8 +5898,6 @@ }, "node_modules/eslint-import-resolver-node/node_modules/debug": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6416,8 +5906,6 @@ }, "node_modules/eslint-json-compat-utils": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/eslint-json-compat-utils/-/eslint-json-compat-utils-0.2.1.tgz", - "integrity": "sha512-YzEodbDyW8DX8bImKhAcCeu/L31Dd/70Bidx2Qex9OFUtgzXLqtfWL4Hr5fM/aCCB8QUZLuJur0S9k6UfgFkfg==", "dev": true, "license": "MIT", "peer": true, @@ -6439,8 +5927,6 @@ }, "node_modules/eslint-module-utils": { "version": "2.12.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", - "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==", "dev": true, "license": "MIT", "dependencies": { @@ -6457,8 +5943,6 @@ }, "node_modules/eslint-module-utils/node_modules/debug": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6467,8 +5951,6 @@ }, "node_modules/eslint-plugin-import": { "version": "2.25.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz", - "integrity": "sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==", "dev": true, "license": "MIT", "dependencies": { @@ -6495,8 +5977,6 @@ }, "node_modules/eslint-plugin-import/node_modules/debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "license": "MIT", "dependencies": { @@ -6505,8 +5985,6 @@ }, "node_modules/eslint-plugin-import/node_modules/doctrine": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -6518,15 +5996,11 @@ }, "node_modules/eslint-plugin-import/node_modules/ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true, "license": "MIT" }, "node_modules/eslint-plugin-jsdoc": { "version": "37.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-37.1.0.tgz", - "integrity": "sha512-DpkFzX5Sqkqzy4MCgowhDXmusWcF1Gn7wYnphdGfWmIkoQr6SwL0jEtltGAVyF5Rj6ACi6ydw0oCCI5hF3yz6w==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -6549,8 +6023,6 @@ }, "node_modules/eslint-plugin-jsdoc/node_modules/semver": { "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -6562,8 +6034,6 @@ }, "node_modules/eslint-plugin-jsonc": { "version": "2.21.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.21.0.tgz", - "integrity": "sha512-HttlxdNG5ly3YjP1cFMP62R4qKLxJURfBZo2gnMY+yQojZxkLyOpY1H1KRTKBmvQeSG9pIpSGEhDjE17vvYosg==", "dev": true, "license": "MIT", "peer": true, @@ -6590,8 +6060,6 @@ }, "node_modules/eslint-plugin-jsonc/node_modules/acorn": { "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "peer": true, @@ -6604,8 +6072,6 @@ }, "node_modules/eslint-plugin-jsonc/node_modules/eslint-visitor-keys": { "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -6618,8 +6084,6 @@ }, "node_modules/eslint-plugin-jsonc/node_modules/espree": { "version": "10.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", - "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "peer": true, @@ -6637,8 +6101,6 @@ }, "node_modules/eslint-plugin-jsx-a11y": { "version": "6.5.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz", - "integrity": "sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==", "dev": true, "license": "MIT", "dependencies": { @@ -6664,8 +6126,6 @@ }, "node_modules/eslint-plugin-mui-path-imports": { "version": "0.0.15", - "resolved": "https://registry.npmjs.org/eslint-plugin-mui-path-imports/-/eslint-plugin-mui-path-imports-0.0.15.tgz", - "integrity": "sha512-u61kgRBtUAG+zoApuf8oWuW6mf3SIfrpMq/gSQEM2h/3qzkqvWXB4RRmPzVryS6bpeXT0QsW8rFcdcMVnoz0hw==", "dev": true, "license": "MIT", "dependencies": { @@ -6680,8 +6140,6 @@ }, "node_modules/eslint-plugin-prettier": { "version": "4.2.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.5.tgz", - "integrity": "sha512-9Ni+xgemM2IWLq6aXEpP2+V/V30GeA/46Ar629vcMqVPodFFWC9skHu/D1phvuqtS8bJCFnNf01/qcmqYEwNfg==", "dev": true, "license": "MIT", "dependencies": { @@ -6702,8 +6160,6 @@ }, "node_modules/eslint-plugin-react": { "version": "7.30.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.30.0.tgz", - "integrity": "sha512-RgwH7hjW48BleKsYyHK5vUAvxtE9SMPDKmcPRQgtRCYaZA0XQPt5FSkrU3nhz5ifzMZcA8opwmRJ2cmOO8tr5A==", "dev": true, "license": "MIT", "dependencies": { @@ -6731,8 +6187,6 @@ }, "node_modules/eslint-plugin-react-hooks": { "version": "4.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", - "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", "dev": true, "license": "MIT", "peer": true, @@ -6745,8 +6199,6 @@ }, "node_modules/eslint-plugin-react/node_modules/doctrine": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -6758,8 +6210,6 @@ }, "node_modules/eslint-plugin-react/node_modules/resolve": { "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", "dev": true, "license": "MIT", "dependencies": { @@ -6776,8 +6226,6 @@ }, "node_modules/eslint-plugin-simple-import-sort": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-7.0.0.tgz", - "integrity": "sha512-U3vEDB5zhYPNfxT5TYR7u01dboFZp+HNpnGhkDB2g/2E4wZ/g1Q9Ton8UwCLfRV9yAKyYqDh62oHOamvkFxsvw==", "dev": true, "license": "MIT", "peerDependencies": { @@ -6786,8 +6234,6 @@ }, "node_modules/eslint-scope": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", @@ -6799,8 +6245,6 @@ }, "node_modules/eslint-scope/node_modules/estraverse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -6808,8 +6252,6 @@ }, "node_modules/eslint-utils": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "license": "MIT", "dependencies": { "eslint-visitor-keys": "^1.1.0" @@ -6823,8 +6265,6 @@ }, "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "license": "Apache-2.0", "engines": { "node": ">=4" @@ -6832,8 +6272,6 @@ }, "node_modules/eslint-visitor-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "license": "Apache-2.0", "engines": { "node": ">=10" @@ -6841,8 +6279,6 @@ }, "node_modules/eslint/node_modules/@babel/code-frame": { "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "license": "MIT", "dependencies": { "@babel/highlight": "^7.10.4" @@ -6850,8 +6286,6 @@ }, "node_modules/eslint/node_modules/ajv": { "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -6866,8 +6300,6 @@ }, "node_modules/eslint/node_modules/argparse": { "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" @@ -6875,8 +6307,6 @@ }, "node_modules/eslint/node_modules/ignore": { "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "license": "MIT", "engines": { "node": ">= 4" @@ -6884,8 +6314,6 @@ }, "node_modules/eslint/node_modules/js-yaml": { "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "license": "MIT", "dependencies": { "argparse": "^1.0.7", @@ -6897,14 +6325,10 @@ }, "node_modules/eslint/node_modules/json-schema-traverse": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "license": "MIT" }, "node_modules/eslint/node_modules/semver": { "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -6915,14 +6339,10 @@ }, "node_modules/eslint/node_modules/sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "license": "BSD-3-Clause" }, "node_modules/espree": { "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "license": "BSD-2-Clause", "dependencies": { "acorn": "^7.4.0", @@ -6935,8 +6355,6 @@ }, "node_modules/espree/node_modules/eslint-visitor-keys": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "license": "Apache-2.0", "engines": { "node": ">=4" @@ -6944,8 +6362,6 @@ }, "node_modules/esprima": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", @@ -6957,8 +6373,6 @@ }, "node_modules/esquery": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" @@ -6969,8 +6383,6 @@ }, "node_modules/esrecurse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" @@ -6981,8 +6393,6 @@ }, "node_modules/estraverse": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -6990,8 +6400,6 @@ }, "node_modules/esutils": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" @@ -6999,8 +6407,6 @@ }, "node_modules/execa": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "license": "MIT", "dependencies": { @@ -7023,21 +6429,15 @@ }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "license": "MIT" }, "node_modules/fast-diff": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", "dev": true, "license": "Apache-2.0" }, "node_modules/fast-glob": { "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "peer": true, @@ -7054,20 +6454,14 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "license": "MIT" }, "node_modules/fast-uri": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", - "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", "funding": [ { "type": "github", @@ -7082,8 +6476,6 @@ }, "node_modules/fastq": { "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "dev": true, "license": "ISC", "peer": true, @@ -7093,8 +6485,6 @@ }, "node_modules/file-entry-cache": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" @@ -7105,8 +6495,6 @@ }, "node_modules/fill-range": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "devOptional": true, "license": "MIT", "dependencies": { @@ -7118,8 +6506,6 @@ }, "node_modules/find-cache-dir": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "license": "MIT", "dependencies": { "commondir": "^1.0.1", @@ -7132,8 +6518,6 @@ }, "node_modules/find-up": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "license": "MIT", "dependencies": { @@ -7149,8 +6533,6 @@ }, "node_modules/flat": { "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, "license": "BSD-3-Clause", "bin": { @@ -7159,8 +6541,6 @@ }, "node_modules/flat-cache": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "license": "MIT", "dependencies": { "flatted": "^3.2.9", @@ -7173,14 +6553,10 @@ }, "node_modules/flatted": { "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "license": "ISC" }, "node_modules/for-each": { "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", "dev": true, "license": "MIT", "dependencies": { @@ -7195,8 +6571,6 @@ }, "node_modules/foreground-child": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, "license": "ISC", "dependencies": { @@ -7209,8 +6583,6 @@ }, "node_modules/fraction.js": { "version": "4.0.12", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.0.12.tgz", - "integrity": "sha512-8Z1K0VTG4hzYY7kA/1sj4/r1/RWLBD3xwReT/RCrUCbzPszjNQCCsy3ktkU/eaEqX3MYa4pY37a52eiBlPMlhA==", "dev": true, "license": "MIT OR GPL-2.0", "engines": { @@ -7219,8 +6591,6 @@ }, "node_modules/fromentries": { "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", "dev": true, "funding": [ { @@ -7240,21 +6610,14 @@ }, "node_modules/fs-readdir-recursive": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", "license": "MIT" }, "node_modules/fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, "license": "MIT", "optional": true, "os": [ @@ -7266,8 +6629,6 @@ }, "node_modules/function-bind": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7275,8 +6636,6 @@ }, "node_modules/function.prototype.name": { "version": "1.1.8", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", - "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", "dev": true, "license": "MIT", "dependencies": { @@ -7296,14 +6655,10 @@ }, "node_modules/functional-red-black-tree": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", "license": "MIT" }, "node_modules/functions-have-names": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, "license": "MIT", "funding": { @@ -7312,8 +6667,6 @@ }, "node_modules/generator-function": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", - "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", "dev": true, "license": "MIT", "engines": { @@ -7322,8 +6675,6 @@ }, "node_modules/gensync": { "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -7331,8 +6682,6 @@ }, "node_modules/get-caller-file": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, "license": "ISC", "engines": { @@ -7341,8 +6690,6 @@ }, "node_modules/get-func-name": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "license": "MIT", "engines": { @@ -7351,8 +6698,6 @@ }, "node_modules/get-intrinsic": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7376,8 +6721,6 @@ }, "node_modules/get-package-type": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, "license": "MIT", "engines": { @@ -7386,8 +6729,6 @@ }, "node_modules/get-proto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", "dev": true, "license": "MIT", "dependencies": { @@ -7400,8 +6741,6 @@ }, "node_modules/get-stream": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, "license": "MIT", "engines": { @@ -7413,8 +6752,6 @@ }, "node_modules/get-symbol-description": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", "dev": true, "license": "MIT", "dependencies": { @@ -7431,9 +6768,6 @@ }, "node_modules/glob": { "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -7452,8 +6786,6 @@ }, "node_modules/glob-parent": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "license": "ISC", "dependencies": { "is-glob": "^4.0.1" @@ -7464,8 +6796,6 @@ }, "node_modules/globals": { "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "license": "MIT", "dependencies": { "type-fest": "^0.20.2" @@ -7479,8 +6809,6 @@ }, "node_modules/globalthis": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7496,8 +6824,6 @@ }, "node_modules/globby": { "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "license": "MIT", "peer": true, @@ -7518,8 +6844,6 @@ }, "node_modules/globby/node_modules/slash": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", "peer": true, @@ -7529,8 +6853,6 @@ }, "node_modules/gopd": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "dev": true, "license": "MIT", "engines": { @@ -7542,23 +6864,17 @@ }, "node_modules/graceful-fs": { "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true, "license": "ISC" }, "node_modules/graphemer": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true, "license": "MIT", "peer": true }, "node_modules/growl": { "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true, "license": "MIT", "engines": { @@ -7567,8 +6883,6 @@ }, "node_modules/has": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", "dev": true, "license": "MIT", "engines": { @@ -7577,8 +6891,6 @@ }, "node_modules/has-bigints": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", "dev": true, "license": "MIT", "engines": { @@ -7590,8 +6902,6 @@ }, "node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "license": "MIT", "engines": { "node": ">=8" @@ -7599,8 +6909,6 @@ }, "node_modules/has-property-descriptors": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "license": "MIT", "dependencies": { @@ -7612,8 +6920,6 @@ }, "node_modules/has-proto": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7628,8 +6934,6 @@ }, "node_modules/has-symbols": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "dev": true, "license": "MIT", "engines": { @@ -7641,8 +6945,6 @@ }, "node_modules/has-tostringtag": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "license": "MIT", "dependencies": { @@ -7657,8 +6959,6 @@ }, "node_modules/hasha": { "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7674,8 +6974,6 @@ }, "node_modules/hasha/node_modules/type-fest": { "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -7684,8 +6982,6 @@ }, "node_modules/hasown": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -7696,8 +6992,6 @@ }, "node_modules/he": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, "license": "MIT", "bin": { @@ -7706,15 +7000,11 @@ }, "node_modules/html-escaper": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true, "license": "MIT" }, "node_modules/human-signals": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -7723,8 +7013,6 @@ }, "node_modules/husky": { "version": "7.0.4", - "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz", - "integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==", "dev": true, "license": "MIT", "bin": { @@ -7739,8 +7027,6 @@ }, "node_modules/ignore": { "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "license": "MIT", "peer": true, @@ -7750,8 +7036,6 @@ }, "node_modules/import-fresh": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "license": "MIT", "dependencies": { "parent-module": "^1.0.0", @@ -7766,8 +7050,6 @@ }, "node_modules/imurmurhash": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "license": "MIT", "engines": { "node": ">=0.8.19" @@ -7775,8 +7057,6 @@ }, "node_modules/indent-string": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, "license": "MIT", "engines": { @@ -7785,9 +7065,6 @@ }, "node_modules/inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -7796,14 +7073,10 @@ }, "node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "license": "ISC" }, "node_modules/internal-slot": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "dev": true, "license": "MIT", "dependencies": { @@ -7817,8 +7090,6 @@ }, "node_modules/is-array-buffer": { "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", "dev": true, "license": "MIT", "dependencies": { @@ -7835,8 +7106,6 @@ }, "node_modules/is-async-function": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", - "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7855,8 +7124,6 @@ }, "node_modules/is-bigint": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7871,8 +7138,6 @@ }, "node_modules/is-binary-path": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "devOptional": true, "license": "MIT", "dependencies": { @@ -7884,8 +7149,6 @@ }, "node_modules/is-boolean-object": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", - "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", "dev": true, "license": "MIT", "dependencies": { @@ -7901,15 +7164,11 @@ }, "node_modules/is-buffer": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true, "license": "MIT" }, "node_modules/is-callable": { "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "license": "MIT", "engines": { @@ -7921,8 +7180,6 @@ }, "node_modules/is-core-module": { "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", "license": "MIT", "dependencies": { "hasown": "^2.0.2" @@ -7936,8 +7193,6 @@ }, "node_modules/is-data-view": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", "dev": true, "license": "MIT", "dependencies": { @@ -7954,8 +7209,6 @@ }, "node_modules/is-date-object": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "dev": true, "license": "MIT", "dependencies": { @@ -7971,8 +7224,6 @@ }, "node_modules/is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -7980,8 +7231,6 @@ }, "node_modules/is-finalizationregistry": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", "dev": true, "license": "MIT", "dependencies": { @@ -7996,8 +7245,6 @@ }, "node_modules/is-fullwidth-code-point": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, "license": "MIT", "engines": { @@ -8009,8 +7256,6 @@ }, "node_modules/is-generator-function": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", - "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", "dev": true, "license": "MIT", "dependencies": { @@ -8029,8 +7274,6 @@ }, "node_modules/is-glob": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" @@ -8041,8 +7284,6 @@ }, "node_modules/is-invalid-path": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-invalid-path/-/is-invalid-path-0.1.0.tgz", - "integrity": "sha512-aZMG0T3F34mTg4eTdszcGXx54oiZ4NtHSft3hWNJMGJXUUqdIj3cOZuHcU0nCWWcY3jd7yRe/3AEm3vSNTpBGQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8054,8 +7295,6 @@ }, "node_modules/is-invalid-path/node_modules/is-extglob": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha512-7Q+VbVafe6x2T+Tu6NcOf6sRklazEPmBoB3IWk3WdGZM2iGUwU/Oe3Wtq5lSEkDTTlpp8yx+5t4pzO/i9Ty1ww==", "dev": true, "license": "MIT", "engines": { @@ -8064,8 +7303,6 @@ }, "node_modules/is-invalid-path/node_modules/is-glob": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha512-a1dBeB19NXsf/E0+FHqkagizel/LQw2DjSQpvQrj3zT+jYPpaUCryPnrQajXKFLCMuf4I6FhRpaGtw4lPrG6Eg==", "dev": true, "license": "MIT", "dependencies": { @@ -8077,8 +7314,6 @@ }, "node_modules/is-map": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", "dev": true, "license": "MIT", "engines": { @@ -8090,8 +7325,6 @@ }, "node_modules/is-negative-zero": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, "license": "MIT", "engines": { @@ -8103,8 +7336,6 @@ }, "node_modules/is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "devOptional": true, "license": "MIT", "engines": { @@ -8113,8 +7344,6 @@ }, "node_modules/is-number-object": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "dev": true, "license": "MIT", "dependencies": { @@ -8130,8 +7359,6 @@ }, "node_modules/is-plain-obj": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, "license": "MIT", "engines": { @@ -8140,8 +7367,6 @@ }, "node_modules/is-plain-object": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "license": "MIT", "dependencies": { "isobject": "^3.0.1" @@ -8152,8 +7377,6 @@ }, "node_modules/is-regex": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "dev": true, "license": "MIT", "dependencies": { @@ -8171,8 +7394,6 @@ }, "node_modules/is-set": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", "dev": true, "license": "MIT", "engines": { @@ -8184,8 +7405,6 @@ }, "node_modules/is-shared-array-buffer": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "dev": true, "license": "MIT", "dependencies": { @@ -8200,8 +7419,6 @@ }, "node_modules/is-stream": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, "license": "MIT", "engines": { @@ -8213,8 +7430,6 @@ }, "node_modules/is-string": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "dev": true, "license": "MIT", "dependencies": { @@ -8230,8 +7445,6 @@ }, "node_modules/is-symbol": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "dev": true, "license": "MIT", "dependencies": { @@ -8248,8 +7461,6 @@ }, "node_modules/is-typed-array": { "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8264,15 +7475,11 @@ }, "node_modules/is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true, "license": "MIT" }, "node_modules/is-unicode-supported": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, "license": "MIT", "engines": { @@ -8284,8 +7491,6 @@ }, "node_modules/is-valid-path": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-valid-path/-/is-valid-path-0.1.1.tgz", - "integrity": "sha512-+kwPrVDu9Ms03L90Qaml+79+6DZHqHyRoANI6IsZJ/g8frhnfchDOBCa0RbQ6/kdHt5CS5OeIEyrYznNuVN+8A==", "dev": true, "license": "MIT", "dependencies": { @@ -8297,8 +7502,6 @@ }, "node_modules/is-weakmap": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", "dev": true, "license": "MIT", "engines": { @@ -8310,8 +7513,6 @@ }, "node_modules/is-weakref": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", - "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", "dev": true, "license": "MIT", "dependencies": { @@ -8326,8 +7527,6 @@ }, "node_modules/is-weakset": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", - "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8343,8 +7542,6 @@ }, "node_modules/is-windows": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, "license": "MIT", "engines": { @@ -8353,21 +7550,15 @@ }, "node_modules/isarray": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true, "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "license": "ISC" }, "node_modules/isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -8375,8 +7566,6 @@ }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -8385,8 +7574,6 @@ }, "node_modules/istanbul-lib-hook": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8398,8 +7585,6 @@ }, "node_modules/istanbul-lib-instrument": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8414,8 +7599,6 @@ }, "node_modules/istanbul-lib-processinfo": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", - "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", "dev": true, "license": "ISC", "dependencies": { @@ -8432,8 +7615,6 @@ }, "node_modules/istanbul-lib-processinfo/node_modules/p-map": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8445,8 +7626,6 @@ }, "node_modules/istanbul-lib-report": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8460,8 +7639,6 @@ }, "node_modules/istanbul-lib-report/node_modules/make-dir": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "license": "MIT", "dependencies": { @@ -8476,8 +7653,6 @@ }, "node_modules/istanbul-lib-report/node_modules/semver": { "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { @@ -8489,8 +7664,6 @@ }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8504,8 +7677,6 @@ }, "node_modules/istanbul-lib-source-maps/node_modules/source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -8514,8 +7685,6 @@ }, "node_modules/istanbul-reports": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", - "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -8528,21 +7697,16 @@ }, "node_modules/javascript-natural-sort": { "version": "0.7.1", - "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", - "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==", "dev": true, "license": "MIT" }, "node_modules/js-tokens": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -8553,8 +7717,6 @@ }, "node_modules/jsdoc-type-pratt-parser": { "version": "2.2.5", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-2.2.5.tgz", - "integrity": "sha512-2a6eRxSxp1BW040hFvaJxhsCMI9lT8QB8t14t+NY5tC5rckIR0U9cr2tjOeaFirmEOy6MHvmJnY7zTBHq431Lw==", "dev": true, "license": "MIT", "engines": { @@ -8563,8 +7725,6 @@ }, "node_modules/jsesc": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "license": "MIT", "bin": { "jsesc": "bin/jsesc" @@ -8575,21 +7735,15 @@ }, "node_modules/json-buffer": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "license": "MIT" }, "node_modules/json-schema": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true, "license": "(AFL-2.1 OR BSD-3-Clause)" }, "node_modules/json-schema-compare": { "version": "0.2.2", - "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", - "integrity": "sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8598,8 +7752,6 @@ }, "node_modules/json-schema-deref-sync": { "version": "0.14.0", - "resolved": "https://registry.npmjs.org/json-schema-deref-sync/-/json-schema-deref-sync-0.14.0.tgz", - "integrity": "sha512-yGR1xmhdiD6R0MSrwWcFxQzAj5b3i5Gb/mt5tvQKgFMMeNe0KZYNEN/jWr7G+xn39Azqgcvk4ZKMs8dQl8e4wA==", "dev": true, "license": "MIT", "dependencies": { @@ -8618,8 +7770,6 @@ }, "node_modules/json-schema-merge-allof": { "version": "0.8.1", - "resolved": "https://registry.npmjs.org/json-schema-merge-allof/-/json-schema-merge-allof-0.8.1.tgz", - "integrity": "sha512-CTUKmIlPJbsWfzRRnOXz+0MjIqvnleIXwFTzz+t9T86HnYX/Rozria6ZVGLktAU9e+NygNljveP+yxqtQp/Q4w==", "dev": true, "license": "MIT", "dependencies": { @@ -8633,8 +7783,6 @@ }, "node_modules/json-schema-to-typescript": { "version": "15.0.4", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-15.0.4.tgz", - "integrity": "sha512-Su9oK8DR4xCmDsLlyvadkXzX6+GGXJpbhwoLtOGArAG61dvbW4YQmSEno2y66ahpIdmLMg6YUf/QHLgiwvkrHQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8657,8 +7805,6 @@ }, "node_modules/json-schema-to-typescript/node_modules/prettier": { "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", - "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, "license": "MIT", "bin": { @@ -8673,20 +7819,14 @@ }, "node_modules/json-schema-traverse": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "license": "MIT" }, "node_modules/json5": { "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "license": "MIT", "bin": { "json5": "lib/cli.js" @@ -8697,8 +7837,6 @@ }, "node_modules/jsonc-eslint-parser": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.1.tgz", - "integrity": "sha512-uuPNLJkKN8NXAlZlQ6kmUF9qO+T6Kyd7oV4+/7yy8Jz6+MZNyhPq8EdLpdfnPVzUC8qSf1b4j1azKaGnFsjmsw==", "dev": true, "license": "MIT", "peer": true, @@ -8717,8 +7855,6 @@ }, "node_modules/jsonc-eslint-parser/node_modules/acorn": { "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "peer": true, @@ -8731,8 +7867,6 @@ }, "node_modules/jsonc-eslint-parser/node_modules/eslint-visitor-keys": { "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -8745,8 +7879,6 @@ }, "node_modules/jsonc-eslint-parser/node_modules/espree": { "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "license": "BSD-2-Clause", "peer": true, @@ -8764,8 +7896,6 @@ }, "node_modules/jsonc-eslint-parser/node_modules/semver": { "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "peer": true, @@ -8778,8 +7908,6 @@ }, "node_modules/jsx-ast-utils": { "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8794,8 +7922,6 @@ }, "node_modules/keyv": { "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "license": "MIT", "dependencies": { "json-buffer": "3.0.1" @@ -8803,8 +7929,6 @@ }, "node_modules/kind-of": { "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -8812,15 +7936,11 @@ }, "node_modules/language-subtag-registry": { "version": "0.3.23", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", - "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", "dev": true, "license": "CC0-1.0" }, "node_modules/language-tags": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", - "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", "dev": true, "license": "MIT", "dependencies": { @@ -8832,8 +7952,6 @@ }, "node_modules/levn": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", @@ -8845,8 +7963,6 @@ }, "node_modules/lilconfig": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", - "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", "dev": true, "license": "MIT", "engines": { @@ -8855,8 +7971,6 @@ }, "node_modules/lint-staged": { "version": "12.5.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.5.0.tgz", - "integrity": "sha512-BKLUjWDsKquV/JuIcoQW4MSAI3ggwEImF1+sB4zaKvyVx1wBk3FsG7UK9bpnmBTN1pm7EH2BBcMwINJzCRv12g==", "dev": true, "license": "MIT", "dependencies": { @@ -8887,8 +8001,6 @@ }, "node_modules/lint-staged/node_modules/commander": { "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", "dev": true, "license": "MIT", "engines": { @@ -8897,8 +8009,6 @@ }, "node_modules/lint-staged/node_modules/supports-color": { "version": "9.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", - "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", "dev": true, "license": "MIT", "engines": { @@ -8910,8 +8020,6 @@ }, "node_modules/listr2": { "version": "4.0.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", - "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", "dev": true, "license": "MIT", "dependencies": { @@ -8938,8 +8046,6 @@ }, "node_modules/listr2/node_modules/cli-truncate": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, "license": "MIT", "dependencies": { @@ -8955,15 +8061,11 @@ }, "node_modules/listr2/node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "license": "MIT" }, "node_modules/listr2/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", "engines": { @@ -8972,8 +8074,6 @@ }, "node_modules/listr2/node_modules/slice-ansi": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8987,8 +8087,6 @@ }, "node_modules/listr2/node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { @@ -9002,8 +8100,6 @@ }, "node_modules/locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "license": "MIT", "dependencies": { @@ -9017,40 +8113,31 @@ } }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "dev": true, "license": "MIT" }, "node_modules/lodash.debounce": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "license": "MIT" }, "node_modules/lodash.flattendeep": { "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", "dev": true, "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "license": "MIT" }, "node_modules/lodash.truncate": { "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", "license": "MIT" }, "node_modules/log-symbols": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "license": "MIT", "dependencies": { @@ -9066,8 +8153,6 @@ }, "node_modules/log-update": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", - "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", "dev": true, "license": "MIT", "dependencies": { @@ -9085,15 +8170,11 @@ }, "node_modules/log-update/node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "license": "MIT" }, "node_modules/log-update/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", "engines": { @@ -9102,8 +8183,6 @@ }, "node_modules/log-update/node_modules/slice-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9120,8 +8199,6 @@ }, "node_modules/log-update/node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { @@ -9135,8 +8212,6 @@ }, "node_modules/log-update/node_modules/wrap-ansi": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "license": "MIT", "dependencies": { @@ -9150,8 +8225,6 @@ }, "node_modules/loose-envify": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "license": "MIT", "dependencies": { @@ -9163,8 +8236,6 @@ }, "node_modules/loupe": { "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, "license": "MIT", "dependencies": { @@ -9173,8 +8244,6 @@ }, "node_modules/lru-cache": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "license": "ISC", "dependencies": { "yallist": "^3.0.2" @@ -9182,8 +8251,6 @@ }, "node_modules/make-dir": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "license": "MIT", "dependencies": { "pify": "^4.0.1", @@ -9195,8 +8262,6 @@ }, "node_modules/make-dir/node_modules/semver": { "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "license": "ISC", "bin": { "semver": "bin/semver" @@ -9204,14 +8269,11 @@ }, "node_modules/make-error": { "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, "license": "ISC" }, "node_modules/math-intrinsics": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "dev": true, "license": "MIT", "engines": { @@ -9220,8 +8282,6 @@ }, "node_modules/mathjs": { "version": "5.10.3", - "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-5.10.3.tgz", - "integrity": "sha512-ySjg30BC3dYjQm73ILZtwcWzFJde0VU6otkXW/57IjjuYRa3Qaf0Kb8pydEuBZYtqW2OxreAtsricrAmOj3jIw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -9243,15 +8303,11 @@ }, "node_modules/mathjs/node_modules/decimal.js": { "version": "10.2.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.0.tgz", - "integrity": "sha512-vDPw+rDgn3bZe1+F/pyEwb1oMG2XTlRVgAa6B4KccTEpYgF8w6eQllVbQcfIJnZyvzFtFpxnpGtx8dd7DJp/Rw==", "dev": true, "license": "MIT" }, "node_modules/md5": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", - "integrity": "sha512-PlGG4z5mBANDGCKsYQe0CaUYHdZYZt8ZPZLmEt+Urf0W4GlpTX4HescwHU+dc9+Z/G/vZKYZYFrwgm9VxK6QOQ==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -9262,22 +8318,16 @@ }, "node_modules/memory-cache": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/memory-cache/-/memory-cache-0.2.0.tgz", - "integrity": "sha512-OcjA+jzjOYzKmKS6IQVALHLVz+rNTMPoJvCztFaZxwG14wtAW7VRZjwTQu06vKCYOxh4jVnik7ya0SXTB0W+xA==", "dev": true, "license": "BSD-2-Clause" }, "node_modules/merge-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true, "license": "MIT" }, "node_modules/merge2": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, "license": "MIT", "peer": true, @@ -9287,8 +8337,6 @@ }, "node_modules/micromatch": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "license": "MIT", "dependencies": { @@ -9301,8 +8349,6 @@ }, "node_modules/mimic-fn": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, "license": "MIT", "engines": { @@ -9311,8 +8357,6 @@ }, "node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -9323,8 +8367,6 @@ }, "node_modules/minimist": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, "license": "MIT", "funding": { @@ -9333,14 +8375,11 @@ }, "node_modules/mixwith": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/mixwith/-/mixwith-0.1.1.tgz", - "integrity": "sha512-DQsf/liljH/9e+94jR+xfK8vlKceeKdOM9H9UEXLwGuvEEpO6debNtJ9yt1ZKzPKPrwqGxzMdu0BR1fnQb6i4A==", + "dev": true, "license": "Apache-2.0" }, "node_modules/mocha": { "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", "dev": true, "license": "MIT", "dependencies": { @@ -9383,8 +8422,6 @@ }, "node_modules/mocha/node_modules/ansi-colors": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, "license": "MIT", "engines": { @@ -9393,8 +8430,6 @@ }, "node_modules/mocha/node_modules/chokidar": { "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "funding": [ { @@ -9421,8 +8456,6 @@ }, "node_modules/mocha/node_modules/debug": { "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "license": "MIT", "dependencies": { @@ -9439,16 +8472,11 @@ }, "node_modules/mocha/node_modules/debug/node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true, "license": "MIT" }, "node_modules/mocha/node_modules/glob": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "license": "ISC", "dependencies": { @@ -9468,8 +8496,6 @@ }, "node_modules/mocha/node_modules/glob/node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "license": "ISC", "dependencies": { @@ -9481,8 +8507,6 @@ }, "node_modules/mocha/node_modules/minimatch": { "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", "dev": true, "license": "ISC", "dependencies": { @@ -9494,8 +8518,6 @@ }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "license": "MIT", "dependencies": { @@ -9508,26 +8530,12 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/moment": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", - "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/ms": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, "node_modules/nanoid": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", "dev": true, "license": "MIT", "bin": { @@ -9539,22 +8547,16 @@ }, "node_modules/natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "license": "MIT" }, "node_modules/natural-compare-lite": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true, "license": "MIT", "peer": true }, "node_modules/node-preload": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9565,15 +8567,13 @@ } }, "node_modules/node-releases": { - "version": "2.0.27", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", - "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", + "version": "2.0.36", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz", + "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==", "license": "MIT" }, "node_modules/normalize-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "devOptional": true, "license": "MIT", "engines": { @@ -9582,8 +8582,6 @@ }, "node_modules/npm-run-path": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "license": "MIT", "dependencies": { @@ -9595,8 +8593,6 @@ }, "node_modules/nunjucks": { "version": "3.2.4", - "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz", - "integrity": "sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==", "license": "BSD-2-Clause", "dependencies": { "a-sync-waterfall": "^1.0.0", @@ -9620,8 +8616,6 @@ }, "node_modules/nunjucks/node_modules/commander": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "license": "MIT", "engines": { "node": ">= 6" @@ -9629,8 +8623,6 @@ }, "node_modules/nyc": { "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", "dev": true, "license": "ISC", "dependencies": { @@ -9671,8 +8663,6 @@ }, "node_modules/nyc/node_modules/cliui": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "license": "ISC", "dependencies": { @@ -9683,15 +8673,11 @@ }, "node_modules/nyc/node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "license": "MIT" }, "node_modules/nyc/node_modules/find-cache-dir": { "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, "license": "MIT", "dependencies": { @@ -9708,8 +8694,6 @@ }, "node_modules/nyc/node_modules/find-up": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "license": "MIT", "dependencies": { @@ -9722,8 +8706,6 @@ }, "node_modules/nyc/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", "engines": { @@ -9732,8 +8714,6 @@ }, "node_modules/nyc/node_modules/locate-path": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "license": "MIT", "dependencies": { @@ -9745,8 +8725,6 @@ }, "node_modules/nyc/node_modules/make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "license": "MIT", "dependencies": { @@ -9761,8 +8739,6 @@ }, "node_modules/nyc/node_modules/p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "license": "MIT", "dependencies": { @@ -9777,8 +8753,6 @@ }, "node_modules/nyc/node_modules/p-locate": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "license": "MIT", "dependencies": { @@ -9790,8 +8764,6 @@ }, "node_modules/nyc/node_modules/p-map": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9803,8 +8775,6 @@ }, "node_modules/nyc/node_modules/pkg-dir": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9816,8 +8786,6 @@ }, "node_modules/nyc/node_modules/resolve-from": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, "license": "MIT", "engines": { @@ -9826,8 +8794,6 @@ }, "node_modules/nyc/node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { @@ -9841,8 +8807,6 @@ }, "node_modules/nyc/node_modules/wrap-ansi": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "license": "MIT", "dependencies": { @@ -9856,15 +8820,11 @@ }, "node_modules/nyc/node_modules/y18n": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true, "license": "ISC" }, "node_modules/nyc/node_modules/yargs": { "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "license": "MIT", "dependencies": { @@ -9886,8 +8846,6 @@ }, "node_modules/nyc/node_modules/yargs-parser": { "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "license": "ISC", "dependencies": { @@ -9900,8 +8858,6 @@ }, "node_modules/object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, "license": "MIT", "engines": { @@ -9910,8 +8866,6 @@ }, "node_modules/object-inspect": { "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", "dev": true, "license": "MIT", "engines": { @@ -9923,8 +8877,6 @@ }, "node_modules/object-keys": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, "license": "MIT", "engines": { @@ -9933,8 +8885,6 @@ }, "node_modules/object.assign": { "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "dev": true, "license": "MIT", "dependencies": { @@ -9954,8 +8904,6 @@ }, "node_modules/object.entries": { "version": "1.1.9", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", - "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", "dev": true, "license": "MIT", "dependencies": { @@ -9970,8 +8918,6 @@ }, "node_modules/object.fromentries": { "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9989,8 +8935,6 @@ }, "node_modules/object.hasown": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz", - "integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==", "dev": true, "license": "MIT", "dependencies": { @@ -10007,8 +8951,6 @@ }, "node_modules/object.values": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", - "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", "dev": true, "license": "MIT", "dependencies": { @@ -10026,8 +8968,6 @@ }, "node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "license": "ISC", "dependencies": { "wrappy": "1" @@ -10035,8 +8975,6 @@ }, "node_modules/onetime": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "license": "MIT", "dependencies": { @@ -10051,8 +8989,6 @@ }, "node_modules/optionator": { "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "license": "MIT", "dependencies": { "deep-is": "^0.1.3", @@ -10068,8 +9004,6 @@ }, "node_modules/own-keys": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", - "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", "dev": true, "license": "MIT", "dependencies": { @@ -10086,8 +9020,6 @@ }, "node_modules/p-limit": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "license": "MIT", "dependencies": { @@ -10102,8 +9034,6 @@ }, "node_modules/p-locate": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "license": "MIT", "dependencies": { @@ -10118,8 +9048,6 @@ }, "node_modules/p-map": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "license": "MIT", "dependencies": { @@ -10134,8 +9062,6 @@ }, "node_modules/p-try": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "license": "MIT", "engines": { "node": ">=6" @@ -10143,8 +9069,6 @@ }, "node_modules/package-hash": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", "dev": true, "license": "ISC", "dependencies": { @@ -10159,8 +9083,6 @@ }, "node_modules/parent-module": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "license": "MIT", "dependencies": { "callsites": "^3.0.0" @@ -10171,8 +9093,6 @@ }, "node_modules/path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "license": "MIT", "engines": { @@ -10181,8 +9101,6 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -10190,8 +9108,6 @@ }, "node_modules/path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "license": "MIT", "engines": { "node": ">=8" @@ -10199,14 +9115,10 @@ }, "node_modules/path-parse": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "license": "MIT" }, "node_modules/path-type": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, "license": "MIT", "peer": true, @@ -10216,8 +9128,6 @@ }, "node_modules/pathval": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, "license": "MIT", "engines": { @@ -10226,14 +9136,10 @@ }, "node_modules/picocolors": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "devOptional": true, "license": "MIT", "engines": { @@ -10245,8 +9151,6 @@ }, "node_modules/pidtree": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.5.0.tgz", - "integrity": "sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA==", "dev": true, "license": "MIT", "bin": { @@ -10258,8 +9162,6 @@ }, "node_modules/pify": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "license": "MIT", "engines": { "node": ">=6" @@ -10267,8 +9169,6 @@ }, "node_modules/pirates": { "version": "4.0.7", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", - "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", "license": "MIT", "engines": { "node": ">= 6" @@ -10276,8 +9176,6 @@ }, "node_modules/pkg-dir": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "license": "MIT", "dependencies": { "find-up": "^3.0.0" @@ -10288,8 +9186,6 @@ }, "node_modules/pkg-dir/node_modules/find-up": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "license": "MIT", "dependencies": { "locate-path": "^3.0.0" @@ -10300,8 +9196,6 @@ }, "node_modules/pkg-dir/node_modules/locate-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "license": "MIT", "dependencies": { "p-locate": "^3.0.0", @@ -10313,8 +9207,6 @@ }, "node_modules/pkg-dir/node_modules/p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "license": "MIT", "dependencies": { "p-try": "^2.0.0" @@ -10328,8 +9220,6 @@ }, "node_modules/pkg-dir/node_modules/p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "license": "MIT", "dependencies": { "p-limit": "^2.0.0" @@ -10340,24 +9230,13 @@ }, "node_modules/pkg-dir/node_modules/path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "license": "MIT", "engines": { "node": ">=4" } }, - "node_modules/pluralize": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-3.1.0.tgz", - "integrity": "sha512-2wcybwjwXOzGI1rlxWtlcs0/nSYK0OzNPqsg35TKxJFQlGhFu3cZ1x7EHS4r4bubQlhzyF4YxxlJqQnIhkUQCw==", - "dev": true, - "license": "MIT" - }, "node_modules/possible-typed-array-names": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", "dev": true, "license": "MIT", "engines": { @@ -10366,8 +9245,6 @@ }, "node_modules/prelude-ls": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "license": "MIT", "engines": { "node": ">= 0.8.0" @@ -10375,8 +9252,6 @@ }, "node_modules/prettier": { "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "license": "MIT", "bin": { @@ -10391,8 +9266,6 @@ }, "node_modules/prettier-linter-helpers": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, "license": "MIT", "dependencies": { @@ -10404,8 +9277,6 @@ }, "node_modules/process-on-spawn": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.1.0.tgz", - "integrity": "sha512-JOnOPQ/8TZgjs1JIH/m9ni7FfimjNa/PRx7y/Wb5qdItsnhO0jE4AT7fC0HjC28DUQWDr50dwSYZLdRMlqDq3Q==", "dev": true, "license": "MIT", "dependencies": { @@ -10417,8 +9288,6 @@ }, "node_modules/progress": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "license": "MIT", "engines": { "node": ">=0.4.0" @@ -10426,8 +9295,6 @@ }, "node_modules/prop-types": { "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "dev": true, "license": "MIT", "dependencies": { @@ -10438,8 +9305,6 @@ }, "node_modules/punycode": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "license": "MIT", "engines": { "node": ">=6" @@ -10447,8 +9312,6 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -10469,8 +9332,6 @@ }, "node_modules/randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "license": "MIT", "dependencies": { @@ -10479,15 +9340,11 @@ }, "node_modules/react-is": { "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true, "license": "MIT" }, "node_modules/readdirp": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "devOptional": true, "license": "MIT", "dependencies": { @@ -10499,8 +9356,6 @@ }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", - "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", "dev": true, "license": "MIT", "dependencies": { @@ -10522,14 +9377,10 @@ }, "node_modules/regenerate": { "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "license": "MIT" }, "node_modules/regenerate-unicode-properties": { "version": "10.2.2", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz", - "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==", "license": "MIT", "dependencies": { "regenerate": "^1.4.2" @@ -10540,15 +9391,11 @@ }, "node_modules/regenerator-runtime": { "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", "dev": true, "license": "MIT" }, "node_modules/regexp.prototype.flags": { "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "dev": true, "license": "MIT", "dependencies": { @@ -10568,8 +9415,6 @@ }, "node_modules/regexpp": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "license": "MIT", "engines": { "node": ">=8" @@ -10580,8 +9425,6 @@ }, "node_modules/regexpu-core": { "version": "6.4.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", - "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==", "license": "MIT", "dependencies": { "regenerate": "^1.4.2", @@ -10597,8 +9440,6 @@ }, "node_modules/regextras": { "version": "0.8.0", - "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.8.0.tgz", - "integrity": "sha512-k519uI04Z3SaY0fLX843MRXnDeG2+vHOFsyhiPZvNLe7r8rD2YNRjq4BQLZZ0oAr2NrtvZlICsXysGNFPGa3CQ==", "dev": true, "license": "MIT", "engines": { @@ -10607,14 +9448,10 @@ }, "node_modules/regjsgen": { "version": "0.8.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", "license": "MIT" }, "node_modules/regjsparser": { "version": "0.13.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.0.tgz", - "integrity": "sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==", "license": "BSD-2-Clause", "dependencies": { "jsesc": "~3.1.0" @@ -10625,8 +9462,6 @@ }, "node_modules/release-zalgo": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", "dev": true, "license": "ISC", "dependencies": { @@ -10638,8 +9473,6 @@ }, "node_modules/require-directory": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "license": "MIT", "engines": { @@ -10648,8 +9481,6 @@ }, "node_modules/require-from-string": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -10657,15 +9488,11 @@ }, "node_modules/require-main-filename": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true, "license": "ISC" }, "node_modules/requireindex": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", - "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", "dev": true, "license": "MIT", "engines": { @@ -10674,8 +9501,6 @@ }, "node_modules/resolve": { "version": "1.22.11", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", - "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", "license": "MIT", "dependencies": { "is-core-module": "^2.16.1", @@ -10694,8 +9519,6 @@ }, "node_modules/resolve-from": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "license": "MIT", "engines": { "node": ">=4" @@ -10703,8 +9526,6 @@ }, "node_modules/resolve.exports": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", - "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", "dev": true, "license": "MIT", "engines": { @@ -10713,8 +9534,6 @@ }, "node_modules/restore-cursor": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, "license": "MIT", "dependencies": { @@ -10727,8 +9546,6 @@ }, "node_modules/reusify": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "license": "MIT", "peer": true, @@ -10739,16 +9556,11 @@ }, "node_modules/rfdc": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", - "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "dev": true, "license": "MIT" }, "node_modules/rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", "license": "ISC", "dependencies": { "glob": "^7.1.3" @@ -10762,8 +9574,6 @@ }, "node_modules/run-parallel": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -10787,8 +9597,6 @@ }, "node_modules/rxjs": { "version": "7.8.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", - "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -10797,8 +9605,6 @@ }, "node_modules/safe-array-concat": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", - "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", "dev": true, "license": "MIT", "dependencies": { @@ -10817,8 +9623,6 @@ }, "node_modules/safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { @@ -10838,8 +9642,6 @@ }, "node_modules/safe-push-apply": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", "dev": true, "license": "MIT", "dependencies": { @@ -10855,8 +9657,6 @@ }, "node_modules/safe-regex-test": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", "dev": true, "license": "MIT", "dependencies": { @@ -10873,22 +9673,16 @@ }, "node_modules/seed-random": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/seed-random/-/seed-random-2.2.0.tgz", - "integrity": "sha512-34EQV6AAHQGhoc0tn/96a9Fsi6v2xdqe/dMUwljGRaFOzR3EgRmECvD0O8vi8X+/uQ50LGHfkNu/Eue5TPKZkQ==", "dev": true, "license": "MIT" }, "node_modules/seedrandom": { "version": "3.0.5", - "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", - "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==", "dev": true, "license": "MIT" }, "node_modules/semver": { "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -10896,8 +9690,6 @@ }, "node_modules/serialize-javascript": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -10906,15 +9698,11 @@ }, "node_modules/set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true, "license": "ISC" }, "node_modules/set-function-length": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, "license": "MIT", "dependencies": { @@ -10931,8 +9719,6 @@ }, "node_modules/set-function-name": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "license": "MIT", "dependencies": { @@ -10947,8 +9733,6 @@ }, "node_modules/set-proto": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", - "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", "dev": true, "license": "MIT", "dependencies": { @@ -10962,8 +9746,6 @@ }, "node_modules/shallow-clone": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", "license": "MIT", "dependencies": { "kind-of": "^6.0.2" @@ -10974,8 +9756,6 @@ }, "node_modules/shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -10986,8 +9766,6 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "license": "MIT", "engines": { "node": ">=8" @@ -10995,8 +9773,6 @@ }, "node_modules/side-channel": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dev": true, "license": "MIT", "dependencies": { @@ -11015,8 +9791,6 @@ }, "node_modules/side-channel-list": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", "dev": true, "license": "MIT", "dependencies": { @@ -11032,8 +9806,6 @@ }, "node_modules/side-channel-map": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", "dev": true, "license": "MIT", "dependencies": { @@ -11051,8 +9823,6 @@ }, "node_modules/side-channel-weakmap": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", "dev": true, "license": "MIT", "dependencies": { @@ -11071,15 +9841,11 @@ }, "node_modules/signal-exit": { "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true, "license": "ISC" }, "node_modules/slash": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", "license": "MIT", "engines": { "node": ">=6" @@ -11087,8 +9853,6 @@ }, "node_modules/slice-ansi": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11104,8 +9868,6 @@ }, "node_modules/slice-ansi/node_modules/ansi-styles": { "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", "engines": { @@ -11117,8 +9879,6 @@ }, "node_modules/source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -11126,8 +9886,6 @@ }, "node_modules/source-map-support": { "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", @@ -11136,8 +9894,6 @@ }, "node_modules/source-map-support/node_modules/source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -11145,8 +9901,6 @@ }, "node_modules/spawn-wrap": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", "dev": true, "license": "ISC", "dependencies": { @@ -11163,8 +9917,6 @@ }, "node_modules/spawn-wrap/node_modules/make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "license": "MIT", "dependencies": { @@ -11179,15 +9931,11 @@ }, "node_modules/spdx-exceptions": { "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", "dev": true, "license": "CC-BY-3.0" }, "node_modules/spdx-expression-parse": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "license": "MIT", "dependencies": { @@ -11197,21 +9945,15 @@ }, "node_modules/spdx-license-ids": { "version": "3.0.22", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", - "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", "dev": true, "license": "CC0-1.0" }, "node_modules/sprintf-js": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", "license": "BSD-3-Clause" }, "node_modules/stop-iteration-iterator": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", - "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11224,8 +9966,6 @@ }, "node_modules/string-argv": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", - "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", "dev": true, "license": "MIT", "engines": { @@ -11234,8 +9974,6 @@ }, "node_modules/string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "license": "MIT", "dependencies": { @@ -11252,8 +9990,6 @@ }, "node_modules/string-width/node_modules/ansi-regex": { "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -11265,8 +10001,6 @@ }, "node_modules/string-width/node_modules/strip-ansi": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { @@ -11281,8 +10015,6 @@ }, "node_modules/string.prototype.matchall": { "version": "4.0.12", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", - "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", "dev": true, "license": "MIT", "dependencies": { @@ -11309,8 +10041,6 @@ }, "node_modules/string.prototype.trim": { "version": "1.2.10", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", - "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", "dev": true, "license": "MIT", "dependencies": { @@ -11331,8 +10061,6 @@ }, "node_modules/string.prototype.trimend": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", - "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11350,8 +10078,6 @@ }, "node_modules/string.prototype.trimstart": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "license": "MIT", "dependencies": { @@ -11368,8 +10094,6 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -11380,8 +10104,6 @@ }, "node_modules/strip-bom": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, "license": "MIT", "engines": { @@ -11390,8 +10112,6 @@ }, "node_modules/strip-final-newline": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, "license": "MIT", "engines": { @@ -11400,8 +10120,6 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "license": "MIT", "engines": { "node": ">=8" @@ -11412,8 +10130,6 @@ }, "node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -11424,8 +10140,6 @@ }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -11436,8 +10150,6 @@ }, "node_modules/synckit": { "version": "0.11.11", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", - "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", "dev": true, "license": "MIT", "peer": true, @@ -11453,8 +10165,6 @@ }, "node_modules/table": { "version": "6.9.0", - "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", - "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", "license": "BSD-3-Clause", "dependencies": { "ajv": "^8.0.1", @@ -11469,14 +10179,10 @@ }, "node_modules/table/node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "license": "MIT" }, "node_modules/table/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "license": "MIT", "engines": { "node": ">=8" @@ -11484,8 +10190,6 @@ }, "node_modules/table/node_modules/slice-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -11501,8 +10205,6 @@ }, "node_modules/table/node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -11515,8 +10217,6 @@ }, "node_modules/test-exclude": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, "license": "ISC", "dependencies": { @@ -11530,28 +10230,20 @@ }, "node_modules/text-table": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "license": "MIT" }, "node_modules/through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true, "license": "MIT" }, "node_modules/tiny-emitter": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", - "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", "dev": true, "license": "MIT" }, "node_modules/tinyglobby": { "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11567,8 +10259,6 @@ }, "node_modules/tinyglobby/node_modules/fdir": { "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", "engines": { @@ -11585,8 +10275,6 @@ }, "node_modules/tinyglobby/node_modules/picomatch": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { @@ -11598,8 +10286,6 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "devOptional": true, "license": "MIT", "dependencies": { @@ -11611,8 +10297,6 @@ }, "node_modules/traverse": { "version": "0.6.11", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.11.tgz", - "integrity": "sha512-vxXDZg8/+p3gblxB6BhhG5yWVn1kGRlaL8O78UDXc3wRnPizB5g83dcvWV1jpDMIPnjZjOFuxlMmE82XJ4407w==", "dev": true, "license": "MIT", "dependencies": { @@ -11629,8 +10313,7 @@ }, "node_modules/ts-node": { "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -11672,8 +10355,7 @@ }, "node_modules/ts-node/node_modules/acorn": { "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -11684,8 +10366,7 @@ }, "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -11693,8 +10374,6 @@ }, "node_modules/tsconfig-paths": { "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, "license": "MIT", "dependencies": { @@ -11706,8 +10385,6 @@ }, "node_modules/tsconfig-paths/node_modules/json5": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "license": "MIT", "dependencies": { @@ -11719,8 +10396,6 @@ }, "node_modules/tsconfig-paths/node_modules/strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, "license": "MIT", "engines": { @@ -11729,15 +10404,11 @@ }, "node_modules/tslib": { "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, "license": "0BSD" }, "node_modules/tsutils": { "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, "license": "MIT", "peer": true, @@ -11753,16 +10424,12 @@ }, "node_modules/tsutils/node_modules/tslib": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true, "license": "0BSD", "peer": true }, "node_modules/type-check": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" @@ -11773,8 +10440,6 @@ }, "node_modules/type-detect": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, "license": "MIT", "engines": { @@ -11783,8 +10448,6 @@ }, "node_modules/type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -11795,8 +10458,6 @@ }, "node_modules/typed-array-buffer": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "dev": true, "license": "MIT", "dependencies": { @@ -11810,8 +10471,6 @@ }, "node_modules/typed-array-byte-length": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "dev": true, "license": "MIT", "dependencies": { @@ -11830,8 +10489,6 @@ }, "node_modules/typed-array-byte-offset": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11852,8 +10509,6 @@ }, "node_modules/typed-array-length": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", - "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", "dev": true, "license": "MIT", "dependencies": { @@ -11873,8 +10528,6 @@ }, "node_modules/typed-function": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-1.1.0.tgz", - "integrity": "sha512-TuQzwiT4DDg19beHam3E66oRXhyqlyfgjHB/5fcvsRXbfmWPJfto9B4a0TBdTrQAPGlGmXh/k7iUI+WsObgORA==", "dev": true, "engines": { "node": ">= 6" @@ -11882,8 +10535,6 @@ }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, "license": "MIT", "dependencies": { @@ -11892,8 +10543,6 @@ }, "node_modules/typedarray.prototype.slice": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.5.tgz", - "integrity": "sha512-q7QNVDGTdl702bVFiI5eY4l/HkgCM6at9KhcFbgUAzezHFbOVy4+0O/lCjsABEQwbZPravVfBIiBVGo89yzHFg==", "dev": true, "license": "MIT", "dependencies": { @@ -11915,8 +10564,7 @@ }, "node_modules/typescript": { "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -11928,8 +10576,6 @@ }, "node_modules/unbox-primitive": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", "dev": true, "license": "MIT", "dependencies": { @@ -11947,14 +10593,11 @@ }, "node_modules/underscore": { "version": "1.13.7", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", - "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", + "dev": true, "license": "MIT" }, "node_modules/underscore.string": { "version": "3.3.6", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", - "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", "license": "MIT", "dependencies": { "sprintf-js": "^1.1.1", @@ -11966,14 +10609,11 @@ }, "node_modules/undici-types": { "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", - "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", "license": "MIT", "engines": { "node": ">=4" @@ -11981,8 +10621,6 @@ }, "node_modules/unicode-match-property-ecmascript": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "license": "MIT", "dependencies": { "unicode-canonical-property-names-ecmascript": "^2.0.0", @@ -11994,8 +10632,6 @@ }, "node_modules/unicode-match-property-value-ecmascript": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz", - "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==", "license": "MIT", "engines": { "node": ">=4" @@ -12003,17 +10639,15 @@ }, "node_modules/unicode-property-aliases-ecmascript": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz", - "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==", "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/update-browserslist-db": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", - "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", "funding": [ { "type": "opencollective", @@ -12042,8 +10676,6 @@ }, "node_modules/uri-js": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" @@ -12051,61 +10683,40 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, "node_modules/uuid": { "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } }, - "node_modules/v20": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/v20/-/v20-0.1.0.tgz", - "integrity": "sha512-5mveu8OtYG01yZX4HThyj1kJIJ1YK1jj4tt3MpXo/BAwUlj8EsfEj11Pz7Z5BT1vVOPoCo6EjYzEO3RWrAGfAA==", - "license": "MIT" - }, "node_modules/v8-compile-cache": { "version": "2.4.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", - "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==", "license": "MIT" }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, "license": "MIT" }, "node_modules/valid-url": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", - "integrity": "sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA==", "dev": true }, "node_modules/validate.io-array": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", - "integrity": "sha512-DeOy7CnPEziggrOO5CZhVKJw6S3Yi7e9e65R1Nl/RTN1vTQKnzjfvks0/8kQ40FP/dsjRAOd4hxmJ7uLa6vxkg==", "dev": true, "license": "MIT" }, "node_modules/validate.io-function": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz", - "integrity": "sha512-LlFybRJEriSuBnUhQyG5bwglhh50EpTL2ul23MPIuR1odjO7XaMLFV8vHGwp7AZciFxtYOeiSCT5st+XSPONiQ==", "dev": true }, "node_modules/validate.io-integer": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/validate.io-integer/-/validate.io-integer-1.0.5.tgz", - "integrity": "sha512-22izsYSLojN/P6bppBqhgUDjCkr5RY2jd+N2a3DCAUey8ydvrZ/OkGvFPR7qfOpwR2LC5p4Ngzxz36g5Vgr/hQ==", "dev": true, "dependencies": { "validate.io-number": "^1.0.3" @@ -12113,8 +10724,6 @@ }, "node_modules/validate.io-integer-array": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/validate.io-integer-array/-/validate.io-integer-array-1.0.0.tgz", - "integrity": "sha512-mTrMk/1ytQHtCY0oNO3dztafHYyGU88KL+jRxWuzfOmQb+4qqnWmI+gykvGp8usKZOM0H7keJHEbRaFiYA0VrA==", "dev": true, "dependencies": { "validate.io-array": "^1.0.3", @@ -12123,14 +10732,10 @@ }, "node_modules/validate.io-number": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/validate.io-number/-/validate.io-number-1.0.3.tgz", - "integrity": "sha512-kRAyotcbNaSYoDnXvb4MHg/0a1egJdLwS6oJ38TJY7aw9n93Fl/3blIXdyYvPOp55CNxywooG/3BcrwNrBpcSg==", "dev": true }, "node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -12144,8 +10749,6 @@ }, "node_modules/which-boxed-primitive": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", "dev": true, "license": "MIT", "dependencies": { @@ -12164,8 +10767,6 @@ }, "node_modules/which-builtin-type": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", "dev": true, "license": "MIT", "dependencies": { @@ -12192,8 +10793,6 @@ }, "node_modules/which-collection": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "license": "MIT", "dependencies": { @@ -12211,15 +10810,11 @@ }, "node_modules/which-module": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", "dev": true, "license": "ISC" }, "node_modules/which-typed-array": { "version": "1.1.19", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", - "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", "dev": true, "license": "MIT", "dependencies": { @@ -12240,8 +10835,6 @@ }, "node_modules/word-wrap": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -12249,15 +10842,11 @@ }, "node_modules/workerpool": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", "dev": true, "license": "Apache-2.0" }, "node_modules/wrap-ansi": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", "dependencies": { @@ -12274,15 +10863,11 @@ }, "node_modules/wrap-ansi/node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "license": "MIT" }, "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", "engines": { @@ -12291,8 +10876,6 @@ }, "node_modules/wrap-ansi/node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { @@ -12306,14 +10889,10 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "license": "ISC" }, "node_modules/write-file-atomic": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "license": "ISC", "dependencies": { @@ -12325,8 +10904,6 @@ }, "node_modules/y18n": { "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, "license": "ISC", "engines": { @@ -12335,14 +10912,10 @@ }, "node_modules/yallist": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "license": "ISC" }, "node_modules/yaml": { "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, "license": "ISC", "engines": { @@ -12351,8 +10924,6 @@ }, "node_modules/yargs": { "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "license": "MIT", "dependencies": { @@ -12370,8 +10941,6 @@ }, "node_modules/yargs-parser": { "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, "license": "ISC", "engines": { @@ -12380,8 +10949,6 @@ }, "node_modules/yargs-unparser": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "license": "MIT", "dependencies": { @@ -12396,8 +10963,6 @@ }, "node_modules/yargs-unparser/node_modules/camelcase": { "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "license": "MIT", "engines": { @@ -12409,8 +10974,6 @@ }, "node_modules/yargs-unparser/node_modules/decamelize": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, "license": "MIT", "engines": { @@ -12422,15 +10985,11 @@ }, "node_modules/yargs/node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "license": "MIT" }, "node_modules/yargs/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", "engines": { @@ -12439,8 +10998,6 @@ }, "node_modules/yargs/node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { @@ -12454,8 +11011,7 @@ }, "node_modules/yn": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -12463,8 +11019,6 @@ }, "node_modules/yocto-queue": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index dd8b57d3..d5351951 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,14 @@ "version": "0.0.0", "description": "WOrkflow DEfinitions", "scripts": { - "test": "nyc --reporter=text mocha --recursive --bail --require @babel/register/lib --require tests/js/setup.js tests/js", + "test": "mocha --recursive --bail --require ts-node/register 'tests/js/**/*.ts'", + "test:coverage": "nyc --reporter=text --reporter=html --reporter=lcov mocha --recursive --bail tests/js/**/*.ts", + "test:coverage:html": "nyc --reporter=html mocha --recursive --bail tests/js/**/*.ts", + "test:coverage:check": "nyc --reporter=text --check-coverage mocha --recursive --bail tests/js/**/*.ts", + "test:coverage:view": "node scripts/view-coverage.js", "lint": "eslint src/js tests/js && prettier --write src/js tests/js", "lint:fix": "eslint --fix --cache src/js tests/js && prettier --write src/js tests/js", - "transpile": "tsc --project tsconfig.json", + "transpile": "tsc -p tsconfig-transpile.json", "prettier": "prettier --check src/js tests/js", "prepare": "husky install || exit 0", "generate-mixins": "ts-node scripts/generate-mixins.ts" @@ -17,11 +21,9 @@ }, "main": "dist/js/index.js", "files": [ - "/assets", - "/dist", - "/src/js", - ".babelrc", - "build_workflows.js" + "dist", + "src/js", + ".babelrc" ], "author": "Exabyte Inc.", "bugs": { @@ -32,28 +34,20 @@ "dependencies": { "@exabyte-io/periodic-table.js": "2022.6.8-0", "@types/json-schema": "^7.0.15", - "@types/nunjucks": "^3.2.6", "@types/react-jsonschema-form": "^1.7.13", - "crypto-js": "^4.2.0", - "js-yaml": "^4.1.0", - "lodash": "^4.17.21", - "mixwith": "^0.1.1", "nunjucks": "^3.2.4", - "ts-node": "^10.9.2", - "typescript": "^5.6.6", - "underscore": "^1.13.3", - "underscore.string": "^3.3.4", - "v20": "^0.1.0" + "underscore.string": "^3.3.6" }, "devDependencies": { + "@types/nunjucks": "^3.2.6", "@exabyte-io/eslint-config": "2025.5.13-0", - "@mat3ra/ade": "git+https://github.com/Exabyte-io/ade#6d494337d83e1b22fe272ff74cc1b6842a7c6561", - "@mat3ra/code": "git+https://github.com/Exabyte-io/code.git#cb3fa59e2cc143d744f9019322208d928ff8de88", - "@mat3ra/esse": "git+https://github.com/Exabyte-io/esse#b324747a87f4b3363936974f512e75fe255b52a9", - "@mat3ra/ide": "2025.11.19-0", - "@mat3ra/made": "git+https://github.com/Exabyte-io/made.git#47b3e12a859c45fa72079ed4ddd1675a6a32b4fe", - "@mat3ra/mode": "2025.11.13-0", - "@mat3ra/standata": "2026.1.12-0", + "@mat3ra/ade": "git+https://github.com/Exabyte-io/ade#0099ff1695e122c7c95183413ddf42aed809c7e4", + "@mat3ra/code": "git+https://github.com/Exabyte-io/code.git#c3c9e5eb177fe70b8bc221832b6f9d93104d7e2d", + "@mat3ra/esse": "git+https://github.com/Exabyte-io/esse#fa6f8dcd343e73d9193c945a01a546c1e4acdd9b", + "@mat3ra/made": "git+https://github.com/Exabyte-io/made.git#75f9a788a20decc18570d6db68e6d83068fab37f", + "@mat3ra/mode": "git+https://github.com/Exabyte-io/mode.git#5b0c40080fed20429496e5e60c69c162147c31f6", + "@mat3ra/standata": "git+https://github.com/Exabyte-io/standata.git#03f6861665ec72045ade00c4d5c91b7d5ab97c24", + "@mat3ra/prode": "git+https://github.com/Exabyte-io/prode.git#beac801b06ccd70c09301e240eaa739c208e6bd1", "@mat3ra/tsconfig": "^2024.6.3-0", "@mat3ra/utils": "2025.9.20-0", "chai": "^4.3.4", @@ -74,13 +68,14 @@ "lint-staged": "^12.1.2", "mocha": "^9.1.3", "nyc": "^15.1.0", - "prettier": "^2.7.1" + "prettier": "^2.7.1", + "ts-node": "^10.9.2", + "typescript": "^5.6.6" }, "peerDependencies": { "@mat3ra/ade": "*", "@mat3ra/code": "*", "@mat3ra/esse": "*", - "@mat3ra/ide": "*", "@mat3ra/made": "*", "@mat3ra/mode": "*", "@mat3ra/standata": "*", @@ -94,9 +89,21 @@ "eslint --cache --fix", "prettier --write" ], + "src/js/**/*.ts": [ + "eslint --cache --fix", + "prettier --write" + ], "tests/js/**/*.js": [ "eslint --cache --fix", "prettier --write" + ], + "tests/js/**/*.ts": [ + "eslint --cache --fix", + "prettier --write" + ], + "scripts/**/*.ts": [ + "eslint --cache --fix", + "prettier --write" ] } } diff --git a/scripts/generate-mixins.ts b/scripts/generate-mixins.ts index b62604b4..9e80395e 100644 --- a/scripts/generate-mixins.ts +++ b/scripts/generate-mixins.ts @@ -26,11 +26,11 @@ const OUTPUT_PATHS = { "workflow/unit/mixins/execution": "src/js/generated/ExecutionUnitSchemaMixin.ts", "workflow/unit/mixins/io": "src/js/generated/IOUnitSchemaMixin.ts", "workflow/unit/mixins/map": "src/js/generated/MapUnitSchemaMixin.ts", - "workflow/unit/mixins/processing": "src/js/generated/ProcessingUnitSchemaMixin.ts", "workflow/unit/mixins/reduce": "src/js/generated/ReduceUnitSchemaMixin.ts", "workflow/unit/mixins/subworkflow": "src/js/generated/SubworkflowUnitSchemaMixin.ts", "workflow/unit/input/-inputItem": "src/js/generated/ExecutionUnitInputSchemaMixin.ts", "workflow/subworkflow/mixin": "src/js/generated/SubworkflowSchemaMixin.ts", + "workflow/base": "src/js/generated/WorkflowSchemaMixin.ts", }; function main() { diff --git a/src/js/ExecutionUnitInput.ts b/src/js/ExecutionUnitInput.ts deleted file mode 100644 index 0f6a0d62..00000000 --- a/src/js/ExecutionUnitInput.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { Template } from "@mat3ra/ade"; -import { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; -import type { TemplateSchema } from "@mat3ra/esse/dist/js/types"; -import nunjucks from "nunjucks"; - -import { providers } from "./context/providers"; -import type { ContextItem, ContextProviderConfig } from "./context/providers/base/ContextProvider"; -import type ContextProvider from "./context/providers/base/ContextProvider"; -import type { ExecutionUnitInputSchemaMixin } from "./generated/ExecutionUnitInputSchemaMixin"; - -type Schema = ExecutionUnitInputSchemaMixin; - -type Base = typeof InMemoryEntity & Constructor; - -type ConstructorConfig = Schema | (Omit & { template: Template }); - -export default class ExecutionUnitInput extends (InMemoryEntity as Base) implements Schema { - declare _json: Schema & AnyObject; - - declare toJSON: () => Schema & AnyObject; - - declare toJSONQuick: () => Schema & AnyObject; - - static get jsonSchema() { - return JSONSchemasInterface.getSchemaById("workflow/unit/input/-inputItem"); - } - - contextProvidersInstances: ContextProvider[] = []; - - readonly templateInstance: Template; - - static createFromTemplate(template: Template | TemplateSchema) { - return new ExecutionUnitInput({ - template, - rendered: template.content, - isManuallyChanged: false, - }); - } - - constructor(config: ConstructorConfig) { - const { template } = config; - const templateInstance = template instanceof Template ? template : new Template(template); - - super({ ...config, template: templateInstance.toJSON() }); - - this.templateInstance = templateInstance; - } - - setContext(context: ContextItem[]) { - this.contextProvidersInstances = this.template.contextProviders.map(({ name }) => { - if (!providers) { - throw new Error("Providers config not set"); - } - - const ContextProvider = providers[name as keyof typeof providers]; - const contextItem = context.find((c) => c.name === name); - - if (!contextItem) { - throw new Error(`Context item for provider ${name} not found`); - } - - return new ContextProvider(contextItem); - }); - - return this; - } - - render() { - if (this.isManuallyChanged) { - return this; - } - - const fullContext = this.getFullContext(); - const rendered = nunjucks.compile(this.template.content).render(fullContext); - - this.rendered = rendered || this.template.content; - - return this; - } - - getFullContext() { - return this.contextProvidersInstances.map((contextProvider) => { - return contextProvider.getContextItem(); - }); - } -} diff --git a/src/js/Subworkflow.ts b/src/js/Subworkflow.ts new file mode 100644 index 00000000..10a76323 --- /dev/null +++ b/src/js/Subworkflow.ts @@ -0,0 +1,523 @@ +import { Application } from "@mat3ra/ade"; +import { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; +import { + type DefaultableInMemoryEntityConstructor, + defaultableEntityMixin, +} from "@mat3ra/code/dist/js/entity/mixins/DefaultableMixin"; +import { + type NamedInMemoryEntityConstructor, + namedEntityMixin, +} from "@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin"; +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; +import type { JobSchema, SubworkflowSchema } from "@mat3ra/esse/dist/js/types"; +import type { Material } from "@mat3ra/made"; +import { Model, ModelFactory, PseudopotentialMethod } from "@mat3ra/mode"; +import type { MetaPropertyHolder } from "@mat3ra/prode"; +import { setUnitLinks } from "@mat3ra/standata"; +import { Utils } from "@mat3ra/utils"; + +import type { MaterialExternalContext } from "./context/mixins/MaterialContextMixin"; +import type { MaterialsExternalContext } from "./context/mixins/MaterialsContextMixin"; +import type { MaterialsSetExternalContext } from "./context/mixins/MaterialsSetContextMixin"; +import type { AssignmentContext, ExternalContext } from "./context/providers"; +import type { + JobExternalContext, + WorkflowExternalContext, +} from "./context/providers/by_application/espresso/QEPWXInputDataManager"; +import { createConvergenceParameter } from "./convergence/factory"; +import { UnitTag, UnitType } from "./enums"; +import { + type SubworkflowSchemaMixin, + subworkflowSchemaMixin, +} from "./generated/SubworkflowSchemaMixin"; +import { AssignmentUnit, ConditionUnit, SubworkflowUnit, UnitFactory } from "./units"; +import type { AnySubworkflowUnit } from "./units/factory"; + +type ConvergenceConfig = { + parameter: "N_k" | "N_k_nonuniform"; + parameterInitial: number | [number, number, number]; + parameterIncrement: number; + result: string; + resultInitial: number; + condition: string; + operator: string; + tolerance: number; + maxOccurrences: number; + externalContext: SubworkflowExternalContext; +}; + +type Base = typeof InMemoryEntity & + DefaultableInMemoryEntityConstructor & + NamedInMemoryEntityConstructor & + Constructor; + +type SubworkflowExternalContext = MaterialExternalContext & + MaterialsExternalContext & + MaterialsSetExternalContext & + WorkflowExternalContext & + JobExternalContext; + +export default class Subworkflow extends (InMemoryEntity as Base) implements SubworkflowSchema { + private ModelFactory: typeof ModelFactory; + + private applicationInstance: Application; + + unitsInstances!: AnySubworkflowUnit[]; + + modelInstance: Model; + + properties: string[] = []; + + repetition = 0; + + declare static createDefault: () => Subworkflow; + + declare toJSON: () => SubworkflowSchema & AnyObject; + + constructor(config: SubworkflowSchema, _ModelFactory = ModelFactory) { + super(config); + this.ModelFactory = _ModelFactory; + + this.applicationInstance = new Application(this.application); + this.modelInstance = this.ModelFactory.create({ + ...this.model, + application: this.application, + }); + this.setUnits(this.units.map((cfg) => UnitFactory.createInSubworkflow(cfg))); + } + + static get defaultConfig() { + const defaultName = "New Subworkflow"; + return { + _id: Utils.uuid.getUUID(), + name: defaultName, + application: Application.defaultConfig, + model: Model.defaultConfig, + properties: [], + units: [], + }; + } + + setRepetition(repetition: number) { + this.repetition = repetition; + this.unitsInstances.forEach((u) => u.setRepetition(repetition)); + } + + getAsUnit() { + return new SubworkflowUnit({ + type: UnitType.subworkflow, + _id: this.id, + name: this.name, + preProcessors: [], + postProcessors: [], + monitors: [], + results: [], + flowchartId: "", + }); + } + + setApplication(application: Application) { + // TODO: adjust the logic above to take into account whether units need re-rendering after version change etc. + // reset units if application name changes + const previousApplicationName = this.application.name; + this.applicationInstance = application; + + if (previousApplicationName !== application.name) { + // TODO: figure out how to set a default unit per new application instead of removing all + this.setUnits([]); + } else { + // propagate new application version to all units + this.unitsInstances + .filter((unit) => unit.type === UnitType.execution) + .forEach((unit) => { + unit.setApplication({ application }); + }); + } + + this.application = application.toJSON(); + + // set model to the default one for the application selected + this.setModel( + this.ModelFactory.createFromApplication({ + application: this.application, + }), + ); + } + + setModel(model: Model) { + this.modelInstance = model; + this.model = model.toJSON(); + } + + private buildExternalContext(context: SubworkflowExternalContext): ExternalContext { + const subworkflowContext = this.units + .filter((u) => u.type === UnitType.assignment) + .reduce((acc, u) => { + return { + ...acc, + [u.operand]: u.value, + }; + }, {} as AssignmentContext); + + return { + ...context, + application: this.applicationInstance.toJSON(), + methodData: this.model.method.data, + subworkflowContext, + }; + } + + render(context: SubworkflowExternalContext) { + const ctx = this.buildExternalContext(context); + + this.unitsInstances.forEach((u) => { + if (u.type === UnitType.execution) { + u.render(ctx); + } + }); + } + + /** + * TODO: reuse workflow function instead + */ + private addUnit(unit: AnySubworkflowUnit, index = -1) { + const { unitsInstances } = this; + + if (unitsInstances.length === 0) { + this.setUnits([unit]); + } else { + if (index >= 0) { + unitsInstances.splice(index, 0, unit); + } else { + unitsInstances.push(unit); + } + this.setUnits(unitsInstances); + } + } + + private setUnits(units: AnySubworkflowUnit[]) { + // TODO: remove the setNextLinks and setUnitsHead and handle the logic via flowchart designer + this.unitsInstances = setUnitLinks(units); + this.units = units.map((x) => x.toJSON()); + this.properties = units.map((x) => x.resultNames).flat(); + } + + removeUnit(flowchartId: string) { + const previousUnit = this.unitsInstances.find((x) => x.next === flowchartId); + + if (previousUnit) { + previousUnit.unsetProp("next"); + } + + this.setUnits(this.unitsInstances.filter((x) => x.flowchartId !== flowchartId)); + } + + getUnit(flowchartId: string) { + return this.unitsInstances.find((x) => x.flowchartId === flowchartId); + } + + unitIndex(flowchartId: string) { + return this.units.findIndex((unit) => { + return unit.flowchartId === flowchartId; + }); + } + + replaceUnit(index: number, unit: AnySubworkflowUnit) { + this.unitsInstances[index] = unit; + this.setUnits(this.unitsInstances); + } + + setIsDraft(bool: boolean) { + this.isDraft = bool; + } + + get methodData() { + return this.modelInstance.Method.data; + } + + /** + * @summary Calculates hash of the subworkflow. Meaningful fields are units, app and model. + * units must be sorted topologically before hashing (already sorted). + */ + calculateHash() { + const config = this.toJSON(); + const meaningfulFields = { + application: Utils.specific.removeTimestampableKeysFromConfig(config.application), + model: this.calculateModelHash(), + units: this.unitsInstances.map((u) => u.calculateHash()).join(), + }; + return Utils.hash.calculateHashFromObject(meaningfulFields); + } + + private calculateModelHash() { + const { model } = this.toJSON(); + + // ignore empty data object + if (this.modelInstance.Method.omitInHashCalculation) { + delete model.method.data; + } + + return Utils.hash.calculateHashFromObject(model); + } + + findUnitById(id: string) { + // TODO: come back and refactor after converting flowchartId to id + return this.units.find((u) => u.flowchartId === id); + } + + findUnitKeyById(id: string) { + const index = this.units.findIndex((u) => u.flowchartId === id); + return `units.${index}`; + } + + private findUnitWithTag(tag: UnitTag) { + return this.units + .filter((unit) => unit.type === UnitType.assignment) + .find((unit) => unit.tags?.includes(tag)); + } + + get hasConvergence() { + return !!this.convergenceParam && !!this.convergenceResult; + } + + get convergenceParam() { + return this.findUnitWithTag(UnitTag.hasConvergenceParam)?.operand; + } + + get convergenceResult() { + return this.findUnitWithTag(UnitTag.hasConvergenceResult)?.operand; + } + + convergenceSeries(scopeTrack: JobSchema["scopeTrack"]) { + if (!this.hasConvergence || !scopeTrack?.length) { + return []; + } + + let prevResult: unknown; + + return scopeTrack + .map((scopeItem, i) => { + return { + x: i, + // TODO: fix types + // @ts-ignore + param: scopeItem.scope?.global[this.convergenceParam], + // @ts-ignore + y: scopeItem.scope?.global[this.convergenceResult], + }; + }) + .filter(({ y }) => { + const changed = prevResult !== y; + prevResult = y; + return changed; + }) + .map((item, i) => { + return { + x: i + 1, + param: item.param, + y: item.y, + }; + }); + } + + updateMethodData(materials: Material[], metaProperties: MetaPropertyHolder[]) { + const method = this.modelInstance.Method; + const { model } = this; + const uniqueElements = [...new Set(materials.map((m) => m.uniqueElements).flat())]; + const appName = this.application.name; + + const methodDataItems = metaProperties + .filter((metaProperty) => { + return ( + // @ts-ignore TODO: fix types + uniqueElements.includes(metaProperty.data.element) && + metaProperty.data.apps.includes(appName) + ); + }) + .map((metaProperty) => metaProperty.property); + + if (!(method instanceof PseudopotentialMethod) || !methodDataItems.length) { + return; + } + + const filters = { + appName, + exchangeCorrelation: { + approximation: model.subtype, + functional: "functional" in model ? model.functional : undefined, + }, + }; + + // We cycle materials in reverse order below b/c of render(), + // since the default state index is zero, the last material thus corresponds to index 0. + // Without reversing, context providers in workflow consider material as changed when any update to the workflow + // is triggered. + // TODO: figure out how to simplify or remove the need for the above + (materials || []) + .concat() + .reverse() + .forEach((material) => { + // updates methodData & overwrites method in subworkflow.model + method.updateMethodDataByApplicationAndMaterials(methodDataItems, { + elements: material.uniqueElements, + ...filters, + }); + + this.modelInstance.setMethod(method); + }); + + // TODO: Try if/else instead of running both + if (materials.length > 1) { + method.updateMethodDataByApplicationAndMaterials(methodDataItems, { + elements: uniqueElements, + ...filters, + }); + + this.modelInstance.setMethod(method); + } + } + + addConvergence({ + parameter, + parameterInitial, + parameterIncrement, + result, + resultInitial, + condition, + operator, + tolerance, + maxOccurrences, + externalContext, + }: ConvergenceConfig) { + // Find unit to converge: should contain passed result in its results list + // TODO: make user to select unit for convergence explicitly + const unitForConvergence = this.unitsInstances + .filter((x) => x.type === UnitType.execution) + .find((x) => { + return x.resultNames.find((name) => name === result); + }); + + if (!unitForConvergence) { + throw new Error( + `Subworkflow does not contain unit with '${result}' as extracted property.`, + ); + } + + // initialize parameter + const convergenceParameter = createConvergenceParameter({ + name: parameter, + initialValue: parameterInitial, + increment: parameterIncrement, + }); + + const context = this.buildExternalContext(externalContext); + + unitForConvergence.addConvergenceContext(convergenceParameter, context); + + const prevResult = "prev_result"; + const iteration = "iteration"; + + // Assignment with result's initial value + const prevResultInit = new AssignmentUnit({ + name: "init result", + head: true, + operand: prevResult, + value: resultInitial, + }); + + // Assignment with initial value of convergence parameter + const paramInit = new AssignmentUnit({ + name: "init parameter", + operand: convergenceParameter.name, + value: convergenceParameter.initialValue, + tags: [UnitTag.hasConvergenceParam], + }); + + // Assignment with initial value of iteration counter + const iterInit = new AssignmentUnit({ + name: "init counter", + operand: iteration, + value: 1, + }); + + // Assignment for storing iteration result: extracts 'result' from convergence unit scope + const storePrevResult = new AssignmentUnit({ + name: "store result", + input: [ + { + scope: unitForConvergence.flowchartId, + name: result, + }, + ], + operand: prevResult, + value: result, + }); + + // Assignment for convergence param increase + const nextStep = new AssignmentUnit({ + name: "update parameter", + input: convergenceParameter.useVariablesFromUnitContext(unitForConvergence.flowchartId), + operand: convergenceParameter.name, + value: convergenceParameter.increment, + next: unitForConvergence.flowchartId, + }); + + // Final step of convergence + const exit = new AssignmentUnit({ + name: "exit", + input: [], + operand: convergenceParameter.name, + value: convergenceParameter.finalValue, + }); + + // Final step of convergence + const storeResult = new AssignmentUnit({ + name: "update result", + input: [ + { + scope: unitForConvergence.flowchartId, + name: result, + }, + ], + operand: result, + value: result, + tags: [UnitTag.hasConvergenceResult], + }); + + // Assign next iteration value + const nextIter = new AssignmentUnit({ + name: "update counter", + input: [], + operand: iteration, + value: `${iteration} + 1`, + }); + + // Convergence condition unit + const conditionUnit = new ConditionUnit({ + name: "check convergence", + statement: `${condition} ${operator} ${tolerance}`, + then: exit.flowchartId, + else: storePrevResult.flowchartId, + maxOccurrences, + next: storePrevResult.flowchartId, + }); + + this.addUnit(paramInit, 0); + this.addUnit(prevResultInit, 1); + this.addUnit(iterInit, 2); + this.addUnit(storeResult); + this.addUnit(conditionUnit); + this.addUnit(storePrevResult); + this.addUnit(nextIter); + this.addUnit(nextStep); + this.addUnit(exit); + + // `addUnit` adjusts the `next` field, hence the below. + nextStep.next = unitForConvergence.flowchartId; + } +} + +namedEntityMixin(Subworkflow.prototype); +defaultableEntityMixin(Subworkflow); +subworkflowSchemaMixin(Subworkflow.prototype); diff --git a/src/js/Workflow.ts b/src/js/Workflow.ts new file mode 100644 index 00000000..54056f24 --- /dev/null +++ b/src/js/Workflow.ts @@ -0,0 +1,343 @@ +import { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; +import { + type DefaultableInMemoryEntityConstructor, + defaultableEntityMixin, +} from "@mat3ra/code/dist/js/entity/mixins/DefaultableMixin"; +import { + type NamedInMemoryEntityConstructor, + namedEntityMixin, +} from "@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin"; +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; +import type { + ApplicationSchema, + SubworkflowSchema, + WorkflowSchema, +} from "@mat3ra/esse/dist/js/types"; +import type { Material } from "@mat3ra/made"; +import type { MetaPropertyHolder } from "@mat3ra/prode"; +import { setUnitLinks, SubworkflowStandata } from "@mat3ra/standata"; +import { Utils } from "@mat3ra/utils"; + +import type { MaterialExternalContext } from "./context/mixins/MaterialContextMixin"; +import type { MaterialsExternalContext } from "./context/mixins/MaterialsContextMixin"; +import type { MaterialsSetExternalContext } from "./context/mixins/MaterialsSetContextMixin"; +import type { JobExternalContext } from "./context/providers/by_application/espresso/QEPWXInputDataManager"; +import { UnitType } from "./enums"; +import { type WorkflowSchemaMixin, workflowSchemaMixin } from "./generated/WorkflowSchemaMixin"; +import Subworkflow from "./Subworkflow"; +import { MapUnit } from "./units"; +import { type AnyWorkflowUnit, UnitFactory } from "./units/factory"; +import { + getDefaultDescription, + getHumanReadableProperties, + getHumanReadableUsedModels, + getProperties, + getSystemName, + getUsedApplications, + getUsedModels, +} from "./utils/workflow"; +import defaultWorkflowConfig from "./workflows/default"; + +type Base = typeof InMemoryEntity & + DefaultableInMemoryEntityConstructor & + NamedInMemoryEntityConstructor & + Constructor; + +/** Context passed to Workflow.render() before workflow reference is injected for subworkflows. */ +export type WorkflowRenderContext = MaterialExternalContext & + MaterialsExternalContext & + MaterialsSetExternalContext & + JobExternalContext; + +export class Workflow extends (InMemoryEntity as Base) implements WorkflowSchema { + static readonly defaultConfig = defaultWorkflowConfig; + + declare _json: WorkflowSchema & AnyObject; + + static get jsonSchema() { + return JSONSchemasInterface.getSchemaById("workflow"); + } + + subworkflowInstances: Subworkflow[]; + + private unitInstances!: AnyWorkflowUnit[]; + + private workflowInstances: Workflow[]; + + repetition = 0; + + totalRepetitions = 1; + + setTotalRepetitions(totalRepetition: number) { + this.totalRepetitions = totalRepetition; + } + + setRepetition(repetition: number) { + this.repetition = repetition; + this.unitInstances.forEach((u) => u.setRepetition(repetition)); + this.subworkflowInstances.forEach((sw) => sw.setRepetition(repetition)); + this.workflowInstances.forEach((wf) => wf.setRepetition(repetition)); + } + + static fromSubworkflow(subworkflow: Subworkflow) { + const config = { + name: subworkflow.name, + subworkflows: [subworkflow.toJSON()], + units: [subworkflow.getAsUnit().toJSON()], + properties: subworkflow.properties, + applicationName: subworkflow.application.name, + workflows: [] as WorkflowSchema[], + }; + return new this(config); + } + + constructor(config: WorkflowSchema & { applicationName?: string }) { + super({ + ...config, + _id: config._id || Utils.uuid.getUUID(), + }); + + this.subworkflowInstances = this.subworkflows.map((x) => new Subworkflow(x)); + this.workflowInstances = this.workflows?.map((x) => new Workflow(x)) || []; + this.setUnits(this.units.map((unit) => UnitFactory.createInWorkflow(unit))); + } + + get workflows() { + return this.requiredProp("workflows"); + } + + set workflows(value: WorkflowSchema[]) { + this.setProp("workflows", value); + } + + addSubworkflow(subworkflow: Subworkflow, head = false, index = -1) { + const subworkflowUnit = subworkflow.getAsUnit(); + + if (head) { + this.subworkflowInstances.unshift(subworkflow); + this.addUnit(subworkflowUnit, head, index); + } else { + this.subworkflowInstances.push(subworkflow); + this.addUnit(subworkflowUnit, head, index); + } + } + + updateMethodData(materials: Material[], metaProperties: MetaPropertyHolder[]) { + this.subworkflowInstances.forEach((sw) => { + sw.updateMethodData(materials, metaProperties); + }); + } + + removeSubworkflow(id: string) { + const subworkflowUnit = this.unitInstances.find((u) => u.id === id); + + if (subworkflowUnit) { + this.removeUnit(subworkflowUnit.flowchartId); + } + } + + setUnits(arr: AnyWorkflowUnit[]) { + this.unitInstances = setUnitLinks(arr); + } + + render(context: WorkflowRenderContext) { + this.subworkflowInstances.forEach((sw) => { + sw.render({ + ...context, + workflow: this, + }); + }); + } + + get usedApplications(): ApplicationSchema[] { + return getUsedApplications(this); + } + + // return application names + get usedApplicationNames() { + return this.usedApplications.map((a) => a.name); + } + + get usedApplicationVersions() { + return this.usedApplications.map((a) => a.version); + } + + get usedApplicationNamesWithVersions() { + return this.usedApplications.map((a) => `${a.name} ${a.version}`); + } + + getUsedModels() { + return getUsedModels(this); + } + + getHumanReadableUsedModels() { + return getHumanReadableUsedModels(this); + } + + toJSON(): WorkflowSchema & AnyObject { + return { + ...super.toJSON(), + name: this.name, + properties: getProperties(this), + units: this.unitInstances.map((x) => x.toJSON()), + subworkflows: this.subworkflowInstances.map((x) => x.toJSON()), + workflows: this.workflowInstances.map((x) => x.toJSON()), + }; + } + + getHumanReadableProperties() { + return getHumanReadableProperties(this); + } + + getProperties() { + return getProperties(this); + } + + getSystemName() { + return getSystemName(this); + } + + getDefaultDescription() { + return getDefaultDescription(this); + } + + private addUnit(unit: AnyWorkflowUnit, head = false, index = -1) { + const [...unitInstances] = this.unitInstances; + + if (unitInstances.length === 0) { + this.setUnits([unit]); + } else { + if (head) { + unitInstances.unshift(unit); + } else if (index >= 0) { + unitInstances.splice(index, 0, unit); + } else { + unitInstances.push(unit); + } + this.setUnits(unitInstances); + } + } + + private removeUnit(flowchartId: string) { + if (this.units.length < 2) { + return; + } + + const unit = this.unitInstances.find((x) => x.flowchartId === flowchartId); + if (!unit) { + return; + } + + const previousUnit = this.unitInstances.find((x) => x.next === unit.flowchartId); + if (previousUnit) { + delete previousUnit.next; + } + + this.subworkflowInstances = this.subworkflowInstances.filter((x) => x.id !== unit.id); + + this.setUnits(this.unitInstances.filter((x) => x.flowchartId !== flowchartId)); + } + + /* + * @param type {String|Object} Unit type, map or subworkflow + * @param head {Boolean} + * @param index {Number} Index at which the unit will be added. -1 by default (ignored). + */ + addUnitType(type: UnitType, head = false, index = -1) { + switch (type) { + case UnitType.map: { + const mapWorkflowConfig = { + ...defaultWorkflowConfig, + _id: Utils.uuid.getUUID(), + }; + const mapUnit = new MapUnit({ + workflowId: mapWorkflowConfig._id, + }); + + this.workflows = [...(this.workflows || []), mapWorkflowConfig]; + this.workflowInstances = this.workflows.map((x) => new Workflow(x)); + + this.addUnit(mapUnit, head, index); + + break; + } + case UnitType.subworkflow: + this.addSubworkflow(Subworkflow.createDefault(), head, index); + break; + default: + console.log(`unit_type=${type} unrecognized, skipping.`); + } + } + + addMapUnit(mapUnit: MapUnit, mapWorkflow: Workflow) { + const mapWorkflowConfig = { + _id: Utils.uuid.getUUID(), + ...mapWorkflow.toJSON(), + }; + + mapUnit.setWorkflowId(mapWorkflowConfig._id); + this.addUnit(mapUnit); + + this.workflows = [...(this.workflows || []), mapWorkflowConfig]; + this.workflowInstances = this.workflows.map((x) => new Workflow(x)); + } + + get allSubworkflows() { + const subworkflowsList: Subworkflow[] = []; + this.subworkflowInstances.forEach((sw) => subworkflowsList.push(sw)); + this.workflowInstances.forEach((workflow) => { + return Array.prototype.push.apply(subworkflowsList, workflow.allSubworkflows); + }); + return subworkflowsList; + } + + /** + * @summary Calculates hash of the workflow. Meaningful fields are units and subworkflows. + * units and subworkflows must be sorted topologically before hashing (already sorted). + */ + calculateHash(): string { + const meaningfulFields = { + units: this.unitInstances.map((u) => u.calculateHash()).join(), + subworkflows: this.subworkflowInstances.map((sw) => sw.calculateHash()).join(), + workflows: this.workflowInstances.map((w) => w.calculateHash()).join(), + }; + return Utils.hash.calculateHashFromObject(meaningfulFields); + } + + get hasRelaxation() { + return Boolean(this.getRelaxationSubworkflow()); + } + + toggleRelaxation() { + const relaxSubworkflow = this.getRelaxationSubworkflow(); + if (relaxSubworkflow?._id) { + this.removeSubworkflow(relaxSubworkflow._id); + } else { + const vcRelax = this.getStandataRelaxationSubworkflow(); + if (vcRelax) { + this.addSubworkflow(new Subworkflow(vcRelax), true); + } + } + } + + private getStandataRelaxationSubworkflow() { + // TODO: fix standata type + return new SubworkflowStandata().getRelaxationSubworkflowByApplication( + this.subworkflowInstances[0].application.name, + ) as unknown as SubworkflowSchema; + } + + private getRelaxationSubworkflow() { + const standataSubworkflow = this.getStandataRelaxationSubworkflow(); + + return this.subworkflows.find((sw) => { + return standataSubworkflow && standataSubworkflow.systemName === sw.systemName; + }); + } +} + +namedEntityMixin(Workflow.prototype); +defaultableEntityMixin(Workflow); +workflowSchemaMixin(Workflow.prototype); diff --git a/src/js/context/mixins/ApplicationContextMixin.ts b/src/js/context/mixins/ApplicationContextMixin.ts index 45d7475a..a9eb6e01 100644 --- a/src/js/context/mixins/ApplicationContextMixin.ts +++ b/src/js/context/mixins/ApplicationContextMixin.ts @@ -1,25 +1,19 @@ -import type { Application } from "@mat3ra/ade"; +import type { ApplicationSchema } from "@mat3ra/esse/dist/js/types"; import type ContextProvider from "../providers/base/ContextProvider"; -import { globalSettings } from "../providers/settings"; export type ApplicationContextMixin = { - readonly application: Application; + application: ApplicationSchema; initApplicationContextMixin(externalContext: ApplicationExternalContext): void; }; -type PrivateProperties = { - application?: Application; -}; - -export type ApplicationExternalContext = { application?: Application }; +export type ApplicationExternalContext = { application: ApplicationSchema }; -export function applicationContextMixin(item: ContextProvider) { +export default function applicationContextMixin(item: ContextProvider) { // @ts-expect-error - const properties: Provider & ApplicationContextMixin & PrivateProperties = { + const properties: ContextProvider & ApplicationContextMixin = { initApplicationContextMixin(externalContext: ApplicationExternalContext) { - this.application = - externalContext.application ?? globalSettings.Application.createDefault(); + this.application = externalContext.application; }, }; diff --git a/src/js/context/mixins/ContextAndRenderFieldsMixin.ts b/src/js/context/mixins/ContextAndRenderFieldsMixin.ts deleted file mode 100644 index ea4c7653..00000000 --- a/src/js/context/mixins/ContextAndRenderFieldsMixin.ts +++ /dev/null @@ -1,53 +0,0 @@ -import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; -import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; - -export type Context = AnyObject; - -export type ContextMixin = { - context: Context; // persistent context - renderingContext: Context; - getRenderingContext(): Context; - updateRenderingContext(ctx: Context): void; - getPersistentContext(): Context; - updatePersistentContext(ctx: Context): void; - getCombinedContext(): Context; -}; - -type AbstractBase = { - render(ctx: Context): void; -}; - -export function contextMixin( - item: T, -): asserts item is T & ContextMixin { - // @ts-expect-error - const properties: InMemoryEntity & ContextMixin = { - get context() { - return this.requiredProp("context"); - }, - set context(ctx: Context) { - this.setProp("context", ctx); - }, - renderingContext: {}, - updateRenderingContext(ctx: Context) { - this.context = { ...this.renderingContext, ...ctx }; - }, - getRenderingContext() { - return this.renderingContext; - }, - getPersistentContext() { - return this.context; - }, - updatePersistentContext(ctx: Context) { - this.context = { ...ctx }; - }, - getCombinedContext() { - return { - ...this.getPersistentContext(), - ...this.getRenderingContext(), - }; - }, - }; - - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/src/js/context/mixins/ImportantSettingsProviderMixin.ts b/src/js/context/mixins/ImportantSettingsProviderMixin.ts deleted file mode 100644 index 21f1d989..00000000 --- a/src/js/context/mixins/ImportantSettingsProviderMixin.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; -import { deepClone } from "@mat3ra/code/dist/js/utils/clone"; -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; - -export interface ContextProvider { - domain?: string; -} - -export type ImportantSettingsProvider = { - important: object; - setImportant(key: string, value: unknown): void; - importantSettingsProviders: ContextProvider[]; - isImportantEdited: boolean | undefined; -}; - -type AbstractBase = { - contextProviders: ContextProvider[]; -}; - -export type ImportantSettingsProviderInMemoryEntityConstructor = - Constructor; - -export function importantSettingsProviderMixin( - item: T, -): asserts item is T & ImportantSettingsProvider { - // @ts-expect-error - const properties: InMemoryEntity & AbstractBase & ImportantSettingsProvider = { - get important() { - return deepClone(this._json.important || {}); - }, - - setImportant(key: string, value: unknown) { - this.setProp("important", { [key]: value }); - }, - - get importantSettingsProviders() { - return this.contextProviders.filter((p) => p.domain === "important"); - }, - - get isImportantEdited() { - return this.prop("important.isEdited"); - }, - - set isImportantEdited(bool) { - this.setProp("important", Object.assign(this.important, { isEdited: bool })); - }, - }; - - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/src/js/context/mixins/JobContextMixin.ts b/src/js/context/mixins/JobContextMixin.ts deleted file mode 100644 index 49798e4c..00000000 --- a/src/js/context/mixins/JobContextMixin.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { JobSchema } from "@mat3ra/esse/dist/js/types"; - -import type ContextProvider from "../providers/base/ContextProvider"; - -export type JobContextMixin = { - isEdited: boolean; - job: JobSchema; - initJobContextMixin(externalContext: JobExternalContext): void; -}; - -export type JobExternalContext = { - job: JobSchema; -}; - -export default function jobContextMixin(item: ContextProvider) { - // @ts-expect-error - const properties: ContextProvider & JobContextMixin = { - isEdited: false, - - initJobContextMixin(externalContext: JobExternalContext) { - this.job = externalContext.job; - this.isEdited = false; // we always get the `defaultData` (recalculated from scratch, not persistent) - }, - }; - - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/src/js/context/mixins/MaterialContextMixin.ts b/src/js/context/mixins/MaterialContextMixin.ts index 6346e1db..d0930bd6 100644 --- a/src/js/context/mixins/MaterialContextMixin.ts +++ b/src/js/context/mixins/MaterialContextMixin.ts @@ -9,7 +9,7 @@ export type MaterialContextMixin = { readonly isMaterialCreatedDefault: boolean; readonly isMaterialUpdated: boolean; material: OrderedMaterial; - extraData?: { materialHash: string }; + extraData: { materialHash: string }; initMaterialContextMixin(externalContext: MaterialExternalContext): void; updateMaterialHash(): void; }; diff --git a/src/js/context/mixins/MaterialsSetContextMixin.ts b/src/js/context/mixins/MaterialsSetContextMixin.ts index 11113801..08b78196 100644 --- a/src/js/context/mixins/MaterialsSetContextMixin.ts +++ b/src/js/context/mixins/MaterialsSetContextMixin.ts @@ -1,32 +1,39 @@ import { compareEntitiesInOrderedSetForSorting } from "@mat3ra/code/dist/js/entity/set/ordered/utils"; +import type ContextProvider from "../providers/base/ContextProvider"; import type { OrderedMaterial } from "./MaterialContextMixin"; type MaterialsSet = { _id: string; }; -export type MaterialsSetContextMixin = { - materialsSet: MaterialsSet; - initMaterialsSetContextMixin(externalContext: MaterialsSetContextProvider): void; - sortMaterialsByIndexInSet(materials?: OrderedMaterial[]): OrderedMaterial[]; +export type MaterialsSetExternalContext = { + materialsSet?: MaterialsSet; }; -type MaterialsSetContextProvider = { - materialsSet: MaterialsSet; +export type MaterialsSetContextMixin = { + materialsSet?: MaterialsSet; + initMaterialsSetContextMixin(externalContext: MaterialsSetExternalContext): void; + sortMaterialsByIndexInSet(materials?: OrderedMaterial[]): OrderedMaterial[]; }; -export default function materialsSetContextMixin(item: MaterialsSetContextProvider) { +export default function materialsSetContextMixin(item: ContextProvider) { // @ts-expect-error - const properties: MaterialsSetContextProvider & MaterialsSetContextMixin = { - initMaterialsSetContextMixin(externalContext: MaterialsSetContextProvider) { + const properties: ContextProvider & MaterialsSetContextMixin = { + initMaterialsSetContextMixin(externalContext: MaterialsSetExternalContext) { this.materialsSet = externalContext.materialsSet; }, sortMaterialsByIndexInSet(materials: OrderedMaterial[] = []) { + const { materialsSet } = this; + + if (!materialsSet) { + return materials; + } + // DO NOT SORT IN PLACE AS IT CHANGES THE ORDER IN `this.materials` AND HAS SIDE EFFECTS (MaterialViewer). - return materials.concat().sort((a, b) => { - return compareEntitiesInOrderedSetForSorting(a, b, this.materialsSet._id, false); + return [...materials].sort((a, b) => { + return compareEntitiesInOrderedSetForSorting(a, b, materialsSet._id, false); }); }, }; diff --git a/src/js/context/mixins/MethodDataContextMixin.ts b/src/js/context/mixins/MethodDataContextMixin.ts deleted file mode 100644 index c9d78a44..00000000 --- a/src/js/context/mixins/MethodDataContextMixin.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { BaseMethod } from "@mat3ra/esse/dist/js/types"; -import type { AtomicElementValue } from "@mat3ra/made/dist/js/basis/elements"; - -import type ContextProvider from "../providers/base/ContextProvider"; - -// TODO: create a task to define correct type for MethodData -type MethodData = BaseMethod["data"] & { - pseudo?: { element: AtomicElementValue; filename?: string; path?: string }[]; -}; - -export type MethodDataContextMixin = { - methodData: MethodData; - isEdited: boolean; - initMethodDataContextMixin(externalContext: MethodDataExternalContext): void; -}; - -export type MethodDataExternalContext = { - methodData?: MethodData; - isEdited?: boolean; -}; - -export default function methodDataContextMixin(item: ContextProvider) { - // @ts-expect-error - const properties: ContextProvider & MethodDataContextMixin = { - methodData: {}, - - isEdited: false, - - initMethodDataContextMixin(externalContext: MethodDataExternalContext) { - this.methodData = externalContext.methodData || {}; - this.isEdited = Boolean(externalContext?.isEdited); - }, - }; - - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/src/js/context/mixins/WorkflowContextMixin.ts b/src/js/context/mixins/WorkflowContextMixin.ts deleted file mode 100644 index a583d131..00000000 --- a/src/js/context/mixins/WorkflowContextMixin.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { WorkflowSchema } from "@mat3ra/esse/dist/js/types"; - -import type ContextProvider from "../providers/base/ContextProvider"; - -type Workflow = WorkflowSchema & { - hasRelaxation?: boolean; -}; - -export type WorkflowContextMixin = { - isEdited: boolean; - workflow: Workflow; - initWorkflowContextMixin(externalContext: WorkflowExternalContext): void; -}; - -export type WorkflowExternalContext = { - workflow: Workflow; -}; - -export default function workflowContextMixin(item: ContextProvider) { - // @ts-expect-error - const properties: ContextProvider & WorkflowContextMixin = { - isEdited: false, - - initWorkflowContextMixin(externalContext: WorkflowExternalContext) { - this.workflow = externalContext.workflow; - this.isEdited = false; - }, - }; - - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/src/js/context/providers.ts b/src/js/context/providers.ts deleted file mode 100644 index ec304edd..00000000 --- a/src/js/context/providers.ts +++ /dev/null @@ -1,183 +0,0 @@ -// import type { ContextProviderNameEnum as ProviderName } from "@mat3ra/esse/dist/js/types"; - -// import type ContextProvider from "./providers/base/ContextProvider"; -// import type { ContextItem } from "./providers/base/ContextProvider"; -import BoundaryConditionsFormDataProvider from "./providers/BoundaryConditionsFormDataProvider"; -import QENEBContextProvider from "./providers/by_application/espresso/QENEBContextProvider"; -import QEPWXContextProvider from "./providers/by_application/espresso/QEPWXContextProvider"; -import NWChemTotalEnergyContextProvider from "./providers/by_application/nwchem/NWChemTotalEnergyContextProvider"; -import VASPContextProvider from "./providers/by_application/vasp/VASPContextProvider"; -import VASPNEBContextProvider from "./providers/by_application/vasp/VASPNEBContextProvider"; -import CollinearMagnetizationContextProvider from "./providers/CollinearMagnetizationContextProvider"; -import HubbardContextProviderLegacy from "./providers/Hubbard/HubbardContextProviderLegacy"; -import HubbardJContextProvider from "./providers/Hubbard/HubbardJContextProvider"; -import HubbardUContextProvider from "./providers/Hubbard/HubbardUContextProvider"; -import HubbardVContextProvider from "./providers/Hubbard/HubbardVContextProvider"; -import IonDynamicsContextProvider from "./providers/IonDynamicsContextProvider"; -import MLSettingsContextProvider from "./providers/MLSettingsContextProvider"; -import MLTrainTestSplitContextProvider from "./providers/MLTrainTestSplitContextProvider"; -import NEBFormDataProvider from "./providers/NEBFormDataProvider"; -import NonCollinearMagnetizationContextProvider from "./providers/NonCollinearMagnetizationContextProvider"; -import PlanewaveCutoffsContextProvider from "./providers/PlanewaveCutoffsContextProvider"; -import IGridFormDataManager from "./providers/PointsGrid/IGridFormDataManager"; -import KGridFormDataManager from "./providers/PointsGrid/KGridFormDataManager"; -import QGridFormDataManager from "./providers/PointsGrid/QGridFormDataManager"; -import ExplicitKPath2PIBAFormDataManager from "./providers/PointsPath/ExplicitKPath2PIBAFormDataManager"; -import ExplicitKPathFormDataManager from "./providers/PointsPath/ExplicitKPathFormDataManager"; -import IPathFormDataManager from "./providers/PointsPath/IPathFormDataManager"; -import KPathFormDataManager from "./providers/PointsPath/KPathFormDataManager"; -import QPathFormDataManager from "./providers/PointsPath/QPathFormDataManager"; - -// const CONTEXT_DOMAINS = { -// important: "important", // used to generate `ImportantSettings` form -// }; - -// export type ProvidersConfig = Record< -// ProviderName, -// new ( -// config: ContextItem, -// domain?: string, -// entityName?: "unit" | "subworkflow", -// ) => ContextProvider -// >; - -/** ******************************** - * Method-based context providers * - ********************************* */ - -// export const wodeProviders = { -// // NOTE: subworkflow-level data manager. Will override the unit-level data with the same name via subworkflow context. -// PlanewaveCutoffDataManager: { -// providerCls: PlanewaveCutoffsContextProvider, -// config: _makeImportant({ name: "cutoffs", entityName: "subworkflow" }), -// }, -// KGridFormDataManager: { -// providerCls: PointsGridFormDataProvider, -// config: _makeImportant({ name: "kgrid" }), -// }, -// QGridFormDataManager: { -// providerCls: PointsGridFormDataProvider, -// config: _makeImportant({ name: "qgrid", divisor: 5 }), // Using less points for Qgrid by default -// }, -// IGridFormDataManager: { -// providerCls: PointsGridFormDataProvider, -// config: _makeImportant({ name: "igrid", divisor: 0.2 }), // Using more points for interpolated grid by default -// }, -// QPathFormDataManager: { -// providerCls: PointsPathFormDataProvider, -// config: _makeImportant({ name: "qpath" }), -// }, -// IPathFormDataManager: { -// providerCls: PointsPathFormDataProvider, -// config: _makeImportant({ name: "ipath" }), -// }, -// KPathFormDataManager: { -// providerCls: PointsPathFormDataProvider, -// config: _makeImportant({ name: "kpath" }), -// }, -// ExplicitKPathFormDataManager: { -// providerCls: ExplicitPointsPathFormDataProvider, -// config: _makeImportant({ name: "explicitKPath" }), -// }, -// ExplicitKPath2PIBAFormDataManager: { -// providerCls: ExplicitPointsPath2PIBAFormDataProvider, -// config: _makeImportant({ name: "explicitKPath2PIBA" }), -// }, -// HubbardJContextManager: { -// providerCls: HubbardJContextProvider, -// config: _makeImportant({ name: "hubbard_j" }), -// }, -// HubbardUContextManager: { -// providerCls: HubbardUContextProvider, -// config: _makeImportant({ name: "hubbard_u" }), -// }, -// HubbardVContextManager: { -// providerCls: HubbardVContextProvider, -// config: _makeImportant({ name: "hubbard_v" }), -// }, -// HubbardContextManagerLegacy: { -// providerCls: HubbardContextProviderLegacy, -// config: _makeImportant({ name: "hubbard_legacy" }), -// }, -// // NEBFormDataManager context is stored under the same key (`input`) as InputDataManager contexts. -// NEBFormDataManager: { -// providerCls: NEBFormDataProvider, -// config: _makeImportant({ name: "neb" }), -// }, -// BoundaryConditionsFormDataManager: { -// providerCls: BoundaryConditionsFormDataProvider, -// config: _makeImportant({ name: "boundaryConditions" }), -// }, -// MLSettingsDataManager: { -// providerCls: MLSettingsContextProvider, -// config: _makeImportant({ name: "mlSettings" }), -// }, -// MLTrainTestSplitDataManager: { -// providerCls: MLTrainTestSplitContextProvider, -// config: _makeImportant({ name: "mlTrainTestSplit" }), -// }, -// IonDynamicsContextProvider: { -// providerCls: IonDynamicsContextProvider, -// config: _makeImportant({ name: "dynamics" }), -// }, -// CollinearMagnetizationDataManager: { -// providerCls: CollinearMagnetizationContextProvider, -// config: _makeImportant({ name: "collinearMagnetization" }), -// }, -// NonCollinearMagnetizationDataManager: { -// providerCls: NonCollinearMagnetizationContextProvider, -// config: _makeImportant({ name: "nonCollinearMagnetization" }), -// }, -// QEPWXInputDataManager: { -// providerCls: QEPWXContextProvider, -// config: { name: "input" }, -// }, -// QENEBInputDataManager: { -// providerCls: QENEBContextProvider, -// config: { name: "input" }, -// }, -// VASPInputDataManager: { -// providerCls: VASPContextProvider, -// config: { name: "input" }, -// }, -// VASPNEBInputDataManager: { -// providerCls: VASPNEBContextProvider, -// config: { name: "input" }, -// }, -// NWChemInputDataManager: { -// providerCls: NWChemTotalEnergyContextProvider, -// config: { name: "input" }, -// }, -// }; - -export const newWodeProviders = { - PlanewaveCutoffDataManager: PlanewaveCutoffsContextProvider, - - KGridFormDataManager, - QGridFormDataManager, - IGridFormDataManager, - - QPathFormDataManager, - IPathFormDataManager, - KPathFormDataManager, - ExplicitKPathFormDataManager, - ExplicitKPath2PIBAFormDataManager, - - HubbardJContextManager: HubbardJContextProvider, - HubbardUContextManager: HubbardUContextProvider, - HubbardVContextManager: HubbardVContextProvider, - HubbardContextManagerLegacy: HubbardContextProviderLegacy, - NEBFormDataManager: NEBFormDataProvider, - BoundaryConditionsFormDataManager: BoundaryConditionsFormDataProvider, - MLSettingsDataManager: MLSettingsContextProvider, - MLTrainTestSplitDataManager: MLTrainTestSplitContextProvider, - IonDynamicsContextProvider, - CollinearMagnetizationDataManager: CollinearMagnetizationContextProvider, - NonCollinearMagnetizationDataManager: NonCollinearMagnetizationContextProvider, - - QEPWXInputDataManager: QEPWXContextProvider, - QENEBInputDataManager: QENEBContextProvider, - VASPInputDataManager: VASPContextProvider, - VASPNEBInputDataManager: VASPNEBContextProvider, - NWChemInputDataManager: NWChemTotalEnergyContextProvider, -}; diff --git a/src/js/context/providers/BoundaryConditionsFormDataProvider.ts b/src/js/context/providers/BoundaryConditionsFormDataManager.ts similarity index 64% rename from src/js/context/providers/BoundaryConditionsFormDataProvider.ts rename to src/js/context/providers/BoundaryConditionsFormDataManager.ts index daa1008a..192e20a8 100644 --- a/src/js/context/providers/BoundaryConditionsFormDataProvider.ts +++ b/src/js/context/providers/BoundaryConditionsFormDataManager.ts @@ -1,42 +1,50 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { BoundaryConditionsDataProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { BoundaryConditionsContextItemSchema } from "@mat3ra/esse/dist/js/types"; import materialContextMixin, { type MaterialContextMixin, type MaterialExternalContext, } from "../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "./base/ContextProvider"; +import type { UnitContext } from "./base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; -type Name = "boundaryConditions"; -type Data = BoundaryConditionsDataProviderSchema; +type Schema = BoundaryConditionsContextItemSchema; type ExternalContext = JinjaExternalContext & MaterialExternalContext; -type Base = typeof JSONSchemaDataProvider & + +type Base = typeof JSONSchemaDataProvider & Constructor; const jsonSchemaId = "context-providers-directory/boundary-conditions-data-provider"; -export default class BoundaryConditionsFormDataProvider extends (JSONSchemaDataProvider as Base) { - readonly name: Name = "boundaryConditions"; +export default class BoundaryConditionsFormDataManager extends (JSONSchemaDataProvider as Base) { + readonly name = "boundaryConditions" as const; + + readonly domain = "important" as const; + + readonly entityName = "unit" as const; - readonly domain: Domain = "important"; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "boundaryConditions"); + + return new BoundaryConditionsFormDataManager(contextItem, externalContext); + } - readonly humanName = "Boundary Conditions"; + readonly humanName = "Boundary Conditions" as const; readonly uiSchema = { type: { "ui:disabled": true }, offset: { "ui:disabled": true }, electricField: {}, targetFermiEnergy: {}, - }; + } as const; - constructor(contextItem: ContextItem, externalContext: ExternalContext) { + constructor(contextItem: Partial, externalContext: ExternalContext) { super(contextItem, externalContext); this.initMaterialContextMixin(externalContext); } - getDefaultData(): Data { + getDefaultData(): Schema["data"] { return { type: this.material?.metadata?.boundaryConditions?.type || "pbc", offset: this.material?.metadata?.boundaryConditions?.offset || 0, @@ -64,4 +72,4 @@ export default class BoundaryConditionsFormDataProvider extends (JSONSchemaDataP } } -materialContextMixin(BoundaryConditionsFormDataProvider.prototype); +materialContextMixin(BoundaryConditionsFormDataManager.prototype); diff --git a/src/js/context/providers/CollinearMagnetizationContextProvider.ts b/src/js/context/providers/CollinearMagnetizationDataManager.ts similarity index 68% rename from src/js/context/providers/CollinearMagnetizationContextProvider.ts rename to src/js/context/providers/CollinearMagnetizationDataManager.ts index 4ab7b989..4ad40127 100644 --- a/src/js/context/providers/CollinearMagnetizationContextProvider.ts +++ b/src/js/context/providers/CollinearMagnetizationDataManager.ts @@ -1,27 +1,44 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { CollinearMagnetizationContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { + CollinearMagnetizationContextItemSchema, + CollinearMagnetizationContextProviderSchema, +} from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; import materialContextMixin, { type MaterialContextMixin, type MaterialExternalContext, } from "../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "./base/ContextProvider"; +import type { UnitContext } from "./base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; -type Name = "collinearMagnetization"; type Data = CollinearMagnetizationContextProviderSchema; +type Schema = CollinearMagnetizationContextItemSchema; type ExternalContext = JinjaExternalContext & MaterialExternalContext; -type Base = typeof JSONSchemaDataProvider & +type Base = typeof JSONSchemaDataProvider & Constructor; +const defaultData = { + value: 0.0, + isTotalMagnetization: false, + totalMagnetization: 0.0, +}; + const jsonSchemaId = "context-providers-directory/collinear-magnetization-context-provider"; -export default class CollinearMagnetizationContextProvider extends (JSONSchemaDataProvider as Base) { - readonly name: Name = "collinearMagnetization"; +export default class CollinearMagnetizationDataManager extends (JSONSchemaDataProvider as Base) { + readonly name = "collinearMagnetization" as const; + + readonly domain = "important" as const; + + readonly entityName = "unit" as const; - readonly domain: Domain = "important"; + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "collinearMagnetization"); + + return new CollinearMagnetizationDataManager(contextItem, externalContext); + } readonly jsonSchema: JSONSchema7 | undefined; @@ -31,7 +48,7 @@ export default class CollinearMagnetizationContextProvider extends (JSONSchemaDa private readonly uniqueElementsWithLabels: string[]; - constructor(contextItem: ContextItem, externalContext: ExternalContext) { + constructor(contextItem: Partial, externalContext: ExternalContext) { super(contextItem, externalContext); this.initMaterialContextMixin(externalContext); @@ -53,13 +70,13 @@ export default class CollinearMagnetizationContextProvider extends (JSONSchemaDa default: this.firstElement, }, "properties.startingMagnetization.items.properties.value": { - default: 0.0, + default: defaultData.value, }, "properties.isTotalMagnetization": { - default: false, + default: defaultData.isTotalMagnetization, }, "properties.totalMagnetization": { - default: 0.0, + default: defaultData.totalMagnetization, }, }); } @@ -70,11 +87,11 @@ export default class CollinearMagnetizationContextProvider extends (JSONSchemaDa { index: 1, atomicSpecies: this.firstElement, - value: 0.0, + value: defaultData.value, }, ], - isTotalMagnetization: false, - totalMagnetization: 0.0, + isTotalMagnetization: defaultData.isTotalMagnetization, + totalMagnetization: defaultData.totalMagnetization, }; } @@ -112,4 +129,4 @@ export default class CollinearMagnetizationContextProvider extends (JSONSchemaDa } } -materialContextMixin(CollinearMagnetizationContextProvider.prototype); +materialContextMixin(CollinearMagnetizationDataManager.prototype); diff --git a/src/js/context/providers/Hubbard/HubbardContextProviderLegacy.ts b/src/js/context/providers/Hubbard/HubbardContextManagerLegacy.ts similarity index 68% rename from src/js/context/providers/Hubbard/HubbardContextProviderLegacy.ts rename to src/js/context/providers/Hubbard/HubbardContextManagerLegacy.ts index 0b60691a..df2ed707 100644 --- a/src/js/context/providers/Hubbard/HubbardContextProviderLegacy.ts +++ b/src/js/context/providers/Hubbard/HubbardContextManagerLegacy.ts @@ -1,11 +1,14 @@ import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { HubbardLegacyContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { + HubbardLegacyContextItemSchema, + HubbardLegacyContextProviderSchema, +} from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; -import type { ContextItem, Domain } from "../base/ContextProvider"; +import type { UnitContext } from "../base/ContextProvider"; import HubbardContextProvider, { type HubbardExternalContext } from "./HubbardContextProvider"; -type Name = "hubbard_legacy"; +type Schema = HubbardLegacyContextItemSchema; type Data = HubbardLegacyContextProviderSchema; const defaultHubbardConfig = { @@ -14,10 +17,21 @@ const defaultHubbardConfig = { const jsonSchemaId = "context-providers-directory/hubbard-legacy-context-provider"; -export default class HubbardContextProviderLegacy extends HubbardContextProvider { - readonly name: Name = "hubbard_legacy"; +export default class HubbardContextManagerLegacy extends HubbardContextProvider { + readonly name = "hubbard_legacy" as const; - readonly domain: Domain = "important"; + readonly domain = "important" as const; + + readonly entityName = "unit" as const; + + static createFromUnitContext( + unitContext: UnitContext, + externalContext: HubbardExternalContext, + ) { + const contextItem = this.findContextItem(unitContext, "hubbard_legacy"); + + return new HubbardContextManagerLegacy(contextItem, externalContext); + } readonly jsonSchema: JSONSchema7 | undefined; @@ -30,9 +44,9 @@ export default class HubbardContextProviderLegacy extends HubbardContextProvider items: { atomicSpeciesIndex: { "ui:readonly": true }, }, - }; + } as const; - constructor(contextItem: ContextItem, externalContext: HubbardExternalContext) { + constructor(contextItem: Partial, externalContext: HubbardExternalContext) { super(contextItem, externalContext); this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { diff --git a/src/js/context/providers/Hubbard/HubbardContextProvider.ts b/src/js/context/providers/Hubbard/HubbardContextProvider.ts index 39648163..70ac8ea8 100644 --- a/src/js/context/providers/Hubbard/HubbardContextProvider.ts +++ b/src/js/context/providers/Hubbard/HubbardContextProvider.ts @@ -1,29 +1,39 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { + HubbardJContextItemSchema, + HubbardLegacyContextItemSchema, + HubbardUContextItemSchema, + HubbardVContextItemSchema, +} from "@mat3ra/esse/dist/js/types"; import materialContextMixin, { type MaterialContextMixin, type MaterialExternalContext, } from "../../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "../base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext } from "../base/JSONSchemaDataProvider"; -type HubbardName = "hubbard_u" | "hubbard_j" | "hubbard_v" | "hubbard_legacy"; +type Schema = + | HubbardJContextItemSchema + | HubbardUContextItemSchema + | HubbardVContextItemSchema + | HubbardLegacyContextItemSchema; export type HubbardExternalContext = JinjaExternalContext & MaterialExternalContext; -type Base = typeof JSONSchemaDataProvider & +type Base = typeof JSONSchemaDataProvider & Constructor; export default abstract class HubbardContextProvider< - N extends HubbardName, - D extends object, + S extends Schema, EC extends HubbardExternalContext = HubbardExternalContext, > extends (JSONSchemaDataProvider as Base) { - abstract readonly name: N; + abstract readonly name: S["name"]; - abstract getDefaultData(): D; + abstract getDefaultData(): S["data"]; - readonly domain: Domain = "important"; + readonly domain = "important" as const; + + readonly entityName = "unit" as const; protected readonly uniqueElementsWithLabels: string[]; @@ -52,7 +62,7 @@ export default abstract class HubbardContextProvider< "7d", ]; - constructor(contextItem: ContextItem, externalContext: EC) { + constructor(contextItem: Partial, externalContext: EC) { super(contextItem, externalContext); this.initMaterialContextMixin(externalContext); diff --git a/src/js/context/providers/Hubbard/HubbardJContextProvider.ts b/src/js/context/providers/Hubbard/HubbardJContextManager.ts similarity index 66% rename from src/js/context/providers/Hubbard/HubbardJContextProvider.ts rename to src/js/context/providers/Hubbard/HubbardJContextManager.ts index 9eaa9a4e..91b74fb6 100644 --- a/src/js/context/providers/Hubbard/HubbardJContextProvider.ts +++ b/src/js/context/providers/Hubbard/HubbardJContextManager.ts @@ -1,11 +1,14 @@ import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { HubbardJContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { + HubbardJContextItemSchema, + HubbardJContextProviderSchema, +} from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; -import type { ContextItem } from "../base/ContextProvider"; +import type { UnitContext } from "../base/ContextProvider"; import HubbardContextProvider, { type HubbardExternalContext } from "./HubbardContextProvider"; -type Name = "hubbard_j"; +type Schema = HubbardJContextItemSchema; type Data = HubbardJContextProviderSchema; const defaultHubbardConfig = { @@ -17,8 +20,19 @@ const defaultHubbardConfig = { const jsonSchemaId = "context-providers-directory/hubbard-j-context-provider"; -export default class HubbardJContextProvider extends HubbardContextProvider { - readonly name: Name = "hubbard_j"; +export default class HubbardJContextManager extends HubbardContextProvider { + readonly name = "hubbard_j" as const; + + readonly entityName = "unit" as const; + + static createFromUnitContext( + unitContext: UnitContext, + externalContext: HubbardExternalContext, + ) { + const contextItem = this.findContextItem(unitContext, "hubbard_j"); + + return new HubbardJContextManager(contextItem, externalContext); + } readonly uiSchemaStyled = { "ui:options": { @@ -26,11 +40,11 @@ export default class HubbardJContextProvider extends HubbardContextProvider, externalContext: HubbardExternalContext) { + constructor(contextItem: Partial, externalContext: HubbardExternalContext) { super(contextItem, externalContext); this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { diff --git a/src/js/context/providers/Hubbard/HubbardUContextProvider.ts b/src/js/context/providers/Hubbard/HubbardUContextManager.ts similarity index 64% rename from src/js/context/providers/Hubbard/HubbardUContextProvider.ts rename to src/js/context/providers/Hubbard/HubbardUContextManager.ts index 259d16dc..2fd25cae 100644 --- a/src/js/context/providers/Hubbard/HubbardUContextProvider.ts +++ b/src/js/context/providers/Hubbard/HubbardUContextManager.ts @@ -1,12 +1,14 @@ import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { HubbardUContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { + HubbardUContextItemSchema, + HubbardUContextProviderSchema, +} from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; -import materialContextMixin from "../../mixins/MaterialContextMixin"; -import type { ContextItem } from "../base/ContextProvider"; +import type { UnitContext } from "../base/ContextProvider"; import HubbardContextProvider, { type HubbardExternalContext } from "./HubbardContextProvider"; -type Name = "hubbard_u"; +type Schema = HubbardUContextItemSchema; type Data = HubbardUContextProviderSchema; const defaultHubbardConfig = { @@ -17,8 +19,19 @@ const defaultHubbardConfig = { const jsonSchemaId = "context-providers-directory/hubbard-u-context-provider"; -export default class HubbardUContextProvider extends HubbardContextProvider { - readonly name: Name = "hubbard_u"; +export default class HubbardUContextManager extends HubbardContextProvider { + readonly name = "hubbard_u" as const; + + readonly entityName = "unit" as const; + + static createFromUnitContext( + unitContext: UnitContext, + externalContext: HubbardExternalContext, + ) { + const contextItem = this.findContextItem(unitContext, "hubbard_u"); + + return new HubbardUContextManager(contextItem, externalContext); + } readonly uiSchemaStyled = { "ui:options": { @@ -26,11 +39,11 @@ export default class HubbardUContextProvider extends HubbardContextProvider, externalContext: HubbardExternalContext) { + constructor(contextItem: Partial, externalContext: HubbardExternalContext) { super(contextItem, externalContext); this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { @@ -57,5 +70,3 @@ export default class HubbardUContextProvider extends HubbardContextProvider { - readonly name: Name = "hubbard_v"; +export default class HubbardVContextManager extends HubbardContextProvider { + readonly name = "hubbard_v" as const; + + readonly entityName = "unit" as const; + + static createFromUnitContext( + unitContext: UnitContext, + externalContext: HubbardExternalContext, + ) { + const contextItem = this.findContextItem(unitContext, "hubbard_v"); + + return new HubbardVContextManager(contextItem, externalContext); + } readonly uiSchemaStyled = { "ui:options": { @@ -29,11 +43,11 @@ export default class HubbardVContextProvider extends HubbardContextProvider, externalContext: HubbardExternalContext) { + constructor(contextItem: Partial, externalContext: HubbardExternalContext) { super(contextItem, externalContext); this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { diff --git a/src/js/context/providers/IonDynamicsContextProvider.ts b/src/js/context/providers/IonDynamicsDataManager.ts similarity index 57% rename from src/js/context/providers/IonDynamicsContextProvider.ts rename to src/js/context/providers/IonDynamicsDataManager.ts index 5b767ebc..3c786fbc 100644 --- a/src/js/context/providers/IonDynamicsContextProvider.ts +++ b/src/js/context/providers/IonDynamicsDataManager.ts @@ -1,12 +1,11 @@ import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { IonDynamicsContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { DynamicsContextItemSchema } from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; -import type { ContextItem, Domain, ExternalContext } from "./base/ContextProvider"; +import type { BaseExternalContext, UnitContext } from "./base/ContextProvider"; import JSONSchemaFormDataProvider from "./base/JSONSchemaFormDataProvider"; -type Data = IonDynamicsContextProviderSchema; -type Name = "dynamics"; +type Schema = DynamicsContextItemSchema; const jsonSchemaId = "context-providers-directory/ion-dynamics-context-provider"; @@ -17,21 +16,31 @@ const defaultData = { temperature: 300.0, }; -export default class IonDynamicsContextProvider extends JSONSchemaFormDataProvider { - readonly name: Name = "dynamics"; +export default class IonDynamicsDataManager extends JSONSchemaFormDataProvider { + readonly name = "dynamics" as const; - readonly domain: Domain = "important"; + readonly domain = "important" as const; + + readonly entityName = "unit" as const; + + static createFromUnitContext(unitContext: UnitContext, externalContext: BaseExternalContext) { + const contextItem = this.findContextItem(unitContext, "dynamics"); + + return new IonDynamicsDataManager(contextItem, externalContext); + } readonly uiSchema = { numberOfSteps: {}, timeStep: {}, electronMass: {}, temperature: {}, - }; + } as const; + + readonly extraData = {}; readonly jsonSchema: JSONSchema7 | undefined; - constructor(contextItem: ContextItem, externalContext: ExternalContext) { + constructor(contextItem: Partial, externalContext: BaseExternalContext) { super(contextItem, externalContext); this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { diff --git a/src/js/context/providers/MLSettingsContextProvider.ts b/src/js/context/providers/MLSettingsContextProvider.ts deleted file mode 100644 index 06c81a9e..00000000 --- a/src/js/context/providers/MLSettingsContextProvider.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { MLSettingsContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; - -import { - type ApplicationContextMixin, - applicationContextMixin, -} from "../mixins/ApplicationContextMixin"; -import { type ContextItem, type Domain } from "./base/ContextProvider"; -import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; - -type Name = "mlSettings"; -type Data = MLSettingsContextProviderSchema; -type ExternalContext = JinjaExternalContext & ApplicationContextMixin; -type Base = typeof JSONSchemaDataProvider & - Constructor; - -const jsonSchemaId = "context-providers-directory/ml-settings-context-provider"; - -const defaultData = { - target_column_name: "target", - problem_category: "regression" as const, -}; - -export default class MLSettingsContextProvider extends (JSONSchemaDataProvider as Base) { - readonly name: Name = "mlSettings"; - - readonly domain: Domain = "important"; - - readonly jsonSchema: JSONSchema7 | undefined; - - readonly uiSchema = { - target_column_name: {}, - problem_category: {}, - }; - - constructor(contextItem: ContextItem, externalContext: ExternalContext) { - super(contextItem, externalContext); - this.initApplicationContextMixin(externalContext); - - this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { - target_column_name: { default: defaultData.target_column_name }, - problem_category: { default: defaultData.problem_category }, - }); - } - - // eslint-disable-next-line class-methods-use-this - getDefaultData() { - return defaultData; - } -} - -applicationContextMixin(MLSettingsContextProvider.prototype); diff --git a/src/js/context/providers/MLSettingsDataManager.ts b/src/js/context/providers/MLSettingsDataManager.ts new file mode 100644 index 00000000..b5b987e5 --- /dev/null +++ b/src/js/context/providers/MLSettingsDataManager.ts @@ -0,0 +1,54 @@ +import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; +import type { MlSettingsContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; + +import { type UnitContext } from "./base/ContextProvider"; +import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; + +type Schema = MlSettingsContextItemSchema; +type ExternalContext = JinjaExternalContext; +type Base = typeof JSONSchemaDataProvider; + +const jsonSchemaId = "context-providers-directory/ml-settings-context-provider"; + +const defaultData = { + target_column_name: "target", + problem_category: "regression" as const, +}; + +export default class MLSettingsDataManager extends (JSONSchemaDataProvider as Base) { + readonly name = "mlSettings" as const; + + readonly domain = "important" as const; + + readonly entityName = "unit" as const; + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "mlSettings"); + + return new MLSettingsDataManager(contextItem, externalContext); + } + + readonly jsonSchema: JSONSchema7 | undefined; + + readonly uiSchema = { + target_column_name: {}, + problem_category: {}, + } as const; + + readonly extraData = {}; + + constructor(contextItem: Partial, externalContext: ExternalContext) { + super(contextItem, externalContext); + + this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { + target_column_name: { default: defaultData.target_column_name }, + problem_category: { default: defaultData.problem_category }, + }); + } + + // eslint-disable-next-line class-methods-use-this + getDefaultData() { + return defaultData; + } +} diff --git a/src/js/context/providers/MLTrainTestSplitContextProvider.ts b/src/js/context/providers/MLTrainTestSplitContextProvider.ts deleted file mode 100644 index 34a374c6..00000000 --- a/src/js/context/providers/MLTrainTestSplitContextProvider.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { MLTrainTestSplitContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; - -import { - type ApplicationContextMixin, - applicationContextMixin, -} from "../mixins/ApplicationContextMixin"; -import { type ContextItem, type Domain } from "./base/ContextProvider"; -import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; - -type Name = "mlTrainTestSplit"; -type Data = MLTrainTestSplitContextProviderSchema; -type ExternalContext = JinjaExternalContext & ApplicationContextMixin; -type Base = typeof JSONSchemaDataProvider & Constructor; - -const jsonSchemaId = "context-providers-directory/ml-train-test-split-context-provider"; - -const defaultData = { - fraction_held_as_test_set: 0.2, -}; - -export default class MLTrainTestSplitContextProvider extends (JSONSchemaDataProvider as Base) { - readonly name: Name = "mlTrainTestSplit"; - - readonly domain: Domain = "important"; - - readonly jsonSchema: JSONSchema7 | undefined; - - readonly uiSchema = { - target_column_name: {}, - problem_category: {}, - }; - - constructor(contextItem: ContextItem, externalContext: ExternalContext) { - super(contextItem, externalContext); - this.initApplicationContextMixin(externalContext); - - this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { - fraction_held_as_test_set: { default: defaultData.fraction_held_as_test_set }, - }); - } - - // eslint-disable-next-line class-methods-use-this - getDefaultData() { - return defaultData; - } -} - -applicationContextMixin(MLTrainTestSplitContextProvider.prototype); diff --git a/src/js/context/providers/MLTrainTestSplitDataManager.ts b/src/js/context/providers/MLTrainTestSplitDataManager.ts new file mode 100644 index 00000000..d4c1a8ec --- /dev/null +++ b/src/js/context/providers/MLTrainTestSplitDataManager.ts @@ -0,0 +1,52 @@ +import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; +import type { MlTrainTestSplitContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; + +import { type UnitContext } from "./base/ContextProvider"; +import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; + +type Schema = MlTrainTestSplitContextItemSchema; +type ExternalContext = JinjaExternalContext; +type Base = typeof JSONSchemaDataProvider; + +const jsonSchemaId = "context-providers-directory/ml-train-test-split-context-provider"; + +const defaultData = { + fraction_held_as_test_set: 0.2, +}; + +export default class MLTrainTestSplitDataManager extends (JSONSchemaDataProvider as Base) { + readonly name = "mlTrainTestSplit" as const; + + readonly domain = "important" as const; + + readonly entityName = "unit" as const; + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "mlTrainTestSplit"); + + return new MLTrainTestSplitDataManager(contextItem, externalContext); + } + + readonly jsonSchema: JSONSchema7 | undefined; + + readonly uiSchema = { + target_column_name: {}, + problem_category: {}, + } as const; + + readonly extraData = {}; + + constructor(contextItem: Partial, externalContext: ExternalContext) { + super(contextItem, externalContext); + + this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { + fraction_held_as_test_set: { default: defaultData.fraction_held_as_test_set }, + }); + } + + // eslint-disable-next-line class-methods-use-this + getDefaultData() { + return defaultData; + } +} diff --git a/src/js/context/providers/NEBFormDataProvider.ts b/src/js/context/providers/NEBFormDataManager.ts similarity index 53% rename from src/js/context/providers/NEBFormDataProvider.ts rename to src/js/context/providers/NEBFormDataManager.ts index df67cc78..5403215c 100644 --- a/src/js/context/providers/NEBFormDataProvider.ts +++ b/src/js/context/providers/NEBFormDataManager.ts @@ -1,13 +1,12 @@ import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { NEBDataProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { NebContextItemSchema } from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; -import type { ContextItem, Domain } from "./base/ContextProvider"; +import type { UnitContext } from "./base/ContextProvider"; import type { JinjaExternalContext } from "./base/JSONSchemaDataProvider"; import JSONSchemaFormDataProvider from "./base/JSONSchemaFormDataProvider"; -type Name = "neb"; -type Data = NEBDataProviderSchema; +type Schema = NebContextItemSchema; type ExternalContext = JinjaExternalContext; const jsonSchemaId = "context-providers-directory/neb-data-provider"; @@ -16,18 +15,28 @@ const defaultData = { nImages: 1, }; -export default class NEBFormDataProvider extends JSONSchemaFormDataProvider { - readonly name: Name = "neb"; +export default class NEBFormDataManager extends JSONSchemaFormDataProvider { + readonly name = "neb" as const; - readonly domain: Domain = "important"; + readonly domain = "important" as const; + + readonly entityName = "unit" as const; + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "neb"); + + return new NEBFormDataManager(contextItem, externalContext); + } readonly uiSchema = { nImages: {}, - }; + } as const; readonly jsonSchema: JSONSchema7 | undefined; - constructor(contextItem: ContextItem, externalContext: ExternalContext) { + readonly extraData = {}; + + constructor(contextItem: Partial, externalContext: ExternalContext) { super(contextItem, externalContext); this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { diff --git a/src/js/context/providers/NonCollinearMagnetizationContextProvider.ts b/src/js/context/providers/NonCollinearMagnetizationDataManager.ts similarity index 61% rename from src/js/context/providers/NonCollinearMagnetizationContextProvider.ts rename to src/js/context/providers/NonCollinearMagnetizationDataManager.ts index 299e2637..0e7c7a94 100644 --- a/src/js/context/providers/NonCollinearMagnetizationContextProvider.ts +++ b/src/js/context/providers/NonCollinearMagnetizationDataManager.ts @@ -1,26 +1,56 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { NonCollinearMagnetizationContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { + NonCollinearMagnetizationContextItemSchema, + NonCollinearMagnetizationContextProviderSchema, +} from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; import materialContextMixin, { type MaterialContextMixin, type MaterialExternalContext, } from "../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "./base/ContextProvider"; +import type { UnitContext } from "./base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext } from "./base/JSONSchemaDataProvider"; -type Name = "nonCollinearMagnetization"; type Data = NonCollinearMagnetizationContextProviderSchema; +type Schema = NonCollinearMagnetizationContextItemSchema; type ExternalContext = JinjaExternalContext & MaterialExternalContext; -type Base = typeof JSONSchemaDataProvider & Constructor; +type Base = typeof JSONSchemaDataProvider & + Constructor; + +const defaultData = { + isExistingChargeDensity: false, + isStartingMagnetization: true, + isConstrainedMagnetization: false, + isArbitrarySpinAngle: false, + isArbitrarySpinDirection: false, + isFixedMagnetization: false, + lforcet: true, + value: 0.0, + angle1: 0.0, + angle2: 0.0, + constrainType: "atomic direction" as const, + lambda: 0.0, + fixedMagnetizationX: 0.0, + fixedMagnetizationY: 0.0, + fixedMagnetizationZ: 0.0, +}; const jsonSchemaId = "context-providers-directory/non-collinear-magnetization-context-provider"; -export default class NonCollinearMagnetizationContextProvider extends (JSONSchemaDataProvider as Base) { - readonly name: Name = "nonCollinearMagnetization"; +export default class NonCollinearMagnetizationDataManager extends (JSONSchemaDataProvider as Base) { + readonly name = "nonCollinearMagnetization" as const; - readonly domain: Domain = "important"; + readonly domain = "important" as const; + + readonly entityName = "unit" as const; + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "nonCollinearMagnetization"); + + return new NonCollinearMagnetizationDataManager(contextItem, externalContext); + } readonly isStartingMagnetization: boolean; @@ -38,7 +68,7 @@ export default class NonCollinearMagnetizationContextProvider extends (JSONSchem private readonly uniqueElementsWithLabels: string[]; - constructor(contextItem: ContextItem, externalContext: ExternalContext) { + constructor(contextItem: Partial, externalContext: ExternalContext) { super(contextItem, externalContext); this.initMaterialContextMixin(externalContext); @@ -56,17 +86,17 @@ export default class NonCollinearMagnetizationContextProvider extends (JSONSchem ]; this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { - isExistingChargeDensity: { default: false }, - isStartingMagnetization: { default: true }, - isArbitrarySpinAngle: { default: false }, - isConstrainedMagnetization: { default: false }, - isFixedMagnetization: { default: true }, + isExistingChargeDensity: { default: defaultData.isExistingChargeDensity }, + isStartingMagnetization: { default: defaultData.isStartingMagnetization }, + isArbitrarySpinAngle: { default: defaultData.isArbitrarySpinAngle }, + isConstrainedMagnetization: { default: defaultData.isConstrainedMagnetization }, + isFixedMagnetization: { default: defaultData.isFixedMagnetization }, startingMagnetization: { minItems: this.uniqueElementsWithLabels.length, maxItems: this.uniqueElementsWithLabels.length, }, "startingMagnetization.items.properties.value": { - default: 0.0, + default: defaultData.value, minimum: -1.0, maximum: 1.0, }, @@ -74,15 +104,15 @@ export default class NonCollinearMagnetizationContextProvider extends (JSONSchem minItems: this.uniqueElementsWithLabels.length, maxItems: this.uniqueElementsWithLabels.length, }, - "spinAngles.items.properties.angle1": { default: 0.0 }, - "spinAngles.items.properties.angle2": { default: 0.0 }, + "spinAngles.items.properties.angle1": { default: defaultData.angle1 }, + "spinAngles.items.properties.angle2": { default: defaultData.angle2 }, "constrainedMagnetization.properties.constrainType": { - default: "atomic direction", + default: defaultData.constrainType, }, - "constrainedMagnetization.properties.lambda": { default: 0.0 }, - "fixedMagnetization.properties.x": { default: 0.0 }, - "fixedMagnetization.properties.y": { default: 0.0 }, - "fixedMagnetization.properties.z": { default: 0.0 }, + "constrainedMagnetization.properties.lambda": { default: defaultData.lambda }, + "fixedMagnetization.properties.x": { default: defaultData.fixedMagnetizationX }, + "fixedMagnetization.properties.y": { default: defaultData.fixedMagnetizationY }, + "fixedMagnetization.properties.z": { default: defaultData.fixedMagnetizationZ }, }); } @@ -91,7 +121,7 @@ export default class NonCollinearMagnetizationContextProvider extends (JSONSchem return { index: index + 1, atomicSpecies: element, - value: 0.0, + value: defaultData.value, }; }); @@ -99,29 +129,29 @@ export default class NonCollinearMagnetizationContextProvider extends (JSONSchem return { index: index + 1, atomicSpecies: element, - angle1: 0.0, - angle2: 0.0, + angle1: defaultData.angle1, + angle2: defaultData.angle2, }; }); return { - isExistingChargeDensity: false, - isStartingMagnetization: true, - isConstrainedMagnetization: false, - isArbitrarySpinAngle: false, - isArbitrarySpinDirection: false, - isFixedMagnetization: false, - lforcet: true, + isExistingChargeDensity: defaultData.isExistingChargeDensity, + isStartingMagnetization: defaultData.isStartingMagnetization, + isConstrainedMagnetization: defaultData.isConstrainedMagnetization, + isArbitrarySpinAngle: defaultData.isArbitrarySpinAngle, + isArbitrarySpinDirection: defaultData.isArbitrarySpinDirection, + isFixedMagnetization: defaultData.isFixedMagnetization, + lforcet: defaultData.lforcet, spinAngles, startingMagnetization, constrainedMagnetization: { - lambda: 0.0, - constrainType: "atomic direction", + lambda: defaultData.lambda, + constrainType: defaultData.constrainType, }, fixedMagnetization: { - x: 0.0, - y: 0.0, - z: 0.0, + x: defaultData.fixedMagnetizationX, + y: defaultData.fixedMagnetizationY, + z: defaultData.fixedMagnetizationZ, }, }; } @@ -188,4 +218,4 @@ export default class NonCollinearMagnetizationContextProvider extends (JSONSchem } } -materialContextMixin(NonCollinearMagnetizationContextProvider.prototype); +materialContextMixin(NonCollinearMagnetizationDataManager.prototype); diff --git a/src/js/context/providers/PlanewaveCutoffDataManager.ts b/src/js/context/providers/PlanewaveCutoffDataManager.ts new file mode 100644 index 00000000..985e1014 --- /dev/null +++ b/src/js/context/providers/PlanewaveCutoffDataManager.ts @@ -0,0 +1,102 @@ +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; +import type { CutoffsContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; + +import applicationContextMixin, { + type ApplicationContextMixin, + type ApplicationExternalContext, +} from "../mixins/ApplicationContextMixin"; +import ContextProvider, { + type BaseExternalContext, + type UnitContext, +} from "./base/ContextProvider"; + +type ApplicationName = "vasp" | "espresso"; + +type Schema = CutoffsContextItemSchema; +type PlanewaveExternalContext = BaseExternalContext & ApplicationExternalContext; +type Base = typeof ContextProvider & + Constructor; + +// Type guard to check if a string is a valid ApplicationName +function isApplicationName(name: string): name is ApplicationName { + return name === "vasp" || name === "espresso"; +} + +// TODO: create a task to move this handling to standata +const cutoffConfig: Record = { + vasp: { wavefunction: undefined, density: undefined }, + espresso: { wavefunction: 40, density: 200 }, +}; + +const defaultData = { + wavefunction: undefined, + density: undefined, +}; + +const jsonSchemaId = "context-providers-directory/planewave-cutoffs-context-provider"; + +export default class PlanewaveCutoffDataManager extends (ContextProvider as Base) { + readonly name = "cutoffs" as const; + + readonly domain = "important" as const; + + readonly entityName = "subworkflow" as const; + + readonly jsonSchema: JSONSchema7 | undefined; + + readonly uiSchema = { + wavefunction: {}, + density: {}, + } as const; + + readonly extraData = {}; + + static createFromUnitContext( + unitContext: UnitContext, + externalContext: PlanewaveExternalContext, + ) { + const contextItem = this.findContextItem(unitContext, "cutoffs"); + + return new PlanewaveCutoffDataManager(contextItem, externalContext); + } + + constructor(contextItem: Partial, externalContext: PlanewaveExternalContext) { + super(contextItem, externalContext); + this.initApplicationContextMixin(externalContext); + + const { wavefunction, density } = this.getDefaultData(); + + this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { + wavefunction: { default: wavefunction }, + density: { default: density }, + }); + } + + getDefaultData() { + const applicationName = this.application.name; + + // Type-safe check: ensure application name is valid and exists in config + if (!isApplicationName(applicationName)) { + // Fallback to default values if application is not supported + return defaultData; + } + + const config = cutoffConfig[applicationName]; + + if (!config) { + // Fallback to default values if application is not in cutoffConfig + return defaultData; + } + + const { wavefunction, density } = config; + + return { + wavefunction: wavefunction ?? defaultData.wavefunction, + density: density ?? defaultData.density, + }; + } +} + +applicationContextMixin(PlanewaveCutoffDataManager.prototype); diff --git a/src/js/context/providers/PlanewaveCutoffsContextProvider.ts b/src/js/context/providers/PlanewaveCutoffsContextProvider.ts deleted file mode 100644 index d48875c1..00000000 --- a/src/js/context/providers/PlanewaveCutoffsContextProvider.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { PlanewaveCutoffsContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; - -import { - type ApplicationContextMixin, - applicationContextMixin, -} from "../mixins/ApplicationContextMixin"; -import ContextProvider, { - type ContextItem, - type Domain, - type EntityName, - type ExternalContext, -} from "./base/ContextProvider"; - -type ApplicationName = "vasp" | "espresso"; - -type Name = "cutoffs"; -type Data = PlanewaveCutoffsContextProviderSchema; -type PlanewaveExternalContext = ExternalContext & ApplicationContextMixin; -type Base = typeof ContextProvider & Constructor; - -const cutoffConfig: Record = { - vasp: { wavefunction: undefined, density: undefined }, - espresso: { wavefunction: 40, density: 200 }, -}; - -const jsonSchemaId = "context-providers-directory/planewave-cutoffs-context-provider"; - -export default class PlanewaveCutoffsContextProvider extends (ContextProvider as Base) { - readonly name: Name = "cutoffs"; - - readonly domain: Domain = "important"; - - readonly entityName: EntityName = "subworkflow"; - - readonly jsonSchema: JSONSchema7 | undefined; - - readonly uiSchema = { - wavefunction: {}, - density: {}, - }; - - constructor(contextItem: ContextItem, externalContext: PlanewaveExternalContext) { - super(contextItem, externalContext); - this.initApplicationContextMixin(externalContext); - - const { wavefunction, density } = this.getDefaultData(); - - this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById(jsonSchemaId, { - wavefunction: { default: wavefunction }, - density: { default: density }, - }); - } - - getDefaultData() { - // TODO-QUESTION: what if the application is not in the cutoffConfig? - const { wavefunction, density } = - cutoffConfig[this.application.name as ApplicationName] || {}; - - return { - wavefunction, - density, - }; - } -} - -applicationContextMixin(PlanewaveCutoffsContextProvider.prototype); diff --git a/src/js/context/providers/PointsGrid/IGridFormDataManager.ts b/src/js/context/providers/PointsGrid/IGridFormDataManager.ts index 3591d4f6..2ac7181a 100644 --- a/src/js/context/providers/PointsGrid/IGridFormDataManager.ts +++ b/src/js/context/providers/PointsGrid/IGridFormDataManager.ts @@ -1,9 +1,32 @@ -import PointsGridFormDataProvider from "./PointsGridFormDataProvider"; +import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; +import type { GridContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; + +import type { UnitContext } from "../base/ContextProvider"; +import PointsGridFormDataProvider, { type ExternalContext } from "./PointsGridFormDataProvider"; type Name = "igrid"; +type Schema = GridContextItemSchema; export default class IGridFormDataManager extends PointsGridFormDataProvider { - readonly name: Name = "igrid"; + readonly name = "igrid" as const; + + readonly divisor = 0.2 as const; + + readonly jsonSchema: JSONSchema7 | undefined; + + constructor(contextItem: Partial, externalContext: ExternalContext) { + super(contextItem, externalContext); + + this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById( + this.jsonSchemaId, + this.jsonSchemaPatchConfig, + ); + } + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "igrid"); - readonly divisor: number = 0.2; + return new IGridFormDataManager(contextItem, externalContext); + } } diff --git a/src/js/context/providers/PointsGrid/KGridFormDataManager.ts b/src/js/context/providers/PointsGrid/KGridFormDataManager.ts index a41059ca..bc92a6fc 100644 --- a/src/js/context/providers/PointsGrid/KGridFormDataManager.ts +++ b/src/js/context/providers/PointsGrid/KGridFormDataManager.ts @@ -1,7 +1,45 @@ -import PointsGridFormDataProvider from "./PointsGridFormDataProvider"; +import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; +import type { GridContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; + +import ConvergenceParameter from "../../../convergence/ConvergenceParameter"; +import type { UnitContext } from "../base/ContextProvider"; +import PointsGridFormDataProvider, { type ExternalContext } from "./PointsGridFormDataProvider"; type Name = "kgrid"; +type Schema = GridContextItemSchema; export default class KGridFormDataManager extends PointsGridFormDataProvider { - readonly name: Name = "kgrid"; + readonly name = "kgrid" as const; + + readonly divisor = 1 as const; + + readonly jsonSchema: JSONSchema7 | undefined; + + constructor(contextItem: Partial, externalContext: ExternalContext) { + super(contextItem, externalContext); + + this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById( + this.jsonSchemaId, + this.jsonSchemaPatchConfig, + ); + } + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "kgrid"); + + return new KGridFormDataManager(contextItem, externalContext); + } + + applyConvergenceParameter(parameter: ConvergenceParameter) { + const unitContext = parameter.unitContext.data; + const data = this.getData(); + + this.setData({ + ...data, + ...unitContext, + }); + + this.setIsEdited(true); + } } diff --git a/src/js/context/providers/PointsGrid/PointsGridFormDataProvider.ts b/src/js/context/providers/PointsGrid/PointsGridFormDataProvider.ts index 30fce02d..ec45f55f 100644 --- a/src/js/context/providers/PointsGrid/PointsGridFormDataProvider.ts +++ b/src/js/context/providers/PointsGrid/PointsGridFormDataProvider.ts @@ -1,33 +1,30 @@ import { Units } from "@mat3ra/code/dist/js/constants"; import { math as codeJSMath } from "@mat3ra/code/dist/js/math"; import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { PointsGridDataProviderSchema, Vector3DSchema } from "@mat3ra/esse/dist/js/types"; +import type { + GridContextItemSchema, + PointsGridDataProviderSchema, + Vector3DSchema, +} from "@mat3ra/esse/dist/js/types"; import { type ReciprocalLattice, Made } from "@mat3ra/made"; import type { JSONSchema7 } from "json-schema"; -import lodash from "lodash"; import materialContextMixin, { type MaterialContextMixin, type MaterialExternalContext, } from "../../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "../base/ContextProvider"; import type { JinjaExternalContext } from "../base/JSONSchemaDataProvider"; import JSONSchemaFormDataProvider from "../base/JSONSchemaFormDataProvider"; import { globalSettings } from "../settings"; -type Name = string; +type Schema = GridContextItemSchema; type Data = PointsGridDataProviderSchema; -type EContext = JinjaExternalContext & - MaterialExternalContext & { - divisor: number; - }; -type Base = typeof JSONSchemaFormDataProvider & +export type ExternalContext = JinjaExternalContext & MaterialExternalContext; +type Base = typeof JSONSchemaFormDataProvider & Constructor; -type GridMetricType = Required["gridMetricType"]; +type GridMetricType = Data["gridMetricType"]; -// Helper function to create vector schema with defaults const vector = ( defaultValue: string | number | readonly number[] | readonly string[], isStringType = false, @@ -46,24 +43,27 @@ const vector = ( }; }; -const jsonSchemaId = "context-providers-directory/points-grid-data-provider"; const defaultShift = 0; const defaultShifts: Vector3DSchema = [defaultShift, defaultShift, defaultShift]; export default abstract class PointsGridFormDataProvider< - N extends string = string, + N extends Schema["name"], > extends (JSONSchemaFormDataProvider as Base) { abstract readonly name: N; - readonly domain: Domain = "important"; + readonly domain = "important" as const; + + readonly entityName = "unit" as const; - public dimensions!: Vector3DSchema; + readonly jsonSchemaId = "context-providers-directory/points-grid-data-provider"; - public shifts!: Vector3DSchema; + public dimensions!: Data["dimensions"]; + + public shifts!: Data["shifts"]; private reciprocalLattice!: ReciprocalLattice; - private gridMetricType!: GridMetricType; + private gridMetricType!: Data["gridMetricType"]; private gridMetricValue!: number; @@ -73,24 +73,19 @@ export default abstract class PointsGridFormDataProvider< private reciprocalVectorRatios!: Vector3DSchema; + abstract readonly divisor: number; + private defaultMetric!: { type: GridMetricType; value: number; }; - readonly jsonSchema: JSONSchema7 | undefined; + abstract readonly jsonSchema: JSONSchema7 | undefined; - constructor(contextItem: ContextItem, externalContext: EContext) { + constructor(contextItem: Partial, externalContext: ExternalContext) { super(contextItem, externalContext); this.initMaterialContextMixin(externalContext); this.initInstanceFields(); - - const { jsonSchemaPatchConfig } = this; - - this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById( - jsonSchemaId, - jsonSchemaPatchConfig, - ); } private initInstanceFields() { @@ -104,11 +99,11 @@ export default abstract class PointsGridFormDataProvider< this.gridMetricValue = this.data?.gridMetricValue || this.defaultMetric.value; this.preferGridMetric = this.data?.preferGridMetric || false; - this.reciprocalLattice = new Made.ReciprocalLattice(this.material?.lattice); - this.defaultDimensions = this.calculateDimensions({ - gridMetricType: this.defaultMetric.type, - gridMetricValue: this.defaultMetric.value, - }); + this.reciprocalLattice = new Made.ReciprocalLattice(this.material.lattice); + this.defaultDimensions = this.calculateDimensions( + this.defaultMetric.type, + this.defaultMetric.value, + ); this.dimensions = this.data?.dimensions || this.defaultDimensions; this.reciprocalVectorRatios = this.reciprocalLattice.reciprocalVectorRatios.map((r) => Number(codeJSMath.numberToPrecision(r, 3)), @@ -117,11 +112,8 @@ export default abstract class PointsGridFormDataProvider< private getDefaultGridMetricValue(metric: GridMetricType) { switch (metric) { - case "KPPRA": { - const divisor = this.externalContext?.divisor || 1; - const { defaultKPPRA } = globalSettings; - return Math.floor(defaultKPPRA / divisor); - } + case "KPPRA": + return Math.floor(globalSettings.defaultKPPRA / this.divisor); case "spacing": return 0.3; default: @@ -145,7 +137,7 @@ export default abstract class PointsGridFormDataProvider< // if `data` is present and material is updated, prioritize `data` when `preferGridMetric` is not set return this.preferGridMetric ? { - dimensions: this.calculateDimensions({ gridMetricType, gridMetricValue }), + dimensions: this.calculateDimensions(gridMetricType, gridMetricValue), shifts: defaultShifts, gridMetricType, gridMetricValue, @@ -156,7 +148,7 @@ export default abstract class PointsGridFormDataProvider< return defaultData; } - private get jsonSchemaPatchConfig() { + protected get jsonSchemaPatchConfig() { const metricDescription = { KPPRA: `${this.name.toUpperCase()}PPRA (${this.name}pt per reciprocal atom)`, // KPPRA or QPPRA spacing: "grid spacing", @@ -229,7 +221,7 @@ export default abstract class PointsGridFormDataProvider< "ui:emptyValue": emptyValue, "ui:label": false, }, - }; + } as const; }; return { @@ -259,11 +251,11 @@ export default abstract class PointsGridFormDataProvider< }; } - private calculateDimensions({ - gridMetricType, - gridMetricValue, - }: // units = Units.angstrom, - Pick): Vector3DSchema { + private calculateDimensions( + gridMetricType: GridMetricType, + gridMetricValue: number, + // units = Units.angstrom, + ): Vector3DSchema { switch (gridMetricType) { case "KPPRA": { const nAtoms = this.material ? this.material.Basis.nAtoms : 1; @@ -281,47 +273,45 @@ export default abstract class PointsGridFormDataProvider< } } - private calculateGridMetric({ - gridMetricType, - dimensions, - }: // units = Units.angstrom, - Pick) { + private calculateGridMetric( + gridMetricType: GridMetricType, + dimensions: Vector3DSchema, + // units = Units.angstrom, + ) { switch (gridMetricType) { case "KPPRA": { const nAtoms = this.material ? this.material.Basis.nAtoms : 1; return dimensions.reduce((a, b) => a * b) * nAtoms; } case "spacing": - return lodash.round( - this.reciprocalLattice.getSpacingFromDimensions(dimensions, Units.angstrom), - 3, + return Number( + this.reciprocalLattice + .getSpacingFromDimensions(dimensions, Units.angstrom) + .toFixed(3), ); default: return 1; } } - setData(data?: Data) { - const canTransform = - (data?.preferGridMetric && data?.gridMetricType && data?.gridMetricValue) || - (!data?.preferGridMetric && data?.dimensions?.every((d) => typeof d === "number")); + setData(data: Data) { + const { dimensions, gridMetricType, preferGridMetric, gridMetricValue } = data; - if (!data || !canTransform) { - return super.setData(data); + if (preferGridMetric && gridMetricType && gridMetricValue) { + return super.setData({ + ...data, + dimensions: this.calculateDimensions(gridMetricType, gridMetricValue), + }); } - // dimensions are calculated from grid metric or vice versa - if (data.preferGridMetric) { - return super.setData({ + if (!preferGridMetric && dimensions.every((d) => typeof d === "number")) { + super.setData({ ...data, - dimensions: this.calculateDimensions(data), + gridMetricValue: this.calculateGridMetric(gridMetricType, dimensions), }); } - super.setData({ - ...data, - gridMetricValue: this.calculateGridMetric(data), - }); + return super.setData(data); } } diff --git a/src/js/context/providers/PointsGrid/QGridFormDataManager.ts b/src/js/context/providers/PointsGrid/QGridFormDataManager.ts index 4ce4c14a..3b80a542 100644 --- a/src/js/context/providers/PointsGrid/QGridFormDataManager.ts +++ b/src/js/context/providers/PointsGrid/QGridFormDataManager.ts @@ -1,9 +1,32 @@ -import PointsGridFormDataProvider from "./PointsGridFormDataProvider"; +import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; +import type { GridContextItemSchema } from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; + +import type { UnitContext } from "../base/ContextProvider"; +import PointsGridFormDataProvider, { type ExternalContext } from "./PointsGridFormDataProvider"; type Name = "qgrid"; +type Schema = GridContextItemSchema; export default class QGridFormDataManager extends PointsGridFormDataProvider { - readonly name: Name = "qgrid"; + readonly name = "qgrid" as const; + + readonly divisor = 5 as const; + + readonly jsonSchema: JSONSchema7 | undefined; + + constructor(contextItem: Partial, externalContext: ExternalContext) { + super(contextItem, externalContext); + + this.jsonSchema = JSONSchemasInterface.getPatchedSchemaById( + this.jsonSchemaId, + this.jsonSchemaPatchConfig, + ); + } + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "qgrid"); - readonly divisor: number = 5; + return new QGridFormDataManager(contextItem, externalContext); + } } diff --git a/src/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.ts b/src/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.ts index dde317b6..dfb8cf9e 100644 --- a/src/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.ts +++ b/src/js/context/providers/PointsPath/ExplicitKPath2PIBAFormDataManager.ts @@ -1,11 +1,26 @@ -import PointsPathFormDataProvider from "./PointsPathFormDataProvider"; +import type { PathContextItemSchema } from "@mat3ra/esse/dist/js/types"; + +import type { UnitContext } from "../base/ContextProvider"; +import PointsPathFormDataProvider, { + type PointsPathFormDataProviderExternalContext, +} from "./PointsPathFormDataProvider"; type Name = "explicitKPath2PIBA"; +type Schema = PathContextItemSchema; export default class ExplicitKPath2PIBAFormDataManager extends PointsPathFormDataProvider { - readonly name: Name = "explicitKPath2PIBA"; + readonly name = "explicitKPath2PIBA" as const; readonly is2PIBA = true; readonly useExplicitPath = true; + + static createFromUnitContext( + unitContext: UnitContext, + externalContext: PointsPathFormDataProviderExternalContext, + ) { + const contextItem = this.findContextItem(unitContext, "explicitKPath2PIBA"); + + return new ExplicitKPath2PIBAFormDataManager(contextItem, externalContext); + } } diff --git a/src/js/context/providers/PointsPath/ExplicitKPathFormDataManager.ts b/src/js/context/providers/PointsPath/ExplicitKPathFormDataManager.ts index 5cffa4bc..1a037e50 100644 --- a/src/js/context/providers/PointsPath/ExplicitKPathFormDataManager.ts +++ b/src/js/context/providers/PointsPath/ExplicitKPathFormDataManager.ts @@ -1,9 +1,24 @@ -import PointsPathFormDataProvider from "./PointsPathFormDataProvider"; +import type { PathContextItemSchema } from "@mat3ra/esse/dist/js/types"; + +import type { UnitContext } from "../base/ContextProvider"; +import PointsPathFormDataProvider, { + type PointsPathFormDataProviderExternalContext, +} from "./PointsPathFormDataProvider"; type Name = "explicitKPath"; +type Schema = PathContextItemSchema; export default class ExplicitKPathFormDataManager extends PointsPathFormDataProvider { - readonly name: Name = "explicitKPath"; + readonly name = "explicitKPath" as const; readonly useExplicitPath = true; + + static createFromUnitContext( + unitContext: UnitContext, + externalContext: PointsPathFormDataProviderExternalContext, + ) { + const contextItem = this.findContextItem(unitContext, "explicitKPath"); + + return new ExplicitKPathFormDataManager(contextItem, externalContext); + } } diff --git a/src/js/context/providers/PointsPath/IPathFormDataManager.ts b/src/js/context/providers/PointsPath/IPathFormDataManager.ts index 9d29fabb..cabdff33 100644 --- a/src/js/context/providers/PointsPath/IPathFormDataManager.ts +++ b/src/js/context/providers/PointsPath/IPathFormDataManager.ts @@ -1,7 +1,22 @@ -import PointsPathFormDataProvider from "./PointsPathFormDataProvider"; +import type { PathContextItemSchema } from "@mat3ra/esse/dist/js/types"; + +import type { UnitContext } from "../base/ContextProvider"; +import PointsPathFormDataProvider, { + type PointsPathFormDataProviderExternalContext, +} from "./PointsPathFormDataProvider"; type Name = "ipath"; +type Schema = PathContextItemSchema; export default class IPathFormDataManager extends PointsPathFormDataProvider { - readonly name: Name = "ipath"; + readonly name = "ipath" as const; + + static createFromUnitContext( + unitContext: UnitContext, + externalContext: PointsPathFormDataProviderExternalContext, + ) { + const contextItem = this.findContextItem(unitContext, "ipath"); + + return new IPathFormDataManager(contextItem, externalContext); + } } diff --git a/src/js/context/providers/PointsPath/KPathFormDataManager.ts b/src/js/context/providers/PointsPath/KPathFormDataManager.ts index 5e4e8461..108a953d 100644 --- a/src/js/context/providers/PointsPath/KPathFormDataManager.ts +++ b/src/js/context/providers/PointsPath/KPathFormDataManager.ts @@ -1,7 +1,22 @@ -import PointsPathFormDataProvider from "./PointsPathFormDataProvider"; +import type { PathContextItemSchema } from "@mat3ra/esse/dist/js/types"; + +import type { UnitContext } from "../base/ContextProvider"; +import PointsPathFormDataProvider, { + type PointsPathFormDataProviderExternalContext, +} from "./PointsPathFormDataProvider"; type Name = "kpath"; +type Schema = PathContextItemSchema; export default class KPathFormDataManager extends PointsPathFormDataProvider { - readonly name: Name = "kpath"; + readonly name = "kpath" as const; + + static createFromUnitContext( + unitContext: UnitContext, + externalContext: PointsPathFormDataProviderExternalContext, + ) { + const contextItem = this.findContextItem(unitContext, "kpath"); + + return new KPathFormDataManager(contextItem, externalContext); + } } diff --git a/src/js/context/providers/PointsPath/PointsPathFormDataProvider.ts b/src/js/context/providers/PointsPath/PointsPathFormDataProvider.ts index 2929e21e..3a5ffd8a 100644 --- a/src/js/context/providers/PointsPath/PointsPathFormDataProvider.ts +++ b/src/js/context/providers/PointsPath/PointsPathFormDataProvider.ts @@ -1,35 +1,42 @@ import { math as codeJSMath } from "@mat3ra/code/dist/js/math"; import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { PointsPathDataProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { + PathContextItemSchema, + PointsPathDataProviderSchema, +} from "@mat3ra/esse/dist/js/types"; import { type ReciprocalLattice, Made } from "@mat3ra/made"; -import s from "underscore.string"; -import { +import applicationContextMixin, { type ApplicationContextMixin, - applicationContextMixin, + type ApplicationExternalContext, } from "../../mixins/ApplicationContextMixin"; import materialContextMixin, { type MaterialContextMixin, type MaterialExternalContext, } from "../../mixins/MaterialContextMixin"; -import type { ContextItem, Domain } from "../base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext } from "../base/JSONSchemaDataProvider"; const defaultPoint = "Г" as const; const defaultSteps = 10 as const; -type Data = PointsPathDataProviderSchema; // same as KPointCoordinates +export type PointsPathFormDataProviderData = PointsPathDataProviderSchema; // same as KPointCoordinates +export type PointsPathFormDataProviderExternalContext = JinjaExternalContext & + MaterialExternalContext & + ApplicationExternalContext; + +type Data = PointsPathFormDataProviderData; type DataItem = Data[0]; -type ExternalContext = JinjaExternalContext & MaterialExternalContext & ApplicationContextMixin; -type Base = typeof JSONSchemaDataProvider & +type Schema = PathContextItemSchema; +type ExternalContext = PointsPathFormDataProviderExternalContext; +type Base = typeof JSONSchemaDataProvider & Constructor & Constructor; const jsonSchemaId = "context-providers-directory/points-path-data-provider"; abstract class MixinsContextProvider extends (JSONSchemaDataProvider as Base) { - constructor(contextItem: ContextItem, externalContext: ExternalContext) { + constructor(contextItem: Partial, externalContext: ExternalContext) { super(contextItem, externalContext); this.initMaterialContextMixin(externalContext); this.initApplicationContextMixin(externalContext); @@ -39,10 +46,12 @@ abstract class MixinsContextProvider extends (JSONSchemaDataProvider as Base) { materialContextMixin(MixinsContextProvider.prototype); applicationContextMixin(MixinsContextProvider.prototype); -abstract class PointsPathFormDataProvider extends MixinsContextProvider { +abstract class PointsPathFormDataProvider extends MixinsContextProvider { abstract name: N; - readonly domain: Domain = "important"; + readonly domain = "important" as const; + + readonly entityName = "unit" as const; private reciprocalLattice: ReciprocalLattice; @@ -50,7 +59,7 @@ abstract class PointsPathFormDataProvider extends MixinsContex readonly is2PIBA: boolean = false; - constructor(config: ContextItem, externalContext: ExternalContext) { + constructor(config: Partial, externalContext: ExternalContext) { super(config, externalContext); this.reciprocalLattice = new Made.ReciprocalLattice(this.material.lattice); this.useExplicitPath = this.application.name === "vasp"; @@ -105,7 +114,7 @@ abstract class PointsPathFormDataProvider extends MixinsContex return { ...p, - coordinates: coordinates.map((c) => +s.sprintf("%14.9f", c)), + coordinates: coordinates.map((c) => Number(c.toFixed(9))), }; }) as Data; @@ -131,7 +140,6 @@ abstract class PointsPathFormDataProvider extends MixinsContex const steps = 1; - // TODO-QUESTION: confirm that "point" property should be present after transformation; point was missing in original implementation acc.push( { steps, @@ -141,8 +149,8 @@ abstract class PointsPathFormDataProvider extends MixinsContex ...middlePoints.map((coordinates) => ({ steps, coordinates, - // TODO-QUESTION: is this correct? - point: startPoint.point, + // TODO: make point optional + // point: startPoint.point, })), ); diff --git a/src/js/context/providers/PointsPath/QPathFormDataManager.ts b/src/js/context/providers/PointsPath/QPathFormDataManager.ts index e16a5d03..830834c7 100644 --- a/src/js/context/providers/PointsPath/QPathFormDataManager.ts +++ b/src/js/context/providers/PointsPath/QPathFormDataManager.ts @@ -1,7 +1,22 @@ -import PointsPathFormDataProvider from "./PointsPathFormDataProvider"; +import type { PathContextItemSchema } from "@mat3ra/esse/dist/js/types"; + +import type { UnitContext } from "../base/ContextProvider"; +import PointsPathFormDataProvider, { + type PointsPathFormDataProviderExternalContext, +} from "./PointsPathFormDataProvider"; type Name = "qpath"; +type Schema = PathContextItemSchema; export default class QPathFormDataManager extends PointsPathFormDataProvider { - readonly name: Name = "qpath"; + readonly name = "qpath" as const; + + static createFromUnitContext( + unitContext: UnitContext, + externalContext: PointsPathFormDataProviderExternalContext, + ) { + const contextItem = this.findContextItem(unitContext, "qpath"); + + return new QPathFormDataManager(contextItem, externalContext); + } } diff --git a/src/js/context/providers/base/ContextProvider.ts b/src/js/context/providers/base/ContextProvider.ts index dfb22bd8..b85c8ec1 100644 --- a/src/js/context/providers/base/ContextProvider.ts +++ b/src/js/context/providers/base/ContextProvider.ts @@ -1,85 +1,54 @@ -/* - * @summary This is a standalone class that contains "data" for a property with "name". Helps facilitate UI logic. - * Can be initialized from context when user edits are present: - * - user edits the corresponding property, eg. "kpath" - * - isKpathEdited is set to `true` - * - context property is updated for the parent entity (eg. Unit) in a way that persists in Redux state - * - new entity inherits the "data" through "context" field in config - * - `extraData` field is used to store any other data that should be passed from one instance of provider - * to next one, for example data about material to track when it is changed. - * @notes Should hold static data only (see `setData` method), no classes or functions - */ -import { ContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import { type ContextItemSchema } from "@mat3ra/esse/dist/js/types"; import { Utils } from "@mat3ra/utils"; -export interface ContextProviderInstance { - constructor: typeof ContextProvider; - config: ContextProviderSchema; -} +export type UnitContext = ContextItemSchema[]; +export type ContextName = ContextItemSchema["name"]; +export type ContextExtraData = ContextItemSchema["extraData"]; +export type ContextData = ContextItemSchema["data"]; -export type ContextProviderConfig< - N extends string = string, - D extends object = object, - ED extends object = object, +export type ContextItem< + D extends ContextData = ContextData, + ED extends ContextExtraData = ContextExtraData, > = { - name: N; - data?: D; - extraData?: ED; - domain?: string; - entityName?: EntityName; - isEdited?: boolean; -}; - -export type ContextItem = { data?: D; extraData?: ED; isEdited?: boolean; }; -export type ExtendedContextItem< - N extends string = string, - D extends object = object, - ED extends object = object, -> = ContextItem & { - name: N; - isEdited: boolean; -}; - export type Domain = "executable" | "important"; export type EntityName = "unit" | "subworkflow"; -export type ExternalContext = object; +/** Minimal bound for provider external context; the full contract is ExternalContext in context/providers/index.ts */ +export type BaseExternalContext = object; abstract class ContextProvider< - N extends string = string, - D extends object = object, - ED extends object = object, - EC extends ExternalContext = ExternalContext, - // eslint-disable-next-line prettier/prettier -> implements ContextProviderConfig { - abstract name: N; + S extends ContextItemSchema = ContextItemSchema, + EC extends BaseExternalContext = BaseExternalContext, +> { + abstract name: S["name"]; abstract readonly domain: Domain; abstract readonly entityName: EntityName; - protected abstract getDefaultData(): D; + protected abstract getDefaultData(): S["data"]; - data?: D; + protected data?: S["data"]; - readonly extraData?: ED; + abstract extraData: S["extraData"]; readonly externalContext: EC; isEdited: boolean; - constructor(contextItem: ContextItem, externalContext: EC) { + constructor(contextItem: Partial, externalContext: EC) { this.externalContext = externalContext; - this.extraData = contextItem.extraData; this.isEdited = contextItem.isEdited || false; - this.setData(contextItem.data); + if (contextItem.data) { + this.setData(contextItem.data); + } } setIsEdited(isEdited: boolean) { @@ -90,17 +59,29 @@ abstract class ContextProvider< return this.isEdited && this.data ? this.data : this.getDefaultData(); } - setData(data?: D) { - this.data = data ? Utils.clone.deepClone(data) : undefined; + setData(data: S["data"]) { + this.data = Utils.clone.deepClone(data); } - getContextItem(): ExtendedContextItem { + getContextItemData(): S { return { name: this.name, isEdited: this.isEdited, data: this.getData(), extraData: this.extraData, - }; + } as S; + } + + /** + * Helper method to find a context item from a unit context array by name. + * Returns a partial schema object that can be safely passed to constructors. + */ + protected static findContextItem( + unitContext: UnitContext, + contextName: ContextName, + ): Partial { + const item = unitContext.find((item): item is S => item.name === contextName); + return item || {}; } } diff --git a/src/js/context/providers/base/JSONSchemaDataProvider.ts b/src/js/context/providers/base/JSONSchemaDataProvider.ts index dddf64b5..84ca17f4 100644 --- a/src/js/context/providers/base/JSONSchemaDataProvider.ts +++ b/src/js/context/providers/base/JSONSchemaDataProvider.ts @@ -1,10 +1,9 @@ -/* eslint-disable class-methods-use-this */ import type { JSONSchema } from "@mat3ra/esse/dist/js/esse/utils"; +import type { ContextItemSchema } from "@mat3ra/esse/dist/js/types"; -import type { ContextItem, EntityName, ExternalContext } from "./ContextProvider"; import ContextProvider from "./ContextProvider"; -export interface JinjaExternalContext extends ExternalContext { +export interface JinjaExternalContext { isUsingJinjaVariables?: boolean; } @@ -12,19 +11,17 @@ export interface JinjaExternalContext extends ExternalContext { * @summary Provides jsonSchema only. */ abstract class JSONSchemaDataProvider< - N extends string = string, - D extends object = object, - ED extends object = object, + S extends ContextItemSchema = ContextItemSchema, EC extends JinjaExternalContext = JinjaExternalContext, // eslint-disable-next-line prettier/prettier -> extends ContextProvider { +> extends ContextProvider { abstract readonly jsonSchema: JSONSchema | undefined; - readonly entityName: EntityName = "unit"; + readonly entityName = "unit" as const; isUsingJinjaVariables: boolean; - constructor(contextItem: ContextItem, externalContext: EC) { + constructor(contextItem: Partial, externalContext: EC) { super(contextItem, externalContext); this.isUsingJinjaVariables = Boolean(externalContext?.isUsingJinjaVariables); } diff --git a/src/js/context/providers/base/JSONSchemaFormDataProvider.ts b/src/js/context/providers/base/JSONSchemaFormDataProvider.ts index 8661ac51..a1159417 100644 --- a/src/js/context/providers/base/JSONSchemaFormDataProvider.ts +++ b/src/js/context/providers/base/JSONSchemaFormDataProvider.ts @@ -1,5 +1,4 @@ -/* eslint-disable class-methods-use-this */ -// import { JSONSchemaDataProvider } from "@mat3ra/ade"; +import type { ContextItemSchema } from "@mat3ra/esse/dist/js/types"; import type { UiSchema } from "react-jsonschema-form"; import JSONSchemaDataProvider, { type JinjaExternalContext } from "./JSONSchemaDataProvider"; @@ -15,11 +14,9 @@ import JSONSchemaDataProvider, { type JinjaExternalContext } from "./JSONSchemaD * ``` */ abstract class JSONSchemaFormDataProvider< - N extends string = string, - D extends object = object, - ED extends object = object, + S extends ContextItemSchema = ContextItemSchema, EC extends JinjaExternalContext = JinjaExternalContext, -> extends JSONSchemaDataProvider { +> extends JSONSchemaDataProvider { fields: object = {}; protected abstract uiSchema: UiSchema; diff --git a/src/js/context/providers/by_application/espresso/QENEBContextProvider.ts b/src/js/context/providers/by_application/espresso/QENEBInputDataManager.ts similarity index 56% rename from src/js/context/providers/by_application/espresso/QENEBContextProvider.ts rename to src/js/context/providers/by_application/espresso/QENEBInputDataManager.ts index 66192f1b..df86528f 100644 --- a/src/js/context/providers/by_application/espresso/QENEBContextProvider.ts +++ b/src/js/context/providers/by_application/espresso/QENEBInputDataManager.ts @@ -1,12 +1,11 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { QENEBContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { + InputContextItemSchema, + QENEBContextProviderSchema, +} from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; -import jobContextMixin, { - type JobContextMixin, - type JobExternalContext, -} from "../../../mixins/JobContextMixin"; import materialContextMixin, { type MaterialContextMixin, type MaterialExternalContext, @@ -17,54 +16,52 @@ import materialsContextMixin, { } from "../../../mixins/MaterialsContextMixin"; import materialsSetContextMixin, { type MaterialsSetContextMixin, + type MaterialsSetExternalContext, } from "../../../mixins/MaterialsSetContextMixin"; -import methodDataContextMixin, { - type MethodDataContextMixin, - type MethodDataExternalContext, -} from "../../../mixins/MethodDataContextMixin"; -import workflowContextMixin, { - type WorkflowContextMixin, - type WorkflowExternalContext, -} from "../../../mixins/WorkflowContextMixin"; -import type { ContextItem, Domain } from "../../base/ContextProvider"; +import type { UnitContext } from "../../base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext, } from "../../base/JSONSchemaDataProvider"; -import QEPWXContextProvider from "./QEPWXContextProvider"; +import QEPWXInputDataManager, { + type MethodDataExternalContext, + type WorkflowExternalContext, +} from "./QEPWXInputDataManager"; const jsonSchemaId = "context-providers-directory/by-application/qe-neb-context-provider"; -type Name = "input"; type Data = QENEBContextProviderSchema; +type Schema = InputContextItemSchema & { data: Data }; type ExternalContext = JinjaExternalContext & WorkflowExternalContext & - JobExternalContext & MaterialsExternalContext & MethodDataExternalContext & - MaterialsSetContextMixin & + MaterialsSetExternalContext & MaterialExternalContext; - -type Base = typeof JSONSchemaDataProvider & - Constructor & +type Base = typeof JSONSchemaDataProvider & Constructor & Constructor & - Constructor & - Constructor & - Constructor; + Constructor; -export default class QENEBContextProvider extends (JSONSchemaDataProvider as Base) { - readonly name: Name = "input"; +export default class QENEBInputDataManager extends (JSONSchemaDataProvider as Base) { + readonly name = "input" as const; - readonly domain: Domain = "executable"; + readonly domain = "executable" as const; + + readonly entityName = "unit" as const; + + isEdited = false; + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "input"); + + return new QENEBInputDataManager(contextItem, externalContext); + } readonly jsonSchema: JSONSchema7 | undefined; - constructor(config: ContextItem, externalContext: ExternalContext) { + constructor(config: Partial, externalContext: ExternalContext) { super(config, externalContext); - this.initJobContextMixin(externalContext); this.initMaterialsContextMixin(externalContext); - this.initMethodDataContextMixin(externalContext); - this.initWorkflowContextMixin(externalContext); this.initMaterialContextMixin(externalContext); this.initMaterialsSetContextMixin(externalContext); @@ -73,7 +70,7 @@ export default class QENEBContextProvider extends (JSONSchemaDataProvider as Bas getDefaultData(): Data { const PWXContexts = this.sortMaterialsByIndexInSet(this.materials).map((material) => { - return new QEPWXContextProvider({}, { ...this.externalContext, material }).getData(); + return new QEPWXInputDataManager({}, { ...this.externalContext, material }).getData(); }); const { @@ -90,13 +87,11 @@ export default class QENEBContextProvider extends (JSONSchemaDataProvider as Bas INTERMEDIATE_IMAGES: PWXContexts.slice(1, PWXContexts.length - 1).map((data) => { return data.ATOMIC_POSITIONS; }), + contextProviderName: "qe-neb" as const, }; } } -materialContextMixin(QENEBContextProvider.prototype); -materialsContextMixin(QENEBContextProvider.prototype); -methodDataContextMixin(QENEBContextProvider.prototype); -workflowContextMixin(QENEBContextProvider.prototype); -jobContextMixin(QENEBContextProvider.prototype); -materialsSetContextMixin(QENEBContextProvider.prototype); +materialContextMixin(QENEBInputDataManager.prototype); +materialsContextMixin(QENEBInputDataManager.prototype); +materialsSetContextMixin(QENEBInputDataManager.prototype); diff --git a/src/js/context/providers/by_application/espresso/QEPWXContextProvider.ts b/src/js/context/providers/by_application/espresso/QEPWXInputDataManager.ts similarity index 62% rename from src/js/context/providers/by_application/espresso/QEPWXContextProvider.ts rename to src/js/context/providers/by_application/espresso/QEPWXInputDataManager.ts index 78735264..5f91d14f 100644 --- a/src/js/context/providers/by_application/espresso/QEPWXContextProvider.ts +++ b/src/js/context/providers/by_application/espresso/QEPWXInputDataManager.ts @@ -1,16 +1,18 @@ import { PERIODIC_TABLE } from "@exabyte-io/periodic-table.js"; import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { QEPwxContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { + BaseMethod, + InputContextItemSchema, + JobSchema, + QEPwxContextProviderSchema, +} from "@mat3ra/esse/dist/js/types"; import type { Material } from "@mat3ra/made"; import type { AtomicElementValue } from "@mat3ra/made/dist/js/basis/elements"; import type { JSONSchema7 } from "json-schema"; import path from "path"; +import type { Workflow } from "src/js/Workflow"; -import jobContextMixin, { - type JobContextMixin, - type JobExternalContext, -} from "../../../mixins/JobContextMixin"; import materialContextMixin, { type MaterialContextMixin, type MaterialExternalContext, @@ -19,52 +21,74 @@ import materialsContextMixin, { type MaterialsContextMixin, type MaterialsExternalContext, } from "../../../mixins/MaterialsContextMixin"; -import methodDataContextMixin, { - type MethodDataContextMixin, - type MethodDataExternalContext, -} from "../../../mixins/MethodDataContextMixin"; -import workflowContextMixin, { - type WorkflowContextMixin, - type WorkflowExternalContext, -} from "../../../mixins/WorkflowContextMixin"; -import type { ContextItem, Domain } from "../../base/ContextProvider"; +import type { UnitContext } from "../../base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext, } from "../../base/JSONSchemaDataProvider"; -type Name = "input"; +// TODO: create a task to define correct type for MethodData +type MethodData = BaseMethod["data"] & { + pseudo?: { element: AtomicElementValue; filename?: string; path?: string }[]; +}; + +export type MethodDataExternalContext = { + methodData?: MethodData; +}; + +export type JobExternalContext = { + job?: Pick; +}; + +export type WorkflowExternalContext = { + workflow: Workflow; +}; + type Data = QEPwxContextProviderSchema; +type Schema = InputContextItemSchema & { data: Data }; type ExternalContext = JinjaExternalContext & WorkflowExternalContext & MaterialExternalContext & JobExternalContext & MethodDataExternalContext & MaterialsExternalContext; - -type Base = typeof JSONSchemaDataProvider & - Constructor & +type Base = typeof JSONSchemaDataProvider & Constructor & - Constructor & - Constructor & - Constructor; + Constructor; const jsonSchemaId = "context-providers-directory/by-application/qe-pwx-context-provider"; -export default class QEPWXContextProvider extends (JSONSchemaDataProvider as Base) { - readonly name: Name = "input"; +export default class QEPWXInputDataManager extends (JSONSchemaDataProvider as Base) { + readonly name = "input" as const; + + readonly domain = "executable" as const; + + readonly entityName = "unit" as const; + + isEdited = false; + + methodData?: MethodData; - readonly domain: Domain = "executable"; + job?: Pick; + + workflow: Workflow; + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "input"); + + return new QEPWXInputDataManager(contextItem, externalContext); + } readonly jsonSchema: JSONSchema7 | undefined; - constructor(config: ContextItem, externalContext: ExternalContext) { + constructor(config: Partial, externalContext: ExternalContext) { super(config, externalContext); this.initMaterialsContextMixin(externalContext); - this.initMethodDataContextMixin(externalContext); - this.initWorkflowContextMixin(externalContext); - this.initJobContextMixin(externalContext); this.initMaterialContextMixin(externalContext); + this.methodData = externalContext.methodData || {}; + this.job = externalContext.job; + this.workflow = externalContext.workflow; + this.jsonSchema = JSONSchemasInterface.getSchemaById(jsonSchemaId); } @@ -79,8 +103,7 @@ export default class QEPWXContextProvider extends (JSONSchemaDataProvider as Bas Mass_X: PERIODIC_TABLE[symbol].atomic_mass, PseudoPot_X: pseudo?.filename || path.basename(pseudo?.path || ""), }; - // return s.sprintf("%s %f %s", symbol, el.atomic_mass, filename) || ""; - }); // .join("\n"); + }); const uniqueElementsWithLabels = [...new Set(basis.elementsWithLabelsArray)]; @@ -95,13 +118,7 @@ export default class QEPWXContextProvider extends (JSONSchemaDataProvider as Bas Mass_X: PERIODIC_TABLE[symbol].atomic_mass, PseudoPot_X: pseudo?.filename || path.basename(pseudo?.path || ""), }; - // return s.sprintf("%s%s %f %s", symbol, label, el.atomic_mass, filename) || ""; - }); // .join("\n"); - - // Format numbers with 14 total width, 9 decimal places (equivalent to %14.9f) - // const formatNumber = (num: number) => { - // return Number(num.toFixed(9).padStart(14).trim()); - // }; + }); const CELL_PARAMETERS = { v1: lattice.vectorArrays[0], @@ -109,7 +126,6 @@ export default class QEPWXContextProvider extends (JSONSchemaDataProvider as Bas v3: lattice.vectorArrays[2], }; - // const ATOMIC_POSITIONS = basis.getAtomicPositionsWithConstraintsAsStrings().join("\n"); const ATOMIC_POSITIONS = basis.elementsCoordinatesConstraintsArray.map( ([element, label, coordinate, constraint]) => { return { @@ -125,8 +141,8 @@ export default class QEPWXContextProvider extends (JSONSchemaDataProvider as Bas ); return { - IBRAV: 0, // use CELL_PARAMETERS to define Bravais lattice - RESTART_MODE: job.parent || workflow.hasRelaxation ? "restart" : "from_scratch", + IBRAV: 0, + RESTART_MODE: job?.parent || workflow.hasRelaxation ? "restart" : "from_scratch", ATOMIC_SPECIES, ATOMIC_SPECIES_WITH_LABELS, NAT: basis.atomicPositions.length, @@ -135,14 +151,10 @@ export default class QEPWXContextProvider extends (JSONSchemaDataProvider as Bas ATOMIC_POSITIONS, ATOMIC_POSITIONS_WITHOUT_CONSTRAINTS: basis.atomicPositions.join("\n"), CELL_PARAMETERS, + contextProviderName: "qe-pwx" as const, }; } - private getDataPerMaterial() { - if (!this.materials || this.materials.length <= 1) return {}; - return { perMaterial: this.materials.map((material) => this.buildQEPWXContext(material)) }; - } - getDefaultData() { // the below values are read from PlanewaveDataManager instead // ECUTWFC = 40; @@ -150,13 +162,13 @@ export default class QEPWXContextProvider extends (JSONSchemaDataProvider as Bas return { ...this.buildQEPWXContext(this.material), - ...this.getDataPerMaterial(), + perMaterial: this.materials.map((material) => this.buildQEPWXContext(material)), }; } } -materialContextMixin(QEPWXContextProvider.prototype); -materialsContextMixin(QEPWXContextProvider.prototype); -methodDataContextMixin(QEPWXContextProvider.prototype); -workflowContextMixin(QEPWXContextProvider.prototype); -jobContextMixin(QEPWXContextProvider.prototype); +materialContextMixin(QEPWXInputDataManager.prototype); +materialsContextMixin(QEPWXInputDataManager.prototype); +// methodDataContextMixin(QEPWXInputDataManager.prototype); +// workflowContextMixin(QEPWXInputDataManager.prototype); +// jobContextMixin(QEPWXInputDataManager.prototype); diff --git a/src/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.ts b/src/js/context/providers/by_application/nwchem/NWChemInputDataManager.ts similarity index 53% rename from src/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.ts rename to src/js/context/providers/by_application/nwchem/NWChemInputDataManager.ts index e8c3c8bf..78118d10 100644 --- a/src/js/context/providers/by_application/nwchem/NWChemTotalEnergyContextProvider.ts +++ b/src/js/context/providers/by_application/nwchem/NWChemInputDataManager.ts @@ -1,59 +1,51 @@ import { PERIODIC_TABLE } from "@exabyte-io/periodic-table.js"; import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { NWChemTotalEnergyContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { + InputContextItemSchema, + NWChemTotalEnergyContextProviderSchema, +} from "@mat3ra/esse/dist/js/types"; import type { JSONSchema7 } from "json-schema"; -import jobContextMixin, { - type JobContextMixin, - type JobExternalContext, -} from "../../../mixins/JobContextMixin"; import materialContextMixin, { type MaterialContextMixin, type MaterialExternalContext, } from "../../../mixins/MaterialContextMixin"; -import methodDataContextMixin, { - type MethodDataContextMixin, - type MethodDataExternalContext, -} from "../../../mixins/MethodDataContextMixin"; -import workflowContextMixin, { - type WorkflowContextMixin, - type WorkflowExternalContext, -} from "../../../mixins/WorkflowContextMixin"; -import type { ContextItem, Domain } from "../../base/ContextProvider"; +import type { UnitContext } from "../../base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext, } from "../../base/JSONSchemaDataProvider"; -type Name = "input"; type Data = NWChemTotalEnergyContextProviderSchema; -type ExternalContext = JinjaExternalContext & - WorkflowExternalContext & - JobExternalContext & - MethodDataExternalContext & - MaterialExternalContext; - -type Base = typeof JSONSchemaDataProvider & - Constructor & - Constructor & - Constructor & - Constructor; +type Schema = InputContextItemSchema & { data: Data }; +type ExternalContext = JinjaExternalContext & MaterialExternalContext; +type Base = typeof JSONSchemaDataProvider & + Constructor; const jsonSchemaId = "context-providers-directory/by-application/nwchem-total-energy-context-provider"; -export default class NWChemTotalEnergyContextProvider extends (JSONSchemaDataProvider as Base) { - readonly name: Name = "input"; +export default class NWChemInputDataManager extends (JSONSchemaDataProvider as Base) { + readonly name = "input" as const; - readonly domain: Domain = "executable"; + readonly domain = "executable" as const; + + readonly entityName = "unit" as const; + + isEdited = false; + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "input"); + + return new NWChemInputDataManager(contextItem, externalContext); + } + + readonly contextProviderName = "nwchem-total-energy" as const; readonly jsonSchema: JSONSchema7 | undefined; - constructor(config: ContextItem, externalContext: ExternalContext) { + constructor(config: Partial, externalContext: ExternalContext) { super(config, externalContext); - this.initMethodDataContextMixin(externalContext); - this.initWorkflowContextMixin(externalContext); - this.initJobContextMixin(externalContext); this.initMaterialContextMixin(externalContext); this.jsonSchema = JSONSchemasInterface.getSchemaById(jsonSchemaId); @@ -85,11 +77,9 @@ export default class NWChemTotalEnergyContextProvider extends (JSONSchemaDataPro ATOMIC_SPECIES, FUNCTIONAL: "B3LYP", CARTESIAN: basis.toCartesian !== undefined, + contextProviderName: this.contextProviderName, }; } } -materialContextMixin(NWChemTotalEnergyContextProvider.prototype); -methodDataContextMixin(NWChemTotalEnergyContextProvider.prototype); -workflowContextMixin(NWChemTotalEnergyContextProvider.prototype); -jobContextMixin(NWChemTotalEnergyContextProvider.prototype); +materialContextMixin(NWChemInputDataManager.prototype); diff --git a/src/js/context/providers/by_application/vasp/VASPContextProvider.ts b/src/js/context/providers/by_application/vasp/VASPInputDataManager.ts similarity index 52% rename from src/js/context/providers/by_application/vasp/VASPContextProvider.ts rename to src/js/context/providers/by_application/vasp/VASPInputDataManager.ts index 59369245..52228322 100644 --- a/src/js/context/providers/by_application/vasp/VASPContextProvider.ts +++ b/src/js/context/providers/by_application/vasp/VASPInputDataManager.ts @@ -1,64 +1,51 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { VASPContextProviderSchema } from "@mat3ra/esse/dist/js/types"; +import type { InputContextItemSchema, VASPContextProviderSchema } from "@mat3ra/esse/dist/js/types"; import type { Material } from "@mat3ra/made"; import type { JSONSchema7 } from "json-schema"; -import jobContextMixin, { - type JobContextMixin, - type JobExternalContext, -} from "../../../mixins/JobContextMixin"; import materialContextMixin, { type MaterialContextMixin, type MaterialExternalContext, } from "../../../mixins/MaterialContextMixin"; import materialsContextMixin, { type MaterialsContextMixin, + type MaterialsExternalContext, } from "../../../mixins/MaterialsContextMixin"; -import methodDataContextMixin, { - type MethodDataContextMixin, - type MethodDataExternalContext, -} from "../../../mixins/MethodDataContextMixin"; -import workflowContextMixin, { - type WorkflowContextMixin, - type WorkflowExternalContext, -} from "../../../mixins/WorkflowContextMixin"; -import type { ContextItem, Domain } from "../../base/ContextProvider"; +import type { UnitContext } from "../../base/ContextProvider"; import JSONSchemaDataProvider, { type JinjaExternalContext, } from "../../base/JSONSchemaDataProvider"; -type Name = "input"; type Data = VASPContextProviderSchema; -type ExternalContext = JinjaExternalContext & - WorkflowExternalContext & - JobExternalContext & - MaterialExternalContext & - MethodDataExternalContext & - MaterialsContextMixin; - -type Base = typeof JSONSchemaDataProvider & - Constructor & +type Schema = InputContextItemSchema & { data: Data }; +type ExternalContext = JinjaExternalContext & MaterialExternalContext & MaterialsExternalContext; +type Base = typeof JSONSchemaDataProvider & Constructor & - Constructor & - Constructor & - Constructor; + Constructor; const jsonSchemaId = "context-providers-directory/by-application/vasp-context-provider"; -export default class VASPContextProvider extends (JSONSchemaDataProvider as Base) { - readonly name: Name = "input"; +export default class VASPInputDataManager extends (JSONSchemaDataProvider as Base) { + readonly name = "input" as const; - readonly domain: Domain = "executable"; + readonly domain = "executable" as const; + + readonly entityName = "unit" as const; + + isEdited = false; + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "input"); + + return new VASPInputDataManager(contextItem, externalContext); + } readonly jsonSchema: JSONSchema7 | undefined; - constructor(config: ContextItem, externalContext: ExternalContext) { + constructor(config: Partial, externalContext: ExternalContext) { super(config, externalContext); - this.initJobContextMixin(externalContext); this.initMaterialsContextMixin(externalContext); - this.initMethodDataContextMixin(externalContext); - this.initWorkflowContextMixin(externalContext); this.initMaterialContextMixin(externalContext); this.jsonSchema = JSONSchemasInterface.getSchemaById(jsonSchemaId); @@ -70,13 +57,13 @@ export default class VASPContextProvider extends (JSONSchemaDataProvider as Base // TODO: figure out whether we need two separate POSCARS, maybe one is enough POSCAR: material.getAsPOSCAR(true, true), POSCAR_WITH_CONSTRAINTS: material.getAsPOSCAR(true), + contextProviderName: "vasp" as const, }; } private getDataPerMaterial() { if (!this.materials || this.materials.length <= 1) return {}; - // TODO-QUESTION: perMaterial is not defined in the schema return { perMaterial: this.materials.map((material) => this.buildVASPContext(material)) }; } @@ -92,8 +79,5 @@ export default class VASPContextProvider extends (JSONSchemaDataProvider as Base } } -materialContextMixin(VASPContextProvider.prototype); -materialsContextMixin(VASPContextProvider.prototype); -methodDataContextMixin(VASPContextProvider.prototype); -workflowContextMixin(VASPContextProvider.prototype); -jobContextMixin(VASPContextProvider.prototype); +materialContextMixin(VASPInputDataManager.prototype); +materialsContextMixin(VASPInputDataManager.prototype); diff --git a/src/js/context/providers/by_application/vasp/VASPNEBContextProvider.ts b/src/js/context/providers/by_application/vasp/VASPNEBContextProvider.ts deleted file mode 100644 index 45a88060..00000000 --- a/src/js/context/providers/by_application/vasp/VASPNEBContextProvider.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import type { VASPNEBContextProviderSchema } from "@mat3ra/esse/dist/js/types"; -import type { JSONSchema7 } from "json-schema"; - -import jobContextMixin, { - type JobContextMixin, - type JobExternalContext, -} from "../../../mixins/JobContextMixin"; -import materialContextMixin, { - type MaterialContextMixin, - type MaterialExternalContext, -} from "../../../mixins/MaterialContextMixin"; -import materialsContextMixin, { - type MaterialsContextMixin, -} from "../../../mixins/MaterialsContextMixin"; -import materialsSetContextMixin, { - type MaterialsSetContextMixin, -} from "../../../mixins/MaterialsSetContextMixin"; -import methodDataContextMixin, { - type MethodDataContextMixin, - type MethodDataExternalContext, -} from "../../../mixins/MethodDataContextMixin"; -import workflowContextMixin, { - type WorkflowContextMixin, - type WorkflowExternalContext, -} from "../../../mixins/WorkflowContextMixin"; -import type { ContextItem, Domain } from "../../base/ContextProvider"; -import JSONSchemaDataProvider, { - type JinjaExternalContext, -} from "../../base/JSONSchemaDataProvider"; -import VASPContextProvider from "./VASPContextProvider"; - -type Name = "input"; -type Data = VASPNEBContextProviderSchema; -type ExternalContext = JinjaExternalContext & - WorkflowExternalContext & - JobExternalContext & - MaterialExternalContext & - MethodDataExternalContext & - MaterialsContextMixin & - MaterialsSetContextMixin; - -type Base = typeof JSONSchemaDataProvider & - Constructor & - Constructor & - Constructor & - Constructor & - Constructor & - Constructor; - -const jsonSchemaId = "context-providers-directory/by-application/vasp-neb-context-provider"; - -export default class VASPNEBContextProvider extends (JSONSchemaDataProvider as Base) { - readonly name: Name = "input"; - - readonly domain: Domain = "executable"; - - readonly jsonSchema: JSONSchema7 | undefined; - - constructor(config: ContextItem, externalContext: ExternalContext) { - super(config, externalContext); - this.initMaterialContextMixin(externalContext); - this.initMaterialsContextMixin(externalContext); - this.initMaterialsSetContextMixin(externalContext); - this.initMethodDataContextMixin(externalContext); - this.initWorkflowContextMixin(externalContext); - this.initJobContextMixin(externalContext); - - this.jsonSchema = JSONSchemasInterface.getSchemaById(jsonSchemaId); - } - - getDefaultData() { - const VASPContexts = this.sortMaterialsByIndexInSet(this.materials).map((material) => { - return new VASPContextProvider({}, { ...this.externalContext, material }).getData(); - }); - - return { - FIRST_IMAGE: VASPContexts[0].POSCAR_WITH_CONSTRAINTS, - LAST_IMAGE: VASPContexts[VASPContexts.length - 1].POSCAR_WITH_CONSTRAINTS, - INTERMEDIATE_IMAGES: VASPContexts.slice(1, VASPContexts.length - 1).map((data) => { - return data.POSCAR_WITH_CONSTRAINTS; - }), - }; - } -} - -materialContextMixin(VASPNEBContextProvider.prototype); -materialsContextMixin(VASPNEBContextProvider.prototype); -materialsSetContextMixin(VASPNEBContextProvider.prototype); -methodDataContextMixin(VASPNEBContextProvider.prototype); -workflowContextMixin(VASPNEBContextProvider.prototype); -jobContextMixin(VASPNEBContextProvider.prototype); diff --git a/src/js/context/providers/by_application/vasp/VASPNEBInputDataManager.ts b/src/js/context/providers/by_application/vasp/VASPNEBInputDataManager.ts new file mode 100644 index 00000000..5dd3321e --- /dev/null +++ b/src/js/context/providers/by_application/vasp/VASPNEBInputDataManager.ts @@ -0,0 +1,84 @@ +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; +import type { + InputContextItemSchema, + VASPNEBContextProviderSchema, +} from "@mat3ra/esse/dist/js/types"; +import type { JSONSchema7 } from "json-schema"; + +import materialContextMixin, { + type MaterialContextMixin, + type MaterialExternalContext, +} from "../../../mixins/MaterialContextMixin"; +import materialsContextMixin, { + type MaterialsContextMixin, + type MaterialsExternalContext, +} from "../../../mixins/MaterialsContextMixin"; +import materialsSetContextMixin, { + type MaterialsSetContextMixin, + type MaterialsSetExternalContext, +} from "../../../mixins/MaterialsSetContextMixin"; +import type { UnitContext } from "../../base/ContextProvider"; +import JSONSchemaDataProvider, { + type JinjaExternalContext, +} from "../../base/JSONSchemaDataProvider"; +import VASPInputDataManager from "./VASPInputDataManager"; + +type Data = VASPNEBContextProviderSchema; +type Schema = InputContextItemSchema & { data: Data }; +type ExternalContext = JinjaExternalContext & + MaterialExternalContext & + MaterialsExternalContext & + MaterialsSetExternalContext; +type Base = typeof JSONSchemaDataProvider & + Constructor & + Constructor & + Constructor; + +const jsonSchemaId = "context-providers-directory/by-application/vasp-neb-context-provider"; + +export default class VASPNEBInputDataManager extends (JSONSchemaDataProvider as Base) { + readonly name = "input" as const; + + readonly domain = "executable" as const; + + readonly entityName = "unit" as const; + + isEdited = false; + + static createFromUnitContext(unitContext: UnitContext, externalContext: ExternalContext) { + const contextItem = this.findContextItem(unitContext, "input"); + + return new VASPNEBInputDataManager(contextItem, externalContext); + } + + readonly jsonSchema: JSONSchema7 | undefined; + + constructor(config: Partial, externalContext: ExternalContext) { + super(config, externalContext); + this.initMaterialContextMixin(externalContext); + this.initMaterialsContextMixin(externalContext); + this.initMaterialsSetContextMixin(externalContext); + + this.jsonSchema = JSONSchemasInterface.getSchemaById(jsonSchemaId); + } + + getDefaultData() { + const VASPContexts = this.sortMaterialsByIndexInSet(this.materials).map((material) => { + return new VASPInputDataManager({}, { ...this.externalContext, material }).getData(); + }); + + return { + FIRST_IMAGE: VASPContexts[0].POSCAR_WITH_CONSTRAINTS, + LAST_IMAGE: VASPContexts[VASPContexts.length - 1].POSCAR_WITH_CONSTRAINTS, + INTERMEDIATE_IMAGES: VASPContexts.slice(1, VASPContexts.length - 1).map((data) => { + return data.POSCAR_WITH_CONSTRAINTS; + }), + contextProviderName: "vasp-neb" as const, + }; + } +} + +materialContextMixin(VASPNEBInputDataManager.prototype); +materialsContextMixin(VASPNEBInputDataManager.prototype); +materialsSetContextMixin(VASPNEBInputDataManager.prototype); diff --git a/src/js/context/providers/index.ts b/src/js/context/providers/index.ts new file mode 100644 index 00000000..e5b74e36 --- /dev/null +++ b/src/js/context/providers/index.ts @@ -0,0 +1,155 @@ +import type { AssignmentUnitSchema } from "@mat3ra/esse/dist/js/types"; + +import type { ApplicationExternalContext } from "../mixins/ApplicationContextMixin"; +import type { MaterialExternalContext } from "../mixins/MaterialContextMixin"; +import type { MaterialsExternalContext } from "../mixins/MaterialsContextMixin"; +import type { MaterialsSetExternalContext } from "../mixins/MaterialsSetContextMixin"; +import type { UnitContext } from "./base/ContextProvider"; +import type { JinjaExternalContext } from "./base/JSONSchemaDataProvider"; +import BoundaryConditionsFormDataManager from "./BoundaryConditionsFormDataManager"; +import QENEBInputDataManager from "./by_application/espresso/QENEBInputDataManager"; +import QEPWXInputDataManager, { + type JobExternalContext, + type MethodDataExternalContext, + type WorkflowExternalContext, +} from "./by_application/espresso/QEPWXInputDataManager"; +import NWChemInputDataManager from "./by_application/nwchem/NWChemInputDataManager"; +import VASPInputDataManager from "./by_application/vasp/VASPInputDataManager"; +import VASPNEBInputDataManager from "./by_application/vasp/VASPNEBInputDataManager"; +import CollinearMagnetizationDataManager from "./CollinearMagnetizationDataManager"; +import HubbardContextManagerLegacy from "./Hubbard/HubbardContextManagerLegacy"; +import HubbardJContextManager from "./Hubbard/HubbardJContextManager"; +import HubbardUContextManager from "./Hubbard/HubbardUContextManager"; +import HubbardVContextManager from "./Hubbard/HubbardVContextManager"; +import IonDynamicsDataManager from "./IonDynamicsDataManager"; +import MLSettingsDataManager from "./MLSettingsDataManager"; +import MLTrainTestSplitDataManager from "./MLTrainTestSplitDataManager"; +import NEBFormDataManager from "./NEBFormDataManager"; +import NonCollinearMagnetizationDataManager from "./NonCollinearMagnetizationDataManager"; +import PlanewaveCutoffDataManager from "./PlanewaveCutoffDataManager"; +import IGridFormDataManager from "./PointsGrid/IGridFormDataManager"; +import KGridFormDataManager from "./PointsGrid/KGridFormDataManager"; +import QGridFormDataManager from "./PointsGrid/QGridFormDataManager"; +import ExplicitKPath2PIBAFormDataManager from "./PointsPath/ExplicitKPath2PIBAFormDataManager"; +import ExplicitKPathFormDataManager from "./PointsPath/ExplicitKPathFormDataManager"; +import IPathFormDataManager from "./PointsPath/IPathFormDataManager"; +import KPathFormDataManager from "./PointsPath/KPathFormDataManager"; +import QPathFormDataManager from "./PointsPath/QPathFormDataManager"; + +/** + * Registry mapping provider names (as they appear in templates) to their classes. + * This is the single source of truth for provider mappings. + */ +export const PROVIDER_REGISTRY = { + PlanewaveCutoffDataManager, + KGridFormDataManager, + QGridFormDataManager, + IGridFormDataManager, + QPathFormDataManager, + IPathFormDataManager, + KPathFormDataManager, + ExplicitKPathFormDataManager, + ExplicitKPath2PIBAFormDataManager, + HubbardJContextManager, + HubbardUContextManager, + HubbardVContextManager, + HubbardContextManagerLegacy, + NEBFormDataManager, + BoundaryConditionsFormDataManager, + MLSettingsDataManager, + MLTrainTestSplitDataManager, + IonDynamicsContextProvider: IonDynamicsDataManager, // Note: name mismatch preserved from original + CollinearMagnetizationDataManager, + NonCollinearMagnetizationDataManager, + QEPWXInputDataManager, + QENEBInputDataManager, + VASPInputDataManager, + VASPNEBInputDataManager, + NWChemInputDataManager, +} as const; + +export type AssignmentContext = Record< + AssignmentUnitSchema["operand"], + AssignmentUnitSchema["value"] +>; + +export type SubworkflowContext = { + subworkflowContext: AssignmentContext; +}; + +/** + * External context type used by ExecutionUnitInput when creating providers. + * This type is always expected to be present when providers are instantiated. + */ +export type ExternalContext = ApplicationExternalContext & + WorkflowExternalContext & + JobExternalContext & + MaterialsExternalContext & + MethodDataExternalContext & + MaterialsSetExternalContext & + MaterialExternalContext & + JinjaExternalContext & + SubworkflowContext; + +/** + * Type for provider names as they appear in templates. + */ +export type ProviderName = keyof typeof PROVIDER_REGISTRY; + +/** + * Union type of all context provider instances. + * Derived from the registry for type safety. + */ +export type AnyContextProvider = InstanceType<(typeof PROVIDER_REGISTRY)[ProviderName]>; + +/** + * Factory function to create a context provider instance from its name. + * + * @param name - The provider name as it appears in templates + * @param context - The unit context + * @param externalContext - The external context (must match the ExternalContext type defined in this file) + * @returns An instance of the requested context provider + * @throws Error if the provider name is unknown + */ +export function createProvider( + name: ProviderName, + context: UnitContext, + externalContext: ExternalContext, +): AnyContextProvider { + const ProviderClass = PROVIDER_REGISTRY[name]; + if (!ProviderClass) { + throw new Error(`Unknown provider: ${name}`); + } + // The full ExternalContext is a superset of each provider's expected context type, + // so passing it to every provider's createFromUnitContext is type-safe (no assertion). + return ProviderClass.createFromUnitContext(context, externalContext); +} + +// Re-export all provider classes for convenience +export { + BoundaryConditionsFormDataManager, + QENEBInputDataManager, + QEPWXInputDataManager, + NWChemInputDataManager, + VASPInputDataManager, + VASPNEBInputDataManager, + CollinearMagnetizationDataManager, + HubbardContextManagerLegacy, + HubbardJContextManager, + HubbardUContextManager, + HubbardVContextManager, + IonDynamicsDataManager, + MLSettingsDataManager, + MLTrainTestSplitDataManager, + NEBFormDataManager, + NonCollinearMagnetizationDataManager, + PlanewaveCutoffDataManager, + IGridFormDataManager, + KGridFormDataManager, + QGridFormDataManager, + ExplicitKPath2PIBAFormDataManager, + ExplicitKPathFormDataManager, + IPathFormDataManager, + KPathFormDataManager, + QPathFormDataManager, +}; diff --git a/src/js/context/providers/settings.ts b/src/js/context/providers/settings.ts index ccb19e9f..ee6b2497 100644 --- a/src/js/context/providers/settings.ts +++ b/src/js/context/providers/settings.ts @@ -1,37 +1,34 @@ -import { Application } from "@mat3ra/ade"; -import { Made } from "@mat3ra/made"; +import type { ApplicationStandata } from "@mat3ra/standata"; -class GlobalSettings { - "PointsGridFormDataProvider.defaultKPPRA" = 5; - - Material = Made.Material; +type Instance = InstanceType; - Application = Application; +export interface ApplicationsDriver { + getExecutableAndFlavorByName: Instance["getExecutableAndFlavorByName"]; + getInput: Instance["getInput"]; +} - constructor() { - this.resetDefaults(); - } +class GlobalSettings { + "PointsGridFormDataProvider.defaultKPPRA" = 5; get defaultKPPRA() { return this["PointsGridFormDataProvider.defaultKPPRA"]; } - setApplication(application: typeof Application) { - this.Application = application; + setDefaultKPPRA(kppra: number) { + this["PointsGridFormDataProvider.defaultKPPRA"] = kppra; } - setMaterial(material: typeof Made.Material) { - this.Material = material; - } + private applicationsDriver: ApplicationsDriver | null = null; - setDefaultKPPRA(kppra: number) { - this["PointsGridFormDataProvider.defaultKPPRA"] = kppra; + setupApplicationsDriver(driver: ApplicationsDriver) { + this.applicationsDriver = driver; } - resetDefaults() { - this.Material = Made.Material; - this.Application = Application; - this["PointsGridFormDataProvider.defaultKPPRA"] = 5; + getApplicationsDriver() { + if (!this.applicationsDriver) { + throw new Error("Wode Applications driver not set"); + } + return this.applicationsDriver; } } diff --git a/src/js/convergence/ConvergenceParameter.ts b/src/js/convergence/ConvergenceParameter.ts new file mode 100644 index 00000000..5d5d47c1 --- /dev/null +++ b/src/js/convergence/ConvergenceParameter.ts @@ -0,0 +1,37 @@ +interface ConvergenceParameterProps { + initialValue: number | [number, number, number]; +} + +export type ConvergenceParameterConfig = ConvergenceParameterProps & { + increment?: string | number; +}; + +export type UnitContext = { + data: { + dimensions: [string, string, string]; + shifts: [0, 0, 0]; + }; + isUsingJinjaVariables: true; +}; + +export default abstract class ConvergenceParameter { + abstract readonly name: "N_k" | "N_k_nonuniform"; + + abstract readonly finalValue: string; + + abstract readonly increment: string; + + abstract readonly unitContext: UnitContext; + + readonly initialValue: string; + + constructor({ initialValue }: ConvergenceParameterProps) { + this.initialValue = + typeof initialValue === "string" ? initialValue : JSON.stringify(initialValue); + } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this + useVariablesFromUnitContext(_flowchartId: string): { scope: string; name: string }[] { + return []; + } +} diff --git a/src/js/convergence/NonUniformKGridConvergence.ts b/src/js/convergence/NonUniformKGridConvergence.ts new file mode 100644 index 00000000..28cded4c --- /dev/null +++ b/src/js/convergence/NonUniformKGridConvergence.ts @@ -0,0 +1,38 @@ +import ConvergenceParameter, { + type ConvergenceParameterConfig, + type UnitContext, +} from "./ConvergenceParameter"; + +export default class NonUniformKGridConvergence extends ConvergenceParameter { + readonly increment: string; + + readonly name = "N_k_nonuniform" as const; + + readonly finalValue = "N_k_nonuniform" as const; + + readonly unitContext: UnitContext = { + data: { + dimensions: [`{{${this.name}[0]}}`, `{{${this.name}[1]}}`, `{{${this.name}[2]}}`], + shifts: [0, 0, 0], + }, + isUsingJinjaVariables: true, + }; + + constructor({ initialValue, increment }: ConvergenceParameterConfig) { + super({ initialValue }); + + this.increment = `[${this.initialValue}[i] + math.floor(iteration * ${ + increment || "" + } * float(context['kgrid']['reciprocalVectorRatios'][i])) for i in range(3)]`; + } + + // eslint-disable-next-line class-methods-use-this + useVariablesFromUnitContext(flowchartId: string) { + return [ + { + scope: flowchartId, + name: "context", + }, + ]; + } +} diff --git a/src/js/convergence/UniformKGridConvergence.ts b/src/js/convergence/UniformKGridConvergence.ts new file mode 100644 index 00000000..3ac7ea04 --- /dev/null +++ b/src/js/convergence/UniformKGridConvergence.ts @@ -0,0 +1,26 @@ +import ConvergenceParameter, { + type ConvergenceParameterConfig, + type UnitContext, +} from "./ConvergenceParameter"; + +export default class UniformKGridConvergence extends ConvergenceParameter { + readonly increment: string; + + readonly name = "N_k" as const; + + readonly finalValue = `${this.name} + 0` as const; + + readonly unitContext: UnitContext = { + data: { + dimensions: [`{{${this.name}}}`, `{{${this.name}}}`, `{{${this.name}}}`], + shifts: [0, 0, 0], + }, + isUsingJinjaVariables: true, + }; + + constructor({ initialValue, increment }: ConvergenceParameterConfig) { + super({ initialValue }); + + this.increment = `${this.name} + ${increment || ""}`; + } +} diff --git a/src/js/convergence/factory.ts b/src/js/convergence/factory.ts new file mode 100644 index 00000000..888237eb --- /dev/null +++ b/src/js/convergence/factory.ts @@ -0,0 +1,18 @@ +import { type ConvergenceParameterConfig } from "./ConvergenceParameter"; +import NonUniformKGridConvergence from "./NonUniformKGridConvergence"; +import UniformKGridConvergence from "./UniformKGridConvergence"; + +type FactoryParams = ConvergenceParameterConfig & { + name: "N_k" | "N_k_nonuniform"; +}; + +export function createConvergenceParameter({ name, ...params }: FactoryParams) { + switch (name) { + case "N_k": + return new UniformKGridConvergence(params); + case "N_k_nonuniform": + return new NonUniformKGridConvergence(params); + default: + throw new Error(`Invalid convergence parameter name: ${name}`); + } +} diff --git a/src/js/enums.ts b/src/js/enums.ts index 675ab294..ee819d61 100644 --- a/src/js/enums.ts +++ b/src/js/enums.ts @@ -1,10 +1,3 @@ -/** - * THIS ENUMS ARE SHARED WITH TESTS. - * DO NOT IMPORT ANYTHINGS IN THIS MODULE. - */ - -export const IO_ID_COLUMN = "exabyteId"; - export const UNIT_TYPES = { // not currently used convergence: "convergence", @@ -16,10 +9,9 @@ export const UNIT_TYPES = { assignment: "assignment", condition: "condition", subworkflow: "subworkflow", - processing: "processing", io: "io", assertion: "assertion", -}; +} as const; export enum UnitType { convergence = "convergence", @@ -30,28 +22,27 @@ export enum UnitType { assignment = "assignment", condition = "condition", subworkflow = "subworkflow", - processing = "processing", io = "io", assertion = "assertion", } -export const UNIT_STATUSES = { - idle: "idle", - active: "active", - finished: "finished", - error: "error", - warning: "warning", -}; +export enum UnitTag { + hasConvergenceParam = "hasConvergenceParam", + hasConvergenceResult = "hasConvergenceResult", +} -export const UNIT_TAGS = { - hasConvergenceParam: "hasConvergenceParam", - hasConvergenceResult: "hasConvergenceResult", -}; +export enum UnitStatus { + idle = "idle", + active = "active", + finished = "finished", + error = "error", + warning = "warning", +} export const WORKFLOW_STATUSES = { "up-to-date": "up-to-date", outdated: "outdated", -}; +} as const; export const TAB_NAVIGATION_CONFIG = { overview: { @@ -74,6 +65,6 @@ export const TAB_NAVIGATION_CONFIG = { className: "", href: "sw-compute", }, -}; +} as const; export const UNIT_NAME_INVALID_CHARS = "/"; diff --git a/src/js/generated/ExecutionUnitSchemaMixin.ts b/src/js/generated/ExecutionUnitSchemaMixin.ts index e2d77e43..07c32eda 100644 --- a/src/js/generated/ExecutionUnitSchemaMixin.ts +++ b/src/js/generated/ExecutionUnitSchemaMixin.ts @@ -11,7 +11,7 @@ export function executionUnitSchemaMixin( // @ts-expect-error const properties: InMemoryEntity & ExecutionUnitSchemaMixin = { get type() { - return this.prop("type"); + return this.requiredProp("type"); }, set type(value: ExecutionUnitMixinSchema["type"]) { this.setProp("type", value); @@ -23,13 +23,13 @@ export function executionUnitSchemaMixin( this.setProp("application", value); }, get executable() { - return this.prop("executable"); + return this.requiredProp("executable"); }, set executable(value: ExecutionUnitMixinSchema["executable"]) { this.setProp("executable", value); }, get flavor() { - return this.prop("flavor"); + return this.requiredProp("flavor"); }, set flavor(value: ExecutionUnitMixinSchema["flavor"]) { this.setProp("flavor", value); @@ -41,7 +41,7 @@ export function executionUnitSchemaMixin( this.setProp("input", value); }, get context() { - return this.prop("context"); + return this.requiredProp("context"); }, set context(value: ExecutionUnitMixinSchema["context"]) { this.setProp("context", value); diff --git a/src/js/generated/ProcessingUnitSchemaMixin.ts b/src/js/generated/ProcessingUnitSchemaMixin.ts deleted file mode 100644 index 963c2c82..00000000 --- a/src/js/generated/ProcessingUnitSchemaMixin.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; -import type { ProcessingUnitMixinSchema } from "@mat3ra/esse/dist/js/types"; - -export type ProcessingUnitSchemaMixin = ProcessingUnitMixinSchema; - -export type ProcessingUnitInMemoryEntity = InMemoryEntity & ProcessingUnitSchemaMixin; - -export function processingUnitSchemaMixin( - item: InMemoryEntity, -): asserts item is T & ProcessingUnitSchemaMixin { - // @ts-expect-error - const properties: InMemoryEntity & ProcessingUnitSchemaMixin = { - get type() { - return this.prop("type"); - }, - set type(value: ProcessingUnitMixinSchema["type"]) { - this.setProp("type", value); - }, - get operation() { - return this.requiredProp("operation"); - }, - set operation(value: ProcessingUnitMixinSchema["operation"]) { - this.setProp("operation", value); - }, - get operationType() { - return this.requiredProp("operationType"); - }, - set operationType(value: ProcessingUnitMixinSchema["operationType"]) { - this.setProp("operationType", value); - }, - get inputData() { - return this.requiredProp("inputData"); - }, - set inputData(value: ProcessingUnitMixinSchema["inputData"]) { - this.setProp("inputData", value); - }, - }; - - Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); -} diff --git a/src/js/generated/SubworkflowSchemaMixin.ts b/src/js/generated/SubworkflowSchemaMixin.ts index b32fbac5..cb63d88f 100644 --- a/src/js/generated/SubworkflowSchemaMixin.ts +++ b/src/js/generated/SubworkflowSchemaMixin.ts @@ -11,7 +11,7 @@ export function subworkflowSchemaMixin( // @ts-expect-error const properties: InMemoryEntity & SubworkflowSchemaMixin = { get properties() { - return this.prop("properties"); + return this.requiredProp("properties"); }, set properties(value: SubworkflowMixinSchema["properties"]) { this.setProp("properties", value); @@ -40,6 +40,12 @@ export function subworkflowSchemaMixin( set application(value: SubworkflowMixinSchema["application"]) { this.setProp("application", value); }, + get isMultiMaterial() { + return this.prop("isMultiMaterial"); + }, + set isMultiMaterial(value: SubworkflowMixinSchema["isMultiMaterial"]) { + this.setProp("isMultiMaterial", value); + }, get isDraft() { return this.prop("isDraft"); }, diff --git a/src/js/generated/WorkflowSchemaMixin.ts b/src/js/generated/WorkflowSchemaMixin.ts new file mode 100644 index 00000000..67e4e3f5 --- /dev/null +++ b/src/js/generated/WorkflowSchemaMixin.ts @@ -0,0 +1,58 @@ +import type { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; +import type { BaseWorkflowSchema } from "@mat3ra/esse/dist/js/types"; + +export type WorkflowSchemaMixin = BaseWorkflowSchema; + +export type WorkflowInMemoryEntity = InMemoryEntity & WorkflowSchemaMixin; + +export function workflowSchemaMixin( + item: InMemoryEntity, +): asserts item is T & WorkflowSchemaMixin { + // @ts-expect-error + const properties: InMemoryEntity & WorkflowSchemaMixin = { + get properties() { + return this.requiredProp("properties"); + }, + set properties(value: BaseWorkflowSchema["properties"]) { + this.setProp("properties", value); + }, + get isUsingDataset() { + return this.prop("isUsingDataset"); + }, + set isUsingDataset(value: BaseWorkflowSchema["isUsingDataset"]) { + this.setProp("isUsingDataset", value); + }, + get isMultiMaterial() { + return this.prop("isMultiMaterial"); + }, + set isMultiMaterial(value: BaseWorkflowSchema["isMultiMaterial"]) { + this.setProp("isMultiMaterial", value); + }, + get subworkflows() { + return this.requiredProp("subworkflows"); + }, + set subworkflows(value: BaseWorkflowSchema["subworkflows"]) { + this.setProp("subworkflows", value); + }, + get units() { + return this.requiredProp("units"); + }, + set units(value: BaseWorkflowSchema["units"]) { + this.setProp("units", value); + }, + get application() { + return this.prop("application"); + }, + set application(value: BaseWorkflowSchema["application"]) { + this.setProp("application", value); + }, + get tags() { + return this.prop("tags"); + }, + set tags(value: BaseWorkflowSchema["tags"]) { + this.setProp("tags", value); + }, + }; + + Object.defineProperties(item, Object.getOwnPropertyDescriptors(properties)); +} diff --git a/src/js/index.js b/src/js/index.js deleted file mode 100644 index e9b535c5..00000000 --- a/src/js/index.js +++ /dev/null @@ -1,57 +0,0 @@ -import { wodeProviders } from "./context/providers"; -import { PointsPathFormDataProvider } from "./context/providers/PointsPath/PointsPathFormDataProvider"; -import { globalSettings } from "./context/providers/settings"; -import { - TAB_NAVIGATION_CONFIG, - UNIT_NAME_INVALID_CHARS, - UNIT_STATUSES, - UNIT_TYPES, - WORKFLOW_STATUSES, -} from "./enums"; -import { createSubworkflowByName, Subworkflow } from "./subworkflows"; -import { - AssertionUnit, - AssignmentUnit, - BaseUnit, - ConditionUnit, - ExecutionUnit, - IOUnit, - MapUnit, - ProcessingUnit, - ReduceUnit, - SubworkflowUnit, -} from "./units"; -import { builders } from "./units/builders"; -import { UnitFactory } from "./units/factory"; -import { defaultMapConfig } from "./units/MapUnit"; -import { createWorkflow, createWorkflowConfigs, createWorkflows, Workflow } from "./workflows"; - -export { - Subworkflow, - Workflow, - createWorkflow, - createWorkflows, - createWorkflowConfigs, - createSubworkflowByName, - UnitFactory, - builders, - UNIT_TYPES, - UNIT_STATUSES, - TAB_NAVIGATION_CONFIG, - UNIT_NAME_INVALID_CHARS, - WORKFLOW_STATUSES, - BaseUnit, - ExecutionUnit, - AssertionUnit, - AssignmentUnit, - ConditionUnit, - IOUnit, - MapUnit, - ProcessingUnit, - ReduceUnit, - SubworkflowUnit, - defaultMapConfig, - wodeProviders, - PointsPathFormDataProvider, - globalSettings, -}; diff --git a/src/js/index.ts b/src/js/index.ts new file mode 100644 index 00000000..29db36b6 --- /dev/null +++ b/src/js/index.ts @@ -0,0 +1,41 @@ +import PointsPathFormDataProvider from "./context/providers/PointsPath/PointsPathFormDataProvider"; +import { globalSettings } from "./context/providers/settings"; +import { TAB_NAVIGATION_CONFIG, UNIT_NAME_INVALID_CHARS, WORKFLOW_STATUSES } from "./enums"; +import Subworkflow from "./Subworkflow"; +import { + AssertionUnit, + AssignmentUnit, + BaseUnit, + ConditionUnit, + ExecutionUnit, + IOUnit, + MapUnit, + ReduceUnit, + SubworkflowUnit, +} from "./units"; +import { UnitFactory } from "./units/factory"; +import { defaultMapConfig } from "./units/MapUnit"; +import * as utils from "./utils"; +import { Workflow } from "./Workflow"; + +export { + Subworkflow, + Workflow, + UnitFactory, + TAB_NAVIGATION_CONFIG, + UNIT_NAME_INVALID_CHARS, + WORKFLOW_STATUSES, + BaseUnit, + ExecutionUnit, + AssertionUnit, + AssignmentUnit, + ConditionUnit, + IOUnit, + MapUnit, + ReduceUnit, + SubworkflowUnit, + defaultMapConfig, + PointsPathFormDataProvider, + globalSettings, + utils, +}; diff --git a/src/js/subworkflows/convergence.js b/src/js/subworkflows/convergence.js deleted file mode 100644 index ebe6290f..00000000 --- a/src/js/subworkflows/convergence.js +++ /dev/null @@ -1,196 +0,0 @@ -import merge from "lodash/merge"; - -import { UNIT_TAGS, UNIT_TYPES } from "../enums"; -import { createConvergenceParameter } from "./convergence/factory"; - -export const ConvergenceMixin = (superclass) => - class extends superclass { - get convergenceParam() { - return this.findUnitWithTag("hasConvergenceParam")?.operand || undefined; - } - - get convergenceResult() { - return this.findUnitWithTag("hasConvergenceResult")?.operand || undefined; - } - - convergenceSeries(scopeTrack) { - if (!this.hasConvergence || !scopeTrack?.length) return []; - let lastResult; - const series = scopeTrack - .map((scopeItem, i) => ({ - x: i, - param: scopeItem.scope?.global[this.convergenceParam], - y: scopeItem.scope?.global[this.convergenceResult], - })) - .filter(({ y }) => { - const isNewResult = y !== undefined && y !== lastResult; - lastResult = y; - return isNewResult; - }); - return series.map((item, i) => { - return { - x: i + 1, - param: item.param, - y: item.y, - }; - }); - } - - addConvergence({ - parameter, - parameterInitial, - parameterIncrement, - result, - resultInitial, - condition, - operator, - tolerance, - maxOccurrences, - }) { - // RF: added TODO comments for future improvements - - const { units } = this; - // Find unit to converge: should contain passed result in its results list - // TODO: make user to select unit for convergence explicitly - const unitForConvergence = units.find((x) => - x.resultNames.find((name) => name === result), - ); - - if (!unitForConvergence) { - // eslint-disable-next-line no-undef - sAlert.error( - `Subworkflow does not contain unit with '${result}' as extracted property.`, - ); - throw new Error("There is no result to converge"); - } - - // initialize parameter - const param = createConvergenceParameter({ - name: parameter, - initialValue: parameterInitial, - increment: parameterIncrement, - }); - - // Replace kgrid to be ready for convergence - // TODO: kgrid should be abstracted and selected by user - const providers = unitForConvergence.importantSettingsProviders; - const gridProvider = providers.find((p) => p.name === "kgrid" || p.name === "qgrid"); - let mergedContext = param.unitContext; - if (gridProvider) { - mergedContext = merge(gridProvider.yieldData(), param.unitContext); - gridProvider.setData(mergedContext); - gridProvider.setIsEdited(true); - } - unitForConvergence.updateContext(mergedContext); - - const prevResult = "prev_result"; - const iteration = "iteration"; - - // Assignment with result's initial value - const prevResultInit = this._UnitFactory.create({ - name: "init result", - type: UNIT_TYPES.assignment, - head: true, - operand: prevResult, - value: resultInitial, - }); - - // Assignment with initial value of convergence parameter - const paramInit = this._UnitFactory.create({ - name: "init parameter", - type: UNIT_TYPES.assignment, - operand: param.name, - value: param.initialValue, - tags: [UNIT_TAGS.hasConvergenceParam], - }); - - // Assignment with initial value of iteration counter - const iterInit = this._UnitFactory.create({ - name: "init counter", - type: UNIT_TYPES.assignment, - operand: iteration, - value: 1, - }); - - // Assignment for storing iteration result: extracts 'result' from convergence unit scope - const storePrevResult = this._UnitFactory.create({ - name: "store result", - type: UNIT_TYPES.assignment, - input: [ - { - scope: unitForConvergence.flowchartId, - name: result, - }, - ], - operand: prevResult, - value: result, - }); - - // Assignment for convergence param increase - const nextStep = this._UnitFactory.create({ - name: "update parameter", - type: UNIT_TYPES.assignment, - input: param.useVariablesFromUnitContext(unitForConvergence.flowchartId), - operand: param.name, - value: param.increment, - next: unitForConvergence.flowchartId, - }); - - // Final step of convergence - const exit = this._UnitFactory.create({ - type: UNIT_TYPES.assignment, - name: "exit", - input: [], - operand: param.name, - value: param.finalValue, - }); - - // Final step of convergence - const storeResult = this._UnitFactory.create({ - name: "update result", - type: UNIT_TYPES.assignment, - input: [ - { - scope: unitForConvergence.flowchartId, - name: result, - }, - ], - operand: result, - value: result, - tags: [UNIT_TAGS.hasConvergenceResult], - }); - - // Assign next iteration value - const nextIter = this._UnitFactory.create({ - name: "update counter", - type: UNIT_TYPES.assignment, - input: [], - operand: iteration, - value: `${iteration} + 1`, - }); - - // Convergence condition unit - const conditionUnit = this._UnitFactory.create({ - name: "check convergence", - type: UNIT_TYPES.condition, - statement: `${condition} ${operator} ${tolerance}`, - then: exit.flowchartId, - else: storePrevResult.flowchartId, - maxOccurrences, - next: storePrevResult.flowchartId, - }); - - this.addUnit(paramInit, 0); - this.addUnit(prevResultInit, 1); - this.addUnit(iterInit, 2); - this.addUnit(storeResult); - this.addUnit(conditionUnit); - this.addUnit(storePrevResult); - this.addUnit(nextIter); - this.addUnit(nextStep); - this.addUnit(exit); - - // `addUnit` adjusts the `next` field, hence the below. - nextStep.next = unitForConvergence.flowchartId; - } - }; diff --git a/src/js/subworkflows/convergence/factory.js b/src/js/subworkflows/convergence/factory.js deleted file mode 100644 index 205d8229..00000000 --- a/src/js/subworkflows/convergence/factory.js +++ /dev/null @@ -1,14 +0,0 @@ -import { NonUniformKGridConvergence } from "./non_uniform_kgrid"; -import { ConvergenceParameter } from "./parameter"; -import { UniformKGridConvergence } from "./uniform_kgrid"; - -export function createConvergenceParameter({ name, initialValue, increment }) { - switch (name) { - case "N_k": - return new UniformKGridConvergence({ name, initialValue, increment }); - case "N_k_nonuniform": - return new NonUniformKGridConvergence({ name, initialValue, increment }); - default: - return new ConvergenceParameter({ name, initialValue, increment }); - } -} diff --git a/src/js/subworkflows/convergence/non_uniform_kgrid.js b/src/js/subworkflows/convergence/non_uniform_kgrid.js deleted file mode 100644 index 0449d67d..00000000 --- a/src/js/subworkflows/convergence/non_uniform_kgrid.js +++ /dev/null @@ -1,28 +0,0 @@ -import { ConvergenceParameter } from "./parameter"; - -export class NonUniformKGridConvergence extends ConvergenceParameter { - get increment() { - return `[${this.initialValue}[i] + math.floor(iteration * ${this._increment} * float(context['kgrid']['reciprocalVectorRatios'][i])) for i in range(3)]`; - } - - get unitContext() { - return { - kgrid: { - dimensions: [`{{${this.name}[0]}}`, `{{${this.name}[1]}}`, `{{${this.name}[2]}}`], - shifts: [0, 0, 0], - }, - isKgridEdited: true, - isUsingJinjaVariables: true, - }; - } - - // eslint-disable-next-line class-methods-use-this - useVariablesFromUnitContext(flowchartId) { - return [ - { - scope: flowchartId, - name: "context", - }, - ]; - } -} diff --git a/src/js/subworkflows/convergence/parameter.js b/src/js/subworkflows/convergence/parameter.js deleted file mode 100644 index 576bf3e1..00000000 --- a/src/js/subworkflows/convergence/parameter.js +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable class-methods-use-this */ -import lodash from "lodash"; - -export class ConvergenceParameter { - constructor({ name, initialValue, increment }) { - this.name = name; - this._initialValue = initialValue; - this._increment = increment; - } - - /** - * Getter for initial value as string. - * Note: this will be used in assignment unit. - * @return {string} - */ - get initialValue() { - if (!lodash.isString(this._initialValue)) { - return JSON.stringify(this._initialValue); - } - return this._initialValue; - } - - /** - * @summary Defines how to increment the parameter. - * @return {string} - increment operation used in assignment unit - */ - get increment() { - return ""; // overwrite in derived class - } - - /** - * Defines content for updating the unit context - * @return {Object} - */ - get unitContext() { - return {}; - } - - /** - * Defines value once convergence is reached (for 'exit' unit). - * Note: This is used in assignment unit and most often the variable will be assigned to itself. - * @return {string} - */ - get finalValue() { - return `${this.name}`; - } - - /** - * Create list of variables to fetch from a unit. - * Note: this is used for the `input` field for an assignment unit. - * @param {string} flowchartId - flowchartId of unit containing context variables - * @return {Object|{scope, name}} - */ - // eslint-disable-next-line class-methods-use-this, no-unused-vars - useVariablesFromUnitContext(flowchartId) { - return []; - } -} diff --git a/src/js/subworkflows/convergence/uniform_kgrid.js b/src/js/subworkflows/convergence/uniform_kgrid.js deleted file mode 100644 index 182563a0..00000000 --- a/src/js/subworkflows/convergence/uniform_kgrid.js +++ /dev/null @@ -1,22 +0,0 @@ -import { ConvergenceParameter } from "./parameter"; - -export class UniformKGridConvergence extends ConvergenceParameter { - get increment() { - return `${this.name} + ${this._increment}`; - } - - get unitContext() { - return { - kgrid: { - dimensions: [`{{${this.name}}}`, `{{${this.name}}}`, `{{${this.name}}}`], - shifts: [0, 0, 0], - }, - isKgridEdited: true, - isUsingJinjaVariables: true, - }; - } - - get finalValue() { - return `${this.name} + 0`; - } -} diff --git a/src/js/subworkflows/create.js b/src/js/subworkflows/create.js deleted file mode 100644 index de74dfab..00000000 --- a/src/js/subworkflows/create.js +++ /dev/null @@ -1,220 +0,0 @@ -import { ApplicationRegistry } from "@mat3ra/ade"; -import { - default_methods as MethodConfigs, - default_models as ModelConfigs, - MethodConversionHandler, - MethodFactory, - ModelFactory, -} from "@mat3ra/mode"; -import { ApplicationMethodStandata } from "@mat3ra/standata"; -import _ from "lodash"; - -import { UnitFactory } from "../units"; -import { builders } from "../units/builders"; -import { applyConfig } from "../utils"; -import { dynamicSubworkflowsByApp, getSurfaceEnergySubworkflowUnits } from "./dynamic"; -import { Subworkflow } from "./subworkflow"; - -// NOTE: DFTModel => DFTModelConfig, configs should have the same name as the model/method class + "Config" at the end -function _getConfigFromModelOrMethodName(name, kind) { - const configs = kind === "Model" ? ModelConfigs : MethodConfigs; - if (!configs[`${name}Config`]) { - // eslint-disable-next-line no-param-reassign - name = `Unknown${kind}`; - } - return configs[`${name}Config`]; -} - -/** - * @summary Create model from subworkflow data - * @param config {Object} model config - * @param modelFactoryCls {any} model factory to use - * @returns {DFTModel|Model} - */ -function createModel({ config, modelFactoryCls }) { - const { name, config: modelConfig = {} } = config; - const defaultConfig = _getConfigFromModelOrMethodName(name, "Model"); - return modelFactoryCls.create({ ...defaultConfig, ...modelConfig }); -} - -/** - * @summary Create method from subworkflow data - * @param config {Object} method configuration - * @param methodFactoryCls {any} - * @param applicationConfig {Object} application configuration - * @returns {{method, setSearchText}} - */ -function createMethod({ config, methodFactoryCls, applicationConfig = {} }) { - const { name, setSearchText = null, config: methodConfig = {} } = config; - const defaultConfig = _getConfigFromModelOrMethodName(name, "Method"); - const defaultConfigForApp = - new ApplicationMethodStandata().getDefaultMethodConfigForApplication(applicationConfig); - const defaultConfigForAppSimple = - defaultConfigForApp && defaultConfigForApp.units - ? MethodConversionHandler.convertToSimple(defaultConfigForApp) - : defaultConfigForApp; - const method = methodFactoryCls.create({ - ...defaultConfig, - ...defaultConfigForAppSimple, - ...methodConfig, - }); - return { method, setSearchText }; -} - -/** - * @summary Create top-level objects used in subworkflow initialization - * @param subworkflowData {Object} subworkflow data - * @param AppRegistry - * @param modelFactoryCls {any} model factory class - * @param methodFactoryCls {any} method factory class - * @returns {{application: *, method: *, model: (DFTModel|Model), setSearchText: String|null}} - */ -function createTopLevel({ subworkflowData, modelFactoryCls, methodFactoryCls, AppRegistry }) { - const { application: appConfig, model: modelConfig, method: methodConfig } = subworkflowData; - const application = AppRegistry.createApplication(appConfig); - const model = createModel({ config: modelConfig, modelFactoryCls }); - const { method, setSearchText } = createMethod({ - config: methodConfig, - methodFactoryCls, - applicationConfig: appConfig, - }); - return { - application, - model, - method, - setSearchText, - }; -} - -/** - * @summary Create workflow unit from JSON configuration - * Supports applying functions to the builder prior to building via "functions" - * Supports applying attributes to the builder after building via "attributes" - * @param config {Object} unit config - * @param application {*} application - * @param unitBuilders {Object} workflow unit builders - * @param unitFactoryCls {*} workflow unit class factory - * @returns {*|{head: boolean, preProcessors: [], postProcessors: [], name: *, flowchartId: *, type: *, results: [], monitors: []}} - */ -export function createUnit({ config, application, unitBuilders, unitFactoryCls, cache = [] }) { - const { type, config: unitConfig } = config; - if (type === "executionBuilder") { - const { name, execName, flavorName, flowchartId } = unitConfig; - const builder = new unitBuilders.ExecutionUnitConfigBuilder( - name, - application, - execName, - flavorName, - flowchartId, - cache, - ); - - // config should contain "functions" and "attributes" - const cfg = applyConfig({ obj: builder, config, callBuild: true }); - return unitFactoryCls.create(cfg); - } - - return unitFactoryCls.create({ type, ...unitConfig }); -} - -/** - * @summary Dynamically create subworkflow units - * @param dynamicSubworkflow {String} name of unit creation function - * @param units {Array} configured units to provide to dynamic unit creation - * @param unitBuilders {Object} unit configuration builders - * @param unitFactoryCls {*} unit factory class - * @param application {*} application (optional) - * @returns {*} - */ -function createDynamicUnits({ - dynamicSubworkflow, - units, - unitBuilders, - unitFactoryCls, - application = null, -}) { - const { name, subfolder } = dynamicSubworkflow; - const func = subfolder && _.get(dynamicSubworkflowsByApp, `${subfolder}.${name}`, () => {}); - switch (name) { - case "surfaceEnergy": - // eslint-disable-next-line no-case-declarations - const [scfUnit] = units; - return getSurfaceEnergySubworkflowUnits({ scfUnit, unitBuilders }); - case "getQpointIrrep": - return func({ unitBuilders, unitFactoryCls, application }); - default: - throw new Error(`dynamicSubworkflow=${name} not recognized`); - } -} - -function createSubworkflow({ - subworkflowData, - cache = [], - AppRegistry = ApplicationRegistry, - modelFactoryCls = ModelFactory, - methodFactoryCls = MethodFactory, - subworkflowCls = Subworkflow, - unitFactoryCls = UnitFactory, - unitBuilders = builders, -}) { - const { application, model, method, setSearchText } = createTopLevel({ - subworkflowData, - AppRegistry, - modelFactoryCls, - methodFactoryCls, - }); - - let units = []; - const { name, units: unitConfigs, config = {}, dynamicSubworkflow = null } = subworkflowData; - unitConfigs.forEach((_config) => { - units.push( - createUnit({ - config: _config, - application, - unitBuilders, - unitFactoryCls, - cache, - }), - ); - }); - if (dynamicSubworkflow) { - units = createDynamicUnits({ - dynamicSubworkflow, - units, - unitBuilders, - unitFactoryCls, - application, - }); - } - - let subworkflow = subworkflowCls.fromArguments(application, model, method, name, units, config); - const { functions = {}, attributes = {} } = config; - subworkflow = applyConfig({ obj: subworkflow, config: { functions, attributes } }); - if (setSearchText) subworkflow.model.Method.setSearchText(setSearchText); - return subworkflow; -} - -/** - * @summary Convenience wrapper around createSubworkflow to create by app name and swf name - * @param appName {String} application name - * @param swfName {String} subworkflow name (snake_case.yml) - * @param workflowSubworkflowMapByApplication {Object} object containing all workflow/subworkflow map by application - * @param swArgs {Object} classes for instantiation - * @returns {*} subworkflow object - */ -function createSubworkflowByName({ - appName, - swfName, - workflowSubworkflowMapByApplication, - ...swArgs -}) { - const { subworkflows } = workflowSubworkflowMapByApplication; - const { [appName]: allSubworkflowData } = subworkflows; - const { [swfName]: subworkflowData } = allSubworkflowData; - return createSubworkflow({ - subworkflowData, - ...swArgs, - }); -} - -export { createSubworkflow, createSubworkflowByName }; diff --git a/src/js/subworkflows/dynamic/espresso/getQpointIrrep.js b/src/js/subworkflows/dynamic/espresso/getQpointIrrep.js deleted file mode 100644 index 8d97fe48..00000000 --- a/src/js/subworkflows/dynamic/espresso/getQpointIrrep.js +++ /dev/null @@ -1,35 +0,0 @@ -import { UNIT_TYPES } from "../../../enums"; - -/** - * @summary Get QptIrr units used in phonon map calculations - * @param unitBuilders {Object} unit builders - * @param unitFactoryCls {*} unit factory class - * @param application {*} application instance - * @returns {[{head: boolean, preProcessors: [], postProcessors: [], name: *, flowchartId: *, type: *, results: [], monitors: []},*]} - */ -function getQpointIrrep({ unitBuilders, unitFactoryCls, application }) { - const { ExecutionUnitConfigBuilder } = unitBuilders; - - const pythonUnit = new ExecutionUnitConfigBuilder( - "python", - application, - "python", - "espresso_xml_get_qpt_irr", - ).build(); - - const assignmentUnit = unitFactoryCls.create({ - type: UNIT_TYPES.assignment, - input: [ - { - scope: pythonUnit.flowchartId, - name: "STDOUT", - }, - ], - operand: "Q_POINTS", - value: "json.loads(STDOUT)", - }); - - return [pythonUnit, assignmentUnit]; -} - -export { getQpointIrrep }; diff --git a/src/js/subworkflows/dynamic/index.js b/src/js/subworkflows/dynamic/index.js deleted file mode 100644 index 98303667..00000000 --- a/src/js/subworkflows/dynamic/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { getQpointIrrep } from "./espresso/getQpointIrrep"; -import { getSurfaceEnergySubworkflowUnits } from "./surfaceEnergy"; - -const dynamicSubworkflowsByApp = { - espresso: { getQpointIrrep }, -}; - -export { getSurfaceEnergySubworkflowUnits, dynamicSubworkflowsByApp }; diff --git a/src/js/subworkflows/dynamic/surfaceEnergy.js b/src/js/subworkflows/dynamic/surfaceEnergy.js deleted file mode 100644 index bf0e118e..00000000 --- a/src/js/subworkflows/dynamic/surfaceEnergy.js +++ /dev/null @@ -1,124 +0,0 @@ -import { Utils } from "@mat3ra/utils"; - -function getIOUnitEndpointOptions(query, projection = "{}") { - return { - params: { - query, - projection, - }, - }; -} - -function getAssignmentUnitInput(unit, name) { - return [ - { - name, - scope: unit.flowchartId, - }, - ]; -} - -function getSurfaceEnergySubworkflowUnits({ scfUnit, unitBuilders }) { - const { IOUnitConfigBuilder, AssignmentUnitConfigBuilder, AssertionUnitConfigBuilder } = - unitBuilders; - - let input, endpointOptions; - endpointOptions = getIOUnitEndpointOptions("{'_id': MATERIAL_ID}"); - const getSlabUnit = new IOUnitConfigBuilder("io-slab", "materials", endpointOptions).build(); - - input = getAssignmentUnitInput(getSlabUnit, "DATA"); - const setSlabUnit = new AssignmentUnitConfigBuilder("slab", "SLAB", "DATA[0]", input).build(); - - endpointOptions = getIOUnitEndpointOptions("{'_id': SLAB.metadata.bulkId}"); - const getBulkUnit = new IOUnitConfigBuilder("io-bulk", "materials", endpointOptions).build(); - - const BULKValue = "DATA[0] if DATA else None"; - input = getAssignmentUnitInput(getBulkUnit, "DATA"); - const setBulkUnit = new AssignmentUnitConfigBuilder("bulk", "BULK", BULKValue, input).build(); - - const assertBulkUnit = new AssertionUnitConfigBuilder( - "assert-bulk", - "BULK != None", - "Bulk material does not exist!", - ).build(); - - const query = Utils.str.removeNewLinesAndExtraSpaces(`{ - 'exabyteId': BULK.exabyteId, - 'data.name': 'total_energy', - 'group': {'$regex': ''.join((SUBWORKFLOW.application.shortName, ':'))} - }`); - // Do not confuse `sort` with `$sort`. `sort` is used in meteor collections and `$sort` is used in Mongo queries. - const projection = "{'sort': {'precision.value': -1}, 'limit': 1}"; - endpointOptions = getIOUnitEndpointOptions(query, projection); - const getEBulkUnit = new IOUnitConfigBuilder( - "io-e-bulk", - "refined-properties", - endpointOptions, - ).build(); - - input = getAssignmentUnitInput(getEBulkUnit, "DATA"); - const EBULKValue = "DATA[0].data.value if DATA else None"; - const setEBulkUnit = new AssignmentUnitConfigBuilder( - "e-bulk", - "E_BULK", - EBULKValue, - input, - ).build(); - - const assertEBulkUnit = new AssertionUnitConfigBuilder( - "assert-e-bulk", - "E_BULK != None", - "E_BULK does not exist!", - ).build(); - - const AValue = "np.linalg.norm(np.cross(SLAB.lattice.vectors.a, SLAB.lattice.vectors.b))"; - const setSurfaceUnit = new AssignmentUnitConfigBuilder("surface", "A", AValue).build(); - - const setNBulkUnit = new AssignmentUnitConfigBuilder( - "n-bulk", - "N_BULK", - "len(BULK.basis.elements)", - ).build(); - const setNSlabUnit = new AssignmentUnitConfigBuilder( - "n-slab", - "N_SLAB", - "len(SLAB.basis.elements)", - ).build(); - - input = getAssignmentUnitInput(scfUnit, "total_energy"); - const setESlabUnit = new AssignmentUnitConfigBuilder( - "e-slab", - "E_SLAB", - "total_energy", - input, - ).build(); - - const results = [{ name: "surface_energy" }]; - const SEValue = "1 / (2 * A) * (E_SLAB - E_BULK * (N_SLAB/N_BULK))"; - const surfaceEnergyUnit = new AssignmentUnitConfigBuilder( - "surface-energy", - "SURFACE_ENERGY", - SEValue, - [], - results, - ).build(); - - return [ - getSlabUnit, - setSlabUnit, - getBulkUnit, - setBulkUnit, - assertBulkUnit, - getEBulkUnit, - setEBulkUnit, - assertEBulkUnit, - setSurfaceUnit, - setNBulkUnit, - setNSlabUnit, - scfUnit, - setESlabUnit, - surfaceEnergyUnit, - ]; -} - -export { getSurfaceEnergySubworkflowUnits }; diff --git a/src/js/subworkflows/index.js b/src/js/subworkflows/index.js deleted file mode 100644 index 48390ca0..00000000 --- a/src/js/subworkflows/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { Subworkflow } from "./subworkflow"; -export { createSubworkflowByName } from "./create"; diff --git a/src/js/subworkflows/subworkflow.ts b/src/js/subworkflows/subworkflow.ts deleted file mode 100644 index f462d688..00000000 --- a/src/js/subworkflows/subworkflow.ts +++ /dev/null @@ -1,359 +0,0 @@ -import { Application } from "@mat3ra/ade"; -import { ContextAndRenderFieldsMixin, InMemoryEntity } from "@mat3ra/code/dist/js/entity"; -import { - type DefaultableInMemoryEntityConstructor, - defaultableEntityMixin, -} from "@mat3ra/code/dist/js/entity/mixins/DefaultableMixin"; -import { - type NamedInMemoryEntityConstructor, - namedEntityMixin, -} from "@mat3ra/code/dist/js/entity/mixins/NamedEntityMixin"; -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { ApplicationSchema, BaseMethod, BaseModel } from "@mat3ra/esse/dist/js/types"; -import { type Method, Model, ModelFactory } from "@mat3ra/mode"; -import { Utils } from "@mat3ra/utils"; -import lodash from "lodash"; -import _ from "underscore"; - -import { UNIT_TYPES, UnitType } from "../enums"; -import { - type SubworkflowSchemaMixin, - subworkflowSchemaMixin, -} from "../generated/SubworkflowSchemaMixin"; -import { type BaseUnit, UnitFactory } from "../units"; -import { setNextLinks, setUnitsHead } from "../utils"; -import { ConvergenceMixin } from "./convergence"; - -/* eslint max-classes-per-file:0 */ - -// class BaseSubworkflow extends mix(NamedDefaultableRepetitionImportantSettingsInMemoryEntity).with( -// ConvergenceMixin, -// ContextAndRenderFieldsMixin, -// ) {} - -type Base = typeof InMemoryEntity & - DefaultableInMemoryEntityConstructor & - NamedInMemoryEntityConstructor & - Constructor; - -export class Subworkflow extends (InMemoryEntity as Base) { - static usePredefinedIds = false; - - private ModelFactory: typeof ModelFactory; - - private UnitFactory: typeof UnitFactory; - - private applicationInstance: Application; - - private modelInstance: Model; - - private unitsInstances: BaseUnit[]; - - constructor( - config: SubworkflowSchemaMixin, - _ModelFactory = ModelFactory, - _UnitFactory = UnitFactory, - ) { - super(config); - this.ModelFactory = _ModelFactory; - this.UnitFactory = _UnitFactory; - - this.applicationInstance = new Application(this.application); - this.modelInstance = this.ModelFactory.create({ - ...this.model, - application: this.application, - }); - this.unitsInstances = setNextLinks( - setUnitsHead(this.units || []).map((cfg) => { - return this.UnitFactory.create({ ...cfg, application: this.application }); - }), - ); - } - - static generateSubworkflowId( - name: string, - application?: ApplicationSchema, - model?: BaseModel, - method?: BaseMethod, - ) { - const appName = application?.name || ""; - const modelInfo = model ? `${model.type}-${model.subtype || ""}` : ""; - const methodInfo = method ? `${method.type}-${method.subtype || ""}` : ""; - const seed = [`subworkflow-${name}`, appName, modelInfo, methodInfo] - .filter((p) => p) - .join("-"); - - return this.usePredefinedIds ? Utils.uuid.getUUIDFromNamespace(seed) : Utils.uuid.getUUID(); - } - - static get defaultConfig() { - const defaultName = "New Subworkflow"; - return { - _id: this.generateSubworkflowId(defaultName), - name: defaultName, - application: Application.defaultConfig, - model: Model.defaultConfig, - properties: [], - units: [], - }; - } - - /* - * @returns {SubworkflowUnit} - */ - getAsUnit() { - return this.UnitFactory.create({ - type: UnitType.subworkflow, - _id: this.id, - name: this.name, - }); - } - - /* - * @summary Used to generate initial application tree, therefore omit setting application. - */ - static fromArguments( - application: Application, - model: Model, - method: Method, - name: string, - units: BaseUnit[] = [], - config = {}, - Cls = Subworkflow, - ) { - const nameForIdGeneration = config.attributes?.name || name; - const { functions, attributes, ...cleanConfig } = config; - - // Set the method on the model so it can be properly serialized - model.setMethod(method); - - return new Cls({ - ...cleanConfig, - _id: Cls.generateSubworkflowId(nameForIdGeneration, application, model, method), - name, - application: application.toJSON(), - properties: lodash.sortedUniq( - lodash.flatten(units.filter((x) => x.resultNames).map((x) => x.resultNames)), - ), - model: { - ...model.toJSON(), - method: method.toJSON(), - }, - units: units.map((unit) => (unit.toJSON ? unit.toJSON() : unit)), - }); - } - - setApplication(application: Application) { - // TODO: adjust the logic above to take into account whether units need re-rendering after version change etc. - // reset units if application name changes - const previousApplicationName = this.application.name; - this.applicationInstance = application; - - if (previousApplicationName !== application.name) { - // TODO: figure out how to set a default unit per new application instead of removing all - this.setUnits([]); - } else { - // propagate new application version to all units - this.units - .filter((unit) => typeof unit.setApplication === "function") - .forEach((unit) => unit.setApplication(this.applicationInstance, true)); - } - - this.application = application.toJSON(); - // set model to the default one for the application selected - this.setModel( - this.ModelFactory.createFromApplication({ - application: this.application, - }), - ); - } - - setModel(model: Model) { - this.modelInstance = model; - } - - setUnits(units: BaseUnit[]) { - this.unitsInstances = units; - } - - toJSON(exclude: string[] = []) { - return { - ...super.toJSON(exclude), - model: this.modelInstance.toJSON(), - units: this.unitsInstances.map((x) => x.toJSON()), - ...(this.compute ? { compute: this.compute } : {}), // {"compute": null } won't pass esse validation - }; - } - - get contextProviders() { - const unitsWithContextProviders = this.units.filter( - (u) => u.allContextProviders && u.allContextProviders.length, - ); - const allContextProviders = _.flatten( - unitsWithContextProviders.map((u) => u.allContextProviders), - ); - const subworkflowContextProviders = allContextProviders.filter( - (p) => p.entityName === "subworkflow", - ); - return _.uniq(subworkflowContextProviders, (p) => p.name); - } - - /** - * Extracts a reduced version of the entity config to be stored inside redux state. - * This is used to track changes to context, monitors, properties, etc. when multiple materials are in state. - */ - extractReducedExternalDependentConfig() { - return { - id: this.id, - context: this.context || {}, - units: this.units.map((unit) => unit.extractReducedExternalDependentConfig()), - }; - } - - /** - * Applies the reduced config obtained from extractReducedExternalDependentConfig on the entity. - */ - applyReducedExternalDependentConfig(config) { - this.context = config.context || {}; - this.units.forEach((unit) => { - const unitConfig = (config.units || []).find((c) => c.id === unit.flowchartId); - unit.applyReducedExternalDependentConfig(unitConfig || {}); - }); - } - - get contextFromAssignmentUnits() { - const ctx = {}; - this.units - .filter((u) => u.type === UNIT_TYPES.assignment) - .forEach((u) => { - ctx[u.operand] = u.value; - }); - return ctx; - } - - render(context = {}) { - const ctx = { - ...context, - application: this.application, - methodData: this.model.Method.data, - model: this.model.toJSON(), - // context below is assembled from context providers and passed to units to override theirs - ...this.context, - subworkflowContext: this.contextFromAssignmentUnits, - }; - - this.units.forEach((u) => u.render(ctx)); - } - - /** - * TODO: reuse workflow function instead - */ - addUnit(unit: BaseUnit, index = -1) { - const { units } = this; - if (units.length === 0) { - unit.head = true; - this.setUnits([unit]); - } else { - if (index >= 0) units.splice(index, 0, unit); - else units.push(unit); - this.setUnits(setNextLinks(setUnitsHead(units))); - } - } - - removeUnit(flowchartId: string) { - const previousUnit = this.units.find((x) => x.next === flowchartId); - if (previousUnit) previousUnit.unsetProp("next"); - // TODO: remove the setNextLinks and setUnitsHead and handle the logic via flowchart designer - this.setUnits( - setNextLinks(setUnitsHead(this.units.filter((x) => x.flowchartId !== flowchartId))), - ); - } - - get properties() { - return lodash.flatten(this.units.map((x) => x.resultNames)); - } - - getUnit(flowchartId: string) { - return this.units.find((x) => x.flowchartId === flowchartId); - } - - unitIndex(flowchartId: string) { - return lodash.findIndex(this.units, (unit) => { - return unit.flowchartId === flowchartId; - }); - } - - replaceUnit(index: number, unit: BaseUnit) { - this.units[index] = unit; - this.setUnits(setNextLinks(setUnitsHead(this.units))); - } - - // eslint-disable-next-line class-methods-use-this - get scopeVariables() { - return ["N_k", "N_k_nonuniform"]; - } - - // eslint-disable-next-line class-methods-use-this - get scalarResults() { - return ["total_energy", "pressure"]; - } - - get isMultiMaterial() { - return this.prop("isMultiMaterial", false); - } - - get isDraft() { - return this.prop("isDraft", false); - } - - setIsDraft(bool: boolean) { - return this.setProp("isDraft", bool); - } - - get methodData() { - return this.model.Method.data; - } - - /** - * @summary Calculates hash of the subworkflow. Meaningful fields are units, app and model. - * units must be sorted topologically before hashing (already sorted). - */ - calculateHash() { - const config = this.toJSON(); - const meaningfulFields = { - application: Utils.specific.removeTimestampableKeysFromConfig(config.application), - model: this._calculateModelHash(), - units: _.map(this.units, (u) => u.calculateHash()).join(), - }; - return Utils.hash.calculateHashFromObject(meaningfulFields); - } - - _calculateModelHash() { - const { model } = this.toJSON(); - // ignore empty data object - if (this.model.Method.omitInHashCalculation) delete model.method.data; - return Utils.hash.calculateHashFromObject(model); - } - - findUnitById(id: string) { - // TODO: come back and refactor after converting flowchartId to id - return this.units.find((u) => u.flowchartId === id); - } - - findUnitKeyById(id: string) { - const index = this.units.findIndex((u) => u.flowchartId === id); - return `units.${index}`; - } - - findUnitWithTag(tag: string) { - return this.units.find((unit) => unit.tags.includes(tag)); - } - - get hasConvergence() { - return !!this.convergenceParam && !!this.convergenceResult && !!this.convergenceSeries; - } -} - -namedEntityMixin(Subworkflow.prototype); -defaultableEntityMixin(Subworkflow); -subworkflowSchemaMixin(Subworkflow.prototype); diff --git a/src/js/units/AssertionUnit.ts b/src/js/units/AssertionUnit.ts index df78e23e..7d04f505 100644 --- a/src/js/units/AssertionUnit.ts +++ b/src/js/units/AssertionUnit.ts @@ -1,4 +1,5 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { AssertionUnitSchema } from "@mat3ra/esse/dist/js/types"; import { UnitType } from "../enums"; @@ -6,12 +7,16 @@ import { type AssertionUnitSchemaMixin, assertionUnitSchemaMixin, } from "../generated/AssertionUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = AssertionUnitSchema; type Base = typeof BaseUnit & Constructor; -export class AssertionUnit extends (BaseUnit as Base) implements Schema { +class AssertionUnit extends (BaseUnit as Base) implements Schema { + declare toJSON: () => Schema & AnyObject; + + declare _json: Schema & AnyObject; + constructor(config: Partial) { super({ name: UnitType.assertion, @@ -28,3 +33,5 @@ export class AssertionUnit extends (BaseUnit as Base) implements Schema { } assertionUnitSchemaMixin(AssertionUnit.prototype); + +export default AssertionUnit; diff --git a/src/js/units/AssignmentUnit.ts b/src/js/units/AssignmentUnit.ts index 5070c56b..c410be40 100644 --- a/src/js/units/AssignmentUnit.ts +++ b/src/js/units/AssignmentUnit.ts @@ -1,4 +1,5 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { AssignmentUnitSchema } from "@mat3ra/esse/dist/js/types"; import { UnitType } from "../enums"; @@ -6,12 +7,16 @@ import { type AssignmentUnitSchemaMixin, assignmentUnitSchemaMixin, } from "../generated/AssignmentUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = AssignmentUnitSchema; type Base = typeof BaseUnit & Constructor; -export class AssignmentUnit extends (BaseUnit as Base) implements Schema { +class AssignmentUnit extends (BaseUnit as Base) implements Schema { + declare toJSON: () => Schema & AnyObject; + + declare _json: Schema & AnyObject; + constructor(config: Partial) { super({ name: UnitType.assignment, @@ -29,3 +34,5 @@ export class AssignmentUnit extends (BaseUnit as Base) implements Schema { } assignmentUnitSchemaMixin(AssignmentUnit.prototype); + +export default AssignmentUnit; diff --git a/src/js/units/BaseUnit.ts b/src/js/units/BaseUnit.ts index 6e1bb52d..ab7d9fac 100644 --- a/src/js/units/BaseUnit.ts +++ b/src/js/units/BaseUnit.ts @@ -1,4 +1,3 @@ -/* eslint-disable class-methods-use-this */ import { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; import { type Defaultable, @@ -8,10 +7,6 @@ import { HashedEntity, hashedEntityMixin, } from "@mat3ra/code/dist/js/entity/mixins/HashedEntityMixin"; -import { - HasRepetition, - hasRepetitionMixin, -} from "@mat3ra/code/dist/js/entity/mixins/HasRepetitionMixin"; import { type NamedEntity, namedEntityMixin, @@ -23,18 +18,22 @@ import { import { Taggable, taggableMixin } from "@mat3ra/code/dist/js/entity/mixins/TaggableMixin"; import type { NameResultSchema } from "@mat3ra/code/dist/js/utils/object"; import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { StatusSchema, WorkflowBaseUnitSchema } from "@mat3ra/esse/dist/js/types"; import { Utils } from "@mat3ra/utils"; -import { UNIT_STATUSES } from "../enums"; +import { UnitStatus } from "../enums"; import { type BaseUnitSchemaMixin, baseUnitSchemaMixin } from "../generated/BaseUnitSchemaMixin"; import { type StatusSchemaMixin, statusSchemaMixin } from "../generated/StatusSchemaMixin"; -import { type RuntimeItemsUILogic, runtimeItemsUILogicMixin } from "../RuntimeItemsUILogicMixin"; +import { + type RuntimeItemsUILogic, + runtimeItemsUILogicMixin, +} from "./mixins/RuntimeItemsUILogicMixin"; type Base = typeof InMemoryEntity & Constructor & Constructor & - Constructor & + // Constructor & Constructor & Constructor & Constructor & @@ -44,16 +43,8 @@ type Base = typeof InMemoryEntity & type Schema = WorkflowBaseUnitSchema; -// eslint-disable-next-line prettier/prettier -export class BaseUnit extends (InMemoryEntity as Base) implements Schema { - static usePredefinedIds = false; - - static generateFlowChartId(name: string) { - if (this.usePredefinedIds) { - return Utils.uuid.getUUIDFromNamespace(`flowchart-${name}`); - } - return Utils.uuid.getUUID(); - } +class BaseUnit extends (InMemoryEntity as Base) implements Schema { + declare toJSON: () => Schema & AnyObject; defaultResults: NameResultSchema[] = []; @@ -63,11 +54,7 @@ export class BaseUnit extends (InMemoryEntity as Base defaultPreProcessors: NameResultSchema[] = []; - allowedResults: NameResultSchema[] = []; - - allowedMonitors: NameResultSchema[] = []; - - allowedPostProcessors: NameResultSchema[] = []; + repetition = 0; constructor(config: Partial & Pick) { super({ @@ -76,9 +63,9 @@ export class BaseUnit extends (InMemoryEntity as Base preProcessors: [], postProcessors: [], ...config, - status: config.status || UNIT_STATUSES.idle, + status: config.status || UnitStatus.idle, statusTrack: config.statusTrack || [], - flowchartId: config.flowchartId || BaseUnit.generateFlowChartId(config.name), + flowchartId: config.flowchartId || Utils.uuid.getUUID(), tags: config.tags || [], }); @@ -86,9 +73,9 @@ export class BaseUnit extends (InMemoryEntity as Base } get lastStatusUpdate() { - const statusTrack = (this.statusTrack || []).filter( - (s) => (s.repetition || 0) === this.repetition, - ); + const statusTrack = (this.statusTrack || []).filter((s) => { + return (s.repetition || 0) === this.repetition; + }); const sortedStatusTrack = statusTrack.sort((a, b) => a.trackedAt - b.trackedAt); // lodash.sortBy(statusTrack, (x) => x.trackedAt); return sortedStatusTrack[sortedStatusTrack.length - 1]; } @@ -103,19 +90,24 @@ export class BaseUnit extends (InMemoryEntity as Base clone(extraContext: object) { const flowchartIDOverrideConfigAsExtraContext = { - flowchartId: BaseUnit.generateFlowChartId(this.name), + flowchartId: Utils.uuid.getUUID(), ...extraContext, }; return super.clone(flowchartIDOverrideConfigAsExtraContext); } + + setRepetition(repetition: number) { + this.repetition = repetition; + } } taggableMixin(BaseUnit.prototype); hashedEntityMixin(BaseUnit.prototype); -hasRepetitionMixin(BaseUnit.prototype); runtimeItemsMixin(BaseUnit.prototype); runtimeItemsUILogicMixin(BaseUnit.prototype); baseUnitSchemaMixin(BaseUnit.prototype); statusSchemaMixin(BaseUnit.prototype); namedEntityMixin(BaseUnit.prototype); defaultableEntityMixin(BaseUnit); + +export default BaseUnit; diff --git a/src/js/units/ConditionUnit.ts b/src/js/units/ConditionUnit.ts index 9c8f066c..fa04edb3 100644 --- a/src/js/units/ConditionUnit.ts +++ b/src/js/units/ConditionUnit.ts @@ -1,4 +1,5 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { ConditionUnitSchema } from "@mat3ra/esse/dist/js/types"; import { UnitType } from "../enums"; @@ -6,12 +7,16 @@ import { type ConditionUnitSchemaMixin, conditionUnitSchemaMixin, } from "../generated/ConditionUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = ConditionUnitSchema; type Base = typeof BaseUnit & Constructor; -export class ConditionUnit extends (BaseUnit as Base) implements Schema { +class ConditionUnit extends (BaseUnit as Base) implements Schema { + declare toJSON: () => Schema & AnyObject; + + declare _json: Schema & AnyObject; + constructor(config: Partial) { super({ name: UnitType.condition, @@ -34,3 +39,5 @@ export class ConditionUnit extends (BaseUnit as Base) implements Schema { } conditionUnitSchemaMixin(ConditionUnit.prototype); + +export default ConditionUnit; diff --git a/src/js/units/ExecutionUnit.ts b/src/js/units/ExecutionUnit.ts index ce691063..6994af33 100644 --- a/src/js/units/ExecutionUnit.ts +++ b/src/js/units/ExecutionUnit.ts @@ -1,203 +1,177 @@ -import { Application, ApplicationRegistry as AdeRegistry, Executable, Flavor } from "@mat3ra/ade"; +import { Flavor } from "@mat3ra/ade"; import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { - ExecutableSchema, - ExecutionUnitInputItemSchema, - ExecutionUnitSchemaBase, + ContextItemSchema, + ExecutionUnitSchema, FlavorSchema, } from "@mat3ra/esse/dist/js/types"; import { Utils } from "@mat3ra/utils"; -import { contextMixin } from "../context/mixins/ContextAndRenderFieldsMixin"; -import { - type ImportantSettingsProvider, - importantSettingsProviderMixin, -} from "../context/mixins/ImportantSettingsProviderMixin"; -import type { ContextItem } from "../context/providers/base/ContextProvider"; -import ExecutionUnitInput from "../ExecutionUnitInput"; +import { type ExternalContext, createProvider } from "../context/providers"; +import { globalSettings } from "../context/providers/settings"; +import type ConvergenceParameter from "../convergence/ConvergenceParameter"; import { type ExecutionUnitSchemaMixin, executionUnitSchemaMixin, } from "../generated/ExecutionUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; - -type Schema = ExecutionUnitSchemaBase; -type Base = typeof BaseUnit & - Constructor & - Constructor; +import BaseUnit from "./BaseUnit"; +import ExecutionUnitInput from "./ExecutionUnitInput"; -interface SetApplicationProps { - application: Application; - executable?: Executable | ExecutableSchema; - flavor?: Flavor | FlavorSchema; -} +type Schema = ExecutionUnitSchema; +type Base = typeof BaseUnit & Constructor; -interface SetExecutableProps { - executable?: Executable | ExecutableSchema; - flavor?: Flavor | FlavorSchema; -} +type ExecutionUnitConfig = Omit & SetExecutableProps; -export type ExecutionUnitSchema = Schema; +type SetApplicationProps = Pick & SetExecutableProps; -export class ExecutionUnit extends (BaseUnit as Base) implements Schema { - applicationInstance!: Application; +type SetExecutableProps = Partial>; - executableInstance!: Executable; +class ExecutionUnit extends (BaseUnit as Base) implements Schema { + inputInstances: ExecutionUnitInput[] = []; - flavorInstance!: Flavor; + renderingContext: Partial = {}; - inputInstances: ExecutionUnitInput[] = []; + declare toJSON: () => Schema & AnyObject; - renderingContext: ContextItem[] = []; + declare _json: Schema & AnyObject; - constructor(config: Schema) { + constructor(config: ExecutionUnitConfig) { super(config); const { application, executable, flavor } = config; - const applicationInstance = AdeRegistry.createApplication(application); - const executableInstance = AdeRegistry.getExecutableByConfig(application.name, executable); - const flavorInstance = AdeRegistry.getFlavorByConfig(executableInstance, flavor); - - if (!flavorInstance) { - throw new Error("Flavor is not set"); - } - - this.setApplication({ - application: applicationInstance, - executable: executableInstance, - flavor: flavorInstance, - }); + + this.setApplication({ application, executable, flavor }); this.name = this.name || this.flavor?.name || ""; } setApplication({ application, executable, flavor }: SetApplicationProps) { - this.applicationInstance = application; - this.setProp("application", application.toJSON()); + this.setProp("application", application); this.setExecutable({ executable, flavor }); } setExecutable({ executable, flavor }: SetExecutableProps) { - const defaultExecutable = AdeRegistry.getExecutableByName(this.application.name); - const instance = - executable instanceof Executable - ? executable - : new Executable(executable ?? defaultExecutable.toJSON()); + const { executable: executablePlain } = globalSettings + .getApplicationsDriver() + .getExecutableAndFlavorByName({ + appName: this.application.name, + appVersion: this.application.version, + }); - this.allowedResults = instance.results; - this.allowedMonitors = instance.monitors; - this.allowedPostProcessors = instance.postProcessors; + const finalExecutable = executable || executablePlain; - this.setProp("executable", instance.toJSON()); + this.setProp("executable", finalExecutable); this.setFlavor(flavor); } setFlavor(flavor?: Flavor | FlavorSchema) { - const defaultFlavor = AdeRegistry.getFlavorByConfig(this.executableInstance); - const instance = - flavor instanceof Flavor ? flavor : new Flavor(flavor ?? defaultFlavor?.toJSON()); - - if (!instance) { - throw new Error("Flavor is not found for executable"); - } - - this.flavorInstance = instance; - this.defaultMonitors = instance.monitors; - this.defaultResults = instance.results; - this.defaultPostProcessors = instance.postProcessors; - - this.setProp("flavor", instance.toJSON()); + const { executable, application } = this; + const { flavor: defaultFlavor } = globalSettings + .getApplicationsDriver() + .getExecutableAndFlavorByName({ + appName: application.name, + appVersion: application.version, + execName: executable.name, + }); + + const finalFlavor = flavor || defaultFlavor; + + this.defaultMonitors = finalFlavor.monitors; + this.defaultResults = finalFlavor.results; + this.defaultPostProcessors = finalFlavor.postProcessors; + + this.setProp("flavor", finalFlavor); this.setRuntimeItemsToDefaultValues(); this.setDefaultInput(); } setDefaultInput() { - const inputs = AdeRegistry.getInput(this.flavorInstance); - this.inputInstances = inputs.map(ExecutionUnitInput.createFromTemplate); + this.inputInstances = globalSettings + .getApplicationsDriver() + .getInput(this.flavor) + .map(ExecutionUnitInput.createFromTemplate); } - get allContextProviders() { - return this.inputInstances.map((input) => input.contextProvidersInstances).flat(); - } + render(externalContext: ExternalContext) { + const contextProviders = this.getContextProvidersInstances(externalContext); + const fullContext = contextProviders.map((provider) => provider.getContextItemData()); - get contextProviders() { - return this.allContextProviders.filter((p) => p.entityName === "unit"); + this.saveContext(fullContext, externalContext); + + this.input = this.inputInstances.map((input) => { + return input.render(this.renderingContext).toJSON(); + }); } - /** Update rendering context and persistent context - * Note: this function is sometimes being called without passing a context! - */ - render(context: AnyObject = {}) { - this.renderingContext = { ...this.renderingContext, ...context }; + getContextProvidersInstances(externalContext: ExternalContext) { + const uniqueContextProviderNames = [ + ...new Set( + this.input + .map((input) => { + return input.template.contextProviders.map((provider) => { + return provider.name; + }); + }) + .flat(), + ), + ]; - const newInput: ExecutionUnitInputItemSchema[] = []; - const newPersistentContext: ContextItem[] = []; - const newRenderingContext: ContextItem[] = []; + return uniqueContextProviderNames.map((name) => { + return createProvider(name, this.context, externalContext); + }); + } - this.inputInstances.forEach((input) => { - input.setContext(this.renderingContext); - input.render(); + addConvergenceContext(parameter: ConvergenceParameter, externalContext: ExternalContext) { + // TODO: kgrid should be abstracted and selected by user + const parameterToContextProviderMap = { + N_k: "kgrid", + N_k_nonuniform: "kgrid", + } as const; + + const contextName = parameterToContextProviderMap[parameter.name]; + const contextProviders = this.getContextProvidersInstances(externalContext); + + const fullContext = contextProviders.map((provider) => { + if (provider.name === contextName) { + provider.applyConvergenceParameter(parameter); + return provider.getContextItemData(); + } + return provider.getContextItemData(); + }); - const inputJSON = input.toJSON(); - const context = input.getFullContext(); + this.saveContext(fullContext, externalContext); + } - newInput.push(inputJSON); - newRenderingContext.push(...context); - newPersistentContext.push(...context.filter((c) => c.isEdited)); - }); + private saveContext(fullContext: ContextItemSchema[], externalContext: ExternalContext) { + // persistent context + this.context = fullContext.filter((c) => c.isEdited); - this.input = newInput; - this.renderingContext = newRenderingContext; - this.context = newPersistentContext; + this.renderingContext = { + ...Object.fromEntries(fullContext.map((context) => [context.name, context.data])), + ...externalContext, + }; } - /** - * @summary Calculates hash on unit-specific fields. - * The meaningful fields of processing unit are operation, flavor and input at the moment. - */ getHashObject() { + const { application, executable, flavor, input } = this.toJSON(); + return { ...super.getHashObject(), - application: Utils.specific.removeTimestampableKeysFromConfig( - this.applicationInstance.toJSON(), - ), - executable: Utils.specific.removeTimestampableKeysFromConfig( - this.executableInstance.toJSON(), - ), - flavor: this.flavorInstance - ? Utils.specific.removeTimestampableKeysFromConfig(this.flavorInstance.toJSON()) - : undefined, + application, + executable, + flavor, input: Utils.hash.calculateHashFromObject( - this.input.map((i) => { + input.map(({ template }) => { return Utils.str.removeEmptyLinesFromString( - Utils.str.removeCommentsFromSourceCode(i.template.content), + Utils.str.removeCommentsFromSourceCode(template.content), ); }), ), }; } - - // toJSON() { - // const json = super.toJSON() as ExecutionUnitSchemaBase & AnyObject; - - // // Remove results from executable; TODO: why do we need this? - // if (json.executable) { - // // eslint-disable-next-line @typescript-eslint/no-unused-vars - // const { results: _, ...executable } = json.executable; - - // return { - // ...json, - // executable: { - // ...executable, - // }, - // }; - // } - - // return json; - // } } executionUnitSchemaMixin(ExecutionUnit.prototype); -contextMixin(ExecutionUnit.prototype); -importantSettingsProviderMixin(ExecutionUnit.prototype); + +export default ExecutionUnit; diff --git a/src/js/units/ExecutionUnitInput.ts b/src/js/units/ExecutionUnitInput.ts new file mode 100644 index 00000000..d969f431 --- /dev/null +++ b/src/js/units/ExecutionUnitInput.ts @@ -0,0 +1,68 @@ +import { Template } from "@mat3ra/ade"; +import { InMemoryEntity } from "@mat3ra/code/dist/js/entity"; +import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; +import type { TemplateSchema } from "@mat3ra/esse/dist/js/types"; +import { setupNunjucksEnvironment } from "@mat3ra/standata"; +import nunjucks from "nunjucks"; + +import { + ExecutionUnitInputSchemaMixin, + executionUnitInputSchemaMixin, +} from "../generated/ExecutionUnitInputSchemaMixin"; + +type Schema = ExecutionUnitInputSchemaMixin; +type JSON = Schema & AnyObject; +type Base = typeof InMemoryEntity & Constructor; +type ConstructorConfig = Schema | (Omit & { template: Template }); + +const env = setupNunjucksEnvironment(new nunjucks.Environment()); + +export default class ExecutionUnitInput extends (InMemoryEntity as Base) implements Schema { + declare _json: JSON; + + declare toJSON: () => JSON; + + declare toJSONQuick: () => JSON; + + static get jsonSchema() { + return JSONSchemasInterface.getSchemaById("workflow/unit/input/-inputItem"); + } + + static createFromTemplate(template: Template | TemplateSchema) { + return new ExecutionUnitInput({ + template, + rendered: template.content, + isManuallyChanged: false, + }); + } + + constructor(config: ConstructorConfig) { + const { template } = config; + const templateInstance = template instanceof Template ? template : new Template(template); + + super({ ...config, template: templateInstance.toJSON() }); + } + + render(renderingContext: Record) { + if (this.isManuallyChanged) { + return this; + } + + try { + const rendered = nunjucks.compile(this.template.content, env).render(renderingContext); + + this.rendered = rendered || this.template.content; + + return this; + } catch (error) { + console.error("Error rendering template", this.template.content); + console.error("Rendering context: ", JSON.stringify(renderingContext)); + console.error("Error", error); + throw error; + } + } +} + +executionUnitInputSchemaMixin(ExecutionUnitInput.prototype); diff --git a/src/js/units/IOUnit.ts b/src/js/units/IOUnit.ts index 02e62424..cf7d44b6 100644 --- a/src/js/units/IOUnit.ts +++ b/src/js/units/IOUnit.ts @@ -1,17 +1,24 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { DataIOUnitSchema } from "@mat3ra/esse/dist/js/types"; import { UnitType } from "../enums"; import { type IOUnitSchemaMixin, iOUnitSchemaMixin } from "../generated/IOUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = DataIOUnitSchema; type Base = typeof BaseUnit & Constructor; -export class IOUnit extends (BaseUnit as Base) implements Schema { +class IOUnit extends (BaseUnit as Base) implements Schema { + declare toJSON: () => Schema & AnyObject; + + declare _json: Schema & AnyObject; + constructor(config: Partial) { super({ name: UnitType.io, subtype: "input", ...config, type: UnitType.io }); } } iOUnitSchemaMixin(IOUnit.prototype); + +export default IOUnit; diff --git a/src/js/units/MapUnit.ts b/src/js/units/MapUnit.ts index 5a96a781..9451b600 100644 --- a/src/js/units/MapUnit.ts +++ b/src/js/units/MapUnit.ts @@ -1,9 +1,10 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { MapUnitSchema } from "@mat3ra/esse/dist/js/types"; import { UnitType } from "../enums"; import { type MapUnitSchemaMixin, mapUnitSchemaMixin } from "../generated/MapUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = MapUnitSchema; @@ -22,8 +23,12 @@ export const defaultMapConfig = { type Base = typeof BaseUnit & Constructor; -export class MapUnit extends (BaseUnit as Base) implements Schema { - constructor(config: Partial) { +class MapUnit extends (BaseUnit as Base) implements Schema { + declare toJSON: () => Schema & AnyObject; + + declare _json: Schema & AnyObject; + + constructor(config?: Partial) { super({ ...defaultMapConfig, ...config }); } @@ -33,3 +38,5 @@ export class MapUnit extends (BaseUnit as Base) implements Schema { } mapUnitSchemaMixin(MapUnit.prototype); + +export default MapUnit; diff --git a/src/js/units/ProcessingUnit.ts b/src/js/units/ProcessingUnit.ts deleted file mode 100644 index 460003d3..00000000 --- a/src/js/units/ProcessingUnit.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; -import type { ProcessingUnitSchema } from "@mat3ra/esse/dist/js/types"; - -import { UnitType } from "../enums"; -import { - type ProcessingUnitSchemaMixin, - processingUnitSchemaMixin, -} from "../generated/ProcessingUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; - -type Schema = ProcessingUnitSchema; -type Base = typeof BaseUnit & Constructor; - -export class ProcessingUnit extends (BaseUnit as Base) implements Schema { - constructor(config: Partial) { - super({ - name: UnitType.processing, - type: UnitType.processing, - ...config, - }); - } - - setOperation(op: ProcessingUnitSchema["operation"]) { - this.setProp("operation", op); - } - - setOperationType(type: ProcessingUnitSchema["operationType"]) { - this.setProp("operationType", type); - } - - setInput(input: ProcessingUnitSchema["inputData"]) { - this.setProp("inputData", input); - } -} - -processingUnitSchemaMixin(ProcessingUnit.prototype); diff --git a/src/js/units/ReduceUnit.ts b/src/js/units/ReduceUnit.ts index 2da9929d..9e95e3e7 100644 --- a/src/js/units/ReduceUnit.ts +++ b/src/js/units/ReduceUnit.ts @@ -1,4 +1,5 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { ReduceUnitSchema } from "@mat3ra/esse/dist/js/types"; import { UnitType } from "../enums"; @@ -6,15 +7,21 @@ import { type ReduceUnitSchemaMixin, reduceUnitSchemaMixin, } from "../generated/ReduceUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = ReduceUnitSchema; type Base = typeof BaseUnit & Constructor; -export class ReduceUnit extends (BaseUnit as Base) implements Schema { - constructor(unitName: string, mapUnit: string, input: ReduceUnitSchema["input"]) { - super({ type: UnitType.reduce, name: unitName, mapFlowchartId: mapUnit, input }); +class ReduceUnit extends (BaseUnit as Base) implements Schema { + declare toJSON: () => Schema & AnyObject; + + declare _json: Schema & AnyObject; + + constructor(config: Omit) { + super({ ...config, type: UnitType.reduce }); } } reduceUnitSchemaMixin(ReduceUnit.prototype); + +export default ReduceUnit; diff --git a/src/js/units/SubworkflowUnit.ts b/src/js/units/SubworkflowUnit.ts index 78da842b..b81b1edc 100644 --- a/src/js/units/SubworkflowUnit.ts +++ b/src/js/units/SubworkflowUnit.ts @@ -1,4 +1,5 @@ import type { Constructor } from "@mat3ra/code/dist/js/utils/types"; +import type { AnyObject } from "@mat3ra/esse/dist/js/esse/types"; import type { SubworkflowUnitSchema } from "@mat3ra/esse/dist/js/types"; import { UnitType } from "../enums"; @@ -6,15 +7,21 @@ import { type SubworkflowUnitSchemaMixin, subworkflowUnitSchemaMixin, } from "../generated/SubworkflowUnitSchemaMixin"; -import { BaseUnit } from "./BaseUnit"; +import BaseUnit from "./BaseUnit"; type Schema = SubworkflowUnitSchema; type Base = typeof BaseUnit & Constructor; -export class SubworkflowUnit extends (BaseUnit as Base) implements Schema { +class SubworkflowUnit extends (BaseUnit as Base) implements Schema { + declare toJSON: () => Schema & AnyObject; + + declare _json: Schema & AnyObject; + constructor(config: Partial) { super({ name: "New Subworkflow", ...config, type: UnitType.subworkflow }); } } subworkflowUnitSchemaMixin(SubworkflowUnit.prototype); + +export default SubworkflowUnit; diff --git a/src/js/units/builders/AssertionUnitConfigBuilder.js b/src/js/units/builders/AssertionUnitConfigBuilder.js deleted file mode 100644 index bb0e6f4e..00000000 --- a/src/js/units/builders/AssertionUnitConfigBuilder.js +++ /dev/null @@ -1,28 +0,0 @@ -import { UNIT_TYPES } from "../../enums"; -import { UnitConfigBuilder } from "./UnitConfigBuilder"; - -export class AssertionUnitConfigBuilder extends UnitConfigBuilder { - constructor(name, statement, errorMessage) { - super({ name, type: UNIT_TYPES.assertion }); - this._statement = statement; - this._errorMessage = errorMessage; - } - - statement(str) { - this._statement = str; - return this; - } - - errorMessage(str) { - this._errorMessage = str; - return this; - } - - build() { - return { - ...super.build(), - statement: this._statement, - errorMessage: this._errorMessage, - }; - } -} diff --git a/src/js/units/builders/AssignmentUnitConfigBuilder.js b/src/js/units/builders/AssignmentUnitConfigBuilder.js deleted file mode 100644 index c4f56468..00000000 --- a/src/js/units/builders/AssignmentUnitConfigBuilder.js +++ /dev/null @@ -1,36 +0,0 @@ -import { UNIT_TYPES } from "../../enums"; -import { UnitConfigBuilder } from "./UnitConfigBuilder"; - -export class AssignmentUnitConfigBuilder extends UnitConfigBuilder { - constructor(name, variableName, variableValue, input = [], results = []) { - super({ name, type: UNIT_TYPES.assignment }); - this._variableName = variableName; - this._variableValue = variableValue; - this._input = input; - this._results = results; - } - - input(arr) { - this._input = arr; - return this; - } - - variableName(str) { - this._variableName = str; - return this; - } - - variableValue(str) { - this._variableValue = str; - return this; - } - - build() { - return { - ...super.build(), - input: this._input, - operand: this._variableName, - value: this._variableValue, - }; - } -} diff --git a/src/js/units/builders/ExecutionUnitConfigBuilder.js b/src/js/units/builders/ExecutionUnitConfigBuilder.js deleted file mode 100644 index 684ef33c..00000000 --- a/src/js/units/builders/ExecutionUnitConfigBuilder.js +++ /dev/null @@ -1,59 +0,0 @@ -/* eslint-disable class-methods-use-this */ -import { ApplicationRegistry } from "@mat3ra/ade"; - -import { UNIT_TYPES } from "../../enums"; -import { UnitConfigBuilder } from "./UnitConfigBuilder"; - -export class ExecutionUnitConfigBuilder extends UnitConfigBuilder { - constructor(name, application, execName, flavorName, flowchartId, cache = []) { - super({ name, type: UNIT_TYPES.execution, flowchartId, cache }); - - try { - this.initialize(application, execName, flavorName); - } catch (e) { - console.error(`Can't initialize executable/flavor: ${execName}/${flavorName}`); - throw e; - } - - // initialize runtimeItems - this._results = this.flavor.results; - this._monitors = this.flavor.monitors; - this._preProcessors = this.flavor.preProcessors; - this._postProcessors = this.flavor.postProcessors; - } - - initialize(application, execName, flavorName) { - this.application = application; - this.executable = this._createExecutable(this.application, execName); - this.flavor = this._createFlavor(this.executable, flavorName); - } - - build() { - return { - ...super.build(), - application: this.application.toJSON(), - executable: this.executable.toJSON(), - flavor: this.flavor.toJSON(), - }; - } - - /** - * Creates an executable instance. This method is intended to be overridden in subclasses. - * @param {Application} application - The application object - * @param {string} execName - The name of the executable - * @returns {Executable} The created executable instance - */ - _createExecutable(application, execName) { - return ApplicationRegistry.getExecutableByName(application.name, execName); - } - - /** - * Creates a flavor instance. This method is intended to be overridden in subclasses. - * @param {Executable} executable - The executable object - * @param {string} flavorName - The name of the flavor - * @returns {Flavor} The created flavor instance - */ - _createFlavor(executable, flavorName) { - return ApplicationRegistry.getFlavorByName(executable, flavorName); - } -} diff --git a/src/js/units/builders/IOUnitConfigBuilder.js b/src/js/units/builders/IOUnitConfigBuilder.js deleted file mode 100644 index 4a5fc3e2..00000000 --- a/src/js/units/builders/IOUnitConfigBuilder.js +++ /dev/null @@ -1,53 +0,0 @@ -import { UNIT_TYPES } from "../../enums"; -import { UnitConfigBuilder } from "./UnitConfigBuilder"; - -export class IOUnitConfigBuilder extends UnitConfigBuilder { - constructor(name, endpointName, endpointOptions) { - super({ name, type: UNIT_TYPES.io }); - this._endpointName = endpointName; - this._endpointOptions = endpointOptions; - this._variableName = "DATA"; - this._subtype = "input"; - this._source = "api"; - } - - endpointName(str) { - this._endpointName = str; - return this; - } - - endpointOptions(options) { - this._endpointOptions = options; - return this; - } - - variableName(str) { - this._variableName = str; - return this; - } - - subtype(str) { - this._subtype = str; - return this; - } - - source(str) { - this._source = str; - return this; - } - - build() { - return { - ...super.build(), - subtype: this._subtype, - source: this._source, - input: [ - { - endpoint: this._endpointName, - endpoint_options: this._endpointOptions, - name: this._variableName, - }, - ], - }; - } -} diff --git a/src/js/units/builders/UnitConfigBuilder.js b/src/js/units/builders/UnitConfigBuilder.js deleted file mode 100644 index f78171a3..00000000 --- a/src/js/units/builders/UnitConfigBuilder.js +++ /dev/null @@ -1,92 +0,0 @@ -import { Utils } from "@mat3ra/utils"; -import _ from "underscore"; - -export class UnitConfigBuilder { - static usePredefinedIds = false; - - constructor({ name, type, flowchartId, cache = [] }) { - this.type = type; - this._name = name; - this._head = false; - this._results = []; - this._monitors = []; - this._preProcessors = []; - this._postProcessors = []; - this.cache = cache; - const countInCache = this.cache.filter((s) => s === name).length; - this.cache.push(name); - this._flowchartId = flowchartId || this.generateFlowChartId(name, countInCache); - } - - name(str) { - this._name = str; - return this; - } - - head(bool) { - this._head = bool; - return this; - } - - generateFlowChartId(seed, countInCache = 0) { - const suffix = countInCache > 0 ? `-${countInCache}` : ""; - const seedWithSuffix = `${seed}${suffix}`; - if (this.constructor.usePredefinedIds) - return Utils.uuid.getUUIDFromNamespace(seedWithSuffix); - return Utils.uuid.getUUID(); - } - - flowchartId(flowchartId) { - this._flowchartId = flowchartId; - return this; - } - - static _stringArrayToNamedObject(array) { - return array.map((name) => (_.isString(name) ? { name } : name)); - } - - addPreProcessors(preProcessorNames) { - this._preProcessors = _.union( - this.constructor._stringArrayToNamedObject(preProcessorNames), - this._preProcessors, - ); - return this; - } - - addPostProcessors(postProcessorNames) { - this._postProcessors = _.union( - this.constructor._stringArrayToNamedObject(postProcessorNames), - this._postProcessors, - ); - return this; - } - - addResults(resultNames) { - this._results = _.union( - this.constructor._stringArrayToNamedObject(resultNames), - this._results, - ); - return this; - } - - addMonitors(monitorNames) { - this._monitors = _.union( - this.constructor._stringArrayToNamedObject(monitorNames), - this._monitors, - ); - return this; - } - - build() { - return { - type: this.type, - name: this._name, - head: this._head, - results: this._results, - monitors: this._monitors, - flowchartId: this._flowchartId, - preProcessors: this._preProcessors, - postProcessors: this._postProcessors, - }; - } -} diff --git a/src/js/units/builders/index.js b/src/js/units/builders/index.js deleted file mode 100644 index 5d4dc5fb..00000000 --- a/src/js/units/builders/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import { AssertionUnitConfigBuilder } from "./AssertionUnitConfigBuilder"; -import { AssignmentUnitConfigBuilder } from "./AssignmentUnitConfigBuilder"; -import { ExecutionUnitConfigBuilder } from "./ExecutionUnitConfigBuilder"; -import { IOUnitConfigBuilder } from "./IOUnitConfigBuilder"; -import { UnitConfigBuilder } from "./UnitConfigBuilder"; - -const builders = { - UnitConfigBuilder, - AssignmentUnitConfigBuilder, - AssertionUnitConfigBuilder, - ExecutionUnitConfigBuilder, - IOUnitConfigBuilder, -}; - -export { builders }; diff --git a/src/js/units/factory.ts b/src/js/units/factory.ts index a5e038e1..4770681c 100644 --- a/src/js/units/factory.ts +++ b/src/js/units/factory.ts @@ -1,36 +1,39 @@ -import type { - AssertionUnitSchema, - AssignmentUnitSchema, - ConditionUnitSchema, - DataIOUnitSchema, - MapUnitSchema, - ProcessingUnitSchema, - SubworkflowUnitSchema, -} from "@mat3ra/esse/dist/js/types"; +import type { WorkflowSubworkflowUnitSchema, WorkflowUnitSchema } from "@mat3ra/esse/dist/js/types"; import { UnitType } from "../enums"; -import { AssertionUnit } from "./AssertionUnit"; -import { AssignmentUnit } from "./AssignmentUnit"; -import { BaseUnit } from "./BaseUnit"; -import { ConditionUnit } from "./ConditionUnit"; -import { type ExecutionUnitSchema, ExecutionUnit } from "./ExecutionUnit"; -import { IOUnit } from "./IOUnit"; -import { MapUnit } from "./MapUnit"; -import { ProcessingUnit } from "./ProcessingUnit"; -import { SubworkflowUnit } from "./SubworkflowUnit"; +import AssertionUnit from "./AssertionUnit"; +import AssignmentUnit from "./AssignmentUnit"; +import ConditionUnit from "./ConditionUnit"; +import ExecutionUnit from "./ExecutionUnit"; +import IOUnit from "./IOUnit"; +import MapUnit from "./MapUnit"; +import ReduceUnit from "./ReduceUnit"; +import SubworkflowUnit from "./SubworkflowUnit"; -type UnitConfig = - | ExecutionUnitSchema - | AssignmentUnitSchema - | ConditionUnitSchema - | DataIOUnitSchema - | ProcessingUnitSchema - | MapUnitSchema - | SubworkflowUnitSchema - | AssertionUnitSchema; +export type AnyWorkflowUnit = MapUnit | SubworkflowUnit | ReduceUnit; + +export type AnySubworkflowUnit = + | ExecutionUnit + | AssignmentUnit + | ConditionUnit + | IOUnit + | AssertionUnit; export class UnitFactory { - static create(config: UnitConfig): BaseUnit { + static createInWorkflow(config: WorkflowUnitSchema): AnyWorkflowUnit { + switch (config.type) { + case UnitType.map: + return new MapUnit(config); + case UnitType.subworkflow: + return new SubworkflowUnit(config); + case UnitType.reduce: + return new ReduceUnit(config); + default: + throw new Error(`Unknown unit type: ${config.type}`); + } + } + + static createInSubworkflow(config: WorkflowSubworkflowUnitSchema): AnySubworkflowUnit { switch (config.type) { case UnitType.execution: return new ExecutionUnit(config); @@ -40,12 +43,6 @@ export class UnitFactory { return new ConditionUnit(config); case UnitType.io: return new IOUnit(config); - case UnitType.processing: - return new ProcessingUnit(config); - case UnitType.map: - return new MapUnit(config); - case UnitType.subworkflow: - return new SubworkflowUnit(config); case UnitType.assertion: return new AssertionUnit(config); default: diff --git a/src/js/units/index.ts b/src/js/units/index.ts index 8574c322..727f357c 100644 --- a/src/js/units/index.ts +++ b/src/js/units/index.ts @@ -1,14 +1,13 @@ -import { AssertionUnit } from "./AssertionUnit"; -import { AssignmentUnit } from "./AssignmentUnit"; -import { BaseUnit } from "./BaseUnit"; -import { ConditionUnit } from "./ConditionUnit"; -import { ExecutionUnit } from "./ExecutionUnit"; +import AssertionUnit from "./AssertionUnit"; +import AssignmentUnit from "./AssignmentUnit"; +import BaseUnit from "./BaseUnit"; +import ConditionUnit from "./ConditionUnit"; +import ExecutionUnit from "./ExecutionUnit"; import { UnitFactory } from "./factory"; -import { IOUnit } from "./IOUnit"; -import { MapUnit } from "./MapUnit"; -import { ProcessingUnit } from "./ProcessingUnit"; -import { ReduceUnit } from "./ReduceUnit"; -import { SubworkflowUnit } from "./SubworkflowUnit"; +import IOUnit from "./IOUnit"; +import MapUnit from "./MapUnit"; +import ReduceUnit from "./ReduceUnit"; +import SubworkflowUnit from "./SubworkflowUnit"; export { BaseUnit, @@ -18,7 +17,6 @@ export { ExecutionUnit, IOUnit, MapUnit, - ProcessingUnit, ReduceUnit, SubworkflowUnit, UnitFactory, diff --git a/src/js/RuntimeItemsUILogicMixin.ts b/src/js/units/mixins/RuntimeItemsUILogicMixin.ts similarity index 97% rename from src/js/RuntimeItemsUILogicMixin.ts rename to src/js/units/mixins/RuntimeItemsUILogicMixin.ts index 09a9d2e7..2f316b95 100644 --- a/src/js/RuntimeItemsUILogicMixin.ts +++ b/src/js/units/mixins/RuntimeItemsUILogicMixin.ts @@ -33,7 +33,7 @@ type Base = InMemoryEntity & }; // @ts-expect-error -const propertiesMixn: Base & RuntimeItemsUILogic & RuntimeItemsUILogicPrivate = { +const propertiesMixin: Base & RuntimeItemsUILogic & RuntimeItemsUILogicPrivate = { setRuntimeItemsToDefaultValues() { this.results = this.defaultResults; this.monitors = this.defaultMonitors; @@ -83,5 +83,5 @@ const propertiesMixn: Base & RuntimeItemsUILogic & RuntimeItemsUILogicPrivate = }; export function runtimeItemsUILogicMixin(item: T) { - Object.defineProperties(item, Object.getOwnPropertyDescriptors(propertiesMixn)); + Object.defineProperties(item, Object.getOwnPropertyDescriptors(propertiesMixin)); } diff --git a/src/js/utils.js b/src/js/utils.js deleted file mode 100644 index 993317b7..00000000 --- a/src/js/utils.js +++ /dev/null @@ -1,73 +0,0 @@ -import lodash from "lodash"; - -/** - * @summary set the head of an array of units - * @param units - * @returns {Unit[]} - */ -export function setUnitsHead(units) { - if (units.length > 0) { - units[0].head = true; - lodash.tail(units).map((x) => (x.head = false)); - } - return units; -} - -// TODO: fix setNextLinks on unit removal and convergence logic. -/** - * @summary Re-establishes the linked `next => flowchartId` logic in an array of units - * @params units {Unit[]} - * @returns units {Unit[]} - */ -export function setNextLinks(units) { - const flowchartIds = units.map((u) => u.flowchartId); - for (let i = 0; i < units.length - 1; i++) { - if (!units[i].next) { - // newly added units don't have next set yet => set it - units[i].next = units[i + 1].flowchartId; - if (i > 0) units[i - 1].next = units[i].flowchartId; - } else if (!flowchartIds.includes(units[i].next)) { - // newly removed units may create broken next links => fix it - units[i].next = units[i + 1].flowchartId; - } - } - return units; -} - -/** - * @summary Apply configuration data to an object - * @param obj {*} object / class containing methods or attributes to be set - * @param config { functions: {}, attributes: {} } functions to call and attributes to set - * @param callBuild {boolean} if true; call build between applying functions and attributes - * @returns {*} updated object - */ -export function applyConfig({ obj, config = {}, callBuild = false }) { - const { functions = {}, attributes = {} } = config; - // eslint-disable-next-line no-restricted-syntax - for (const [func, args] of Object.entries(functions)) { - // eslint-disable-next-line no-nested-ternary - if (obj[func]) { - if (args) obj[func](args); - else obj[func](); - } - } - const modified = callBuild ? obj.build() : obj; - // eslint-disable-next-line no-restricted-syntax - for (const [key, values] of Object.entries(attributes)) { - modified[key] = values; - } - return modified; -} - -/** - * @summary Safely extract unit object from subworkflow data - * @param subworkflowData {Object} subworkflow data - * @param index {number} index of subworkflow unit - * @param type {string} type of subworkflow unit - * @returns {Object|null} subworkflow unit object (not a unit class instance!) - */ -export function findUnit({ subworkflowData, index, type }) { - const unit = subworkflowData.units[index]; - if (unit.type !== type) throw new Error("findUnit() error: unit type does not match!"); - return unit; -} diff --git a/src/js/utils/index.ts b/src/js/utils/index.ts new file mode 100644 index 00000000..7551e979 --- /dev/null +++ b/src/js/utils/index.ts @@ -0,0 +1 @@ +export * as workflow from "./workflow"; diff --git a/src/js/utils/workflow.ts b/src/js/utils/workflow.ts new file mode 100644 index 00000000..d731f98a --- /dev/null +++ b/src/js/utils/workflow.ts @@ -0,0 +1,52 @@ +import type { ApplicationSchema, WorkflowSchema } from "@mat3ra/esse/dist/js/types"; +import { MODEL_NAMES } from "@mat3ra/mode/dist/js/tree"; +import s from "underscore.string"; + +export function getUsedApplications(workflow: WorkflowSchema): ApplicationSchema[] { + const swApplications = workflow.subworkflows.map((sw) => sw.application); + const nestedWorkflows = workflow.workflows as WorkflowSchema[]; + const wfApplications = nestedWorkflows.map(getUsedApplications).flat(); + + return [...swApplications, ...wfApplications].reduce((acc, app) => { + if (!acc.some((a) => a.name === app.name)) { + acc.push(app); + } + return acc; + }, []); +} + +export function getSystemName(workflow: WorkflowSchema): string { + const applicationNames = getUsedApplications(workflow).map((a) => a.name); + return s.slugify(`${applicationNames.join(":")}-${workflow.name}`); +} + +export function getUsedModels(workflow: WorkflowSchema) { + return workflow.subworkflows.map((sw) => sw.model.type); +} + +export function getDefaultDescription(workflow: WorkflowSchema): string { + const applicationNames = getUsedApplications(workflow).map((a) => a.name); + + return `${getUsedModels(workflow) + .join(", ") + .toUpperCase()} workflow using ${applicationNames.join(", ")}.`; +} + +export function getProperties(workflow: WorkflowSchema) { + return [...new Set(workflow.subworkflows.map((sw) => sw.properties || []).flat())]; +} + +export function getHumanReadableProperties(workflow: WorkflowSchema) { + return getProperties(workflow).map((name) => + name + .split("_") + .map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()) + .join(" "), + ); +} + +export function getHumanReadableUsedModels(workflow: WorkflowSchema) { + return getUsedModels(workflow) + .filter((m) => m !== "unknown") + .map((m) => MODEL_NAMES[m]); +} diff --git a/src/js/workflows/create.js b/src/js/workflows/create.js deleted file mode 100644 index 55e56a9d..00000000 --- a/src/js/workflows/create.js +++ /dev/null @@ -1,227 +0,0 @@ -import { createSubworkflow } from "../subworkflows/create"; -import { UnitFactory } from "../units"; -import { defaultMapConfig } from "../units/map"; -import { applyConfig, findUnit } from "../utils"; -import { Workflow } from "./workflow"; - -/** - * @summary Helper for creating Map units for complex workflows - * @param config {Object} map unit configuration - * @param unitFactoryCls {*} class factory for map unit - * @returns {*} map unit - */ -function createMapUnit({ config, unitFactoryCls = UnitFactory }) { - let { input: defaultInput } = defaultMapConfig; - if (config.input) { - defaultInput = { ...defaultInput, ...config.input }; - } - const unit = unitFactoryCls.create({ ...defaultMapConfig, input: defaultInput }); - return unit; -} - -/** - * @summary Update subworkflow units with patch configuration defined in the workflow config - * @param subworkflowData {Object} subworkflow data - * @param unitConfigs {Array} array of patch configs for subworkflow units - * @returns subworkflowData {Object} subworkflowData with patches applied to units - */ -function updateUnitConfigs({ subworkflowData, unitConfigs }) { - unitConfigs.forEach((config) => { - const { index, type, config: unitConfig } = config; // unitConfig should contain 'attributes' key - const unit = findUnit({ subworkflowData, index, type }); - console.log(` patching ${type} unit ${index} of subworkflow ${subworkflowData.name}`); - unit.config = applyConfig({ obj: unit.config, config: unitConfig }); - return null; - }); - return subworkflowData; -} - -/** - * @summary Use subworkflow.createSubworkflow to create a Subworkflow unit - * @param appName {String} application name - * @param unitData {*} object containing subworkflow configuration data - * @param workflowData {*} object containing all workflow configuration data - * @param swArgs {*} subworkflow classes - * @returns {*} subworkflow object - */ -function createSubworkflowUnit({ appName, unitData, workflowData, cache, ...swArgs }) { - const { name: unitName, unitConfigs, config } = unitData; - const { subworkflows } = workflowData; - const { [appName]: dataByApp } = subworkflows; - let { [unitName]: subworkflowData } = dataByApp; - subworkflowData.config = { ...subworkflowData.config, ...config }; - if (unitConfigs) subworkflowData = updateUnitConfigs({ subworkflowData, unitConfigs }); - return createSubworkflow({ - subworkflowData, - cache, - ...swArgs, - }); -} - -/** - * @summary Create the first workflow object specified in a workflow configuration - * @param workflow {*|null} the workflow (if already initialized, no-op) - * @param unit {*} workflow unit object - * @param type {String} value in ["workflow", "subworkflow"] - * @param workflowCls {*} workflow class - * @returns {Workflow|*} workflow object - */ -function createWorkflowHead({ workflow, unit, type, workflowCls }) { - if (workflow) return workflow; - let wf; - switch (type) { - case "workflow": - wf = unit; - break; - case "subworkflow": - wf = workflowCls.fromSubworkflow(unit); - break; - default: - throw new Error(`workflow type=${type} not understood.`); - } - return wf; -} - -/** - * @summary Combine workflow units together - * @param workflow {*} the workflow object - * @param unit {*} workflow/subworkflow object - * @param config {*} additional configuration for e.g. map units - * @param type {String} value in ["workflow", "subworkflow"] - * @param unitFactoryCls {*} unit factory class for e.g. map units - * @returns {*} modified workflow - */ -function composeWorkflow({ workflow, unit, config, type, unitFactoryCls }) { - /* eslint-disable no-case-declarations */ - switch (type) { - case "workflow": - const { mapUnit: isMapUnit, ...mapUnitConfig } = config; - if (isMapUnit) { - const mapUnit = createMapUnit({ config: mapUnitConfig, unitFactoryCls }); - workflow.addMapUnit(mapUnit, unit); - } else { - console.log("adding workflows directly to workflows is not supported."); - } - break; - case "subworkflow": - workflow.addSubworkflow(unit); - break; - default: - throw new Error(`workflow type=${type} not understood.`); - } - /* eslint-enable no-case-declarations */ - return workflow; -} - -/** - * @summary Convert a flattened array of workflow units to a properly constructed workflow - * @param wfUnits {Array} array of workflow units - * @param workflowCls {*} workflow class - * @param unitFactoryCls {*} unit factory class - * @returns {*} constructed workflow - */ -function createFromWorkflowUnits({ wfUnits, workflowCls, unitFactoryCls }) { - let workflow, unit, config, type; - wfUnits.map((wfUnit) => { - ({ unit, config, type } = wfUnit); - if (!workflow) { - workflow = createWorkflowHead({ - workflow, - unit, - type, - workflowCls, - }); - } else { - workflow = composeWorkflow({ - workflow, - unit, - config, - type, - unitFactoryCls, - }); - } - return null; - }); - return applyConfig({ obj: workflow, config }); -} - -/** - * @summary Creates a flattened array of workflow units from nested workflow/subworkflow - * configuration data comprising a simple or complex workflow - * @param appName - * @param units - * @param swArgs - * @returns {*[]} - */ -function createWorkflowUnits({ - appName, - workflowData, - workflowSubworkflowMapByApplication, - workflowCls, - cache = [], - ...swArgs -}) { - const wfUnits = []; - const { units } = workflowData; - let unit, config; - units.map((unitData) => { - const { type } = unitData; - switch (type) { - case "workflow": - ({ config } = unitData); - unit = createWorkflowUnits({ - appName, - workflowData: unitData, - workflowSubworkflowMapByApplication, - workflowCls, - ...swArgs, - }); - break; - case "subworkflow": - ({ config } = workflowData); - unit = createSubworkflowUnit({ - appName, - unitData, - workflowData: workflowSubworkflowMapByApplication, - cache, - ...swArgs, - }); - break; - default: - break; - } - wfUnits.push({ config, unit, type }); - return null; - }); - return createFromWorkflowUnits({ - wfUnits, - workflowCls, - subworkflowCls: swArgs.subworkflowCls, - unitFactoryCls: swArgs.unitFactoryCls, - }); -} - -function createWorkflow({ - appName, - workflowData, - workflowSubworkflowMapByApplication, - workflowCls = Workflow, - ...swArgs -}) { - const cache = []; - const { name } = workflowData; - console.log(`wode: creating ${appName} workflow ${name}`); - const wf = createWorkflowUnits({ - appName, - workflowData, - workflowSubworkflowMapByApplication, - workflowCls, - cache, - ...swArgs, - }); - wf.setName(name); - wf.applicationName = appName; - return wf; -} - -export { createWorkflow }; diff --git a/src/js/workflows/default.js b/src/js/workflows/default.ts similarity index 78% rename from src/js/workflows/default.js rename to src/js/workflows/default.ts index 268e7eae..8336a497 100644 --- a/src/js/workflows/default.js +++ b/src/js/workflows/default.ts @@ -1,4 +1,6 @@ -export default { +import type { WorkflowSchema } from "@mat3ra/esse/dist/js/types"; + +const defaultWorkflowConfig: WorkflowSchema = { name: "New Workflow", properties: [], subworkflows: [ @@ -6,7 +8,9 @@ export default { _id: "c6e9dbbee8929de01f4e76ee", application: { name: "espresso", + shortName: "espresso", summary: "Quantum Espresso", + build: "6.3", version: "6.3", }, model: { @@ -16,6 +20,7 @@ export default { }, subtype: "gga", type: "dft", + functional: "other", }, name: "New Subworkflow", properties: [], @@ -37,3 +42,5 @@ export default { }, ], }; + +export default defaultWorkflowConfig; diff --git a/src/js/workflows/index.js b/src/js/workflows/index.js deleted file mode 100644 index 0eaa0a8a..00000000 --- a/src/js/workflows/index.js +++ /dev/null @@ -1,98 +0,0 @@ -import { allApplications } from "@mat3ra/ade"; -import JSONSchemasInterface from "@mat3ra/esse/dist/js/esse/JSONSchemasInterface"; -import schemas from "@mat3ra/esse/dist/js/schemas.json"; - -// Import Template here to apply context provider patch -// eslint-disable-next-line no-unused-vars -import { Template } from "../patch"; -import { createWorkflow } from "./create"; -import { Workflow } from "./workflow"; - -// Running this to set schemas for validation, removing the redundant data from application-flavors tree: `flavors` -JSONSchemasInterface.setSchemas(schemas); - -/* - Workflow construction follows these rules: - 1. Workflow is constructed as a collection of subworkflows defined in JSON - 2. A "units" key should contain at least one object referencing the workflow itself - 3. Additional workflows are added in order specified in the same "units" array - 4. map units are added along with their workflows according to data in "units" - 5. top-level subworkflows are added directly in the order also specified by "units" - */ -function createWorkflows({ - appName = null, - workflowCls = Workflow, - workflowSubworkflowMapByApplication, - ...swArgs -}) { - let apps = appName !== null ? [appName] : allApplications; - const allApplicationsFromWorkflowData = Object.keys( - workflowSubworkflowMapByApplication.workflows, - ); - // output warning if allApplications and allApplicationsFromWorkflowData do not match - if (appName === null) { - if (apps && apps.sort().join(",") !== allApplicationsFromWorkflowData.sort().join(",")) { - // eslint-disable-next-line no-console - console.warn( - `Warning: allApplications and allApplicationsFromWorkflowData do not match: - ${apps.sort().join(",")} !== ${allApplicationsFromWorkflowData.sort().join(",")}`, - ); - console.warn("Using allApplicationsFromWorkflowData"); - } - apps = allApplicationsFromWorkflowData; - } - const wfs = []; - const { workflows } = workflowSubworkflowMapByApplication; - apps.map((name) => { - const { [name]: dataByApp } = workflows; - Object.values(dataByApp).map((workflowDataForApp) => { - wfs.push( - createWorkflow({ - appName: name, - workflowData: workflowDataForApp, - workflowSubworkflowMapByApplication, - workflowCls, - ...swArgs, - }), - ); - return null; - }); - return null; - }); - return wfs; -} - -/** - * @summary Create workflow configurations for all applications - * @param applications {Array} array of application names - * @param workflowCls {*} workflow class to instantiate - * @param workflowSubworkflowMapByApplication {Object} object containing all workflow/subworkflow map by application - * @param swArgs {Object} other classes for instantiation - * @returns {Array} array of workflow configurations - */ -function createWorkflowConfigs({ - applications, - workflowCls = Workflow, - workflowSubworkflowMapByApplication, - ...swArgs -}) { - const configs = []; - applications.forEach((app) => { - const workflows = createWorkflows({ - appName: app, - workflowCls, - workflowSubworkflowMapByApplication, - ...swArgs, - }); - workflows.forEach((wf) => { - configs.push({ - application: app, - name: wf.prop("name"), - config: wf.toJSON(), - }); - }); - }); - return configs; -} - -export { Workflow, createWorkflows, createWorkflowConfigs, createWorkflow }; diff --git a/src/js/workflows/relaxation.js b/src/js/workflows/relaxation.js deleted file mode 100644 index 36df6876..00000000 --- a/src/js/workflows/relaxation.js +++ /dev/null @@ -1,42 +0,0 @@ -import { SubworkflowStandata } from "@mat3ra/standata"; - -export const RelaxationLogicMixin = (superclass) => - class extends superclass { - get relaxationSubworkflow() { - const appName = this.subworkflows[0]?.application?.name; - if (!appName) return undefined; - const subworkflowStandata = new SubworkflowStandata(); - const relaxationSubworkflow = - subworkflowStandata.getRelaxationSubworkflowByApplication(appName); - if (!relaxationSubworkflow) return undefined; - return new this._Subworkflow(relaxationSubworkflow); - } - - isRelaxationSubworkflow(subworkflow) { - const { relaxationSubworkflow } = this; - return ( - relaxationSubworkflow?.systemName !== undefined && - relaxationSubworkflow.systemName === subworkflow.systemName - ); - } - - get hasRelaxation() { - return this.subworkflows.some((subworkflow) => - this.isRelaxationSubworkflow(subworkflow), - ); - } - - toggleRelaxation() { - if (this.hasRelaxation) { - const relaxSubworkflow = this.subworkflows.find((sw) => - this.isRelaxationSubworkflow(sw), - ); - this.removeSubworkflow(relaxSubworkflow.id); - } else { - const vcRelax = this.relaxationSubworkflow; - if (vcRelax) { - this.addSubworkflow(vcRelax, true); - } - } - } - }; diff --git a/src/js/workflows/workflow.js b/src/js/workflows/workflow.js deleted file mode 100644 index 746e22ad..00000000 --- a/src/js/workflows/workflow.js +++ /dev/null @@ -1,386 +0,0 @@ -/* eslint-disable max-classes-per-file */ -import { NamedDefaultableRepetitionContextAndRenderInMemoryEntity } from "@mat3ra/code/dist/js/entity"; -import workflowSchema from "@mat3ra/esse/dist/js/schema/workflow.json"; -import { ComputedEntityMixin, getDefaultComputeConfig } from "@mat3ra/ide"; -import { tree } from "@mat3ra/mode"; -import { Utils } from "@mat3ra/utils"; -import lodash from "lodash"; -import { mix } from "mixwith"; -import _ from "underscore"; -import s from "underscore.string"; - -import { UNIT_TYPES } from "../enums"; -import { Subworkflow } from "../subworkflows/subworkflow"; -import { MapUnit } from "../units"; -import { UnitFactory } from "../units/factory"; -import { setNextLinks, setUnitsHead } from "../utils"; -import defaultWorkflowConfig from "./default"; -import { RelaxationLogicMixin } from "./relaxation"; - -const { MODEL_NAMES } = tree; - -class BaseWorkflow extends mix(NamedDefaultableRepetitionContextAndRenderInMemoryEntity).with( - ComputedEntityMixin, - RelaxationLogicMixin, -) {} - -export class Workflow extends BaseWorkflow { - static getDefaultComputeConfig = getDefaultComputeConfig; - - static jsonSchema = workflowSchema; - - static usePredefinedIds = false; - - constructor( - config, - _Subworkflow = Subworkflow, - _UnitFactory = UnitFactory, - _Workflow = Workflow, - _MapUnit = MapUnit, - ) { - if (!config._id) { - config._id = Workflow.generateWorkflowId( - config.name, - config.properties, - config.subworkflows, - config.applicationName, - ); - } - super(config); - this._Subworkflow = _Subworkflow; - this._UnitFactory = _UnitFactory; - this._Workflow = _Workflow; - this._MapUnit = _MapUnit; - if (!config.skipInitialize) this.initialize(); - } - - initialize() { - const me = this; - this._subworkflows = this.prop("subworkflows").map((x) => new me._Subworkflow(x)); - this._units = this.prop("units").map((unit) => me._UnitFactory.create(unit)); - this._json.workflows = this._json.workflows || []; - this._workflows = this.prop("workflows").map((x) => new me._Workflow(x)); - } - - static get defaultConfig() { - return defaultWorkflowConfig; - } - - static generateWorkflowId( - name, - properties = null, - subworkflows = null, - applicationName = null, - ) { - const propsInfo = properties?.length ? properties.sort().join(",") : ""; - const swInfo = subworkflows?.length - ? subworkflows.map((sw) => sw.name || "unknown").join(",") - : ""; - const seed = [`workflow-${name}`, applicationName, propsInfo, swInfo] - .filter((p) => p) - .join("-"); - if (this.usePredefinedIds) return Utils.uuid.getUUIDFromNamespace(seed); - return Utils.uuid.getUUID(); - } - - static fromSubworkflow(subworkflow, ClsConstructor = Workflow) { - const config = { - name: subworkflow.name, - subworkflows: [subworkflow.toJSON()], - units: setNextLinks(setUnitsHead([subworkflow.getAsUnit().toJSON()])), - properties: subworkflow.properties, - applicationName: subworkflow.application.name, - }; - return new ClsConstructor(config); - } - - static fromSubworkflows(name, ClsConstructor = Workflow, ...subworkflows) { - return new ClsConstructor( - name, - subworkflows, - subworkflows.map((sw) => sw.getAsUnit()), - ); - } - - /** - * @summary Adds subworkflow to current workflow. - * @param subworkflow {Subworkflow} - * @param head {Boolean} - */ - addSubworkflow(subworkflow, head = false, index = -1) { - const subworkflowUnit = subworkflow.getAsUnit(); - if (head) { - this.subworkflows.unshift(subworkflow); - this.addUnit(subworkflowUnit, head, index); - } else { - this.subworkflows.push(subworkflow); - this.addUnit(subworkflowUnit, head, index); - } - } - - removeSubworkflow(id) { - const subworkflowUnit = this.units.find((u) => u.id === id); - if (subworkflowUnit) this.removeUnit(subworkflowUnit.flowchartId); - } - - subworkflowId(index) { - const sw = this.prop(`subworkflows[${index}]`); - return sw ? sw._id : null; - } - - replaceSubworkflowAtIndex(index, newSubworkflow) { - this._subworkflows[index] = newSubworkflow; - this.setUnits(setNextLinks(setUnitsHead(this._units))); - } - - get units() { - return this._units; - } - - setUnits(arr) { - this._units = arr; - } - - // returns a list of `app` Classes - get usedApplications() { - const swApplications = this.subworkflows.map((sw) => sw.application); - const wfApplications = lodash.flatten(this.workflows.map((w) => w.usedApplications)); - return lodash.uniqBy(swApplications.concat(wfApplications), (a) => a.name); - } - - // return application names - get usedApplicationNames() { - return this.usedApplications.map((a) => a.name); - } - - get usedApplicationVersions() { - return this.usedApplications.map((a) => a.version); - } - - get usedApplicationNamesWithVersions() { - return this.usedApplications.map((a) => `${a.name} ${a.version}`); - } - - get usedModels() { - return lodash.uniq(this.subworkflows.map((sw) => sw.model.type)); - } - - get humanReadableUsedModels() { - return this.usedModels.filter((m) => m !== "unknown").map((m) => MODEL_NAMES[m]); - } - - toJSON(exclude = []) { - return lodash.omit( - { - ...super.toJSON(), - units: this._units.map((x) => x.toJSON()), - subworkflows: this._subworkflows.map((x) => x.toJSON()), - workflows: this.workflows.map((x) => x.toJSON()), - ...(this.compute ? { compute: this.compute } : {}), // {"compute": null } won't pass esse validation - }, - exclude, - ); - } - - get isDefault() { - return this.prop("isDefault", false); - } - - get isMultiMaterial() { - const fromSubworkflows = this.subworkflows.some((sw) => sw.isMultiMaterial); - return this.prop("isMultiMaterial") || fromSubworkflows; - } - - set isMultiMaterial(value) { - this.setProp("isMultiMaterial", value); - } - - set isUsingDataset(value) { - this.setProp("isUsingDataset", value); - } - - get isUsingDataset() { - return !!this.prop("isUsingDataset", false); - } - - get properties() { - return lodash.uniq(lodash.flatten(this._subworkflows.map((x) => x.properties))); - } - - get humanReadableProperties() { - return this.properties.map((name) => s.humanize(name)); - } - - get systemName() { - return s.slugify(`${this.usedApplicationNames.join(":")}-${this.name.toLowerCase()}`); - } - - get defaultDescription() { - return `${this.usedModels - .join(", ") - .toUpperCase()} workflow using ${this.usedApplicationNames.join(", ")}.`; - } - - get exabyteId() { - return this.prop("exabyteId"); - } - - get hash() { - return this.prop("hash", ""); - } - - get isOutdated() { - return this.prop("isOutdated", false); - } - - get history() { - return this.prop("history", []); - } - - setMethodData(methodData) { - this.subworkflows.forEach((sw) => { - const method = methodData.getMethodBySubworkflow(sw); - if (method) sw.model.setMethod(method); - }); - - this.workflows.forEach((wf) => { - wf.subworkflows.forEach((sw) => { - const method = methodData.getMethodBySubworkflow(sw); - if (method) sw.model.setMethod(method); - }); - }); - } - - /** - * @param unit {Unit} - * @param head {Boolean} - * @param index {Number} - */ - addUnit(unit, head = false, index = -1) { - const { units } = this; - if (units.length === 0) { - unit.head = true; - this.setUnits([unit]); - } else { - if (head) { - units.unshift(unit); - } else if (index >= 0) { - units.splice(index, 0, unit); - } else { - units.push(unit); - } - this.setUnits(setNextLinks(setUnitsHead(units))); - } - } - - removeUnit(flowchartId) { - if (this.units.length < 2) return; - - const unit = this.units.find((x) => x.flowchartId === flowchartId); - const previousUnit = this.units.find((x) => x.next === unit.flowchartId); - if (previousUnit) { - delete previousUnit.next; - } - - this._subworkflows = this._subworkflows.filter((x) => x.id !== unit.id); - this._units = setNextLinks( - setUnitsHead(this._units.filter((x) => x.flowchartId !== flowchartId)), - ); - } - - /** - * @return Subworkflow[] - */ - get subworkflows() { - return this._subworkflows; - } - - get workflows() { - return this._workflows; - } - - /* - * @param type {String|Object} Unit type, map or subworkflow - * @param head {Boolean} - * @param index {Number} Index at which the unit will be added. -1 by default (ignored). - */ - addUnitType(type, head = false, index = -1) { - switch (type) { - case UNIT_TYPES.map: - // eslint-disable-next-line no-case-declarations - const workflowConfig = defaultWorkflowConfig; - // eslint-disable-next-line no-case-declarations - const mapUnit = new this._MapUnit(); - workflowConfig._id = this._Workflow.generateWorkflowId( - workflowConfig.name, - workflowConfig.properties, - workflowConfig.subworkflows, - this.applicationName, - ); - this.prop("workflows").push(workflowConfig); - this._workflows = this.prop("workflows").map((x) => new this._Workflow(x)); - mapUnit.setWorkflowId(workflowConfig._id); - this.addUnit(mapUnit, head, index); - break; - case UNIT_TYPES.subworkflow: - this.addSubworkflow(this._Subworkflow.createDefault(), head, index); - break; - default: - console.log(`unit_type=${type} unrecognized, skipping.`); - } - } - - addMapUnit(mapUnit, mapWorkflow) { - const mapWorkflowConfig = mapWorkflow.toJSON(); - if (!mapWorkflowConfig._id) { - mapWorkflowConfig._id = this._Workflow.generateWorkflowId( - mapWorkflowConfig.name, - mapWorkflowConfig.properties, - mapWorkflowConfig.subworkflows, - mapWorkflow.applicationName || this.applicationName, - ); - } - mapUnit.setWorkflowId(mapWorkflowConfig._id); - this.addUnit(mapUnit); - this._json.workflows.push(mapWorkflowConfig); - const me = this; - this._workflows = this.prop("workflows").map((x) => new me._Workflow(x)); - } - - findSubworkflowById(id) { - if (!id) return; - - const workflows = this.workflows || []; - const subworkflows = this.subworkflows || []; - - const subworkflow = subworkflows.find((sw) => sw.id === id); - if (subworkflow) return subworkflow; - - const workflow = workflows.find((w) => w.findSubworkflowById(id)); - if (workflow) return workflow.findSubworkflowById(id); - - console.warn("attempted to find a non-existing subworkflow"); - } - - get allSubworkflows() { - const subworkflowsList = []; - this.subworkflows.forEach((sw) => subworkflowsList.push(sw)); - this.workflows.forEach((workflow) => { - return Array.prototype.push.apply(subworkflowsList, workflow.allSubworkflows); - }); - return subworkflowsList; - } - - /** - * @summary Calculates hash of the workflow. Meaningful fields are units and subworkflows. - * units and subworkflows must be sorted topologically before hashing (already sorted). - */ - calculateHash() { - const meaningfulFields = { - units: _.map(this.units, (u) => u.calculateHash()).join(), - subworkflows: _.map(this.subworkflows, (sw) => sw.calculateHash()).join(), - workflows: _.map(this.workflows, (w) => w.calculateHash()).join(), - }; - return Utils.hash.calculateHashFromObject(meaningfulFields); - } -} diff --git a/tests/js/Workflow.test.ts b/tests/js/Workflow.test.ts new file mode 100644 index 00000000..e05b8d93 --- /dev/null +++ b/tests/js/Workflow.test.ts @@ -0,0 +1,215 @@ +import { + type InMemoryEntityInSetConstructor, + inMemoryEntityInSetMixin, +} from "@mat3ra/code/dist/js/entity/set/InMemoryEntityInSetMixin"; +import { + type OrderedInMemoryEntityInSet, + type OrderedInMemoryEntityInSetConstructor, + orderedEntityInSetMixin, +} from "@mat3ra/code/dist/js/entity/set/ordered/OrderedInMemoryEntityInSetMixin"; +import type { WorkflowSchema } from "@mat3ra/esse/dist/js/types"; +import { Material } from "@mat3ra/made"; +import { ApplicationStandata, WorkflowStandata } from "@mat3ra/standata"; +import { expect } from "chai"; +import type { WorkflowRenderContext } from "src/js/Workflow"; + +import { globalSettings, Subworkflow, Workflow } from "../../src/js"; +import { UnitType } from "../../src/js/enums"; + +type Base = typeof Material & + InMemoryEntityInSetConstructor & + OrderedInMemoryEntityInSetConstructor; + +class OrderedMaterial extends (Material as Base) implements OrderedInMemoryEntityInSet { + declare static createDefault: () => OrderedMaterial; +} + +inMemoryEntityInSetMixin(OrderedMaterial.prototype); +orderedEntityInSetMixin(OrderedMaterial.prototype); + +describe("Workflow", () => { + describe("construction", () => { + it("creates workflow from default config with name, subworkflows, units, and _id", () => { + const config = { ...Workflow.defaultConfig }; + const workflow = new Workflow(config); + + expect(workflow.name).to.equal(Workflow.defaultConfig.name); + expect(workflow.toJSON().subworkflows).to.have.lengthOf( + Workflow.defaultConfig.subworkflows.length, + ); + expect(workflow.toJSON().units).to.have.lengthOf(Workflow.defaultConfig.units.length); + expect(workflow._id).to.be.a("string"); + expect(workflow._id.length).to.be.above(0); + }); + }); + + describe("ID generation", () => { + it("assigns different _id to two workflows from default config", () => { + const w1 = new Workflow({ ...Workflow.defaultConfig }); + const w2 = new Workflow({ ...Workflow.defaultConfig }); + + expect(w1._id).to.not.equal(w2._id); + }); + }); + + describe("fromSubworkflow", () => { + it("creates workflow with one subworkflow and one unit matching subworkflow name", () => { + const subworkflowConfig = Workflow.defaultConfig.subworkflows[0]; + const subworkflow = new Subworkflow(subworkflowConfig); + const workflow = Workflow.fromSubworkflow(subworkflow); + + expect(workflow.toJSON().subworkflows).to.have.lengthOf(1); + expect(workflow.toJSON().units).to.have.lengthOf(1); + expect(workflow.name).to.equal(subworkflow.name); + }); + }); + + describe("toJSON", () => { + it("returns object with name, units, subworkflows, and workflows", () => { + const config = { ...Workflow.defaultConfig }; + const workflow = new Workflow(config); + const json = workflow.toJSON(); + + expect(json).to.have.property("name", workflow.name); + expect(json).to.have.property("units").that.is.an("array"); + expect(json).to.have.property("subworkflows").that.is.an("array"); + expect(json).to.have.property("workflows").that.is.an("array"); + }); + }); + + describe("getters", () => { + it("exposes usedApplications, usedApplicationNames, properties, systemName, defaultDescription", () => { + const config = { ...Workflow.defaultConfig }; + const workflow = new Workflow(config); + + expect(workflow.usedApplications).to.be.an("array"); + expect(workflow.usedApplicationNames).to.be.an("array"); + expect(workflow.getProperties()).to.be.an("array"); + expect(workflow.getSystemName()).to.be.a("string"); + expect(workflow.getSystemName().length).to.be.above(0); + expect(workflow.getDefaultDescription()).to.be.a("string"); + expect(workflow.getDefaultDescription().length).to.be.above(0); + }); + }); + + describe("addSubworkflow / removeSubworkflow", () => { + it("adds subworkflows then removes one and updates counts", () => { + const defaultSub = Workflow.defaultConfig.subworkflows[0]; + const defaultUnit = Workflow.defaultConfig.units[0]; + const config = { + ...Workflow.defaultConfig, + subworkflows: [ + defaultSub, + { ...defaultSub, _id: "second-sw-id", name: "Second Subworkflow" }, + ], + units: [ + defaultUnit, + { + ...defaultUnit, + _id: "second-sw-id", + flowchartId: "second-fc-id", + name: "Second Subworkflow", + }, + ], + }; + const workflow = new Workflow(config); + const secondSubworkflow = new Subworkflow(config.subworkflows[1]); + const thirdSubworkflow = new Subworkflow({ + ...defaultSub, + _id: "third-sw-id", + name: "Third Subworkflow", + }); + workflow.addSubworkflow(thirdSubworkflow); + + expect(workflow.toJSON().subworkflows).to.have.lengthOf(3); + expect(workflow.toJSON().units).to.have.lengthOf(3); + + workflow.removeSubworkflow(secondSubworkflow.id); + + expect(workflow.toJSON().subworkflows).to.have.lengthOf(2); + expect(workflow.toJSON().units).to.have.lengthOf(2); + }); + }); + + describe("addUnitType", () => { + it("adds a subworkflow unit when called with UnitType.subworkflow", () => { + const config = { ...Workflow.defaultConfig }; + const workflow = new Workflow(config); + const initialSubworkflows = workflow.toJSON().subworkflows.length; + const initialUnits = workflow.toJSON().units.length; + + workflow.addUnitType(UnitType.subworkflow); + + expect(workflow.toJSON().subworkflows).to.have.lengthOf(initialSubworkflows + 1); + expect(workflow.toJSON().units).to.have.lengthOf(initialUnits + 1); + }); + }); + + describe("render", () => { + it("invokes each subworkflow render with spread context and parent workflow", () => { + globalSettings.setupApplicationsDriver(new ApplicationStandata()); + const standataWorkflows = new WorkflowStandata().getAll(); + expect(standataWorkflows.length).to.be.above(0); + + const workflows = standataWorkflows.map((standataJson) => { + return new Workflow(standataJson as unknown as WorkflowSchema); + }); + + expect( + workflows.length, + "expected at least one standata workflow from getAll() to construct", + ).to.be.above(0); + + const material = OrderedMaterial.createDefault(); + const context: WorkflowRenderContext = { + material, + materials: [material, material, material], + job: {}, + }; + + workflows.forEach((workflow) => { + workflow.render(context); + + workflow.subworkflowInstances.forEach((subworkflow) => { + subworkflow.unitsInstances + .filter((unit) => unit.type === UnitType.execution) + .forEach((unit) => { + expect(unit.renderingContext).to.deep.include({ ...context }); + expect(unit.renderingContext).to.have.property("methodData"); + expect(unit.renderingContext).to.have.property("application"); + expect(unit.renderingContext).to.have.property("subworkflowContext"); + expect(unit.renderingContext).to.have.property("workflow"); + expect(unit.context).to.be.deep.equal([]); + }); + }); + }); + }); + }); + + describe("calculateHash", () => { + it("returns a non-empty string", () => { + const config = { ...Workflow.defaultConfig }; + const workflow = new Workflow(config); + + const hash = workflow.calculateHash(); + + expect(hash).to.be.a("string"); + expect(hash.length).to.be.above(0); + }); + + it("returns the same hash for the same workflow", () => { + const w1 = new Workflow({ ...Workflow.defaultConfig }); + const w2 = new Workflow({ ...Workflow.defaultConfig }); + + expect(w1.calculateHash()).to.equal(w2.calculateHash()); + }); + + it("returns different hash when workflow content differs", () => { + const w1 = new Workflow({ ...Workflow.defaultConfig }); + const w2 = new Workflow({ ...Workflow.defaultConfig }); + w2.addUnitType(UnitType.subworkflow); + + expect(w1.calculateHash()).to.not.equal(w2.calculateHash()); + }); + }); +}); diff --git a/tests/js/context.test.js b/tests/js/context.test.js deleted file mode 100644 index d27c1138..00000000 --- a/tests/js/context.test.js +++ /dev/null @@ -1,69 +0,0 @@ -/* eslint-disable max-classes-per-file */ -import { ContextProvider } from "@mat3ra/ade"; -import { expect } from "chai"; - -import { applicationContextMixin } from "../../src/js/context/mixins/ApplicationContextMixin"; -import { materialContextMixin } from "../../src/js/context/mixins/MaterialContextMixin"; -import { globalSettings } from "../../src/js/context/providers/settings"; - -class MockMaterial { - static createDefault() { - return "defaultMockMaterial"; - } -} - -class SpecificMockMaterial { - static createDefault() { - return "defaultSpecificMockMaterial"; - } -} - -class MockApplication { - static createDefault() { - return "defaultMockApplication"; - } -} - -class SpecificMockApplication { - static createDefault() { - return "defaultSpecificMockApplication"; - } -} - -class ProviderEntity extends ContextProvider { - constructor(config) { - super(config); - this.initApplicationContextMixin(); - this.initMaterialContextMixin(); - } -} - -applicationContextMixin(ProviderEntity.prototype); -materialContextMixin(ProviderEntity.prototype); - -class DerivedProviderEntity extends ProviderEntity {} - -describe("Material & Application ContextMixin", () => { - const config = { name: "test" }; - - after(() => { - globalSettings.resetDefaults(); - }); - - it("uses static entity class", () => { - globalSettings.setMaterial(MockMaterial); - globalSettings.setApplication(MockApplication); - - const provider = new ProviderEntity(config); - expect(provider.material).to.be.equal("defaultMockMaterial"); - expect(provider.application).to.be.equal("defaultMockApplication"); - }); - - it("uses static entity class from derived class", () => { - globalSettings.setMaterial(SpecificMockMaterial); - globalSettings.setApplication(SpecificMockApplication); - const provider = new DerivedProviderEntity(config); - expect(provider.material).to.be.equal("defaultSpecificMockMaterial"); - expect(provider.application).to.be.equal("defaultSpecificMockApplication"); - }); -}); diff --git a/tests/js/espresso.test.js b/tests/js/espresso.test.js deleted file mode 100644 index 938f112a..00000000 --- a/tests/js/espresso.test.js +++ /dev/null @@ -1,21 +0,0 @@ -import { Constraint } from "@mat3ra/made/dist/js/constraints/constraints"; -import { Material } from "@mat3ra/made/dist/js/material"; -import { expect } from "chai"; - -import QEPWXContextProvider from "../../src/js/context/providers/by_application/espresso/QEPWXContextProvider"; - -describe("QEPWXContextProvider.atomicPositionsWithConstraints", () => { - const expectedOutput = `Si 0.000000000 0.000000000 0.000000000 1 0 1 -Si 0.250000000 0.250000000 0.250000000 0 0 0`; - - it("returns each atom on its own line when input is array", () => { - const material = Material.createDefault(); - const constraints = [ - new Constraint({ id: 0, value: [true, false, true] }), - new Constraint({ id: 1, value: [false, false, false] }), - ]; - material.setBasisConstraints(constraints); - const result = QEPWXContextProvider.atomicPositionsWithConstraints(material); - expect(result).to.equal(expectedOutput); - }); -}); diff --git a/tests/js/subworkflow.test.js b/tests/js/subworkflow.test.js deleted file mode 100644 index 5cd0313d..00000000 --- a/tests/js/subworkflow.test.js +++ /dev/null @@ -1,128 +0,0 @@ -import { ApplicationRegistry } from "@mat3ra/ade"; -import { workflowSubworkflowMapByApplication } from "@mat3ra/standata"; -import { expect } from "chai"; - -import { createSubworkflowByName, Subworkflow } from "../../src/js/subworkflows"; -import { AssignmentUnit, ConditionUnit } from "../../src/js/units"; - -const assignmentUnitData = { - type: "assignment", - application: { name: "espresso", version: "6.3" }, -}; - -const conditionUnitData = { - type: "condition", - application: { name: "espresso", version: "6.3" }, -}; - -describe("subworkflows", () => { - let subworkflow; - - beforeEach(() => { - subworkflow = createSubworkflowByName({ - appName: "espresso", - swfName: "total_energy", - workflowSubworkflowMapByApplication, - }); - }); - - it("have updateContext function", () => { - expect(typeof subworkflow.updateContext).to.be.equal("function"); - }); - it("can update context", () => { - const newContext = { testKey: "testValue" }; - subworkflow.updateContext(newContext); - expect(subworkflow.context).to.include(newContext); - }); - it("add unit to list end", () => { - expect(subworkflow.units.length).to.be.equal(1); - expect(subworkflow.units[0]._json.type).to.be.equal("execution"); - - const assignementUnit = new AssignmentUnit(assignmentUnitData); - subworkflow.addUnit(assignementUnit, -1); - - expect(subworkflow.units.length).to.be.equal(2); - expect(subworkflow.units[0]._json.type).to.be.equal("execution"); - expect(subworkflow.units[1]._json.type).to.be.equal("assignment"); - }); - it("add unit to list head", () => { - expect(subworkflow.units.length).to.be.equal(1); - expect(subworkflow.units[0]._json.type).to.be.equal("execution"); - - const assignementUnit = new AssignmentUnit(assignmentUnitData); - subworkflow.addUnit(assignementUnit, 0); - - expect(subworkflow.units.length).to.be.equal(2); - expect(subworkflow.units[0]._json.type).to.be.equal("assignment"); - expect(subworkflow.units[1]._json.type).to.be.equal("execution"); - }); - it("add unit in the middle list of two", () => { - expect(subworkflow.units.length).to.be.equal(1); - expect(subworkflow.units[0]._json.type).to.be.equal("execution"); - - const assignementUnit = new AssignmentUnit(assignmentUnitData); - const conditionUnit = new ConditionUnit(conditionUnitData); - subworkflow.addUnit(assignementUnit, -1); - - expect(subworkflow.units.length).to.be.equal(2); - expect(subworkflow.units[0]._json.type).to.be.equal("execution"); - expect(subworkflow.units[1]._json.type).to.be.equal("assignment"); - - subworkflow.addUnit(conditionUnit, 1); - - expect(subworkflow.units.length).to.be.equal(3); - expect(subworkflow.units[0]._json.type).to.be.equal("execution"); - expect(subworkflow.units[1]._json.type).to.be.equal("condition"); - expect(subworkflow.units[2]._json.type).to.be.equal("assignment"); - }); - it("can update application", () => { - const assignementUnit = new AssignmentUnit(assignmentUnitData); - subworkflow.addUnit(assignementUnit, -1); - - expect(subworkflow.units.length).to.be.equal(2); - expect(subworkflow.units[0]._json.type).to.be.equal("execution"); - expect(subworkflow.units[1]._json.type).to.be.equal("assignment"); - expect(subworkflow.units[0].application.version).to.be.equal("6.3"); - expect(subworkflow.units[1].application?.version).to.be.equal(undefined); - - const newApplication = ApplicationRegistry.createApplication({ - name: "espresso", - version: "6.7.0", - }); - - expect(newApplication.version).to.be.equal("6.7.0"); - - subworkflow.setApplication(newApplication); - - expect(subworkflow.application.version).to.be.equal("6.7.0"); - expect(subworkflow.units[0].application?.version).to.be.equal("6.7.0"); - expect(subworkflow.units[1].application?.version).to.be.equal(undefined); - }); -}); - -describe("subworkflow UUIDs", () => { - afterEach(() => { - Subworkflow.usePredefinedIds = false; - }); - - it("subworkflow UUIDs are kept if predefined", () => { - Subworkflow.usePredefinedIds = true; - - const subworkflow1 = createSubworkflowByName({ - appName: "espresso", - swfName: "total_energy", - workflowSubworkflowMapByApplication, - subworkflowCls: Subworkflow, - }); - - const subworkflow2 = createSubworkflowByName({ - appName: "espresso", - swfName: "total_energy", - workflowSubworkflowMapByApplication, - subworkflowCls: Subworkflow, - }); - - expect(subworkflow1._id).to.not.be.equal(""); - expect(subworkflow1._id).to.equal(subworkflow2._id); - }); -}); diff --git a/tests/js/unit.test.js b/tests/js/unit.test.js deleted file mode 100644 index 5b06d16d..00000000 --- a/tests/js/unit.test.js +++ /dev/null @@ -1,120 +0,0 @@ -import { Application } from "@mat3ra/ade"; -import { workflowSubworkflowMapByApplication } from "@mat3ra/standata"; -import { expect } from "chai"; - -import { createUnit } from "../../src/js/subworkflows/create"; -import { AssignmentUnit, BaseUnit, ExecutionUnit } from "../../src/js/units"; -import { builders } from "../../src/js/units/builders"; -import { UnitFactory } from "../../src/js/units/factory"; -import { createWorkflows } from "../../src/js/workflows"; - -describe("units", () => { - it("can be cloned with new flowchartId", () => { - const workflows = createWorkflows({ workflowSubworkflowMapByApplication }); - const exampleWorkflow = workflows[0]; - const exampleSubworkflow = exampleWorkflow.subworkflows[0]; - const exampleUnit = exampleSubworkflow.units[0]; - const exampleUnitClone = exampleUnit.clone(); - // eslint-disable-next-line no-unused-expressions - expect(exampleUnitClone).to.exist; - expect(exampleUnit.flowchartId).to.not.equal(exampleUnitClone.flowchartId); - }); - - it("can create execution unit", () => { - const unit = createUnit({ - config: { - type: "executionBuilder", - config: { - name: "test", - execName: "pw.x", - flavorName: "pw_scf", - flowchartId: "test", - }, - }, - application: new Application({ name: "espresso" }), - unitBuilders: builders, - unitFactoryCls: UnitFactory, - }); - - const expectedResults = [ - { name: "atomic_forces" }, - { name: "fermi_energy" }, - { name: "pressure" }, - { name: "stress_tensor" }, - { name: "total_energy" }, - { name: "total_energy_contributions" }, - { name: "total_force" }, - ]; - - expect(unit.flavor.results).to.deep.equal(expectedResults); - expect(unit.results).to.deep.equal(expectedResults); - }); -}); - -describe("unit UUIDs", () => { - afterEach(() => { - // Reset all usePredefinedIds after each test - BaseUnit.usePredefinedIds = false; - ExecutionUnit.usePredefinedIds = false; - AssignmentUnit.usePredefinedIds = false; - builders.UnitConfigBuilder.usePredefinedIds = false; - }); - - it("unit flowchartIds are kept if predefined", () => { - BaseUnit.usePredefinedIds = true; - ExecutionUnit.usePredefinedIds = true; - AssignmentUnit.usePredefinedIds = true; - - const createTestUnit = (type, name) => - UnitFactory.create({ - type, - name, - application: { name: "espresso" }, - }); - - // Test ExecutionUnit flowchartId - const execUnit1 = createTestUnit("execution", "test-execution"); - const execUnit2 = createTestUnit("execution", "test-execution"); - expect(execUnit1.flowchartId).to.equal(execUnit2.flowchartId); - - // Test AssignmentUnit flowchartId - const assignUnit1 = createTestUnit("assignment", "test-assignment"); - const assignUnit2 = createTestUnit("assignment", "test-assignment"); - expect(assignUnit1.flowchartId).to.equal(assignUnit2.flowchartId); - - // Different unit types should have different flowchartIds - expect(execUnit1.flowchartId).to.not.equal(assignUnit1.flowchartId); - }); - - it("unit flowchartIds are different when usePredefinedIds is false", () => { - const execUnit1 = UnitFactory.create({ - type: "execution", - name: "test-execution", - application: { name: "espresso" }, - }); - - const execUnit2 = UnitFactory.create({ - type: "execution", - name: "test-execution", - application: { name: "espresso" }, - }); - - expect(execUnit1.flowchartId).to.not.equal(execUnit2.flowchartId); - }); - - it("unit builders generate deterministic flowchartIds when usePredefinedIds is true", () => { - builders.UnitConfigBuilder.usePredefinedIds = true; - - const builder1 = new builders.UnitConfigBuilder({ - name: "test-builder", - type: "execution", - }); - - const builder2 = new builders.UnitConfigBuilder({ - name: "test-builder", - type: "execution", - }); - - expect(builder1._flowchartId).to.equal(builder2._flowchartId); - }); -}); diff --git a/tests/js/workflow.test.js b/tests/js/workflow.test.js deleted file mode 100644 index 981dbe9e..00000000 --- a/tests/js/workflow.test.js +++ /dev/null @@ -1,240 +0,0 @@ -import { WorkflowStandata, workflowSubworkflowMapByApplication } from "@mat3ra/standata"; -import { expect } from "chai"; - -import { builders, createWorkflows, Subworkflow, UnitFactory, Workflow } from "../../src/js"; -import { createWorkflow } from "../../src/js/workflows/create"; - -// Expected predefined IDs constants - update these after running test to see actual values -const EXPECTED_WORKFLOW_ID = "cd826954-8c96-59f7-b2de-f36ce2d86105"; -const EXPECTED_SUBWORKFLOW_ID = "233bb8cf-3b4a-5378-84d9-a6a95a2ab43d"; -const EXPECTED_UNIT_ID = "9fc7a088-5533-5f70-bb33-f676ec65f565"; - -describe("workflows", () => { - it("can all be created", () => { - const workflows = createWorkflows({ workflowSubworkflowMapByApplication }); - workflows.map((wf) => { - // eslint-disable-next-line no-unused-expressions - expect(wf).to.exist; - // eslint-disable-next-line no-unused-expressions - expect(wf.isValid()).to.be.true; - - const wfCopy = new Workflow(wf.toJSON()); - - // eslint-disable-next-line no-unused-expressions - expect(wfCopy.isValid()).to.be.true; - - // expect(wf.validate()).to.be.true; - return null; - }); - }); - - it("can generate workflow configs with predefined IDs", () => { - // Set up predefined IDs for all classes - const WorkflowCls = Workflow; - WorkflowCls.usePredefinedIds = true; - - const SubworkflowCls = Subworkflow; - SubworkflowCls.usePredefinedIds = true; - - builders.UnitConfigBuilder.usePredefinedIds = true; - builders.AssignmentUnitConfigBuilder.usePredefinedIds = true; - builders.AssertionUnitConfigBuilder.usePredefinedIds = true; - builders.ExecutionUnitConfigBuilder.usePredefinedIds = true; - builders.IOUnitConfigBuilder.usePredefinedIds = true; - - UnitFactory.BaseUnit.usePredefinedIds = true; - UnitFactory.AssignmentUnit.usePredefinedIds = true; - UnitFactory.AssertionUnit.usePredefinedIds = true; - UnitFactory.ExecutionUnit.usePredefinedIds = true; - UnitFactory.IOUnit.usePredefinedIds = true; - UnitFactory.SubworkflowUnit.usePredefinedIds = true; - UnitFactory.ConditionUnit.usePredefinedIds = true; - UnitFactory.MapUnit.usePredefinedIds = true; - UnitFactory.ProcessingUnit.usePredefinedIds = true; - - try { - // Test using a minimal workflow configuration - const workflow = createWorkflows({ - appName: "espresso", - workflowSubworkflowMapByApplication, - workflowCls: WorkflowCls, - SubworkflowCls, - UnitFactory, - UnitConfigBuilder: { - ...builders, - Workflow: WorkflowCls, - }, - })[0]; - - // eslint-disable-next-line no-unused-expressions - expect(workflow).to.exist; - expect(workflow).to.have.property("_id"); - - expect(workflow._id).to.equal(EXPECTED_WORKFLOW_ID); - - expect(workflow).to.have.property("subworkflows"); - expect(workflow.subworkflows[0]).to.have.property("_id"); - expect(workflow.subworkflows[0]._id).to.equal(EXPECTED_SUBWORKFLOW_ID); - - expect(workflow.subworkflows[0]).to.have.property("units"); - expect(workflow.subworkflows[0].units[0]).to.have.property("flowchartId"); - expect(workflow.subworkflows[0].units[0].flowchartId).to.equal(EXPECTED_UNIT_ID); - } finally { - // Clean up - reset usePredefinedIds to false - WorkflowCls.usePredefinedIds = false; - SubworkflowCls.usePredefinedIds = false; - - builders.UnitConfigBuilder.usePredefinedIds = false; - builders.AssignmentUnitConfigBuilder.usePredefinedIds = false; - builders.AssertionUnitConfigBuilder.usePredefinedIds = false; - builders.ExecutionUnitConfigBuilder.usePredefinedIds = false; - builders.IOUnitConfigBuilder.usePredefinedIds = false; - - UnitFactory.BaseUnit.usePredefinedIds = false; - UnitFactory.AssignmentUnit.usePredefinedIds = false; - UnitFactory.AssertionUnit.usePredefinedIds = false; - UnitFactory.ExecutionUnit.usePredefinedIds = false; - UnitFactory.IOUnit.usePredefinedIds = false; - UnitFactory.SubworkflowUnit.usePredefinedIds = false; - UnitFactory.ConditionUnit.usePredefinedIds = false; - UnitFactory.MapUnit.usePredefinedIds = false; - UnitFactory.ProcessingUnit.usePredefinedIds = false; - } - }); - - it("generates non-colliding predefined IDs", () => { - Workflow.usePredefinedIds = true; - const workflow1 = createWorkflow({ - appName: "espresso", - workflowData: workflowSubworkflowMapByApplication.workflows.espresso.total_energy, - workflowSubworkflowMapByApplication, - workflowCls: Workflow, - }); - const workflow2 = createWorkflow({ - appName: "vasp", - workflowData: workflowSubworkflowMapByApplication.workflows.vasp.total_energy, - workflowSubworkflowMapByApplication, - workflowCls: Workflow, - }); - expect(workflow1._id).to.not.equal(workflow2._id); - }); -}); - -describe("workflow property", () => { - it("isMultiMaterial is read correctly", () => { - // Nudged Elastic Band is multi-material - const mmWorkflow = createWorkflow({ - appName: "espresso", - workflowData: workflowSubworkflowMapByApplication.workflows.espresso.neb, - workflowSubworkflowMapByApplication, - }); - // eslint-disable-next-line no-unused-expressions - expect(mmWorkflow.isMultiMaterial).to.be.true; - }); - - it("properties are not empty", () => { - const workflow = createWorkflow({ - appName: "espresso", - workflowData: workflowSubworkflowMapByApplication.workflows.espresso.total_energy, - workflowSubworkflowMapByApplication, - }); - - // eslint-disable-next-line no-unused-expressions - expect(workflow.properties).to.be.an("array").that.is.not.empty; - }); -}); - -describe("relaxation logic", () => { - let espressoWorkflow; - beforeEach(() => { - const espressoWorkflowConfig = new WorkflowStandata().findEntitiesByTags( - "espresso", - "total_energy", - )[0]; - espressoWorkflow = new Workflow(espressoWorkflowConfig); - }); - - it("relaxationSubworkflow returns correct subworkflow for application", () => { - const espressoRelaxation = espressoWorkflow.relaxationSubworkflow; - - // eslint-disable-next-line no-unused-expressions - expect(espressoRelaxation).to.exist; - - expect(espressoRelaxation.systemName).to.equal("espresso-variable-cell-relaxation"); - }); - - it("toggles relaxation correctly", () => { - expect(espressoWorkflow.hasRelaxation).to.be.false; - espressoWorkflow.toggleRelaxation(); - expect(espressoWorkflow.hasRelaxation).to.be.true; - expect(espressoWorkflow.relaxationSubworkflow).to.exist; - expect(espressoWorkflow.relaxationSubworkflow.systemName).to.equal( - "espresso-variable-cell-relaxation", - ); - - espressoWorkflow.toggleRelaxation(); - expect(espressoWorkflow.hasRelaxation).to.be.false; - // relaxationSubworkflow getter always returns a relaxation subworkflow for the application - expect(espressoWorkflow.relaxationSubworkflow).to.exist; - }); -}); - -describe("Workflow UUIDs", () => { - afterEach(() => { - Workflow.usePredefinedIds = false; - }); - - it("workflow UUIDs are kept if predefined", () => { - Workflow.usePredefinedIds = true; - - const createTestWorkflow = () => - createWorkflow({ - appName: "espresso", - workflowData: workflowSubworkflowMapByApplication.workflows.espresso.total_energy, - workflowSubworkflowMapByApplication, - workflowCls: Workflow, - }); - - const workflow1 = createTestWorkflow(); - const workflow2 = createTestWorkflow(); - expect(workflow1._id).to.not.be.equal(""); - expect(workflow1._id).to.equal(workflow2._id); - }); - - it("generates unique flowchartIds for repeated subworkflows and their units", () => { - const workflowData = { - name: "test_repeated_subworkflows", - units: [ - { name: "pw_scf", type: "subworkflow" }, - { name: "pw_scf", type: "subworkflow" }, - { name: "pw_scf", type: "subworkflow" }, - ], - }; - - const workflow = createWorkflow({ - appName: "espresso", - workflowData, - workflowSubworkflowMapByApplication, - }); - - expect(workflow.units).to.have.length(3); - const unitFlowchartIds = workflow.units.map((unit) => unit.flowchartId); - expect(unitFlowchartIds[0]).to.not.equal(unitFlowchartIds[1]); - expect(unitFlowchartIds[1]).to.not.equal(unitFlowchartIds[2]); - - expect(workflow.subworkflows).to.have.length(3); - const subworkflowIds = workflow.subworkflows.map((sw) => sw._id); - expect(subworkflowIds[0]).to.not.equal(subworkflowIds[1]); - expect(subworkflowIds[1]).to.not.equal(subworkflowIds[2]); - - workflow.subworkflows[0].units.forEach((unit, unitIndex) => { - const unit1 = workflow.subworkflows[1].units[unitIndex]; - const unit2 = workflow.subworkflows[2].units[unitIndex]; - if (unit1 && unit2) { - expect(unit.flowchartId).to.not.equal(unit1.flowchartId); - expect(unit.flowchartId).to.not.equal(unit2.flowchartId); - expect(unit1.flowchartId).to.not.equal(unit2.flowchartId); - } - }); - }); -}); diff --git a/tsconfig-transpile.json b/tsconfig-transpile.json new file mode 100644 index 00000000..3f6f7c8c --- /dev/null +++ b/tsconfig-transpile.json @@ -0,0 +1,7 @@ +{ + "extends": "@mat3ra/tsconfig/tsconfig-js-py-transpile.json", + "include": [ + "src/js", + "types" + ] +} diff --git a/tsconfig.json b/tsconfig.json index fc97d3ef..45cd41bc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "@mat3ra/tsconfig/tsconfig-js-py-transpile.json", + "extends": "@mat3ra/tsconfig/tsconfig-js-py-dev.json", "include": [ - "src/js/**/*", - "types/**/*" + "src/js", + "tests/js", + "types" ] }