this repo has no description
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: due: (@) and priority (!!) ui and parser

+1885 -834
+802 -5
mast-react-vite/package-lock.json
··· 11 11 "@radix-ui/react-checkbox": "^1.1.2", 12 12 "@radix-ui/react-dialog": "^1.1.6", 13 13 "@radix-ui/react-icons": "^1.3.0", 14 + "@radix-ui/react-popover": "^1.1.14", 14 15 "@radix-ui/react-scroll-area": "^1.2.3", 15 16 "@radix-ui/react-separator": "^1.1.2", 16 - "@radix-ui/react-slot": "^1.1.2", 17 + "@radix-ui/react-slot": "^1.2.3", 17 18 "@radix-ui/react-toggle": "^1.1.2", 18 19 "@radix-ui/react-toggle-group": "^1.1.2", 19 20 "@radix-ui/react-tooltip": "^1.1.8", ··· 23 24 "@vlcn.io/ws-browserdb": "^0.2.0", 24 25 "class-variance-authority": "^0.7.1", 25 26 "clsx": "^2.1.1", 27 + "date-fns": "^3.6.0", 26 28 "lucide-react": "^0.454.0", 27 29 "motion": "^12.7.4", 28 30 "react": "^18.3.1", 31 + "react-day-picker": "^8.10.1", 29 32 "react-dom": "^18.3.1", 30 33 "react-helmet": "^6.1.0", 31 34 "react-modal-sheet": "^4.0.1", ··· 418 421 } 419 422 } 420 423 }, 424 + "node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-compose-refs": { 425 + "version": "1.1.1", 426 + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", 427 + "integrity": "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==", 428 + "license": "MIT", 429 + "peerDependencies": { 430 + "@types/react": "*", 431 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 432 + }, 433 + "peerDependenciesMeta": { 434 + "@types/react": { 435 + "optional": true 436 + } 437 + } 438 + }, 421 439 "node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-primitive": { 422 440 "version": "2.0.2", 423 441 "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz", ··· 436 454 "optional": true 437 455 }, 438 456 "@types/react-dom": { 457 + "optional": true 458 + } 459 + } 460 + }, 461 + "node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-slot": { 462 + "version": "1.1.2", 463 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 464 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 465 + "license": "MIT", 466 + "dependencies": { 467 + "@radix-ui/react-compose-refs": "1.1.1" 468 + }, 469 + "peerDependencies": { 470 + "@types/react": "*", 471 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 472 + }, 473 + "peerDependenciesMeta": { 474 + "@types/react": { 439 475 "optional": true 440 476 } 441 477 } ··· 530 566 } 531 567 } 532 568 }, 569 + "node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot": { 570 + "version": "1.1.2", 571 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 572 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 573 + "license": "MIT", 574 + "dependencies": { 575 + "@radix-ui/react-compose-refs": "1.1.1" 576 + }, 577 + "peerDependencies": { 578 + "@types/react": "*", 579 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 580 + }, 581 + "peerDependenciesMeta": { 582 + "@types/react": { 583 + "optional": true 584 + } 585 + } 586 + }, 533 587 "node_modules/@radix-ui/react-compose-refs": { 534 588 "version": "1.1.0", 535 589 "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", ··· 657 711 } 658 712 } 659 713 }, 714 + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot": { 715 + "version": "1.1.2", 716 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 717 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 718 + "license": "MIT", 719 + "dependencies": { 720 + "@radix-ui/react-compose-refs": "1.1.1" 721 + }, 722 + "peerDependencies": { 723 + "@types/react": "*", 724 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 725 + }, 726 + "peerDependenciesMeta": { 727 + "@types/react": { 728 + "optional": true 729 + } 730 + } 731 + }, 660 732 "node_modules/@radix-ui/react-direction": { 661 733 "version": "1.1.0", 662 734 "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.0.tgz", ··· 738 810 } 739 811 } 740 812 }, 813 + "node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot": { 814 + "version": "1.1.2", 815 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 816 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 817 + "license": "MIT", 818 + "dependencies": { 819 + "@radix-ui/react-compose-refs": "1.1.1" 820 + }, 821 + "peerDependencies": { 822 + "@types/react": "*", 823 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 824 + }, 825 + "peerDependenciesMeta": { 826 + "@types/react": { 827 + "optional": true 828 + } 829 + } 830 + }, 741 831 "node_modules/@radix-ui/react-focus-guards": { 742 832 "version": "1.1.1", 743 833 "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.1.tgz", ··· 812 902 } 813 903 } 814 904 }, 905 + "node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-slot": { 906 + "version": "1.1.2", 907 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 908 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 909 + "license": "MIT", 910 + "dependencies": { 911 + "@radix-ui/react-compose-refs": "1.1.1" 912 + }, 913 + "peerDependencies": { 914 + "@types/react": "*", 915 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 916 + }, 917 + "peerDependenciesMeta": { 918 + "@types/react": { 919 + "optional": true 920 + } 921 + } 922 + }, 815 923 "node_modules/@radix-ui/react-icons": { 816 924 "version": "1.3.0", 817 925 "resolved": "https://registry.npmjs.org/@radix-ui/react-icons/-/react-icons-1.3.0.tgz", ··· 837 945 } 838 946 } 839 947 }, 948 + "node_modules/@radix-ui/react-popover": { 949 + "version": "1.1.14", 950 + "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.14.tgz", 951 + "integrity": "sha512-ODz16+1iIbGUfFEfKx2HTPKizg2MN39uIOV8MXeHnmdd3i/N9Wt7vU46wbHsqA0xoaQyXVcs0KIlBdOA2Y95bw==", 952 + "license": "MIT", 953 + "dependencies": { 954 + "@radix-ui/primitive": "1.1.2", 955 + "@radix-ui/react-compose-refs": "1.1.2", 956 + "@radix-ui/react-context": "1.1.2", 957 + "@radix-ui/react-dismissable-layer": "1.1.10", 958 + "@radix-ui/react-focus-guards": "1.1.2", 959 + "@radix-ui/react-focus-scope": "1.1.7", 960 + "@radix-ui/react-id": "1.1.1", 961 + "@radix-ui/react-popper": "1.2.7", 962 + "@radix-ui/react-portal": "1.1.9", 963 + "@radix-ui/react-presence": "1.1.4", 964 + "@radix-ui/react-primitive": "2.1.3", 965 + "@radix-ui/react-slot": "1.2.3", 966 + "@radix-ui/react-use-controllable-state": "1.2.2", 967 + "aria-hidden": "^1.2.4", 968 + "react-remove-scroll": "^2.6.3" 969 + }, 970 + "peerDependencies": { 971 + "@types/react": "*", 972 + "@types/react-dom": "*", 973 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", 974 + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 975 + }, 976 + "peerDependenciesMeta": { 977 + "@types/react": { 978 + "optional": true 979 + }, 980 + "@types/react-dom": { 981 + "optional": true 982 + } 983 + } 984 + }, 985 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/primitive": { 986 + "version": "1.1.2", 987 + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.2.tgz", 988 + "integrity": "sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA==", 989 + "license": "MIT" 990 + }, 991 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-arrow": { 992 + "version": "1.1.7", 993 + "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.7.tgz", 994 + "integrity": "sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==", 995 + "license": "MIT", 996 + "dependencies": { 997 + "@radix-ui/react-primitive": "2.1.3" 998 + }, 999 + "peerDependencies": { 1000 + "@types/react": "*", 1001 + "@types/react-dom": "*", 1002 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", 1003 + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1004 + }, 1005 + "peerDependenciesMeta": { 1006 + "@types/react": { 1007 + "optional": true 1008 + }, 1009 + "@types/react-dom": { 1010 + "optional": true 1011 + } 1012 + } 1013 + }, 1014 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-compose-refs": { 1015 + "version": "1.1.2", 1016 + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", 1017 + "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==", 1018 + "license": "MIT", 1019 + "peerDependencies": { 1020 + "@types/react": "*", 1021 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1022 + }, 1023 + "peerDependenciesMeta": { 1024 + "@types/react": { 1025 + "optional": true 1026 + } 1027 + } 1028 + }, 1029 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-context": { 1030 + "version": "1.1.2", 1031 + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz", 1032 + "integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==", 1033 + "license": "MIT", 1034 + "peerDependencies": { 1035 + "@types/react": "*", 1036 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1037 + }, 1038 + "peerDependenciesMeta": { 1039 + "@types/react": { 1040 + "optional": true 1041 + } 1042 + } 1043 + }, 1044 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer": { 1045 + "version": "1.1.10", 1046 + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.10.tgz", 1047 + "integrity": "sha512-IM1zzRV4W3HtVgftdQiiOmA0AdJlCtMLe00FXaHwgt3rAnNsIyDqshvkIW3hj/iu5hu8ERP7KIYki6NkqDxAwQ==", 1048 + "license": "MIT", 1049 + "dependencies": { 1050 + "@radix-ui/primitive": "1.1.2", 1051 + "@radix-ui/react-compose-refs": "1.1.2", 1052 + "@radix-ui/react-primitive": "2.1.3", 1053 + "@radix-ui/react-use-callback-ref": "1.1.1", 1054 + "@radix-ui/react-use-escape-keydown": "1.1.1" 1055 + }, 1056 + "peerDependencies": { 1057 + "@types/react": "*", 1058 + "@types/react-dom": "*", 1059 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", 1060 + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1061 + }, 1062 + "peerDependenciesMeta": { 1063 + "@types/react": { 1064 + "optional": true 1065 + }, 1066 + "@types/react-dom": { 1067 + "optional": true 1068 + } 1069 + } 1070 + }, 1071 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-guards": { 1072 + "version": "1.1.2", 1073 + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.2.tgz", 1074 + "integrity": "sha512-fyjAACV62oPV925xFCrH8DR5xWhg9KYtJT4s3u54jxp+L/hbpTY2kIeEFFbFe+a/HCE94zGQMZLIpVTPVZDhaA==", 1075 + "license": "MIT", 1076 + "peerDependencies": { 1077 + "@types/react": "*", 1078 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1079 + }, 1080 + "peerDependenciesMeta": { 1081 + "@types/react": { 1082 + "optional": true 1083 + } 1084 + } 1085 + }, 1086 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-scope": { 1087 + "version": "1.1.7", 1088 + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.7.tgz", 1089 + "integrity": "sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==", 1090 + "license": "MIT", 1091 + "dependencies": { 1092 + "@radix-ui/react-compose-refs": "1.1.2", 1093 + "@radix-ui/react-primitive": "2.1.3", 1094 + "@radix-ui/react-use-callback-ref": "1.1.1" 1095 + }, 1096 + "peerDependencies": { 1097 + "@types/react": "*", 1098 + "@types/react-dom": "*", 1099 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", 1100 + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1101 + }, 1102 + "peerDependenciesMeta": { 1103 + "@types/react": { 1104 + "optional": true 1105 + }, 1106 + "@types/react-dom": { 1107 + "optional": true 1108 + } 1109 + } 1110 + }, 1111 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-id": { 1112 + "version": "1.1.1", 1113 + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.1.tgz", 1114 + "integrity": "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==", 1115 + "license": "MIT", 1116 + "dependencies": { 1117 + "@radix-ui/react-use-layout-effect": "1.1.1" 1118 + }, 1119 + "peerDependencies": { 1120 + "@types/react": "*", 1121 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1122 + }, 1123 + "peerDependenciesMeta": { 1124 + "@types/react": { 1125 + "optional": true 1126 + } 1127 + } 1128 + }, 1129 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper": { 1130 + "version": "1.2.7", 1131 + "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.7.tgz", 1132 + "integrity": "sha512-IUFAccz1JyKcf/RjB552PlWwxjeCJB8/4KxT7EhBHOJM+mN7LdW+B3kacJXILm32xawcMMjb2i0cIZpo+f9kiQ==", 1133 + "license": "MIT", 1134 + "dependencies": { 1135 + "@floating-ui/react-dom": "^2.0.0", 1136 + "@radix-ui/react-arrow": "1.1.7", 1137 + "@radix-ui/react-compose-refs": "1.1.2", 1138 + "@radix-ui/react-context": "1.1.2", 1139 + "@radix-ui/react-primitive": "2.1.3", 1140 + "@radix-ui/react-use-callback-ref": "1.1.1", 1141 + "@radix-ui/react-use-layout-effect": "1.1.1", 1142 + "@radix-ui/react-use-rect": "1.1.1", 1143 + "@radix-ui/react-use-size": "1.1.1", 1144 + "@radix-ui/rect": "1.1.1" 1145 + }, 1146 + "peerDependencies": { 1147 + "@types/react": "*", 1148 + "@types/react-dom": "*", 1149 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", 1150 + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1151 + }, 1152 + "peerDependenciesMeta": { 1153 + "@types/react": { 1154 + "optional": true 1155 + }, 1156 + "@types/react-dom": { 1157 + "optional": true 1158 + } 1159 + } 1160 + }, 1161 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal": { 1162 + "version": "1.1.9", 1163 + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.9.tgz", 1164 + "integrity": "sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==", 1165 + "license": "MIT", 1166 + "dependencies": { 1167 + "@radix-ui/react-primitive": "2.1.3", 1168 + "@radix-ui/react-use-layout-effect": "1.1.1" 1169 + }, 1170 + "peerDependencies": { 1171 + "@types/react": "*", 1172 + "@types/react-dom": "*", 1173 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", 1174 + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1175 + }, 1176 + "peerDependenciesMeta": { 1177 + "@types/react": { 1178 + "optional": true 1179 + }, 1180 + "@types/react-dom": { 1181 + "optional": true 1182 + } 1183 + } 1184 + }, 1185 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence": { 1186 + "version": "1.1.4", 1187 + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.4.tgz", 1188 + "integrity": "sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA==", 1189 + "license": "MIT", 1190 + "dependencies": { 1191 + "@radix-ui/react-compose-refs": "1.1.2", 1192 + "@radix-ui/react-use-layout-effect": "1.1.1" 1193 + }, 1194 + "peerDependencies": { 1195 + "@types/react": "*", 1196 + "@types/react-dom": "*", 1197 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", 1198 + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1199 + }, 1200 + "peerDependenciesMeta": { 1201 + "@types/react": { 1202 + "optional": true 1203 + }, 1204 + "@types/react-dom": { 1205 + "optional": true 1206 + } 1207 + } 1208 + }, 1209 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-primitive": { 1210 + "version": "2.1.3", 1211 + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz", 1212 + "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==", 1213 + "license": "MIT", 1214 + "dependencies": { 1215 + "@radix-ui/react-slot": "1.2.3" 1216 + }, 1217 + "peerDependencies": { 1218 + "@types/react": "*", 1219 + "@types/react-dom": "*", 1220 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", 1221 + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1222 + }, 1223 + "peerDependenciesMeta": { 1224 + "@types/react": { 1225 + "optional": true 1226 + }, 1227 + "@types/react-dom": { 1228 + "optional": true 1229 + } 1230 + } 1231 + }, 1232 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-callback-ref": { 1233 + "version": "1.1.1", 1234 + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz", 1235 + "integrity": "sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==", 1236 + "license": "MIT", 1237 + "peerDependencies": { 1238 + "@types/react": "*", 1239 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1240 + }, 1241 + "peerDependenciesMeta": { 1242 + "@types/react": { 1243 + "optional": true 1244 + } 1245 + } 1246 + }, 1247 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-controllable-state": { 1248 + "version": "1.2.2", 1249 + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz", 1250 + "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==", 1251 + "license": "MIT", 1252 + "dependencies": { 1253 + "@radix-ui/react-use-effect-event": "0.0.2", 1254 + "@radix-ui/react-use-layout-effect": "1.1.1" 1255 + }, 1256 + "peerDependencies": { 1257 + "@types/react": "*", 1258 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1259 + }, 1260 + "peerDependenciesMeta": { 1261 + "@types/react": { 1262 + "optional": true 1263 + } 1264 + } 1265 + }, 1266 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-escape-keydown": { 1267 + "version": "1.1.1", 1268 + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.1.tgz", 1269 + "integrity": "sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==", 1270 + "license": "MIT", 1271 + "dependencies": { 1272 + "@radix-ui/react-use-callback-ref": "1.1.1" 1273 + }, 1274 + "peerDependencies": { 1275 + "@types/react": "*", 1276 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1277 + }, 1278 + "peerDependenciesMeta": { 1279 + "@types/react": { 1280 + "optional": true 1281 + } 1282 + } 1283 + }, 1284 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-layout-effect": { 1285 + "version": "1.1.1", 1286 + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz", 1287 + "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==", 1288 + "license": "MIT", 1289 + "peerDependencies": { 1290 + "@types/react": "*", 1291 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1292 + }, 1293 + "peerDependenciesMeta": { 1294 + "@types/react": { 1295 + "optional": true 1296 + } 1297 + } 1298 + }, 1299 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-rect": { 1300 + "version": "1.1.1", 1301 + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.1.tgz", 1302 + "integrity": "sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==", 1303 + "license": "MIT", 1304 + "dependencies": { 1305 + "@radix-ui/rect": "1.1.1" 1306 + }, 1307 + "peerDependencies": { 1308 + "@types/react": "*", 1309 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1310 + }, 1311 + "peerDependenciesMeta": { 1312 + "@types/react": { 1313 + "optional": true 1314 + } 1315 + } 1316 + }, 1317 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-size": { 1318 + "version": "1.1.1", 1319 + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz", 1320 + "integrity": "sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==", 1321 + "license": "MIT", 1322 + "dependencies": { 1323 + "@radix-ui/react-use-layout-effect": "1.1.1" 1324 + }, 1325 + "peerDependencies": { 1326 + "@types/react": "*", 1327 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1328 + }, 1329 + "peerDependenciesMeta": { 1330 + "@types/react": { 1331 + "optional": true 1332 + } 1333 + } 1334 + }, 1335 + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/rect": { 1336 + "version": "1.1.1", 1337 + "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.1.tgz", 1338 + "integrity": "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==", 1339 + "license": "MIT" 1340 + }, 840 1341 "node_modules/@radix-ui/react-popper": { 841 1342 "version": "1.2.2", 842 1343 "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.2.tgz", ··· 904 1405 } 905 1406 } 906 1407 }, 1408 + "node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-slot": { 1409 + "version": "1.1.2", 1410 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 1411 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 1412 + "license": "MIT", 1413 + "dependencies": { 1414 + "@radix-ui/react-compose-refs": "1.1.1" 1415 + }, 1416 + "peerDependencies": { 1417 + "@types/react": "*", 1418 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1419 + }, 1420 + "peerDependenciesMeta": { 1421 + "@types/react": { 1422 + "optional": true 1423 + } 1424 + } 1425 + }, 907 1426 "node_modules/@radix-ui/react-portal": { 908 1427 "version": "1.1.4", 909 1428 "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.4.tgz", ··· 927 1446 } 928 1447 } 929 1448 }, 1449 + "node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-compose-refs": { 1450 + "version": "1.1.1", 1451 + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", 1452 + "integrity": "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==", 1453 + "license": "MIT", 1454 + "peerDependencies": { 1455 + "@types/react": "*", 1456 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1457 + }, 1458 + "peerDependenciesMeta": { 1459 + "@types/react": { 1460 + "optional": true 1461 + } 1462 + } 1463 + }, 930 1464 "node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive": { 931 1465 "version": "2.0.2", 932 1466 "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz", ··· 945 1479 "optional": true 946 1480 }, 947 1481 "@types/react-dom": { 1482 + "optional": true 1483 + } 1484 + } 1485 + }, 1486 + "node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot": { 1487 + "version": "1.1.2", 1488 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 1489 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 1490 + "license": "MIT", 1491 + "dependencies": { 1492 + "@radix-ui/react-compose-refs": "1.1.1" 1493 + }, 1494 + "peerDependencies": { 1495 + "@types/react": "*", 1496 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1497 + }, 1498 + "peerDependenciesMeta": { 1499 + "@types/react": { 948 1500 "optional": true 949 1501 } 950 1502 } ··· 1082 1634 } 1083 1635 } 1084 1636 }, 1637 + "node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-slot": { 1638 + "version": "1.1.2", 1639 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 1640 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 1641 + "license": "MIT", 1642 + "dependencies": { 1643 + "@radix-ui/react-compose-refs": "1.1.1" 1644 + }, 1645 + "peerDependencies": { 1646 + "@types/react": "*", 1647 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1648 + }, 1649 + "peerDependenciesMeta": { 1650 + "@types/react": { 1651 + "optional": true 1652 + } 1653 + } 1654 + }, 1085 1655 "node_modules/@radix-ui/react-scroll-area": { 1086 1656 "version": "1.2.3", 1087 1657 "resolved": "https://registry.npmjs.org/@radix-ui/react-scroll-area/-/react-scroll-area-1.2.3.tgz", ··· 1176 1746 } 1177 1747 } 1178 1748 }, 1749 + "node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-slot": { 1750 + "version": "1.1.2", 1751 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 1752 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 1753 + "license": "MIT", 1754 + "dependencies": { 1755 + "@radix-ui/react-compose-refs": "1.1.1" 1756 + }, 1757 + "peerDependencies": { 1758 + "@types/react": "*", 1759 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1760 + }, 1761 + "peerDependenciesMeta": { 1762 + "@types/react": { 1763 + "optional": true 1764 + } 1765 + } 1766 + }, 1179 1767 "node_modules/@radix-ui/react-separator": { 1180 1768 "version": "1.1.2", 1181 1769 "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.2.tgz", ··· 1198 1786 } 1199 1787 } 1200 1788 }, 1789 + "node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-compose-refs": { 1790 + "version": "1.1.1", 1791 + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", 1792 + "integrity": "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==", 1793 + "license": "MIT", 1794 + "peerDependencies": { 1795 + "@types/react": "*", 1796 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1797 + }, 1798 + "peerDependenciesMeta": { 1799 + "@types/react": { 1800 + "optional": true 1801 + } 1802 + } 1803 + }, 1201 1804 "node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive": { 1202 1805 "version": "2.0.2", 1203 1806 "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz", ··· 1220 1823 } 1221 1824 } 1222 1825 }, 1223 - "node_modules/@radix-ui/react-slot": { 1826 + "node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-slot": { 1224 1827 "version": "1.1.2", 1225 1828 "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 1226 1829 "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 1830 + "license": "MIT", 1227 1831 "dependencies": { 1228 1832 "@radix-ui/react-compose-refs": "1.1.1" 1229 1833 }, ··· 1237 1841 } 1238 1842 } 1239 1843 }, 1844 + "node_modules/@radix-ui/react-slot": { 1845 + "version": "1.2.3", 1846 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", 1847 + "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", 1848 + "license": "MIT", 1849 + "dependencies": { 1850 + "@radix-ui/react-compose-refs": "1.1.2" 1851 + }, 1852 + "peerDependencies": { 1853 + "@types/react": "*", 1854 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1855 + }, 1856 + "peerDependenciesMeta": { 1857 + "@types/react": { 1858 + "optional": true 1859 + } 1860 + } 1861 + }, 1240 1862 "node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs": { 1241 - "version": "1.1.1", 1242 - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", 1243 - "integrity": "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==", 1863 + "version": "1.1.2", 1864 + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", 1865 + "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==", 1866 + "license": "MIT", 1244 1867 "peerDependencies": { 1245 1868 "@types/react": "*", 1246 1869 "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" ··· 1308 1931 "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.1.tgz", 1309 1932 "integrity": "sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==" 1310 1933 }, 1934 + "node_modules/@radix-ui/react-toggle-group/node_modules/@radix-ui/react-compose-refs": { 1935 + "version": "1.1.1", 1936 + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", 1937 + "integrity": "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==", 1938 + "license": "MIT", 1939 + "peerDependencies": { 1940 + "@types/react": "*", 1941 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1942 + }, 1943 + "peerDependenciesMeta": { 1944 + "@types/react": { 1945 + "optional": true 1946 + } 1947 + } 1948 + }, 1311 1949 "node_modules/@radix-ui/react-toggle-group/node_modules/@radix-ui/react-primitive": { 1312 1950 "version": "2.0.2", 1313 1951 "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz", ··· 1330 1968 } 1331 1969 } 1332 1970 }, 1971 + "node_modules/@radix-ui/react-toggle-group/node_modules/@radix-ui/react-slot": { 1972 + "version": "1.1.2", 1973 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 1974 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 1975 + "license": "MIT", 1976 + "dependencies": { 1977 + "@radix-ui/react-compose-refs": "1.1.1" 1978 + }, 1979 + "peerDependencies": { 1980 + "@types/react": "*", 1981 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 1982 + }, 1983 + "peerDependenciesMeta": { 1984 + "@types/react": { 1985 + "optional": true 1986 + } 1987 + } 1988 + }, 1333 1989 "node_modules/@radix-ui/react-toggle/node_modules/@radix-ui/primitive": { 1334 1990 "version": "1.1.1", 1335 1991 "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.1.tgz", 1336 1992 "integrity": "sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==" 1337 1993 }, 1994 + "node_modules/@radix-ui/react-toggle/node_modules/@radix-ui/react-compose-refs": { 1995 + "version": "1.1.1", 1996 + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", 1997 + "integrity": "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==", 1998 + "license": "MIT", 1999 + "peerDependencies": { 2000 + "@types/react": "*", 2001 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 2002 + }, 2003 + "peerDependenciesMeta": { 2004 + "@types/react": { 2005 + "optional": true 2006 + } 2007 + } 2008 + }, 1338 2009 "node_modules/@radix-ui/react-toggle/node_modules/@radix-ui/react-primitive": { 1339 2010 "version": "2.0.2", 1340 2011 "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz", ··· 1353 2024 "optional": true 1354 2025 }, 1355 2026 "@types/react-dom": { 2027 + "optional": true 2028 + } 2029 + } 2030 + }, 2031 + "node_modules/@radix-ui/react-toggle/node_modules/@radix-ui/react-slot": { 2032 + "version": "1.1.2", 2033 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 2034 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 2035 + "license": "MIT", 2036 + "dependencies": { 2037 + "@radix-ui/react-compose-refs": "1.1.1" 2038 + }, 2039 + "peerDependencies": { 2040 + "@types/react": "*", 2041 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 2042 + }, 2043 + "peerDependenciesMeta": { 2044 + "@types/react": { 1356 2045 "optional": true 1357 2046 } 1358 2047 } ··· 1454 2143 } 1455 2144 } 1456 2145 }, 2146 + "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot": { 2147 + "version": "1.1.2", 2148 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 2149 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 2150 + "license": "MIT", 2151 + "dependencies": { 2152 + "@radix-ui/react-compose-refs": "1.1.1" 2153 + }, 2154 + "peerDependencies": { 2155 + "@types/react": "*", 2156 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 2157 + }, 2158 + "peerDependenciesMeta": { 2159 + "@types/react": { 2160 + "optional": true 2161 + } 2162 + } 2163 + }, 1457 2164 "node_modules/@radix-ui/react-use-callback-ref": { 1458 2165 "version": "1.1.0", 1459 2166 "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", ··· 1485 2192 } 1486 2193 } 1487 2194 }, 2195 + "node_modules/@radix-ui/react-use-effect-event": { 2196 + "version": "0.0.2", 2197 + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz", 2198 + "integrity": "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==", 2199 + "license": "MIT", 2200 + "dependencies": { 2201 + "@radix-ui/react-use-layout-effect": "1.1.1" 2202 + }, 2203 + "peerDependencies": { 2204 + "@types/react": "*", 2205 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 2206 + }, 2207 + "peerDependenciesMeta": { 2208 + "@types/react": { 2209 + "optional": true 2210 + } 2211 + } 2212 + }, 2213 + "node_modules/@radix-ui/react-use-effect-event/node_modules/@radix-ui/react-use-layout-effect": { 2214 + "version": "1.1.1", 2215 + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz", 2216 + "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==", 2217 + "license": "MIT", 2218 + "peerDependencies": { 2219 + "@types/react": "*", 2220 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 2221 + }, 2222 + "peerDependenciesMeta": { 2223 + "@types/react": { 2224 + "optional": true 2225 + } 2226 + } 2227 + }, 1488 2228 "node_modules/@radix-ui/react-use-escape-keydown": { 1489 2229 "version": "1.1.0", 1490 2230 "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz", ··· 1586 2326 } 1587 2327 } 1588 2328 }, 2329 + "node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-compose-refs": { 2330 + "version": "1.1.1", 2331 + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", 2332 + "integrity": "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==", 2333 + "license": "MIT", 2334 + "peerDependencies": { 2335 + "@types/react": "*", 2336 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 2337 + }, 2338 + "peerDependenciesMeta": { 2339 + "@types/react": { 2340 + "optional": true 2341 + } 2342 + } 2343 + }, 1589 2344 "node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive": { 1590 2345 "version": "2.0.2", 1591 2346 "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz", ··· 1604 2359 "optional": true 1605 2360 }, 1606 2361 "@types/react-dom": { 2362 + "optional": true 2363 + } 2364 + } 2365 + }, 2366 + "node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot": { 2367 + "version": "1.1.2", 2368 + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz", 2369 + "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==", 2370 + "license": "MIT", 2371 + "dependencies": { 2372 + "@radix-ui/react-compose-refs": "1.1.1" 2373 + }, 2374 + "peerDependencies": { 2375 + "@types/react": "*", 2376 + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" 2377 + }, 2378 + "peerDependenciesMeta": { 2379 + "@types/react": { 1607 2380 "optional": true 1608 2381 } 1609 2382 } ··· 2503 3276 "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", 2504 3277 "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", 2505 3278 "devOptional": true 3279 + }, 3280 + "node_modules/date-fns": { 3281 + "version": "3.6.0", 3282 + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", 3283 + "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", 3284 + "license": "MIT", 3285 + "funding": { 3286 + "type": "github", 3287 + "url": "https://github.com/sponsors/kossnocorp" 3288 + } 2506 3289 }, 2507 3290 "node_modules/debug": { 2508 3291 "version": "4.3.7", ··· 3812 4595 }, 3813 4596 "engines": { 3814 4597 "node": ">=0.10.0" 4598 + } 4599 + }, 4600 + "node_modules/react-day-picker": { 4601 + "version": "8.10.1", 4602 + "resolved": "https://registry.npmjs.org/react-day-picker/-/react-day-picker-8.10.1.tgz", 4603 + "integrity": "sha512-TMx7fNbhLk15eqcMt+7Z7S2KF7mfTId/XJDjKE8f+IUcFn0l08/kI4FiYTL/0yuOLmEcbR4Fwe3GJf/NiiMnPA==", 4604 + "license": "MIT", 4605 + "funding": { 4606 + "type": "individual", 4607 + "url": "https://github.com/sponsors/gpbl" 4608 + }, 4609 + "peerDependencies": { 4610 + "date-fns": "^2.28.0 || ^3.0.0", 4611 + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" 3815 4612 } 3816 4613 }, 3817 4614 "node_modules/react-dom": {
+4 -1
mast-react-vite/package.json
··· 13 13 "@radix-ui/react-checkbox": "^1.1.2", 14 14 "@radix-ui/react-dialog": "^1.1.6", 15 15 "@radix-ui/react-icons": "^1.3.0", 16 + "@radix-ui/react-popover": "^1.1.14", 16 17 "@radix-ui/react-scroll-area": "^1.2.3", 17 18 "@radix-ui/react-separator": "^1.1.2", 18 - "@radix-ui/react-slot": "^1.1.2", 19 + "@radix-ui/react-slot": "^1.2.3", 19 20 "@radix-ui/react-toggle": "^1.1.2", 20 21 "@radix-ui/react-toggle-group": "^1.1.2", 21 22 "@radix-ui/react-tooltip": "^1.1.8", ··· 25 26 "@vlcn.io/ws-browserdb": "^0.2.0", 26 27 "class-variance-authority": "^0.7.1", 27 28 "clsx": "^2.1.1", 29 + "date-fns": "^3.6.0", 28 30 "lucide-react": "^0.454.0", 29 31 "motion": "^12.7.4", 30 32 "react": "^18.3.1", 33 + "react-day-picker": "^8.10.1", 31 34 "react-dom": "^18.3.1", 32 35 "react-helmet": "^6.1.0", 33 36 "react-modal-sheet": "^4.0.1",
+21 -3
mast-react-vite/src/App.tsx
··· 94 94 description: parsedCommand.description, 95 95 tags: JSON.stringify(parsedCommand.tags) || "[]", 96 96 project: parsedCommand.project || "", 97 + priority: parsedCommand.priority || false, 98 + due: parsedCommand.due || null, 97 99 completed: 2, // preview-add state 98 100 working_id: 0, 99 101 }; ··· 120 122 121 123 if (parsedCommand.project) { 122 124 previewChanges.project = parsedCommand.project; 125 + } 126 + 127 + if (parsedCommand.priority !== undefined) { 128 + previewChanges.priority = parsedCommand.priority; 129 + } 130 + 131 + if (parsedCommand.due !== undefined) { 132 + previewChanges.due = parsedCommand.due; 123 133 } 124 134 125 135 if (parsedCommand.tags && parsedCommand.tags.length > 0) { ··· 285 295 break; 286 296 case "add": 287 297 ctx.db.exec( 288 - `INSERT INTO todos (id, description, tags, project, completed) 289 - VALUES (lower(hex(randomblob(16))), ?, json(?), ?, 0)`, 290 - [parsed.description, JSON.stringify(parsed.tags), parsed.project], 298 + `INSERT INTO todos (id, description, tags, project, priority, due, completed) 299 + VALUES (lower(hex(randomblob(16))), ?, json(?), ?, ?, ?, 0)`, 300 + [parsed.description, JSON.stringify(parsed.tags), parsed.project, parsed.priority ? 1 : 0, parsed.due], 291 301 ); 292 302 break; 293 303 case "modify": ··· 302 312 if (parsed.project && parsed.project.length > 0) { 303 313 updates.push("project = ?"); 304 314 editParams.push(parsed.project); 315 + } 316 + if (parsed.priority !== undefined) { 317 + updates.push("priority = ?"); 318 + editParams.push(parsed.priority ? 1 : 0); 319 + } 320 + if (parsed.due !== undefined) { 321 + updates.push("due = ?"); 322 + editParams.push(parsed.due); 305 323 } 306 324 if (parsed.tags && parsed.tags.length > 0) { 307 325 updates.push(`tags = (
+103 -17
mast-react-vite/src/components/ui/action-parser.tsx
··· 2 2 import { cn } from "@/lib/utils"; 3 3 import { Button } from "@/components/ui/button"; 4 4 import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"; 5 - import { Search, Plus, Pencil, Check, Calendar } from "lucide-react"; 5 + import { Search, Plus, Pencil, Check, Calendar, Flag } from "lucide-react"; 6 6 import { Tag } from "@/components/ui/tag"; 7 7 import { Project } from "@/components/ui/project"; 8 + import { Calendar as CalendarComponent } from "@/components/ui/calendar"; 9 + import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; 8 10 9 11 export interface InputProps 10 12 extends React.InputHTMLAttributes<HTMLInputElement> { ··· 20 22 const options = ["add", "filter", "done", "delete"]; 21 23 const [suggestions, setSuggestions] = React.useState<string[]>([]); 22 24 const [showShadow, setShowShadow] = React.useState(false); 25 + const [desktopCalendarOpen, setDesktopCalendarOpen] = React.useState(false); 26 + const [mobileCalendarOpen, setMobileCalendarOpen] = React.useState(false); 23 27 24 28 // Create refs for the suggestion containers and inputs 25 29 const suggestionsRef = React.useRef<HTMLDivElement>(null); ··· 58 62 onSubmit(); 59 63 } 60 64 }; 65 + 66 + const handleDateSelect = (date: Date | undefined, isDesktop: boolean = true) => { 67 + if (date) { 68 + const formattedDate = date.toISOString().split('T')[0]; // YYYY-MM-DD format 69 + const currentValue = (value as string) || ""; 70 + 71 + // Check if there's already a due date pattern and replace it 72 + let newValue = currentValue; 73 + 74 + // Replace existing due: pattern 75 + if (newValue.match(/due:[^\s]+/)) { 76 + newValue = newValue.replace(/due:[^\s]+/, `due:${formattedDate}`); 77 + } 78 + // Replace existing @ pattern 79 + else if (newValue.match(/@[^\s]+/)) { 80 + newValue = newValue.replace(/@[^\s]+/, `@${formattedDate}`); 81 + } 82 + // No existing due date, append new one 83 + else { 84 + const trimmedVal = currentValue.trim(); 85 + newValue = trimmedVal.length > 0 ? `${trimmedVal} @${formattedDate}` : `@${formattedDate}`; 86 + } 87 + 88 + props.onChange?.({ target: { value: newValue } } as any); 89 + 90 + // Close the appropriate calendar 91 + if (isDesktop) { 92 + setDesktopCalendarOpen(false); 93 + } else { 94 + setMobileCalendarOpen(false); 95 + } 96 + setTimeout(() => focusInput(), 0); 97 + } 98 + }; 99 + 100 + const handlePriorityToggle = () => { 101 + const currentValue = (value as string) || ""; 102 + let newValue = currentValue; 103 + 104 + // Check if priority already exists and remove it 105 + if (newValue.includes("!!")) { 106 + newValue = newValue.replace(/!!/g, "").replace(/\s+/g, " ").trim(); 107 + } 108 + // Also check for "priority" keyword and remove it 109 + else if (newValue.match(/\bpriority\b/)) { 110 + newValue = newValue.replace(/\bpriority\b/g, "").replace(/\s+/g, " ").trim(); 111 + } 112 + // No existing priority, add it 113 + else { 114 + const trimmedVal = currentValue.trim(); 115 + newValue = trimmedVal.length > 0 ? `${trimmedVal} !!` : "!!"; 116 + } 117 + 118 + props.onChange?.({ target: { value: newValue } } as any); 119 + setTimeout(() => focusInput(), 0); 120 + }; 61 121 62 122 const checkScrollShadow = (element: HTMLDivElement | null) => { 63 123 if (!element) return; ··· 260 320 > 261 321 + 262 322 </Button> 323 + <Popover open={desktopCalendarOpen} onOpenChange={setDesktopCalendarOpen}> 324 + <PopoverTrigger asChild> 325 + <Button 326 + variant="ghost" 327 + size="sm" 328 + className="h-8 px-2 text-muted-foreground hover:text-foreground flex-shrink-0" 329 + > 330 + <Calendar /> 331 + </Button> 332 + </PopoverTrigger> 333 + <PopoverContent className="dark w-auto p-0 border bg-popover text-popover-foreground" align="start"> 334 + <CalendarComponent 335 + mode="single" 336 + selected={undefined} 337 + onSelect={(date) => handleDateSelect(date, true)} 338 + initialFocus 339 + /> 340 + </PopoverContent> 341 + </Popover> 263 342 <Button 264 343 variant="ghost" 265 344 size="sm" 266 - //onClick={() => { 267 - // const input = document.querySelector('input'); 268 - // if (input) { 269 - // const newValue = `${value || ''} 📅`; 270 - // props.onChange?.({ target: { value: newValue } } as any); 271 - // } 272 - //}} 345 + onClick={handlePriorityToggle} 273 346 className="h-8 px-2 text-muted-foreground hover:text-foreground flex-shrink-0" 274 347 > 275 - <Calendar /> 348 + <Flag /> 276 349 </Button> 277 350 <div className="h-7 flex-1 min-w-0 relative"> 278 351 {suggestions.length > 0 && ( ··· 443 516 > 444 517 + 445 518 </Button> 519 + <Popover open={mobileCalendarOpen} onOpenChange={setMobileCalendarOpen}> 520 + <PopoverTrigger asChild> 521 + <Button 522 + variant="ghost" 523 + size="sm" 524 + className="h-8 px-2 text-muted-foreground hover:text-foreground flex-shrink-0" 525 + > 526 + <Calendar /> 527 + </Button> 528 + </PopoverTrigger> 529 + <PopoverContent className="dark w-auto p-0 border bg-popover text-popover-foreground" align="start"> 530 + <CalendarComponent 531 + mode="single" 532 + selected={undefined} 533 + onSelect={(date) => handleDateSelect(date, false)} 534 + initialFocus 535 + /> 536 + </PopoverContent> 537 + </Popover> 446 538 <Button 447 539 variant="ghost" 448 540 size="sm" 449 - //onClick={() => { 450 - // const input = document.querySelector('input'); 451 - // if (input) { 452 - // const newValue = `${value || ''} 📅`; 453 - // props.onChange?.({ target: { value: newValue } } as any); 454 - // } 455 - //}} 541 + onClick={handlePriorityToggle} 456 542 className="h-8 px-2 text-muted-foreground hover:text-foreground flex-shrink-0" 457 543 > 458 - <Calendar /> 544 + <Flag /> 459 545 </Button> 460 546 <div className="h-7 flex-1 min-w-0 relative"> 461 547 {suggestions.length > 0 && (
+74
mast-react-vite/src/components/ui/calendar.tsx
··· 1 + import * as React from "react" 2 + import { DayPicker } from "react-day-picker" 3 + 4 + import { cn } from "@/lib/utils" 5 + import { buttonVariants } from "@/components/ui/button" 6 + import { ChevronLeftIcon, ChevronRightIcon } from "@radix-ui/react-icons" 7 + 8 + export type CalendarProps = React.ComponentProps<typeof DayPicker> 9 + 10 + function Calendar({ 11 + className, 12 + classNames, 13 + showOutsideDays = true, 14 + ...props 15 + }: CalendarProps) { 16 + return ( 17 + <DayPicker 18 + showOutsideDays={showOutsideDays} 19 + className={cn("p-3", className)} 20 + classNames={{ 21 + months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0", 22 + month: "space-y-4", 23 + caption: "flex justify-center pt-1 relative items-center", 24 + caption_label: "text-sm font-medium", 25 + nav: "space-x-1 flex items-center", 26 + nav_button: cn( 27 + buttonVariants({ variant: "outline" }), 28 + "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100" 29 + ), 30 + nav_button_previous: "absolute left-1", 31 + nav_button_next: "absolute right-1", 32 + table: "w-full border-collapse space-y-1", 33 + head_row: "flex", 34 + head_cell: 35 + "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]", 36 + row: "flex w-full mt-2", 37 + cell: cn( 38 + "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md", 39 + props.mode === "range" 40 + ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" 41 + : "[&:has([aria-selected])]:rounded-md" 42 + ), 43 + day: cn( 44 + buttonVariants({ variant: "ghost" }), 45 + "h-8 w-8 p-0 font-normal aria-selected:opacity-100" 46 + ), 47 + day_range_start: "day-range-start", 48 + day_range_end: "day-range-end", 49 + day_selected: 50 + "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground", 51 + day_today: "bg-accent text-accent-foreground", 52 + day_outside: 53 + "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground", 54 + day_disabled: "text-muted-foreground opacity-50", 55 + day_range_middle: 56 + "aria-selected:bg-accent aria-selected:text-accent-foreground", 57 + day_hidden: "invisible", 58 + ...classNames, 59 + }} 60 + components={{ 61 + IconLeft: ({ className, ...props }) => ( 62 + <ChevronLeftIcon className={cn("h-4 w-4", className)} {...props} /> 63 + ), 64 + IconRight: ({ className, ...props }) => ( 65 + <ChevronRightIcon className={cn("h-4 w-4", className)} {...props} /> 66 + ), 67 + }} 68 + {...props} 69 + /> 70 + ) 71 + } 72 + Calendar.displayName = "Calendar" 73 + 74 + export { Calendar }
+31
mast-react-vite/src/components/ui/popover.tsx
··· 1 + import * as React from "react" 2 + import * as PopoverPrimitive from "@radix-ui/react-popover" 3 + 4 + import { cn } from "@/lib/utils" 5 + 6 + const Popover = PopoverPrimitive.Root 7 + 8 + const PopoverTrigger = PopoverPrimitive.Trigger 9 + 10 + const PopoverAnchor = PopoverPrimitive.Anchor 11 + 12 + const PopoverContent = React.forwardRef< 13 + React.ElementRef<typeof PopoverPrimitive.Content>, 14 + React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> 15 + >(({ className, align = "center", sideOffset = 4, ...props }, ref) => ( 16 + <PopoverPrimitive.Portal> 17 + <PopoverPrimitive.Content 18 + ref={ref} 19 + align={align} 20 + sideOffset={sideOffset} 21 + className={cn( 22 + "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]", 23 + className 24 + )} 25 + {...props} 26 + /> 27 + </PopoverPrimitive.Portal> 28 + )) 29 + PopoverContent.displayName = PopoverPrimitive.Content.displayName 30 + 31 + export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }
+14
mast-react-vite/src/components/ui/task-detail-view.tsx
··· 46 46 47 47 <Separator /> 48 48 49 + {task.priority && ( 50 + <div> 51 + <h3 className="text-sm font-medium text-muted-foreground">Priority</h3> 52 + <div className="mt-2 flex items-center gap-2"> 53 + <div className="text-red-500"> 54 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="currentColor"> 55 + <path d="M5 3h14v14l-7-3-7 3V3z"/> 56 + </svg> 57 + </div> 58 + <span>High Priority Task</span> 59 + </div> 60 + </div> 61 + )} 62 + 49 63 {displayProject && ( 50 64 <div> 51 65 <h3 className="text-sm font-medium text-muted-foreground">Project</h3>
+19 -5
mast-react-vite/src/components/ui/task.tsx
··· 6 6 import { TaskDetailView } from "@/components/ui/task-detail-view"; 7 7 import { useIsMobile } from "@/hooks/use-mobile"; 8 8 import { motion, animate, AnimatePresence } from "motion/react"; 9 + import { Flag } from "lucide-react"; 9 10 10 11 interface TaskProps { 11 12 selected?: boolean; ··· 178 179 dragDirectionLock 179 180 dragMomentum={false} 180 181 > 181 - <div className="flex items-start gap-4"> 182 + <div className="flex items-start gap-4 relative"> 182 183 <div className="flex-1 min-w-0"> 184 + {/* Priority flag icon in top right */} 185 + {data.priority && ( 186 + <div className={`absolute top-0 right-0 ${data.completed === 2 ? 'text-yellow-600' : 'text-red-500'}`} title="Priority task"> 187 + <Flag className="w-5 h-5" fill="currentColor" /> 188 + </div> 189 + )} 190 + {!data.priority && ( 191 + <div className={`absolute top-0 right-0 ${data.completed === 2 ? 'text-yellow-600' : 'text-gray-300'}`} title="Normal priority"> 192 + <Flag className="w-5 h-5" /> 193 + </div> 194 + )} 183 195 <div className="flex items-center gap-1 relative ml-[-0.5rem]"> 184 196 {displayProject && ( 185 197 <Project ··· 203 215 status={data.completed} 204 216 /> 205 217 </div> 206 - {data.dueDate && ( 207 - <span className="text-xs text-muted-foreground"> 208 - Due: {data.dueDate} 209 - </span> 218 + {/* Display due date if it exists (either from original data or preview) */} 219 + {(data.due || (hasPreview && data.preview.due)) && ( 220 + <div className="text-xs text-muted-foreground flex items-center gap-1"> 221 + <span>@</span> 222 + <span>{hasPreview && data.preview.due ? data.preview.due : data.due}</span> 223 + </div> 210 224 )} 211 225 </div> 212 226 </div>
+22
mast-react-vite/src/contexts/filter-context.tsx
··· 7 7 description?: string; 8 8 project?: string; 9 9 tags?: string[]; 10 + due?: string; 10 11 selection?: any[]; 11 12 }; 12 13 ··· 29 30 filterDescription?: string; 30 31 filterProject?: string; 31 32 filterTags?: string[]; 33 + filterDue?: string; 32 34 }; 33 35 34 36 // Create a default context value ··· 75 77 76 78 if (parsed.tags && parsed.tags.length > 0) { 77 79 newState.filterTags = parsed.tags; 80 + } 81 + 82 + if (parsed.due) { 83 + newState.filterDue = parsed.due; 78 84 } 79 85 80 86 setFilterState(newState); ··· 106 112 } 107 113 } 108 114 115 + // Look for due date patterns: due:YYYY-MM-DD or @YYYY-MM-DD 116 + let dueMatch = filterText.match(/due:([^\s]+)/); 117 + if (!dueMatch) { 118 + dueMatch = filterText.match(/@([^\s]+)/); 119 + } 120 + if (dueMatch) { 121 + fallbackState.filterDue = dueMatch[1]; 122 + } 123 + 109 124 // Anything else is treated as description 110 125 const remainingText = filterText 111 126 .replace(/\#[^\s]+/g, "") // Remove tags 112 127 .replace(/\+[^\s]+/g, "") // Remove projects with + prefix 113 128 .replace(/project:[^\s]+/g, "") // Remove projects with project: prefix 129 + .replace(/due:[^\s]+/g, "") // Remove due dates with due: prefix 130 + .replace(/@[^\s]+/g, "") // Remove due dates with @ prefix 114 131 .trim(); 115 132 116 133 if (remainingText) { ··· 193 210 WHERE json_each.value IN (${filterState.filterTags.map(() => "?").join(",")}) 194 211 )`); 195 212 params.push(...filterState.filterTags); 213 + } 214 + 215 + if (filterState.filterDue && filterState.filterDue.length > 0) { 216 + conditions.push("due = ?"); 217 + params.push(filterState.filterDue); 196 218 } 197 219 198 220 return { conditions, params };
+389 -397
mast-react-vite/src/lib/command_js.js
··· 1 - // @generated by Peggy 4.2.0. 1 + // @generated by Peggy 5.0.2. 2 2 // 3 3 // https://peggyjs.org/ 4 4 5 5 6 - function peg$subclass(child, parent) { 7 - function C() { this.constructor = child; } 8 - C.prototype = parent.prototype; 9 - child.prototype = new C(); 10 - } 6 + class peg$SyntaxError extends SyntaxError { 7 + constructor(message, expected, found, location) { 8 + super(message); 9 + this.expected = expected; 10 + this.found = found; 11 + this.location = location; 12 + this.name = "SyntaxError"; 13 + } 11 14 12 - function peg$SyntaxError(message, expected, found, location) { 13 - var self = Error.call(this, message); 14 - // istanbul ignore next Check is a necessary evil to support older environments 15 - if (Object.setPrototypeOf) { 16 - Object.setPrototypeOf(self, peg$SyntaxError.prototype); 15 + format(sources) { 16 + let str = "Error: " + this.message; 17 + if (this.location) { 18 + let src = null; 19 + const st = sources.find(s => s.source === this.location.source); 20 + if (st) { 21 + src = st.text.split(/\r\n|\n|\r/g); 22 + } 23 + const s = this.location.start; 24 + const offset_s = (this.location.source && (typeof this.location.source.offset === "function")) 25 + ? this.location.source.offset(s) 26 + : s; 27 + const loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column; 28 + if (src) { 29 + const e = this.location.end; 30 + const filler = "".padEnd(offset_s.line.toString().length, " "); 31 + const line = src[s.line - 1]; 32 + const last = s.line === e.line ? e.column : line.length + 1; 33 + const hatLen = (last - s.column) || 1; 34 + str += "\n --> " + loc + "\n" 35 + + filler + " |\n" 36 + + offset_s.line + " | " + line + "\n" 37 + + filler + " | " + "".padEnd(s.column - 1, " ") 38 + + "".padEnd(hatLen, "^"); 39 + } else { 40 + str += "\n at " + loc; 41 + } 42 + } 43 + return str; 17 44 } 18 - self.expected = expected; 19 - self.found = found; 20 - self.location = location; 21 - self.name = "SyntaxError"; 22 - return self; 23 - } 24 45 25 - peg$subclass(peg$SyntaxError, Error); 46 + static buildMessage(expected, found) { 47 + function hex(ch) { 48 + return ch.codePointAt(0).toString(16).toUpperCase(); 49 + } 26 50 27 - function peg$padEnd(str, targetLength, padString) { 28 - padString = padString || " "; 29 - if (str.length > targetLength) { return str; } 30 - targetLength -= str.length; 31 - padString += padString.repeat(targetLength); 32 - return str + padString.slice(0, targetLength); 33 - } 34 - 35 - peg$SyntaxError.prototype.format = function(sources) { 36 - var str = "Error: " + this.message; 37 - if (this.location) { 38 - var src = null; 39 - var k; 40 - for (k = 0; k < sources.length; k++) { 41 - if (sources[k].source === this.location.source) { 42 - src = sources[k].text.split(/\r\n|\n|\r/g); 43 - break; 51 + const nonPrintable = Object.prototype.hasOwnProperty.call(RegExp.prototype, "unicode") 52 + ? new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]", "gu") 53 + : null; 54 + function unicodeEscape(s) { 55 + if (nonPrintable) { 56 + return s.replace(nonPrintable, ch => "\\u{" + hex(ch) + "}"); 44 57 } 58 + return s; 45 59 } 46 - var s = this.location.start; 47 - var offset_s = (this.location.source && (typeof this.location.source.offset === "function")) 48 - ? this.location.source.offset(s) 49 - : s; 50 - var loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column; 51 - if (src) { 52 - var e = this.location.end; 53 - var filler = peg$padEnd("", offset_s.line.toString().length, ' '); 54 - var line = src[s.line - 1]; 55 - var last = s.line === e.line ? e.column : line.length + 1; 56 - var hatLen = (last - s.column) || 1; 57 - str += "\n --> " + loc + "\n" 58 - + filler + " |\n" 59 - + offset_s.line + " | " + line + "\n" 60 - + filler + " | " + peg$padEnd("", s.column - 1, ' ') 61 - + peg$padEnd("", hatLen, "^"); 62 - } else { 63 - str += "\n at " + loc; 60 + 61 + function literalEscape(s) { 62 + return unicodeEscape(s 63 + .replace(/\\/g, "\\\\") 64 + .replace(/"/g, "\\\"") 65 + .replace(/\0/g, "\\0") 66 + .replace(/\t/g, "\\t") 67 + .replace(/\n/g, "\\n") 68 + .replace(/\r/g, "\\r") 69 + .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch)) 70 + .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch))); 64 71 } 65 - } 66 - return str; 67 - }; 68 72 69 - peg$SyntaxError.buildMessage = function(expected, found) { 70 - var DESCRIBE_EXPECTATION_FNS = { 71 - literal: function(expectation) { 72 - return "\"" + literalEscape(expectation.text) + "\""; 73 - }, 73 + function classEscape(s) { 74 + return unicodeEscape(s 75 + .replace(/\\/g, "\\\\") 76 + .replace(/\]/g, "\\]") 77 + .replace(/\^/g, "\\^") 78 + .replace(/-/g, "\\-") 79 + .replace(/\0/g, "\\0") 80 + .replace(/\t/g, "\\t") 81 + .replace(/\n/g, "\\n") 82 + .replace(/\r/g, "\\r") 83 + .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch)) 84 + .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch))); 85 + } 74 86 75 - class: function(expectation) { 76 - var escapedParts = expectation.parts.map(function(part) { 77 - return Array.isArray(part) 78 - ? classEscape(part[0]) + "-" + classEscape(part[1]) 79 - : classEscape(part); 80 - }); 87 + const DESCRIBE_EXPECTATION_FNS = { 88 + literal(expectation) { 89 + return "\"" + literalEscape(expectation.text) + "\""; 90 + }, 81 91 82 - return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]"; 83 - }, 92 + class(expectation) { 93 + const escapedParts = expectation.parts.map( 94 + part => (Array.isArray(part) 95 + ? classEscape(part[0]) + "-" + classEscape(part[1]) 96 + : classEscape(part)) 97 + ); 84 98 85 - any: function() { 86 - return "any character"; 87 - }, 99 + return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]" + (expectation.unicode ? "u" : ""); 100 + }, 88 101 89 - end: function() { 90 - return "end of input"; 91 - }, 102 + any() { 103 + return "any character"; 104 + }, 92 105 93 - other: function(expectation) { 94 - return expectation.description; 95 - } 96 - }; 106 + end() { 107 + return "end of input"; 108 + }, 97 109 98 - function hex(ch) { 99 - return ch.charCodeAt(0).toString(16).toUpperCase(); 100 - } 110 + other(expectation) { 111 + return expectation.description; 112 + }, 113 + }; 101 114 102 - function literalEscape(s) { 103 - return s 104 - .replace(/\\/g, "\\\\") 105 - .replace(/"/g, "\\\"") 106 - .replace(/\0/g, "\\0") 107 - .replace(/\t/g, "\\t") 108 - .replace(/\n/g, "\\n") 109 - .replace(/\r/g, "\\r") 110 - .replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); }) 111 - .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); }); 112 - } 115 + function describeExpectation(expectation) { 116 + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); 117 + } 113 118 114 - function classEscape(s) { 115 - return s 116 - .replace(/\\/g, "\\\\") 117 - .replace(/\]/g, "\\]") 118 - .replace(/\^/g, "\\^") 119 - .replace(/-/g, "\\-") 120 - .replace(/\0/g, "\\0") 121 - .replace(/\t/g, "\\t") 122 - .replace(/\n/g, "\\n") 123 - .replace(/\r/g, "\\r") 124 - .replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); }) 125 - .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); }); 126 - } 119 + function describeExpected(expected) { 120 + const descriptions = expected.map(describeExpectation); 121 + descriptions.sort(); 127 122 128 - function describeExpectation(expectation) { 129 - return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); 130 - } 123 + if (descriptions.length > 0) { 124 + let j = 1; 125 + for (let i = 1; i < descriptions.length; i++) { 126 + if (descriptions[i - 1] !== descriptions[i]) { 127 + descriptions[j] = descriptions[i]; 128 + j++; 129 + } 130 + } 131 + descriptions.length = j; 132 + } 131 133 132 - function describeExpected(expected) { 133 - var descriptions = expected.map(describeExpectation); 134 - var i, j; 134 + switch (descriptions.length) { 135 + case 1: 136 + return descriptions[0]; 135 137 136 - descriptions.sort(); 138 + case 2: 139 + return descriptions[0] + " or " + descriptions[1]; 137 140 138 - if (descriptions.length > 0) { 139 - for (i = 1, j = 1; i < descriptions.length; i++) { 140 - if (descriptions[i - 1] !== descriptions[i]) { 141 - descriptions[j] = descriptions[i]; 142 - j++; 143 - } 141 + default: 142 + return descriptions.slice(0, -1).join(", ") 143 + + ", or " 144 + + descriptions[descriptions.length - 1]; 144 145 } 145 - descriptions.length = j; 146 146 } 147 147 148 - switch (descriptions.length) { 149 - case 1: 150 - return descriptions[0]; 151 - 152 - case 2: 153 - return descriptions[0] + " or " + descriptions[1]; 154 - 155 - default: 156 - return descriptions.slice(0, -1).join(", ") 157 - + ", or " 158 - + descriptions[descriptions.length - 1]; 148 + function describeFound(found) { 149 + return found ? "\"" + literalEscape(found) + "\"" : "end of input"; 159 150 } 160 - } 161 151 162 - function describeFound(found) { 163 - return found ? "\"" + literalEscape(found) + "\"" : "end of input"; 152 + return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; 164 153 } 165 - 166 - return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; 167 - }; 154 + } 168 155 169 156 function peg$parse(input, options) { 170 157 options = options !== undefined ? options : {}; 171 158 172 - var peg$FAILED = {}; 173 - var peg$source = options.grammarSource; 159 + const peg$FAILED = {}; 160 + const peg$source = options.grammarSource; 174 161 175 - var peg$startRuleFunctions = { Start: peg$parseStart }; 176 - var peg$startRuleFunction = peg$parseStart; 162 + const peg$startRuleFunctions = { 163 + Start: peg$parseStart, 164 + }; 165 + let peg$startRuleFunction = peg$parseStart; 177 166 178 - var peg$c0 = "add"; 179 - var peg$c1 = "done"; 180 - var peg$c2 = "filter"; 181 - var peg$c3 = "modify"; 182 - var peg$c4 = "-"; 183 - var peg$c5 = ","; 184 - var peg$c6 = "@"; 185 - var peg$c7 = "pro:"; 186 - var peg$c8 = "project:"; 187 - var peg$c9 = "+"; 188 - var peg$c10 = "priority:"; 189 - var peg$c11 = "#"; 190 - var peg$c12 = "am"; 191 - var peg$c13 = "pm"; 167 + const peg$c0 = "add"; 168 + const peg$c1 = "done"; 169 + const peg$c2 = "filter"; 170 + const peg$c3 = "modify"; 171 + const peg$c4 = "-"; 172 + const peg$c5 = ","; 173 + const peg$c6 = "due:"; 174 + const peg$c7 = "@"; 175 + const peg$c8 = "pro:"; 176 + const peg$c9 = "project:"; 177 + const peg$c10 = "+"; 178 + const peg$c11 = "priority"; 179 + const peg$c12 = "!!"; 180 + const peg$c13 = "#"; 192 181 193 - var peg$r0 = /^[HML]/; 194 - var peg$r1 = /^[0-9]/; 195 - var peg$r2 = /^[0-9:]/; 196 - var peg$r3 = /^[a-zA-Z0-9_\-]/; 197 - var peg$r4 = /^[ \t]/; 182 + const peg$r0 = /^[0-9]/; 183 + const peg$r1 = /^[0-9\/\-]/; 184 + const peg$r2 = /^[a-zA-Z0-9_\-]/; 185 + const peg$r3 = /^[ \t]/; 198 186 199 - var peg$e0 = peg$literalExpectation("add", false); 200 - var peg$e1 = peg$literalExpectation("done", false); 201 - var peg$e2 = peg$literalExpectation("filter", false); 202 - var peg$e3 = peg$literalExpectation("modify", false); 203 - var peg$e4 = peg$literalExpectation("-", false); 204 - var peg$e5 = peg$literalExpectation(",", false); 205 - var peg$e6 = peg$literalExpectation("@", false); 206 - var peg$e7 = peg$literalExpectation("pro:", false); 207 - var peg$e8 = peg$literalExpectation("project:", false); 208 - var peg$e9 = peg$literalExpectation("+", false); 209 - var peg$e10 = peg$literalExpectation("priority:", false); 210 - var peg$e11 = peg$classExpectation(["H", "M", "L"], false, false); 211 - var peg$e12 = peg$literalExpectation("#", false); 212 - var peg$e13 = peg$classExpectation([["0", "9"]], false, false); 213 - var peg$e14 = peg$classExpectation([["0", "9"], ":"], false, false); 214 - var peg$e15 = peg$literalExpectation("am", false); 215 - var peg$e16 = peg$literalExpectation("pm", false); 216 - var peg$e17 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false); 217 - var peg$e18 = peg$classExpectation([" ", "\t"], false, false); 218 - var peg$e19 = peg$anyExpectation(); 187 + const peg$e0 = peg$literalExpectation("add", false); 188 + const peg$e1 = peg$literalExpectation("done", false); 189 + const peg$e2 = peg$literalExpectation("filter", false); 190 + const peg$e3 = peg$literalExpectation("modify", false); 191 + const peg$e4 = peg$literalExpectation("-", false); 192 + const peg$e5 = peg$literalExpectation(",", false); 193 + const peg$e6 = peg$literalExpectation("due:", false); 194 + const peg$e7 = peg$literalExpectation("@", false); 195 + const peg$e8 = peg$literalExpectation("pro:", false); 196 + const peg$e9 = peg$literalExpectation("project:", false); 197 + const peg$e10 = peg$literalExpectation("+", false); 198 + const peg$e11 = peg$literalExpectation("priority", false); 199 + const peg$e12 = peg$literalExpectation("!!", false); 200 + const peg$e13 = peg$literalExpectation("#", false); 201 + const peg$e14 = peg$classExpectation([["0", "9"]], false, false, false); 202 + const peg$e15 = peg$classExpectation([["0", "9"], "/", "-"], false, false, false); 203 + const peg$e16 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false, false); 204 + const peg$e17 = peg$classExpectation([" ", "\t"], false, false, false); 205 + const peg$e18 = peg$anyExpectation(); 219 206 220 - var peg$f0 = function(selection, parts) { 221 - return makeCommand('add', selection, parts.filter(p => p !== null)); 222 - }; 223 - var peg$f1 = function(selection, parts) { 224 - return makeCommand('done', selection, parts.filter(p => p !== null)); 225 - }; 226 - var peg$f2 = function(selection, moreFilters) { 227 - return makeCommand('filter', selection, moreFilters); 228 - }; 229 - var peg$f3 = function(selection, moreFilters) { 230 - return makeCommand('modify', selection, moreFilters); 231 - }; 232 - var peg$f4 = function(first, rest) { 233 - return [first, ...rest.map(r => r[1])]; 234 - }; 235 - var peg$f5 = function(start, end) { 236 - const ids = []; 237 - for (let i = start; i <= end; i++) { 238 - ids.push(i); 207 + function peg$f0(selection, parts) { 208 + return makeCommand('add', selection, parts.filter(p => p !== null)); 239 209 } 240 - return ids; 241 - }; 242 - var peg$f6 = function(id) { 243 - return [id]; 244 - }; 245 - var peg$f7 = function(first, rest) { 246 - return [first, ...rest.map(r => r[1])]; 247 - }; 248 - var peg$f8 = function(first, rest, trailing) { 249 - const ids = [first, ...rest.map(r => r[1])].flat(); 250 - return { 251 - type: 'id', 252 - ids: ids, 253 - reconstruct: function() { return this.ids.join(','); } 254 - }; 255 - }; 256 - var peg$f9 = function(chars) { 257 - return { 258 - type: "text", 259 - value: chars, 260 - reconstruct: function() { return this.value; } 261 - }; 262 - }; 263 - var peg$f10 = function(value) { 264 - return { 265 - type: "due", 266 - value: value, 267 - reconstruct: function() { return `@${this.value}`; } 268 - }; 269 - }; 270 - var peg$f11 = function(value) { 271 - return { 272 - type: "project", 273 - value: value, 274 - reconstruct: function() { return `+${this.value}`; } 275 - }; 276 - }; 277 - var peg$f12 = function(value) { 278 - return { 279 - type: "priority", 280 - value: value, 281 - reconstruct: function() { return `priority:${this.value}`; } 282 - }; 283 - }; 284 - var peg$f13 = function(value) { 285 - return { 286 - type: "tag", 287 - value: value, 288 - reconstruct: function() { return `#${this.value}`; } 289 - }; 290 - }; 291 - var peg$f14 = function(digits) { 292 - return parseInt(digits.join(''), 10); 293 - }; 294 - var peg$f15 = function(chars) { 295 - return chars.join('') + (text() || ''); 296 - }; 297 - var peg$f16 = function(chars) { 298 - return chars.join(''); 299 - }; 300 - var peg$f17 = function() { 301 - return null; 302 - }; 303 - var peg$currPos = options.peg$currPos | 0; 304 - var peg$savedPos = peg$currPos; 305 - var peg$posDetailsCache = [{ line: 1, column: 1 }]; 306 - var peg$maxFailPos = peg$currPos; 307 - var peg$maxFailExpected = options.peg$maxFailExpected || []; 308 - var peg$silentFails = options.peg$silentFails | 0; 210 + function peg$f1(selection, parts) { 211 + return makeCommand('done', selection, parts.filter(p => p !== null)); 212 + } 213 + function peg$f2(selection, moreFilters) { 214 + return makeCommand('filter', selection, moreFilters); 215 + } 216 + function peg$f3(selection, moreFilters) { 217 + return makeCommand('modify', selection, moreFilters); 218 + } 219 + function peg$f4(first, rest) { 220 + return [first, ...rest.map(r => r[1])]; 221 + } 222 + function peg$f5(start, end) { 223 + const ids = []; 224 + for (let i = start; i <= end; i++) { 225 + ids.push(i); 226 + } 227 + return ids; 228 + } 229 + function peg$f6(id) { 230 + return [id]; 231 + } 232 + function peg$f7(first, rest) { 233 + return [first, ...rest.map(r => r[1])]; 234 + } 235 + function peg$f8(first, rest, trailing) { 236 + const ids = [first, ...rest.map(r => r[1])].flat(); 237 + return { 238 + type: 'id', 239 + ids: ids, 240 + reconstruct: function() { return this.ids.join(','); } 241 + }; 242 + } 243 + function peg$f9(chars) { 244 + return { 245 + type: "text", 246 + value: chars, 247 + reconstruct: function() { return this.value; } 248 + }; 249 + } 250 + function peg$f10(value) { 251 + return { 252 + type: "due", 253 + value: value, 254 + reconstruct: function() { return `@${this.value}`; } 255 + }; 256 + } 257 + function peg$f11(value) { 258 + return { 259 + type: "project", 260 + value: value, 261 + reconstruct: function() { return `+${this.value}`; } 262 + }; 263 + } 264 + function peg$f12() { 265 + return { 266 + type: "priority", 267 + value: true, 268 + reconstruct: function() { return `priority:${this.value}`; } 269 + }; 270 + } 271 + function peg$f13(value) { 272 + return { 273 + type: "tag", 274 + value: value, 275 + reconstruct: function() { return `#${this.value}`; } 276 + }; 277 + } 278 + function peg$f14(digits) { 279 + return parseInt(digits.join(''), 10); 280 + } 281 + function peg$f15(chars) { 282 + return chars.join(''); 283 + } 284 + function peg$f16(chars) { 285 + return chars.join(''); 286 + } 287 + function peg$f17() { 288 + return null; 289 + } 290 + let peg$currPos = options.peg$currPos | 0; 291 + let peg$savedPos = peg$currPos; 292 + const peg$posDetailsCache = [{ line: 1, column: 1 }]; 293 + let peg$maxFailPos = peg$currPos; 294 + let peg$maxFailExpected = options.peg$maxFailExpected || []; 295 + let peg$silentFails = options.peg$silentFails | 0; 309 296 310 - var peg$result; 297 + let peg$result; 311 298 312 299 if (options.startRule) { 313 300 if (!(options.startRule in peg$startRuleFunctions)) { ··· 329 316 return { 330 317 source: peg$source, 331 318 start: peg$savedPos, 332 - end: peg$currPos 319 + end: peg$currPos, 333 320 }; 334 321 } 335 322 ··· 357 344 throw peg$buildSimpleError(message, location); 358 345 } 359 346 347 + function peg$getUnicode(pos = peg$currPos) { 348 + const cp = input.codePointAt(pos); 349 + if (cp === undefined) { 350 + return ""; 351 + } 352 + return String.fromCodePoint(cp); 353 + } 354 + 360 355 function peg$literalExpectation(text, ignoreCase) { 361 - return { type: "literal", text: text, ignoreCase: ignoreCase }; 356 + return { type: "literal", text, ignoreCase }; 362 357 } 363 358 364 - function peg$classExpectation(parts, inverted, ignoreCase) { 365 - return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; 359 + function peg$classExpectation(parts, inverted, ignoreCase, unicode) { 360 + return { type: "class", parts, inverted, ignoreCase, unicode }; 366 361 } 367 362 368 363 function peg$anyExpectation() { ··· 374 369 } 375 370 376 371 function peg$otherExpectation(description) { 377 - return { type: "other", description: description }; 372 + return { type: "other", description }; 378 373 } 379 374 380 375 function peg$computePosDetails(pos) { 381 - var details = peg$posDetailsCache[pos]; 382 - var p; 376 + let details = peg$posDetailsCache[pos]; 377 + let p; 383 378 384 379 if (details) { 385 380 return details; ··· 394 389 details = peg$posDetailsCache[p]; 395 390 details = { 396 391 line: details.line, 397 - column: details.column 392 + column: details.column, 398 393 }; 399 394 400 395 while (p < pos) { ··· 415 410 } 416 411 417 412 function peg$computeLocation(startPos, endPos, offset) { 418 - var startPosDetails = peg$computePosDetails(startPos); 419 - var endPosDetails = peg$computePosDetails(endPos); 413 + const startPosDetails = peg$computePosDetails(startPos); 414 + const endPosDetails = peg$computePosDetails(endPos); 420 415 421 - var res = { 416 + const res = { 422 417 source: peg$source, 423 418 start: { 424 419 offset: startPos, 425 420 line: startPosDetails.line, 426 - column: startPosDetails.column 421 + column: startPosDetails.column, 427 422 }, 428 423 end: { 429 424 offset: endPos, 430 425 line: endPosDetails.line, 431 - column: endPosDetails.column 432 - } 426 + column: endPosDetails.column, 427 + }, 433 428 }; 434 429 if (offset && peg$source && (typeof peg$source.offset === "function")) { 435 430 res.start = peg$source.offset(res.start); ··· 463 458 } 464 459 465 460 function peg$parseStart() { 466 - var s0; 461 + let s0; 467 462 468 463 s0 = peg$parseAddCommand(); 469 464 if (s0 === peg$FAILED) { ··· 480 475 } 481 476 482 477 function peg$parseAddCommand() { 483 - var s0, s1, s2, s3, s4, s5, s6; 478 + let s0, s1, s2, s3, s4, s5, s6; 484 479 485 480 s0 = peg$currPos; 486 481 s1 = peg$parseSelections(); ··· 543 538 } 544 539 545 540 function peg$parseDoneCommand() { 546 - var s0, s1, s2, s3, s4, s5, s6; 541 + let s0, s1, s2, s3, s4, s5, s6; 547 542 548 543 s0 = peg$currPos; 549 544 s1 = peg$parseSelections(); ··· 595 590 } 596 591 597 592 function peg$parseExplicitFilterCommand() { 598 - var s0, s1, s2, s3, s4, s5, s6; 593 + let s0, s1, s2, s3, s4, s5, s6; 599 594 600 595 s0 = peg$currPos; 601 596 s1 = peg$parseSelections(); ··· 643 638 } 644 639 645 640 function peg$parseModifyCommand() { 646 - var s0, s1, s2, s3, s4, s5, s6; 641 + let s0, s1, s2, s3, s4, s5, s6; 647 642 648 643 s0 = peg$currPos; 649 644 s1 = peg$parseSelections(); ··· 691 686 } 692 687 693 688 function peg$parseFilters() { 694 - var s0, s1, s2, s3, s4, s5; 689 + let s0, s1, s2, s3, s4, s5; 695 690 696 691 s0 = peg$currPos; 697 692 s1 = peg$parsePart(); ··· 741 736 } 742 737 743 738 function peg$parseIdRange() { 744 - var s0, s1, s2, s3; 739 + let s0, s1, s2, s3; 745 740 746 741 s0 = peg$currPos; 747 742 s1 = peg$parseInteger(); ··· 775 770 } 776 771 777 772 function peg$parseSingleId() { 778 - var s0, s1; 773 + let s0, s1; 779 774 780 775 s0 = peg$currPos; 781 776 s1 = peg$parseInteger(); ··· 789 784 } 790 785 791 786 function peg$parseSelections() { 792 - var s0, s1, s2, s3, s4, s5; 787 + let s0, s1, s2, s3, s4, s5; 793 788 794 789 s0 = peg$currPos; 795 790 s1 = peg$parseSelection(); ··· 839 834 } 840 835 841 836 function peg$parseSelection() { 842 - var s0; 837 + let s0; 843 838 844 839 s0 = peg$parseIdFilter(); 845 840 if (s0 === peg$FAILED) { ··· 850 845 } 851 846 852 847 function peg$parseIdFilter() { 853 - var s0, s1, s2, s3, s4, s5; 848 + let s0, s1, s2, s3, s4, s5; 854 849 855 850 s0 = peg$currPos; 856 851 s1 = peg$parseIdRange(); ··· 931 926 } 932 927 933 928 function peg$parsePart() { 934 - var s0; 929 + let s0; 935 930 936 931 s0 = peg$parseAttribute(); 937 932 if (s0 === peg$FAILED) { ··· 942 937 } 943 938 944 939 function peg$parseTextPart() { 945 - var s0, s1; 940 + let s0, s1; 946 941 947 942 s0 = peg$currPos; 948 943 s1 = peg$parseWord(); ··· 956 951 } 957 952 958 953 function peg$parseAttribute() { 959 - var s0; 954 + let s0; 960 955 961 956 s0 = peg$parseDue(); 962 957 if (s0 === peg$FAILED) { ··· 973 968 } 974 969 975 970 function peg$parseDue() { 976 - var s0, s1, s2; 971 + let s0, s1, s2; 977 972 978 973 s0 = peg$currPos; 979 - if (input.charCodeAt(peg$currPos) === 64) { 974 + if (input.substr(peg$currPos, 4) === peg$c6) { 980 975 s1 = peg$c6; 981 - peg$currPos++; 976 + peg$currPos += 4; 982 977 } else { 983 978 s1 = peg$FAILED; 984 979 if (peg$silentFails === 0) { peg$fail(peg$e6); } 985 980 } 981 + if (s1 === peg$FAILED) { 982 + if (input.charCodeAt(peg$currPos) === 64) { 983 + s1 = peg$c7; 984 + peg$currPos++; 985 + } else { 986 + s1 = peg$FAILED; 987 + if (peg$silentFails === 0) { peg$fail(peg$e7); } 988 + } 989 + } 986 990 if (s1 !== peg$FAILED) { 987 - s2 = peg$parseTimeValue(); 991 + s2 = peg$parseDateValue(); 988 992 if (s2 !== peg$FAILED) { 989 993 peg$savedPos = s0; 990 994 s0 = peg$f10(s2); ··· 1001 1005 } 1002 1006 1003 1007 function peg$parseProject() { 1004 - var s0, s1, s2; 1008 + let s0, s1, s2; 1005 1009 1006 1010 s0 = peg$currPos; 1007 - if (input.substr(peg$currPos, 4) === peg$c7) { 1008 - s1 = peg$c7; 1011 + if (input.substr(peg$currPos, 4) === peg$c8) { 1012 + s1 = peg$c8; 1009 1013 peg$currPos += 4; 1010 1014 } else { 1011 1015 s1 = peg$FAILED; 1012 - if (peg$silentFails === 0) { peg$fail(peg$e7); } 1016 + if (peg$silentFails === 0) { peg$fail(peg$e8); } 1013 1017 } 1014 1018 if (s1 === peg$FAILED) { 1015 - if (input.substr(peg$currPos, 8) === peg$c8) { 1016 - s1 = peg$c8; 1019 + if (input.substr(peg$currPos, 8) === peg$c9) { 1020 + s1 = peg$c9; 1017 1021 peg$currPos += 8; 1018 1022 } else { 1019 1023 s1 = peg$FAILED; 1020 - if (peg$silentFails === 0) { peg$fail(peg$e8); } 1024 + if (peg$silentFails === 0) { peg$fail(peg$e9); } 1021 1025 } 1022 1026 if (s1 === peg$FAILED) { 1023 1027 if (input.charCodeAt(peg$currPos) === 43) { 1024 - s1 = peg$c9; 1028 + s1 = peg$c10; 1025 1029 peg$currPos++; 1026 1030 } else { 1027 1031 s1 = peg$FAILED; 1028 - if (peg$silentFails === 0) { peg$fail(peg$e9); } 1032 + if (peg$silentFails === 0) { peg$fail(peg$e10); } 1029 1033 } 1030 1034 } 1031 1035 } ··· 1047 1051 } 1048 1052 1049 1053 function peg$parsePriority() { 1050 - var s0, s1, s2; 1054 + let s0, s1; 1051 1055 1052 1056 s0 = peg$currPos; 1053 - if (input.substr(peg$currPos, 9) === peg$c10) { 1054 - s1 = peg$c10; 1055 - peg$currPos += 9; 1057 + if (input.substr(peg$currPos, 8) === peg$c11) { 1058 + s1 = peg$c11; 1059 + peg$currPos += 8; 1056 1060 } else { 1057 1061 s1 = peg$FAILED; 1058 - if (peg$silentFails === 0) { peg$fail(peg$e10); } 1062 + if (peg$silentFails === 0) { peg$fail(peg$e11); } 1059 1063 } 1060 - if (s1 !== peg$FAILED) { 1061 - s2 = input.charAt(peg$currPos); 1062 - if (peg$r0.test(s2)) { 1063 - peg$currPos++; 1064 - } else { 1065 - s2 = peg$FAILED; 1066 - if (peg$silentFails === 0) { peg$fail(peg$e11); } 1067 - } 1068 - if (s2 !== peg$FAILED) { 1069 - peg$savedPos = s0; 1070 - s0 = peg$f12(s2); 1064 + if (s1 === peg$FAILED) { 1065 + if (input.substr(peg$currPos, 2) === peg$c12) { 1066 + s1 = peg$c12; 1067 + peg$currPos += 2; 1071 1068 } else { 1072 - peg$currPos = s0; 1073 - s0 = peg$FAILED; 1069 + s1 = peg$FAILED; 1070 + if (peg$silentFails === 0) { peg$fail(peg$e12); } 1074 1071 } 1075 - } else { 1076 - peg$currPos = s0; 1077 - s0 = peg$FAILED; 1078 1072 } 1073 + if (s1 !== peg$FAILED) { 1074 + peg$savedPos = s0; 1075 + s1 = peg$f12(); 1076 + } 1077 + s0 = s1; 1079 1078 1080 1079 return s0; 1081 1080 } 1082 1081 1083 1082 function peg$parseTag() { 1084 - var s0, s1, s2; 1083 + let s0, s1, s2; 1085 1084 1086 1085 s0 = peg$currPos; 1087 1086 if (input.charCodeAt(peg$currPos) === 35) { 1088 - s1 = peg$c11; 1087 + s1 = peg$c13; 1089 1088 peg$currPos++; 1090 1089 } else { 1091 1090 s1 = peg$FAILED; 1092 - if (peg$silentFails === 0) { peg$fail(peg$e12); } 1091 + if (peg$silentFails === 0) { peg$fail(peg$e13); } 1093 1092 } 1094 1093 if (s1 !== peg$FAILED) { 1095 1094 s2 = peg$parseWord(); ··· 1109 1108 } 1110 1109 1111 1110 function peg$parseInteger() { 1112 - var s0, s1, s2; 1111 + let s0, s1, s2; 1113 1112 1114 1113 s0 = peg$currPos; 1115 1114 s1 = []; 1116 1115 s2 = input.charAt(peg$currPos); 1117 - if (peg$r1.test(s2)) { 1116 + if (peg$r0.test(s2)) { 1118 1117 peg$currPos++; 1119 1118 } else { 1120 1119 s2 = peg$FAILED; 1121 - if (peg$silentFails === 0) { peg$fail(peg$e13); } 1120 + if (peg$silentFails === 0) { peg$fail(peg$e14); } 1122 1121 } 1123 1122 if (s2 !== peg$FAILED) { 1124 1123 while (s2 !== peg$FAILED) { 1125 1124 s1.push(s2); 1126 1125 s2 = input.charAt(peg$currPos); 1127 - if (peg$r1.test(s2)) { 1126 + if (peg$r0.test(s2)) { 1128 1127 peg$currPos++; 1129 1128 } else { 1130 1129 s2 = peg$FAILED; 1131 - if (peg$silentFails === 0) { peg$fail(peg$e13); } 1130 + if (peg$silentFails === 0) { peg$fail(peg$e14); } 1132 1131 } 1133 1132 } 1134 1133 } else { ··· 1143 1142 return s0; 1144 1143 } 1145 1144 1146 - function peg$parseTimeValue() { 1147 - var s0, s1, s2; 1145 + function peg$parseDateValue() { 1146 + let s0, s1, s2; 1148 1147 1149 1148 s0 = peg$currPos; 1150 1149 s1 = []; 1151 1150 s2 = input.charAt(peg$currPos); 1152 - if (peg$r2.test(s2)) { 1151 + if (peg$r1.test(s2)) { 1153 1152 peg$currPos++; 1154 1153 } else { 1155 1154 s2 = peg$FAILED; 1156 - if (peg$silentFails === 0) { peg$fail(peg$e14); } 1155 + if (peg$silentFails === 0) { peg$fail(peg$e15); } 1157 1156 } 1158 1157 if (s2 !== peg$FAILED) { 1159 1158 while (s2 !== peg$FAILED) { 1160 1159 s1.push(s2); 1161 1160 s2 = input.charAt(peg$currPos); 1162 - if (peg$r2.test(s2)) { 1161 + if (peg$r1.test(s2)) { 1163 1162 peg$currPos++; 1164 1163 } else { 1165 1164 s2 = peg$FAILED; 1166 - if (peg$silentFails === 0) { peg$fail(peg$e14); } 1165 + if (peg$silentFails === 0) { peg$fail(peg$e15); } 1167 1166 } 1168 1167 } 1169 1168 } else { 1170 1169 s1 = peg$FAILED; 1171 1170 } 1172 1171 if (s1 !== peg$FAILED) { 1173 - if (input.substr(peg$currPos, 2) === peg$c12) { 1174 - s2 = peg$c12; 1175 - peg$currPos += 2; 1176 - } else { 1177 - s2 = peg$FAILED; 1178 - if (peg$silentFails === 0) { peg$fail(peg$e15); } 1179 - } 1180 - if (s2 === peg$FAILED) { 1181 - if (input.substr(peg$currPos, 2) === peg$c13) { 1182 - s2 = peg$c13; 1183 - peg$currPos += 2; 1184 - } else { 1185 - s2 = peg$FAILED; 1186 - if (peg$silentFails === 0) { peg$fail(peg$e16); } 1187 - } 1188 - } 1189 - if (s2 === peg$FAILED) { 1190 - s2 = null; 1191 - } 1192 1172 peg$savedPos = s0; 1193 - s0 = peg$f15(s1); 1194 - } else { 1195 - peg$currPos = s0; 1196 - s0 = peg$FAILED; 1173 + s1 = peg$f15(s1); 1197 1174 } 1175 + s0 = s1; 1198 1176 1199 1177 return s0; 1200 1178 } 1201 1179 1202 1180 function peg$parseWord() { 1203 - var s0, s1, s2; 1181 + let s0, s1, s2; 1204 1182 1205 1183 s0 = peg$currPos; 1206 1184 s1 = []; 1207 1185 s2 = input.charAt(peg$currPos); 1208 - if (peg$r3.test(s2)) { 1186 + if (peg$r2.test(s2)) { 1209 1187 peg$currPos++; 1210 1188 } else { 1211 1189 s2 = peg$FAILED; 1212 - if (peg$silentFails === 0) { peg$fail(peg$e17); } 1190 + if (peg$silentFails === 0) { peg$fail(peg$e16); } 1213 1191 } 1214 1192 if (s2 !== peg$FAILED) { 1215 1193 while (s2 !== peg$FAILED) { 1216 1194 s1.push(s2); 1217 1195 s2 = input.charAt(peg$currPos); 1218 - if (peg$r3.test(s2)) { 1196 + if (peg$r2.test(s2)) { 1219 1197 peg$currPos++; 1220 1198 } else { 1221 1199 s2 = peg$FAILED; 1222 - if (peg$silentFails === 0) { peg$fail(peg$e17); } 1200 + if (peg$silentFails === 0) { peg$fail(peg$e16); } 1223 1201 } 1224 1202 } 1225 1203 } else { ··· 1235 1213 } 1236 1214 1237 1215 function peg$parse_() { 1238 - var s0, s1, s2; 1216 + let s0, s1, s2; 1239 1217 1240 1218 s0 = peg$currPos; 1241 1219 s1 = []; 1242 1220 s2 = input.charAt(peg$currPos); 1243 - if (peg$r4.test(s2)) { 1221 + if (peg$r3.test(s2)) { 1244 1222 peg$currPos++; 1245 1223 } else { 1246 1224 s2 = peg$FAILED; 1247 - if (peg$silentFails === 0) { peg$fail(peg$e18); } 1225 + if (peg$silentFails === 0) { peg$fail(peg$e17); } 1248 1226 } 1249 1227 if (s2 !== peg$FAILED) { 1250 1228 while (s2 !== peg$FAILED) { 1251 1229 s1.push(s2); 1252 1230 s2 = input.charAt(peg$currPos); 1253 - if (peg$r4.test(s2)) { 1231 + if (peg$r3.test(s2)) { 1254 1232 peg$currPos++; 1255 1233 } else { 1256 1234 s2 = peg$FAILED; 1257 - if (peg$silentFails === 0) { peg$fail(peg$e18); } 1235 + if (peg$silentFails === 0) { peg$fail(peg$e17); } 1258 1236 } 1259 1237 } 1260 1238 } else { ··· 1270 1248 } 1271 1249 1272 1250 function peg$parseEOF() { 1273 - var s0, s1; 1251 + let s0, s1; 1274 1252 1275 1253 s0 = peg$currPos; 1276 1254 peg$silentFails++; ··· 1279 1257 peg$currPos++; 1280 1258 } else { 1281 1259 s1 = peg$FAILED; 1282 - if (peg$silentFails === 0) { peg$fail(peg$e19); } 1260 + if (peg$silentFails === 0) { peg$fail(peg$e18); } 1283 1261 } 1284 1262 peg$silentFails--; 1285 1263 if (s1 === peg$FAILED) { ··· 1318 1296 .filter(part => part.type === 'tag') 1319 1297 .map(part => part.value); 1320 1298 1299 + // Extract priority flag 1300 + const hasPriority = validParts.some(part => part.type === 'priority'); 1321 1301 1302 + // Extract due date 1303 + const dueDate = validParts 1304 + .filter(part => part.type === 'due') 1305 + .map(part => part.value)[0] || null; 1322 1306 1323 1307 return { 1324 - action: action, 1325 - selection: selection || [], 1326 - description: description || [], 1308 + action: action, 1309 + selection: selection || [], 1310 + description: description || [], 1327 1311 attributes: attributes || [], 1328 - project: project, 1312 + project: project, 1329 1313 tags: tags, 1314 + priority: hasPriority, 1315 + due: dueDate, 1330 1316 parts: parts || [], 1331 1317 reconstruct: function() { 1332 1318 const filterStr = this.filters.map(f => f.reconstruct()).join(','); ··· 1338 1324 1339 1325 peg$result = peg$startRuleFunction(); 1340 1326 1327 + const peg$success = (peg$result !== peg$FAILED && peg$currPos === input.length); 1328 + function peg$throw() { 1329 + if (peg$result !== peg$FAILED && peg$currPos < input.length) { 1330 + peg$fail(peg$endExpectation()); 1331 + } 1332 + 1333 + throw peg$buildStructuredError( 1334 + peg$maxFailExpected, 1335 + peg$maxFailPos < input.length ? peg$getUnicode(peg$maxFailPos) : null, 1336 + peg$maxFailPos < input.length 1337 + ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) 1338 + : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) 1339 + ); 1340 + } 1341 1341 if (options.peg$library) { 1342 1342 return /** @type {any} */ ({ 1343 1343 peg$result, 1344 1344 peg$currPos, 1345 1345 peg$FAILED, 1346 1346 peg$maxFailExpected, 1347 - peg$maxFailPos 1347 + peg$maxFailPos, 1348 + peg$success, 1349 + peg$throw: peg$success ? undefined : peg$throw, 1348 1350 }); 1349 1351 } 1350 - if (peg$result !== peg$FAILED && peg$currPos === input.length) { 1352 + if (peg$success) { 1351 1353 return peg$result; 1352 1354 } else { 1353 - if (peg$result !== peg$FAILED && peg$currPos < input.length) { 1354 - peg$fail(peg$endExpectation()); 1355 - } 1356 - 1357 - throw peg$buildStructuredError( 1358 - peg$maxFailExpected, 1359 - peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, 1360 - peg$maxFailPos < input.length 1361 - ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) 1362 - : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) 1363 - ); 1355 + peg$throw(); 1364 1356 } 1365 1357 } 1366 1358
+389 -397
parser/command_js.js
··· 1 - // @generated by Peggy 4.2.0. 1 + // @generated by Peggy 5.0.2. 2 2 // 3 3 // https://peggyjs.org/ 4 4 5 5 6 - function peg$subclass(child, parent) { 7 - function C() { this.constructor = child; } 8 - C.prototype = parent.prototype; 9 - child.prototype = new C(); 10 - } 6 + class peg$SyntaxError extends SyntaxError { 7 + constructor(message, expected, found, location) { 8 + super(message); 9 + this.expected = expected; 10 + this.found = found; 11 + this.location = location; 12 + this.name = "SyntaxError"; 13 + } 11 14 12 - function peg$SyntaxError(message, expected, found, location) { 13 - var self = Error.call(this, message); 14 - // istanbul ignore next Check is a necessary evil to support older environments 15 - if (Object.setPrototypeOf) { 16 - Object.setPrototypeOf(self, peg$SyntaxError.prototype); 15 + format(sources) { 16 + let str = "Error: " + this.message; 17 + if (this.location) { 18 + let src = null; 19 + const st = sources.find(s => s.source === this.location.source); 20 + if (st) { 21 + src = st.text.split(/\r\n|\n|\r/g); 22 + } 23 + const s = this.location.start; 24 + const offset_s = (this.location.source && (typeof this.location.source.offset === "function")) 25 + ? this.location.source.offset(s) 26 + : s; 27 + const loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column; 28 + if (src) { 29 + const e = this.location.end; 30 + const filler = "".padEnd(offset_s.line.toString().length, " "); 31 + const line = src[s.line - 1]; 32 + const last = s.line === e.line ? e.column : line.length + 1; 33 + const hatLen = (last - s.column) || 1; 34 + str += "\n --> " + loc + "\n" 35 + + filler + " |\n" 36 + + offset_s.line + " | " + line + "\n" 37 + + filler + " | " + "".padEnd(s.column - 1, " ") 38 + + "".padEnd(hatLen, "^"); 39 + } else { 40 + str += "\n at " + loc; 41 + } 42 + } 43 + return str; 17 44 } 18 - self.expected = expected; 19 - self.found = found; 20 - self.location = location; 21 - self.name = "SyntaxError"; 22 - return self; 23 - } 24 45 25 - peg$subclass(peg$SyntaxError, Error); 46 + static buildMessage(expected, found) { 47 + function hex(ch) { 48 + return ch.codePointAt(0).toString(16).toUpperCase(); 49 + } 26 50 27 - function peg$padEnd(str, targetLength, padString) { 28 - padString = padString || " "; 29 - if (str.length > targetLength) { return str; } 30 - targetLength -= str.length; 31 - padString += padString.repeat(targetLength); 32 - return str + padString.slice(0, targetLength); 33 - } 34 - 35 - peg$SyntaxError.prototype.format = function(sources) { 36 - var str = "Error: " + this.message; 37 - if (this.location) { 38 - var src = null; 39 - var k; 40 - for (k = 0; k < sources.length; k++) { 41 - if (sources[k].source === this.location.source) { 42 - src = sources[k].text.split(/\r\n|\n|\r/g); 43 - break; 51 + const nonPrintable = Object.prototype.hasOwnProperty.call(RegExp.prototype, "unicode") 52 + ? new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]", "gu") 53 + : null; 54 + function unicodeEscape(s) { 55 + if (nonPrintable) { 56 + return s.replace(nonPrintable, ch => "\\u{" + hex(ch) + "}"); 44 57 } 58 + return s; 45 59 } 46 - var s = this.location.start; 47 - var offset_s = (this.location.source && (typeof this.location.source.offset === "function")) 48 - ? this.location.source.offset(s) 49 - : s; 50 - var loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column; 51 - if (src) { 52 - var e = this.location.end; 53 - var filler = peg$padEnd("", offset_s.line.toString().length, ' '); 54 - var line = src[s.line - 1]; 55 - var last = s.line === e.line ? e.column : line.length + 1; 56 - var hatLen = (last - s.column) || 1; 57 - str += "\n --> " + loc + "\n" 58 - + filler + " |\n" 59 - + offset_s.line + " | " + line + "\n" 60 - + filler + " | " + peg$padEnd("", s.column - 1, ' ') 61 - + peg$padEnd("", hatLen, "^"); 62 - } else { 63 - str += "\n at " + loc; 60 + 61 + function literalEscape(s) { 62 + return unicodeEscape(s 63 + .replace(/\\/g, "\\\\") 64 + .replace(/"/g, "\\\"") 65 + .replace(/\0/g, "\\0") 66 + .replace(/\t/g, "\\t") 67 + .replace(/\n/g, "\\n") 68 + .replace(/\r/g, "\\r") 69 + .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch)) 70 + .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch))); 64 71 } 65 - } 66 - return str; 67 - }; 68 72 69 - peg$SyntaxError.buildMessage = function(expected, found) { 70 - var DESCRIBE_EXPECTATION_FNS = { 71 - literal: function(expectation) { 72 - return "\"" + literalEscape(expectation.text) + "\""; 73 - }, 73 + function classEscape(s) { 74 + return unicodeEscape(s 75 + .replace(/\\/g, "\\\\") 76 + .replace(/\]/g, "\\]") 77 + .replace(/\^/g, "\\^") 78 + .replace(/-/g, "\\-") 79 + .replace(/\0/g, "\\0") 80 + .replace(/\t/g, "\\t") 81 + .replace(/\n/g, "\\n") 82 + .replace(/\r/g, "\\r") 83 + .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch)) 84 + .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch))); 85 + } 74 86 75 - class: function(expectation) { 76 - var escapedParts = expectation.parts.map(function(part) { 77 - return Array.isArray(part) 78 - ? classEscape(part[0]) + "-" + classEscape(part[1]) 79 - : classEscape(part); 80 - }); 87 + const DESCRIBE_EXPECTATION_FNS = { 88 + literal(expectation) { 89 + return "\"" + literalEscape(expectation.text) + "\""; 90 + }, 81 91 82 - return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]"; 83 - }, 92 + class(expectation) { 93 + const escapedParts = expectation.parts.map( 94 + part => (Array.isArray(part) 95 + ? classEscape(part[0]) + "-" + classEscape(part[1]) 96 + : classEscape(part)) 97 + ); 84 98 85 - any: function() { 86 - return "any character"; 87 - }, 99 + return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]" + (expectation.unicode ? "u" : ""); 100 + }, 88 101 89 - end: function() { 90 - return "end of input"; 91 - }, 102 + any() { 103 + return "any character"; 104 + }, 92 105 93 - other: function(expectation) { 94 - return expectation.description; 95 - } 96 - }; 106 + end() { 107 + return "end of input"; 108 + }, 97 109 98 - function hex(ch) { 99 - return ch.charCodeAt(0).toString(16).toUpperCase(); 100 - } 110 + other(expectation) { 111 + return expectation.description; 112 + }, 113 + }; 101 114 102 - function literalEscape(s) { 103 - return s 104 - .replace(/\\/g, "\\\\") 105 - .replace(/"/g, "\\\"") 106 - .replace(/\0/g, "\\0") 107 - .replace(/\t/g, "\\t") 108 - .replace(/\n/g, "\\n") 109 - .replace(/\r/g, "\\r") 110 - .replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); }) 111 - .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); }); 112 - } 115 + function describeExpectation(expectation) { 116 + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); 117 + } 113 118 114 - function classEscape(s) { 115 - return s 116 - .replace(/\\/g, "\\\\") 117 - .replace(/\]/g, "\\]") 118 - .replace(/\^/g, "\\^") 119 - .replace(/-/g, "\\-") 120 - .replace(/\0/g, "\\0") 121 - .replace(/\t/g, "\\t") 122 - .replace(/\n/g, "\\n") 123 - .replace(/\r/g, "\\r") 124 - .replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); }) 125 - .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); }); 126 - } 119 + function describeExpected(expected) { 120 + const descriptions = expected.map(describeExpectation); 121 + descriptions.sort(); 127 122 128 - function describeExpectation(expectation) { 129 - return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); 130 - } 123 + if (descriptions.length > 0) { 124 + let j = 1; 125 + for (let i = 1; i < descriptions.length; i++) { 126 + if (descriptions[i - 1] !== descriptions[i]) { 127 + descriptions[j] = descriptions[i]; 128 + j++; 129 + } 130 + } 131 + descriptions.length = j; 132 + } 131 133 132 - function describeExpected(expected) { 133 - var descriptions = expected.map(describeExpectation); 134 - var i, j; 134 + switch (descriptions.length) { 135 + case 1: 136 + return descriptions[0]; 135 137 136 - descriptions.sort(); 138 + case 2: 139 + return descriptions[0] + " or " + descriptions[1]; 137 140 138 - if (descriptions.length > 0) { 139 - for (i = 1, j = 1; i < descriptions.length; i++) { 140 - if (descriptions[i - 1] !== descriptions[i]) { 141 - descriptions[j] = descriptions[i]; 142 - j++; 143 - } 141 + default: 142 + return descriptions.slice(0, -1).join(", ") 143 + + ", or " 144 + + descriptions[descriptions.length - 1]; 144 145 } 145 - descriptions.length = j; 146 146 } 147 147 148 - switch (descriptions.length) { 149 - case 1: 150 - return descriptions[0]; 151 - 152 - case 2: 153 - return descriptions[0] + " or " + descriptions[1]; 154 - 155 - default: 156 - return descriptions.slice(0, -1).join(", ") 157 - + ", or " 158 - + descriptions[descriptions.length - 1]; 148 + function describeFound(found) { 149 + return found ? "\"" + literalEscape(found) + "\"" : "end of input"; 159 150 } 160 - } 161 151 162 - function describeFound(found) { 163 - return found ? "\"" + literalEscape(found) + "\"" : "end of input"; 152 + return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; 164 153 } 165 - 166 - return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; 167 - }; 154 + } 168 155 169 156 function peg$parse(input, options) { 170 157 options = options !== undefined ? options : {}; 171 158 172 - var peg$FAILED = {}; 173 - var peg$source = options.grammarSource; 159 + const peg$FAILED = {}; 160 + const peg$source = options.grammarSource; 174 161 175 - var peg$startRuleFunctions = { Start: peg$parseStart }; 176 - var peg$startRuleFunction = peg$parseStart; 162 + const peg$startRuleFunctions = { 163 + Start: peg$parseStart, 164 + }; 165 + let peg$startRuleFunction = peg$parseStart; 177 166 178 - var peg$c0 = "add"; 179 - var peg$c1 = "done"; 180 - var peg$c2 = "filter"; 181 - var peg$c3 = "modify"; 182 - var peg$c4 = "-"; 183 - var peg$c5 = ","; 184 - var peg$c6 = "@"; 185 - var peg$c7 = "pro:"; 186 - var peg$c8 = "project:"; 187 - var peg$c9 = "+"; 188 - var peg$c10 = "priority:"; 189 - var peg$c11 = "#"; 190 - var peg$c12 = "am"; 191 - var peg$c13 = "pm"; 167 + const peg$c0 = "add"; 168 + const peg$c1 = "done"; 169 + const peg$c2 = "filter"; 170 + const peg$c3 = "modify"; 171 + const peg$c4 = "-"; 172 + const peg$c5 = ","; 173 + const peg$c6 = "due:"; 174 + const peg$c7 = "@"; 175 + const peg$c8 = "pro:"; 176 + const peg$c9 = "project:"; 177 + const peg$c10 = "+"; 178 + const peg$c11 = "priority"; 179 + const peg$c12 = "!!"; 180 + const peg$c13 = "#"; 192 181 193 - var peg$r0 = /^[HML]/; 194 - var peg$r1 = /^[0-9]/; 195 - var peg$r2 = /^[0-9:]/; 196 - var peg$r3 = /^[a-zA-Z0-9_\-]/; 197 - var peg$r4 = /^[ \t]/; 182 + const peg$r0 = /^[0-9]/; 183 + const peg$r1 = /^[0-9\/\-]/; 184 + const peg$r2 = /^[a-zA-Z0-9_\-]/; 185 + const peg$r3 = /^[ \t]/; 198 186 199 - var peg$e0 = peg$literalExpectation("add", false); 200 - var peg$e1 = peg$literalExpectation("done", false); 201 - var peg$e2 = peg$literalExpectation("filter", false); 202 - var peg$e3 = peg$literalExpectation("modify", false); 203 - var peg$e4 = peg$literalExpectation("-", false); 204 - var peg$e5 = peg$literalExpectation(",", false); 205 - var peg$e6 = peg$literalExpectation("@", false); 206 - var peg$e7 = peg$literalExpectation("pro:", false); 207 - var peg$e8 = peg$literalExpectation("project:", false); 208 - var peg$e9 = peg$literalExpectation("+", false); 209 - var peg$e10 = peg$literalExpectation("priority:", false); 210 - var peg$e11 = peg$classExpectation(["H", "M", "L"], false, false); 211 - var peg$e12 = peg$literalExpectation("#", false); 212 - var peg$e13 = peg$classExpectation([["0", "9"]], false, false); 213 - var peg$e14 = peg$classExpectation([["0", "9"], ":"], false, false); 214 - var peg$e15 = peg$literalExpectation("am", false); 215 - var peg$e16 = peg$literalExpectation("pm", false); 216 - var peg$e17 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false); 217 - var peg$e18 = peg$classExpectation([" ", "\t"], false, false); 218 - var peg$e19 = peg$anyExpectation(); 187 + const peg$e0 = peg$literalExpectation("add", false); 188 + const peg$e1 = peg$literalExpectation("done", false); 189 + const peg$e2 = peg$literalExpectation("filter", false); 190 + const peg$e3 = peg$literalExpectation("modify", false); 191 + const peg$e4 = peg$literalExpectation("-", false); 192 + const peg$e5 = peg$literalExpectation(",", false); 193 + const peg$e6 = peg$literalExpectation("due:", false); 194 + const peg$e7 = peg$literalExpectation("@", false); 195 + const peg$e8 = peg$literalExpectation("pro:", false); 196 + const peg$e9 = peg$literalExpectation("project:", false); 197 + const peg$e10 = peg$literalExpectation("+", false); 198 + const peg$e11 = peg$literalExpectation("priority", false); 199 + const peg$e12 = peg$literalExpectation("!!", false); 200 + const peg$e13 = peg$literalExpectation("#", false); 201 + const peg$e14 = peg$classExpectation([["0", "9"]], false, false, false); 202 + const peg$e15 = peg$classExpectation([["0", "9"], "/", "-"], false, false, false); 203 + const peg$e16 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false, false); 204 + const peg$e17 = peg$classExpectation([" ", "\t"], false, false, false); 205 + const peg$e18 = peg$anyExpectation(); 219 206 220 - var peg$f0 = function(selection, parts) { 221 - return makeCommand('add', selection, parts.filter(p => p !== null)); 222 - }; 223 - var peg$f1 = function(selection, parts) { 224 - return makeCommand('done', selection, parts.filter(p => p !== null)); 225 - }; 226 - var peg$f2 = function(selection, moreFilters) { 227 - return makeCommand('filter', selection, moreFilters); 228 - }; 229 - var peg$f3 = function(selection, moreFilters) { 230 - return makeCommand('modify', selection, moreFilters); 231 - }; 232 - var peg$f4 = function(first, rest) { 233 - return [first, ...rest.map(r => r[1])]; 234 - }; 235 - var peg$f5 = function(start, end) { 236 - const ids = []; 237 - for (let i = start; i <= end; i++) { 238 - ids.push(i); 207 + function peg$f0(selection, parts) { 208 + return makeCommand('add', selection, parts.filter(p => p !== null)); 239 209 } 240 - return ids; 241 - }; 242 - var peg$f6 = function(id) { 243 - return [id]; 244 - }; 245 - var peg$f7 = function(first, rest) { 246 - return [first, ...rest.map(r => r[1])]; 247 - }; 248 - var peg$f8 = function(first, rest, trailing) { 249 - const ids = [first, ...rest.map(r => r[1])].flat(); 250 - return { 251 - type: 'id', 252 - ids: ids, 253 - reconstruct: function() { return this.ids.join(','); } 254 - }; 255 - }; 256 - var peg$f9 = function(chars) { 257 - return { 258 - type: "text", 259 - value: chars, 260 - reconstruct: function() { return this.value; } 261 - }; 262 - }; 263 - var peg$f10 = function(value) { 264 - return { 265 - type: "due", 266 - value: value, 267 - reconstruct: function() { return `@${this.value}`; } 268 - }; 269 - }; 270 - var peg$f11 = function(value) { 271 - return { 272 - type: "project", 273 - value: value, 274 - reconstruct: function() { return `+${this.value}`; } 275 - }; 276 - }; 277 - var peg$f12 = function(value) { 278 - return { 279 - type: "priority", 280 - value: value, 281 - reconstruct: function() { return `priority:${this.value}`; } 282 - }; 283 - }; 284 - var peg$f13 = function(value) { 285 - return { 286 - type: "tag", 287 - value: value, 288 - reconstruct: function() { return `#${this.value}`; } 289 - }; 290 - }; 291 - var peg$f14 = function(digits) { 292 - return parseInt(digits.join(''), 10); 293 - }; 294 - var peg$f15 = function(chars) { 295 - return chars.join('') + (text() || ''); 296 - }; 297 - var peg$f16 = function(chars) { 298 - return chars.join(''); 299 - }; 300 - var peg$f17 = function() { 301 - return null; 302 - }; 303 - var peg$currPos = options.peg$currPos | 0; 304 - var peg$savedPos = peg$currPos; 305 - var peg$posDetailsCache = [{ line: 1, column: 1 }]; 306 - var peg$maxFailPos = peg$currPos; 307 - var peg$maxFailExpected = options.peg$maxFailExpected || []; 308 - var peg$silentFails = options.peg$silentFails | 0; 210 + function peg$f1(selection, parts) { 211 + return makeCommand('done', selection, parts.filter(p => p !== null)); 212 + } 213 + function peg$f2(selection, moreFilters) { 214 + return makeCommand('filter', selection, moreFilters); 215 + } 216 + function peg$f3(selection, moreFilters) { 217 + return makeCommand('modify', selection, moreFilters); 218 + } 219 + function peg$f4(first, rest) { 220 + return [first, ...rest.map(r => r[1])]; 221 + } 222 + function peg$f5(start, end) { 223 + const ids = []; 224 + for (let i = start; i <= end; i++) { 225 + ids.push(i); 226 + } 227 + return ids; 228 + } 229 + function peg$f6(id) { 230 + return [id]; 231 + } 232 + function peg$f7(first, rest) { 233 + return [first, ...rest.map(r => r[1])]; 234 + } 235 + function peg$f8(first, rest, trailing) { 236 + const ids = [first, ...rest.map(r => r[1])].flat(); 237 + return { 238 + type: 'id', 239 + ids: ids, 240 + reconstruct: function() { return this.ids.join(','); } 241 + }; 242 + } 243 + function peg$f9(chars) { 244 + return { 245 + type: "text", 246 + value: chars, 247 + reconstruct: function() { return this.value; } 248 + }; 249 + } 250 + function peg$f10(value) { 251 + return { 252 + type: "due", 253 + value: value, 254 + reconstruct: function() { return `@${this.value}`; } 255 + }; 256 + } 257 + function peg$f11(value) { 258 + return { 259 + type: "project", 260 + value: value, 261 + reconstruct: function() { return `+${this.value}`; } 262 + }; 263 + } 264 + function peg$f12() { 265 + return { 266 + type: "priority", 267 + value: true, 268 + reconstruct: function() { return `priority:${this.value}`; } 269 + }; 270 + } 271 + function peg$f13(value) { 272 + return { 273 + type: "tag", 274 + value: value, 275 + reconstruct: function() { return `#${this.value}`; } 276 + }; 277 + } 278 + function peg$f14(digits) { 279 + return parseInt(digits.join(''), 10); 280 + } 281 + function peg$f15(chars) { 282 + return chars.join(''); 283 + } 284 + function peg$f16(chars) { 285 + return chars.join(''); 286 + } 287 + function peg$f17() { 288 + return null; 289 + } 290 + let peg$currPos = options.peg$currPos | 0; 291 + let peg$savedPos = peg$currPos; 292 + const peg$posDetailsCache = [{ line: 1, column: 1 }]; 293 + let peg$maxFailPos = peg$currPos; 294 + let peg$maxFailExpected = options.peg$maxFailExpected || []; 295 + let peg$silentFails = options.peg$silentFails | 0; 309 296 310 - var peg$result; 297 + let peg$result; 311 298 312 299 if (options.startRule) { 313 300 if (!(options.startRule in peg$startRuleFunctions)) { ··· 329 316 return { 330 317 source: peg$source, 331 318 start: peg$savedPos, 332 - end: peg$currPos 319 + end: peg$currPos, 333 320 }; 334 321 } 335 322 ··· 357 344 throw peg$buildSimpleError(message, location); 358 345 } 359 346 347 + function peg$getUnicode(pos = peg$currPos) { 348 + const cp = input.codePointAt(pos); 349 + if (cp === undefined) { 350 + return ""; 351 + } 352 + return String.fromCodePoint(cp); 353 + } 354 + 360 355 function peg$literalExpectation(text, ignoreCase) { 361 - return { type: "literal", text: text, ignoreCase: ignoreCase }; 356 + return { type: "literal", text, ignoreCase }; 362 357 } 363 358 364 - function peg$classExpectation(parts, inverted, ignoreCase) { 365 - return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; 359 + function peg$classExpectation(parts, inverted, ignoreCase, unicode) { 360 + return { type: "class", parts, inverted, ignoreCase, unicode }; 366 361 } 367 362 368 363 function peg$anyExpectation() { ··· 374 369 } 375 370 376 371 function peg$otherExpectation(description) { 377 - return { type: "other", description: description }; 372 + return { type: "other", description }; 378 373 } 379 374 380 375 function peg$computePosDetails(pos) { 381 - var details = peg$posDetailsCache[pos]; 382 - var p; 376 + let details = peg$posDetailsCache[pos]; 377 + let p; 383 378 384 379 if (details) { 385 380 return details; ··· 394 389 details = peg$posDetailsCache[p]; 395 390 details = { 396 391 line: details.line, 397 - column: details.column 392 + column: details.column, 398 393 }; 399 394 400 395 while (p < pos) { ··· 415 410 } 416 411 417 412 function peg$computeLocation(startPos, endPos, offset) { 418 - var startPosDetails = peg$computePosDetails(startPos); 419 - var endPosDetails = peg$computePosDetails(endPos); 413 + const startPosDetails = peg$computePosDetails(startPos); 414 + const endPosDetails = peg$computePosDetails(endPos); 420 415 421 - var res = { 416 + const res = { 422 417 source: peg$source, 423 418 start: { 424 419 offset: startPos, 425 420 line: startPosDetails.line, 426 - column: startPosDetails.column 421 + column: startPosDetails.column, 427 422 }, 428 423 end: { 429 424 offset: endPos, 430 425 line: endPosDetails.line, 431 - column: endPosDetails.column 432 - } 426 + column: endPosDetails.column, 427 + }, 433 428 }; 434 429 if (offset && peg$source && (typeof peg$source.offset === "function")) { 435 430 res.start = peg$source.offset(res.start); ··· 463 458 } 464 459 465 460 function peg$parseStart() { 466 - var s0; 461 + let s0; 467 462 468 463 s0 = peg$parseAddCommand(); 469 464 if (s0 === peg$FAILED) { ··· 480 475 } 481 476 482 477 function peg$parseAddCommand() { 483 - var s0, s1, s2, s3, s4, s5, s6; 478 + let s0, s1, s2, s3, s4, s5, s6; 484 479 485 480 s0 = peg$currPos; 486 481 s1 = peg$parseSelections(); ··· 543 538 } 544 539 545 540 function peg$parseDoneCommand() { 546 - var s0, s1, s2, s3, s4, s5, s6; 541 + let s0, s1, s2, s3, s4, s5, s6; 547 542 548 543 s0 = peg$currPos; 549 544 s1 = peg$parseSelections(); ··· 595 590 } 596 591 597 592 function peg$parseExplicitFilterCommand() { 598 - var s0, s1, s2, s3, s4, s5, s6; 593 + let s0, s1, s2, s3, s4, s5, s6; 599 594 600 595 s0 = peg$currPos; 601 596 s1 = peg$parseSelections(); ··· 643 638 } 644 639 645 640 function peg$parseModifyCommand() { 646 - var s0, s1, s2, s3, s4, s5, s6; 641 + let s0, s1, s2, s3, s4, s5, s6; 647 642 648 643 s0 = peg$currPos; 649 644 s1 = peg$parseSelections(); ··· 691 686 } 692 687 693 688 function peg$parseFilters() { 694 - var s0, s1, s2, s3, s4, s5; 689 + let s0, s1, s2, s3, s4, s5; 695 690 696 691 s0 = peg$currPos; 697 692 s1 = peg$parsePart(); ··· 741 736 } 742 737 743 738 function peg$parseIdRange() { 744 - var s0, s1, s2, s3; 739 + let s0, s1, s2, s3; 745 740 746 741 s0 = peg$currPos; 747 742 s1 = peg$parseInteger(); ··· 775 770 } 776 771 777 772 function peg$parseSingleId() { 778 - var s0, s1; 773 + let s0, s1; 779 774 780 775 s0 = peg$currPos; 781 776 s1 = peg$parseInteger(); ··· 789 784 } 790 785 791 786 function peg$parseSelections() { 792 - var s0, s1, s2, s3, s4, s5; 787 + let s0, s1, s2, s3, s4, s5; 793 788 794 789 s0 = peg$currPos; 795 790 s1 = peg$parseSelection(); ··· 839 834 } 840 835 841 836 function peg$parseSelection() { 842 - var s0; 837 + let s0; 843 838 844 839 s0 = peg$parseIdFilter(); 845 840 if (s0 === peg$FAILED) { ··· 850 845 } 851 846 852 847 function peg$parseIdFilter() { 853 - var s0, s1, s2, s3, s4, s5; 848 + let s0, s1, s2, s3, s4, s5; 854 849 855 850 s0 = peg$currPos; 856 851 s1 = peg$parseIdRange(); ··· 931 926 } 932 927 933 928 function peg$parsePart() { 934 - var s0; 929 + let s0; 935 930 936 931 s0 = peg$parseAttribute(); 937 932 if (s0 === peg$FAILED) { ··· 942 937 } 943 938 944 939 function peg$parseTextPart() { 945 - var s0, s1; 940 + let s0, s1; 946 941 947 942 s0 = peg$currPos; 948 943 s1 = peg$parseWord(); ··· 956 951 } 957 952 958 953 function peg$parseAttribute() { 959 - var s0; 954 + let s0; 960 955 961 956 s0 = peg$parseDue(); 962 957 if (s0 === peg$FAILED) { ··· 973 968 } 974 969 975 970 function peg$parseDue() { 976 - var s0, s1, s2; 971 + let s0, s1, s2; 977 972 978 973 s0 = peg$currPos; 979 - if (input.charCodeAt(peg$currPos) === 64) { 974 + if (input.substr(peg$currPos, 4) === peg$c6) { 980 975 s1 = peg$c6; 981 - peg$currPos++; 976 + peg$currPos += 4; 982 977 } else { 983 978 s1 = peg$FAILED; 984 979 if (peg$silentFails === 0) { peg$fail(peg$e6); } 985 980 } 981 + if (s1 === peg$FAILED) { 982 + if (input.charCodeAt(peg$currPos) === 64) { 983 + s1 = peg$c7; 984 + peg$currPos++; 985 + } else { 986 + s1 = peg$FAILED; 987 + if (peg$silentFails === 0) { peg$fail(peg$e7); } 988 + } 989 + } 986 990 if (s1 !== peg$FAILED) { 987 - s2 = peg$parseTimeValue(); 991 + s2 = peg$parseDateValue(); 988 992 if (s2 !== peg$FAILED) { 989 993 peg$savedPos = s0; 990 994 s0 = peg$f10(s2); ··· 1001 1005 } 1002 1006 1003 1007 function peg$parseProject() { 1004 - var s0, s1, s2; 1008 + let s0, s1, s2; 1005 1009 1006 1010 s0 = peg$currPos; 1007 - if (input.substr(peg$currPos, 4) === peg$c7) { 1008 - s1 = peg$c7; 1011 + if (input.substr(peg$currPos, 4) === peg$c8) { 1012 + s1 = peg$c8; 1009 1013 peg$currPos += 4; 1010 1014 } else { 1011 1015 s1 = peg$FAILED; 1012 - if (peg$silentFails === 0) { peg$fail(peg$e7); } 1016 + if (peg$silentFails === 0) { peg$fail(peg$e8); } 1013 1017 } 1014 1018 if (s1 === peg$FAILED) { 1015 - if (input.substr(peg$currPos, 8) === peg$c8) { 1016 - s1 = peg$c8; 1019 + if (input.substr(peg$currPos, 8) === peg$c9) { 1020 + s1 = peg$c9; 1017 1021 peg$currPos += 8; 1018 1022 } else { 1019 1023 s1 = peg$FAILED; 1020 - if (peg$silentFails === 0) { peg$fail(peg$e8); } 1024 + if (peg$silentFails === 0) { peg$fail(peg$e9); } 1021 1025 } 1022 1026 if (s1 === peg$FAILED) { 1023 1027 if (input.charCodeAt(peg$currPos) === 43) { 1024 - s1 = peg$c9; 1028 + s1 = peg$c10; 1025 1029 peg$currPos++; 1026 1030 } else { 1027 1031 s1 = peg$FAILED; 1028 - if (peg$silentFails === 0) { peg$fail(peg$e9); } 1032 + if (peg$silentFails === 0) { peg$fail(peg$e10); } 1029 1033 } 1030 1034 } 1031 1035 } ··· 1047 1051 } 1048 1052 1049 1053 function peg$parsePriority() { 1050 - var s0, s1, s2; 1054 + let s0, s1; 1051 1055 1052 1056 s0 = peg$currPos; 1053 - if (input.substr(peg$currPos, 9) === peg$c10) { 1054 - s1 = peg$c10; 1055 - peg$currPos += 9; 1057 + if (input.substr(peg$currPos, 8) === peg$c11) { 1058 + s1 = peg$c11; 1059 + peg$currPos += 8; 1056 1060 } else { 1057 1061 s1 = peg$FAILED; 1058 - if (peg$silentFails === 0) { peg$fail(peg$e10); } 1062 + if (peg$silentFails === 0) { peg$fail(peg$e11); } 1059 1063 } 1060 - if (s1 !== peg$FAILED) { 1061 - s2 = input.charAt(peg$currPos); 1062 - if (peg$r0.test(s2)) { 1063 - peg$currPos++; 1064 - } else { 1065 - s2 = peg$FAILED; 1066 - if (peg$silentFails === 0) { peg$fail(peg$e11); } 1067 - } 1068 - if (s2 !== peg$FAILED) { 1069 - peg$savedPos = s0; 1070 - s0 = peg$f12(s2); 1064 + if (s1 === peg$FAILED) { 1065 + if (input.substr(peg$currPos, 2) === peg$c12) { 1066 + s1 = peg$c12; 1067 + peg$currPos += 2; 1071 1068 } else { 1072 - peg$currPos = s0; 1073 - s0 = peg$FAILED; 1069 + s1 = peg$FAILED; 1070 + if (peg$silentFails === 0) { peg$fail(peg$e12); } 1074 1071 } 1075 - } else { 1076 - peg$currPos = s0; 1077 - s0 = peg$FAILED; 1078 1072 } 1073 + if (s1 !== peg$FAILED) { 1074 + peg$savedPos = s0; 1075 + s1 = peg$f12(); 1076 + } 1077 + s0 = s1; 1079 1078 1080 1079 return s0; 1081 1080 } 1082 1081 1083 1082 function peg$parseTag() { 1084 - var s0, s1, s2; 1083 + let s0, s1, s2; 1085 1084 1086 1085 s0 = peg$currPos; 1087 1086 if (input.charCodeAt(peg$currPos) === 35) { 1088 - s1 = peg$c11; 1087 + s1 = peg$c13; 1089 1088 peg$currPos++; 1090 1089 } else { 1091 1090 s1 = peg$FAILED; 1092 - if (peg$silentFails === 0) { peg$fail(peg$e12); } 1091 + if (peg$silentFails === 0) { peg$fail(peg$e13); } 1093 1092 } 1094 1093 if (s1 !== peg$FAILED) { 1095 1094 s2 = peg$parseWord(); ··· 1109 1108 } 1110 1109 1111 1110 function peg$parseInteger() { 1112 - var s0, s1, s2; 1111 + let s0, s1, s2; 1113 1112 1114 1113 s0 = peg$currPos; 1115 1114 s1 = []; 1116 1115 s2 = input.charAt(peg$currPos); 1117 - if (peg$r1.test(s2)) { 1116 + if (peg$r0.test(s2)) { 1118 1117 peg$currPos++; 1119 1118 } else { 1120 1119 s2 = peg$FAILED; 1121 - if (peg$silentFails === 0) { peg$fail(peg$e13); } 1120 + if (peg$silentFails === 0) { peg$fail(peg$e14); } 1122 1121 } 1123 1122 if (s2 !== peg$FAILED) { 1124 1123 while (s2 !== peg$FAILED) { 1125 1124 s1.push(s2); 1126 1125 s2 = input.charAt(peg$currPos); 1127 - if (peg$r1.test(s2)) { 1126 + if (peg$r0.test(s2)) { 1128 1127 peg$currPos++; 1129 1128 } else { 1130 1129 s2 = peg$FAILED; 1131 - if (peg$silentFails === 0) { peg$fail(peg$e13); } 1130 + if (peg$silentFails === 0) { peg$fail(peg$e14); } 1132 1131 } 1133 1132 } 1134 1133 } else { ··· 1143 1142 return s0; 1144 1143 } 1145 1144 1146 - function peg$parseTimeValue() { 1147 - var s0, s1, s2; 1145 + function peg$parseDateValue() { 1146 + let s0, s1, s2; 1148 1147 1149 1148 s0 = peg$currPos; 1150 1149 s1 = []; 1151 1150 s2 = input.charAt(peg$currPos); 1152 - if (peg$r2.test(s2)) { 1151 + if (peg$r1.test(s2)) { 1153 1152 peg$currPos++; 1154 1153 } else { 1155 1154 s2 = peg$FAILED; 1156 - if (peg$silentFails === 0) { peg$fail(peg$e14); } 1155 + if (peg$silentFails === 0) { peg$fail(peg$e15); } 1157 1156 } 1158 1157 if (s2 !== peg$FAILED) { 1159 1158 while (s2 !== peg$FAILED) { 1160 1159 s1.push(s2); 1161 1160 s2 = input.charAt(peg$currPos); 1162 - if (peg$r2.test(s2)) { 1161 + if (peg$r1.test(s2)) { 1163 1162 peg$currPos++; 1164 1163 } else { 1165 1164 s2 = peg$FAILED; 1166 - if (peg$silentFails === 0) { peg$fail(peg$e14); } 1165 + if (peg$silentFails === 0) { peg$fail(peg$e15); } 1167 1166 } 1168 1167 } 1169 1168 } else { 1170 1169 s1 = peg$FAILED; 1171 1170 } 1172 1171 if (s1 !== peg$FAILED) { 1173 - if (input.substr(peg$currPos, 2) === peg$c12) { 1174 - s2 = peg$c12; 1175 - peg$currPos += 2; 1176 - } else { 1177 - s2 = peg$FAILED; 1178 - if (peg$silentFails === 0) { peg$fail(peg$e15); } 1179 - } 1180 - if (s2 === peg$FAILED) { 1181 - if (input.substr(peg$currPos, 2) === peg$c13) { 1182 - s2 = peg$c13; 1183 - peg$currPos += 2; 1184 - } else { 1185 - s2 = peg$FAILED; 1186 - if (peg$silentFails === 0) { peg$fail(peg$e16); } 1187 - } 1188 - } 1189 - if (s2 === peg$FAILED) { 1190 - s2 = null; 1191 - } 1192 1172 peg$savedPos = s0; 1193 - s0 = peg$f15(s1); 1194 - } else { 1195 - peg$currPos = s0; 1196 - s0 = peg$FAILED; 1173 + s1 = peg$f15(s1); 1197 1174 } 1175 + s0 = s1; 1198 1176 1199 1177 return s0; 1200 1178 } 1201 1179 1202 1180 function peg$parseWord() { 1203 - var s0, s1, s2; 1181 + let s0, s1, s2; 1204 1182 1205 1183 s0 = peg$currPos; 1206 1184 s1 = []; 1207 1185 s2 = input.charAt(peg$currPos); 1208 - if (peg$r3.test(s2)) { 1186 + if (peg$r2.test(s2)) { 1209 1187 peg$currPos++; 1210 1188 } else { 1211 1189 s2 = peg$FAILED; 1212 - if (peg$silentFails === 0) { peg$fail(peg$e17); } 1190 + if (peg$silentFails === 0) { peg$fail(peg$e16); } 1213 1191 } 1214 1192 if (s2 !== peg$FAILED) { 1215 1193 while (s2 !== peg$FAILED) { 1216 1194 s1.push(s2); 1217 1195 s2 = input.charAt(peg$currPos); 1218 - if (peg$r3.test(s2)) { 1196 + if (peg$r2.test(s2)) { 1219 1197 peg$currPos++; 1220 1198 } else { 1221 1199 s2 = peg$FAILED; 1222 - if (peg$silentFails === 0) { peg$fail(peg$e17); } 1200 + if (peg$silentFails === 0) { peg$fail(peg$e16); } 1223 1201 } 1224 1202 } 1225 1203 } else { ··· 1235 1213 } 1236 1214 1237 1215 function peg$parse_() { 1238 - var s0, s1, s2; 1216 + let s0, s1, s2; 1239 1217 1240 1218 s0 = peg$currPos; 1241 1219 s1 = []; 1242 1220 s2 = input.charAt(peg$currPos); 1243 - if (peg$r4.test(s2)) { 1221 + if (peg$r3.test(s2)) { 1244 1222 peg$currPos++; 1245 1223 } else { 1246 1224 s2 = peg$FAILED; 1247 - if (peg$silentFails === 0) { peg$fail(peg$e18); } 1225 + if (peg$silentFails === 0) { peg$fail(peg$e17); } 1248 1226 } 1249 1227 if (s2 !== peg$FAILED) { 1250 1228 while (s2 !== peg$FAILED) { 1251 1229 s1.push(s2); 1252 1230 s2 = input.charAt(peg$currPos); 1253 - if (peg$r4.test(s2)) { 1231 + if (peg$r3.test(s2)) { 1254 1232 peg$currPos++; 1255 1233 } else { 1256 1234 s2 = peg$FAILED; 1257 - if (peg$silentFails === 0) { peg$fail(peg$e18); } 1235 + if (peg$silentFails === 0) { peg$fail(peg$e17); } 1258 1236 } 1259 1237 } 1260 1238 } else { ··· 1270 1248 } 1271 1249 1272 1250 function peg$parseEOF() { 1273 - var s0, s1; 1251 + let s0, s1; 1274 1252 1275 1253 s0 = peg$currPos; 1276 1254 peg$silentFails++; ··· 1279 1257 peg$currPos++; 1280 1258 } else { 1281 1259 s1 = peg$FAILED; 1282 - if (peg$silentFails === 0) { peg$fail(peg$e19); } 1260 + if (peg$silentFails === 0) { peg$fail(peg$e18); } 1283 1261 } 1284 1262 peg$silentFails--; 1285 1263 if (s1 === peg$FAILED) { ··· 1318 1296 .filter(part => part.type === 'tag') 1319 1297 .map(part => part.value); 1320 1298 1299 + // Extract priority flag 1300 + const hasPriority = validParts.some(part => part.type === 'priority'); 1321 1301 1302 + // Extract due date 1303 + const dueDate = validParts 1304 + .filter(part => part.type === 'due') 1305 + .map(part => part.value)[0] || null; 1322 1306 1323 1307 return { 1324 - action: action, 1325 - selection: selection || [], 1326 - description: description || [], 1308 + action: action, 1309 + selection: selection || [], 1310 + description: description || [], 1327 1311 attributes: attributes || [], 1328 - project: project, 1312 + project: project, 1329 1313 tags: tags, 1314 + priority: hasPriority, 1315 + due: dueDate, 1330 1316 parts: parts || [], 1331 1317 reconstruct: function() { 1332 1318 const filterStr = this.filters.map(f => f.reconstruct()).join(','); ··· 1338 1324 1339 1325 peg$result = peg$startRuleFunction(); 1340 1326 1327 + const peg$success = (peg$result !== peg$FAILED && peg$currPos === input.length); 1328 + function peg$throw() { 1329 + if (peg$result !== peg$FAILED && peg$currPos < input.length) { 1330 + peg$fail(peg$endExpectation()); 1331 + } 1332 + 1333 + throw peg$buildStructuredError( 1334 + peg$maxFailExpected, 1335 + peg$maxFailPos < input.length ? peg$getUnicode(peg$maxFailPos) : null, 1336 + peg$maxFailPos < input.length 1337 + ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) 1338 + : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) 1339 + ); 1340 + } 1341 1341 if (options.peg$library) { 1342 1342 return /** @type {any} */ ({ 1343 1343 peg$result, 1344 1344 peg$currPos, 1345 1345 peg$FAILED, 1346 1346 peg$maxFailExpected, 1347 - peg$maxFailPos 1347 + peg$maxFailPos, 1348 + peg$success, 1349 + peg$throw: peg$success ? undefined : peg$throw, 1348 1350 }); 1349 1351 } 1350 - if (peg$result !== peg$FAILED && peg$currPos === input.length) { 1352 + if (peg$success) { 1351 1353 return peg$result; 1352 1354 } else { 1353 - if (peg$result !== peg$FAILED && peg$currPos < input.length) { 1354 - peg$fail(peg$endExpectation()); 1355 - } 1356 - 1357 - throw peg$buildStructuredError( 1358 - peg$maxFailExpected, 1359 - peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, 1360 - peg$maxFailPos < input.length 1361 - ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) 1362 - : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) 1363 - ); 1355 + peg$throw(); 1364 1356 } 1365 1357 } 1366 1358
+17 -9
parser/command_js.peg
··· 24 24 .filter(part => part.type === 'tag') 25 25 .map(part => part.value); 26 26 27 + // Extract priority flag 28 + const hasPriority = validParts.some(part => part.type === 'priority'); 27 29 30 + // Extract due date 31 + const dueDate = validParts 32 + .filter(part => part.type === 'due') 33 + .map(part => part.value)[0] || null; 28 34 29 35 return { 30 - action: action, 31 - selection: selection || [], 32 - description: description || [], 36 + action: action, 37 + selection: selection || [], 38 + description: description || [], 33 39 attributes: attributes || [], 34 - project: project, 40 + project: project, 35 41 tags: tags, 42 + priority: hasPriority, 43 + due: dueDate, 36 44 parts: parts || [], 37 45 reconstruct: function() { 38 46 const filterStr = this.filters.map(f => f.reconstruct()).join(','); ··· 107 115 108 116 Attribute = Due / Tag / Project / Priority 109 117 110 - Due = "@" value:TimeValue { 118 + Due = ("due:" / "@") value:DateValue { 111 119 return { 112 120 type: "due", 113 121 value: value, ··· 123 131 }; 124 132 } 125 133 126 - Priority = "priority:" value:[HML] { 134 + Priority = ("priority" / "!!") { 127 135 return { 128 136 type: "priority", 129 - value: value, 137 + value: true, 130 138 reconstruct: function() { return `priority:${this.value}`; } 131 139 }; 132 140 } ··· 143 151 return parseInt(digits.join(''), 10); 144 152 } 145 153 146 - TimeValue = chars:[0-9:]+ ("am" / "pm")? { 147 - return chars.join('') + (text() || ''); 154 + DateValue = chars:[0-9/-]+ { 155 + return chars.join(''); 148 156 } 149 157 150 158 Word = chars:[a-zA-Z0-9_-]+ {