@likec4/core 1.38.0 → 1.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/builder/index.d.mts +6 -3
  2. package/dist/builder/index.mjs +55 -111
  3. package/dist/compute-view/index.d.mts +6 -3
  4. package/dist/compute-view/index.mjs +33 -34
  5. package/dist/compute-view/relationships-view/index.d.mts +6 -3
  6. package/dist/compute-view/relationships-view/index.mjs +6 -6
  7. package/dist/index.d.mts +8 -5
  8. package/dist/index.mjs +15 -24
  9. package/dist/model/connection/deployment/index.d.mts +8 -5
  10. package/dist/model/connection/deployment/index.mjs +7 -9
  11. package/dist/model/connection/index.d.mts +10 -7
  12. package/dist/model/connection/index.mjs +10 -14
  13. package/dist/model/connection/model/index.d.mts +8 -5
  14. package/dist/model/connection/model/index.mjs +7 -10
  15. package/dist/model/index.d.mts +13 -10
  16. package/dist/model/index.mjs +17 -20
  17. package/dist/shared/core.20m8Um0g.d.mts +253 -0
  18. package/dist/shared/{core.CpwrZi3D.mjs → core.4u1dVmfX.mjs} +3 -5
  19. package/dist/shared/{core.HUONfQfd.mjs → core.BB6zA-UU.mjs} +9 -214
  20. package/dist/shared/{core.C1GV0WWV.mjs → core.BVNaR17u.mjs} +1 -1
  21. package/dist/shared/{core.BL_xjl90.mjs → core.Be1n9a0i.mjs} +4 -5
  22. package/dist/shared/{core.BoyJPEen.mjs → core.Be4Jy9Qx.mjs} +2 -2
  23. package/dist/shared/{core.H8NbNp2X.mjs → core.BqVo8LrH.mjs} +1 -1
  24. package/dist/shared/{core.yaRvRnMW.mjs → core.BuoXfSMj.mjs} +1 -1
  25. package/dist/shared/{core.DhDo8LAz.d.mts → core.C7pZp1nR.d.mts} +3 -3
  26. package/dist/shared/{core.BH9nN-_I.mjs → core.CCD1ID81.mjs} +3 -4
  27. package/dist/shared/{core.8KM0D6va.mjs → core.CNGyqkJh.mjs} +1 -9
  28. package/dist/shared/{core.B0oEIXqd.mjs → core.CUw_2J9j.mjs} +1 -1
  29. package/dist/shared/{core.Y3j3s-oq.mjs → core.CWv15GLo.mjs} +11 -15
  30. package/dist/shared/{core.Bf5zKDK1.d.mts → core.CXCmvCws.d.mts} +2 -2
  31. package/dist/shared/core.CaT0SUUK.mjs +201 -0
  32. package/dist/shared/{core.Dtw1SBlz.d.mts → core.ClpXZ4Ib.d.mts} +3 -3
  33. package/dist/shared/{core.DyzAZvbX.mjs → core.CsbOakly.mjs} +13 -22
  34. package/dist/shared/{core.Btl47GOn.mjs → core.DLpidoWc.mjs} +2 -2
  35. package/dist/shared/{core.wwaSalox.d.mts → core.DM3vdkO_.d.mts} +1 -1
  36. package/dist/shared/core.DXhDWKFZ.d.mts +3 -0
  37. package/dist/shared/{core.O6FG0HF9.d.mts → core.DdzRtJ9d.d.mts} +1 -1
  38. package/dist/shared/{core.DQj9iv_y.mjs → core.DgttqsJc.mjs} +8 -11
  39. package/dist/shared/{core.b2BzqGz0.mjs → core.DlG1xWt2.mjs} +3 -43
  40. package/dist/shared/core.DnRszv-l.mjs +11982 -0
  41. package/dist/shared/core.DoM6aM9N.mjs +7 -0
  42. package/dist/shared/{core.DsznOb9G.mjs → core.DozSPE83.mjs} +43 -60
  43. package/dist/shared/{core.DsMrjY2q.mjs → core.GTgsmXS_.mjs} +2 -2
  44. package/dist/shared/core.ILwny7BV.mjs +38 -0
  45. package/dist/shared/core.PHwHXzkG.d.mts +213 -0
  46. package/dist/shared/core.T-eLZTW_.mjs +59 -0
  47. package/dist/shared/{core.CE_hG7EJ.d.mts → core.aWJgARyY.d.mts} +10 -486
  48. package/dist/shared/{core.BvlHvikl.d.mts → core.v1iEaXaR.d.mts} +5 -3
  49. package/dist/shared/core.yHe79zEl.mjs +98 -0
  50. package/dist/theme/index.d.mts +3 -126
  51. package/dist/theme/index.mjs +2 -3
  52. package/dist/types/_aux.d.mts +1 -1
  53. package/dist/types/expression-model.d.mts +191 -0
  54. package/dist/types/expression-model.mjs +112 -0
  55. package/dist/types/expression.d.mts +7 -0
  56. package/dist/types/expression.mjs +116 -0
  57. package/dist/types/fqnRef.d.mts +61 -0
  58. package/dist/types/fqnRef.mjs +46 -0
  59. package/dist/types/index.d.mts +6 -3
  60. package/dist/types/index.mjs +9 -9
  61. package/dist/types/scalar.mjs +2 -3
  62. package/dist/utils/index.d.mts +7 -429
  63. package/dist/utils/index.mjs +56 -15
  64. package/dist/utils/iterable/index.d.mts +2 -3
  65. package/dist/utils/iterable/index.mjs +9 -44
  66. package/package.json +9 -8
  67. package/src/index.ts +24 -1
  68. package/src/model/RelationModel.ts +1 -1
  69. package/src/model/index.ts +1 -1
  70. package/src/theme/element.ts +2 -2
  71. package/src/theme/relationships.ts +2 -2
  72. package/src/types/RichText.ts +1 -1
  73. package/src/types/expression-model.ts +3 -1
  74. package/src/types/expression.ts +3 -1
  75. package/src/types/fqnRef.ts +4 -1
  76. package/src/utils/compare-natural.ts +4 -2
  77. package/src/utils/guards.ts +0 -1
  78. package/src/utils/index.ts +0 -1
  79. package/dist/shared/core.BW8K1y6R.mjs +0 -278
  80. package/dist/shared/core.BgvIuGGU.mjs +0 -3
  81. package/dist/shared/core.BpJu1RrF.mjs +0 -5
  82. package/dist/shared/core.ByrmCl9I.mjs +0 -5
  83. package/dist/shared/core.CnIyafWn.mjs +0 -3
  84. package/dist/shared/core.DK6I-Nr7.mjs +0 -149
  85. package/dist/shared/core.DbRvwARP.mjs +0 -5
  86. package/dist/shared/core.YyjkRVss.mjs +0 -5236
  87. package/dist/shared/core.zLlww-07.mjs +0 -3
  88. package/src/builder/__snapshots__/Builder-style1.spec.ts.snap +0 -425
  89. package/src/builder/__snapshots__/Builder-style2.compute-model.json5 +0 -318
  90. package/src/builder/__snapshots__/Builder-style2.spec.ts.snap +0 -221
  91. package/src/compute-view/deployment-view/__test__/TestHelper.ts +0 -249
  92. package/src/compute-view/deployment-view/__test__/fixture.ts +0 -238
  93. package/src/compute-view/dynamic-view/__test__/fixture.ts +0 -67
  94. package/src/compute-view/element-view/__test__/TestHelper.ts +0 -282
  95. package/src/compute-view/element-view/__test__/__snapshots__/legacy.spec.ts.snap +0 -458
  96. package/src/compute-view/element-view/__test__/fixture.ts +0 -749
  97. package/src/compute-view/utils/__snapshots__/sortNodes.spec.ts.snap +0 -113
  98. package/src/model/__test__/fixture.ts +0 -168
  99. package/src/theme/__test__/theme-index.ts +0 -29
