document-model 1.0.19 → 1.0.20

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 (45) hide show
  1. package/dist/browser/document/actions/creators.d.ts +4 -4
  2. package/dist/browser/document/actions/index.d.ts +4 -4
  3. package/dist/browser/document/object.d.ts +119 -13
  4. package/dist/browser/document/schema/types.d.ts +5 -4
  5. package/dist/browser/document/schema/zod.d.ts +14 -12
  6. package/dist/browser/document/types.d.ts +2 -5
  7. package/dist/browser/document-model/gen/schema/zod.d.ts +5 -3
  8. package/dist/browser/document-model/index.d.ts +3 -3
  9. package/dist/browser/document-model.cjs +1 -1
  10. package/dist/browser/document-model.js +2 -2
  11. package/dist/browser/document.cjs +1 -1
  12. package/dist/browser/document.js +2 -2
  13. package/dist/browser/index.cjs +1 -1
  14. package/dist/browser/index.js +3 -3
  15. package/dist/browser/internal/{index-46b68530.js → index-22f88bf2.js} +361 -357
  16. package/dist/{node/internal/index-f235f9be.js → browser/internal/index-3607fd07.js} +1 -1
  17. package/dist/{node/internal/index-6477ee0a.js → browser/internal/index-79fde5f3.js} +1 -1
  18. package/dist/browser/internal/index-dda5d688.js +22 -0
  19. package/dist/browser/internal/object-32802eed.js +6 -0
  20. package/dist/browser/internal/{object-d50f7d2f.js → object-d03c84c9.js} +857 -819
  21. package/dist/node/document/actions/creators.d.ts +4 -4
  22. package/dist/node/document/actions/index.d.ts +4 -4
  23. package/dist/node/document/object.d.ts +119 -13
  24. package/dist/node/document/schema/types.d.ts +5 -4
  25. package/dist/node/document/schema/zod.d.ts +14 -12
  26. package/dist/node/document/types.d.ts +2 -5
  27. package/dist/node/document-model/gen/schema/zod.d.ts +5 -3
  28. package/dist/node/document-model/index.d.ts +3 -3
  29. package/dist/node/document-model.cjs +1 -1
  30. package/dist/node/document-model.js +2 -2
  31. package/dist/node/document.cjs +1 -1
  32. package/dist/node/document.js +2 -2
  33. package/dist/node/index.cjs +1 -1
  34. package/dist/node/index.js +3 -3
  35. package/dist/node/internal/{index-8d582c48.js → index-14279b3a.js} +361 -357
  36. package/dist/{browser/internal/index-869c5d0d.js → node/internal/index-4b25c8a5.js} +1 -1
  37. package/dist/node/internal/index-bfc402ef.js +22 -0
  38. package/dist/{browser/internal/index-2551382e.js → node/internal/index-e02d7854.js} +1 -1
  39. package/dist/node/internal/object-ac706c4a.js +1 -0
  40. package/dist/node/internal/{object-773231ca.js → object-b97efc1b.js} +399 -361
  41. package/package.json +1 -1
  42. package/dist/browser/internal/index-1ad32a2e.js +0 -22
  43. package/dist/browser/internal/object-1fdba77d.js +0 -6
  44. package/dist/node/internal/index-631ba7bf.js +0 -22
  45. package/dist/node/internal/object-08bd169a.js +0 -1
@@ -1,14 +1,14 @@
1
- var dt = Object.defineProperty;
2
- var ut = (t, e, o) => e in t ? dt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
- var le = (t, e, o) => (ut(t, typeof e != "symbol" ? e + "" : e, o), o);
4
- import { c as mt, i as Et, a as ht, b as Ot, s as gt, d as St, l as bt, e as ft, f as s, B as l, g as _t, h as It } from "./object-d50f7d2f.js";
1
+ var ut = Object.defineProperty;
2
+ var mt = (t, e, o) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
+ var ce = (t, e, o) => (mt(t, typeof e != "symbol" ? e + "" : e, o), o);
4
+ import { c as Et, i as ht, a as Ot, b as gt, s as St, d as bt, l as ft, e as _t, f as s, B as l, g as It, h as Tt } from "./object-d03c84c9.js";
5
5
  import "json-stringify-deterministic";
6
6
  import "immer";
7
7
  import "jszip";
8
8
  import { z as r } from "zod";
9
- const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9
+ const Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10
10
  __proto__: null
11
- }, Symbol.toStringTag, { value: "Module" })), ce = {
11
+ }, Symbol.toStringTag, { value: "Module" })), de = {
12
12
  id: "powerhouse/document-model",
13
13
  name: "DocumentModel",
14
14
  extension: "phdm",
@@ -569,8 +569,8 @@ const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
569
569
  }
570
570
  }
571
571
  ]
