document-model 1.0.9 → 1.0.11

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 (55) hide show
  1. package/dist/browser/document/index.d.ts +1 -0
  2. package/dist/browser/document/object.d.ts +10 -4
  3. package/dist/browser/document/reducer.d.ts +2 -1
  4. package/dist/browser/document/signal.d.ts +15 -0
  5. package/dist/browser/document/types.d.ts +12 -3
  6. package/dist/browser/document/utils/base.d.ts +2 -2
  7. package/dist/browser/document-model/gen/object.d.ts +2 -2
  8. package/dist/browser/document-model/gen/operation/actions.d.ts +3 -2
  9. package/dist/browser/document-model/gen/operation/creators.d.ts +3 -2
  10. package/dist/browser/document-model/gen/operation/object.d.ts +2 -1
  11. package/dist/browser/document-model/gen/operation/operations.d.ts +2 -1
  12. package/dist/browser/document-model/gen/schema/types.d.ts +8 -0
  13. package/dist/browser/document-model/gen/schema/zod.d.ts +5 -1
  14. package/dist/browser/document-model/index.d.ts +1 -0
  15. package/dist/browser/document-model.cjs +1 -1
  16. package/dist/browser/document-model.js +2 -2
  17. package/dist/browser/document.cjs +1 -1
  18. package/dist/browser/document.js +2 -2
  19. package/dist/browser/index.cjs +1 -1
  20. package/dist/browser/index.js +3 -3
  21. package/dist/browser/internal/index-ac329925.js +22 -0
  22. package/dist/{node/internal/index-5b0ca13a.js → browser/internal/index-c9e4dc9e.js} +1 -1
  23. package/dist/{node/internal/index-6a7277fe.js → browser/internal/index-cf51e575.js} +1 -1
  24. package/dist/browser/internal/{index-48f140bc.js → index-df1f6a1b.js} +442 -374
  25. package/dist/browser/internal/{object-ceb8f869.js → object-113c73e2.js} +2 -2
  26. package/dist/browser/internal/{object-98a2cff6.js → object-13eaec2b.js} +219 -218
  27. package/dist/node/document/index.d.ts +1 -0
  28. package/dist/node/document/object.d.ts +10 -4
  29. package/dist/node/document/reducer.d.ts +2 -1
  30. package/dist/node/document/signal.d.ts +15 -0
  31. package/dist/node/document/types.d.ts +12 -3
  32. package/dist/node/document/utils/base.d.ts +2 -2
  33. package/dist/node/document-model/gen/object.d.ts +2 -2
  34. package/dist/node/document-model/gen/operation/actions.d.ts +3 -2
  35. package/dist/node/document-model/gen/operation/creators.d.ts +3 -2
  36. package/dist/node/document-model/gen/operation/object.d.ts +2 -1
  37. package/dist/node/document-model/gen/operation/operations.d.ts +2 -1
  38. package/dist/node/document-model/gen/schema/types.d.ts +8 -0
  39. package/dist/node/document-model/gen/schema/zod.d.ts +5 -1
  40. package/dist/node/document-model/index.d.ts +1 -0
  41. package/dist/node/document-model.cjs +1 -1
  42. package/dist/node/document-model.js +2 -2
  43. package/dist/node/document.cjs +1 -1
  44. package/dist/node/document.js +2 -2
  45. package/dist/node/index.cjs +1 -1
  46. package/dist/node/index.js +3 -3
  47. package/dist/node/internal/{index-dfaca09a.js → index-0abc9251.js} +442 -374
  48. package/dist/{browser/internal/index-9922a4fc.js → node/internal/index-150bbba4.js} +1 -1
  49. package/dist/node/internal/index-2cd26a65.js +22 -0
  50. package/dist/{browser/internal/index-ff22a5bb.js → node/internal/index-a74d15aa.js} +1 -1
  51. package/dist/node/internal/{object-10abe15d.js → object-073dccc4.js} +1 -1
  52. package/dist/node/internal/{object-6f942fcb.js → object-baf4e3d5.js} +79 -78
  53. package/package.json +1 -1
  54. package/dist/browser/internal/index-7d7d05c8.js +0 -22
  55. package/dist/node/internal/index-2e487f63.js +0 -22
@@ -1,7 +1,7 @@
1
- var pt = Object.defineProperty;
2
- var lt = (t, e, i) => e in t ? pt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
3
- var pe = (t, e, i) => (lt(t, typeof e != "symbol" ? e + "" : e, i), i);
4
- import { c as dt, i as ct, a as ut, b as mt, s as Et, d as ht, l as Ot, e as St, f as s, B as l, g as gt, h as ft } from "./object-6f942fcb.js";
1
+ var dt = Object.defineProperty;
2
+ var ct = (t, e, n) => e in t ? dt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var pe = (t, e, n) => (ct(t, typeof e != "symbol" ? e + "" : e, n), n);
4
+ import { c as ut, i as mt, a as Et, b as ht, s as Ot, d as gt, l as St, e as ft, f as s, B as l, g as _t, h as It } from "./object-baf4e3d5.js";
5
5
  import "json-stringify-deterministic";
6
6
  import "immer";
7
7
  import "crypto";
@@ -10,7 +10,7 @@ import "https";
10
10
  import "path";
11
11
  import "jszip";
12
12
  import { z as r } from "zod";
13
- const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13
+ const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14
14
  __proto__: null
15
15
  }, Symbol.toStringTag, { value: "Module" })), le = {
16
16
  id: "powerhouse/document-model",
@@ -37,7 +37,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
37
37
  template: "",
38
38
  reducer: "",
39
39
  examples: [],
40
- errors: []
40
+ errors: [],
41
+ scope: "global"
41
42
  },
42
43
  {
43
44
  name: "SetModelId",
@@ -47,7 +48,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
47
48
  template: "",
48
49
  reducer: "",
49
50
  examples: [],
50
- errors: []
51
+ errors: [],
52
+ scope: "global"
51
53
  },
52
54
  {
53
55
  name: "SetModelExtension",
@@ -57,7 +59,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
57
59
  template: "",
58
60
  reducer: "",
59
61
  examples: [],
60
- errors: []
62
+ errors: [],
63
+ scope: "global"
61
64
  },
62
65
  {
63
66
  name: "SetModelDescription",
@@ -67,7 +70,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
67
70
  template: "",
68
71
  reducer: "",
69
72
  examples: [],
70
- errors: []
73
+ errors: [],
74
+ scope: "global"
71
75
  },
72
76
  {
73
77
  name: "SetAuthorName",
@@ -77,7 +81,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
77
81
  template: "",
78
82
  reducer: "",
79
83
  examples: [],
80
- errors: []
84
+ errors: [],
85
+ scope: "global"
81
86
  },
82
87
  {
83
88
  name: "SetAuthorWebsite",
@@ -87,7 +92,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
87
92
  template: "",
88
93
  reducer: "",
89
94
  examples: [],
90
- errors: []
95
+ errors: [],
96
+ scope: "global"
91
97
  }
92
98
  ],
93
99
  id: "",
@@ -104,7 +110,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
104
110
  template: "",
105
111
  reducer: "",
106
112
  examples: [],
107
- errors: []
113
+ errors: [],
114
+ scope: "global"
108
115
  },
109
116
  {
110
117
  name: "UpdateChangeLogItem",
@@ -114,7 +121,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
114
121
  template: "",
115
122
  reducer: "",
116
123
  examples: [],
117
- errors: []
124
+ errors: [],
125
+ scope: "global"
118
126
  },
119
127
  {
120
128
  name: "DeleteChangeLogItem",
@@ -124,7 +132,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
124
132
  template: "",
125
133
  reducer: "",
126
134
  examples: [],
127
- errors: []
135
+ errors: [],
136
+ scope: "global"
128
137
  },
129
138
  {
130
139
  name: "ReorderChangeLogItems",
@@ -134,7 +143,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
134
143
  template: "",
135
144
  reducer: "",
136
145
  examples: [],
137
- errors: []
146
+ errors: [],
147
+ scope: "global"
138
148
  },
139
149
  {
140
150
  name: "ReleaseNewVersion",
@@ -144,7 +154,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
144
154
  template: "",
145
155
  reducer: "",
146
156
  examples: [],
147
- errors: []
157
+ errors: [],
158
+ scope: "global"
148
159
  }
149
160
  ],
150
161
  id: "",
@@ -161,7 +172,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
161
172
  template: "",
162
173
  reducer: "",
163
174
  examples: [],
164
- errors: []
175
+ errors: [],
176
+ scope: "global"
165
177
  },
166
178
  {
167
179
  name: "SetModuleName",
@@ -171,7 +183,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
171
183
  template: "",
172
184
  reducer: "",
173
185
  examples: [],
174
- errors: []
186
+ errors: [],
187
+ scope: "global"
175
188
  },
176
189
  {
177
190
  name: "SetModuleDescription",
@@ -181,7 +194,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
181
194
  template: "",
182
195
  reducer: "",
183
196
  examples: [],
184
- errors: []
197
+ errors: [],
198
+ scope: "global"
185
199
  },
