stated-protocol-parser 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/constants.js +19 -16
  2. package/dist/constants.js.map +1 -1
  3. package/dist/esm/constants.d.ts +47 -0
  4. package/dist/esm/constants.d.ts.map +1 -0
  5. package/dist/esm/constants.js +47 -0
  6. package/dist/esm/constants.js.map +1 -0
  7. package/dist/esm/hash.browser.d.ts +31 -0
  8. package/dist/esm/hash.browser.d.ts.map +1 -0
  9. package/dist/esm/hash.browser.js +58 -0
  10. package/dist/esm/hash.browser.js.map +1 -0
  11. package/dist/esm/hash.node.d.ts +31 -0
  12. package/dist/esm/hash.node.d.ts.map +1 -0
  13. package/dist/esm/hash.node.js +43 -0
  14. package/dist/esm/hash.node.js.map +1 -0
  15. package/dist/esm/hash.test.d.ts +2 -0
  16. package/dist/esm/hash.test.d.ts.map +1 -0
  17. package/dist/esm/hash.test.js +181 -0
  18. package/dist/esm/hash.test.js.map +1 -0
  19. package/dist/esm/index.d.ts +44 -0
  20. package/dist/esm/index.d.ts.map +1 -0
  21. package/dist/esm/index.js +643 -0
  22. package/dist/esm/index.js.map +1 -0
  23. package/dist/esm/index.test.d.ts +2 -0
  24. package/dist/esm/index.test.d.ts.map +1 -0
  25. package/dist/esm/index.test.js +293 -0
  26. package/dist/esm/index.test.js.map +1 -0
  27. package/dist/esm/types.d.ts +149 -0
  28. package/dist/esm/types.d.ts.map +1 -0
  29. package/dist/esm/types.js +2 -0
  30. package/dist/esm/types.js.map +1 -0
  31. package/dist/esm/utils.d.ts +4 -0
  32. package/dist/esm/utils.d.ts.map +1 -0
  33. package/dist/esm/utils.js +23 -0
  34. package/dist/esm/utils.js.map +1 -0
  35. package/dist/esm/v3.d.ts +5 -0
  36. package/dist/esm/v3.d.ts.map +1 -0
  37. package/dist/esm/v3.js +60 -0
  38. package/dist/esm/v3.js.map +1 -0
  39. package/dist/hash.browser.js +12 -5
  40. package/dist/hash.browser.js.map +1 -1
  41. package/dist/hash.node.js +17 -7
  42. package/dist/hash.node.js.map +1 -1
  43. package/dist/hash.test.js +40 -38
  44. package/dist/hash.test.js.map +1 -1
  45. package/dist/index.js +95 -46
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.test.js +26 -24
  48. package/dist/index.test.js.map +1 -1
  49. package/dist/types.js +2 -1
  50. package/dist/utils.js +17 -12
  51. package/dist/utils.js.map +1 -1
  52. package/dist/v3.js +7 -3
  53. package/dist/v3.js.map +1 -1
  54. package/package.json +6 -13
package/dist/constants.js CHANGED
@@ -1,10 +1,13 @@
1
- export const legalForms = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BoycottKeys = exports.ObservationKeys = exports.BountyKeys = exports.ratingKeys = exports.PDFSigningKeys = exports.responseKeys = exports.disputeContentKeys = exports.disputeAuthenticityKeys = exports.voteKeys = exports.personVerificationKeys = exports.organisationVerificationKeys = exports.pollKeys = exports.UTCFormat = exports.peopleCountBuckets = exports.statementTypes = exports.legalForms = void 0;
4
+ exports.legalForms = {
2
5
  local_government: 'local government',
3
6
  state_government: 'state government',
4
7
  foreign_affairs_ministry: 'foreign affairs ministry',
5
8
  corporation: 'corporation',
6
9
  };