572
- }, de = (t) => t != null, Rt = r.any().refine((t) => de(t));
573
- function f() {
572
+ }, ue = (t) => t != null, At = r.any().refine((t) => ue(t));
573
+ function _() {
574
574
  return r.object({
575
575
  __typename: r.literal("AddChangeLogItemInput").optional(),
576
576
  content: r.string(),
@@ -578,14 +578,14 @@ function f() {
578
578
  insertBefore: r.string().nullable()
579
579
  });
580
580
  }
581
- function _() {
581
+ function I() {
582
582
  return r.object({
583
583
  description: r.string().nullish(),
584
584
  id: r.string(),
585
585
  name: r.string()
586
586
  });
587
587
  }
588
- function I() {
588
+ function T() {
589
589
  return r.object({
590
590
  errorCode: r.string().nullish(),
591
591
  errorDescription: r.string().nullish(),
@@ -595,14 +595,14 @@ function I() {
595
595
  operationId: r.string()
596
596
  });
597
597
  }
598
- function T() {
598
+ function R() {
599
599
  return r.object({
600
600
  example: r.string(),
601
601
  id: r.string(),
602
602
  operationId: r.string()
603
603
  });
604
604
  }
605
- function R() {
605
+ function A() {
606
606
  return r.object({
607
607
  description: r.string().nullish(),
608
608
  id: r.string(),
@@ -611,10 +611,10 @@ function R() {
611
611
  reducer: r.string().nullish(),
612
612
  schema: r.string().nullish(),
613
613
  template: r.string().nullish(),
614
- scope: r.literal("local").or(r.literal("global")).nullish()
614
+ scope: b().nullish()
615
615
  });
616
616
  }
617
- function A() {
617
+ function x() {
618
618
  return r.object({
619
619
  scope: r.string(),
620
620
  example: r.string(),
@@ -622,28 +622,23 @@ function A() {
622
622
  insertBefore: r.string().nullish()
623
623
  });
624
624
  }
625
- function ue() {
625
+ function me() {
626
626
  return r.object({
627
627
  __typename: r.literal("Author").optional(),
628
628
  name: r.string(),
629
629
  website: r.string().nullable()
630
630
  });
631
631
  }
632
- function x() {
632
+ function D() {
633
633
  return r.object({
634
634
  __typename: r.literal("CodeExample").optional(),
635
635
  id: r.string(),
636
636
  value: r.string()
637
637
  });
638
638
  }
639
- function D() {
640
- return r.object({
641
- __typename: r.literal("DeleteChangeLogItemInput").optional(),
642
- id: r.string()
643
- });
644
- }
645
639
  function M() {
646
640
  return r.object({
641
+ __typename: r.literal("DeleteChangeLogItemInput").optional(),
647
642
  id: r.string()
648
643
  });
649
644
  }
@@ -663,20 +658,27 @@ function P() {
663
658
  });
664
659
  }
665
660
  function j() {
661
+ return r.object({
662
+ id: r.string()
663
+ });
664
+ }
665
+ function C() {
666
666
  return r.object({
667
667
  scope: r.string(),
668
668
  id: r.string()
669
669
  });
670
670
  }
671
- function At() {
671
+ function b() {
672
+ return r.literal("global").or(r.literal("local"));
673
+ }
674
+ function xt() {
672
675
  return r.union([
673
- f(),
674
676
  _(),
675
677
  I(),
676
678
  T(),
677
679
  R(),
678
680
  A(),
679
- D(),
681
+ x(),
680
682
  M(),
681
683
  N(),
682
684
  L(),
@@ -710,59 +712,60 @@ function At() {
710
712
  ne(),
711
713
  ie(),
712
714
  se(),
713
- ae()
715
+ ae(),
716
+ pe()
714
717
  ]);
715
718
  }
716
- function xt() {
719
+ function Dt() {
717
720
  return r.object({
718
721
  __typename: r.literal("DocumentModelState").optional(),
719
- author: ue(),
722
+ author: me(),
720
723
  description: r.string(),
721
724
  extension: r.string(),
722
725
  id: r.string(),
723
726
  name: r.string(),
724
- specifications: r.array(me())
727
+ specifications: r.array(Ee())
725
728
  });
726
729
  }
727
- function me() {
730
+ function Ee() {
728
731
  return r.object({
729
732
  __typename: r.literal("DocumentSpecification").optional(),
730
733
  changeLog: r.array(r.string()),
731
- modules: r.array(Ee()),
732
- state: Se(),
734
+ modules: r.array(he()),
735
+ state: be(),
733
736
  version: r.number()
734
737
  });
735
738
  }
736
- function Ee() {
739
+ function he() {
737
740
  return r.object({
738
741
  __typename: r.literal("Module").optional(),
739
742
  description: r.string().nullable(),
740
743
  id: r.string(),
741
744
  name: r.string(),
742
- operations: r.array(he())
745
+ operations: r.array(Oe())
743
746
  });
744
747
  }
745
- function C() {
748
+ function k() {
746
749
  return r.object({
747
750
  newModuleId: r.string(),
748
751
  operationId: r.string()
749
752
  });
750
753
  }
751
- function he() {
754
+ function Oe() {
752
755
  return r.object({
753
756
  __typename: r.literal("Operation").optional(),
754
757
  description: r.string().nullable(),
755
- errors: r.array(Oe()),
756
- examples: r.array(x()),
758
+ errors: r.array(ge()),
759
+ examples: r.array(D()),
757
760
  id: r.string(),
758
761
  name: r.string().nullable(),
759
762
  reducer: r.string().nullable(),
760
763
  schema: r.string().nullable(),
761
764
  template: r.string().nullable(),
762
- scope: r.literal("local").or(r.literal("global"))
765
+ scope: b()
763
766
  });
764
767
  }
765
- function Oe() {
768
+ function ge() {
766
769
  return r.object({
767
770
  __typename: r.literal("OperationError").optional(),
768
771
  code: r.string().nullable(),
@@ -772,245 +775,246 @@ function Oe() {
772
775
  template: r.string().nullable()
773
776
  });
774
777
  }
775
- function k() {
778
+ function y() {
776
779
  return r.object({
777
780
  __typename: r.literal("ReorderChangeLogItemsInput").optional(),
778
781
  order: r.array(r.string())
779
782
  });
780
783
  }
781
- function y() {
784
+ function w() {
782
785
  return r.object({
783
786
  moduleId: r.string(),
784
787
  order: r.array(r.string())
785
788
  });
786
789
  }
787
- function w() {
790
+ function v() {
788
791
  return r.object({
789
792
  order: r.array(r.string())
790
793
  });
791
794
  }
792
- function v() {
795
+ function U() {
793
796
  return r.object({
794
797
  operationId: r.string(),
795
798
  order: r.array(r.string())
796
799
  });
797
800
  }
798
- function U() {
801
+ function V() {
799
802
  return r.object({
800
803
  operationId: r.string(),
801
804
  order: r.array(r.string())
802
805
  });
803
806
  }
804
- function V() {
807
+ function F() {
805
808
  return r.object({
806
809
  scope: r.string(),
807
810
  order: r.array(r.string())
808
811
  });
809
812
  }
810
- function F() {
813
+ function H() {
811
814
  return r.object({
812
815
  authorName: r.string()
813
816
  });
814
817
  }
815
- function H() {
818
+ function X() {
816
819
  return r.object({
817
820
  authorWebsite: r.string()
818
821
  });
819
822
  }
820
- function X() {
823
+ function G() {
821
824
  return r.object({
822
825
  scope: r.string(),
823
826
  initialValue: r.string()
824
827
  });
825
828
  }
826
- function G() {
829
+ function $() {
827
830
  return r.object({
828
831
  description: r.string()
829
832
  });
830
833
  }
831
- function $() {
834
+ function W() {
832
835
  return r.object({
833
836
  extension: r.string()
834
837
  });
835
838
  }
836
- function W() {
839
+ function z() {
837
840
  return r.object({
838
841
  id: r.string()
839
842
  });
840
843
  }
841
- function z() {
844
+ function B() {
842
845
  return r.object({
843
846
  name: r.string()
844
847
  });
845
848
  }
846
- function B() {
849
+ function q() {
847
850
  return r.object({
848
851
  description: r.string().nullish(),
849
852
  id: r.string()
850
853
  });
851
854
  }
852
- function q() {
855
+ function J() {
853
856
  return r.object({
854
857
  id: r.string(),
855
858
  name: r.string().nullish()
856
859
  });
857
860
  }
858
- function J() {
861
+ function K() {
859
862
  return r.object({
860
863
  description: r.string().nullish(),
861
864
  id: r.string()
862
865
  });
863
866
  }
864
- function K() {
867
+ function Q() {
865
868
  return r.object({
866
869
  errorCode: r.string().nullish(),
867
870
  id: r.string()
868
871
  });
869
872
  }
870
- function Q() {
873
+ function Y() {
871
874
  return r.object({
872
875
  errorDescription: r.string().nullish(),
873
876
  id: r.string()
874
877
  });
875
878
  }
876
- function Y() {
879
+ function Z() {
877
880
  return r.object({
878
881
  errorName: r.string().nullish(),
879
882
  id: r.string()
880
883
  });
881
884
  }
882
- function Z() {
885
+ function ee() {
883
886
  return r.object({
884
887
  errorTemplate: r.string().nullish(),
885
888
  id: r.string()
886
889
  });
887
890
  }
888
- function ee() {
891
+ function te() {
889
892
  return r.object({
890
893
  id: r.string(),
891
894
  name: r.string().nullish()
892
895
  });
893
896
  }
894
- function ge() {
897
+ function Se() {
895
898
  return r.object({
896
899
  id: r.string(),
897
- scope: r.literal("global").or(r.literal("local"))
900
+ scope: b()
898
901
  });
899
902
  }
900
- function te() {
903
+ function re() {
901
904
  return r.object({
902
905
  id: r.string(),
903
906
  reducer: r.string().nullish()
904
907
  });
905
908
  }
906
- function re() {
909
+ function oe() {
907
910
  return r.object({
908
911
  id: r.string(),
909
912
  schema: r.string().nullish()
910
913
  });
911
914
  }
912
- function oe() {
915
+ function ne() {
913
916
  return r.object({
914
917
  id: r.string(),
915
918
  template: r.string().nullish()
916
919
  });
917
920
  }
918
- function ne() {
921
+ function ie() {
919
922
  return r.object({
920
923
  scope: r.string(),
921
924
  schema: r.string()
922
925
  });
923
926
  }
924
- function b() {
927
+ function f() {
925
928
  return r.object({
926
929
  __typename: r.literal("State").optional(),
927
- examples: r.array(x()),
930
+ examples: r.array(D()),
928
931
  initialValue: r.string(),
929
932
  schema: r.string()
930
933
  });
931
934
  }
932
- function Se() {
935
+ function be() {
933
936
  return r.object({
934
- global: b(),
935
- local: b()
937
+ global: f(),
938
+ local: f()
936
939
  });
937
940
  }
938
- function ie() {
941
+ function se() {
939
942
  return r.object({
940
943
  __typename: r.literal("UpdateChangeLogItemInput").optional(),
941
944
  id: r.string(),
942
945
  newContent: r.string()
943
946
  });
944
947
  }
945
- function se() {
948
+ function ae() {
946
949
  return r.object({
947
950
  example: r.string(),
948
951
  id: r.string()
949
952
  });
950
953
  }
951
- function ae() {
954
+ function pe() {
952
955
  return r.object({
953
956
  scope: r.string(),
954
957
  id: r.string(),
955
958
  newExample: r.string()
956
959
  });
957
960
  }
958
- const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
961
+ const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
959
962
  __proto__: null,
960
- AddChangeLogItemInputSchema: f,
961
- AddModuleInputSchema: _,
962
- AddOperationErrorInputSchema: I,
963
- AddOperationExampleInputSchema: T,
964
- AddOperationInputSchema: R,
965
- AddStateExampleInputSchema: A,
966
- AuthorSchema: ue,
967
- CodeExampleSchema: x,
968
- DeleteChangeLogItemInputSchema: D,
969
- DeleteModuleInputSchema: M,
970
- DeleteOperationErrorInputSchema: N,
971
- DeleteOperationExampleInputSchema: L,
972
- DeleteOperationInputSchema: P,
973
- DeleteStateExampleInputSchema: j,
974
- DocumentModelInputSchema: At,
975
- DocumentModelStateSchema: xt,
976
- DocumentSpecificationSchema: me,
977
- ModuleSchema: Ee,
978
- MoveOperationInputSchema: C,
979
- OperationErrorSchema: Oe,
980
- OperationSchema: he,
981
- ReorderChangeLogItemsInputSchema: k,
982
- ReorderModuleOperationsInputSchema: y,
983
- ReorderModulesInputSchema: w,
984
- ReorderOperationErrorsInputSchema: v,
985
- ReorderOperationExamplesInputSchema: U,
986
- ReorderStateExamplesInputSchema: V,
987
- ScopeStateSchema: Se,
988
- SetAuthorNameInputSchema: F,
989
- SetAuthorWebsiteInputSchema: H,
990
- SetInitialStateInputSchema: X,
991
- SetModelDescriptionInputSchema: G,
992
- SetModelExtensionInputSchema: $,
993
- SetModelIdInputSchema: W,
994
- SetModelNameInputSchema: z,
995
- SetModuleDescriptionInputSchema: B,
996
- SetModuleNameInputSchema: q,
997
- SetOperationDescriptionInputSchema: J,
998
- SetOperationErrorCodeInputSchema: K,
999
- SetOperationErrorDescriptionInputSchema: Q,
1000
- SetOperationErrorNameInputSchema: Y,
1001
- SetOperationErrorTemplateInputSchema: Z,
1002
- SetOperationNameInputSchema: ee,
1003
- SetOperationReducerInputSchema: te,
1004
- SetOperationSchemaInputSchema: re,
1005
- SetOperationScopeInputSchema: ge,
1006
- SetOperationTemplateInputSchema: oe,
1007
- SetStateSchemaInputSchema: ne,
1008
- StateSchema: b,
1009
- UpdateChangeLogItemInputSchema: ie,
1010
- UpdateOperationExampleInputSchema: se,
1011
- UpdateStateExampleInputSchema: ae,
1012
- definedNonNullAnySchema: Rt,
1013
- isDefinedNonNullAny: de
963
+ AddChangeLogItemInputSchema: _,
964
+ AddModuleInputSchema: I,
965
+ AddOperationErrorInputSchema: T,
966
+ AddOperationExampleInputSchema: R,
967
+ AddOperationInputSchema: A,
968
+ AddStateExampleInputSchema: x,
969
+ AuthorSchema: me,
970
+ CodeExampleSchema: D,
971
+ DeleteChangeLogItemInputSchema: M,
972
+ DeleteModuleInputSchema: N,
973
+ DeleteOperationErrorInputSchema: L,
974
+ DeleteOperationExampleInputSchema: P,
975
+ DeleteOperationInputSchema: j,
976
+ DeleteStateExampleInputSchema: C,
977
+ DocumentModelInputSchema: xt,
978
+ DocumentModelStateSchema: Dt,
979
+ DocumentSpecificationSchema: Ee,
980
+ ModuleSchema: he,
981
+ MoveOperationInputSchema: k,
982
+ OperationErrorSchema: ge,
983
+ OperationSchema: Oe,
984
+ OperationScopeSchema: b,
985
+ ReorderChangeLogItemsInputSchema: y,
986
+ ReorderModuleOperationsInputSchema: w,
987
+ ReorderModulesInputSchema: v,
988
+ ReorderOperationErrorsInputSchema: U,
989
+ ReorderOperationExamplesInputSchema: V,
990
+ ReorderStateExamplesInputSchema: F,
991
+ ScopeStateSchema: be,
992
+ SetAuthorNameInputSchema: H,
993
+ SetAuthorWebsiteInputSchema: X,
994
+ SetInitialStateInputSchema: G,
995
+ SetModelDescriptionInputSchema: $,
996
+ SetModelExtensionInputSchema: W,
997
+ SetModelIdInputSchema: z,
998
+ SetModelNameInputSchema: B,
999
+ SetModuleDescriptionInputSchema: q,
1000
+ SetModuleNameInputSchema: J,
1001
+ SetOperationDescriptionInputSchema: K,
1002
+ SetOperationErrorCodeInputSchema: Q,
1003
+ SetOperationErrorDescriptionInputSchema: Y,
1004
+ SetOperationErrorNameInputSchema: Z,
1005
+ SetOperationErrorTemplateInputSchema: ee,
1006
+ SetOperationNameInputSchema: te,
1007
+ SetOperationReducerInputSchema: re,
1008
+ SetOperationSchemaInputSchema: oe,
1009
+ SetOperationScopeInputSchema: Se,
1010
+ SetOperationTemplateInputSchema: ne,
1011
+ SetStateSchemaInputSchema: ie,
1012
+ StateSchema: f,
1013
+ UpdateChangeLogItemInputSchema: se,
1014
+ UpdateOperationExampleInputSchema: ae,
1015
+ UpdateStateExampleInputSchema: pe,
1016
+ definedNonNullAnySchema: At,
1017
+ isDefinedNonNullAny: ue
1014
1018
  }, Symbol.toStringTag, { value: "Module" })), d = {
1015
1019
  setModelNameOperation(t, e) {
1016
1020
  t.name = e.input.name;
@@ -1046,7 +1050,7 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1046
1050
  releaseNewVersionOperation(t, e) {
1047
1051
  throw new Error('Reducer "releaseNewVersionOperation" not yet implemented');
1048
1052
  }
1049
- }, Mt = (t) => {
1053
+ }, Nt = (t) => {
1050
1054
  const e = {};
1051
1055
  return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1052
1056
  }, h = {
@@ -1075,9 +1079,9 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1075
1079
  );
1076
1080
  },
1077
1081
  reorderModulesOperation(t, e) {
1078
- t.specifications[t.specifications.length - 1].modules.sort(Mt(e.input.order));
1082
+ t.specifications[t.specifications.length - 1].modules.sort(Nt(e.input.order));
1079
1083
  }
1080
- }, Nt = (t) => {
1084
+ }, Lt = (t) => {
1081
1085
  const e = {};
1082
1086
  return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1083
1087
  }, c = {
@@ -1132,10 +1136,10 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1132
1136
  for (let n = 0; n < o.modules.length; n++)
1133
1137
  for (let i = 0; i < o.modules[n].operations.length; i++)
1134
1138
  o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].errors.sort(
1135
- Nt(e.input.order)
1139
+ Lt(e.input.order)
1136
1140
  );
1137
1141
  }
1138
- }, Lt = (t) => {
1142
+ }, Pt = (t) => {
1139
1143
  const e = {};
1140
1144
  return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1141
1145
  }, S = {
@@ -1168,10 +1172,10 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1168
1172
  for (let n = 0; n < o.modules.length; n++)
1169
1173
  for (let i = 0; i < o.modules[n].operations.length; i++)
1170
1174
  o.modules[n].operations[i].id == e.input.operationId && o.modules[n].operations[i].examples.sort(
1171
- Lt(e.input.order)
1175
+ Pt(e.input.order)
1172
1176
  );
1173
1177
  }
1174
- }, Pt = (t) => {
1178
+ }, jt = (t) => {
1175
1179
  const e = {};
1176
1180
  return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1177
1181
  }, p = {
@@ -1242,10 +1246,10 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1242
1246
  const o = t.specifications[t.specifications.length - 1];
1243
1247
  for (let n = 0; n < o.modules.length; n++)
1244
1248
  o.modules[n].id == e.input.moduleId && o.modules[n].operations.sort(
1245
- Pt(e.input.order)
1249
+ jt(e.input.order)
1246
1250
  );
1247
1251
  }
1248
- }, jt = (t) => {
1252
+ }, Ct = (t) => {
1249
1253
  const e = {};
1250
1254
  return t.forEach((o, n) => e[o] = n), (o, n) => (e[n.id] || 999999) - (e[o.id] || 999999);
1251
1255
  }, u = {
@@ -1291,49 +1295,49 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1291
1295
  reorderStateExamplesOperation(t, e) {
1292
1296
  const o = t.specifications[t.specifications.length - 1];
1293
1297
  if (Object.keys(o.state).includes(e.input.scope))
1294
- o.state[e.input.scope].examples.sort(jt(e.input.order));
1298
+ o.state[e.input.scope].examples.sort(Ct(e.input.order));
1295
1299
  else
1296
1300
  throw new Error(`Invalid scope: ${e.input.scope}`);
1297
1301
  }
1298
- }, Ct = (t, e) => {
1299
- if (Et(e))
1302
+ }, kt = (t, e) => {
1303
+ if (ht(e))
1300
1304
  return t;
1301
1305
  switch (e.type) {
1302
1306
  case "SET_MODEL_NAME":
1303
- z().parse(e.input), d.setModelNameOperation(t.global, e);
1307
+ B().parse(e.input), d.setModelNameOperation(t.global, e);
1304
1308
  break;
1305
1309
  case "SET_MODEL_ID":
1306
- W().parse(e.input), d.setModelIdOperation(t.global, e);
1310
+ z().parse(e.input), d.setModelIdOperation(t.global, e);
1307
1311
  break;
1308
1312
  case "SET_MODEL_EXTENSION":
1309
- $().parse(e.input), d.setModelExtensionOperation(t.global, e);
1313
+ W().parse(e.input), d.setModelExtensionOperation(t.global, e);
1310
1314
  break;
1311
1315
  case "SET_MODEL_DESCRIPTION":
1312
- G().parse(e.input), d.setModelDescriptionOperation(t.global, e);
1316
+ $().parse(e.input), d.setModelDescriptionOperation(t.global, e);
1313
1317
  break;
1314
1318
  case "SET_AUTHOR_NAME":
1315
- F().parse(e.input), d.setAuthorNameOperation(t.global, e);
1319
+ H().parse(e.input), d.setAuthorNameOperation(t.global, e);
1316
1320
  break;
1317
1321
  case "SET_AUTHOR_WEBSITE":
1318
- H().parse(e.input), d.setAuthorWebsiteOperation(t.global, e);
1322
+ X().parse(e.input), d.setAuthorWebsiteOperation(t.global, e);
1319
1323
  break;
1320
1324
  case "ADD_CHANGE_LOG_ITEM":
1321
- f().parse(e.input), E.addChangeLogItemOperation(t.global, e);
1325
+ _().parse(e.input), E.addChangeLogItemOperation(t.global, e);
1322
1326
  break;
1323
1327
  case "UPDATE_CHANGE_LOG_ITEM":
1324
- ie().parse(e.input), E.updateChangeLogItemOperation(
1328
+ se().parse(e.input), E.updateChangeLogItemOperation(
1325
1329
  t.global,
1326
1330
  e
1327
1331
  );
1328
1332
  break;
1329
1333
  case "DELETE_CHANGE_LOG_ITEM":
1330
- D().parse(e.input), E.deleteChangeLogItemOperation(
1334
+ M().parse(e.input), E.deleteChangeLogItemOperation(
1331
1335
  t.global,
1332
1336
  e
1333
1337
  );
1334
1338
  break;
1335
1339
  case "REORDER_CHANGE_LOG_ITEMS":
1336
- k().parse(e.input), E.reorderChangeLogItemsOperation(
1340
+ y().parse(e.input), E.reorderChangeLogItemsOperation(
1337
1341
  t.global,
1338
1342
  e
1339
1343
  );
@@ -1346,147 +1350,147 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1346
1350
  E.releaseNewVersionOperation(t.global, e);
1347
1351
  break;
1348
1352
  case "ADD_MODULE":
1349
- _().parse(e.input), h.addModuleOperation(t.global, e);
1353
+ I().parse(e.input), h.addModuleOperation(t.global, e);
1350
1354
  break;
1351
1355
  case "SET_MODULE_NAME":
1352
- q().parse(e.input), h.setModuleNameOperation(t.global, e);
1356
+ J().parse(e.input), h.setModuleNameOperation(t.global, e);
1353
1357
  break;
1354
1358
  case "SET_MODULE_DESCRIPTION":
1355
- B().parse(e.input), h.setModuleDescriptionOperation(t.global, e);
1359
+ q().parse(e.input), h.setModuleDescriptionOperation(t.global, e);
1356
1360
  break;
1357
1361
  case "DELETE_MODULE":
1358
- M().parse(e.input), h.deleteModuleOperation(t.global, e);
1362
+ N().parse(e.input), h.deleteModuleOperation(t.global, e);
1359
1363
  break;
1360
1364
  case "REORDER_MODULES":
1361
- w().parse(e.input), h.reorderModulesOperation(t.global, e);
1365
+ v().parse(e.input), h.reorderModulesOperation(t.global, e);
1362
1366
  break;
1363
1367
  case "ADD_OPERATION_ERROR":
1364
- I().parse(e.input), c.addOperationErrorOperation(
1368
+ T().parse(e.input), c.addOperationErrorOperation(
1365
1369
  t.global,
1366
1370
  e
1367
1371
  );
1368
1372
  break;
1369
1373
  case "SET_OPERATION_ERROR_CODE":
1370
- K().parse(e.input), c.setOperationErrorCodeOperation(
1374
+ Q().parse(e.input), c.setOperationErrorCodeOperation(
1371
1375
  t.global,
1372
1376
  e
1373
1377
  );
1374
1378
  break;
1375
1379
  case "SET_OPERATION_ERROR_NAME":
1376
- Y().parse(e.input), c.setOperationErrorNameOperation(
1380
+ Z().parse(e.input), c.setOperationErrorNameOperation(
1377
1381
  t.global,
1378
1382
  e
1379
1383
  );
1380
1384
  break;
1381
1385
  case "SET_OPERATION_ERROR_DESCRIPTION":
1382
- Q().parse(e.input), c.setOperationErrorDescriptionOperation(
1386
+ Y().parse(e.input), c.setOperationErrorDescriptionOperation(
1383
1387
  t.global,
1384
1388
  e
1385
1389
  );
1386
1390
  break;
1387
1391
  case "SET_OPERATION_ERROR_TEMPLATE":
1388
- Z().parse(e.input), c.setOperationErrorTemplateOperation(
1392
+ ee().parse(e.input), c.setOperationErrorTemplateOperation(
1389
1393
  t.global,
1390
1394
  e
1391
1395
  );
1392
1396
  break;
1393
1397
  case "DELETE_OPERATION_ERROR":
1394
- N().parse(e.input), c.deleteOperationErrorOperation(
1398
+ L().parse(e.input), c.deleteOperationErrorOperation(
1395
1399
  t.global,
1396
1400
  e
1397
1401
  );
1398
1402
  break;
1399
1403
  case "REORDER_OPERATION_ERRORS":
1400
- v().parse(e.input), c.reorderOperationErrorsOperation(
1404
+ U().parse(e.input), c.reorderOperationErrorsOperation(
1401
1405
  t.global,
1402
1406
  e
1403
1407
  );
1404
1408
  break;
1405
1409
  case "ADD_OPERATION_EXAMPLE":
1406
- T().parse(e.input), S.addOperationExampleOperation(
1410
+ R().parse(e.input), S.addOperationExampleOperation(
1407
1411
  t.global,
1408
1412
  e
1409
1413
  );
1410
1414
  break;
1411
1415
  case "UPDATE_OPERATION_EXAMPLE":
1412
- se().parse(e.input), S.updateOperationExampleOperation(
1416
+ ae().parse(e.input), S.updateOperationExampleOperation(
1413
1417
  t.global,
1414
1418
  e
1415
1419
  );
1416
1420
  break;
1417
1421
  case "DELETE_OPERATION_EXAMPLE":
1418
- L().parse(e.input), S.deleteOperationExampleOperation(
1422
+ P().parse(e.input), S.deleteOperationExampleOperation(
1419
1423
  t.global,
1420
1424
  e
1421
1425
  );
1422
1426
  break;
1423
1427
  case "REORDER_OPERATION_EXAMPLES":
1424
- U().parse(e.input), S.reorderOperationExamplesOperation(
1428
+ V().parse(e.input), S.reorderOperationExamplesOperation(
1425
1429
  t.global,
1426
1430
  e
1427
1431
  );
1428
1432
  break;
1429
1433
  case "ADD_OPERATION":
1430
- R().parse(e.input), p.addOperationOperation(t.global, e);
1434
+ A().parse(e.input), p.addOperationOperation(t.global, e);
1431
1435
  break;
1432
1436
  case "SET_OPERATION_NAME":
1433
- ee().parse(e.input), p.setOperationNameOperation(t.global, e);
1437
+ te().parse(e.input), p.setOperationNameOperation(t.global, e);
1434
1438
  break;
1435
1439
  case "SET_OPERATION_SCOPE":
1436
- ge().parse(e.input), p.setOperationScopeOperation(t.global, e);
1440
+ Se().parse(e.input), p.setOperationScopeOperation(t.global, e);
1437
1441
  break;
1438
1442
  case "SET_OPERATION_SCHEMA":
1439
- re().parse(e.input), p.setOperationSchemaOperation(t.global, e);
1443
+ oe().parse(e.input), p.setOperationSchemaOperation(t.global, e);
1440
1444
  break;
1441
1445
  case "SET_OPERATION_DESCRIPTION":
1442
- J().parse(e.input), p.setOperationDescriptionOperation(
1446
+ K().parse(e.input), p.setOperationDescriptionOperation(
1443
1447
  t.global,
1444
1448
  e
1445
1449
  );
1446
1450
  break;
1447
1451
  case "SET_OPERATION_TEMPLATE":
1448
- oe().parse(e.input), p.setOperationTemplateOperation(
1452
+ ne().parse(e.input), p.setOperationTemplateOperation(
1449
1453
  t.global,
1450
1454
  e
1451
1455
  );
1452
1456
  break;
1453
1457
  case "SET_OPERATION_REDUCER":
1454
- te().parse(e.input), p.setOperationReducerOperation(t.global, e);
1458
+ re().parse(e.input), p.setOperationReducerOperation(t.global, e);
1455
1459
  break;
1456
1460
  case "MOVE_OPERATION":
1457
- C().parse(e.input), p.moveOperationOperation(t.global, e);
1461
+ k().parse(e.input), p.moveOperationOperation(t.global, e);
1458
1462
  break;
1459
1463
  case "DELETE_OPERATION":
1460
- P().parse(e.input), p.deleteOperationOperation(t.global, e);
1464
+ j().parse(e.input), p.deleteOperationOperation(t.global, e);
1461
1465
  break;
1462
1466
  case "REORDER_MODULE_OPERATIONS":
1463
- y().parse(e.input), p.reorderModuleOperationsOperation(
1467
+ w().parse(e.input), p.reorderModuleOperationsOperation(
1464
1468
  t.global,
1465
1469
  e
1466
1470
  );
1467
1471
  break;
1468
1472
  case "SET_STATE_SCHEMA":
1469
- ne().parse(e.input), u.setStateSchemaOperation(t.global, e);
1473
+ ie().parse(e.input), u.setStateSchemaOperation(t.global, e);
1470
1474
  break;
1471
1475
  case "SET_INITIAL_STATE":
1472
- X().parse(e.input), u.setInitialStateOperation(t.global, e);
1476
+ G().parse(e.input), u.setInitialStateOperation(t.global, e);
1473
1477
  break;
1474
1478
  case "ADD_STATE_EXAMPLE":
1475
- A().parse(e.input), u.addStateExampleOperation(t.global, e);
1479
+ x().parse(e.input), u.addStateExampleOperation(t.global, e);
1476
1480
  break;
1477
1481
  case "UPDATE_STATE_EXAMPLE":
1478
- ae().parse(e.input), u.updateStateExampleOperation(t.global, e);
1482
+ pe().parse(e.input), u.updateStateExampleOperation(t.global, e);
1479
1483
  break;
1480
1484
  case "DELETE_STATE_EXAMPLE":
1481
- j().parse(e.input), u.deleteStateExampleOperation(t.global, e);
1485
+ C().parse(e.input), u.deleteStateExampleOperation(t.global, e);
1482
1486
  break;
1483
1487
  case "REORDER_STATE_EXAMPLES":
1484
- V().parse(e.input), u.reorderStateExamplesOperation(t.global, e);
1488
+ F().parse(e.input), u.reorderStateExamplesOperation(t.global, e);
1485
1489
  break;
1486
1490
  default:
1487
1491
  return t;
1488
1492
  }
1489
- }, g = mt(Ct), kt = {
1493
+ }, g = Et(kt), yt = {
1490
1494
  id: "",
1491
1495
  name: "",
1492
1496
  extension: "",
@@ -1514,316 +1518,316 @@ const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1514
1518
  modules: []
1515
1519
  }
1516
1520
  ]
1517
- }, yt = {}, O = {
1521
+ }, wt = {}, O = {
1518
1522
  fileExtension: "phdm",
1519
1523
  createState(t) {
1520
1524
  return {
1521
- global: { ...kt, ...t == null ? void 0 : t.global },
1522
- local: { ...yt, ...t == null ? void 0 : t.local }
1525
+ global: { ...yt, ...t == null ? void 0 : t.global },
1526
+ local: { ...wt, ...t == null ? void 0 : t.local }
1523
1527
  };
1524
1528
  },
1525
1529
  createExtendedState(t) {
1526
- return ht(
1530
+ return Ot(
1527
1531
  { ...t, documentType: "powerhouse/document-model" },
1528
1532
  O.createState
1529
1533
  );
1530
1534
  },
1531
1535
  createDocument(t) {
1532
- return Ot(
1536
+ return gt(
1533
1537
  O.createExtendedState(t),
1534
1538
  O.createState
1535
1539
  );
1536
1540
  },
1537
1541
  saveToFile(t, e, o) {
1538
- return gt(t, e, "phdm", o);
1542
+ return St(t, e, "phdm", o);
1539
1543
  },
1540
1544
  saveToFileHandle(t, e) {
1541
- return St(t, e);
1545
+ return bt(t, e);
1542
1546
  },
1543
1547
  loadFromFile(t) {
1544
- return bt(t, g);
1548
+ return ft(t, g);
1545
1549
  },
1546
1550
  loadFromInput(t) {
1547
- return ft(t, g);
1551
+ return _t(t, g);
1548
1552
  }
1549
- }, be = (t) => s(
1553
+ }, fe = (t) => s(
1550
1554
  "SET_MODEL_NAME",
1551
1555
  { ...t }
1552
- ), fe = (t) => s(
1556
+ ), _e = (t) => s(
1553
1557
  "SET_MODEL_ID",
1554
1558
  { ...t }
1555
- ), _e = (t) => s(
1559
+ ), Ie = (t) => s(
1556
1560
  "SET_MODEL_EXTENSION",
1557
1561
  { ...t }
1558
- ), Ie = (t) => s(
1562
+ ), Te = (t) => s(
1559
1563
  "SET_MODEL_DESCRIPTION",
1560
1564
  { ...t }
1561
- ), Te = (t) => s(
1565
+ ), Re = (t) => s(
1562
1566
  "SET_AUTHOR_NAME",
1563
1567
  { ...t }
1564
- ), Re = (t) => s(
1568
+ ), Ae = (t) => s(
1565
1569
  "SET_AUTHOR_WEBSITE",
1566
1570
  { ...t }
1567
1571
  );
1568
- class wt extends l {
1572
+ class vt extends l {
1569
1573
  setModelName(e) {
1570
- return this.dispatch(be(e));
1574
+ return this.dispatch(fe(e));
1571
1575
  }
1572
1576
  setModelId(e) {
1573
- return this.dispatch(fe(e));
1577
+ return this.dispatch(_e(e));
1574
1578
  }
1575
1579
  setModelExtension(e) {
1576
- return this.dispatch(_e(e));
1580
+ return this.dispatch(Ie(e));
1577
1581
  }
1578
1582
  setModelDescription(e) {
1579
- return this.dispatch(Ie(e));
1583
+ return this.dispatch(Te(e));
1580
1584
  }
1581
1585
  setAuthorName(e) {
1582
- return this.dispatch(Te(e));
1586
+ return this.dispatch(Re(e));
1583
1587
  }
1584
1588
  setAuthorWebsite(e) {
1585
- return this.dispatch(Re(e));
1589
+ return this.dispatch(Ae(e));
1586
1590
  }
1587
1591
  }
1588
- const Ae = (t) => s(
1592
+ const xe = (t) => s(
1589
1593
  "ADD_CHANGE_LOG_ITEM",
1590
1594
  { ...t }
1591
- ), xe = (t) => s(
1595
+ ), De = (t) => s(
1592
1596
  "UPDATE_CHANGE_LOG_ITEM",
1593
1597
  { ...t }
1594
- ), De = (t) => s(
1598
+ ), Me = (t) => s(
1595
1599
  "DELETE_CHANGE_LOG_ITEM",
1596
1600
  { ...t }
1597
- ), Me = (t) => s(
1601
+ ), Ne = (t) => s(
1598
1602
  "REORDER_CHANGE_LOG_ITEMS",
1599
1603
  { ...t }
1600
- ), Ne = () => s("RELEASE_NEW_VERSION");
1601
- class vt extends l {
1604
+ ), Le = () => s("RELEASE_NEW_VERSION");
1605
+ class Ut extends l {
1602
1606
  addChangeLogItem(e) {
1603
- return this.dispatch(Ae(e));
1607
+ return this.dispatch(xe(e));
1604
1608
  }
1605
1609
  updateChangeLogItem(e) {
1606
- return this.dispatch(xe(e));
1610
+ return this.dispatch(De(e));
1607
1611
  }
1608
1612
  deleteChangeLogItem(e) {
1609
- return this.dispatch(De(e));
1613
+ return this.dispatch(Me(e));
1610
1614
  }
1611
1615
  reorderChangeLogItems(e) {
1612
- return this.dispatch(Me(e));
1616
+ return this.dispatch(Ne(e));
1613
1617
  }
1614
1618
  releaseNewVersion() {
1615
- return this.dispatch(Ne());
1619
+ return this.dispatch(Le());
1616
1620
  }
1617
1621
  }
1618
- const Le = (t) => s(
1622
+ const Pe = (t) => s(
1619
1623
  "ADD_MODULE",
1620
1624
  { ...t }
1621
- ), Pe = (t) => s(
1625
+ ), je = (t) => s(
1622
1626
  "SET_MODULE_NAME",
1623
1627
  { ...t }
1624
- ), je = (t) => s(
1628
+ ), Ce = (t) => s(
1625
1629
  "SET_MODULE_DESCRIPTION",
1626
1630
  { ...t }
1627
- ), Ce = (t) => s(
1631
+ ), ke = (t) => s(
1628
1632
  "DELETE_MODULE",
1629
1633
  { ...t }
1630
- ), ke = (t) => s(
1634
+ ), ye = (t) => s(
1631
1635
  "REORDER_MODULES",
1632
1636
  { ...t }
1633
1637
  );
1634
- class Ut extends l {
1638
+ class Vt extends l {
1635
1639
  addModule(e) {
1636
- return this.dispatch(Le(e));
1640
+ return this.dispatch(Pe(e));
1637
1641
  }
1638
1642
  setModuleName(e) {
1639
- return this.dispatch(Pe(e));
1643
+ return this.dispatch(je(e));
1640
1644
  }
1641
1645
  setModuleDescription(e) {
1642
- return this.dispatch(je(e));
1646
+ return this.dispatch(Ce(e));
1643
1647
  }
1644
1648
  deleteModule(e) {
1645
- return this.dispatch(Ce(e));
1649
+ return this.dispatch(ke(e));
1646
1650
  }
1647
1651
  reorderModules(e) {
1648
- return this.dispatch(ke(e));
1652
+ return this.dispatch(ye(e));
1649
1653
  }
1650
1654
  }
1651
- const ye = (t) => s(
1655
+ const we = (t) => s(
1652
1656
  "ADD_OPERATION_ERROR",
1653
1657
  { ...t }
1654
- ), we = (t) => s(
1658
+ ), ve = (t) => s(
1655
1659
  "SET_OPERATION_ERROR_CODE",
1656
1660
  { ...t }
1657
- ), ve = (t) => s(
1661
+ ), Ue = (t) => s(
1658
1662
  "SET_OPERATION_ERROR_NAME",
1659
1663
  { ...t }
1660
- ), Ue = (t) => s(
1664
+ ), Ve = (t) => s(
1661
1665
  "SET_OPERATION_ERROR_DESCRIPTION",
1662
1666
  { ...t }
1663
- ), Ve = (t) => s(
1667
+ ), Fe = (t) => s(
1664
1668
  "SET_OPERATION_ERROR_TEMPLATE",
1665
1669
  { ...t }
1666
- ), Fe = (t) => s(
1670
+ ), He = (t) => s(
1667
1671
  "DELETE_OPERATION_ERROR",
1668
1672
  { ...t }
1669
- ), He = (t) => s(
1673
+ ), Xe = (t) => s(
1670
1674
  "REORDER_OPERATION_ERRORS",
1671
1675
  { ...t }
1672
1676
  );
1673
- class Vt extends l {
1677
+ class Ft extends l {
1674
1678
  addOperationError(e) {
1675
- return this.dispatch(ye(e));
1679
+ return this.dispatch(we(e));
1676
1680
  }
1677
1681
  setOperationErrorCode(e) {
1678
- return this.dispatch(we(e));
1682
+ return this.dispatch(ve(e));
1679
1683
  }
1680
1684
  setOperationErrorName(e) {
1681
- return this.dispatch(ve(e));
1685
+ return this.dispatch(Ue(e));
1682
1686
  }
1683
1687
  setOperationErrorDescription(e) {
1684
- return this.dispatch(Ue(e));
1688
+ return this.dispatch(Ve(e));
1685
1689
  }
1686
1690
  setOperationErrorTemplate(e) {
1687
- return this.dispatch(Ve(e));
1691
+ return this.dispatch(Fe(e));
1688
1692
  }
1689
1693
  deleteOperationError(e) {
1690
- return this.dispatch(Fe(e));
1694
+ return this.dispatch(He(e));
1691
1695
  }
1692
1696
  reorderOperationErrors(e) {
1693
- return this.dispatch(He(e));
1697
+ return this.dispatch(Xe(e));
1694
1698
  }
1695
1699
  }
1696
- const Xe = (t) => s(
1700
+ const Ge = (t) => s(
1697
1701
  "ADD_OPERATION_EXAMPLE",
1698
1702
  { ...t }
1699
- ), Ge = (t) => s(
1703
+ ), $e = (t) => s(
1700
1704
  "UPDATE_OPERATION_EXAMPLE",
1701
1705
  { ...t }
1702
- ), $e = (t) => s(
1706
+ ), We = (t) => s(
1703
1707
  "DELETE_OPERATION_EXAMPLE",
1704
1708
  { ...t }
1705
- ), We = (t) => s(
1709
+ ), ze = (t) => s(
1706
1710
  "REORDER_OPERATION_EXAMPLES",
1707
1711
  { ...t }
1708
1712
  );
1709
- class Ft extends l {
1713
+ class Ht extends l {
1710
1714
  addOperationExample(e) {
1711
- return this.dispatch(Xe(e));
1715
+ return this.dispatch(Ge(e));
1712
1716
  }
1713
1717
  updateOperationExample(e) {
1714
- return this.dispatch(Ge(e));
1718
+ return this.dispatch($e(e));
1715
1719
  }
1716
1720
  deleteOperationExample(e) {
1717
- return this.dispatch($e(e));
1721
+ return this.dispatch(We(e));
1718
1722
  }
1719
1723
  reorderOperationExamples(e) {
1720
- return this.dispatch(We(e));
1724
+ return this.dispatch(ze(e));
1721
1725
  }
1722
1726
  }
1723
- const ze = (t) => s(
1727
+ const Be = (t) => s(
1724
1728
  "ADD_OPERATION",
1725
1729
  { ...t }
1726
- ), Be = (t) => s(
1730
+ ), qe = (t) => s(
1727
1731
  "SET_OPERATION_NAME",
1728
1732
  { ...t }
1729
- ), qe = (t) => s(
1733
+ ), Je = (t) => s(
1730
1734
  "SET_OPERATION_SCOPE",
1731
1735
  { ...t }
1732
- ), Je = (t) => s(
1736
+ ), Ke = (t) => s(
1733
1737
  "SET_OPERATION_SCHEMA",
1734
1738
  { ...t }
1735
- ), Ke = (t) => s(
1739
+ ), Qe = (t) => s(
1736
1740
  "SET_OPERATION_DESCRIPTION",
1737
1741
  { ...t }
1738
- ), Qe = (t) => s(
1742
+ ), Ye = (t) => s(
1739
1743
  "SET_OPERATION_TEMPLATE",
1740
1744
  { ...t }
1741
- ), Ye = (t) => s(
1745
+ ), Ze = (t) => s(
1742
1746
  "SET_OPERATION_REDUCER",
1743
1747
  { ...t }
1744
- ), Ze = (t) => s(
1748
+ ), et = (t) => s(
1745
1749
  "MOVE_OPERATION",
1746
1750
  { ...t }
1747
- ), et = (t) => s(
1751
+ ), tt = (t) => s(
1748
1752
  "DELETE_OPERATION",
1749
1753
  { ...t }
1750
- ), tt = (t) => s(
1754
+ ), rt = (t) => s(
1751
1755
  "REORDER_MODULE_OPERATIONS",
1752
1756
  { ...t }
1753
1757
  );
1754
- class Ht extends l {
1758
+ class Xt extends l {
1755
1759
  addOperation(e) {
1756
- return this.dispatch(ze(e));
1760
+ return this.dispatch(Be(e));
1757
1761
  }
1758
1762
  setOperationName(e) {
1759
- return this.dispatch(Be(e));
1763
+ return this.dispatch(qe(e));
1760
1764
  }
1761
1765
  setOperationScope(e) {
1762
- return this.dispatch(qe(e));
1766
+ return this.dispatch(Je(e));
1763
1767
  }
1764
1768
  setOperationSchema(e) {
1765
- return this.dispatch(Je(e));
1769
+ return this.dispatch(Ke(e));
1766
1770
  }
1767
1771
  setOperationDescription(e) {
1768
- return this.dispatch(Ke(e));
1772
+ return this.dispatch(Qe(e));
1769
1773
  }
1770
1774
  setOperationTemplate(e) {
1771
- return this.dispatch(Qe(e));
1775
+ return this.dispatch(Ye(e));
1772
1776
  }
1773
1777
  setOperationReducer(e) {
1774
- return this.dispatch(Ye(e));
1778
+ return this.dispatch(Ze(e));
1775
1779
  }
1776
1780
  moveOperation(e) {
1777
- return this.dispatch(Ze(e));
1781
+ return this.dispatch(et(e));
1778
1782
  }
1779
1783
  deleteOperation(e) {
1780
- return this.dispatch(et(e));
1784
+ return this.dispatch(tt(e));
1781
1785
  }
1782
1786
  reorderModuleOperations(e) {
1783
- return this.dispatch(tt(e));
1787
+ return this.dispatch(rt(e));
1784
1788
  }
1785
1789
  }
1786
- const rt = (t) => s(
1790
+ const ot = (t) => s(
1787
1791
  "SET_STATE_SCHEMA",
1788
1792
  { ...t }
1789
- ), ot = (t) => s(
1793
+ ), nt = (t) => s(
1790
1794
  "SET_INITIAL_STATE",
1791
1795
  { ...t }
1792
- ), nt = (t) => s(
1796
+ ), it = (t) => s(
1793
1797
  "ADD_STATE_EXAMPLE",
1794
1798
  { ...t }
1795
- ), it = (t) => s(
1799
+ ), st = (t) => s(
1796
1800
  "UPDATE_STATE_EXAMPLE",
1797
1801
  { ...t }
1798
- ), st = (t) => s(
1802
+ ), at = (t) => s(
1799
1803
  "DELETE_STATE_EXAMPLE",
1800
1804
  { ...t }
1801
- ), at = (t) => s(
1805
+ ), pt = (t) => s(
1802
1806
  "REORDER_STATE_EXAMPLES",
1803
1807
  { ...t }
1804
1808
  );
1805
- class Xt extends l {
1809
+ class Gt extends l {
1806
1810
  setStateSchema(e) {
1807
- return this.dispatch(rt(e));
1811
+ return this.dispatch(ot(e));
1808
1812
  }
1809
1813
  setInitialState(e) {
1810
- return this.dispatch(ot(e));
1814
+ return this.dispatch(nt(e));
1811
1815
  }
1812
1816
  addStateExample(e) {
1813
- return this.dispatch(nt(e));
1817
+ return this.dispatch(it(e));
1814
1818
  }
1815
1819
  updateStateExample(e) {
1816
- return this.dispatch(it(e));
1820
+ return this.dispatch(st(e));
1817
1821
  }
1818
1822
  deleteStateExample(e) {
1819
- return this.dispatch(st(e));
1823
+ return this.dispatch(at(e));
1820
1824
  }
1821
1825
  reorderStateExamples(e) {
1822
- return this.dispatch(at(e));
1826
+ return this.dispatch(pt(e));
1823
1827
  }
1824
1828
  }
1825
1829
  var m;
1826
- let pe = (m = class extends l {
1830
+ let le = (m = class extends l {
1827
1831
  constructor(e, o) {
1828
1832
  super(g, O.createDocument(e), o);
1829
1833
  }
@@ -1837,86 +1841,86 @@ let pe = (m = class extends l {
1837
1841
  const o = new this();
1838
1842
  return await o.loadFromFile(e), o;
1839
1843
  }
1840
- }, le(m, "fileExtension", "phdm"), m);
1841
- _t(pe, [
1842
- wt,
1844
+ }, ce(m, "fileExtension", "phdm"), m);
1845
+ It(le, [
1843
1846
  vt,
1844
1847
  Ut,
1845
1848
  Vt,
1846
1849
  Ft,
1847
1850
  Ht,
1848
- Xt
1851
+ Xt,
1852
+ Gt
1849
1853
  ]);
1850
- const Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1854
+ const $t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1851
1855
  __proto__: null,
1852
- addChangeLogItem: Ae,
1853
- addModule: Le,
1854
- addOperation: ze,
1855
- addOperationError: ye,
1856
- addOperationExample: Xe,
1857
- addStateExample: nt,
1858
- deleteChangeLogItem: De,
1859
- deleteModule: Ce,
1860
- deleteOperation: et,
1861
- deleteOperationError: Fe,
1862
- deleteOperationExample: $e,
1863
- deleteStateExample: st,
1864
- moveOperation: Ze,
1865
- releaseNewVersion: Ne,
1866
- reorderChangeLogItems: Me,
1867
- reorderModuleOperations: tt,
1868
- reorderModules: ke,
1869
- reorderOperationErrors: He,
1870
- reorderOperationExamples: We,
1871
- reorderStateExamples: at,
1872
- setAuthorName: Te,
1873
- setAuthorWebsite: Re,
1874
- setInitialState: ot,
1875
- setModelDescription: Ie,
1876
- setModelExtension: _e,
1877
- setModelId: fe,
1878
- setModelName: be,
1879
- setModuleDescription: je,
1880
- setModuleName: Pe,
1881
- setOperationDescription: Ke,
1882
- setOperationErrorCode: we,
1883
- setOperationErrorDescription: Ue,
1884
- setOperationErrorName: ve,
1885
- setOperationErrorTemplate: Ve,
1886
- setOperationName: Be,
1887
- setOperationReducer: Ye,
1888
- setOperationSchema: Je,
1889
- setOperationScope: qe,
1890
- setOperationTemplate: Qe,
1891
- setStateSchema: rt,
1892
- updateChangeLogItem: xe,
1893
- updateOperationExample: Ge,
1894
- updateStateExample: it
1895
- }, Symbol.toStringTag, { value: "Module" })), pt = pe, lt = { ...O, ...Tt }, ct = { ...It, ...Gt }, $t = {
1896
- Document: pt,
1856
+ addChangeLogItem: xe,
1857
+ addModule: Pe,
1858
+ addOperation: Be,
1859
+ addOperationError: we,
1860
+ addOperationExample: Ge,
1861
+ addStateExample: it,
1862
+ deleteChangeLogItem: Me,
1863
+ deleteModule: ke,
1864
+ deleteOperation: tt,
1865
+ deleteOperationError: He,
1866
+ deleteOperationExample: We,
1867
+ deleteStateExample: at,
1868
+ moveOperation: et,
1869
+ releaseNewVersion: Le,
1870
+ reorderChangeLogItems: Ne,
1871
+ reorderModuleOperations: rt,
1872
+ reorderModules: ye,
1873
+ reorderOperationErrors: Xe,
1874
+ reorderOperationExamples: ze,
1875
+ reorderStateExamples: pt,
1876
+ setAuthorName: Re,
1877
+ setAuthorWebsite: Ae,
1878
+ setInitialState: nt,
1879
+ setModelDescription: Te,
1880
+ setModelExtension: Ie,
1881
+ setModelId: _e,
1882
+ setModelName: fe,
1883
+ setModuleDescription: Ce,
1884
+ setModuleName: je,
1885
+ setOperationDescription: Qe,
1886
+ setOperationErrorCode: ve,
1887
+ setOperationErrorDescription: Ve,
1888
+ setOperationErrorName: Ue,
1889
+ setOperationErrorTemplate: Fe,
1890
+ setOperationName: qe,
1891
+ setOperationReducer: Ze,
1892
+ setOperationSchema: Ke,
1893
+ setOperationScope: Je,
1894
+ setOperationTemplate: Ye,
1895
+ setStateSchema: ot,
1896
+ updateChangeLogItem: De,
1897
+ updateOperationExample: $e,
1898
+ updateStateExample: st
1899
+ }, Symbol.toStringTag, { value: "Module" })), lt = le, ct = { ...O, ...Rt }, dt = { ...Tt, ...$t }, Wt = {
1900
+ Document: lt,
1897
1901
  reducer: g,
1898
- actions: ct,
1899
- utils: lt,
1900
- documentModel: ce
1901
- }, Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1902
+ actions: dt,
1903
+ utils: ct,
1904
+ documentModel: de
1905
+ }, Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1902
1906
  __proto__: null,
1903
- Document: pt,
1904
- DocumentModel: pe,
1905
- actions: ct,
1906
- documentModel: ce,
1907
- module: $t,
1907
+ Document: lt,
1908
+ DocumentModel: le,
1909
+ actions: dt,
1910
+ documentModel: de,
1911
+ module: Wt,
1908
1912
  reducer: g,
1909
- utils: lt,
1910
- z: Dt
1913
+ utils: ct,
1914
+ z: Mt
1911
1915
  }, Symbol.toStringTag, { value: "Module" }));
1912
1916
  export {
1913
- Qt as D,
1914
- pe as a,
1915
- pt as b,
1916
- ct as c,
1917
- ce as d,
1918
- $t as m,
1917
+ Yt as D,
1918
+ le as a,
1919
+ lt as b,
1920
+ dt as c,
1921
+ de as d,
1922
+ Wt as m,
1919
1923
  g as r,
1920
- lt as u,
1921
- Dt as z
1924
+ ct as u,
1925
+ Mt as z
1922
1926
  };