186
200
  {
187
201
  name: "DeleteModule",
@@ -191,7 +205,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
191
205
  template: "",
192
206
  reducer: "",
193
207
  examples: [],
194
- errors: []
208
+ errors: [],
209
+ scope: "global"
195
210
  },
196
211
  {
197
212
  name: "ReorderModules",
@@ -201,7 +216,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
201
216
  template: "",
202
217
  reducer: "",
203
218
  examples: [],
204
- errors: []
219
+ errors: [],
220
+ scope: "global"
205
221
  }
206
222
  ],
207
223
  id: "",
@@ -218,7 +234,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
218
234
  template: "",
219
235
  reducer: "",
220
236
  examples: [],
221
- errors: []
237
+ errors: [],
238
+ scope: "global"
222
239
  },
223
240
  {
224
241
  name: "SetOperationErrorCode",
@@ -228,7 +245,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
228
245
  template: "",
229
246
  reducer: "",
230
247
  examples: [],
231
- errors: []
248
+ errors: [],
249
+ scope: "global"
232
250
  },
233
251
  {
234
252
  name: "SetOperationErrorName",
@@ -238,7 +256,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
238
256
  template: "",
239
257
  reducer: "",
240
258
  examples: [],
241
- errors: []
259
+ errors: [],
260
+ scope: "global"
242
261
  },
243
262
  {
244
263
  name: "SetOperationErrorDescription",
@@ -248,7 +267,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
248
267
  template: "",
249
268
  reducer: "",
250
269
  examples: [],
251
- errors: []
270
+ errors: [],
271
+ scope: "global"
252
272
  },
253
273
  {
254
274
  name: "SetOperationErrorTemplate",
@@ -258,7 +278,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
258
278
  template: "",
259
279
  reducer: "",
260
280
  examples: [],
261
- errors: []
281
+ errors: [],
282
+ scope: "global"
262
283
  },
263
284
  {
264
285
  name: "DeleteOperationError",
@@ -268,7 +289,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
268
289
  template: "",
269
290
  reducer: "",
270
291
  examples: [],
271
- errors: []
292
+ errors: [],
293
+ scope: "global"
272
294
  },
273
295
  {
274
296
  name: "ReorderOperationErrors",
@@ -278,7 +300,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
278
300
  template: "",
279
301
  reducer: "",
280
302
  examples: [],
281
- errors: []
303
+ errors: [],
304
+ scope: "global"
282
305
  }
283
306
  ],
284
307
  id: "",
@@ -295,7 +318,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
295
318
  template: "",
296
319
  reducer: "",
297
320
  examples: [],
298
- errors: []
321
+ errors: [],
322
+ scope: "global"
299
323
  },
300
324
  {
301
325
  name: "UpdateOperationExample",
@@ -305,7 +329,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
305
329
  template: "",
306
330
  reducer: "",
307
331
  examples: [],
308
- errors: []
332
+ errors: [],
333
+ scope: "global"
309
334
  },
310
335
  {
311
336
  name: "DeleteOperationExample",
@@ -315,7 +340,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
315
340
  template: "",
316
341
  reducer: "",
317
342
  examples: [],
318
- errors: []
343
+ errors: [],
344
+ scope: "global"
319
345
  },
320
346
  {
321
347
  name: "ReorderOperationExamples",
@@ -325,7 +351,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
325
351
  template: "",
326
352
  reducer: "",
327
353
  examples: [],
328
- errors: []
354
+ errors: [],
355
+ scope: "global"
329
356
  }
330
357
  ],
331
358
  id: "",
@@ -342,7 +369,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
342
369
  template: "",
343
370
  reducer: "",
344
371
  examples: [],
345
- errors: []
372
+ errors: [],
373
+ scope: "global"
346
374
  },
347
375
  {
348
376
  name: "SetOperationName",
@@ -352,7 +380,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
352
380
  template: "",
353
381
  reducer: "",
354
382
  examples: [],
355
- errors: []
383
+ errors: [],
384
+ scope: "global"
356
385
  },
357
386
  {
358
387
  name: "SetOperationSchema",
@@ -362,7 +391,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
362
391
  template: "",
363
392
  reducer: "",
364
393
  examples: [],
365
- errors: []
394
+ errors: [],
395
+ scope: "global"
366
396
  },
367
397
  {
368
398
  name: "SetOperationDescription",
@@ -372,7 +402,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
372
402
  template: "",
373
403
  reducer: "",
374
404
  examples: [],
375
- errors: []
405
+ errors: [],
406
+ scope: "global"
376
407
  },
377
408
  {
378
409
  name: "SetOperationTemplate",
@@ -382,7 +413,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
382
413
  template: "",
383
414
  reducer: "",
384
415
  examples: [],
385
- errors: []
416
+ errors: [],
417
+ scope: "global"
386
418
  },
387
419
  {
388
420
  name: "SetOperationReducer",
@@ -392,7 +424,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
392
424
  template: "",
393
425
  reducer: "",
394
426
  examples: [],
395
- errors: []
427
+ errors: [],
428
+ scope: "global"
396
429
  },
397
430
  {
398
431
  name: "MoveOperation",
@@ -402,7 +435,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
402
435
  template: "",
403
436
  reducer: "",
404
437
  examples: [],
405
- errors: []
438
+ errors: [],
439
+ scope: "global"
406
440
  },
407
441
  {
408
442
  name: "DeleteOperation",
@@ -412,7 +446,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
412
446
  template: "",
413
447
  reducer: "",
414
448
  examples: [],
415
- errors: []
449
+ errors: [],
450
+ scope: "global"
416
451
  },
417
452
  {
418
453
  name: "ReorderModuleOperations",
@@ -422,7 +457,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
422
457
  template: "",
423
458
  reducer: "",
424
459
  examples: [],
425
- errors: []
460
+ errors: [],
461
+ scope: "global"
426
462
  }
427
463
  ],
428
464
  id: "",
@@ -439,7 +475,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
439
475
  template: "",
440
476
  reducer: "",
441
477
  examples: [],
442
- errors: []
478
+ errors: [],
479
+ scope: "global"
443
480
  },
444
481
  {
445
482
  name: "SetInitialState",
@@ -449,7 +486,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
449
486
  template: "",
450
487
  reducer: "",
451
488
  examples: [],
452
- errors: []
489
+ errors: [],
490
+ scope: "global"
453
491
  },
454
492
  {
455
493
  name: "AddStateExample",
@@ -459,7 +497,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
459
497
  template: "",
460
498
  reducer: "",
461
499
  examples: [],
462
- errors: []
500
+ errors: [],
501
+ scope: "global"
463
502
  },
464
503
  {
465
504
  name: "UpdateStateExample",
@@ -469,7 +508,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
469
508
  template: "",
470
509
  reducer: "",
471
510
  examples: [],
472
- errors: []
511
+ errors: [],
512
+ scope: "global"
473
513
  },
474
514
  {
475
515
  name: "DeleteStateExample",
@@ -479,7 +519,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
479
519
  template: "",
480
520
  reducer: "",
481
521
  examples: [],
482
- errors: []
522
+ errors: [],
523
+ scope: "global"
483
524
  },
484
525
  {
485
526
  name: "ReorderStateExamples",
@@ -489,7 +530,8 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
489
530
  template: "",
490
531
  reducer: "",
491
532
  examples: [],
492
- errors: []
533
+ errors: [],
534
+ scope: "global"
493
535
  }
494
536
  ],
495
537
  id: "",
@@ -524,7 +566,7 @@ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
524
566
  }
525
567
  }
526
568
  ]