@@ -1,19 +1,10 @@
1
- import { c as customInspectSymbol } from './core.C1GV0WWV.mjs';
2
- import { a as intersection, d as difference, u as union, b as stringHash, e as equals } from './core.CpwrZi3D.mjs';
3
- import { C, t as s, g as hierarchyLevel, d as commonAncestor, n as nameFromFqn, k as isSameHierarchy } from './core.DQj9iv_y.mjs';
4
- import { u } from './core.DbRvwARP.mjs';
5
- import { n as n$1 } from './core.CnIyafWn.mjs';
1
+ import { c as customInspectSymbol } from './core.BVNaR17u.mjs';
2
+ import { i as intersection, d as difference, u as union, a as stringHash, e as equals } from './core.4u1dVmfX.mjs';
3
+ import { unique, only, isTruthy, isEmpty } from 'remeda';
4
+ import { o as hierarchyLevel, g as commonAncestor, n as nameFromFqn, d as isSameHierarchy } from './core.DgttqsJc.mjs';
6
5
  import { a as nonNullable, i as invariant } from './core.D4npX2q8.mjs';
7
- import { m as memoizeProp } from './core.B0oEIXqd.mjs';
8
- import { b as DefaultShapeSize, R as RichText, D as DefaultThemeColor, e as DefaultLineStyle, a as DefaultElementShape } from './core.H8NbNp2X.mjs';
9
-
10
- function y(t,i){let a=i.length-t.length;if(a===1){let[n,...r]=i;return C(n,{lazy:t,lazyArgs:r})}if(a===0){let n={lazy:t,lazyArgs:i};return Object.assign(e=>C(e,n),n)}throw new Error("Wrong number of arguments")}
11
-
12
- function i(...e){return y(a,e)}function a(){let e=new Set;return t=>e.has(t)?s:(e.add(t),{done:false,hasNext:true,next:t})}
13
-
14
- function t(...n){return u(o,n)}var o=n=>n.length===1?n[0]:void 0;
15
-
16
- function n(e){return e===void 0?true:typeof e=="string"||Array.isArray(e)?e.length===0:Object.keys(e).length===0}
6
+ import { m as memoizeProp } from './core.CUw_2J9j.mjs';
7
+ import { b as DefaultShapeSize, R as RichText, D as DefaultThemeColor, e as DefaultLineStyle, a as DefaultElementShape } from './core.BqVo8LrH.mjs';
17
8
 
