dev-dict 0.10.3 → 0.11.1
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/README.md +5 -127
- package/dist/config/completeness.d.ts +16 -0
- package/dist/config/completeness.d.ts.map +1 -0
- package/dist/dev-dict.min.js +1 -1
- package/dist/dev-dict.min.js.map +1 -1
- package/dist/helpers-CkAAMBq6.js +90 -0
- package/dist/helpers-CkAAMBq6.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +219 -156
- package/dist/index.js.map +1 -1
- package/dist/{terms-entry-CvCnHqL5.js → terms-entry-B5h5Sf6S.js} +2 -2
- package/dist/{terms-entry-CvCnHqL5.js.map → terms-entry-B5h5Sf6S.js.map} +1 -1
- package/dist/terms-entry.js +1 -1
- package/dist/umd.d.ts.map +1 -1
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils-entry.js +2 -2
- package/package.json +1 -1
- package/dist/helpers-i56sLJez.js +0 -87
- package/dist/helpers-i56sLJez.js.map +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { L as r } from "./index-DX_tPBsM.js";
|
|
2
|
+
const _ = {
|
|
3
|
+
TERM_INTERPOLATION_KEYS: ["name", "altName", "label", "definition"]
|
|
4
|
+
}, i = {
|
|
5
|
+
DEFAULT_LOCALE: r.EN_US,
|
|
6
|
+
POPULATE_EMPTY: !0
|
|
7
|
+
}, T = ({
|
|
8
|
+
obj: e,
|
|
9
|
+
value: n,
|
|
10
|
+
populateEmpty: s = i.POPULATE_EMPTY
|
|
11
|
+
}) => n && Object.values(r).includes(n) ? e[n] || (s ? e[r.EN_US] : "") : n || (s ? e[r.EN_US] : ""), P = ({
|
|
12
|
+
obj: e,
|
|
13
|
+
populateEmpty: n = i.POPULATE_EMPTY
|
|
14
|
+
}) => {
|
|
15
|
+
const s = Object.values(r);
|
|
16
|
+
return Object.fromEntries(
|
|
17
|
+
s.map((t) => [t, T({ obj: e, value: e[t], populateEmpty: n })])
|
|
18
|
+
);
|
|
19
|
+
}, b = ({
|
|
20
|
+
obj: e,
|
|
21
|
+
keys: n,
|
|
22
|
+
populateEmpty: s = i.POPULATE_EMPTY
|
|
23
|
+
}) => Object.fromEntries(
|
|
24
|
+
Object.entries(e).map(([t, a]) => {
|
|
25
|
+
const c = n.filter((L) => L in a && typeof a[L] == "object").map((L) => [L, P({ obj: a[L], populateEmpty: s })]);
|
|
26
|
+
return [t, { ...a, ...Object.fromEntries(c) }];
|
|
27
|
+
})
|
|
28
|
+
), o = ({
|
|
29
|
+
obj: e,
|
|
30
|
+
locale: n = i.DEFAULT_LOCALE,
|
|
31
|
+
populateEmpty: s = i.POPULATE_EMPTY
|
|
32
|
+
}) => T({ obj: e, value: e[n], populateEmpty: s }), U = ({
|
|
33
|
+
term: e,
|
|
34
|
+
locale: n = i.DEFAULT_LOCALE,
|
|
35
|
+
populateEmpty: s = i.POPULATE_EMPTY
|
|
36
|
+
}) => {
|
|
37
|
+
const t = e.sources ? {
|
|
38
|
+
...e.sources.label && {
|
|
39
|
+
label: e.sources.label.map((a) => E({ source: a, locale: n, populateEmpty: s }))
|
|
40
|
+
},
|
|
41
|
+
...e.sources.definition && {
|
|
42
|
+
definition: e.sources.definition.map((a) => E({ source: a, locale: n, populateEmpty: s }))
|
|
43
|
+
}
|
|
44
|
+
} : void 0;
|
|
45
|
+
return {
|
|
46
|
+
id: e.id,
|
|
47
|
+
name: o({ obj: e.name, locale: n, populateEmpty: s }),
|
|
48
|
+
..."altName" in e && e.altName ? { altName: o({ obj: e.altName, locale: n, populateEmpty: s }) } : {},
|
|
49
|
+
type: e.type.map((a) => A({ type: a, locale: n, populateEmpty: s })),
|
|
50
|
+
label: o({ obj: e.label, locale: n, populateEmpty: s }),
|
|
51
|
+
definition: o({ obj: e.definition, locale: n, populateEmpty: s }),
|
|
52
|
+
tags: e.tags.map((a) => O({ tag: a, locale: n, populateEmpty: s })),
|
|
53
|
+
links: e.links,
|
|
54
|
+
...t && Object.keys(t).length > 0 ? { sources: t } : {}
|
|
55
|
+
};
|
|
56
|
+
}, O = ({
|
|
57
|
+
tag: e,
|
|
58
|
+
locale: n = i.DEFAULT_LOCALE,
|
|
59
|
+
populateEmpty: s = i.POPULATE_EMPTY
|
|
60
|
+
}) => ({
|
|
61
|
+
id: e.id,
|
|
62
|
+
name: o({ obj: e.name, locale: n, populateEmpty: s })
|
|
63
|
+
}), A = ({
|
|
64
|
+
type: e,
|
|
65
|
+
locale: n = i.DEFAULT_LOCALE,
|
|
66
|
+
populateEmpty: s = i.POPULATE_EMPTY
|
|
67
|
+
}) => ({
|
|
68
|
+
id: e.id,
|
|
69
|
+
name: o({ obj: e.name, locale: n, populateEmpty: s })
|
|
70
|
+
}), E = ({
|
|
71
|
+
source: e,
|
|
72
|
+
locale: n = i.DEFAULT_LOCALE,
|
|
73
|
+
populateEmpty: s = i.POPULATE_EMPTY
|
|
74
|
+
}) => ({
|
|
75
|
+
id: e.id,
|
|
76
|
+
name: o({ obj: e.name, locale: n, populateEmpty: s })
|
|
77
|
+
});
|
|
78
|
+
export {
|
|
79
|
+
i as C,
|
|
80
|
+
_ as M,
|
|
81
|
+
A as a,
|
|
82
|
+
O as b,
|
|
83
|
+
E as c,
|
|
84
|
+
T as d,
|
|
85
|
+
P as e,
|
|
86
|
+
o as f,
|
|
87
|
+
U as g,
|
|
88
|
+
b as i
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=helpers-CkAAMBq6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers-CkAAMBq6.js","sources":["../src/common/index.ts","../src/utils/helpers.ts"],"sourcesContent":["import { LOCALES } from '@/data/locales'\n\nexport const MISC = {\n TERM_INTERPOLATION_KEYS: ['name', 'altName', 'label', 'definition'],\n}\n\nexport const CONFIG = {\n DEFAULT_LOCALE: LOCALES.EN_US,\n POPULATE_EMPTY: true,\n}\n","import type {\n TLocale,\n TLocaleRecord,\n TTerm,\n TTermLocalized,\n TTermSource,\n TTermSourceLocalized,\n TTermTag,\n TTermTagLocalized,\n TTermType,\n TTermTypeLocalized,\n} from '@/types'\nimport { CONFIG } from '@/common'\nimport { LOCALES } from '@/data/locales'\n\n/**\n * This method will convert e.g. `[LOCALES.EN_GB]: LOCALES.EN_US` to the actual value\n * of the specified locale, in this case the value of `LOCALES.EN_US`.\n */\nexport const interpolateValue = ({\n obj,\n value,\n populateEmpty = CONFIG.POPULATE_EMPTY,\n}: {\n obj: TLocaleRecord\n value: undefined | string\n populateEmpty?: boolean\n}): string => {\n if (value && Object.values<string>(LOCALES).includes(value)) {\n return obj[value as TLocale] || (populateEmpty ? obj[LOCALES.EN_US] : '')\n }\n return value || (populateEmpty ? obj[LOCALES.EN_US] : '')\n}\n\nexport const interpolateLocaleRecord = ({\n obj,\n populateEmpty = CONFIG.POPULATE_EMPTY,\n}: {\n obj: TLocaleRecord\n populateEmpty?: boolean\n}): TLocaleRecord => {\n const locales = Object.values<string>(LOCALES) as TLocale[]\n\n return Object.fromEntries(\n locales.map((locale) => [locale, interpolateValue({ obj, value: obj[locale], populateEmpty })]),\n ) as TLocaleRecord\n}\n\nexport const interpolateValues = <T extends Record<string, any>>({\n obj,\n keys,\n populateEmpty = CONFIG.POPULATE_EMPTY,\n}: {\n obj: T\n keys: string[]\n populateEmpty?: boolean\n}): T => {\n return Object.fromEntries(\n Object.entries(obj).map(([itemKey, item]) => {\n const interpolatedFields = keys\n .filter((key) => key in item && typeof item[key] === 'object')\n .map((key) => [key, interpolateLocaleRecord({ obj: item[key], populateEmpty })])\n\n return [itemKey, { ...item, ...Object.fromEntries(interpolatedFields) }]\n }),\n ) as T\n}\n\nexport const getValueLocalized = ({\n obj,\n locale = CONFIG.DEFAULT_LOCALE,\n populateEmpty = CONFIG.POPULATE_EMPTY,\n}: {\n obj: TLocaleRecord\n locale?: TLocale\n populateEmpty?: boolean\n}): string => {\n return interpolateValue({ obj, value: obj[locale], populateEmpty })\n}\n\nexport const getTerm = ({\n term,\n locale = CONFIG.DEFAULT_LOCALE,\n populateEmpty = CONFIG.POPULATE_EMPTY,\n}: {\n term: TTerm\n locale?: TLocale\n populateEmpty?: boolean\n}): TTermLocalized => {\n const sourcesLocalized = term.sources\n ? {\n ...(term.sources.label && {\n label: term.sources.label.map((value) => getSource({ source: value, locale, populateEmpty })),\n }),\n ...(term.sources.definition && {\n definition: term.sources.definition.map((value) => getSource({ source: value, locale, populateEmpty })),\n }),\n }\n : undefined\n\n return {\n id: term.id,\n name: getValueLocalized({ obj: term.name, locale, populateEmpty }),\n ...('altName' in term && term.altName\n ? { altName: getValueLocalized({ obj: term.altName, locale, populateEmpty }) }\n : {}),\n type: term.type.map((value) => getType({ type: value, locale, populateEmpty })),\n label: getValueLocalized({ obj: term.label, locale, populateEmpty }),\n definition: getValueLocalized({ obj: term.definition, locale, populateEmpty }),\n tags: term.tags.map((value) => getTag({ tag: value, locale, populateEmpty })),\n links: term.links,\n ...(sourcesLocalized && Object.keys(sourcesLocalized).length > 0 ? { sources: sourcesLocalized } : {}),\n } as TTermLocalized\n}\n\nexport const getTag = ({\n tag,\n locale = CONFIG.DEFAULT_LOCALE,\n populateEmpty = CONFIG.POPULATE_EMPTY,\n}: {\n tag: TTermTag\n locale?: TLocale\n populateEmpty?: boolean\n}): TTermTagLocalized => {\n return {\n id: tag.id,\n name: getValueLocalized({ obj: tag.name, locale, populateEmpty }),\n }\n}\n\nexport const getType = ({\n type,\n locale = CONFIG.DEFAULT_LOCALE,\n populateEmpty = CONFIG.POPULATE_EMPTY,\n}: {\n type: TTermType\n locale?: TLocale\n populateEmpty?: boolean\n}): TTermTypeLocalized => {\n return {\n id: type.id,\n name: getValueLocalized({ obj: type.name, locale, populateEmpty }),\n }\n}\n\nexport const getSource = ({\n source,\n locale = CONFIG.DEFAULT_LOCALE,\n populateEmpty = CONFIG.POPULATE_EMPTY,\n}: {\n source: TTermSource\n locale?: TLocale\n populateEmpty?: boolean\n}): TTermSourceLocalized => {\n return {\n id: source.id,\n name: getValueLocalized({ obj: source.name, locale, populateEmpty }),\n }\n}\n"],"names":["MISC","CONFIG","LOCALES","interpolateValue","obj","value","populateEmpty","interpolateLocaleRecord","locales","locale","interpolateValues","keys","itemKey","item","interpolatedFields","key","getValueLocalized","getTerm","term","sourcesLocalized","getSource","getType","getTag","tag","type","source"],"mappings":";AAEO,MAAMA,IAAO;AAAA,EAClB,yBAAyB,CAAC,QAAQ,WAAW,SAAS,YAAY;AACpE,GAEaC,IAAS;AAAA,EACpB,gBAAgBC,EAAQ;AAAA,EACxB,gBAAgB;AAClB,GCUaC,IAAmB,CAAC;AAAA,EAC/B,KAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC,IAAgBL,EAAO;AACzB,MAKMI,KAAS,OAAO,OAAeH,CAAO,EAAE,SAASG,CAAK,IACjDD,EAAIC,CAAgB,MAAMC,IAAgBF,EAAIF,EAAQ,KAAK,IAAI,MAEjEG,MAAUC,IAAgBF,EAAIF,EAAQ,KAAK,IAAI,KAG3CK,IAA0B,CAAC;AAAA,EACtC,KAAAH;AAAA,EACA,eAAAE,IAAgBL,EAAO;AACzB,MAGqB;AACnB,QAAMO,IAAU,OAAO,OAAeN,CAAO;AAE7C,SAAO,OAAO;AAAA,IACZM,EAAQ,IAAI,CAACC,MAAW,CAACA,GAAQN,EAAiB,EAAE,KAAAC,GAAK,OAAOA,EAAIK,CAAM,GAAG,eAAAH,EAAA,CAAe,CAAC,CAAC;AAAA,EAAA;AAElG,GAEaI,IAAoB,CAAgC;AAAA,EAC/D,KAAAN;AAAA,EACA,MAAAO;AAAA,EACA,eAAAL,IAAgBL,EAAO;AACzB,MAKS,OAAO;AAAA,EACZ,OAAO,QAAQG,CAAG,EAAE,IAAI,CAAC,CAACQ,GAASC,CAAI,MAAM;AAC3C,UAAMC,IAAqBH,EACxB,OAAO,CAACI,MAAQA,KAAOF,KAAQ,OAAOA,EAAKE,CAAG,KAAM,QAAQ,EAC5D,IAA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'./data/terms';
|
|
4
4
|
export { TYPES as types } from './data/types';
|
|
5
5
|
export { SOURCES as sources } from './data/sources';
|
|
6
|
+
export { COMPLETENESS_CONFIG, checkField, fieldExists } from './config/completeness';
|
|
6
7
|
export type * from './types';
|
|
8
|
+
export type { CompletenessField, CompletenessConfig } from './config/completeness';
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEpF,mBAAmB,SAAS,CAAA;AAC5B,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,236 +1,299 @@
|
|
|
1
|
-
import { L as
|
|
2
|
-
import { z as
|
|
3
|
-
import { cG as
|
|
4
|
-
import { i as
|
|
5
|
-
const
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[Hi.id]: Hi,
|
|
19
|
-
[Yi.id]: Yi,
|
|
20
|
-
[Wi.id]: Wi,
|
|
21
|
-
[Vi.id]: Vi,
|
|
22
|
-
[Pi.id]: Pi,
|
|
23
|
-
[Ki.id]: Ki,
|
|
24
|
-
[Gi.id]: Gi,
|
|
25
|
-
[Fi.id]: Fi,
|
|
26
|
-
[Di.id]: Di,
|
|
27
|
-
[Bi.id]: Bi,
|
|
28
|
-
[Oi.id]: Oi,
|
|
29
|
-
[Ni.id]: Ni,
|
|
30
|
-
[Li.id]: Li,
|
|
31
|
-
[Ci.id]: Ci,
|
|
32
|
-
[Ii.id]: Ii,
|
|
33
|
-
[Ai.id]: Ai,
|
|
34
|
-
[Si.id]: Si,
|
|
35
|
-
[Ti.id]: Ti,
|
|
36
|
-
[Ri.id]: Ri,
|
|
37
|
-
[Mi.id]: Mi,
|
|
38
|
-
[Ei.id]: Ei,
|
|
39
|
-
[qi.id]: qi,
|
|
40
|
-
[zi.id]: zi,
|
|
41
|
-
[xi.id]: xi,
|
|
42
|
-
[vi.id]: vi,
|
|
43
|
-
[wi.id]: wi,
|
|
44
|
-
[ji.id]: ji,
|
|
45
|
-
[fi.id]: fi,
|
|
46
|
-
[hi.id]: hi,
|
|
47
|
-
[ki.id]: ki,
|
|
48
|
-
[yi.id]: yi,
|
|
49
|
-
[gi.id]: gi,
|
|
50
|
-
[ui.id]: ui,
|
|
51
|
-
[mi.id]: mi,
|
|
52
|
-
[_i.id]: _i,
|
|
53
|
-
[pi.id]: pi,
|
|
54
|
-
[li.id]: li,
|
|
55
|
-
[ni.id]: ni,
|
|
56
|
-
[ri.id]: ri,
|
|
57
|
-
[oi.id]: oi,
|
|
58
|
-
[bi.id]: bi,
|
|
59
|
-
[ti.id]: ti,
|
|
60
|
-
[ci.id]: ci,
|
|
61
|
-
[ei.id]: ei,
|
|
62
|
-
[di.id]: di,
|
|
63
|
-
[ii.id]: ii,
|
|
64
|
-
[si.id]: si,
|
|
65
|
-
[ai.id]: ai,
|
|
1
|
+
import { L as Le } from "./index-DX_tPBsM.js";
|
|
2
|
+
import { z as n, a as l, b as o, y as c, w as r, c as b, d as g, e as p, f as _, g as u, h as f, i as m, j as y, v as h, k as w, l as k, m as E, n as T, o as N, t as S, p as j, q as I, r as A, s as v, u as G, x as D, A as x, B as L, C as B, D as O, E as z, F as U, G as W, H as q, I as H, J as R, K as M, L as C, M as F, N as K, O as P, P as Y, Q as V, R as J, S as Q, T as X, U as Z, V as $, W as aa, X as ia, Y as sa, Z as ea, _ as da, $ as ta, a0 as na, a1 as la, a2 as oa, a3 as ca, a4 as ra, a5 as ba, a6 as ga, a7 as pa, a8 as _a, a9 as ua, aa as fa, ab as ma, ac as ya, ad as ha, ae as wa, af as ka, ag as Ea, ah as Ta, ai as Na, aj as Sa, ak as ja, al as Ia, am as Aa, an as va, ao as Ga, ap as Da, aq as xa, ar as La, as as Ba, at as Oa, au as za, av as Ua, aw as Wa, ax as qa, ay as Ha, az as Ra, aA as Ma, aB as Ca, aC as Fa, aD as Ka, aE as Pa, aF as Ya, aG as Va, aH as Ja, aI as Qa, aJ as Xa, aK as Za, aL as $a, aM as ai, aN as ii, aO as si, aP as ei, aQ as di, aR as ti, aS as ni, aT as li, aU as oi, aV as ci, aW as ri, aX as bi, aY as gi, aZ as pi, a_ as _i, a$ as ui, b0 as fi, b1 as mi, b2 as yi, b3 as hi, b4 as wi, b5 as ki, b6 as Ei, b7 as Ti, b8 as Ni, b9 as Si, ba as ji, bb as Ii, bc as Ai, bd as vi, be as Gi, bf as Di, bg as xi, bh as Li, bi as Bi, bj as Oi, bk as zi, bl as Ui, bm as Wi, bn as qi, bo as Hi, bp as Ri, bq as Mi, br as Ci, bs as Fi, bt as Ki, bu as Pi, bv as Yi, bw as Vi, bx as Ji, by as Qi, bz as Xi, bA as Zi, bB as $i, bC as as, bD as is, bE as ss, bF as es, bG as ds, bH as ts, bI as ns, bJ as ls, bK as os, bL as cs, bM as rs, bN as bs, bO as gs, bP as ps, bQ as _s, bR as us, bS as fs, bT as ms, bU as ys, bV as hs, bW as ws, bX as ks, bY as Es, bZ as Ts, b_ as Ns, b$ as Ss, c0 as js, c1 as Is, c2 as As, c3 as vs, c4 as Gs, c5 as Ds, c6 as xs, c7 as Ls, c8 as Bs, c9 as Os, ca as zs, cb as Us, cc as Ws, cd as qs, ce as Hs, cf as Rs, cg as Ms, ch as Cs, ci as Fs, cj as Ks, ck as Ps, cl as Ys, cm as Vs, cn as Js, co as Qs, cp as Xs, cq as Zs, cr as $s, cs as ae, ct as ie, cu as se, cv as ee, cw as de, cx as te, cy as ne, cz as le, cA as oe, cB as ce, cC as re, cD as be } from "./terms-entry-B5h5Sf6S.js";
|
|
3
|
+
import { cG as Oe, cE as ze, cF as Ue } from "./terms-entry-B5h5Sf6S.js";
|
|
4
|
+
import { i as he, M as we } from "./helpers-CkAAMBq6.js";
|
|
5
|
+
const ke = {
|
|
6
|
+
[be.id]: be,
|
|
7
|
+
[re.id]: re,
|
|
8
|
+
[ce.id]: ce,
|
|
9
|
+
[oe.id]: oe,
|
|
10
|
+
[le.id]: le,
|
|
11
|
+
[ne.id]: ne,
|
|
12
|
+
[te.id]: te,
|
|
13
|
+
[de.id]: de,
|
|
14
|
+
[ee.id]: ee,
|
|
15
|
+
[se.id]: se,
|
|
16
|
+
[ie.id]: ie,
|
|
17
|
+
[ae.id]: ae,
|
|
66
18
|
[$s.id]: $s,
|
|
67
19
|
[Zs.id]: Zs,
|
|
68
20
|
[Xs.id]: Xs,
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|
|
101
50
|
[ks.id]: ks,
|
|
51
|
+
[ws.id]: ws,
|
|
52
|
+
[hs.id]: hs,
|
|
102
53
|
[ys.id]: ys,
|
|
103
|
-
[gs.id]: gs,
|
|
104
|
-
[us.id]: us,
|
|
105
54
|
[ms.id]: ms,
|
|
55
|
+
[fs.id]: fs,
|
|
56
|
+
[us.id]: us,
|
|
106
57
|
[_s.id]: _s,
|
|
107
58
|
[ps.id]: ps,
|
|
108
|
-
[
|
|
109
|
-
[
|
|
59
|
+
[gs.id]: gs,
|
|
60
|
+
[bs.id]: bs,
|
|
110
61
|
[rs.id]: rs,
|
|
62
|
+
[cs.id]: cs,
|
|
111
63
|
[os.id]: os,
|
|
112
|
-
[
|
|
64
|
+
[ls.id]: ls,
|
|
65
|
+
[ns.id]: ns,
|
|
113
66
|
[ts.id]: ts,
|
|
114
|
-
[cs.id]: cs,
|
|
115
|
-
[es.id]: es,
|
|
116
67
|
[ds.id]: ds,
|
|
117
|
-
[
|
|
68
|
+
[es.id]: es,
|
|
118
69
|
[ss.id]: ss,
|
|
70
|
+
[is.id]: is,
|
|
119
71
|
[as.id]: as,
|
|
72
|
+
[$i.id]: $i,
|
|
73
|
+
[Zi.id]: Zi,
|
|
74
|
+
[Xi.id]: Xi,
|
|
75
|
+
[Qi.id]: Qi,
|
|
76
|
+
[Ji.id]: Ji,
|
|
77
|
+
[Vi.id]: Vi,
|
|
78
|
+
[Yi.id]: Yi,
|
|
79
|
+
[Pi.id]: Pi,
|
|
80
|
+
[Ki.id]: Ki,
|
|
81
|
+
[Fi.id]: Fi,
|
|
82
|
+
[Ci.id]: Ci,
|
|
83
|
+
[Mi.id]: Mi,
|
|
84
|
+
[Ri.id]: Ri,
|
|
85
|
+
[Hi.id]: Hi,
|
|
86
|
+
[qi.id]: qi,
|
|
87
|
+
[Wi.id]: Wi,
|
|
88
|
+
[Ui.id]: Ui,
|
|
89
|
+
[zi.id]: zi,
|
|
90
|
+
[Oi.id]: Oi,
|
|
91
|
+
[Bi.id]: Bi,
|
|
92
|
+
[Li.id]: Li,
|
|
93
|
+
[xi.id]: xi,
|
|
94
|
+
[Di.id]: Di,
|
|
95
|
+
[Gi.id]: Gi,
|
|
96
|
+
[vi.id]: vi,
|
|
97
|
+
[Ai.id]: Ai,
|
|
98
|
+
[Ii.id]: Ii,
|
|
99
|
+
[ji.id]: ji,
|
|
100
|
+
[Si.id]: Si,
|
|
101
|
+
[Ni.id]: Ni,
|
|
102
|
+
[Ti.id]: Ti,
|
|
103
|
+
[Ei.id]: Ei,
|
|
104
|
+
[ki.id]: ki,
|
|
105
|
+
[wi.id]: wi,
|
|
106
|
+
[hi.id]: hi,
|
|
107
|
+
[yi.id]: yi,
|
|
108
|
+
[mi.id]: mi,
|
|
109
|
+
[fi.id]: fi,
|
|
110
|
+
[ui.id]: ui,
|
|
111
|
+
[_i.id]: _i,
|
|
112
|
+
[pi.id]: pi,
|
|
113
|
+
[gi.id]: gi,
|
|
114
|
+
[bi.id]: bi,
|
|
115
|
+
[ri.id]: ri,
|
|
116
|
+
[ci.id]: ci,
|
|
117
|
+
[oi.id]: oi,
|
|
118
|
+
[li.id]: li,
|
|
119
|
+
[ni.id]: ni,
|
|
120
|
+
[ti.id]: ti,
|
|
121
|
+
[di.id]: di,
|
|
122
|
+
[ei.id]: ei,
|
|
123
|
+
[si.id]: si,
|
|
124
|
+
[ii.id]: ii,
|
|
125
|
+
[ai.id]: ai,
|
|
120
126
|
[$a.id]: $a,
|
|
121
127
|
[Za.id]: Za,
|
|
122
128
|
[Xa.id]: Xa,
|
|
123
|
-
[Ua.id]: Ua,
|
|
124
129
|
[Qa.id]: Qa,
|
|
125
130
|
[Ja.id]: Ja,
|
|
126
|
-
[Ha.id]: Ha,
|
|
127
|
-
[Ya.id]: Ya,
|
|
128
|
-
[Wa.id]: Wa,
|
|
129
131
|
[Va.id]: Va,
|
|
132
|
+
[Ya.id]: Ya,
|
|
130
133
|
[Pa.id]: Pa,
|
|
131
134
|
[Ka.id]: Ka,
|
|
132
|
-
[Ga.id]: Ga,
|
|
133
135
|
[Fa.id]: Fa,
|
|
134
|
-
[Da.id]: Da,
|
|
135
|
-
[Ba.id]: Ba,
|
|
136
|
-
[Oa.id]: Oa,
|
|
137
|
-
[Na.id]: Na,
|
|
138
|
-
[La.id]: La,
|
|
139
136
|
[Ca.id]: Ca,
|
|
140
|
-
[Ia.id]: Ia,
|
|
141
|
-
[Aa.id]: Aa,
|
|
142
|
-
[Sa.id]: Sa,
|
|
143
|
-
[Ta.id]: Ta,
|
|
144
|
-
[Ra.id]: Ra,
|
|
145
137
|
[Ma.id]: Ma,
|
|
146
|
-
[
|
|
138
|
+
[Ra.id]: Ra,
|
|
139
|
+
[Ha.id]: Ha,
|
|
147
140
|
[qa.id]: qa,
|
|
141
|
+
[Wa.id]: Wa,
|
|
142
|
+
[Ua.id]: Ua,
|
|
148
143
|
[za.id]: za,
|
|
144
|
+
[Oa.id]: Oa,
|
|
145
|
+
[Ba.id]: Ba,
|
|
146
|
+
[La.id]: La,
|
|
149
147
|
[xa.id]: xa,
|
|
148
|
+
[Da.id]: Da,
|
|
149
|
+
[Ga.id]: Ga,
|
|
150
150
|
[va.id]: va,
|
|
151
|
-
[
|
|
151
|
+
[Aa.id]: Aa,
|
|
152
|
+
[Ia.id]: Ia,
|
|
152
153
|
[ja.id]: ja,
|
|
153
|
-
[
|
|
154
|
-
[
|
|
154
|
+
[Sa.id]: Sa,
|
|
155
|
+
[Na.id]: Na,
|
|
156
|
+
[Ta.id]: Ta,
|
|
157
|
+
[Ea.id]: Ea,
|
|
155
158
|
[ka.id]: ka,
|
|
159
|
+
[wa.id]: wa,
|
|
160
|
+
[ha.id]: ha,
|
|
156
161
|
[ya.id]: ya,
|
|
157
|
-
[ga.id]: ga,
|
|
158
|
-
[ua.id]: ua,
|
|
159
162
|
[ma.id]: ma,
|
|
163
|
+
[fa.id]: fa,
|
|
164
|
+
[ua.id]: ua,
|
|
160
165
|
[_a.id]: _a,
|
|
161
166
|
[pa.id]: pa,
|
|
162
|
-
[
|
|
163
|
-
[
|
|
167
|
+
[ga.id]: ga,
|
|
168
|
+
[ba.id]: ba,
|
|
164
169
|
[ra.id]: ra,
|
|
170
|
+
[ca.id]: ca,
|
|
165
171
|
[oa.id]: oa,
|
|
166
|
-
[
|
|
172
|
+
[la.id]: la,
|
|
173
|
+
[na.id]: na,
|
|
167
174
|
[ta.id]: ta,
|
|
168
|
-
[ca.id]: ca,
|
|
169
|
-
[ea.id]: ea,
|
|
170
175
|
[da.id]: da,
|
|
171
|
-
[
|
|
176
|
+
[ea.id]: ea,
|
|
172
177
|
[sa.id]: sa,
|
|
178
|
+
[ia.id]: ia,
|
|
173
179
|
[aa.id]: aa,
|
|
174
180
|
[$.id]: $,
|
|
175
181
|
[Z.id]: Z,
|
|
176
182
|
[X.id]: X,
|
|
177
|
-
[U.id]: U,
|
|
178
183
|
[Q.id]: Q,
|
|
179
184
|
[J.id]: J,
|
|
180
|
-
[H.id]: H,
|
|
181
|
-
[Y.id]: Y,
|
|
182
|
-
[W.id]: W,
|
|
183
185
|
[V.id]: V,
|
|
186
|
+
[Y.id]: Y,
|
|
184
187
|
[P.id]: P,
|
|
185
188
|
[K.id]: K,
|
|
186
|
-
[G.id]: G,
|
|
187
189
|
[F.id]: F,
|
|
188
|
-
[D.id]: D,
|
|
189
|
-
[B.id]: B,
|
|
190
|
-
[O.id]: O,
|
|
191
|
-
[N.id]: N,
|
|
192
|
-
[L.id]: L,
|
|
193
190
|
[C.id]: C,
|
|
194
|
-
[I.id]: I,
|
|
195
|
-
[A.id]: A,
|
|
196
|
-
[S.id]: S,
|
|
197
|
-
[T.id]: T,
|
|
198
|
-
[R.id]: R,
|
|
199
191
|
[M.id]: M,
|
|
200
|
-
[
|
|
192
|
+
[R.id]: R,
|
|
193
|
+
[H.id]: H,
|
|
201
194
|
[q.id]: q,
|
|
195
|
+
[W.id]: W,
|
|
196
|
+
[U.id]: U,
|
|
202
197
|
[z.id]: z,
|
|
198
|
+
[O.id]: O,
|
|
199
|
+
[B.id]: B,
|
|
200
|
+
[L.id]: L,
|
|
203
201
|
[x.id]: x,
|
|
202
|
+
[D.id]: D,
|
|
203
|
+
[G.id]: G,
|
|
204
204
|
[v.id]: v,
|
|
205
|
-
[
|
|
205
|
+
[A.id]: A,
|
|
206
|
+
[I.id]: I,
|
|
206
207
|
[j.id]: j,
|
|
207
|
-
[
|
|
208
|
-
[
|
|
208
|
+
[S.id]: S,
|
|
209
|
+
[N.id]: N,
|
|
210
|
+
[T.id]: T,
|
|
211
|
+
[E.id]: E,
|
|
209
212
|
[k.id]: k,
|
|
213
|
+
[w.id]: w,
|
|
214
|
+
[h.id]: h,
|
|
210
215
|
[y.id]: y,
|
|
211
|
-
[g.id]: g,
|
|
212
|
-
[u.id]: u,
|
|
213
216
|
[m.id]: m,
|
|
217
|
+
[f.id]: f,
|
|
218
|
+
[u.id]: u,
|
|
214
219
|
[_.id]: _,
|
|
215
220
|
[p.id]: p,
|
|
216
|
-
[
|
|
217
|
-
[n.id]: n,
|
|
218
|
-
[r.id]: r,
|
|
219
|
-
[o.id]: o,
|
|
221
|
+
[g.id]: g,
|
|
220
222
|
[b.id]: b,
|
|
221
|
-
[
|
|
223
|
+
[r.id]: r,
|
|
222
224
|
[c.id]: c,
|
|
223
|
-
[
|
|
224
|
-
[
|
|
225
|
-
[
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
225
|
+
[o.id]: o,
|
|
226
|
+
[l.id]: l,
|
|
227
|
+
[n.id]: n
|
|
228
|
+
}, Ie = he({ obj: ke, keys: we.TERM_INTERPOLATION_KEYS, populateEmpty: !1 }), fe = 7, me = 10, ye = 20, Ee = 10, Te = 10, Ne = 2, t = 2, ge = fe / t, pe = me / t, _e = ye / t, ue = 1, Ae = {
|
|
229
|
+
baseline: [
|
|
230
|
+
{ field: "name.en-US", label: "Name (en-US)", weight: fe, category: "content" },
|
|
231
|
+
{ field: "altName.en-US", label: "Alternative Name (en-US)", weight: 0, category: "content", conditional: !0 },
|
|
232
|
+
{ field: "label.en-US", label: "Label (en-US)", weight: me, category: "content" },
|
|
233
|
+
{ field: "definition.en-US", label: "Definition (en-US)", weight: ye, category: "content" },
|
|
234
|
+
{ field: "type", label: "Type", weight: Ee, category: "metadata" },
|
|
235
|
+
{ field: "tags", label: "Tags", weight: Te, category: "metadata" },
|
|
236
|
+
{
|
|
237
|
+
field: "links",
|
|
238
|
+
label: "At least one link (website/github/npm/wikipedia)",
|
|
239
|
+
weight: Ne,
|
|
240
|
+
category: "metadata"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
additional: [
|
|
244
|
+
{
|
|
245
|
+
field: "sources.label",
|
|
246
|
+
label: "Label Sources",
|
|
247
|
+
weight: ue,
|
|
248
|
+
category: "metadata",
|
|
249
|
+
conditional: !1
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
field: "sources.definition",
|
|
253
|
+
label: "Definition Sources",
|
|
254
|
+
weight: ue,
|
|
255
|
+
category: "metadata",
|
|
256
|
+
conditional: !1
|
|
257
|
+
},
|
|
258
|
+
{ field: "name.en-GB", label: "Name", weight: ge, category: "en-GB" },
|
|
259
|
+
{ field: "altName.en-GB", label: "Alternative Name", weight: 0, category: "en-GB", conditional: !0 },
|
|
260
|
+
{ field: "label.en-GB", label: "Label", weight: pe, category: "en-GB" },
|
|
261
|
+
{ field: "definition.en-GB", label: "Definition", weight: _e, category: "en-GB" },
|
|
262
|
+
{ field: "name.de-DE", label: "Name", weight: ge, category: "de-DE" },
|
|
263
|
+
{ field: "altName.de-DE", label: "Alternative Name", weight: 0, category: "de-DE", conditional: !0 },
|
|
264
|
+
{ field: "label.de-DE", label: "Label", weight: pe, category: "de-DE" },
|
|
265
|
+
{ field: "definition.de-DE", label: "Definition", weight: _e, category: "de-DE" }
|
|
266
|
+
]
|
|
267
|
+
};
|
|
268
|
+
function ve(s, e) {
|
|
269
|
+
const d = e.split(".");
|
|
270
|
+
let a = s;
|
|
271
|
+
for (const i of d) {
|
|
272
|
+
if (a == null) return !1;
|
|
273
|
+
a = a[i];
|
|
274
|
+
}
|
|
275
|
+
return a != null;
|
|
276
|
+
}
|
|
277
|
+
function Ge(s, e) {
|
|
278
|
+
if (e === "links") {
|
|
279
|
+
if (!s.links) return !1;
|
|
280
|
+
const { links: i } = s;
|
|
281
|
+
return !!(i.website || i.github || i.npm || i.wikipedia);
|
|
282
|
+
}
|
|
283
|
+
const d = e.split(".");
|
|
284
|
+
let a = s;
|
|
285
|
+
for (const i of d)
|
|
286
|
+
if (a = a?.[i], a == null) return !1;
|
|
287
|
+
return typeof a == "string" ? a === "en-US" || a === "en-GB" || a === "de-DE" ? !1 : a.trim() !== "" : Array.isArray(a) ? a.length > 0 : typeof a == "object" ? Object.keys(a).length > 0 && Object.values(a).some((i) => typeof i == "string" ? i === "en-US" || i === "en-GB" || i === "de-DE" ? !1 : i.trim() !== "" : i != null) : !0;
|
|
288
|
+
}
|
|
229
289
|
export {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
290
|
+
Ae as COMPLETENESS_CONFIG,
|
|
291
|
+
Ge as checkField,
|
|
292
|
+
ve as fieldExists,
|
|
293
|
+
Le as locales,
|
|
294
|
+
Oe as sources,
|
|
295
|
+
ze as tags,
|
|
296
|
+
Ie as terms,
|
|
297
|
+
Ue as types
|
|
235
298
|
};
|
|
236
299
|
//# sourceMappingURL=index.js.map
|