@coffer-org/plugin-health 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/day-periods.d.ts +0 -6
- package/dist/day-periods.js +0 -6
- package/dist/health_test/index.d.ts +0 -1
- package/dist/health_test/index.js +3 -4
- package/dist/health_visit/index.d.ts +0 -1
- package/dist/health_visit/index.js +12 -9
- package/dist/index.d.ts +0 -1
- package/dist/index.js +5 -7
- package/dist/medicine/index.d.ts +0 -1
- package/dist/medicine/index.js +35 -12
- package/dist/person_body/index.d.ts +0 -1
- package/dist/person_body/index.js +3 -8
- package/dist/runtime/index.d.ts +4 -4
- package/dist/runtime/index.js +121 -4
- package/dist/runtime/sync.d.ts +4 -2
- package/dist/runtime/sync.js +27 -16
- package/package.json +10 -5
- package/seed/assets/pill.svg +8 -0
- package/dist/day-periods.d.ts.map +0 -1
- package/dist/day-periods.js.map +0 -1
- package/dist/health_test/index.d.ts.map +0 -1
- package/dist/health_test/index.js.map +0 -1
- package/dist/health_visit/index.d.ts.map +0 -1
- package/dist/health_visit/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/medicine/index.d.ts.map +0 -1
- package/dist/medicine/index.js.map +0 -1
- package/dist/person_body/index.d.ts.map +0 -1
- package/dist/person_body/index.js.map +0 -1
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/sync.d.ts.map +0 -1
- package/dist/runtime/sync.js.map +0 -1
package/dist/day-periods.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Періоди дня для прийому ліків/добавок. Раніше жили в core/fields;
|
|
3
|
-
* винесені у плагін-власник (health). Опційний список 'day-periods'
|
|
4
|
-
* реєструється плагіном health. i18n-ключі — health.dayPeriods.*.
|
|
5
|
-
*/
|
|
6
1
|
export declare const DAY_PERIOD_OPTIONS: [{
|
|
7
2
|
readonly value: "any";
|
|
8
3
|
readonly title: "health.dayPeriods.any";
|
|
@@ -31,4 +26,3 @@ export declare const DAY_PERIOD_OPTIONS: [{
|
|
|
31
26
|
readonly value: "as_needed";
|
|
32
27
|
readonly title: "health.dayPeriods.as_needed";
|
|
33
28
|
}];
|
|
34
|
-
//# sourceMappingURL=day-periods.d.ts.map
|
package/dist/day-periods.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Періоди дня для прийому ліків/добавок. Раніше жили в core/fields;
|
|
3
|
-
* винесені у плагін-власник (health). Опційний список 'day-periods'
|
|
4
|
-
* реєструється плагіном health. i18n-ключі — health.dayPeriods.*.
|
|
5
|
-
*/
|
|
6
1
|
export const DAY_PERIOD_OPTIONS = [
|
|
7
2
|
{ value: 'any', title: 'health.dayPeriods.any' },
|
|
8
3
|
{ value: 'before_breakfast', title: 'health.dayPeriods.before_breakfast' },
|
|
@@ -14,4 +9,3 @@ export const DAY_PERIOD_OPTIONS = [
|
|
|
14
9
|
{ value: 'before_bed', title: 'health.dayPeriods.before_bed' },
|
|
15
10
|
{ value: 'as_needed', title: 'health.dayPeriods.as_needed' },
|
|
16
11
|
];
|
|
17
|
-
//# sourceMappingURL=day-periods.js.map
|
|
@@ -11,7 +11,7 @@ export default defineModule({
|
|
|
11
11
|
fields: [
|
|
12
12
|
field.title({ key: 'name', label: 'core.fields.name' }),
|
|
13
13
|
field.date({ key: 'date', label: 'health.health_test.fields.date' }),
|
|
14
|
-
field.string({ key: 'clinic', label: 'health.health_test.fields.clinic',
|
|
14
|
+
field.string({ key: 'clinic', label: 'health.health_test.fields.clinic', rules: { max: 200 } }),
|
|
15
15
|
field.select({
|
|
16
16
|
key: 'status',
|
|
17
17
|
label: 'health.health_test.fields.status',
|
|
@@ -33,9 +33,8 @@ export default defineModule({
|
|
|
33
33
|
{ value: 'other', title: 'health.health_test.options.test_type.other' },
|
|
34
34
|
],
|
|
35
35
|
}),
|
|
36
|
-
field.relation({ key: 'person', label: 'health.health_test.fields.person', vault: 'people', module: 'person' }),
|
|
37
|
-
field.text({ key: 'result', label: 'health.health_test.fields.result', max: 5000 }),
|
|
36
|
+
field.relation({ key: 'person', label: 'health.health_test.fields.person', options: { vault: 'people', module: 'person' } }),
|
|
37
|
+
field.text({ key: 'result', label: 'health.health_test.fields.result', rules: { max: 5000 } }),
|
|
38
38
|
field.image({ key: 'attachments', label: 'health.health_test.fields.attachments', multiple: true }),
|
|
39
39
|
],
|
|
40
40
|
});
|
|
41
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -11,14 +11,17 @@ export default defineModule({
|
|
|
11
11
|
fields: [
|
|
12
12
|
field.title({ key: 'name', label: 'core.fields.name' }),
|
|
13
13
|
field.date({ key: 'date', label: 'health.health_visit.fields.date' }),
|
|
14
|
-
field.string({ key: 'specialist', label: 'health.health_visit.fields.specialist',
|
|
15
|
-
field.string({ key: 'specialty', label: 'health.health_visit.fields.specialty',
|
|
16
|
-
field.string({ key: 'clinic', label: 'health.health_visit.fields.clinic',
|
|
17
|
-
field.relation({ key: 'person', label: 'health.health_visit.fields.person', vault: 'people', module: 'person' }),
|
|
18
|
-
field.text({ key: 'reason', label: 'health.health_visit.fields.reason', max: 1000 }),
|
|
19
|
-
field.text({ key: 'result', label: 'health.health_visit.fields.result', max: 2000 }),
|
|
20
|
-
field.text({ key: 'next_step', label: 'health.health_visit.fields.next_step', max: 1000 }),
|
|
21
|
-
field.
|
|
14
|
+
field.string({ key: 'specialist', label: 'health.health_visit.fields.specialist', rules: { max: 200 } }),
|
|
15
|
+
field.string({ key: 'specialty', label: 'health.health_visit.fields.specialty', rules: { max: 100 } }),
|
|
16
|
+
field.string({ key: 'clinic', label: 'health.health_visit.fields.clinic', rules: { max: 200 } }),
|
|
17
|
+
field.relation({ key: 'person', label: 'health.health_visit.fields.person', options: { vault: 'people', module: 'person' } }),
|
|
18
|
+
field.text({ key: 'reason', label: 'health.health_visit.fields.reason', rules: { max: 1000 } }),
|
|
19
|
+
field.text({ key: 'result', label: 'health.health_visit.fields.result', rules: { max: 2000 } }),
|
|
20
|
+
field.text({ key: 'next_step', label: 'health.health_visit.fields.next_step', rules: { max: 1000 } }),
|
|
21
|
+
field.money({ key: 'cost', label: 'health.health_visit.fields.cost', rules: { defaultCurrency: 'UAH' } }),
|
|
22
|
+
field.image({ key: 'photos', label: 'health.health_visit.fields.photos', multiple: true }),
|
|
23
|
+
field.file({ key: 'files', label: 'health.health_visit.fields.files', multiple: true }),
|
|
24
|
+
field.relation({ key: 'medicines', label: 'health.health_visit.fields.medicines', options: { vault: 'health', module: 'medicine' }, multiple: true }),
|
|
25
|
+
field.reminder({ key: 'nextVisit', label: 'health.health_visit.fields.nextVisit', rules: { lead: 14 } }),
|
|
22
26
|
],
|
|
23
27
|
});
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,16 +2,15 @@ import { defineVault } from '@coffer-org/sdk/vault';
|
|
|
2
2
|
import { definePlugin } from '@coffer-org/sdk/plugin';
|
|
3
3
|
import { field } from '@coffer-org/sdk/fields';
|
|
4
4
|
import { defineSettings } from '@coffer-org/sdk/settings';
|
|
5
|
-
import medicine from
|
|
6
|
-
import health_visit from
|
|
7
|
-
import health_test from
|
|
8
|
-
import personBody from
|
|
9
|
-
import { DAY_PERIOD_OPTIONS } from
|
|
5
|
+
import medicine from "./medicine/index.js";
|
|
6
|
+
import health_visit from "./health_visit/index.js";
|
|
7
|
+
import health_test from "./health_test/index.js";
|
|
8
|
+
import personBody from "./person_body/index.js";
|
|
9
|
+
import { DAY_PERIOD_OPTIONS } from "./day-periods.js";
|
|
10
10
|
export default definePlugin({
|
|
11
11
|
id: 'health',
|
|
12
12
|
version: '1.0.0',
|
|
13
13
|
dependsOn: ['people'],
|
|
14
|
-
// Періоди дня для прийому ліків (раніше в plugin-core).
|
|
15
14
|
optionLists: [{ name: 'day-periods', options: [...DAY_PERIOD_OPTIONS] }],
|
|
16
15
|
vaults: [
|
|
17
16
|
{
|
|
@@ -31,4 +30,3 @@ export default definePlugin({
|
|
|
31
30
|
],
|
|
32
31
|
}),
|
|
33
32
|
});
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
package/dist/medicine/index.d.ts
CHANGED
package/dist/medicine/index.js
CHANGED
|
@@ -6,20 +6,23 @@ export default defineModule({
|
|
|
6
6
|
label: 'health.medicine.label',
|
|
7
7
|
icon: 'lucide:pill',
|
|
8
8
|
views: {
|
|
9
|
-
table: ['type', '
|
|
9
|
+
table: ['type', 'form', 'quantity'],
|
|
10
10
|
},
|
|
11
11
|
fields: [
|
|
12
12
|
field.title({ key: 'name', label: 'core.fields.name' }),
|
|
13
|
-
field.image({ key: '
|
|
14
|
-
field.
|
|
15
|
-
field.
|
|
16
|
-
field.
|
|
17
|
-
field.
|
|
18
|
-
key: '
|
|
19
|
-
label: 'health.medicine.fields.
|
|
20
|
-
options: '
|
|
21
|
-
|
|
13
|
+
field.image({ key: 'photo', label: 'health.medicine.fields.photo' }),
|
|
14
|
+
field.int({ key: 'quantity', label: 'health.medicine.fields.quantity', rules: { min: 0, max: 100000 } }),
|
|
15
|
+
field.date({ key: 'quantityCheckedAt', label: 'health.medicine.fields.quantityCheckedAt' }),
|
|
16
|
+
field.text({ key: 'description', label: 'health.medicine.fields.description', rules: { max: 1000 } }),
|
|
17
|
+
field.keyed({
|
|
18
|
+
key: 'dose',
|
|
19
|
+
label: 'health.medicine.fields.dose',
|
|
20
|
+
by: field.relation({ key: 'person', label: 'health.medicine.fields.dose_person', options: { vault: 'people', module: 'person' } }),
|
|
21
|
+
fields: [
|
|
22
|
+
field.perWeekday({ key: 'value', label: 'health.medicine.fields.dose_value', rules: { min: 0, max: 20, step: 0.5 } }),
|
|
23
|
+
],
|
|
22
24
|
}),
|
|
25
|
+
field.select({ key: 'intakeTimes', label: 'health.medicine.fields.intakeTimes', options: 'day-periods', multiple: true }),
|
|
23
26
|
field.period({ key: 'intakePeriods', label: 'health.medicine.fields.intakePeriods', multiple: true }),
|
|
24
27
|
field.select({
|
|
25
28
|
key: 'type',
|
|
@@ -27,10 +30,30 @@ export default defineModule({
|
|
|
27
30
|
required: true,
|
|
28
31
|
options: [
|
|
29
32
|
{ value: 'vitamin', title: 'health.medicine.options.type.vitamin' },
|
|
33
|
+
{ value: 'supplement', title: 'health.medicine.options.type.supplement' },
|
|
30
34
|
{ value: 'medication', title: 'health.medicine.options.type.medication' },
|
|
35
|
+
{ value: 'antibiotic', title: 'health.medicine.options.type.antibiotic' },
|
|
36
|
+
{ value: 'hormone', title: 'health.medicine.options.type.hormone' },
|
|
37
|
+
{ value: 'painkiller', title: 'health.medicine.options.type.painkiller' },
|
|
38
|
+
{ value: 'homeopathy', title: 'health.medicine.options.type.homeopathy' },
|
|
39
|
+
{ value: 'herbal', title: 'health.medicine.options.type.herbal' },
|
|
40
|
+
],
|
|
41
|
+
}),
|
|
42
|
+
field.select({
|
|
43
|
+
key: 'form',
|
|
44
|
+
label: 'health.medicine.fields.form',
|
|
45
|
+
options: [
|
|
46
|
+
{ value: 'tablet', title: 'health.medicine.options.form.tablet' },
|
|
47
|
+
{ value: 'capsule', title: 'health.medicine.options.form.capsule' },
|
|
48
|
+
{ value: 'syrup', title: 'health.medicine.options.form.syrup' },
|
|
49
|
+
{ value: 'drops', title: 'health.medicine.options.form.drops' },
|
|
50
|
+
{ value: 'ointment', title: 'health.medicine.options.form.ointment' },
|
|
51
|
+
{ value: 'gel', title: 'health.medicine.options.form.gel' },
|
|
52
|
+
{ value: 'spray', title: 'health.medicine.options.form.spray' },
|
|
53
|
+
{ value: 'injection', title: 'health.medicine.options.form.injection' },
|
|
54
|
+
{ value: 'powder', title: 'health.medicine.options.form.powder' },
|
|
55
|
+
{ value: 'suppository', title: 'health.medicine.options.form.suppository' },
|
|
31
56
|
],
|
|
32
57
|
}),
|
|
33
|
-
field.tags({ key: 'tags', label: 'health.medicine.fields.tags' }),
|
|
34
58
|
],
|
|
35
59
|
});
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extend: антропометрія людини.
|
|
3
|
-
* Прив'язується до people/person.
|
|
4
|
-
*/
|
|
5
1
|
import { defineExtend } from '@coffer-org/sdk/extend';
|
|
6
2
|
import { field } from '@coffer-org/sdk/fields';
|
|
7
3
|
export default defineExtend({
|
|
@@ -9,10 +5,9 @@ export default defineExtend({
|
|
|
9
5
|
label: 'health.person_body.label',
|
|
10
6
|
icon: 'lucide:ruler',
|
|
11
7
|
attachTo: [{ vault: 'people', module: 'person' }],
|
|
12
|
-
claude:
|
|
8
|
+
claude: `Person's body measurements. weightKg — weight in kg. heightCm — height in cm.`,
|
|
13
9
|
fields: [
|
|
14
|
-
field.real({ key: 'weightKg', label: 'health.person_body.fields.weightKg',
|
|
15
|
-
field.int({ key: 'heightCm', label: 'health.person_body.fields.heightCm',
|
|
10
|
+
field.real({ key: 'weightKg', label: 'health.person_body.fields.weightKg', rules: { min: 1, max: 500 } }),
|
|
11
|
+
field.int({ key: 'heightCm', label: 'health.person_body.fields.heightCm', rules: { min: 50, max: 250 } }),
|
|
16
12
|
],
|
|
17
13
|
});
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PluginHooks } from '@coffer-org/server/plugin-hooks';
|
|
2
|
-
export { startSync, stopSync } from './sync.
|
|
3
|
-
export type { MedicineRecord } from './sync.
|
|
1
|
+
import type { PluginHooks, Migration } from '@coffer-org/server/plugin-hooks';
|
|
2
|
+
export { startSync, stopSync } from './sync.ts';
|
|
3
|
+
export type { MedicineRecord } from './sync.ts';
|
|
4
|
+
export declare const exampleMigrations: Migration[];
|
|
4
5
|
export declare const serverHooks: PluginHooks;
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,11 +1,128 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { startSync, stopSync } from "./sync.js";
|
|
4
|
+
import { localPost } from '@coffer-org/server/local-api';
|
|
5
|
+
import { seedAsset } from '@coffer-org/server/uploads';
|
|
6
|
+
const asset = (rel) => fileURLToPath(new URL(`../../seed/assets/${rel}`, import.meta.url));
|
|
7
|
+
export { startSync, stopSync } from "./sync.js";
|
|
8
|
+
export const exampleMigrations = [
|
|
9
|
+
{
|
|
10
|
+
version: 1,
|
|
11
|
+
up: async ({ table }) => {
|
|
12
|
+
await table('extend__person_body').renameColumn('weightKg', 'mass');
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
version: 2,
|
|
17
|
+
up: async ({ table }) => {
|
|
18
|
+
await table('extend__person_body').changeType('heightCm', 'integer', {
|
|
19
|
+
default: 0,
|
|
20
|
+
transform: (old) => (old == null ? null : parseInt(String(old), 10)),
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
];
|
|
3
25
|
export const serverHooks = {
|
|
26
|
+
migrations: [
|
|
27
|
+
{ version: 1, up: async ({ table }) => { await table('health__health_visit').renameColumn('attachments', 'photos'); } },
|
|
28
|
+
],
|
|
29
|
+
seed: [
|
|
30
|
+
{
|
|
31
|
+
name: 'demo-medicines',
|
|
32
|
+
run: async () => {
|
|
33
|
+
const photo = seedAsset(asset('pill.svg'));
|
|
34
|
+
await localPost('health', 'medicine', {
|
|
35
|
+
name: 'Vitamin D3',
|
|
36
|
+
photo,
|
|
37
|
+
type: 'vitamin',
|
|
38
|
+
form: 'capsule',
|
|
39
|
+
quantity: 90,
|
|
40
|
+
quantityCheckedAt: '2026-06-01',
|
|
41
|
+
description: 'Prevention of vitamin D deficiency. Take with food for better absorption.',
|
|
42
|
+
intakeTimes: ['with_breakfast'],
|
|
43
|
+
intakePeriods: [{ from: '2026-01-01', until: '2026-03-31' }],
|
|
44
|
+
});
|
|
45
|
+
await localPost('health', 'medicine', {
|
|
46
|
+
name: 'Magnesium B6',
|
|
47
|
+
photo,
|
|
48
|
+
type: 'supplement',
|
|
49
|
+
form: 'tablet',
|
|
50
|
+
quantity: 60,
|
|
51
|
+
quantityCheckedAt: '2026-06-10',
|
|
52
|
+
description: 'Supports the nervous system and muscles. A course during periods of increased load.',
|
|
53
|
+
intakeTimes: ['after_lunch', 'before_bed'],
|
|
54
|
+
intakePeriods: [{ from: '2026-05-01', until: '2026-06-30' }],
|
|
55
|
+
});
|
|
56
|
+
await localPost('health', 'medicine', {
|
|
57
|
+
name: 'Paracetamol',
|
|
58
|
+
photo,
|
|
59
|
+
type: 'painkiller',
|
|
60
|
+
form: 'tablet',
|
|
61
|
+
quantity: 20,
|
|
62
|
+
description: 'Antipyretic and pain reliever. Take as needed, no more than 4 tablets per day.',
|
|
63
|
+
intakeTimes: ['as_needed'],
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'demo-visits',
|
|
69
|
+
run: async () => {
|
|
70
|
+
const photo = seedAsset(asset('pill.svg'));
|
|
71
|
+
await localPost('health', 'health_visit', {
|
|
72
|
+
name: 'GP consultation',
|
|
73
|
+
date: '2026-05-12',
|
|
74
|
+
specialist: 'Olivia Davis',
|
|
75
|
+
specialty: 'General Practitioner',
|
|
76
|
+
clinic: 'Wellness Medical Center, 12 Oak Street, Springfield',
|
|
77
|
+
reason: 'General check-up, complaints of fatigue and elevated blood pressure.',
|
|
78
|
+
result: 'Blood pressure 135/85. Ordered a complete blood count and BP monitoring twice a day for a week.',
|
|
79
|
+
next_step: 'Take a blood test, keep a blood pressure diary, follow-up visit in two weeks.',
|
|
80
|
+
cost: { value: 800, currency: 'USD' },
|
|
81
|
+
photos: [photo],
|
|
82
|
+
nextVisit: '2026-05-26',
|
|
83
|
+
});
|
|
84
|
+
await localPost('health', 'health_visit', {
|
|
85
|
+
name: 'Dental check-up',
|
|
86
|
+
date: '2026-04-03',
|
|
87
|
+
specialist: 'Robert Brown',
|
|
88
|
+
specialty: 'Dentist',
|
|
89
|
+
clinic: 'BrightSmile Dental, 45 Maple Ave, Springfield',
|
|
90
|
+
reason: 'Preventive check-up and professional teeth cleaning.',
|
|
91
|
+
result: 'No cavities found. Ultrasonic cleaning and enamel fluoridation performed.',
|
|
92
|
+
next_step: 'Repeat preventive check-up in six months.',
|
|
93
|
+
cost: { value: 1500, currency: 'USD' },
|
|
94
|
+
photos: [photo],
|
|
95
|
+
nextVisit: '2026-10-03',
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
],
|
|
4
100
|
init: () => {
|
|
5
|
-
void startSync().catch((e) => console.warn(`[health-sync]
|
|
101
|
+
void startSync().catch((e) => console.warn(`[health-sync] failed to start: ${e.message}`));
|
|
6
102
|
},
|
|
7
103
|
teardown: () => {
|
|
8
104
|
stopSync();
|
|
9
105
|
},
|
|
106
|
+
agent: {
|
|
107
|
+
instructions: 'Vault health — tests (health_test), visits (health_visit), medicines (medicine). date — ISO. ' +
|
|
108
|
+
'medicine.quantity {value,unit}, intakeTimes/intakePeriods — intake schedule, person — relation to people. ' +
|
|
109
|
+
'Count upcoming/overdue visits by the date field.' +
|
|
110
|
+
' When a medicine is taken/restocked — update medicine.quantity + quantityCheckedAt via update_record; after a visit — result/nextVisit.',
|
|
111
|
+
tools: [
|
|
112
|
+
{
|
|
113
|
+
name: 'upcoming_visits',
|
|
114
|
+
description: 'Medical health visits within the next N days.',
|
|
115
|
+
inputSchema: { days: z.number().int().positive() },
|
|
116
|
+
handler: async (args, { em }) => {
|
|
117
|
+
const days = Number(args.days);
|
|
118
|
+
const now = Date.now();
|
|
119
|
+
const cutoff = now + days * 86_400_000;
|
|
120
|
+
const rows = (await em.fork().find('health__health_visit', {}));
|
|
121
|
+
return rows
|
|
122
|
+
.filter((r) => { const t = Date.parse(String(r.date ?? '')); return !Number.isNaN(t) && t >= now && t <= cutoff; })
|
|
123
|
+
.map((r) => ({ id: r.id, name: r.name, date: r.date, specialist: r.specialist, specialty: r.specialty }));
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
10
128
|
};
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
package/dist/runtime/sync.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ export interface MedicineRecord {
|
|
|
3
3
|
id: string;
|
|
4
4
|
name: string | null;
|
|
5
5
|
type: string | null;
|
|
6
|
-
|
|
6
|
+
dayRows: {
|
|
7
|
+
day: string;
|
|
8
|
+
value: number;
|
|
9
|
+
}[];
|
|
7
10
|
intakePeriods: string | null;
|
|
8
11
|
}
|
|
9
12
|
export declare function buildMedEvents(records: MedicineRecord[]): IcsFile[];
|
|
10
13
|
export declare function startSync(): Promise<void>;
|
|
11
14
|
export declare function stopSync(): void;
|
|
12
|
-
//# sourceMappingURL=sync.d.ts.map
|
package/dist/runtime/sync.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { getEm } from '@coffer-org/server/db';
|
|
2
2
|
import { getPluginSettings } from '@coffer-org/server/plugin-runtime';
|
|
3
3
|
import { resolveDavSettings, WebDavClient, CalDavCollection, buildVEvent, buildRRule, } from '@coffer-org/dav';
|
|
4
|
-
const
|
|
4
|
+
const DAY_TO_BYDAY = {
|
|
5
|
+
mon: 'MO', tue: 'TU', wed: 'WE', thu: 'TH', fri: 'FR', sat: 'SA', sun: 'SU',
|
|
6
|
+
};
|
|
7
|
+
const WEEK_ORDER = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'];
|
|
5
8
|
const HORIZON_DAYS = 90;
|
|
6
|
-
function parseActiveDays(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
catch {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
9
|
+
function parseActiveDays(rows) {
|
|
10
|
+
const active = new Set();
|
|
11
|
+
for (const r of rows)
|
|
12
|
+
if (Number(r.value) > 0 && DAY_TO_BYDAY[r.day])
|
|
13
|
+
active.add(r.day);
|
|
14
|
+
const days = WEEK_ORDER.filter((d) => active.has(d)).map((d) => DAY_TO_BYDAY[d]);
|
|
15
|
+
return days.length > 0 ? days : null;
|
|
17
16
|
}
|
|
18
17
|
function parsePeriods(json) {
|
|
19
18
|
if (!json)
|
|
@@ -43,9 +42,9 @@ export function buildMedEvents(records) {
|
|
|
43
42
|
continue;
|
|
44
43
|
periods = [{ from: today, until: addDays(today, HORIZON_DAYS) }];
|
|
45
44
|
}
|
|
46
|
-
const activeDays = parseActiveDays(r.
|
|
45
|
+
const activeDays = parseActiveDays(r.dayRows);
|
|
47
46
|
if (!activeDays)
|
|
48
|
-
continue;
|
|
47
|
+
continue;
|
|
49
48
|
const summary = r.name ?? r.id;
|
|
50
49
|
periods.forEach((p, pi) => {
|
|
51
50
|
const uid = `medication-${r.id}-${pi}`;
|
|
@@ -65,7 +64,20 @@ export function buildMedEvents(records) {
|
|
|
65
64
|
}
|
|
66
65
|
async function runOnce() {
|
|
67
66
|
const fork = getEm().fork();
|
|
68
|
-
const
|
|
67
|
+
const meds = (await fork.find('health__medicine', {}));
|
|
68
|
+
const doseRows = (await fork.find('health__medicine__dose', {}));
|
|
69
|
+
const valueRows = (await fork.find('health__medicine__dose__value', {}));
|
|
70
|
+
const doseToMed = new Map(doseRows.map((d) => [d.id, d.parent_id]));
|
|
71
|
+
const byMed = new Map();
|
|
72
|
+
for (const v of valueRows) {
|
|
73
|
+
const medId = doseToMed.get(v.parent_id);
|
|
74
|
+
if (medId == null)
|
|
75
|
+
continue;
|
|
76
|
+
const list = byMed.get(medId) ?? [];
|
|
77
|
+
list.push({ day: v.day, value: Number(v.value) });
|
|
78
|
+
byMed.set(medId, list);
|
|
79
|
+
}
|
|
80
|
+
const rows = meds.map((m) => ({ ...m, dayRows: byMed.get(m.id) ?? [] }));
|
|
69
81
|
const icsFiles = buildMedEvents(rows);
|
|
70
82
|
const pluginSettings = await getPluginSettings('health');
|
|
71
83
|
const calendar = pluginSettings['caldav_calendar'];
|
|
@@ -113,4 +125,3 @@ export function stopSync() {
|
|
|
113
125
|
timer = undefined;
|
|
114
126
|
}
|
|
115
127
|
}
|
|
116
|
-
//# sourceMappingURL=sync.js.map
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coffer-org/plugin-health",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=24"
|
|
7
|
+
},
|
|
5
8
|
"files": [
|
|
6
|
-
"dist"
|
|
9
|
+
"dist",
|
|
10
|
+
"seed"
|
|
7
11
|
],
|
|
8
12
|
"exports": {
|
|
9
13
|
".": {
|
|
@@ -22,8 +26,9 @@
|
|
|
22
26
|
"test": "node --import tsx/esm --test 'src/runtime/*.test.ts'"
|
|
23
27
|
},
|
|
24
28
|
"dependencies": {
|
|
25
|
-
"@coffer-org/sdk": "^1.
|
|
26
|
-
"@coffer-org/server": "^1.
|
|
27
|
-
"
|
|
29
|
+
"@coffer-org/sdk": "^1.2.0",
|
|
30
|
+
"@coffer-org/server": "^1.2.0",
|
|
31
|
+
"zod": "^4.4.3",
|
|
32
|
+
"@coffer-org/dav": "^1.2.0"
|
|
28
33
|
}
|
|
29
34
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160" role="img" aria-label="demo pill">
|
|
2
|
+
<rect width="160" height="160" rx="16" fill="#dcfce7"/>
|
|
3
|
+
<g transform="rotate(45 80 80)">
|
|
4
|
+
<rect x="44" y="60" width="72" height="40" rx="20" fill="#22c55e"/>
|
|
5
|
+
<path d="M80 60h36a20 20 0 0 1 0 40H80z" fill="#16a34a"/>
|
|
6
|
+
<rect x="76" y="60" width="8" height="40" fill="#bbf7d0"/>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"day-periods.d.ts","sourceRoot":"","sources":["../src/day-periods.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUwB,CAAC"}
|
package/dist/day-periods.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"day-periods.js","sourceRoot":"","sources":["../src/day-periods.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,uBAAuB,EAAE;IAChD,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,oCAAoC,EAAE;IAC1E,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,kCAAkC,EAAE;IACtE,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,mCAAmC,EAAE;IACxE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,6BAA6B,EAAE;IAC5D,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,+BAA+B,EAAE;IAChE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,2BAA2B,EAAE;IACxD,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,8BAA8B,EAAE;IAC9D,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,6BAA6B,EAAE;CACP,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/health_test/index.ts"],"names":[],"mappings":";AAGA,wBAqCG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","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AAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,iDAAiD,EAAE;gBACjF,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,2CAA2C,EAAE;gBACrE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0CAA0C,EAAE;gBACnE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,4CAA4C,EAAE;aACxE;SACF,CAAC;QACF,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,kCAAkC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;QAC/G,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,kCAAkC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;QACnF,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,uCAAuC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KACpG;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/health_visit/index.ts"],"names":[],"mappings":";AAGA,wBAoBG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/health_visit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,eAAe,YAAY,CAAC;IAC1B,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,2BAA2B;IAClC,IAAI,EAAE,oBAAoB;IAC1B,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC;KACvC;IACD,MAAM,EAAE;QACN,KAAK,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AAC"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAUA,wBAuBG"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAe,YAAY,CAAC;IAC1B,EAAE,EAAE,QAAQ;IACZ,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,wDAAwD;IACxD,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC,EAAE,CAAC;IACxE,MAAM,EAAE;QACN;YACE,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;YACzF,OAAO,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW,CAAC;SAC/C;KACF;IACD,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,QAAQ,EAAE,cAAc,CAAC;QACvB,KAAK,EAAE,uBAAuB;QAC9B,MAAM,EAAE;YACN,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,+BAA+B,EAAE,CAAC;YAC/E,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC;YAClF,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,4BAA4B,EAAE,CAAC;YACxE,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC;YAClF,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC;SACrF;KACF,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/medicine/index.ts"],"names":[],"mappings":";AAGA,wBAgCG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/medicine/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,eAAe,YAAY,CAAC;IAC1B,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,uBAAuB;IAC9B,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC;KACrC;IACD,MAAM,EAAE;QACN,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC;QACvD,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,6BAA6B,EAAE,CAAC;QAClE,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,oCAAoC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;QAC1F,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,6BAA6B,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;QACzF,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,kCAAkC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;QACnG,KAAK,CAAC,MAAM,CAAC;YACX,GAAG,EAAE,YAAY;YACjB,KAAK,EAAE,mCAAmC;YAC1C,OAAO,EAAE,aAAa;YACtB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,sCAAsC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACrG,KAAK,CAAC,MAAM,CAAC;YACX,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,kBAAkB;YACzB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,sCAAsC,EAAE;gBACnE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,yCAAyC,EAAE;aAC1E;SACF,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,6BAA6B,EAAE,CAAC;KAClE;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/person_body/index.ts"],"names":[],"mappings":";AAOA,wBAUG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/person_body/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,eAAe,YAAY,CAAC;IAC1B,EAAE,EAAE,aAAa;IACjB,KAAK,EAAE,0BAA0B;IACjC,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACjD,MAAM,EAAE,oEAAoE;IAC5E,MAAM,EAAE;QACN,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,oCAAoC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;QAC1G,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,oCAAoC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;KAC3G;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,eAAO,MAAM,WAAW,EAAE,WAOzB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGhD,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC,IAAI,EAAE,GAAG,EAAE;QACT,KAAK,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,+BAAgC,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC9G,CAAC;IACD,QAAQ,EAAE,GAAG,EAAE;QACb,QAAQ,EAAE,CAAC;IACb,CAAC;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/runtime/sync.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,OAAO,EACb,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAwCD,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,OAAO,EAAE,CA8BnE;AAuCD,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAS/C;AAED,wBAAgB,QAAQ,IAAI,IAAI,CAK/B"}
|
package/dist/runtime/sync.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/runtime/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,UAAU,GAEX,MAAM,iB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