18
9
  class AbstractDeploymentElementModel {
19
10
  get style() {
@@ -152,7 +143,7 @@ class AbstractDeploymentElementModel {
152
143
  ));
153
144
  }
154
145
  hasMetadata() {
155
- return !!this.$node.metadata && !n(this.$node.metadata);
146
+ return !!this.$node.metadata && !isEmpty(this.$node.metadata);
156
147
  }
157
148
  getMetadata(field) {
158
149
  if (field) {
@@ -189,7 +180,7 @@ class DeploymentNodeModel extends AbstractDeploymentElementModel {
189
180
  }
190
181
  get tags() {
191
182
  return memoizeProp(this, Symbol.for("tags"), () => {
192
- return i([
183
+ return unique([
193
184
  ...this.$node.tags ?? [],
194
185
  ...this.$model.$model.specification.deployments[this.kind]?.tags ?? []
195
186
  ]);
@@ -224,7 +215,7 @@ class DeploymentNodeModel extends AbstractDeploymentElementModel {
224
215
  if (children.size !== 1) {
225
216
  return null;
226
217
  }
227
- const child = t([...children]);
218
+ const child = only([...children]);
228
219
  return child?.isInstance() ? child : null;
229
220
  }
230
221
  /**
@@ -315,7 +306,7 @@ class DeployedInstanceModel extends AbstractDeploymentElementModel {
315
306
  }
316
307
  get tags() {
317
308
  return memoizeProp(this, Symbol.for("tags"), () => {
318
- return i([
309
+ return unique([
319
310
  ...this.$instance.tags ?? [],
320
311
  ...this.element.tags
321
312
  ]);
@@ -422,7 +413,7 @@ class DeploymentRelationModel {
422
413
  return `${this.source.id} -> ${this.target.id}`;
423
414
  }
424
415
  get title() {
425
- if (!n$1(this.$relationship.title)) {
416
+ if (!isTruthy(this.$relationship.title)) {
426
417
  return null;
427
418
  }
428
419
  return this.$relationship.title;
@@ -466,7 +457,7 @@ class DeploymentRelationModel {
466
457
  return false;
467
458
  }
468
459
  hasMetadata() {
469
- return !!this.$relationship.metadata && !n(this.$relationship.metadata);
460
+ return !!this.$relationship.metadata && !isEmpty(this.$relationship.metadata);
470
461
  }
471
462
  getMetadata(field) {
472
463
  if (field) {
@@ -725,4 +716,4 @@ const deploymentConnection = {
725
716
  findConnectionsWithin: findConnectionsWithin
726
717
  };
727
718
 
728
- export { DeploymentConnectionModel as D, NestedElementOfDeployedInstanceModel as N, RelationshipsAccum as R, findConnectionsBetween as a, findConnectionsWithin as b, DeployedInstanceModel as c, deploymentConnection as d, DeploymentNodeModel as e, findConnection as f, DeploymentRelationModel as g, i, n, t };
719
+ export { DeploymentConnectionModel as D, NestedElementOfDeployedInstanceModel as N, RelationshipsAccum as R, findConnectionsBetween as a, findConnectionsWithin as b, DeployedInstanceModel as c, deploymentConnection as d, DeploymentNodeModel as e, findConnection as f, DeploymentRelationModel as g };
@@ -1,9 +1,9 @@
1
- import { t } from './core.BH9nN-_I.mjs';
1
+ import { isFunction } from 'remeda';
2
2
  import { i as invariant } from './core.D4npX2q8.mjs';
3
3
 
4
4
  function imap(arg1, arg2) {
5
5
  const mapper = arg2 ?? arg1;
6
- invariant(t(mapper));
6
+ invariant(isFunction(mapper));
7
7
  function* _map(iter) {
8
8
  for (const value of iter) {
9
9
  yield mapper(value);
@@ -124,4 +124,4 @@ declare function sortNaturalByFqn<T extends {
124
124
  id: string;
125
125
  }, A extends IterableContainer<T>>(array: A, sort?: 'asc' | 'desc'): ReorderedArray<A>;
126
126
 
127
- export { type IterableContainer as I, type ReorderedArray as R, ancestorsFqn as a, compareByFqnHierarchically as b, commonAncestor as c, compareFqnHierarchically as d, hierarchyLevel as e, isDescendantOf as f, isSameHierarchy as g, hierarchyDistance as h, isAncestor as i, sortNaturalByFqn as j, sortParentsFirst as k, nameFromFqn as n, parentFqn as p, sortByFqnHierarchically as s };
127
+ export { type IterableContainer as I, type ReorderedArray as R, ancestorsFqn as a, isDescendantOf as b, isSameHierarchy as c, sortParentsFirst as d, commonAncestor as e, compareByFqnHierarchically as f, compareFqnHierarchically as g, hierarchyDistance as h, isAncestor as i, hierarchyLevel as j, sortByFqnHierarchically as k, nameFromFqn as n, parentFqn as p, sortNaturalByFqn as s };
@@ -0,0 +1,3 @@
1
+ declare function isIterable<T, I extends Iterable<T>>(something: I | unknown): something is Iterable<T>;
2
+
3
+ export { isIterable as i };
@@ -258,4 +258,4 @@ declare namespace _aux {
258
258
  export type { _aux_AllKinds as AllKinds, _aux_Any as Any, Any as AnyAux, _aux_AnySpec as AnySpec, _aux_Aux as Aux, _aux_DeploymentFqn as DeploymentFqn, _aux_DeploymentId as DeploymentId, _aux_DeploymentKind as DeploymentKind, _aux_EdgeId as EdgeId, _aux_ElementId as ElementId, _aux_ElementKind as ElementKind, _aux_Fqn as Fqn, _aux_LooseDeploymentId as LooseDeploymentId, _aux_LooseDeploymentKind as LooseDeploymentKind, _aux_LooseElementId as LooseElementId, _aux_LooseElementKind as LooseElementKind, _aux_LooseRelationKind as LooseRelationKind, _aux_LooseTag as LooseTag, _aux_LooseTags as LooseTags, _aux_LooseViewId as LooseViewId, _aux_Metadata as Metadata, _aux_MetadataKey as MetadataKey, _aux_Never as Never, _aux_NodeId as NodeId, _aux_OrString as OrString, _aux_PickByStage as PickByStage, _aux_ProjectId as ProjectId, _aux_RelationId as RelationId, _aux_RelationKind as RelationKind, _aux_Spec as Spec, _aux_SpecAux as SpecAux, _aux_Stage as Stage, DeploymentFqn as StrictDeploymentFqn, _aux_StrictDeploymentKind as StrictDeploymentKind, _aux_StrictElementKind as StrictElementKind, Fqn as StrictFqn, _aux_StrictProjectId as StrictProjectId, _aux_StrictRelationKind as StrictRelationKind, _aux_StrictTag as StrictTag, _aux_StrictViewId as StrictViewId, _aux_Tag as Tag, _aux_Tags as Tags, _aux_Unknown as Unknown, _aux_UnknownComputed as UnknownComputed, _aux_UnknownLayouted as UnknownLayouted, _aux_UnknownParsed as UnknownParsed, _aux_ViewId as ViewId, _aux_WithLinks as WithLinks, _aux_WithMetadata as WithMetadata, _aux_WithOptionalLinks as WithOptionalLinks, _aux_WithOptionalTags as WithOptionalTags, _aux_WithTags as WithTags, _aux_setProject as setProject, _aux_setStage as setStage, _aux_toComputed as toComputed, _aux_toLayouted as toLayouted, _aux_toParsed as toParsed };
259
259
  }
260
260
 
261
- export { type WithTags as $, type Any as A, type WithMetadata as B, type EdgeId as C, type DeploymentKind as D, type ExtractOnStage as E, type Fqn as F, type AnySpec as G, type PickByStage as H, type setStage as I, type NodeId as J, type Spec as K, type LooseTag as L, type ModelStage as M, type Never as N, type StrictProjectId as O, type ProjectId as P, type StrictTag as Q, type RelationKind as R, type SpecAux as S, type Tags as T, type Unknown as U, type ViewId as V, type WithOptionalTags as W, type StrictElementKind as X, type StrictDeploymentKind as Y, type StrictRelationKind as Z, _aux as _, type Aux as a, type WithLinks as a0, type OrString as a1, type LooseTags as a2, type LooseElementKind as a3, type LooseDeploymentKind as a4, type LooseRelationKind as a5, type UnknownComputed as b, type UnknownLayouted as c, type UnknownParsed as d, _stage as e, _type as f, type ElementId as g, type Metadata as h, isOnStage as i, type MetadataKey as j, type ElementKind as k, type RelationId as l, type StrictViewId as m, type LooseElementId as n, type LooseDeploymentId as o, type DeploymentFqn as p, type toLayouted as q, type Stage as r, type DeploymentId as s, type toComputed as t, type Tag as u, type toParsed as v, type LooseViewId as w, type setProject as x, type AllKinds as y, type WithOptionalLinks as z };
261
+ export { type WithTags as $, type Any as A, type WithMetadata as B, type EdgeId as C, type DeploymentId as D, type ExtractOnStage as E, type Fqn as F, type AnySpec as G, type PickByStage as H, type setStage as I, type NodeId as J, type Spec as K, type LooseTag as L, type ModelStage as M, type Never as N, type StrictProjectId as O, type ProjectId as P, type StrictTag as Q, type RelationKind as R, type SpecAux as S, type Tag as T, type Unknown as U, type ViewId as V, type WithOptionalTags as W, type StrictElementKind as X, type StrictDeploymentKind as Y, type StrictRelationKind as Z, _aux as _, type Aux as a, type WithLinks as a0, type OrString as a1, type LooseTags as a2, type LooseElementKind as a3, type LooseDeploymentKind as a4, type LooseRelationKind as a5, type UnknownComputed as b, type UnknownLayouted as c, type UnknownParsed as d, _stage as e, _type as f, type StrictViewId as g, type ElementKind as h, isOnStage as i, type ElementId as j, type AllKinds as k, type Tags as l, type Metadata as m, type MetadataKey as n, type DeploymentKind as o, type RelationId as p, type LooseElementId as q, type LooseDeploymentId as r, type DeploymentFqn as s, type toComputed as t, type toLayouted as u, type Stage as v, type toParsed as w, type LooseViewId as x, type setProject as y, type WithOptionalLinks as z };
@@ -1,8 +1,4 @@
1
- import { t } from './core.zLlww-07.mjs';
2
-
3
- var e={done:true,hasNext:false},s={done:false,hasNext:false},a=()=>e;
4
-
5
- function C(t,...o){let n=t,u=o.map(e=>"lazy"in e?y(e):void 0),p=0;for(;p<o.length;){if(u[p]===void 0||!B(n)){let i=o[p];n=i(n),p+=1;continue}let r=[];for(let i=p;i<o.length;i++){let l=u[i];if(l===void 0||(r.push(l),l.isSingle))break}let a=[];for(let i of n)if(f(i,a,r))break;let{isSingle:s}=r.at(-1);n=s?a[0]:a,p+=r.length;}return n}function f(t,o,n){if(n.length===0)return o.push(t),false;let u=t,p=s,e=false;for(let[r,a]of n.entries()){let{index:s,items:i}=a;if(i.push(u),p=a(u,s,i),a.index+=1,p.hasNext){if(p.hasMany??false){for(let l of p.next)if(f(l,o,n.slice(r+1)))return true;return e}u=p.next;}if(!p.hasNext)break;p.done&&(e=true);}return p.hasNext&&o.push(u),e}function y(t){let{lazy:o,lazyArgs:n}=t,u=o(...n);return Object.assign(u,{isSingle:o.single??false,index:0,items:[]})}function B(t){return typeof t=="string"||typeof t=="object"&&t!==null&&Symbol.iterator in t}
1
+ import { isString as isString$1 } from 'remeda';
6
2
 
7
3
  function getDefaultExportFromCjs (x) {
8
4
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -77,15 +73,15 @@ const compare = /*@__PURE__*/getDefaultExportFromCjs(naturalCompareLiteExports);
77
73
 
78
74
  function compareNatural(a, b) {
79
75
  if (a === b) return 0;
80
- if (t(a)) {
81
- if (t(b)) {
76
+ if (isString$1(a)) {
77
+ if (isString$1(b)) {
82
78
  return compare(a, b);
83
79
  }
84
80
  return 1;
85
81
  }
86
- return t(b) ? -1 : 0;
82
+ return isString$1(b) ? -1 : 0;
87
83
  }
88
- function compareNaturalHierarchically(separator = ".") {
84
+ function compareNaturalHierarchically(separator = ".", deepestFirst = false) {
89
85
  return (a, b) => {
90
86
  if (a === b) return 0;
91
87
  if (!a) return -1;
@@ -101,7 +97,8 @@ function compareNaturalHierarchically(separator = ".") {
101
97
  return comparison;
102
98
  }
103
99
  }
104
- return aParts.length - bParts.length;
100
+ const diff = aParts.length - bParts.length;
101
+ return deepestFirst ? -1 * diff : diff;
105
102
  };
106
103
  }
107
104
 
@@ -270,4 +267,4 @@ function sortNaturalByFqn(array, sort) {
270
267
  }).map(({ item }) => item);
271
268
  }
272
269
 
273
- export { C, compareNaturalHierarchically as a, ancestorsFqn as b, compareNatural as c, commonAncestor as d, compareByFqnHierarchically as e, compareFqnHierarchically as f, hierarchyLevel as g, hierarchyDistance as h, isAncestor as i, isDescendantOf as j, isSameHierarchy as k, sortNaturalByFqn as l, sortParentsFirst as m, nameFromFqn as n, isNonEmptyArray as o, parentFqn as p, isString as q, getDefaultExportFromCjs as r, sortByFqnHierarchically as s, s as t, a as u };
270
+ export { ancestorsFqn as a, isDescendantOf as b, isNonEmptyArray as c, isSameHierarchy as d, isString as e, sortParentsFirst as f, commonAncestor as g, compareFqnHierarchically as h, isAncestor as i, compareNatural as j, compareNaturalHierarchically as k, compareByFqnHierarchically as l, hierarchyDistance as m, nameFromFqn as n, hierarchyLevel as o, parentFqn as p, sortByFqnHierarchically as q, getDefaultExportFromCjs as r, sortNaturalByFqn as s };
@@ -1,7 +1,5 @@
1
- import { r as getDefaultExportFromCjs, d as commonAncestor, f as compareFqnHierarchically } from './core.DQj9iv_y.mjs';
2
- import { r as requireForeach, a as requireIterator } from './core.HUONfQfd.mjs';
3
-
4
- function o(r,n){let e=Math.ceil(r),t=Math.floor(n);if(t<e)throw new RangeError(`randomInteger: The range [${r.toString()},${n.toString()}] contains no integer`);return Math.floor(Math.random()*(t-e+1)+e)}
1
+ import { r as getDefaultExportFromCjs } from './core.DgttqsJc.mjs';
2
+ import { a as requireForeach, r as requireIterator } from './core.CaT0SUUK.mjs';
5
3
 
6
4
  /**
7
5
  * Mnemonist BiMap
@@ -1254,42 +1252,4 @@ function requireQueue () {
1254
1252
  var queueExports = /*@__PURE__*/ requireQueue();
1255
1253
  const queue = /*@__PURE__*/getDefaultExportFromCjs(queueExports);
1256
1254
 
1257
- const DELAY = "LIKEC4_DELAY";
1258
- function delay(...args) {
1259
- let ms = 100;
1260
- if (args.length === 2) {
1261
- ms = o(args[0], args[1]);
1262
- } else if (args.length === 1) {
1263
- ms = args[0];
1264
- }
1265
- return new Promise((resolve) => {
1266
- setTimeout(() => {
1267
- resolve(DELAY);
1268
- }, ms ?? 100);
1269
- });
1270
- }
1271
- function promiseNextTick() {
1272
- return Promise.resolve().then(() => void 0);
1273
- }
1274
-
1275
- const compareRelations = (a, b) => {
1276
- const parentA = commonAncestor(a.source.model, a.target.model);
1277
- const parentB = commonAncestor(b.source.model, b.target.model);
1278
- if (parentA && !parentB) {
1279
- return 1;
1280
- }
1281
- if (!parentA && parentB) {
1282
- return -1;
1283
- }
1284
- const compareParents = parentA && parentB ? compareFqnHierarchically(parentA, parentB) : 0;
1285
- if (compareParents !== 0) {
1286
- return compareParents;
1287
- }
1288
- const compareSource = compareFqnHierarchically(a.source.model, b.source.model);
1289
- if (compareSource !== 0) {
1290
- return compareSource;
1291
- }
1292
- return compareFqnHierarchically(a.target.model, b.target.model);
1293
- };
1294
-
1295
- export { delay as a, biMap as b, compareRelations as c, defaultWeakMap as d, linkedList as l, multiMap as m, promiseNextTick as p, queue as q };
1255
+ export { biMap as b, defaultWeakMap as d, linkedList as l, multiMap as m, queue as q };