UNPKG

@viamedici-spc/configurator-ts

Version:

TypeScript library to build configurator web applications based on the Viamedici Headless Configuration Engine (HCE).

1,478 lines 99.8 kB
import { pipe as a, RA as r, RM as p, Ord as O, identity as it, Str as d, Bool as I, Num as D, flow as z, I as W, MO as si, Eq as l, O as S, some as $, RR as ri, TE as w, T as Vt, E as g, RNEA as te, P as ai } from "@viamedici-spc/fp-ts-extensions"; import { match as y, P as J } from "ts-pattern"; import { fromPromise as ae, setup as ci, enqueueActions as L, log as lt, assign as ee, createActor as ui, waitFor as li } from "xstate"; import di from "spark-md5"; import { deepEqual as pi } from "fast-equals"; import _ from "memize"; import { guid as Wt } from "dyna-guid"; import { summonFor as ce } from "@morphic-ts/batteries/lib/summoner-ESBAST"; var m = /* @__PURE__ */ ((t) => (t.RequestTimeout = "RequestTimeout", t.RequestFailure = "RequestFailure", t.SerializationError = "SerializationError", t.MissingTenantIdClaim = "MissingTenantIdClaim", t.MissingSessionIdClaim = "MissingSessionIdClaim", t.TenantAccessForbidden = "TenantAccessForbidden", t.SessionIdInvalid = "SessionIdInvalid", t.AuthenticationFailure = "AuthenticationFailure", t.SideLoadingForbidden = "SideLoadingForbidden", t.UsageRuleRestriction = "UsageRuleRestriction", t.ConfigurationModelInvalid = "ConfigurationModelInvalid", t.SolutionNotFeasible = "SolutionNotFeasible", t.ConfigurationModelNotFound = "ConfigurationModelNotFound", t.SolverInitializationFailure = "SolverInitializationFailure", t.ConfigurationModelLoadFailure = "ConfigurationModelLoadFailure", t.ConfigurationInitializationFailure = "ConfigurationInitializationFailure", t.SolverPoolInitializationFailure = "SolverPoolInitializationFailure", t.SetDecisionConflict = "SetDecisionConflict", t.SolveOperationTimeout = "SolveOperationTimeout", t.ExplainConflict = "ExplainConflict", t.ExplainFailure = "ExplainFailure", t.SnapshotInvalid = "SnapshotInvalid", t.SnapshotNotFound = "SnapshotNotFound", t.ConfigurationModelNotFeasible = "ConfigurationModelNotFeasible", t.MakeManyDecisionsConflict = "MakeManyDecisionsConflict", t.SpecifiedDeploymentForbidden = "SpecifiedDeploymentForbidden", t.AttributeNotFound = "AttributeNotFound", t.ChoiceAttributeNotFound = "ChoiceAttributeNotFound", t.ComponentAttributeNotFound = "ComponentAttributeNotFound", t.NumericAttributeNotFound = "NumericAttributeNotFound", t.BooleanAttributeNotFound = "BooleanAttributeNotFound", t.ChoiceValueNotFound = "ChoiceValueNotFound", t.NumericDecisionOutOfRange = "NumericDecisionOutOfRange", t.ConflictWithConsequence = "ConflictWithConsequence", t.DecisionsToRespectInvalid = "DecisionsToRespectInvalid", t.SessionNotFound = "SessionNotFound", t.ServerError = "ServerError", t.ConnectionError = "ConnectionError", t.TaskCancelled = "TaskCancelled", t.SessionClosed = "SessionClosed", t.StoredConfigurationInvalid = "StoredConfigurationInvalid", t))(m || {}), R = /* @__PURE__ */ ((t) => (t.whyIsNotSatisfied = "why-is-not-satisfied", t.whyIsStateNotPossible = "why-is-state-not-possible", t))(R || {}), v = /* @__PURE__ */ ((t) => (t.choiceValue = "choice-value", t.component = "component", t.boolean = "boolean", t.numeric = "numeric", t.configuration = "configuration", t.attribute = "attribute", t))(v || {}), Q = /* @__PURE__ */ ((t) => (t.all = "all", t.none = "none", t.specific = "specific", t))(Q || {}), nt = /* @__PURE__ */ ((t) => (t.Channel = "Channel", t.Package = "Package", t))(nt || {}), c = /* @__PURE__ */ ((t) => (t.Boolean = "Boolean", t.Numeric = "Numeric", t.Choice = "Choice", t.Component = "Component", t))(c || {}), M = /* @__PURE__ */ ((t) => (t.Included = "Included", t.Excluded = "Excluded", t))(M || {}), B = /* @__PURE__ */ ((t) => (t.Included = "Included", t.Excluded = "Excluded", t))(B || {}), N = /* @__PURE__ */ ((t) => (t.Implicit = "Implicit", t.Explicit = "Explicit", t))(N || {}), tt = /* @__PURE__ */ ((t) => (t.Mandatory = "Mandatory", t.Optional = "Optional", t))(tt || {}), ft = /* @__PURE__ */ ((t) => (t.Always = "Always", t.Optional = "Optional", t))(ft || {}); const As = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), jt = (t) => t.type === c.Boolean, Ut = (t) => t.type === c.Choice, Tt = (t) => t.type === c.Numeric, Lt = (t) => t.type === c.Component, vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, booleanAttributeRefinement: jt, choiceAttributeRefinement: Ut, componentAttributeRefinement: Lt, numericAttributeRefinement: Tt }, Symbol.toStringTag, { value: "Module" })); function _t(t) { return t; } function hi(t) { return function() { return t; }; } function fi(t, e, i, n, o, s, u, h, f) { switch (arguments.length) { case 1: return t; case 2: return function() { return e(t.apply(this, arguments)); }; case 3: return function() { return i(e(t.apply(this, arguments))); }; case 4: return function() { return n(i(e(t.apply(this, arguments)))); }; case 5: return function() { return o(n(i(e(t.apply(this, arguments))))); }; case 6: return function() { return s(o(n(i(e(t.apply(this, arguments)))))); }; case 7: return function() { return u(s(o(n(i(e(t.apply(this, arguments))))))); }; case 8: return function() { return h(u(s(o(n(i(e(t.apply(this, arguments)))))))); }; case 9: return function() { return f(h(u(s(o(n(i(e(t.apply(this, arguments))))))))); }; } } var mi = { _tag: "None" }, yi = Object.prototype.hasOwnProperty, gi = function() { return function(t) { return !0; }; }; function X(t) { const i = [ ...t.sharedConfigurationModelId ? ["shared", t.sharedConfigurationModelId] : ["root"], ...t.componentPath ?? [], t.localId ]; return a( i, r.map((n) => n.replace("::", "|::|")), (n) => n.join("::") ); } function bi(t, e, i) { return a( t, p.toReadonlyArray(O.trivial), r.map(([n, o]) => o), r.filter((n) => { if (n.id.sharedConfigurationModelId != e.sharedConfigurationModelId) return !1; const o = [...e.componentPath ?? [], e.localId], s = a( n.id.componentPath ?? [], i ? r.takeLeft(o.length) : it ); return r.getEq(d.Eq).equals(o, s); }) ); } function wi(t, e, i) { return a( t, p.toReadonlyArray(O.trivial), r.map(([n, o]) => o), r.filter((n) => n.id.sharedConfigurationModelId == e && (i || r.isEmpty(n.id.componentPath ?? []))) ); } function Ci(t) { return a( t, p.toReadonlyArray(O.trivial), r.map(([e, i]) => i), r.filter((e) => e.id.sharedConfigurationModelId == null && r.isEmpty(e.id.componentPath ?? [])) ); } function Ct(t) { return (e) => a( e.attributes, p.filter(t), p.toReadonlyArray(O.trivial), r.map(([i, n]) => n) ); } function Ii(t) { return Ct(Ut)(t); } function Si(t) { return Ct(Lt)(t); } function Ei(t) { return Ct(Tt)(t); } function qi(t) { return Ct(jt)(t); } function st(t, e, i) { const n = typeof e == "string" ? e : X(e), o = t.attributes.get(n); return o && (i ?? gi)(o) ? o : void 0; } function ue(t, e) { return st(t, e, Ut); } function Di(t, e, i) { const n = ue(t, e); return ((n == null ? void 0 : n.values) ?? p.empty).get(i); } function Ai(t, e) { return st(t, e, Tt); } function vi(t, e) { return st(t, e, jt); } function xi(t, e) { return st(t, e, Lt); } const xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, getAttribute: st, getAttributesOfComponentAttribute: bi, getAttributesOfRootConfigurationModel: Ci, getAttributesOfSharedConfigurationModel: wi, getBooleanAttribute: vi, getBooleanAttributes: qi, getChoiceAttribute: ue, getChoiceAttributes: Ii, getChoiceValue: Di, getComponentAttribute: xi, getComponentAttributes: Si, getNumericAttribute: Ai, getNumericAttributes: Ei }, Symbol.toStringTag, { value: "Module" })); function Ht(t) { return t.possibleDecisionStates.includes(M.Included); } function le(t) { return !Ht(t); } const Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, isAllowed: Ht, isBlocked: le }, Symbol.toStringTag, { value: "Module" })); function Ni(t) { return y(t).with({ type: c.Choice }, (e) => e.cardinality.lowerBound > 0).with({ type: c.Boolean }, (e) => e.selection === tt.Mandatory).with({ type: c.Numeric }, (e) => e.selection === tt.Mandatory).with({ type: c.Component }, (e) => e.inclusion === ft.Optional && e.selection === tt.Mandatory).exhaustive(); } function ki(t) { return t.cardinality.upperBound > 1; } function Mi(t) { return a( t.values, p.toReadonlyArray(O.trivial), r.map(([e, i]) => i), r.filter(Ht) ); } function Pi(t) { return a( t.values, p.toReadonlyArray(O.trivial), r.map(([e, i]) => i), r.filter(le) ); } function Ri(t) { return a( t.values, p.filter((e) => { var i; return ((i = e.decision) == null ? void 0 : i.state) === M.Included; }), p.toReadonlyArray(O.trivial), r.map(([e, i]) => i) ); } const ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, getAllowedChoiceValues: Mi, getBlockedChoiceValues: Pi, getIncludedChoiceValues: Ri, isChoiceAttributeMultiSelect: ki, isMandatory: Ni }, Symbol.toStringTag, { value: "Module" })), de = { whyIsNotSatisfied: { configuration: { question: R.whyIsNotSatisfied, subject: v.configuration }, attribute: (t) => ({ question: R.whyIsNotSatisfied, subject: v.attribute, attributeId: t }) }, whyIsStateNotPossible: { choice: (t) => ({ choiceValue: (e) => ({ state: (i) => ({ question: R.whyIsStateNotPossible, subject: v.choiceValue, attributeId: t, choiceValueId: e, state: i }) }) }), boolean: (t) => ({ state: (e) => ({ question: R.whyIsStateNotPossible, subject: v.boolean, attributeId: t, state: e }) }), numeric: (t) => ({ state: (e) => ({ question: R.whyIsStateNotPossible, subject: v.numeric, attributeId: t, state: e }) }), component: (t) => ({ state: (e) => ({ question: R.whyIsStateNotPossible, subject: v.component, attributeId: t, state: e }) }) } }, Ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, explainQuestionBuilder: de }, Symbol.toStringTag, { value: "Module" })), Bi = (t) => t.attributeType === c.Boolean, Fi = (t) => t.attributeType === c.Numeric, Oi = (t) => t.attributeType === c.Component, Vi = (t) => t.attributeType === c.Choice, pe = (t) => t.kind === N.Explicit, he = (t) => t.kind === N.Implicit, Ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, collectedBooleanDecisionRefinement: Bi, collectedChoiceDecisionRefinement: Vi, collectedComponentDecisionRefinement: Oi, collectedExplicitDecisionRefinement: pe, collectedImplicitDecisionRefinement: he, collectedNumericDecisionRefinement: Fi }, Symbol.toStringTag, { value: "Module" })); var H = /* @__PURE__ */ ((t) => (t.Included = "Included", t.Excluded = "Excluded", t))(H || {}), Rt = /* @__PURE__ */ ((t) => (t.Mandatory = "Mandatory", t.Optional = "Optional", t))(Rt || {}), Bt = /* @__PURE__ */ ((t) => (t.Always = "Always", t.Optional = "Optional", t))(Bt || {}), Ft = /* @__PURE__ */ ((t) => (t.Implicit = "Implicit", t.Explicit = "Explicit", t))(Ft || {}), k = /* @__PURE__ */ ((t) => (t.Included = "Included", t.Excluded = "Excluded", t.Undefined = "Undefined", t))(k || {}); class Wi { constructor(e = {}) { this.baseUrl = "https://spc.cloud.ceventis.de/hca/api/engine", this.securityData = null, this.abortControllers = /* @__PURE__ */ new Map(), this.customFetch = (...i) => fetch(...i), this.baseApiParams = { credentials: "same-origin", headers: {}, redirect: "follow", referrerPolicy: "no-referrer" }, this.setSecurityData = (i) => { this.securityData = i; }, this.contentFormatters = { "application/json": (i) => i !== null && (typeof i == "object" || typeof i == "string") ? JSON.stringify(i) : i, "text/plain": (i) => i !== null && typeof i != "string" ? JSON.stringify(i) : i, "multipart/form-data": (i) => Object.keys(i || {}).reduce((n, o) => { const s = i[o]; return n.append( o, s instanceof Blob ? s : typeof s == "object" && s !== null ? JSON.stringify(s) : `${s}` ), n; }, new FormData()), "application/x-www-form-urlencoded": (i) => this.toQueryString(i) }, this.createAbortSignal = (i) => { if (this.abortControllers.has(i)) { const o = this.abortControllers.get(i); return o ? o.signal : void 0; } const n = new AbortController(); return this.abortControllers.set(i, n), n.signal; }, this.abortRequest = (i) => { const n = this.abortControllers.get(i); n && (n.abort(), this.abortControllers.delete(i)); }, this.request = async ({ body: i, secure: n, path: o, type: s, query: u, format: h, baseUrl: f, cancelToken: b, ...x }) => { const P = (typeof n == "boolean" ? n : this.baseApiParams.secure) && this.securityWorker && await this.securityWorker(this.securityData) || {}, ct = this.mergeRequestParams(x, P), Xt = u && this.toQueryString(u), oi = this.contentFormatters[ s || "application/json" /* Json */ ], Yt = h || ct.format; return this.customFetch(`${f || this.baseUrl || ""}${o}${Xt ? `?${Xt}` : ""}`, { ...ct, headers: { ...ct.headers || {}, ...s && s !== "multipart/form-data" ? { "Content-Type": s } : {} }, signal: (b ? this.createAbortSignal(b) : ct.signal) || null, body: typeof i > "u" || i === null ? null : oi(i) }).then(async (xt) => { const T = xt; T.data = null, T.error = null; const Zt = Yt ? await xt[Yt]().then((ut) => (T.ok ? T.data = ut : T.error = ut, T)).catch((ut) => (T.error = ut, T)) : T; if (b && this.abortControllers.delete(b), !xt.ok) throw Zt; return Zt; }); }, Object.assign(this, e); } encodeQueryParam(e, i) { return `${encodeURIComponent(e)}=${encodeURIComponent(typeof i == "number" ? i : `${i}`)}`; } addQueryParam(e, i) { return this.encodeQueryParam(i, e[i]); } addArrayQueryParam(e, i) { return e[i].map((o) => this.encodeQueryParam(i, o)).join("&"); } toQueryString(e) { const i = e || {}; return Object.keys(i).filter((o) => typeof i[o] < "u").map((o) => Array.isArray(i[o]) ? this.addArrayQueryParam(i, o) : this.addQueryParam(i, o)).join("&"); } addQueryParams(e) { const i = this.toQueryString(e); return i ? `?${i}` : ""; } mergeRequestParams(e, i) { return { ...this.baseApiParams, ...e, ...i || {}, headers: { ...this.baseApiParams.headers || {}, ...e.headers || {}, ...i && i.headers || {} } }; } } /** * @title Viamedici.Spc.Engine.ConfigurationEngine.RestApi.Service * @version v2 * @license © 2024 Viamedici - All rights reserved (https://viamedici.de) * @termsOfService None * @baseUrl https://spc.cloud.ceventis.de/hca/api/engine * @contact Viamedici Software GmbH <info@viamedici.de> (https://viamedici.de) */ class fe extends Wi { constructor() { super(...arguments), this.consequence = { /** * @description The route provides a list of Consequences which is the result of an evaluation weather of a Configuration Model or of made Decisions in conjunction with a Configuration Model, especially with the underlying set of Rules. The overall Configuration Model-Satisfaction State (see Glossary) is also given. A Consequence specifies for a certain Attribute in every case the Value Satisfaction State (true or false). In the case of "false", at least one Decision must still be made regarding an Attribute Value. For a Choice Attribute several Decisions may be still necessary. In addition to the Value Satisfaction State, further information is provided depending on the type of Attribute (see the scheme). * * @tags Consequence * @name ConsequenceGet * @summary The route provides the Consequences for all Attributes in the Configuration Session determined by evaluating the Configuration Model and the made Decisions (if any). * @request GET:/v2/session/configuration/consequence * @secure */ consequenceGet: (e = {}) => this.request({ path: "/v2/session/configuration/consequence", method: "GET", secure: !0, format: "json", ...e }) }, this.decision = { /** * @description The route transmits an Explicit Decision and returns the Consequences and the Affected Decisions. An Affected Decision is a Decision which is in a relation to the executed Explicit Decisions. The object "AffectedDecisions" contains also the Explicit Decisions transmitted by the request. When the API consumer is making a Decision for a Single Select Choice Attribute, the selection is updated to the new Decision. Any previous Choice Value Decision within the Choice Attribute will be replaced. * * @tags Decision * @name DecisionPutDecision * @summary The route transmits an Explicit Decision and returns the resulting consequences. * @request PUT:/v2/session/configuration/decision * @secure */ decisionPutDecision: (e, i = {}) => this.request({ path: "/v2/session/configuration/decision", method: "PUT", body: e, secure: !0, type: "application/json", format: "json", ...i }), /** * @description The route provides a list of Decisions which is the result of determinations by a consumer of the API, such as a Configurator, or by the Configuration Engine. A Decision regarding an Attribute consists of two information, the Decision State and the Decision Kind. ### Decision State In case of a Choice Attribute is specified for all Values whether they are included in finding a Solution by the Configuration Engine or not. In case of a Component Attribute is specified whether a referenced Component Configuration Model is included in finding a Solution by the Configuration Engine or not. Set Values of Numeric and Boolean Attributes are always automatically taken into account. ### Decision Kind It states weather a Decision has been made by a consumer of the API or by the Configuration Engine. * * @tags Decision * @name DecisionGetAllDecisions * @summary The route provides the Decisions for all Attributes in the Configuration Session determined by a consumer of the API or the Configuration Engine. * @request GET:/v2/session/configuration/decision * @secure */ decisionGetAllDecisions: (e = {}) => this.request({ path: "/v2/session/configuration/decision", method: "GET", secure: !0, format: "json", ...e }), /** * @description The route transmits an multiple Explicit Decision and returns the Consequences, the Affected Decisions and the Rejected Decisions. An Affected Decision is a Decision which is in a relation to the executed Explicit Decisions. The object "AffectedDecisions" contains also the Explicit Decisions transmitted by the request. A Rejected Decision is an Explicit Decision which contradicts the Configuration Model and has been therefore rejected by the Configuration Engine. There are several modes that control how Decisions are being applied. * * @tags Decision * @name DecisionPutMany * @summary The route transmits multiple Explicit Decisions and returns the resulting consequences. * @request PUT:/v2/session/configuration/decision/many * @secure */ decisionPutMany: (e, i = {}) => this.request({ path: "/v2/session/configuration/decision/many", method: "PUT", body: e, secure: !0, type: "application/json", format: "json", ...i }) }, this.explain = { /** * No description * * @tags Explain * @name ExplainWhyNotSatisfied * @request POST:/v2/session/configuration/consequence/explain/why-not-satisfied * @secure */ explainWhyNotSatisfied: (e, i = {}) => this.request({ path: "/v2/session/configuration/consequence/explain/why-not-satisfied", method: "POST", body: e, secure: !0, type: "application/json", format: "json", ...i }), /** * No description * * @tags Explain * @name ExplainWhyNotSatisfiedDecisions * @request POST:/v2/session/configuration/consequence/explain/why-not-satisfied/answer/decisions * @secure */ explainWhyNotSatisfiedDecisions: (e, i = {}) => this.request({ path: "/v2/session/configuration/consequence/explain/why-not-satisfied/answer/decisions", method: "POST", body: e, secure: !0, type: "application/json", format: "json", ...i }), /** * No description * * @tags Explain * @name ExplainWhyNotSatisfiedRules * @request POST:/v2/session/configuration/consequence/explain/why-not-satisfied/answer/constraints * @secure */ explainWhyNotSatisfiedRules: (e, i = {}) => this.request({ path: "/v2/session/configuration/consequence/explain/why-not-satisfied/answer/constraints", method: "POST", body: e, secure: !0, type: "application/json", format: "json", ...i }), /** * No description * * @tags Explain * @name ExplainWhyStateNotPossible * @request POST:/v2/session/configuration/consequence/explain/why-state-not-possible * @secure */ explainWhyStateNotPossible: (e, i = {}) => this.request({ path: "/v2/session/configuration/consequence/explain/why-state-not-possible", method: "POST", body: e, secure: !0, type: "application/json", format: "json", ...i }), /** * No description * * @tags Explain * @name ExplainWhyStateNotPossibleDecisions * @request POST:/v2/session/configuration/consequence/explain/why-state-not-possible/answer/decisions * @secure */ explainWhyStateNotPossibleDecisions: (e, i = {}) => this.request({ path: "/v2/session/configuration/consequence/explain/why-state-not-possible/answer/decisions", method: "POST", body: e, secure: !0, type: "application/json", format: "json", ...i }), /** * No description * * @tags Explain * @name ExplainWhyStateNotPossibleRules * @request POST:/v2/session/configuration/consequence/explain/why-state-not-possible/answer/constraints * @secure */ explainWhyStateNotPossibleRules: (e, i = {}) => this.request({ path: "/v2/session/configuration/consequence/explain/why-state-not-possible/answer/constraints", method: "POST", body: e, secure: !0, type: "application/json", format: "json", ...i }) }, this.meta = { /** * No description * * @tags Meta * @name MetaGetConfigurationModel * @request GET:/v2/session/configuration/meta/configuration-model * @secure */ metaGetConfigurationModel: (e = {}) => this.request({ path: "/v2/session/configuration/meta/configuration-model", method: "GET", secure: !0, format: "json", ...e }), /** * No description * * @tags Meta * @name MetaGet * @request GET:/v2/session/configuration/meta * @secure */ metaGet: (e = {}) => this.request({ path: "/v2/session/configuration/meta", method: "GET", secure: !0, format: "json", ...e }) }, this.session = { /** * @description This route creates a new Configuration Session. The Session-ID included in the response serves as authentication for all "/session/*" prefixed routes. Note: This route requires API-Credentials. * * @tags Session * @name SessionPost * @summary Creates a new Configuration Session. * @request POST:/v2/session * @secure */ sessionPost: (e, i = {}) => this.request({ path: "/v2/session", method: "POST", body: e, secure: !0, type: "application/json", format: "json", ...i }), /** * @description An existing Configuration Session is terminated. Note: All state associated with the session will be discarded. * * @tags Session * @name SessionDelete * @summary Terminates an existing Configuration Session. * @request DELETE:/v2/session/{sessionId} * @secure */ sessionDelete: (e, i = {}) => this.request({ path: `/v2/session/${e}`, method: "DELETE", secure: !0, ...i }), /** * @description An existing Configuration Session is terminated. Note: All state associated with the session will be discarded. This POST request has the same effect as the DELETE request. It must be used when the closing of a browser tab must be responded to. See also the specification under: https://developer.mozilla.org/en-US/docs/Web/API/Beacon_API. * * @tags Session * @name SessionClose * @summary Terminates an existing Configuration Session. * @request POST:/v2/session/close * @secure */ sessionClose: (e, i = {}) => this.request({ path: "/v2/session/close", method: "POST", body: e, secure: !0, type: "application/json", ...i }) }; } } const ji = "https://spc.cloud.ceventis.de/hca/api/engine", ie = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ new Map(); function rt(t) { const e = t ?? ji; let i = ie.get(e); return i || (i = new fe({ baseUrl: e }), ie.set(e, i)), i; } function Ui(t) { const e = (...n) => typeof n[0] == "string" ? fetch(t, n[1]) : fetch(...n); let i = ne.get(t); return i || (i = new fe({ customFetch: e }), ne.set(t, i)), i.session.sessionPost; } function F(t) { return { sharedConfigurationModelId: t.sharedConfigurationModelId, componentPath: t.componentPath != null ? r.toArray(t.componentPath) : void 0, localId: t.localId }; } function me(t) { return { type: "Choice", attributeId: F(t.attributeId), choiceValueId: t.choiceValueId, state: y(t.state).with(J.nullish, () => k.Undefined).with(M.Included, () => k.Included).with(M.Excluded, () => k.Excluded).exhaustive() }; } function ye(t) { return { type: "Component", attributeId: F(t.attributeId), state: y(t.state).with(J.nullish, () => k.Undefined).with(B.Included, () => k.Included).with(B.Excluded, () => k.Excluded).exhaustive() }; } function ge(t) { return { type: "Numeric", attributeId: F(t.attributeId), state: t.state }; } function be(t) { return { type: "Boolean", attributeId: F(t.attributeId), state: t.state }; } function Ti(t) { return y(t).with({ type: c.Choice }, me).with({ type: c.Component }, ye).with({ type: c.Boolean }, be).with({ type: c.Numeric }, ge).exhaustive(); } function Li(t) { const e = y(t.configurationModelSource).returnType().with({ type: nt.Channel }, (s) => ({ type: "Channel", deploymentName: s.deploymentName, channel: s.channel })).with({ type: nt.Package }, (s) => ({ type: "Package", configurationModelPackage: s.configurationModelPackage })).exhaustive(), i = () => { var u; const s = (u = t.allowedInExplain) != null && u.rules ? y(t.allowedInExplain.rules).returnType().with({ type: Q.all }, () => ({ type: "AllowedRulesAll" })).with({ type: Q.none }, () => ({ type: "AllowedRulesNone" })).with({ type: Q.specific }, (h) => ({ type: "AllowedRulesSpecific", rules: a( h.rules, r.map((f) => ({ configurationModelId: f.configurationModelId, localId: f.localId })), r.toArray ) })).exhaustive() : void 0; if (s) return { rules: s }; }, n = t.attributeRelations ? a( t.attributeRelations, r.map((s) => ({ attributeId: F(s.attributeId), decisions: a(s.decisions, r.map(F), r.toArray) })), r.toArray ) : void 0, o = t.usageRuleParameters ? t.usageRuleParameters : void 0; return { configurationModelSource: e, allowedInExplain: i(), attributeRelations: n, usageRuleParameters: o }; } function _i(t, e) { const i = (f, b) => a( t, r.filter(f), r.map(b), r.toArray ), n = i((f) => f.type === c.Boolean, be), o = i((f) => f.type === c.Numeric, ge), s = i((f) => f.type === c.Component, ye), u = i((f) => f.type === c.Choice, me), h = y(e).with({ type: "DropExistingDecisions" }, (f) => ({ type: "DropExistingDecisions", conflictResolution: y(f.conflictHandling).with({ type: "Automatic" }, () => ({ type: "Automatic" })).with({ type: "Manual" }, (b) => ({ type: "Manual", includeConstraintsInConflictExplanation: b.includeConstraintsInConflictExplanation })).exhaustive() })).with({ type: "KeepExistingDecisions" }, () => ({ type: "KeepExistingDecisions" })).exhaustive(); return { booleanDecisions: n, componentDecisions: s, numericDecisions: o, choiceDecisions: u, mode: h }; } function Hi(t) { return y(t).returnType().with({ subject: v.configuration }, () => ({ type: "Configuration" })).with({ subject: v.attribute }, (e) => ({ type: "Attribute", attributeId: F(e.attributeId) })).exhaustive(); } function zi(t) { return y(t).returnType().with({ subject: v.boolean }, (e) => ({ type: "Boolean", attributeId: F(e.attributeId), state: e.state })).with({ subject: v.numeric }, (e) => ({ type: "Numeric", attributeId: F(e.attributeId), state: e.state })).with({ subject: v.component }, (e) => ({ type: "Component", attributeId: F(e.attributeId), state: y(e.state).with(B.Included, () => H.Included).with(B.Excluded, () => H.Excluded).exhaustive() })).with({ subject: v.choiceValue }, (e) => ({ type: "ChoiceValue", attributeId: F(e.attributeId), choiceValueId: e.choiceValueId, state: y(e.state).with(M.Included, () => H.Included).with(M.Excluded, () => H.Excluded).exhaustive() })).exhaustive(); } const dt = { type: m.ServerError }; function $i(t) { return y(t).returnType().with({ type: "ConfigurationModelNotFeasible" }, Gi).with({ type: "SpecifiedDeploymentForbidden" }, Ki).with({ type: "AttributeNotFound" }, Qi).with({ type: "ChoiceAttributeNotFound" }, Ji).with({ type: "ComponentAttributeNotFound" }, Xi).with({ type: "NumericAttributeNotFound" }, Yi).with({ type: "BooleanAttributeNotFound" }, Zi).with({ type: "ChoiceValueNotFound" }, tn).with({ type: "NumericDecisionOutOfRange" }, en).with({ type: "ConflictWithConsequence" }, nn).with({ type: "DecisionsToRespectInvalid" }, on).with({ type: "SessionNotFound" }, sn).with({ type: "PutManyDecisionsConflict" }, () => dt).with({ type: "AssignedChannelNotFound" }, () => dt).with({ type: "InternalServerError" }, () => dt).with({ type: "RequestTimeout" }, (e) => E(e, m.RequestTimeout)).with({ type: "RequestFailure" }, (e) => E(e, m.RequestFailure)).with({ type: "SerializationError" }, (e) => E(e, m.SerializationError)).with({ type: "MissingTenantIdClaim" }, (e) => E(e, m.MissingTenantIdClaim)).with({ type: "MissingSessionIdClaim" }, (e) => E(e, m.MissingSessionIdClaim)).with({ type: "TenantAccessForbidden" }, (e) => E(e, m.TenantAccessForbidden)).with({ type: "SessionIdInvalid" }, (e) => E(e, m.SessionIdInvalid)).with({ type: "AuthenticationFailure" }, (e) => E(e, m.AuthenticationFailure)).with({ type: "SideLoadingForbidden" }, (e) => E(e, m.SideLoadingForbidden)).with({ type: "UsageRuleRestriction" }, (e) => E(e, m.UsageRuleRestriction)).with({ type: "ConfigurationModelInvalid" }, (e) => E(e, m.ConfigurationModelInvalid)).with({ type: "SolutionNotFeasible" }, (e) => E(e, m.SolutionNotFeasible)).with({ type: "ConfigurationModelNotFound" }, (e) => E(e, m.ConfigurationModelNotFound)).with({ type: "SolverInitializationFailure" }, (e) => E(e, m.SolverInitializationFailure)).with({ type: "ConfigurationModelLoadFailure" }, (e) => E(e, m.ConfigurationModelLoadFailure)).with({ type: "ConfigurationInitializationFailure" }, (e) => E(e, m.ConfigurationInitializationFailure)).with({ type: "SolverPoolInitializationFailure" }, (e) => E(e, m.SolverPoolInitializationFailure)).with({ type: "SetDecisionConflict" }, (e) => E(e, m.SetDecisionConflict)).with({ type: "SolveOperationTimeout" }, (e) => E(e, m.SolveOperationTimeout)).with({ type: "ExplainConflict" }, (e) => E(e, m.ExplainConflict)).with({ type: "ExplainFailure" }, (e) => E(e, m.ExplainFailure)).with({ type: "SnapshotInvalid" }, (e) => E(e, m.SnapshotInvalid)).with({ type: "SnapshotNotFound" }, (e) => E(e, m.SnapshotNotFound)).otherwise(() => dt); } function E(t, e) { return { ...t, type: e }; } function Gi(t) { return { ...t, type: m.ConfigurationModelNotFeasible, constraintExplanations: a(t.constraintExplanations ?? [], r.map(zt)) }; } function Ki(t) { return { ...t, type: m.SpecifiedDeploymentForbidden }; } function Qi(t) { return { ...t, type: m.AttributeNotFound, globalAttributeId: q(t.globalAttributeId) }; } function Ji(t) { return { ...t, type: m.ChoiceAttributeNotFound, globalAttributeId: q(t.globalAttributeId) }; } function Xi(t) { return { ...t, type: m.ComponentAttributeNotFound, globalAttributeId: q(t.globalAttributeId) }; } function Yi(t) { return { ...t, type: m.NumericAttributeNotFound, globalAttributeId: q(t.globalAttributeId) }; } function Zi(t) { return { ...t, type: m.BooleanAttributeNotFound, globalAttributeId: q(t.globalAttributeId) }; } function tn(t) { const { globalChoiceValueId: e, ...i } = t; return { ...i, type: m.ChoiceValueNotFound, globalAttributeId: q(e.attributeId), choiceValueId: e.choiceValueId }; } function en(t) { return { ...t, type: m.NumericDecisionOutOfRange, globalAttributeId: q(t.globalAttributeId) }; } function nn(t) { return { ...t, type: m.ConflictWithConsequence, globalAttributeId: q(t.globalAttributeId) }; } function on(t) { return { ...t, type: m.DecisionsToRespectInvalid, globalAttributeId: q(t.globalAttributeId) }; } function sn() { return { type: m.SessionNotFound }; } function rn(t) { const e = a( t.causedByBooleanDecisions, r.map((s) => ({ type: c.Boolean, attributeId: q(s.attributeId), state: s.state })) ), i = a( t.causedByNumericDecisions, r.map((s) => ({ type: c.Numeric, attributeId: q(s.attributeId), state: s.state })) ), n = a( t.causedByComponentDecisions, r.map((s) => ({ type: c.Component, attributeId: q(s.attributeId), state: we(s.state) })) ), o = a( t.causedByChoiceDecisions, r.map((s) => ({ type: c.Choice, attributeId: q(s.attributeId), choiceValueId: s.choiceValueId, state: Ce(s.state) })) ); return { causedByBooleanDecisions: e, causedByNumericDecisions: i, causedByComponentDecisions: n, causedByChoiceValueDecisions: o }; } function zt(t) { const e = a( t.causedByCardinalities, r.map((n) => q(n.attributeId)) ), i = a( t.causedByRules, r.map((n) => an(n.constraintId)) ); return { causedByCardinalities: e, causedByRules: i }; } function q(t) { const e = t.sharedConfigurationModelId != null ? t.sharedConfigurationModelId : void 0, i = t.componentPath != null && r.isNonEmpty(t.componentPath) ? t.componentPath : void 0; return { localId: t.localId, componentPath: i, sharedConfigurationModelId: e }; } function an(t) { return { localId: t.localId, configurationModelId: t.configurationModelId }; } function we(t) { return y(t).with(H.Included, () => B.Included).with(H.Excluded, () => B.Excluded).exhaustive(); } function Ce(t) { return y(t).with(H.Included, () => M.Included).with(H.Excluded, () => M.Excluded).exhaustive(); } function It(t) { return y(t).with(Ft.Explicit, () => N.Explicit).with(Ft.Implicit, () => N.Implicit).exhaustive(); } function Ie({ state: t, kind: e }) { return t != null ? { state: t, kind: It(e) } : null; } function Se({ state: t, kind: e }) { return t != null ? { state: t, kind: It(e) } : null; } function Ee({ state: t, kind: e }) { return t === k.Included || t === k.Excluded ? { state: y(t).with(k.Included, () => B.Included).with(k.Excluded, () => B.Excluded).exhaustive(), kind: It(e) } : null; } function qe({ state: t, kind: e }) { return t === k.Included || t === k.Excluded ? { state: y(t).with(k.Included, () => M.Included).with(k.Excluded, () => M.Excluded).exhaustive(), kind: It(e) } : null; } function Nt(t) { return y(t).with(Rt.Mandatory, () => tt.Mandatory).with(Rt.Optional, () => tt.Optional).exhaustive(); } function cn(t) { return y(t).with(Bt.Always, () => ft.Always).with(Bt.Optional, () => ft.Optional).exhaustive(); } function un(t) { const e = a( t.componentDecisions, r.map((s) => { var u; return { type: c.Component, attributeId: q(s.attributeId), state: (u = Ee(s)) == null ? void 0 : u.state }; }) ), i = a( t.booleanDecisions, r.map((s) => { var u; return { type: c.Boolean, attributeId: q(s.attributeId), state: (u = Ie(s)) == null ? void 0 : u.state }; }) ), n = a( t.numericDecisions, r.map((s) => { var u; return { type: c.Numeric, attributeId: q(s.attributeId), state: (u = Se(s)) == null ? void 0 : u.state }; }) ), o = a( t.choiceValueDecisions, r.map((s) => { var u; return { type: c.Choice, attributeId: q(s.attributeId), choiceValueId: s.choiceValueId, state: (u = qe(s)) == null ? void 0 : u.state }; }) ); return a( o, r.concat(e), r.concat(n), r.concat(i) ); } function De(t, e, i) { return function(n) { for (var o = Array(i.length + 1), s = 0; s < i.length; s++) o[s] = i[s]; return o[i.length] = n, e === 0 ? t.apply(null, o) : De(t, e - 1, o); }; } function ln(t) { var e = t.length; switch (e) { case 1: return function(i) { var n; return n = {}, n[t[0]] = i, n; }; case 2: return function(i) { return function(n) { var o; return o = {}, o[t[0]] = i, o[t[1]] = n, o; }; }; case 3: return function(i) { return function(n) { return function(o) { var s; return s = {}, s[t[0]] = i, s[t[1]] = n, s[t[2]] = o, s; }; }; }; case 4: return function(i) { return function(n) { return function(o) { return function(s) { var u; return u = {}, u[t[0]] = i, u[t[1]] = n, u[t[2]] = o, u[t[3]] = s, u; }; }; }; }; case 5: return function(i) { return function(n) { return function(o) { return function(s) { return function(u) { var h; return h = {}, h[t[0]] = i, h[t[1]] = n, h[t[2]] = o, h[t[3]] = s, h[t[4]] = u, h; }; }; }; }; }; default: return De(function() { for (var i = [], n = 0; n < arguments.length; n++) i[n] = arguments[n]; for (var o = {}, s = 0; s < e; s++) o[t[s]] = i[s]; return o; }, e - 1, []); } } function dn(t) { return function(e) { for (var i = Object.keys(e), n = i.length, o = ln(i), s = t.map(e[i[0]], o), u = 1; u < n; u++) s = t.ap(s, e[i[u]]); return s; }; } var oe = function() { return { concat: _t }; }, St = function() { return { concat: function(t, e) { return e; } }; }, V = mi, Ae = function(t, e) { return { get: t, set: e }; }, pn = function() { return Ae(_t, hi); }, hn = function(t) { return function(e) { return Ae(function(i) { return e.get(i)[t]; }, function(i) { return function(n) { var o, s = e.get(n); return i === s[t] ? n : e.set(Object.assign({}, s, (o = {}, o[t] = i, o)))(n); }; }); }; }, fn = pn, mn = function(t) { return function(e) { return function(i) { var n = e.get(i), o = t(n); return n === o ? i : e.set(o)(i); }; }; }, yn = hn; const gn = (t) => t.hash != null; var U = function(t) { return { show: function(e) { var i = "{"; for (var n in t) yi.call(t, n) && (i += " ".concat(n, ": ").concat(t[n].show(e[n]), ",")); return i.length > 1 && (i = i.slice(0, -1) + " "), i += "}", i; } }; }; function G(t) { const e = /* @__PURE__ */ new WeakMap(); return { show: (i) => { const n = e.get(i); if (n != null) return n; const o = t.show(i); return e.set(i, o), o; } }; } const bn = r.getShow(d.Show), Et = (t) => ({ show: (e) => e == null ? "<null>" : t.show(e) }), wn = { show: (t) => t != null && r.isNonEmpty(t) ? bn.show(t) : "<undefined>" }, Cn = G(U({ localId: d.Show, componentPath: wn, sharedConfigurationModelId: Et(d.Show) })), In = d.Show, Sn = a( U({ localId: d.Show, configurationModel: d.Show }), G, Et ), K = (t) => a( U({ kind: d.Show, state: t }), G, Et ), qt = { id: Cn, key: In, type: d.Show, sourceId: Sn, isSatisfied: I.Show, canContributeToConfigurationSatisfaction: I.Show }, En = U({ ...qt, decision: K(I.Show), nonOptimisticDecision: K(I.Show), possibleDecisionStates: G(r.getShow(I.Show)), selection: d.Show }), qn = U({ ...qt, decision: K(D.Show), nonOptimisticDecision: K(D.Show), selection: d.Show, range: G(U({ max: D.Show, min: D.Show })), decimalPlaces: D.Show }), Dn = U({ ...qt, decision: K(d.Show), nonOptimisticDecision: K(d.Show), possibleDecisionStates: G(r.getShow(d.Show)), selection: Et(d.Show), inclusion: d.Show }), An = U({ ...qt, cardinality: G(U({ upperBound: D.Show, lowerBound: D.Show })), values: p.getShow(d.Show, U({ id: d.Show, decision: K(d.Show), nonOptimisticDecision: K(d.Show), possibleDecisionStates: G(r.getShow(d.Show)) })) }), vn = { show: (t) => y(t).with({ type: c.Choice }, An.show).with({ type: c.Component }, Dn.show).with({ type: c.Boolean }, En.show).with({ type: c.Numeric }, qn.show).exhaustive() }, xn = z( vn.show, W.map((t) => di.hash(t)) ); function Nn(t) { return { ...t, hash: xn(t) }; } var kn = function() { return { concat: function(t, e) { return fi(t, e); } }; }, Mn = function() { return { concat: kn().concat, empty: _t }; }; function $t(t) { return si.concatAll(Mn())(t); } const C = d.Eq, A = l.struct({ localId: d.Eq, componentPath: a( r.getEq(d.Eq), l.contramap((t) => t ?? []) ), sharedConfigurationModelId: l.eqNullable(d.Eq) }), ve = l.struct({ localId: d.Eq, configurationModelId: d.Eq }), Pn = l.struct({ type: d.Eq, includeConstraintsInConflictExplanation: I.Eq }), Rn = l.struct({ type: d.Eq }), Bn = l.union().with((t) => t.type === "Automatic", Rn).with((t) => t.type === "Manual", Pn), Fn = l.struct({ type: d.Eq, conflictHandling: Bn }), On = l.struct({ type: d.Eq }), Vn = l.union().with((t) => t.type === "DropExistingDecisions", Fn).with((t) => t.type === "KeepExistingDecisions", On), Wn = l.struct({ type: d.Eq, attributeId: A, state: l.eqNullable(I.Eq) }), jn = l.struct({ type: d.Eq, attributeId: A, state: l.eqNullable(D.Eq) }), Un = l.struct({ type: d.Eq, attributeId: A, state: l.eqNullable(d.Eq) }), Tn = l.struct({ type: d.Eq, attributeId: A, choiceValueId: d.Eq, state: l.eqNullable(d.Eq) }), Gt = l.union().with((t) => t.type === c.Boolean, Wn).with((t) => t.type === c.Numeric, jn).with((t) => t.type === c.Component, Un).with((t) => t.type === c.Choice, Tn), xe = a( l.struct({ attributeId: A, choiceValueId: S.getEq(d.Eq) }), l.contramap((t) => y(t).with({ type: c.Choice }, (e) => ({ attributeId: e.attributeId, choiceValueId: $(e.choiceValueId) })).otherwise((e) => ({ attributeId: e.attributeId, choiceValueId: V }))) ), Ln = l.struct({ mode: Vn, decisions: r.getUnsortedArrayEq(Gt) }), Ne = l.struct({ causedByDecisions: r.getUnsortedArrayEq(Gt), solution: Ln }), ke = l.struct({ causedByCardinalities: r.getUnsortedArrayEq(A), causedByRules: r.getUnsortedArrayEq(ve) }), _n = l.struct({ key: C, sourceId: l.struct({ configurationModel: d.Eq, localId: d.Eq }) }), mt = l.eqNullable(l.struct({ state: I.Eq, kind: d.Eq })), Hn = l.struct({ type: d.Eq, id: A, key: C, decision: mt, nonOptimisticDecision: mt }), yt = l.eqNullable(l.struct({ state: D.Eq, kind: d.Eq })), zn = l.struct({ type: d.Eq, id: A, key: C, decision: yt, nonOptimisticDecision: yt }), gt = l.eqNullable(l.struct({ state: d.Eq, kind: d.Eq })), $n = l.struct({ type: d.Eq, id: A, key: C, decision: gt, nonOptimisticDecision: gt }), bt = l.eqNullable(l.struct({ state: d.Eq, kind: d.Eq })), Gn = l.struct({ type: d.Eq, id: A, key: C, values: r.getUnsortedArrayEq(l.struct({ id: d.Eq, decision: bt, nonOptimisticDecision: bt })) }), Kn = l.union().with((t) => t.type === c.Boolean, Hn).with((t) => t.type === c.Numeric, zn).with((t) => t.type === c.Component, $n).with((t) => t.type === c.Choice, Gn), Qn = l.struct({ type: d.Eq, id: A, key: C, possibleDecisionStates: r.getUnsortedArrayEq(I.Eq), selection: d.Eq, isSatisfied: I.Eq }), Jn = l.struct({ type: d.Eq, id: A, key: C, range: l.struct({ max: D.Eq, min: D.Eq }), isSatisfied: I.Eq, selection: d.Eq, decimalPlaces: D.Eq }), Xn = l.struct({ type: d.Eq, id: A, key: C, possibleDecisionStates: r.getUnsortedArrayEq(d.Eq), isSatisfied: I.Eq, inclusion: d.Eq, selection: l.eqNullable(d.Eq) }), Yn = l.struct({ type: d.Eq, id: A, key: C, isSatisfied: I.Eq, cardinality: l.struct({ upperBound: D.Eq, lowerBound: D.Eq }), values: r.getUnsortedArrayEq(l.struct({ id: d.Eq, possibleDecisionStates: r.getUnsortedArrayEq(d.Eq) })) }), Zn = l.union().with((t) => t.type === c.Boolean, Qn).with((t) => t.type === c.Numeric, Jn).with((t) => t.type === c.Component, Xn).with((t) => t.type === c.Choice, Yn), Dt = { type: d.Eq, id: A, key: C, sourceId: l.eqNullable(l.struct({ configurationModel: d.Eq, localId: d.Eq })), canContributeToConfigurationSatisfaction: I.Eq, isSatisfied: I.Eq }, to = l.struct({ ...Dt, selection: d.Eq, possibleDecisionStates: r.getUnsortedArrayEq(I.Eq), decision: mt, nonOptimisticDecision: mt }), eo = l.struct({ ...Dt, selection: d.Eq, range: l.struct({ max: D.Eq, min: D.Eq }), decimalPlaces: D.Eq, decision: yt, nonOptimisticDecision: yt }), io = l.struct({ ...Dt, inclusion: d.Eq, selection: l.eqNullable(d.Eq), possibleDecisionStates: r.getUnsortedArrayEq(d.Eq), decision: gt, nonOptimisticDecision: gt }), no = l.struct({ ...Dt, cardinality: l.struct({ upperBound: D.Eq, lowerBound: D.Eq }), values: p.getEq(d.Eq, l.struct({ id: d.Eq, possibleDecisionStates: r.getUnsortedArrayEq(d.Eq), decision: bt, nonOptimisticDecision: bt })) }), Ot = l.union().with((t) => t.type === c.Boolean, to).with((t) => t.type === c.Numeric, eo).with((t) => t.type === c.Component, io).with((t) => t.type === c.Choice, no), oo = l.fromEquals((t, e) => t.hash === e.hash); l.struct({ isSatisfied: I.Eq, attributes: p.getEq(C, Ot) }); l.struct({ isSatisfied: I.Eq, attributes: p.getEq(C, oo) }); l.struct({ decisionExplanations: r.getUnsortedArrayEq(Ne), constraintExplanations: r.getUnsortedArrayEq(ke) }); l.struct({ type: d.Eq, title: d.Eq, detail: d.Eq, decisionExplanations: r.getUnsortedArrayEq(Ne), constraintExplanations: r.getUnsortedArrayEq(ke) }); const so = l.union().with((t) => t.accessToken != null, l.struct({ accessToken: d.Eq })).with((t) => t.sessionCreateUrl != null, l.struct({ sessionCreateUrl: d.Eq })), ro = l.struct({ rules: l.eqNullable(l.union().with((t) => t.type === Q.none, l.struct({ type: d.Eq })).with((t) => t.type === Q.all, l.struct({ type: d.Eq })).with((t) => t.type === Q.specific, l.struct({ type: d.Eq, rules: r.getUnsortedArrayEq(ve) }))) }), ao = l.struct({ attributeId: A, decisions: r.getUnsortedArrayEq(A) }), co = l.union().with((t) => t.type === nt.Channel, l.struct({ type: d.Eq, channel: d.Eq, deploymentName: d.Eq })).with((t) => t.type === nt.Package, l.struct({ type: d.Eq, configurationModelPackage: l.fromEquals(pi) })),