527
- }, de = (t) => t != null, It = r.any().refine((t) => de(t));
569
+ }, de = (t) => t != null, bt = r.any().refine((t) => de(t));
528
570
  function f() {
529
571
  return r.object({
530
572
  __typename: r.literal("AddChangeLogItemInput").optional(),
@@ -557,7 +599,7 @@ function T() {
557
599
  operationId: r.string()
558
600
  });
559
601
  }
560
- function R() {
602
+ function b() {
561
603
  return r.object({
562
604
  description: r.string().nullish(),
563
605
  id: r.string(),
@@ -565,10 +607,11 @@ function R() {
565
607
  name: r.string(),
566
608
  reducer: r.string().nullish(),
567
609
  schema: r.string().nullish(),
568
- template: r.string().nullish()
610
+ template: r.string().nullish(),
611
+ scope: r.literal("local").or(r.literal("global")).nullish()
569
612
  });
570
613
  }
571
- function D() {
614
+ function R() {
572
615
  return r.object({
573
616
  example: r.string(),
574
617
  id: r.string(),
@@ -582,25 +625,25 @@ function ce() {
582
625
  website: r.string().nullable()
583
626
  });
584
627
  }
585
- function x() {
628
+ function A() {
586
629
  return r.object({
587
630
  __typename: r.literal("CodeExample").optional(),
588
631
  id: r.string(),
589
632
  value: r.string()
590
633
  });
591
634
  }
592
- function A() {
635
+ function D() {
593
636
  return r.object({
594
637
  __typename: r.literal("DeleteChangeLogItemInput").optional(),
595
638
  id: r.string()
596
639
  });
597
640
  }
598
- function M() {
641
+ function x() {
599
642
  return r.object({
600
643
  id: r.string()
601
644
  });
602
645
  }
603
- function b() {
646
+ function M() {
604
647
  return r.object({
605
648
  id: r.string()
606
649
  });
@@ -620,17 +663,17 @@ function P() {
620
663
  id: r.string()
621
664
  });
622
665
  }
623
- function Tt() {
666
+ function Rt() {
624
667
  return r.union([
625
668
  f(),
626
669
  _(),
627
670
  I(),
628
671
  T(),
672
+ b(),
629
673
  R(),
630
674
  D(),
631
- A(),
675
+ x(),
632
676
  M(),
633
- b(),
634
677
  N(),
635
678
  L(),
636
679
  P(),
@@ -659,13 +702,13 @@ function Tt() {
659
702
  ee(),
660
703
  te(),
661
704
  re(),
705
+ oe(),
662
706
  ne(),
663
707
  ie(),
664
- oe(),
665
708
  se()
666
709
  ]);
667
710
  }
668
- function Rt() {
711
+ function At() {
669
712
  return r.object({
670
713
  __typename: r.literal("DocumentModelState").optional(),
671
714
  author: ce(),
@@ -681,7 +724,7 @@ function ue() {
681
724
  __typename: r.literal("DocumentSpecification").optional(),
682
725
  changeLog: r.array(r.string()),
683
726
  modules: r.array(me()),
684
- state: Oe(),
727
+ state: ge(),
685
728
  version: r.number()
686
729
  });
687
730
  }
@@ -705,12 +748,13 @@ function Ee() {
705
748
  __typename: r.literal("Operation").optional(),
706
749
  description: r.string().nullable(),
707
750
  errors: r.array(he()),
708
- examples: r.array(x()),
751
+ examples: r.array(A()),
709
752
  id: r.string(),
710
753
  name: r.string().nullable(),
711
754
  reducer: r.string().nullable(),
712
755
  schema: r.string().nullable(),
713
- template: r.string().nullable()
756
+ template: r.string().nullable(),
757
+ scope: r.literal("local").or(r.literal("global"))
714
758
  });
715
759
  }
716
760
  function he() {
@@ -840,6 +884,12 @@ function Z() {
840
884
  name: r.string().nullish()
841
885
  });
842
886
  }
887
+ function Oe() {
888
+ return r.object({
889
+ id: r.string(),
890
+ scope: r.literal("global").or(r.literal("local"))
891
+ });
892
+ }
843
893
  function ee() {
844
894
  return r.object({
845
895
  id: r.string(),
@@ -858,27 +908,27 @@ function re() {
858
908
  template: r.string().nullish()
859
909
  });
860
910
  }
861
- function ne() {
911
+ function oe() {
862
912
  return r.object({
863
913
  schema: r.string()
864
914
  });
865
915
  }
866
- function Oe() {
916
+ function ge() {
867
917
  return r.object({
868
918
  __typename: r.literal("State").optional(),
869
- examples: r.array(x()),
919
+ examples: r.array(A()),
870
920
  initialValue: r.string(),
871
921
  schema: r.string()
872
922
  });
873
923
  }
874
- function ie() {
924
+ function ne() {
875
925
  return r.object({
876
926
  __typename: r.literal("UpdateChangeLogItemInput").optional(),
877
927
  id: r.string(),
878
928
  newContent: r.string()
879
929
  });
880
930
  }
881
- function oe() {
931
+ function ie() {
882
932
  return r.object({
883
933
  example: r.string(),
884
934
  id: r.string()
@@ -896,18 +946,18 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
896
946
  AddModuleInputSchema: _,
897
947
  AddOperationErrorInputSchema: I,
898
948
  AddOperationExampleInputSchema: T,
899
- AddOperationInputSchema: R,
900
- AddStateExampleInputSchema: D,
949
+ AddOperationInputSchema: b,
950
+ AddStateExampleInputSchema: R,
901
951
  AuthorSchema: ce,
902
- CodeExampleSchema: x,
903
- DeleteChangeLogItemInputSchema: A,
904
- DeleteModuleInputSchema: M,
905
- DeleteOperationErrorInputSchema: b,
952
+ CodeExampleSchema: A,
953
+ DeleteChangeLogItemInputSchema: D,
954
+ DeleteModuleInputSchema: x,
955
+ DeleteOperationErrorInputSchema: M,
906
956
  DeleteOperationExampleInputSchema: N,
907
957
  DeleteOperationInputSchema: L,
908
958
  DeleteStateExampleInputSchema: P,
909
- DocumentModelInputSchema: Tt,
910
- DocumentModelStateSchema: Rt,
959
+ DocumentModelInputSchema: Rt,
960
+ DocumentModelStateSchema: At,
911
961
  DocumentSpecificationSchema: ue,
912
962
  ModuleSchema: me,
913
963
  MoveOperationInputSchema: j,
@@ -936,13 +986,14 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
936
986
  SetOperationNameInputSchema: Z,
937
987
  SetOperationReducerInputSchema: ee,
938
988
  SetOperationSchemaInputSchema: te,
989
+ SetOperationScopeInputSchema: Oe,
939
990
  SetOperationTemplateInputSchema: re,
940
- SetStateSchemaInputSchema: ne,
941
- StateSchema: Oe,
942
- UpdateChangeLogItemInputSchema: ie,
943
- UpdateOperationExampleInputSchema: oe,
991
+ SetStateSchemaInputSchema: oe,
992
+ StateSchema: ge,
993
+ UpdateChangeLogItemInputSchema: ne,
994
+ UpdateOperationExampleInputSchema: ie,
944
995
  UpdateStateExampleInputSchema: se,
945
- definedNonNullAnySchema: It,
996
+ definedNonNullAnySchema: bt,
946
997
  isDefinedNonNullAny: de
947
998
  }, Symbol.toStringTag, { value: "Module" })), c = {
948
999
  setModelNameOperation(t, e) {
@@ -981,7 +1032,7 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
981
1032
  }
982
1033
  }, xt = (t) => {
983
1034
  const e = {};
984
- return t.forEach((i, n) => e[i] = n), (i, n) => (e[n.id] || 999999) - (e[i.id] || 999999);
1035
+ return t.forEach((n, o) => e[n] = o), (n, o) => (e[o.id] || 999999) - (e[n.id] || 999999);
985
1036
  }, h = {
986
1037
  addModuleOperation(t, e) {
987
1038
  t.specifications[t.specifications.length - 1].modules.push({
@@ -992,33 +1043,33 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
992
1043
  });
993
1044
  },
994
1045
  setModuleNameOperation(t, e) {
995
- const i = t.specifications[t.specifications.length - 1];
996
- for (let n = 0; n < i.modules.length; n++)
997
- i.modules[n].id === e.input.id && (i.modules[n].name = e.input.name || "");
1046
+ const n = t.specifications[t.specifications.length - 1];
1047
+ for (let o = 0; o < n.modules.length; o++)
1048
+ n.modules[o].id === e.input.id && (n.modules[o].name = e.input.name || "");
998
1049
  },
999
1050
  setModuleDescriptionOperation(t, e) {
1000
- const i = t.specifications[t.specifications.length - 1];
1001
- for (let n = 0; n < i.modules.length; n++)
1002
- i.modules[n].id === e.input.id && (i.modules[n].description = e.input.description || "");
1051
+ const n = t.specifications[t.specifications.length - 1];
1052
+ for (let o = 0; o < n.modules.length; o++)
1053
+ n.modules[o].id === e.input.id && (n.modules[o].description = e.input.description || "");
1003
1054
  },
1004
1055
  deleteModuleOperation(t, e) {
1005
- const i = t.specifications[t.specifications.length - 1];
1006
- i.modules = i.modules.filter(
1007
- (n) => n.id != e.input.id
1056
+ const n = t.specifications[t.specifications.length - 1];
1057
+ n.modules = n.modules.filter(
1058
+ (o) => o.id != e.input.id
1008
1059
  );
1009
1060
  },
1010
1061
  reorderModulesOperation(t, e) {
1011
1062
  t.specifications[t.specifications.length - 1].modules.sort(xt(e.input.order));
1012
1063
  }
1013
- }, At = (t) => {
1064
+ }, Mt = (t) => {
1014
1065
  const e = {};
1015
- return t.forEach((i, n) => e[i] = n), (i, n) => (e[n.id] || 999999) - (e[i.id] || 999999);
1066
+ return t.forEach((n, o) => e[n] = o), (n, o) => (e[o.id] || 999999) - (e[n.id] || 999999);
1016
1067
  }, d = {
1017
1068
  addOperationErrorOperation(t, e) {
1018
- const i = t.specifications[t.specifications.length - 1];
1019
- for (let n = 0; n < i.modules.length; n++)
1020
- for (let o = 0; o < i.modules[n].operations.length; o++)
1021
- i.modules[n].operations[o].id == e.input.operationId && i.modules[n].operations[o].errors.push({
1069
+ const n = t.specifications[t.specifications.length - 1];
1070
+ for (let o = 0; o < n.modules.length; o++)
1071
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1072
+ n.modules[o].operations[i].id == e.input.operationId && n.modules[o].operations[i].errors.push({
1022
1073
  id: e.input.id,
1023
1074
  name: e.input.errorName || "",
1024
1075
  code: e.input.errorCode || "",
@@ -1027,91 +1078,91 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1027
1078
  });
1028
1079
  },
1029
1080
  setOperationErrorCodeOperation(t, e) {
1030
- const i = t.specifications[t.specifications.length - 1];
1031
- for (let n = 0; n < i.modules.length; n++)
1032
- for (let o = 0; o < i.modules[n].operations.length; o++)
1033
- for (let a = 0; a < i.modules[n].operations[o].errors.length; a++)
1034
- i.modules[n].operations[o].errors[a].id == e.input.id && (i.modules[n].operations[o].errors[a].code = e.input.errorCode || "");
1081
+ const n = t.specifications[t.specifications.length - 1];
1082
+ for (let o = 0; o < n.modules.length; o++)
1083
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1084
+ for (let a = 0; a < n.modules[o].operations[i].errors.length; a++)
1085
+ n.modules[o].operations[i].errors[a].id == e.input.id && (n.modules[o].operations[i].errors[a].code = e.input.errorCode || "");
1035
1086
  },
1036
1087
  setOperationErrorNameOperation(t, e) {
1037
- const i = t.specifications[t.specifications.length - 1];
1038
- for (let n = 0; n < i.modules.length; n++)
1039
- for (let o = 0; o < i.modules[n].operations.length; o++)
1040
- for (let a = 0; a < i.modules[n].operations[o].errors.length; a++)
1041
- i.modules[n].operations[o].errors[a].id == e.input.id && (i.modules[n].operations[o].errors[a].name = e.input.errorName || "");
1088
+ const n = t.specifications[t.specifications.length - 1];
1089
+ for (let o = 0; o < n.modules.length; o++)
1090
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1091
+ for (let a = 0; a < n.modules[o].operations[i].errors.length; a++)
1092
+ n.modules[o].operations[i].errors[a].id == e.input.id && (n.modules[o].operations[i].errors[a].name = e.input.errorName || "");
1042
1093
  },
1043
1094
  setOperationErrorDescriptionOperation(t, e) {
1044
- const i = t.specifications[t.specifications.length - 1];
1045
- for (let n = 0; n < i.modules.length; n++)
1046
- for (let o = 0; o < i.modules[n].operations.length; o++)
1047
- for (let a = 0; a < i.modules[n].operations[o].errors.length; a++)
1048
- i.modules[n].operations[o].errors[a].id == e.input.id && (i.modules[n].operations[o].errors[a].description = e.input.errorDescription || "");
1095
+ const n = t.specifications[t.specifications.length - 1];
1096
+ for (let o = 0; o < n.modules.length; o++)
1097
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1098
+ for (let a = 0; a < n.modules[o].operations[i].errors.length; a++)
1099
+ n.modules[o].operations[i].errors[a].id == e.input.id && (n.modules[o].operations[i].errors[a].description = e.input.errorDescription || "");
1049
1100
  },
1050
1101
  setOperationErrorTemplateOperation(t, e) {
1051
- const i = t.specifications[t.specifications.length - 1];
1052
- for (let n = 0; n < i.modules.length; n++)
1053
- for (let o = 0; o < i.modules[n].operations.length; o++)
1054
- for (let a = 0; a < i.modules[n].operations[o].errors.length; a++)
1055
- i.modules[n].operations[o].errors[a].id == e.input.id && (i.modules[n].operations[o].errors[a].template = e.input.errorTemplate || "");
1102
+ const n = t.specifications[t.specifications.length - 1];
1103
+ for (let o = 0; o < n.modules.length; o++)
1104
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1105
+ for (let a = 0; a < n.modules[o].operations[i].errors.length; a++)
1106
+ n.modules[o].operations[i].errors[a].id == e.input.id && (n.modules[o].operations[i].errors[a].template = e.input.errorTemplate || "");
1056
1107
  },
1057
1108
  deleteOperationErrorOperation(t, e) {
1058
- const i = t.specifications[t.specifications.length - 1];
1059
- for (let n = 0; n < i.modules.length; n++)
1060
- for (let o = 0; o < i.modules[n].operations.length; o++)
1061
- i.modules[n].operations[o].errors = i.modules[n].operations[o].errors.filter((a) => a.id != e.input.id);
1109
+ const n = t.specifications[t.specifications.length - 1];
1110
+ for (let o = 0; o < n.modules.length; o++)
1111
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1112
+ n.modules[o].operations[i].errors = n.modules[o].operations[i].errors.filter((a) => a.id != e.input.id);
1062
1113
  },
1063
1114
  reorderOperationErrorsOperation(t, e) {
1064
- const i = t.specifications[t.specifications.length - 1];
1065
- for (let n = 0; n < i.modules.length; n++)
1066
- for (let o = 0; o < i.modules[n].operations.length; o++)
1067
- i.modules[n].operations[o].id == e.input.operationId && i.modules[n].operations[o].errors.sort(
1068
- At(e.input.order)
1115
+ const n = t.specifications[t.specifications.length - 1];
1116
+ for (let o = 0; o < n.modules.length; o++)
1117
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1118
+ n.modules[o].operations[i].id == e.input.operationId && n.modules[o].operations[i].errors.sort(
1119
+ Mt(e.input.order)
1069
1120
  );
1070
1121
  }
1071
- }, Mt = (t) => {
1122
+ }, Nt = (t) => {
1072
1123
  const e = {};
1073
- return t.forEach((i, n) => e[i] = n), (i, n) => (e[n.id] || 999999) - (e[i.id] || 999999);
1074
- }, g = {
1124
+ return t.forEach((n, o) => e[n] = o), (n, o) => (e[o.id] || 999999) - (e[n.id] || 999999);
1125
+ }, S = {
1075
1126
  addOperationExampleOperation(t, e) {
1076
- const i = t.specifications[t.specifications.length - 1];
1077
- for (let n = 0; n < i.modules.length; n++)
1078
- for (let o = 0; o < i.modules[n].operations.length; o++)
1079
- i.modules[n].operations[o].id == e.input.operationId && i.modules[n].operations[o].examples.push({
1127
+ const n = t.specifications[t.specifications.length - 1];
1128
+ for (let o = 0; o < n.modules.length; o++)
1129
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1130
+ n.modules[o].operations[i].id == e.input.operationId && n.modules[o].operations[i].examples.push({
1080
1131
  id: e.input.id,
1081
1132
  value: e.input.example
1082
1133
  });
1083
1134
  },
1084
1135
  updateOperationExampleOperation(t, e) {
1085
- const i = t.specifications[t.specifications.length - 1];
1086
- for (let n = 0; n < i.modules.length; n++)
1087
- for (let o = 0; o < i.modules[n].operations.length; o++)
1088
- for (let a = 0; a < i.modules[n].operations[o].examples.length; a++)
1089
- i.modules[n].operations[o].examples[a].id == e.input.id && (i.modules[n].operations[o].examples[a].value = e.input.example);
1136
+ const n = t.specifications[t.specifications.length - 1];
1137
+ for (let o = 0; o < n.modules.length; o++)
1138
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1139
+ for (let a = 0; a < n.modules[o].operations[i].examples.length; a++)
1140
+ n.modules[o].operations[i].examples[a].id == e.input.id && (n.modules[o].operations[i].examples[a].value = e.input.example);
1090
1141
  },
1091
1142
  deleteOperationExampleOperation(t, e) {
1092
- const i = t.specifications[t.specifications.length - 1];
1093
- for (let n = 0; n < i.modules.length; n++)
1094
- for (let o = 0; o < i.modules[n].operations.length; o++)
1095
- i.modules[n].operations[o].examples = i.modules[n].operations[o].examples.filter(
1143
+ const n = t.specifications[t.specifications.length - 1];
1144
+ for (let o = 0; o < n.modules.length; o++)
1145
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1146
+ n.modules[o].operations[i].examples = n.modules[o].operations[i].examples.filter(
1096
1147
  (a) => a.id != e.input.id
1097
1148
  );
1098
1149
  },
1099
1150
  reorderOperationExamplesOperation(t, e) {
1100
- const i = t.specifications[t.specifications.length - 1];
1101
- for (let n = 0; n < i.modules.length; n++)
1102
- for (let o = 0; o < i.modules[n].operations.length; o++)
1103
- i.modules[n].operations[o].id == e.input.operationId && i.modules[n].operations[o].examples.sort(
1104
- Mt(e.input.order)
1151
+ const n = t.specifications[t.specifications.length - 1];
1152
+ for (let o = 0; o < n.modules.length; o++)
1153
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1154
+ n.modules[o].operations[i].id == e.input.operationId && n.modules[o].operations[i].examples.sort(
1155
+ Nt(e.input.order)
1105
1156
  );
1106
1157
  }
1107
- }, bt = (t) => {
1158
+ }, Lt = (t) => {
1108
1159
  const e = {};
1109
- return t.forEach((i, n) => e[i] = n), (i, n) => (e[n.id] || 999999) - (e[i.id] || 999999);
1160
+ return t.forEach((n, o) => e[n] = o), (n, o) => (e[o.id] || 999999) - (e[n.id] || 999999);
1110
1161
  }, p = {
1111
1162
  addOperationOperation(t, e) {
1112
- const i = t.specifications[t.specifications.length - 1];
1113
- for (let n = 0; n < i.modules.length; n++)
1114
- i.modules[n].id == e.input.moduleId && i.modules[n].operations.push({
1163
+ const n = t.specifications[t.specifications.length - 1];
1164
+ for (let o = 0; o < n.modules.length; o++)
1165
+ n.modules[o].id == e.input.moduleId && n.modules[o].operations.push({
1115
1166
  id: e.input.id,
1116
1167
  name: e.input.name,
1117
1168
  description: e.input.description || "",
@@ -1119,69 +1170,76 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1119
1170
  template: e.input.template || e.input.description || "",
1120
1171
  reducer: e.input.reducer || "",
1121
1172
  errors: [],
1122
- examples: []
1173
+ examples: [],
1174
+ scope: e.input.scope || "global"
1123
1175
  });
1124
1176
  },
1125
1177
  setOperationNameOperation(t, e) {
1126
- const i = t.specifications[t.specifications.length - 1];
1127
- for (let n = 0; n < i.modules.length; n++)
1128
- for (let o = 0; o < i.modules[n].operations.length; o++)
1129
- i.modules[n].operations[o].id == e.input.id && (i.modules[n].operations[o].name = e.input.name || "");
1178
+ const n = t.specifications[t.specifications.length - 1];
1179
+ for (let o = 0; o < n.modules.length; o++)
1180
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1181
+ n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].name = e.input.name || "");
1182
+ },
1183
+ setOperationScopeOperation(t, e) {
1184
+ const n = t.specifications[t.specifications.length - 1];
1185
+ for (let o = 0; o < n.modules.length; o++)
1186
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1187
+ n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].scope = e.input.scope || "global");
1130
1188
  },
1131
1189
  setOperationSchemaOperation(t, e) {
1132
- const i = t.specifications[t.specifications.length - 1];
1133
- for (let n = 0; n < i.modules.length; n++)
1134
- for (let o = 0; o < i.modules[n].operations.length; o++)
1135
- i.modules[n].operations[o].id == e.input.id && (i.modules[n].operations[o].schema = e.input.schema || "");
1190
+ const n = t.specifications[t.specifications.length - 1];
1191
+ for (let o = 0; o < n.modules.length; o++)
1192
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1193
+ n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].schema = e.input.schema || "");
1136
1194
  },
1137
1195
  setOperationDescriptionOperation(t, e) {
1138
- const i = t.specifications[t.specifications.length - 1];
1139
- for (let n = 0; n < i.modules.length; n++)
1140
- for (let o = 0; o < i.modules[n].operations.length; o++)
1141
- i.modules[n].operations[o].id == e.input.id && (i.modules[n].operations[o].description = e.input.description || "");
1196
+ const n = t.specifications[t.specifications.length - 1];
1197
+ for (let o = 0; o < n.modules.length; o++)
1198
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1199
+ n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].description = e.input.description || "");
1142
1200
  },
1143
1201
  setOperationTemplateOperation(t, e) {
1144
- const i = t.specifications[t.specifications.length - 1];
1145
- for (let n = 0; n < i.modules.length; n++)
1146
- for (let o = 0; o < i.modules[n].operations.length; o++)
1147
- i.modules[n].operations[o].id == e.input.id && (i.modules[n].operations[o].template = e.input.template || "");
1202
+ const n = t.specifications[t.specifications.length - 1];
1203
+ for (let o = 0; o < n.modules.length; o++)
1204
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1205
+ n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].template = e.input.template || "");
1148
1206
  },
1149
1207
  setOperationReducerOperation(t, e) {
1150
- const i = t.specifications[t.specifications.length - 1];
1151
- for (let n = 0; n < i.modules.length; n++)
1152
- for (let o = 0; o < i.modules[n].operations.length; o++)
1153
- i.modules[n].operations[o].id == e.input.id && (i.modules[n].operations[o].reducer = e.input.reducer || "");
1208
+ const n = t.specifications[t.specifications.length - 1];
1209
+ for (let o = 0; o < n.modules.length; o++)
1210
+ for (let i = 0; i < n.modules[o].operations.length; i++)
1211
+ n.modules[o].operations[i].id == e.input.id && (n.modules[o].operations[i].reducer = e.input.reducer || "");
1154
1212
  },
1155
1213
  moveOperationOperation(t, e) {
1156
- const i = [], n = t.specifications[t.specifications.length - 1];
1157
- for (let o = 0; o < n.modules.length; o++)
1158
- n.modules[o].operations = n.modules[o].operations.filter((a) => a.id == e.input.operationId ? (i.push(a), !1) : !0);
1159
- for (let o = 0; o < n.modules.length; o++)
1160
- n.modules[o].id == e.input.newModuleId && n.modules[o].operations.push(...i);
1214
+ const n = [], o = t.specifications[t.specifications.length - 1];
1215
+ for (let i = 0; i < o.modules.length; i++)
1216
+ o.modules[i].operations = o.modules[i].operations.filter((a) => a.id == e.input.operationId ? (n.push(a), !1) : !0);
1217
+ for (let i = 0; i < o.modules.length; i++)
1218
+ o.modules[i].id == e.input.newModuleId && o.modules[i].operations.push(...n);
1161
1219
  },
1162
1220
  deleteOperationOperation(t, e) {
1163
- const i = t.specifications[t.specifications.length - 1];
1164
- for (let n = 0; n < i.modules.length; n++)
1165
- i.modules[n].operations = i.modules[n].operations.filter((o) => o.id != e.input.id);
1221
+ const n = t.specifications[t.specifications.length - 1];
1222
+ for (let o = 0; o < n.modules.length; o++)
1223
+ n.modules[o].operations = n.modules[o].operations.filter((i) => i.id != e.input.id);
1166
1224
  },
1167
1225
  reorderModuleOperationsOperation(t, e) {
1168
- const i = t.specifications[t.specifications.length - 1];
1169
- for (let n = 0; n < i.modules.length; n++)
1170
- i.modules[n].id == e.input.moduleId && i.modules[n].operations.sort(
1171
- bt(e.input.order)
1226
+ const n = t.specifications[t.specifications.length - 1];
1227
+ for (let o = 0; o < n.modules.length; o++)
1228
+ n.modules[o].id == e.input.moduleId && n.modules[o].operations.sort(
1229
+ Lt(e.input.order)
1172
1230
  );
1173
1231
  }
1174
- }, Nt = (t) => {
1232
+ }, Pt = (t) => {
1175
1233
  const e = {};
1176
- return t.forEach((i, n) => e[i] = n), (i, n) => (e[n.id] || 999999) - (e[i.id] || 999999);
1234
+ return t.forEach((n, o) => e[n] = o), (n, o) => (e[o.id] || 999999) - (e[n.id] || 999999);
1177
1235
  }, u = {
1178
1236
  setStateSchemaOperation(t, e) {
1179
- const i = t.specifications[t.specifications.length - 1];
1180
- i.state.schema = e.input.schema;
1237
+ const n = t.specifications[t.specifications.length - 1];
1238
+ n.state.schema = e.input.schema;
1181
1239
  },
1182
1240
  setInitialStateOperation(t, e) {
1183
- const i = t.specifications[t.specifications.length - 1];
1184
- i.state.initialValue = e.input.initialValue;
1241
+ const n = t.specifications[t.specifications.length - 1];
1242
+ n.state.initialValue = e.input.initialValue;
1185
1243
  },
1186
1244
  addStateExampleOperation(t, e) {
1187
1245
  t.specifications[t.specifications.length - 1].state.examples.push({
@@ -1190,21 +1248,21 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1190
1248
  });
1191
1249
  },
1192
1250
  updateStateExampleOperation(t, e) {
1193
- const i = t.specifications[t.specifications.length - 1];
1194
- for (let n = 0; n < i.state.examples.length; n++)
1195
- i.state.examples[n].id == e.input.id && (i.state.examples[n].value = e.input.newExample);
1251
+ const n = t.specifications[t.specifications.length - 1];
1252
+ for (let o = 0; o < n.state.examples.length; o++)
1253
+ n.state.examples[o].id == e.input.id && (n.state.examples[o].value = e.input.newExample);
1196
1254
  },
1197
1255
  deleteStateExampleOperation(t, e) {
1198
- const i = t.specifications[t.specifications.length - 1];
1199
- i.state.examples = i.state.examples.filter(
1200
- (n) => n.id != e.input.id
1256
+ const n = t.specifications[t.specifications.length - 1];
1257
+ n.state.examples = n.state.examples.filter(
1258
+ (o) => o.id != e.input.id
1201
1259
  );
1202
1260
  },
1203
1261
  reorderStateExamplesOperation(t, e) {
1204
- t.specifications[t.specifications.length - 1].state.examples.sort(Nt(e.input.order));
1262
+ t.specifications[t.specifications.length - 1].state.examples.sort(Pt(e.input.order));
1205
1263
  }
1206
- }, Lt = (t, e) => {
1207
- if (ct(e))
1264
+ }, jt = (t, e) => {
1265
+ if (mt(e))
1208
1266
  return t;
1209
1267
  switch (e.type) {
1210
1268
  case "SET_MODEL_NAME":
@@ -1229,10 +1287,10 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1229
1287
  f().parse(e.input), E.addChangeLogItemOperation(t, e);
1230
1288
  break;
1231
1289
  case "UPDATE_CHANGE_LOG_ITEM":
1232
- ie().parse(e.input), E.updateChangeLogItemOperation(t, e);
1290
+ ne().parse(e.input), E.updateChangeLogItemOperation(t, e);
1233
1291
  break;
1234
1292
  case "DELETE_CHANGE_LOG_ITEM":
1235
- A().parse(e.input), E.deleteChangeLogItemOperation(t, e);
1293
+ D().parse(e.input), E.deleteChangeLogItemOperation(t, e);
1236
1294
  break;
1237
1295
  case "REORDER_CHANGE_LOG_ITEMS":
1238
1296
  C().parse(e.input), E.reorderChangeLogItemsOperation(t, e);
@@ -1254,7 +1312,7 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1254
1312
  z().parse(e.input), h.setModuleDescriptionOperation(t, e);
1255
1313
  break;
1256
1314
  case "DELETE_MODULE":
1257
- M().parse(e.input), h.deleteModuleOperation(t, e);
1315
+ x().parse(e.input), h.deleteModuleOperation(t, e);
1258
1316
  break;
1259
1317
  case "REORDER_MODULES":
1260
1318
  y().parse(e.input), h.reorderModulesOperation(t, e);
@@ -1281,7 +1339,7 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1281
1339
  );
1282
1340
  break;
1283
1341
  case "DELETE_OPERATION_ERROR":
1284
- b().parse(e.input), d.deleteOperationErrorOperation(t, e);
1342
+ M().parse(e.input), d.deleteOperationErrorOperation(t, e);
1285
1343
  break;
1286
1344
  case "REORDER_OPERATION_ERRORS":
1287
1345
  w().parse(e.input), d.reorderOperationErrorsOperation(
@@ -1290,32 +1348,35 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1290
1348
  );
1291
1349
  break;
1292
1350
  case "ADD_OPERATION_EXAMPLE":
1293
- T().parse(e.input), g.addOperationExampleOperation(t, e);
1351
+ T().parse(e.input), S.addOperationExampleOperation(t, e);
1294
1352
  break;
1295
1353
  case "UPDATE_OPERATION_EXAMPLE":
1296
- oe().parse(e.input), g.updateOperationExampleOperation(
1354
+ ie().parse(e.input), S.updateOperationExampleOperation(
1297
1355
  t,
1298
1356
  e
1299
1357
  );
1300
1358
  break;
1301
1359
  case "DELETE_OPERATION_EXAMPLE":
1302
- N().parse(e.input), g.deleteOperationExampleOperation(
1360
+ N().parse(e.input), S.deleteOperationExampleOperation(
1303
1361
  t,
1304
1362
  e
1305
1363
  );
1306
1364
  break;
1307
1365
  case "REORDER_OPERATION_EXAMPLES":
1308
- U().parse(e.input), g.reorderOperationExamplesOperation(
1366
+ U().parse(e.input), S.reorderOperationExamplesOperation(
1309
1367
  t,
1310
1368
  e
1311
1369
  );
1312
1370
  break;
1313
1371
  case "ADD_OPERATION":
1314
- R().parse(e.input), p.addOperationOperation(t, e);
1372
+ b().parse(e.input), p.addOperationOperation(t, e);
1315
1373
  break;
1316
1374
  case "SET_OPERATION_NAME":
1317
1375
  Z().parse(e.input), p.setOperationNameOperation(t, e);
1318
1376
  break;
1377
+ case "SET_OPERATION_SCOPE":
1378
+ Oe().parse(e.input), p.setOperationScopeOperation(t, e);
1379
+ break;
1319
1380
  case "SET_OPERATION_SCHEMA":
1320
1381
  te().parse(e.input), p.setOperationSchemaOperation(t, e);
1321
1382
  break;
@@ -1338,13 +1399,13 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1338
1399
  k().parse(e.input), p.reorderModuleOperationsOperation(t, e);
1339
1400
  break;
1340
1401
  case "SET_STATE_SCHEMA":
1341
- ne().parse(e.input), u.setStateSchemaOperation(t, e);
1402
+ oe().parse(e.input), u.setStateSchemaOperation(t, e);
1342
1403
  break;
1343
1404
  case "SET_INITIAL_STATE":
1344
1405
  V().parse(e.input), u.setInitialStateOperation(t, e);
1345
1406
  break;
1346
1407
  case "ADD_STATE_EXAMPLE":
1347
- D().parse(e.input), u.addStateExampleOperation(t, e);
1408
+ R().parse(e.input), u.addStateExampleOperation(t, e);
1348
1409
  break;
1349
1410
  case "UPDATE_STATE_EXAMPLE":
1350
1411
  se().parse(e.input), u.updateStateExampleOperation(t, e);
@@ -1358,9 +1419,9 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1358
1419
  default:
1359
1420
  return t;
1360
1421
  }
1361
- }, S = dt(
1362
- Lt
1363
- ), Pt = {
1422
+ }, g = ut(
1423
+ jt
1424
+ ), Ct = {
1364
1425
  id: "",
1365
1426
  name: "",
1366
1427
  extension: "",
@@ -1384,396 +1445,403 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1384
1445
  }, O = {
1385
1446
  fileExtension: "phdm",
1386
1447
  createState(t) {
1387
- return { ...Pt, ...t };
1448
+ return { ...Ct, ...t };
1388
1449
  },
1389
1450
  createExtendedState(t) {
1390
- return ut(
1451
+ return Et(
1391
1452
  { ...t, documentType: "powerhouse/document-model" },
1392
1453
  O.createState
1393
1454
  );
1394
1455
  },
1395
1456
  createDocument(t) {
1396
- return mt(
1457
+ return ht(
1397
1458
  O.createExtendedState(t),
1398
1459
  O.createState
1399
1460
  );
1400
1461
  },
1401
- saveToFile(t, e, i) {
1402
- return Et(t, e, "phdm", i);
1462
+ saveToFile(t, e, n) {
1463
+ return Ot(t, e, "phdm", n);
1403
1464
  },
1404
1465
  saveToFileHandle(t, e) {
1405
- return ht(t, e);
1466
+ return gt(t, e);
1406
1467
  },
1407
1468
  loadFromFile(t) {
1408
- return Ot(t, S);
1469
+ return St(t, g);
1409
1470
  },
1410
1471
  loadFromInput(t) {
1411
- return St(t, S);
1472
+ return ft(t, g);
1412
1473
  }
1413
1474
  }, Se = (t) => s(
1414
1475
  "SET_MODEL_NAME",
1415
1476
  { ...t }
1416
- ), ge = (t) => s(
1477
+ ), fe = (t) => s(
1417
1478
  "SET_MODEL_ID",
1418
1479
  { ...t }
1419
- ), fe = (t) => s(
1480
+ ), _e = (t) => s(
1420
1481
  "SET_MODEL_EXTENSION",
1421
1482
  { ...t }
1422
- ), _e = (t) => s(
1483
+ ), Ie = (t) => s(
1423
1484
  "SET_MODEL_DESCRIPTION",
1424
1485
  { ...t }
1425
- ), Ie = (t) => s(
1486
+ ), Te = (t) => s(
1426
1487
  "SET_AUTHOR_NAME",
1427
1488
  { ...t }
1428
- ), Te = (t) => s(
1489
+ ), be = (t) => s(
1429
1490
  "SET_AUTHOR_WEBSITE",
1430
1491
  { ...t }
1431
1492
  );
1432
- class jt extends l {
1493
+ class kt extends l {
1433
1494
  setModelName(e) {
1434
1495
  return this.dispatch(Se(e));
1435
1496
  }
1436
1497
  setModelId(e) {
1437
- return this.dispatch(ge(e));
1498
+ return this.dispatch(fe(e));
1438
1499
  }
1439
1500
  setModelExtension(e) {
1440
- return this.dispatch(fe(e));
1501
+ return this.dispatch(_e(e));
1441
1502
  }
1442
1503
  setModelDescription(e) {
1443
- return this.dispatch(_e(e));
1504
+ return this.dispatch(Ie(e));
1444
1505
  }
1445
1506
  setAuthorName(e) {
1446
- return this.dispatch(Ie(e));
1507
+ return this.dispatch(Te(e));
1447
1508
  }
1448
1509
  setAuthorWebsite(e) {
1449
- return this.dispatch(Te(e));
1510
+ return this.dispatch(be(e));
1450
1511
  }
1451
1512
  }
1452
1513
  const Re = (t) => s(
1453
1514
  "ADD_CHANGE_LOG_ITEM",
1454
1515
  { ...t }
1455
- ), De = (t) => s(
1516
+ ), Ae = (t) => s(
1456
1517
  "UPDATE_CHANGE_LOG_ITEM",
1457
1518
  { ...t }
1458
- ), xe = (t) => s(
1519
+ ), De = (t) => s(
1459
1520
  "DELETE_CHANGE_LOG_ITEM",
1460
1521
  { ...t }
1461
- ), Ae = (t) => s(
1522
+ ), xe = (t) => s(
1462
1523
  "REORDER_CHANGE_LOG_ITEMS",
1463
1524
  { ...t }
1464
1525
  ), Me = () => s("RELEASE_NEW_VERSION");
1465
- class Ct extends l {
1526
+ class yt extends l {
1466
1527
  addChangeLogItem(e) {
1467
1528
  return this.dispatch(Re(e));
1468
1529
  }
1469
1530
  updateChangeLogItem(e) {
1470
- return this.dispatch(De(e));
1531
+ return this.dispatch(Ae(e));
1471
1532
  }
1472
1533
  deleteChangeLogItem(e) {
1473
- return this.dispatch(xe(e));
1534
+ return this.dispatch(De(e));
1474
1535
  }
1475
1536
  reorderChangeLogItems(e) {
1476
- return this.dispatch(Ae(e));
1537
+ return this.dispatch(xe(e));
1477
1538
  }
1478
1539
  releaseNewVersion() {
1479
1540
  return this.dispatch(Me());
1480
1541
  }
1481
1542
  }
1482
- const be = (t) => s(
1543
+ const Ne = (t) => s(
1483
1544
  "ADD_MODULE",
1484
1545
  { ...t }
1485
- ), Ne = (t) => s(
1546
+ ), Le = (t) => s(
1486
1547
  "SET_MODULE_NAME",
1487
1548
  { ...t }
1488
- ), Le = (t) => s(
1549
+ ), Pe = (t) => s(
1489
1550
  "SET_MODULE_DESCRIPTION",
1490
1551
  { ...t }
1491
- ), Pe = (t) => s(
1552
+ ), je = (t) => s(
1492
1553
  "DELETE_MODULE",
1493
1554
  { ...t }
1494
- ), je = (t) => s(
1555
+ ), Ce = (t) => s(
1495
1556
  "REORDER_MODULES",
1496
1557
  { ...t }
1497
1558
  );
1498
- class kt extends l {
1559
+ class wt extends l {
1499
1560
  addModule(e) {
1500
- return this.dispatch(be(e));
1561
+ return this.dispatch(Ne(e));
1501
1562
  }
1502
1563
  setModuleName(e) {
1503
- return this.dispatch(Ne(e));
1564
+ return this.dispatch(Le(e));
1504
1565
  }
1505
1566
  setModuleDescription(e) {
1506
- return this.dispatch(Le(e));
1567
+ return this.dispatch(Pe(e));
1507
1568
  }
1508
1569
  deleteModule(e) {
1509
- return this.dispatch(Pe(e));
1570
+ return this.dispatch(je(e));
1510
1571
  }
1511
1572
  reorderModules(e) {
1512
- return this.dispatch(je(e));
1573
+ return this.dispatch(Ce(e));
1513
1574
  }
1514
1575
  }
1515
- const Ce = (t) => s(
1576
+ const ke = (t) => s(
1516
1577
  "ADD_OPERATION_ERROR",
1517
1578
  { ...t }
1518
- ), ke = (t) => s(
1579
+ ), ye = (t) => s(
1519
1580
  "SET_OPERATION_ERROR_CODE",
1520
1581
  { ...t }
1521
- ), ye = (t) => s(
1582
+ ), we = (t) => s(
1522
1583
  "SET_OPERATION_ERROR_NAME",
1523
1584
  { ...t }
1524
- ), we = (t) => s(
1585
+ ), Ue = (t) => s(
1525
1586
  "SET_OPERATION_ERROR_DESCRIPTION",
1526
1587
  { ...t }
1527
- ), Ue = (t) => s(
1588
+ ), ve = (t) => s(
1528
1589
  "SET_OPERATION_ERROR_TEMPLATE",
1529
1590
  { ...t }
1530
- ), ve = (t) => s(
1591
+ ), Fe = (t) => s(
1531
1592
  "DELETE_OPERATION_ERROR",
1532
1593
  { ...t }
1533
- ), Fe = (t) => s(
1594
+ ), He = (t) => s(
1534
1595
  "REORDER_OPERATION_ERRORS",
1535
1596
  { ...t }
1536
1597
  );
1537
- class yt extends l {
1598
+ class Ut extends l {
1538
1599
  addOperationError(e) {
1539
- return this.dispatch(Ce(e));
1600
+ return this.dispatch(ke(e));
1540
1601
  }
1541
1602
  setOperationErrorCode(e) {
1542
- return this.dispatch(ke(e));
1603
+ return this.dispatch(ye(e));
1543
1604
  }
1544
1605
  setOperationErrorName(e) {
1545
- return this.dispatch(ye(e));
1606
+ return this.dispatch(we(e));
1546
1607
  }
1547
1608
  setOperationErrorDescription(e) {
1548
- return this.dispatch(we(e));
1609
+ return this.dispatch(Ue(e));
1549
1610
  }
1550
1611
  setOperationErrorTemplate(e) {
1551
- return this.dispatch(Ue(e));
1612
+ return this.dispatch(ve(e));
1552
1613
  }
1553
1614
  deleteOperationError(e) {
1554
- return this.dispatch(ve(e));
1615
+ return this.dispatch(Fe(e));
1555
1616
  }
1556
1617
  reorderOperationErrors(e) {
1557
- return this.dispatch(Fe(e));
1618
+ return this.dispatch(He(e));
1558
1619
  }
1559
1620
  }
1560
- const He = (t) => s(
1621
+ const Ve = (t) => s(
1561
1622
  "ADD_OPERATION_EXAMPLE",
1562
1623
  { ...t }
1563
- ), Ve = (t) => s(
1624
+ ), Xe = (t) => s(
1564
1625
  "UPDATE_OPERATION_EXAMPLE",
1565
1626
  { ...t }
1566
- ), Xe = (t) => s(
1627
+ ), Ge = (t) => s(
1567
1628
  "DELETE_OPERATION_EXAMPLE",
1568
1629
  { ...t }
1569
- ), Ge = (t) => s(
1630
+ ), We = (t) => s(
1570
1631
  "REORDER_OPERATION_EXAMPLES",
1571
1632
  { ...t }
1572
1633
  );
1573
- class wt extends l {
1634
+ class vt extends l {
1574
1635
  addOperationExample(e) {
1575
- return this.dispatch(He(e));
1636
+ return this.dispatch(Ve(e));
1576
1637
  }
1577
1638
  updateOperationExample(e) {
1578
- return this.dispatch(Ve(e));
1639
+ return this.dispatch(Xe(e));
1579
1640
  }
1580
1641
  deleteOperationExample(e) {
1581
- return this.dispatch(Xe(e));
1642
+ return this.dispatch(Ge(e));
1582
1643
  }
1583
1644
  reorderOperationExamples(e) {
1584
- return this.dispatch(Ge(e));
1645
+ return this.dispatch(We(e));
1585
1646
  }
1586
1647
  }
1587
- const We = (t) => s(
1648
+ const $e = (t) => s(
1588
1649
  "ADD_OPERATION",
1589
1650
  { ...t }
1590
- ), $e = (t) => s(
1651
+ ), ze = (t) => s(
1591
1652
  "SET_OPERATION_NAME",
1592
1653
  { ...t }
1593
- ), ze = (t) => s(
1654
+ ), Be = (t) => s(
1655
+ "SET_OPERATION_SCOPE",
1656
+ { ...t }
1657
+ ), qe = (t) => s(
1594
1658
  "SET_OPERATION_SCHEMA",
1595
1659
  { ...t }
1596
- ), Be = (t) => s(
1660
+ ), Je = (t) => s(
1597
1661
  "SET_OPERATION_DESCRIPTION",
1598
1662
  { ...t }
1599
- ), qe = (t) => s(
1663
+ ), Ke = (t) => s(
1600
1664
  "SET_OPERATION_TEMPLATE",
1601
1665
  { ...t }
1602
- ), Je = (t) => s(
1666
+ ), Qe = (t) => s(
1603
1667
  "SET_OPERATION_REDUCER",
1604
1668
  { ...t }
1605
- ), Ke = (t) => s(
1669
+ ), Ye = (t) => s(
1606
1670
  "MOVE_OPERATION",
1607
1671
  { ...t }
1608
- ), Qe = (t) => s(
1672
+ ), Ze = (t) => s(
1609
1673
  "DELETE_OPERATION",
1610
1674
  { ...t }
1611
- ), Ye = (t) => s(
1675
+ ), et = (t) => s(
1612
1676
  "REORDER_MODULE_OPERATIONS",
1613
1677
  { ...t }
1614
1678
  );
1615
- class Ut extends l {
1679
+ class Ft extends l {
1616
1680
  addOperation(e) {
1617
- return this.dispatch(We(e));
1681
+ return this.dispatch($e(e));
1618
1682
  }
1619
1683
  setOperationName(e) {
1620
- return this.dispatch($e(e));
1684
+ return this.dispatch(ze(e));
1685
+ }
1686
+ setOperationScope(e) {
1687
+ return this.dispatch(Be(e));
1621
1688
  }
1622
1689
  setOperationSchema(e) {
1623
- return this.dispatch(ze(e));
1690
+ return this.dispatch(qe(e));
1624
1691
  }
1625
1692
  setOperationDescription(e) {
1626
- return this.dispatch(Be(e));
1693
+ return this.dispatch(Je(e));
1627
1694
  }
1628
1695
  setOperationTemplate(e) {
1629
- return this.dispatch(qe(e));
1696
+ return this.dispatch(Ke(e));
1630
1697
  }
1631
1698
  setOperationReducer(e) {
1632
- return this.dispatch(Je(e));
1699
+ return this.dispatch(Qe(e));
1633
1700
  }
1634
1701
  moveOperation(e) {
1635
- return this.dispatch(Ke(e));
1702
+ return this.dispatch(Ye(e));
1636
1703
  }
1637
1704
  deleteOperation(e) {
1638
- return this.dispatch(Qe(e));
1705
+ return this.dispatch(Ze(e));
1639
1706
  }
1640
1707
  reorderModuleOperations(e) {
1641
- return this.dispatch(Ye(e));
1708
+ return this.dispatch(et(e));
1642
1709
  }
1643
1710
  }
1644
- const Ze = (t) => s(
1711
+ const tt = (t) => s(
1645
1712
  "SET_STATE_SCHEMA",
1646
1713
  { ...t }
1647
- ), et = (t) => s(
1714
+ ), rt = (t) => s(
1648
1715
  "SET_INITIAL_STATE",
1649
1716
  { ...t }
1650
- ), tt = (t) => s(
1717
+ ), ot = (t) => s(
1651
1718
  "ADD_STATE_EXAMPLE",
1652
1719
  { ...t }
1653
- ), rt = (t) => s(
1720
+ ), nt = (t) => s(
1654
1721
  "UPDATE_STATE_EXAMPLE",
1655
1722
  { ...t }
1656
- ), nt = (t) => s(
1723
+ ), it = (t) => s(
1657
1724
  "DELETE_STATE_EXAMPLE",
1658
1725
  { ...t }
1659
- ), it = (t) => s(
1726
+ ), st = (t) => s(
1660
1727
  "REORDER_STATE_EXAMPLES",
1661
1728
  { ...t }
1662
1729
  );
1663
- class vt extends l {
1730
+ class Ht extends l {
1664
1731
  setStateSchema(e) {
1665
- return this.dispatch(Ze(e));
1732
+ return this.dispatch(tt(e));
1666
1733
  }
1667
1734
  setInitialState(e) {
1668
- return this.dispatch(et(e));
1735
+ return this.dispatch(rt(e));
1669
1736
  }
1670
1737
  addStateExample(e) {
1671
- return this.dispatch(tt(e));
1738
+ return this.dispatch(ot(e));
1672
1739
  }
1673
1740
  updateStateExample(e) {
1674
- return this.dispatch(rt(e));
1741
+ return this.dispatch(nt(e));
1675
1742
  }
1676
1743
  deleteStateExample(e) {
1677
- return this.dispatch(nt(e));
1744
+ return this.dispatch(it(e));
1678
1745
  }
1679
1746
  reorderStateExamples(e) {
1680
- return this.dispatch(it(e));
1747
+ return this.dispatch(st(e));
1681
1748
  }
1682
1749
  }
1683
1750
  var m;
1684
1751
  let ae = (m = class extends l {
1685
- constructor(e) {
1686
- super(S, O.createDocument(e));
1752
+ constructor(e, n) {
1753
+ super(g, O.createDocument(e), n);
1687
1754
  }
1688
- saveToFile(e, i) {
1689
- return super.saveToFile(e, m.fileExtension, i);
1755
+ saveToFile(e, n) {
1756
+ return super.saveToFile(e, m.fileExtension, n);
1690
1757
  }
1691
1758
  loadFromFile(e) {
1692
1759
  return super.loadFromFile(e);
1693
1760
  }
1694
1761
  static async fromFile(e) {
1695
- const i = new this();
1696
- return await i.loadFromFile(e), i;
1762
+ const n = new this();
1763
+ return await n.loadFromFile(e), n;
1697
1764
  }
1698
1765
  }, pe(m, "fileExtension", "phdm"), m);
1699
- gt(ae, [
1700
- jt,
1701
- Ct,
1766
+ _t(ae, [
1702
1767
  kt,
1703
1768
  yt,
1704
1769
  wt,
1705
1770
  Ut,
1706
- vt
1771
+ vt,
1772
+ Ft,
1773
+ Ht
1707
1774
  ]);
1708
- const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1775
+ const Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1709
1776
  __proto__: null,
1710
1777
  addChangeLogItem: Re,
1711
- addModule: be,
1712
- addOperation: We,
1713
- addOperationError: Ce,
1714
- addOperationExample: He,
1715
- addStateExample: tt,
1716
- deleteChangeLogItem: xe,
1717
- deleteModule: Pe,
1718
- deleteOperation: Qe,
1719
- deleteOperationError: ve,
1720
- deleteOperationExample: Xe,
1721
- deleteStateExample: nt,
1722
- moveOperation: Ke,
1778
+ addModule: Ne,
1779
+ addOperation: $e,
1780
+ addOperationError: ke,
1781
+ addOperationExample: Ve,
1782
+ addStateExample: ot,
1783
+ deleteChangeLogItem: De,
1784
+ deleteModule: je,
1785
+ deleteOperation: Ze,
1786
+ deleteOperationError: Fe,
1787
+ deleteOperationExample: Ge,
1788
+ deleteStateExample: it,
1789
+ moveOperation: Ye,
1723
1790
  releaseNewVersion: Me,
1724
- reorderChangeLogItems: Ae,
1725
- reorderModuleOperations: Ye,
1726
- reorderModules: je,
1727
- reorderOperationErrors: Fe,
1728
- reorderOperationExamples: Ge,
1729
- reorderStateExamples: it,
1730
- setAuthorName: Ie,
1731
- setAuthorWebsite: Te,
1732
- setInitialState: et,
1733
- setModelDescription: _e,
1734
- setModelExtension: fe,
1735
- setModelId: ge,
1791
+ reorderChangeLogItems: xe,
1792
+ reorderModuleOperations: et,
1793
+ reorderModules: Ce,
1794
+ reorderOperationErrors: He,
1795
+ reorderOperationExamples: We,
1796
+ reorderStateExamples: st,
1797
+ setAuthorName: Te,
1798
+ setAuthorWebsite: be,
1799
+ setInitialState: rt,
1800
+ setModelDescription: Ie,
1801
+ setModelExtension: _e,
1802
+ setModelId: fe,
1736
1803
  setModelName: Se,
1737
- setModuleDescription: Le,
1738
- setModuleName: Ne,
1739
- setOperationDescription: Be,
1740
- setOperationErrorCode: ke,
1741
- setOperationErrorDescription: we,
1742
- setOperationErrorName: ye,
1743
- setOperationErrorTemplate: Ue,
1744
- setOperationName: $e,
1745
- setOperationReducer: Je,
1746
- setOperationSchema: ze,
1747
- setOperationTemplate: qe,
1748
- setStateSchema: Ze,
1749
- updateChangeLogItem: De,
1750
- updateOperationExample: Ve,
1751
- updateStateExample: rt
1752
- }, Symbol.toStringTag, { value: "Module" })), ot = ae, st = { ...O, ..._t }, at = { ...ft, ...Ft }, Ht = {
1753
- Document: ot,
1754
- reducer: S,
1755
- actions: at,
1756
- utils: st,
1804
+ setModuleDescription: Pe,
1805
+ setModuleName: Le,
1806
+ setOperationDescription: Je,
1807
+ setOperationErrorCode: ye,
1808
+ setOperationErrorDescription: Ue,
1809
+ setOperationErrorName: we,
1810
+ setOperationErrorTemplate: ve,
1811
+ setOperationName: ze,
1812
+ setOperationReducer: Qe,
1813
+ setOperationSchema: qe,
1814
+ setOperationScope: Be,
1815
+ setOperationTemplate: Ke,
1816
+ setStateSchema: tt,
1817
+ updateChangeLogItem: Ae,
1818
+ updateOperationExample: Xe,
1819
+ updateStateExample: nt
1820
+ }, Symbol.toStringTag, { value: "Module" })), at = ae, pt = { ...O, ...Tt }, lt = { ...It, ...Vt }, Xt = {
1821
+ Document: at,
1822
+ reducer: g,
1823
+ actions: lt,
1824
+ utils: pt,
1757
1825
  documentModel: le
1758
- }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1826
+ }, Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1759
1827
  __proto__: null,
1760
- Document: ot,
1828
+ Document: at,
1761
1829
  DocumentModel: ae,
1762
- actions: at,
1830
+ actions: lt,
1763
1831
  documentModel: le,
1764
- module: Ht,
1765
- reducer: S,
1766
- utils: st,
1832
+ module: Xt,
1833
+ reducer: g,
1834
+ utils: pt,
1767
1835
  z: Dt
1768
1836
  }, Symbol.toStringTag, { value: "Module" }));
1769
1837
  export {
1770
- Qt as D,
1838
+ Zt as D,
1771
1839
  ae as a,
1772
- ot as b,
1773
- at as c,
1840
+ at as b,
1841
+ lt as c,
1774
1842
  le as d,
1775
- Ht as m,
1776
- S as r,
1777
- st as u,
1843
+ Xt as m,
1844
+ g as r,
1845
+ pt as u,
1778
1846
  Dt as z
1779
1847
  };