7
- export const statementTypes = {
10
+ exports.statementTypes = {
8
11
  statement: 'statement',
9
12
  quotation: 'quotation',
10
13
  organisationVerification: 'organisation_verification',
@@ -21,7 +24,7 @@ export const statementTypes = {
21
24
  bounty: "bounty",
22
25
  unsupported: "unsupported",
23
26
  };
24
- export const peopleCountBuckets = {
27
+ exports.peopleCountBuckets = {
25
28
  "0": "0-10",
26
29
  "10": "10-100",
27
30
  "100": "100-1000",
@@ -31,17 +34,17 @@ export const peopleCountBuckets = {
31
34
  "1000000": "1,000,000+",
32
35
  "10000000": "10,000,000+",
33
36
  };
34
- export const UTCFormat = /(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT/;
35
- export const pollKeys = /(Type: |The poll outcome is finalized when the following nodes agree: |Voting deadline: |Poll: |Option 1: |Option 2: |Option 3: |Option 4: |Option 5: |Allow free text votes: |Who can vote: |Description: |Country scope: |City scope: |Legal form scope: |Domain scope: |All entities with the following property: |As observed by: |Link to query defining who can vote: )/g;
36
- export const organisationVerificationKeys = /(Type: |Description: |Name: |English name: |Country: |Legal entity: |Legal form: |Department using the domain: |Owner of the domain: |Foreign domain used for publishing statements: |Province or state: |Business register number: |City: |Longitude: |Latitude: |Population: |Logo: |Employee count: |Reliability policy: |Confidence: )/g;
37
- export const personVerificationKeys = /(Type: |Description: |Name: |Date of birth: |City of birth: |Country of birth: |Job title: |Employer: |Owner of the domain: |Foreign domain used for publishing statements: |Picture: |Verification method: |Confidence: |Reliability policy: )/g;
38
- export const voteKeys = /(Type: |Poll id: |Poll: |Option: )/g;
39
- export const disputeAuthenticityKeys = /(Type: |Description: |Hash of referenced statement: |Confidence: |Reliability policy: )/g;
40
- export const disputeContentKeys = /(Type: |Description: |Hash of referenced statement: |Confidence: |Reliability policy: )/g;
41
- export const responseKeys = /(Type: |Hash of referenced statement: |Response: )/;
42
- export const PDFSigningKeys = /(Type: |Description: |PDF file hash: )/;
43
- export const ratingKeys = /(Type: |Subject type: |Subject name: |URL that identifies the subject: |Document file hash: |Rated quality: |Our rating: |Comment: )/;
44
- export const BountyKeys = /(Type: |In order to: |We will reward any entity that: |The reward is: |In case of dispute, bounty claims are judged by: |The judge will be paid per investigated case with a maxium of: )/;
45
- export const ObservationKeys = /(Type: |Approach: |Confidence: |Reliability policy: |Subject: |Subject identity reference: |Observation reference: |Observed property: |Observed value: )/;
46
- export const BoycottKeys = /(Type: |Description: |Subject: |Subject identity reference: )/;
37
+ exports.UTCFormat = /(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT/;
38
+ exports.pollKeys = /(Type: |The poll outcome is finalized when the following nodes agree: |Voting deadline: |Poll: |Option 1: |Option 2: |Option 3: |Option 4: |Option 5: |Allow free text votes: |Who can vote: |Description: |Country scope: |City scope: |Legal form scope: |Domain scope: |All entities with the following property: |As observed by: |Link to query defining who can vote: )/g;
39
+ exports.organisationVerificationKeys = /(Type: |Description: |Name: |English name: |Country: |Legal entity: |Legal form: |Department using the domain: |Owner of the domain: |Foreign domain used for publishing statements: |Province or state: |Business register number: |City: |Longitude: |Latitude: |Population: |Logo: |Employee count: |Reliability policy: |Confidence: )/g;
40
+ exports.personVerificationKeys = /(Type: |Description: |Name: |Date of birth: |City of birth: |Country of birth: |Job title: |Employer: |Owner of the domain: |Foreign domain used for publishing statements: |Picture: |Verification method: |Confidence: |Reliability policy: )/g;
41
+ exports.voteKeys = /(Type: |Poll id: |Poll: |Option: )/g;
42
+ exports.disputeAuthenticityKeys = /(Type: |Description: |Hash of referenced statement: |Confidence: |Reliability policy: )/g;
43
+ exports.disputeContentKeys = /(Type: |Description: |Hash of referenced statement: |Confidence: |Reliability policy: )/g;
44
+ exports.responseKeys = /(Type: |Hash of referenced statement: |Response: )/;
45
+ exports.PDFSigningKeys = /(Type: |Description: |PDF file hash: )/;
46
+ exports.ratingKeys = /(Type: |Subject type: |Subject name: |URL that identifies the subject: |Document file hash: |Rated quality: |Our rating: |Comment: )/;
47
+ exports.BountyKeys = /(Type: |In order to: |We will reward any entity that: |The reward is: |In case of dispute, bounty claims are judged by: |The judge will be paid per investigated case with a maxium of: )/;
48
+ exports.ObservationKeys = /(Type: |Approach: |Confidence: |Reliability policy: |Subject: |Subject identity reference: |Observation reference: |Observed property: |Observed value: )/;
49
+ exports.BoycottKeys = /(Type: |Description: |Subject: |Subject identity reference: )/;
47
50
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {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AAS,GAAW,yHAAyH,CAAA;AAE7I,QAAA,QAAQ,GAAG,gXAAgX,CAAA;AAE3X,QAAA,4BAA4B,GAAG,6UAA6U,CAAA;AAE5W,QAAA,sBAAsB,GAAG,kPAAkP,CAAA;AAE3Q,QAAA,QAAQ,GAAG,qCAAqC,CAAA;AAEhD,QAAA,uBAAuB,GAAG,0FAA0F,CAAA;AAEpH,QAAA,kBAAkB,GAAG,0FAA0F,CAAA;AAE/G,QAAA,YAAY,GAAG,oDAAoD,CAAA;AAEnE,QAAA,cAAc,GAAG,wCAAwC,CAAA;AAEzD,QAAA,UAAU,GAAG,sIAAsI,CAAA;AAEnJ,QAAA,UAAU,GAAG,2LAA2L,CAAA;AAExM,QAAA,eAAe,GAAG,2JAA2J,CAAA;AAE7K,QAAA,WAAW,GAAG,+DAA+D,CAAA"}
@@ -0,0 +1,47 @@
1
+ export declare const legalForms: {
2
+ local_government: string;
3
+ state_government: string;
4
+ foreign_affairs_ministry: string;
5
+ corporation: string;
6
+ };
7
+ export declare const statementTypes: {
8
+ statement: string;
9
+ quotation: string;
10
+ organisationVerification: string;
11
+ personVerification: string;
12
+ poll: string;
13
+ vote: string;
14
+ response: string;
15
+ disputeContent: string;
16
+ disputeAuthenticity: string;
17
+ boycott: string;
18
+ observation: string;
19
+ rating: string;
20
+ signPdf: string;
21
+ bounty: string;
22
+ unsupported: string;
23
+ };
24
+ export declare const peopleCountBuckets: {
25
+ "0": string;
26
+ "10": string;
27
+ "100": string;
28
+ "1000": string;
29
+ "10000": string;
30
+ "100000": string;
31
+ "1000000": string;
32
+ "10000000": string;
33
+ };
34
+ export declare const UTCFormat: RegExp;
35
+ export declare const pollKeys: RegExp;
36
+ export declare const organisationVerificationKeys: RegExp;
37
+ export declare const personVerificationKeys: RegExp;
38
+ export declare const voteKeys: RegExp;
39
+ export declare const disputeAuthenticityKeys: RegExp;
40
+ export declare const disputeContentKeys: RegExp;
41
+ export declare const responseKeys: RegExp;
42
+ export declare const PDFSigningKeys: RegExp;
43
+ export declare const ratingKeys: RegExp;
44
+ export declare const BountyKeys: RegExp;
45
+ export declare const ObservationKeys: RegExp;
46
+ export declare const BoycottKeys: RegExp;
47
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;CAKtB,CAAA;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;CAgB1B,CAAA;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;CAS9B,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,MAAkI,CAAA;AAE1J,eAAO,MAAM,QAAQ,QAAmX,CAAA;AAExY,eAAO,MAAM,4BAA4B,QAAgV,CAAA;AAEzX,eAAO,MAAM,sBAAsB,QAAqP,CAAA;AAExR,eAAO,MAAM,QAAQ,QAAwC,CAAA;AAE7D,eAAO,MAAM,uBAAuB,QAA6F,CAAA;AAEjI,eAAO,MAAM,kBAAkB,QAA6F,CAAA;AAE5H,eAAO,MAAM,YAAY,QAAuD,CAAA;AAEhF,eAAO,MAAM,cAAc,QAA2C,CAAA;AAEtE,eAAO,MAAM,UAAU,QAAyI,CAAA;AAEhK,eAAO,MAAM,UAAU,QAA8L,CAAA;AAErN,eAAO,MAAM,eAAe,QAA8J,CAAA;AAE1L,eAAO,MAAM,WAAW,QAAkE,CAAA"}
@@ -0,0 +1,47 @@
1
+ export const legalForms = {
2
+ local_government: 'local government',
3
+ state_government: 'state government',
4
+ foreign_affairs_ministry: 'foreign affairs ministry',
5
+ corporation: 'corporation',
6
+ };
7
+ export const statementTypes = {
8
+ statement: 'statement',
9
+ quotation: 'quotation',
10
+ organisationVerification: 'organisation_verification',
11
+ personVerification: 'person_verification',
12
+ poll: 'poll',
13
+ vote: 'vote',
14
+ response: 'response',
15
+ disputeContent: 'dispute_statement_content',
16
+ disputeAuthenticity: 'dispute_statement_authenticity',
17
+ boycott: 'boycott',
18
+ observation: 'observation',
19
+ rating: 'rating',
20
+ signPdf: "sign_pdf",
21
+ bounty: "bounty",
22
+ unsupported: "unsupported",
23
+ };
24
+ export const peopleCountBuckets = {
25
+ "0": "0-10",
26
+ "10": "10-100",
27
+ "100": "100-1000",
28
+ "1000": "1000-10,000",
29
+ "10000": "10,000-100,000",
30
+ "100000": "100,000+",
31
+ "1000000": "1,000,000+",
32
+ "10000000": "10,000,000+",
33
+ };
34
+ export const UTCFormat = /(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT/;
35
+ export const pollKeys = /(Type: |The poll outcome is finalized when the following nodes agree: |Voting deadline: |Poll: |Option 1: |Option 2: |Option 3: |Option 4: |Option 5: |Allow free text votes: |Who can vote: |Description: |Country scope: |City scope: |Legal form scope: |Domain scope: |All entities with the following property: |As observed by: |Link to query defining who can vote: )/g;
36
+ export const organisationVerificationKeys = /(Type: |Description: |Name: |English name: |Country: |Legal entity: |Legal form: |Department using the domain: |Owner of the domain: |Foreign domain used for publishing statements: |Province or state: |Business register number: |City: |Longitude: |Latitude: |Population: |Logo: |Employee count: |Reliability policy: |Confidence: )/g;
37
+ export const personVerificationKeys = /(Type: |Description: |Name: |Date of birth: |City of birth: |Country of birth: |Job title: |Employer: |Owner of the domain: |Foreign domain used for publishing statements: |Picture: |Verification method: |Confidence: |Reliability policy: )/g;
38
+ export const voteKeys = /(Type: |Poll id: |Poll: |Option: )/g;
39
+ export const disputeAuthenticityKeys = /(Type: |Description: |Hash of referenced statement: |Confidence: |Reliability policy: )/g;
40
+ export const disputeContentKeys = /(Type: |Description: |Hash of referenced statement: |Confidence: |Reliability policy: )/g;
41
+ export const responseKeys = /(Type: |Hash of referenced statement: |Response: )/;
42
+ export const PDFSigningKeys = /(Type: |Description: |PDF file hash: )/;
43
+ export const ratingKeys = /(Type: |Subject type: |Subject name: |URL that identifies the subject: |Document file hash: |Rated quality: |Our rating: |Comment: )/;
44
+ export const BountyKeys = /(Type: |In order to: |We will reward any entity that: |The reward is: |In case of dispute, bounty claims are judged by: |The judge will be paid per investigated case with a maxium of: )/;
45
+ export const ObservationKeys = /(Type: |Approach: |Confidence: |Reliability policy: |Subject: |Subject identity reference: |Observation reference: |Observed property: |Observed value: )/;
46
+ export const BoycottKeys = /(Type: |Description: |Subject: |Subject identity reference: )/;
47
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,wBAAwB,EAAE,0BAA0B;IACpD,WAAW,EAAE,aAAa;CAC7B,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,wBAAwB,EAAE,2BAA2B;IACrD,kBAAkB,EAAE,qBAAqB;IACzC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,cAAc,EAAE,2BAA2B;IAC3C,mBAAmB,EAAE,gCAAgC;IACrD,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,UAAU;IACnB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;CAC7B,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,gBAAgB;IACzB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE,aAAa;CAC5B,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAW,yHAAyH,CAAA;AAE1J,MAAM,CAAC,MAAM,QAAQ,GAAG,gXAAgX,CAAA;AAExY,MAAM,CAAC,MAAM,4BAA4B,GAAG,6UAA6U,CAAA;AAEzX,MAAM,CAAC,MAAM,sBAAsB,GAAG,kPAAkP,CAAA;AAExR,MAAM,CAAC,MAAM,QAAQ,GAAG,qCAAqC,CAAA;AAE7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,0FAA0F,CAAA;AAEjI,MAAM,CAAC,MAAM,kBAAkB,GAAG,0FAA0F,CAAA;AAE5H,MAAM,CAAC,MAAM,YAAY,GAAG,oDAAoD,CAAA;AAEhF,MAAM,CAAC,MAAM,cAAc,GAAG,wCAAwC,CAAA;AAEtE,MAAM,CAAC,MAAM,UAAU,GAAG,sIAAsI,CAAA;AAEhK,MAAM,CAAC,MAAM,UAAU,GAAG,2LAA2L,CAAA;AAErN,MAAM,CAAC,MAAM,eAAe,GAAG,2JAA2J,CAAA;AAE1L,MAAM,CAAC,MAAM,WAAW,GAAG,+DAA+D,CAAA"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Browser-compatible hash utilities using Web Crypto API
3
+ * Async operations for client-side use
4
+ */
5
+ /**
6
+ * Compute SHA-256 hash of a string and return it as URL-safe base64
7
+ * Works in both browser and Node.js environments
8
+ * @param input - The string or buffer to hash
9
+ * @returns URL-safe base64 encoded hash
10
+ */
11
+ export declare const sha256: (input: string | Uint8Array) => Promise<string>;
12
+ /**
13
+ * Verify that content matches a given hash
14
+ * @param content - The content to verify
15
+ * @param hash - The expected hash
16
+ * @returns True if the hash matches
17
+ */
18
+ export declare const verify: (content: string | Uint8Array, hash: string) => Promise<boolean>;
19
+ /**
20
+ * Convert URL-safe base64 back to standard base64
21
+ * @param urlSafe - URL-safe base64 string
22
+ * @returns Standard base64 string with padding
23
+ */
24
+ export declare const fromUrlSafeBase64: (urlSafe: string) => string;
25
+ /**
26
+ * Convert standard base64 to URL-safe base64
27
+ * @param base64 - Standard base64 string
28
+ * @returns URL-safe base64 string without padding
29
+ */
30
+ export declare const toUrlSafeBase64: (base64: string) => string;
31
+ //# sourceMappingURL=hash.browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.browser.d.ts","sourceRoot":"","sources":["../../src/hash.browser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GAAU,OAAO,MAAM,GAAG,UAAU,KAAG,OAAO,CAAC,MAAM,CAqBvE,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GAAU,SAAS,MAAM,GAAG,UAAU,EAAE,MAAM,MAAM,KAAG,OAAO,CAAC,OAAO,CAGxF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,MAKnD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,KAAG,MAEhD,CAAA"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Browser-compatible hash utilities using Web Crypto API
3
+ * Async operations for client-side use
4
+ */
5
+ /**
6
+ * Compute SHA-256 hash of a string and return it as URL-safe base64
7
+ * Works in both browser and Node.js environments
8
+ * @param input - The string or buffer to hash
9
+ * @returns URL-safe base64 encoded hash
10
+ */
11
+ export const sha256 = async (input) => {
12
+ let data;
13
+ if (typeof input === 'string') {
14
+ const encoder = new TextEncoder();
15
+ data = encoder.encode(input);
16
+ }
17
+ else {
18
+ data = input;
19
+ }
20
+ // Use Web Crypto API (available in both modern browsers and Node.js 15+)
21
+ const hashBuffer = await crypto.subtle.digest('SHA-256', data);
22
+ const hashArray = Array.from(new Uint8Array(hashBuffer));
23
+ // Convert to base64
24
+ const base64 = btoa(String.fromCharCode(...hashArray));
25
+ // Make URL-safe: remove padding and replace + with - and / with _
26
+ const urlSafe = base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
27
+ return urlSafe;
28
+ };
29
+ /**
30
+ * Verify that content matches a given hash
31
+ * @param content - The content to verify
32
+ * @param hash - The expected hash
33
+ * @returns True if the hash matches
34
+ */
35
+ export const verify = async (content, hash) => {
36
+ const computed = await sha256(content);
37
+ return computed === hash;
38
+ };
39
+ /**
40
+ * Convert URL-safe base64 back to standard base64
41
+ * @param urlSafe - URL-safe base64 string
42
+ * @returns Standard base64 string with padding
43
+ */
44
+ export const fromUrlSafeBase64 = (urlSafe) => {
45
+ const base64 = urlSafe.replace(/-/g, '+').replace(/_/g, '/');
46
+ // Add padding if needed
47
+ const padding = '='.repeat((4 - (base64.length % 4)) % 4);
48
+ return base64 + padding;
49
+ };
50
+ /**
51
+ * Convert standard base64 to URL-safe base64
52
+ * @param base64 - Standard base64 string
53
+ * @returns URL-safe base64 string without padding
54
+ */
55
+ export const toUrlSafeBase64 = (base64) => {
56
+ return base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
57
+ };
58
+ //# sourceMappingURL=hash.browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.browser.js","sourceRoot":"","sources":["../../src/hash.browser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,EAAE,KAA0B,EAAmB,EAAE;IACxE,IAAI,IAAgB,CAAC;IAErB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;QAClC,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;SAAM,CAAC;QACJ,IAAI,GAAG,KAAK,CAAC;IACjB,CAAC;IAED,yEAAyE;IACzE,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,I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
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Node.js-specific hash utilities using native crypto module
3
+ * Synchronous operations for server-side use
4
+ */
5
+ import crypto from 'crypto';
6
+ /**
7
+ * Compute SHA-256 hash and return as URL-safe base64 (Node.js)
8
+ * @param input - String or buffer to hash
9
+ * @returns URL-safe base64 encoded hash
10
+ */
11
+ export declare const sha256: (input: crypto.BinaryLike) => string;
12
+ /**
13
+ * Verify that content matches a given hash
14
+ * @param content - Content to verify
15
+ * @param hash - Expected hash
16
+ * @returns True if hash matches
17
+ */
18
+ export declare const verify: (content: crypto.BinaryLike, hash: string) => boolean;
19
+ /**
20
+ * Convert URL-safe base64 back to standard base64
21
+ * @param urlSafe - URL-safe base64 string
22
+ * @returns Standard base64 string with padding
23
+ */
24
+ export declare const fromUrlSafeBase64: (urlSafe: string) => string;
25
+ /**
26
+ * Convert standard base64 to URL-safe base64
27
+ * @param base64 - Standard base64 string
28
+ * @returns URL-safe base64 string without padding
29
+ */
30
+ export declare const toUrlSafeBase64: (base64: string) => string;
31
+ //# sourceMappingURL=hash.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.node.d.ts","sourceRoot":"","sources":["../../src/hash.node.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,MAAM,CAAC,UAAU,KAAG,MAIjD,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GAAI,SAAS,MAAM,CAAC,UAAU,EAAE,MAAM,MAAM,KAAG,OAEjE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,MAInD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,KAAG,MAEhD,CAAA"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Node.js-specific hash utilities using native crypto module
3
+ * Synchronous operations for server-side use
4
+ */
5
+ import crypto from 'crypto';
6
+ /**
7
+ * Compute SHA-256 hash and return as URL-safe base64 (Node.js)
8
+ * @param input - String or buffer to hash
9
+ * @returns URL-safe base64 encoded hash
10
+ */
11
+ export const sha256 = (input) => {
12
+ const base64 = crypto.createHash('sha256').update(input).digest('base64');
13
+ const urlSafe = base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
14
+ return urlSafe;
15
+ };
16
+ /**
17
+ * Verify that content matches a given hash
18
+ * @param content - Content to verify
19
+ * @param hash - Expected hash
20
+ * @returns True if hash matches
21
+ */
22
+ export const verify = (content, hash) => {
23
+ return hash === sha256(content);
24
+ };
25
+ /**
26
+ * Convert URL-safe base64 back to standard base64
27
+ * @param urlSafe - URL-safe base64 string
28
+ * @returns Standard base64 string with padding
29
+ */
30
+ export const fromUrlSafeBase64 = (urlSafe) => {
31
+ const base64 = urlSafe.replace(/-/g, '+').replace(/_/g, '/');
32
+ const padding = '='.repeat((4 - (base64.length % 4)) % 4);
33
+ return base64 + padding;
34
+ };
35
+ /**
36
+ * Convert standard base64 to URL-safe base64
37
+ * @param base64 - Standard base64 string
38
+ * @returns URL-safe base64 string without padding
39
+ */
40
+ export const toUrlSafeBase64 = (base64) => {
41
+ return base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
42
+ };
43
+ //# sourceMappingURL=hash.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.node.js","sourceRoot":"","sources":["../../src/hash.node.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAwB,EAAU,EAAE;IACvD,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IACzE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;IAChF,OAAO,OAAO,CAAA;AAClB,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAA0B,EAAE,IAAY,EAAW,EAAE;IACxE,OAAO,IAAI,KAAK,MAAM,CAAC,OAAO,CAAC,CAAA;AACnC,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAe,EAAU,EAAE;IACzD,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1D,OAAO,MAAM,GAAG,OAAO,CAAC;AAC5B,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAc,EAAU,EAAE;IACtD,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC5E,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=hash.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.test.d.ts","sourceRoot":"","sources":["../../src/hash.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,181 @@
1
+ import { sha256, verify, fromUrlSafeBase64, toUrlSafeBase64 } from './hash.node';
2
+ describe('Hash utilities', () => {
3
+ describe('sha256', () => {
4
+ it('should hash a simple string', () => {
5
+ const input = 'hello world';
6
+ const hash = sha256(input);
7
+ // Verify it's URL-safe (no +, /, or =)
8
+ expect(hash).not.toContain('+');
9
+ expect(hash).not.toContain('/');
10
+ expect(hash).not.toContain('=');
11
+ // Verify consistent output
12
+ const hash2 = sha256(input);
13
+ expect(hash).toBe(hash2);
14
+ });
15
+ it('should produce correct hash for known input', () => {
16
+ const input = 'hello world';
17
+ const expectedHash = 'uU0nuZNNPgilLlLX2n2r-sSE7-N6U4DukIj3rOLvzek';
18
+ const hash = sha256(input);
19
+ expect(hash).toBe(expectedHash);
20
+ });
21
+ it('should handle empty string', () => {
22
+ const hash = sha256('');
23
+ expect(hash).toBeTruthy();
24
+ expect(typeof hash).toBe('string');
25
+ });
26
+ it('should handle unicode characters', () => {
27
+ const input = '你好世界 🌍';
28
+ const hash = sha256(input);
29
+ expect(hash).toBeTruthy();
30
+ expect(typeof hash).toBe('string');
31
+ // Verify consistency
32
+ const hash2 = sha256(input);
33
+ expect(hash).toBe(hash2);
34
+ });
35
+ it('should handle Buffer input', () => {
36
+ const data = Buffer.from('hello world');
37
+ const hash = sha256(data);
38
+ // Should produce same hash as string input
39
+ const stringHash = sha256('hello world');
40
+ expect(hash).toBe(stringHash);
41
+ });
42
+ it('should produce different hashes for different inputs', () => {
43
+ const hash1 = sha256('hello');
44
+ const hash2 = sha256('world');
45
+ expect(hash1).not.toBe(hash2);
46
+ });
47
+ it('should produce 43-character URL-safe base64 string', () => {
48
+ const hash = sha256('test');
49
+ // SHA-256 produces 256 bits = 32 bytes
50
+ // Base64 encoding: 32 bytes * 4/3 = 42.67, rounded up = 43 chars (without padding)
51
+ expect(hash.length).toBe(43);
52
+ });
53
+ });
54
+ describe('verify', () => {
55
+ it('should verify correct hash', () => {
56
+ const content = 'hello world';
57
+ const hash = sha256(content);
58
+ const isValid = verify(content, hash);
59
+ expect(isValid).toBe(true);
60
+ });
61
+ it('should reject incorrect hash', () => {
62
+ const content = 'hello world';
63
+ const wrongHash = 'incorrect_hash_value_here_1234567890';
64
+ const isValid = verify(content, wrongHash);
65
+ expect(isValid).toBe(false);
66
+ });
67
+ it('should reject hash for different content', () => {
68
+ const content1 = 'hello world';
69
+ const content2 = 'goodbye world';
70
+ const hash1 = sha256(content1);
71
+ const isValid = verify(content2, hash1);
72
+ expect(isValid).toBe(false);
73
+ });
74
+ it('should work with Buffer', () => {
75
+ const data = Buffer.from('test data');
76
+ const hash = sha256(data);
77
+ const isValid = verify(data, hash);
78
+ expect(isValid).toBe(true);
79
+ });
80
+ });
81
+ describe('fromUrlSafeBase64', () => {
82
+ it('should convert URL-safe base64 to standard base64', () => {
83
+ // Use a URL-safe string that contains both - and _ characters
84
+ const urlSafe = 'abc-def_ghi';
85
+ const standard = fromUrlSafeBase64(urlSafe);
86
+ // Should replace - with + and _ with /
87
+ expect(standard).toContain('+');
88
+ expect(standard).toContain('/');
89
+ // Should add padding
90
+ expect(standard.endsWith('=')).toBe(true);
91
+ });
92
+ it('should add correct padding', () => {
93
+ // Test different padding scenarios
94
+ const testCases = [
95
+ { input: 'abc', expectedPadding: 1 },
96
+ { input: 'abcd', expectedPadding: 0 },
97
+ { input: 'abcde', expectedPadding: 3 },
98
+ { input: 'abcdef', expectedPadding: 2 },
99
+ ];
100
+ testCases.forEach(({ input, expectedPadding }) => {
101
+ const result = fromUrlSafeBase64(input);
102
+ const paddingCount = (result.match(/=/g) || []).length;
103
+ expect(paddingCount).toBe(expectedPadding);
104
+ });
105
+ });
106
+ it('should handle strings without special characters', () => {
107
+ const input = 'abcdefghijklmnop';
108
+ const result = fromUrlSafeBase64(input);
109
+ expect(result).toBeTruthy();
110
+ });
111
+ });
112
+ describe('toUrlSafeBase64', () => {
113
+ it('should convert standard base64 to URL-safe', () => {
114
+ const standard = 'uU0nuZNNPgilLlLX2n2r+sSE7+N6U4DukIj3rOLvzek=';
115
+ const urlSafe = toUrlSafeBase64(standard);
116
+ // Should not contain standard base64 special characters
117
+ expect(urlSafe).not.toContain('+');
118
+ expect(urlSafe).not.toContain('/');
119
+ expect(urlSafe).not.toContain('=');
120
+ // Should contain URL-safe replacements
121
+ expect(urlSafe).toContain('-');
122
+ });
123
+ it('should remove padding', () => {
124
+ const withPadding = 'abc=';
125
+ const result = toUrlSafeBase64(withPadding);
126
+ expect(result).not.toContain('=');
127
+ expect(result).toBe('abc');
128
+ });
129
+ it('should be reversible with fromUrlSafeBase64', () => {
130
+ // Start with a standard base64 string with special chars
131
+ const original = 'test+data/with==';
132
+ const urlSafe = toUrlSafeBase64(original);
133
+ const restored = fromUrlSafeBase64(urlSafe);
134
+ // Should restore to equivalent base64 (padding might differ slightly)
135
+ expect(restored.replace(/=+$/, '')).toBe(original.replace(/=+$/, ''));
136
+ });
137
+ });
138
+ describe('Round-trip conversions', () => {
139
+ it('should maintain hash integrity through URL-safe conversion', () => {
140
+ const content = 'test content for hashing';
141
+ const hash = sha256(content);
142
+ // Convert to standard base64 and back
143
+ const standard = fromUrlSafeBase64(hash);
144
+ const backToUrlSafe = toUrlSafeBase64(standard);
145
+ expect(backToUrlSafe).toBe(hash);
146
+ });
147
+ it('should verify hash after conversion', () => {
148
+ const content = 'verification test';
149
+ const hash = sha256(content);
150
+ // Convert and back
151
+ const standard = fromUrlSafeBase64(hash);
152
+ const urlSafe = toUrlSafeBase64(standard);
153
+ // Should still verify
154
+ const isValid = verify(content, urlSafe);
155
+ expect(isValid).toBe(true);
156
+ });
157
+ });
158
+ describe('Edge cases', () => {
159
+ it('should handle very long strings', () => {
160
+ const longString = 'a'.repeat(10000);
161
+ const hash = sha256(longString);
162
+ expect(hash).toBeTruthy();
163
+ expect(hash.length).toBe(43);
164
+ });
165
+ it('should handle special characters', () => {
166
+ const special = '!@#$%^&*()_+-=[]{}|;:,.<>?';
167
+ const hash = sha256(special);
168
+ expect(hash).toBeTruthy();
169
+ const isValid = verify(special, hash);
170
+ expect(isValid).toBe(true);
171
+ });
172
+ it('should handle newlines and whitespace', () => {
173
+ const withNewlines = 'line1\nline2\r\nline3\ttab';
174
+ const hash = sha256(withNewlines);
175
+ expect(hash).toBeTruthy();
176
+ const isValid = verify(withNewlines, hash);
177
+ expect(isValid).toBe(true);
178
+ });
179
+ });
180
+ });
181
+ //# sourceMappingURL=hash.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.test.js","sourceRoot":"","sources":["../../src/hash.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEjF,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC5B,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACpB,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;YACnC,MAAM,KAAK,GAAG,aAAa,CAAC;YAC5B,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAE3B,uCAAuC;YACvC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAEhC,2BAA2B;YAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;YACnD,MAAM,KAAK,GAAG,aAAa,CAAC;YAC5B,MAAM,YAAY,GAAG,6CAA6C,CAAC;YACnE,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAC3B,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC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C;YAC3C,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { Statement, Quotation, Poll, OrganisationVerification, PersonVerification, Vote, DisputeAuthenticity, DisputeContent, ResponseContent, PDFSigning, Rating, Bounty, Observation, Boycott } from './types';
2
+ export * from './types';
3
+ export * from './constants';
4
+ export * from './utils';
5
+ export * from './v3';
6
+ export * from './hash.browser';
7
+ export { sha256 as sha256Node, verify as verifyNode, fromUrlSafeBase64, toUrlSafeBase64 } from './hash.node';
8
+ export declare const buildStatement: ({ domain, author, time, tags, content, representative, supersededStatement }: Statement) => string;
9
+ export declare const parseStatement: ({ statement: s, allowNoVersion }: {
10
+ statement: string;
11
+ allowNoVersion?: boolean;
12
+ }) => Statement & {
13
+ type?: string;
14
+ formatVersion: string;
15
+ };
16
+ export declare const buildQuotationContent: ({ originalAuthor, authorVerification, originalTime, source, quotation, paraphrasedStatement, picture, confidence }: Quotation) => string;
17
+ export declare const parseQuotation: (s: string) => Quotation & {
18
+ type: string | undefined;
19
+ };
20
+ export declare const buildPollContent: ({ country, city, legalEntity, domainScope, judges, deadline, poll, scopeDescription, scopeQueryLink, options, allowArbitraryVote, requiredProperty: propertyScope, requiredPropertyObserver: propertyScopeObserver }: Poll) => string;
21
+ export declare const parsePoll: (s: string, version?: string) => Poll;
22
+ export declare const buildOrganisationVerificationContent: ({ name, englishName, country, city, province, legalForm, department, domain, foreignDomain, serialNumber, confidence, reliabilityPolicy, employeeCount, pictureHash, latitude, longitude, population }: OrganisationVerification) => string;
23
+ export declare const parseOrganisationVerification: (s: string) => OrganisationVerification;
24
+ export declare const buildPersonVerificationContent: ({ name, countryOfBirth, cityOfBirth, ownDomain, foreignDomain, dateOfBirth, jobTitle, employer, verificationMethod, confidence, picture, reliabilityPolicy }: PersonVerification) => string;
25
+ export declare const parsePersonVerification: (s: string) => PersonVerification;
26
+ export declare const buildVoteContent: ({ pollHash, poll, vote }: Vote) => string;
27
+ export declare const parseVote: (s: string) => Vote;
28
+ export declare const buildDisputeAuthenticityContent: ({ hash, confidence, reliabilityPolicy }: DisputeAuthenticity) => string;
29
+ export declare const parseDisputeAuthenticity: (s: string) => DisputeAuthenticity;
30
+ export declare const buildDisputeContentContent: ({ hash, confidence, reliabilityPolicy }: DisputeContent) => string;
31
+ export declare const parseDisputeContent: (s: string) => DisputeContent;
32
+ export declare const buildResponseContent: ({ hash, response }: ResponseContent) => string;
33
+ export declare const parseResponseContent: (s: string) => ResponseContent;
34
+ export declare const buildPDFSigningContent: ({ hash }: PDFSigning) => string;
35
+ export declare const parsePDFSigning: (s: string) => PDFSigning;
36
+ export declare const buildRating: ({ subjectName, subjectType, subjectReference, documentFileHash, rating, quality, comment }: Rating) => string;
37
+ export declare const parseRating: (s: string) => Rating;
38
+ export declare const buildBounty: ({ motivation, bounty, reward, judge, judgePay }: Bounty) => string;
39
+ export declare const parseBounty: (s: string) => Bounty;
40
+ export declare const buildObservation: ({ approach, confidence, reliabilityPolicy, subject, subjectReference, observationReference, property, value }: Observation) => string;
41
+ export declare const parseObservation: (s: string) => Observation;
42
+ export declare const buildBoycott: ({ description, subject, subjectReference }: Boycott) => string;
43
+ export declare const parseBoycott: (s: string) => Boycott;
44
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,SAAS,EACT,SAAS,EACT,IAAI,EACJ,wBAAwB,EACxB,kBAAkB,EAClB,IAAI,EACJ,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,UAAU,EACV,MAAM,EAEN,MAAM,EACN,WAAW,EACX,OAAO,EACV,MAAM,SAAS,CAAA;AAKhB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAA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