@citestyle/styles 0.0.2 → 0.1.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/ama.js +1139 -0
- package/apa.js +3707 -0
- package/build.js +97 -0
- package/chicago-author-date.js +6125 -0
- package/harvard.js +1235 -0
- package/ieee.js +1316 -0
- package/mla.js +2349 -0
- package/nature.js +1035 -0
- package/package.json +3 -4
- package/science.js +1070 -0
- package/vancouver.js +993 -0
package/nature.js
ADDED
|
@@ -0,0 +1,1035 @@
|
|
|
1
|
+
// Generated by @citestyle/compiler — do not edit
|
|
2
|
+
// Source: Nature
|
|
3
|
+
import { formatNames, formatDate, escapeHtml, stripFormatting, toHtml, titleCase, sentenceCase, capitalize, applyTextCase, stripNocaseSpans, ordinal, roman, pageRange } from '@citestyle/core'
|
|
4
|
+
|
|
5
|
+
export const meta = {
|
|
6
|
+
"id": "nature",
|
|
7
|
+
"title": "Nature",
|
|
8
|
+
"class": "in-text",
|
|
9
|
+
"version": "1.0",
|
|
10
|
+
"compiledWith": "@citestyle/compiler@0.1.0",
|
|
11
|
+
"collapse": "citation-number",
|
|
12
|
+
"citationLayoutDelimiter": ","
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const T = {
|
|
16
|
+
"accessed": "accessed",
|
|
17
|
+
"advance-online-publication": "advance online publication",
|
|
18
|
+
"album": "album",
|
|
19
|
+
"and": "and",
|
|
20
|
+
"and others": "and others",
|
|
21
|
+
"anonymous": "anonymous",
|
|
22
|
+
"at": "at",
|
|
23
|
+
"audio-recording": "audio recording",
|
|
24
|
+
"available at": "available at",
|
|
25
|
+
"by": "by",
|
|
26
|
+
"circa": "circa",
|
|
27
|
+
"cited": "cited",
|
|
28
|
+
"et-al": "et al.",
|
|
29
|
+
"film": "film",
|
|
30
|
+
"forthcoming": "forthcoming",
|
|
31
|
+
"from": "from",
|
|
32
|
+
"henceforth": "henceforth",
|
|
33
|
+
"ibid": "ibid.",
|
|
34
|
+
"in": "in",
|
|
35
|
+
"in press": "in press",
|
|
36
|
+
"internet": "internet",
|
|
37
|
+
"letter": "letter",
|
|
38
|
+
"loc-cit": "loc. cit.",
|
|
39
|
+
"no date": "no date",
|
|
40
|
+
"no-place": "no place",
|
|
41
|
+
"no-publisher": "no publisher",
|
|
42
|
+
"on": "on",
|
|
43
|
+
"online": "online",
|
|
44
|
+
"op-cit": "op. cit.",
|
|
45
|
+
"original-work-published": "original work published",
|
|
46
|
+
"personal-communication": "personal communication",
|
|
47
|
+
"podcast": "podcast",
|
|
48
|
+
"podcast-episode": "podcast episode",
|
|
49
|
+
"preprint": "preprint",
|
|
50
|
+
"presented at": "presented at the",
|
|
51
|
+
"radio-broadcast": "radio broadcast",
|
|
52
|
+
"radio-series": "radio series",
|
|
53
|
+
"radio-series-episode": "radio series episode",
|
|
54
|
+
"reference": {
|
|
55
|
+
"single": "reference",
|
|
56
|
+
"multiple": "references"
|
|
57
|
+
},
|
|
58
|
+
"retrieved": "retrieved",
|
|
59
|
+
"review-of": "review of",
|
|
60
|
+
"scale": "scale",
|
|
61
|
+
"special-issue": "special issue",
|
|
62
|
+
"special-section": "special section",
|
|
63
|
+
"television-broadcast": "television broadcast",
|
|
64
|
+
"television-series": "television series",
|
|
65
|
+
"television-series-episode": "television series episode",
|
|
66
|
+
"video": "video",
|
|
67
|
+
"working-paper": "working paper",
|
|
68
|
+
"advance-online-publication:short": "adv. online pub.",
|
|
69
|
+
"anonymous:short": "anon.",
|
|
70
|
+
"audio-recording:short": "au. rec.",
|
|
71
|
+
"available at:short": "avail. at",
|
|
72
|
+
"circa:short": "c.",
|
|
73
|
+
"cited:short": "cit.",
|
|
74
|
+
"film:short": "flm.",
|
|
75
|
+
"from:short": "fr.",
|
|
76
|
+
"letter:short": "let.",
|
|
77
|
+
"no date:short": "n.d.",
|
|
78
|
+
"no-place:short": "n.p.",
|
|
79
|
+
"no-publisher:short": "n.p.",
|
|
80
|
+
"original-work-published:short": "orig. pub.",
|
|
81
|
+
"personal-communication:short": "pers. comm.",
|
|
82
|
+
"podcast-episode:short": "podcast ep.",
|
|
83
|
+
"radio-broadcast:short": "radio bdcst.",
|
|
84
|
+
"radio-series:short": "radio ser.",
|
|
85
|
+
"radio-series-episode:short": "radio ser. ep.",
|
|
86
|
+
"reference:short": {
|
|
87
|
+
"single": "ref.",
|
|
88
|
+
"multiple": "refs."
|
|
89
|
+
},
|
|
90
|
+
"retrieved:short": "rtvd.",
|
|
91
|
+
"review-of:short": "rev. of",
|
|
92
|
+
"scale:short": "sc.",
|
|
93
|
+
"special-issue:short": "spec. iss.",
|
|
94
|
+
"special-section:short": "spec. sec.",
|
|
95
|
+
"television-broadcast:short": "TV bdcst.",
|
|
96
|
+
"television-series:short": "TV ser.",
|
|
97
|
+
"television-series-episode:short": "TV ser. ep.",
|
|
98
|
+
"video:short": "vid.",
|
|
99
|
+
"working-paper:short": "wkg. paper",
|
|
100
|
+
"and:symbol": "&",
|
|
101
|
+
"at:symbol": "@",
|
|
102
|
+
"article": "preprint",
|
|
103
|
+
"article-journal": "journal article",
|
|
104
|
+
"article-magazine": "magazine article",
|
|
105
|
+
"article-newspaper": "newspaper article",
|
|
106
|
+
"bill": "bill",
|
|
107
|
+
"broadcast": "broadcast",
|
|
108
|
+
"classic": "classical work",
|
|
109
|
+
"collection": "archival collection",
|
|
110
|
+
"dataset": "dataset",
|
|
111
|
+
"document": "document",
|
|
112
|
+
"entry": "entry",
|
|
113
|
+
"entry-dictionary": "dictionary entry",
|
|
114
|
+
"entry-encyclopedia": "encyclopedia entry",
|
|
115
|
+
"event": "event",
|
|
116
|
+
"graphic": "graphic",
|
|
117
|
+
"hearing": "hearing",
|
|
118
|
+
"interview": "interview",
|
|
119
|
+
"legal_case": "legal case",
|
|
120
|
+
"legislation": "legislation",
|
|
121
|
+
"manuscript": "manuscript",
|
|
122
|
+
"map": "map",
|
|
123
|
+
"motion_picture": "video recording",
|
|
124
|
+
"musical_score": "musical score",
|
|
125
|
+
"pamphlet": "pamphlet",
|
|
126
|
+
"paper-conference": "conference paper",
|
|
127
|
+
"patent": "patent",
|
|
128
|
+
"performance": "performance",
|
|
129
|
+
"periodical": "periodical",
|
|
130
|
+
"personal_communication": "personal communication",
|
|
131
|
+
"post": "post",
|
|
132
|
+
"post-weblog": "blog post",
|
|
133
|
+
"regulation": "regulation",
|
|
134
|
+
"report": "report",
|
|
135
|
+
"review": "review",
|
|
136
|
+
"review-book": "book review",
|
|
137
|
+
"software": "software",
|
|
138
|
+
"song": "audio recording",
|
|
139
|
+
"speech": "presentation",
|
|
140
|
+
"standard": "standard",
|
|
141
|
+
"thesis": "thesis",
|
|
142
|
+
"treaty": "treaty",
|
|
143
|
+
"webpage": "webpage",
|
|
144
|
+
"article-journal:short": "jour. art.",
|
|
145
|
+
"article-magazine:short": "mag. art.",
|
|
146
|
+
"article-newspaper:short": "newspaper art.",
|
|
147
|
+
"broadcast:short": "bdcst.",
|
|
148
|
+
"classic:short": "class. wk.",
|
|
149
|
+
"collection:short": "arch. coll.",
|
|
150
|
+
"document:short": "doc.",
|
|
151
|
+
"entry-dictionary:short": "dict. entry",
|
|
152
|
+
"entry-encyclopedia:short": "ency. entry",
|
|
153
|
+
"graphic:short": "gr.",
|
|
154
|
+
"interview:short": "int.",
|
|
155
|
+
"legal_case:short": "leg. case",
|
|
156
|
+
"legislation:short": "legis.",
|
|
157
|
+
"manuscript:short": {
|
|
158
|
+
"single": "MS",
|
|
159
|
+
"multiple": "MSS"
|
|
160
|
+
},
|
|
161
|
+
"motion_picture:short": "vid. rec.",
|
|
162
|
+
"musical_score:short": "mus. score",
|
|
163
|
+
"pamphlet:short": "pam.",
|
|
164
|
+
"paper-conference:short": "conf. paper",
|
|
165
|
+
"patent:short": "pat.",
|
|
166
|
+
"performance:short": "prfm.",
|
|
167
|
+
"personal_communication:short": "pers. comm.",
|
|
168
|
+
"regulation:short": "reg.",
|
|
169
|
+
"report:short": "rep.",
|
|
170
|
+
"review:short": "rev.",
|
|
171
|
+
"review-book:short": "bk. rev.",
|
|
172
|
+
"software:short": "sftw.",
|
|
173
|
+
"song:short": "au. rec.",
|
|
174
|
+
"standard:short": "std.",
|
|
175
|
+
"thesis:short": "thes.",
|
|
176
|
+
"webpage:short": "webpg.",
|
|
177
|
+
"hearing:verb": "testimony of",
|
|
178
|
+
"review:verb": "review of",
|
|
179
|
+
"review-book:verb": "review of the book",
|
|
180
|
+
"hearing:verb-short": "test. of",
|
|
181
|
+
"review:verb-short": "rev. of",
|
|
182
|
+
"review-book:verb-short": "rev. of the bk.",
|
|
183
|
+
"ad": "AD",
|
|
184
|
+
"bc": "BC",
|
|
185
|
+
"bce": "BCE",
|
|
186
|
+
"ce": "CE",
|
|
187
|
+
"open-quote": "“",
|
|
188
|
+
"close-quote": "”",
|
|
189
|
+
"open-inner-quote": "‘",
|
|
190
|
+
"close-inner-quote": "’",
|
|
191
|
+
"page-range-delimiter": "–",
|
|
192
|
+
"colon": ":",
|
|
193
|
+
"comma": ",",
|
|
194
|
+
"semicolon": ";",
|
|
195
|
+
"ordinal": "th",
|
|
196
|
+
"ordinal-01": "st",
|
|
197
|
+
"ordinal-02": "nd",
|
|
198
|
+
"ordinal-03": "rd",
|
|
199
|
+
"ordinal-11": "th",
|
|
200
|
+
"ordinal-12": "th",
|
|
201
|
+
"ordinal-13": "th",
|
|
202
|
+
"long-ordinal-01": "first",
|
|
203
|
+
"long-ordinal-02": "second",
|
|
204
|
+
"long-ordinal-03": "third",
|
|
205
|
+
"long-ordinal-04": "fourth",
|
|
206
|
+
"long-ordinal-05": "fifth",
|
|
207
|
+
"long-ordinal-06": "sixth",
|
|
208
|
+
"long-ordinal-07": "seventh",
|
|
209
|
+
"long-ordinal-08": "eighth",
|
|
210
|
+
"long-ordinal-09": "ninth",
|
|
211
|
+
"long-ordinal-10": "tenth",
|
|
212
|
+
"act": {
|
|
213
|
+
"single": "act",
|
|
214
|
+
"multiple": "acts"
|
|
215
|
+
},
|
|
216
|
+
"appendix": {
|
|
217
|
+
"single": "appendix",
|
|
218
|
+
"multiple": "appendices"
|
|
219
|
+
},
|
|
220
|
+
"article-locator": {
|
|
221
|
+
"single": "article",
|
|
222
|
+
"multiple": "articles"
|
|
223
|
+
},
|
|
224
|
+
"book": {
|
|
225
|
+
"single": "book",
|
|
226
|
+
"multiple": "books"
|
|
227
|
+
},
|
|
228
|
+
"canon": {
|
|
229
|
+
"single": "canon",
|
|
230
|
+
"multiple": "canons"
|
|
231
|
+
},
|
|
232
|
+
"chapter": {
|
|
233
|
+
"single": "chapter",
|
|
234
|
+
"multiple": "chapters"
|
|
235
|
+
},
|
|
236
|
+
"column": {
|
|
237
|
+
"single": "column",
|
|
238
|
+
"multiple": "columns"
|
|
239
|
+
},
|
|
240
|
+
"elocation": {
|
|
241
|
+
"single": "location",
|
|
242
|
+
"multiple": "locations"
|
|
243
|
+
},
|
|
244
|
+
"equation": {
|
|
245
|
+
"single": "equation",
|
|
246
|
+
"multiple": "equations"
|
|
247
|
+
},
|
|
248
|
+
"figure": {
|
|
249
|
+
"single": "figure",
|
|
250
|
+
"multiple": "figures"
|
|
251
|
+
},
|
|
252
|
+
"folio": {
|
|
253
|
+
"single": "folio",
|
|
254
|
+
"multiple": "folios"
|
|
255
|
+
},
|
|
256
|
+
"issue": {
|
|
257
|
+
"single": "issue",
|
|
258
|
+
"multiple": "issues"
|
|
259
|
+
},
|
|
260
|
+
"line": {
|
|
261
|
+
"single": "line",
|
|
262
|
+
"multiple": "lines"
|
|
263
|
+
},
|
|
264
|
+
"note": {
|
|
265
|
+
"single": "note",
|
|
266
|
+
"multiple": "notes"
|
|
267
|
+
},
|
|
268
|
+
"opus": {
|
|
269
|
+
"single": "opus",
|
|
270
|
+
"multiple": "opera"
|
|
271
|
+
},
|
|
272
|
+
"page": {
|
|
273
|
+
"single": "page",
|
|
274
|
+
"multiple": "pages"
|
|
275
|
+
},
|
|
276
|
+
"paragraph": {
|
|
277
|
+
"single": "paragraph",
|
|
278
|
+
"multiple": "paragraphs"
|
|
279
|
+
},
|
|
280
|
+
"part": {
|
|
281
|
+
"single": "part",
|
|
282
|
+
"multiple": "parts"
|
|
283
|
+
},
|
|
284
|
+
"rule": {
|
|
285
|
+
"single": "rule",
|
|
286
|
+
"multiple": "rules"
|
|
287
|
+
},
|
|
288
|
+
"scene": {
|
|
289
|
+
"single": "scene",
|
|
290
|
+
"multiple": "scenes"
|
|
291
|
+
},
|
|
292
|
+
"section": {
|
|
293
|
+
"single": "section",
|
|
294
|
+
"multiple": "sections"
|
|
295
|
+
},
|
|
296
|
+
"sub-verbo": {
|
|
297
|
+
"single": "sub verbo",
|
|
298
|
+
"multiple": "sub verbis"
|
|
299
|
+
},
|
|
300
|
+
"supplement": {
|
|
301
|
+
"single": "supplement",
|
|
302
|
+
"multiple": "supplements"
|
|
303
|
+
},
|
|
304
|
+
"table": {
|
|
305
|
+
"single": "table",
|
|
306
|
+
"multiple": "tables"
|
|
307
|
+
},
|
|
308
|
+
"timestamp": "",
|
|
309
|
+
"title-locator": {
|
|
310
|
+
"single": "title",
|
|
311
|
+
"multiple": "titles"
|
|
312
|
+
},
|
|
313
|
+
"verse": {
|
|
314
|
+
"single": "verse",
|
|
315
|
+
"multiple": "verses"
|
|
316
|
+
},
|
|
317
|
+
"volume": {
|
|
318
|
+
"single": "volume",
|
|
319
|
+
"multiple": "volumes"
|
|
320
|
+
},
|
|
321
|
+
"appendix:short": {
|
|
322
|
+
"single": "app.",
|
|
323
|
+
"multiple": "apps."
|
|
324
|
+
},
|
|
325
|
+
"article-locator:short": {
|
|
326
|
+
"single": "art.",
|
|
327
|
+
"multiple": "arts."
|
|
328
|
+
},
|
|
329
|
+
"book:short": {
|
|
330
|
+
"single": "bk.",
|
|
331
|
+
"multiple": "bks."
|
|
332
|
+
},
|
|
333
|
+
"canon:short": {
|
|
334
|
+
"single": "can.",
|
|
335
|
+
"multiple": "cann."
|
|
336
|
+
},
|
|
337
|
+
"chapter:short": {
|
|
338
|
+
"single": "chap.",
|
|
339
|
+
"multiple": "chaps."
|
|
340
|
+
},
|
|
341
|
+
"column:short": {
|
|
342
|
+
"single": "col.",
|
|
343
|
+
"multiple": "cols."
|
|
344
|
+
},
|
|
345
|
+
"elocation:short": {
|
|
346
|
+
"single": "loc.",
|
|
347
|
+
"multiple": "locs."
|
|
348
|
+
},
|
|
349
|
+
"equation:short": {
|
|
350
|
+
"single": "eq.",
|
|
351
|
+
"multiple": "eqq."
|
|
352
|
+
},
|
|
353
|
+
"figure:short": {
|
|
354
|
+
"single": "fig.",
|
|
355
|
+
"multiple": "figs."
|
|
356
|
+
},
|
|
357
|
+
"folio:short": {
|
|
358
|
+
"single": "fol.",
|
|
359
|
+
"multiple": "fols."
|
|
360
|
+
},
|
|
361
|
+
"issue:short": {
|
|
362
|
+
"single": "no.",
|
|
363
|
+
"multiple": "nos."
|
|
364
|
+
},
|
|
365
|
+
"line:short": {
|
|
366
|
+
"single": "l.",
|
|
367
|
+
"multiple": "ll."
|
|
368
|
+
},
|
|
369
|
+
"note:short": {
|
|
370
|
+
"single": "n.",
|
|
371
|
+
"multiple": "nn."
|
|
372
|
+
},
|
|
373
|
+
"opus:short": {
|
|
374
|
+
"single": "op.",
|
|
375
|
+
"multiple": "opp."
|
|
376
|
+
},
|
|
377
|
+
"page:short": {
|
|
378
|
+
"single": "p.",
|
|
379
|
+
"multiple": "pp."
|
|
380
|
+
},
|
|
381
|
+
"paragraph:short": {
|
|
382
|
+
"single": "para.",
|
|
383
|
+
"multiple": "paras."
|
|
384
|
+
},
|
|
385
|
+
"part:short": {
|
|
386
|
+
"single": "pt.",
|
|
387
|
+
"multiple": "pts."
|
|
388
|
+
},
|
|
389
|
+
"rule:short": {
|
|
390
|
+
"single": "r.",
|
|
391
|
+
"multiple": "rr."
|
|
392
|
+
},
|
|
393
|
+
"scene:short": {
|
|
394
|
+
"single": "sc.",
|
|
395
|
+
"multiple": "scs."
|
|
396
|
+
},
|
|
397
|
+
"section:short": {
|
|
398
|
+
"single": "sec.",
|
|
399
|
+
"multiple": "secs."
|
|
400
|
+
},
|
|
401
|
+
"sub-verbo:short": {
|
|
402
|
+
"single": "s.v.",
|
|
403
|
+
"multiple": "s.vv."
|
|
404
|
+
},
|
|
405
|
+
"supplement:short": {
|
|
406
|
+
"single": "supp.",
|
|
407
|
+
"multiple": "supps."
|
|
408
|
+
},
|
|
409
|
+
"table:short": {
|
|
410
|
+
"single": "tbl.",
|
|
411
|
+
"multiple": "tbls."
|
|
412
|
+
},
|
|
413
|
+
"title-locator:short": {
|
|
414
|
+
"single": "tit.",
|
|
415
|
+
"multiple": "titt."
|
|
416
|
+
},
|
|
417
|
+
"verse:short": {
|
|
418
|
+
"single": "v.",
|
|
419
|
+
"multiple": "vv."
|
|
420
|
+
},
|
|
421
|
+
"volume:short": {
|
|
422
|
+
"single": "vol.",
|
|
423
|
+
"multiple": "vols."
|
|
424
|
+
},
|
|
425
|
+
"chapter:symbol": {
|
|
426
|
+
"single": "c.",
|
|
427
|
+
"multiple": "cc."
|
|
428
|
+
},
|
|
429
|
+
"paragraph:symbol": {
|
|
430
|
+
"single": "¶",
|
|
431
|
+
"multiple": "¶¶"
|
|
432
|
+
},
|
|
433
|
+
"section:symbol": {
|
|
434
|
+
"single": "§",
|
|
435
|
+
"multiple": "§§"
|
|
436
|
+
},
|
|
437
|
+
"chapter-number": {
|
|
438
|
+
"single": "chapter",
|
|
439
|
+
"multiple": "chapters"
|
|
440
|
+
},
|
|
441
|
+
"citation-number": {
|
|
442
|
+
"single": "citation",
|
|
443
|
+
"multiple": "citations"
|
|
444
|
+
},
|
|
445
|
+
"collection-number": {
|
|
446
|
+
"single": "number",
|
|
447
|
+
"multiple": "numbers"
|
|
448
|
+
},
|
|
449
|
+
"edition": {
|
|
450
|
+
"single": "edition",
|
|
451
|
+
"multiple": "editions"
|
|
452
|
+
},
|
|
453
|
+
"first-reference-note-number": {
|
|
454
|
+
"single": "reference",
|
|
455
|
+
"multiple": "references"
|
|
456
|
+
},
|
|
457
|
+
"number": {
|
|
458
|
+
"single": "number",
|
|
459
|
+
"multiple": "numbers"
|
|
460
|
+
},
|
|
461
|
+
"number-of-pages": {
|
|
462
|
+
"single": "page",
|
|
463
|
+
"multiple": "pages"
|
|
464
|
+
},
|
|
465
|
+
"number-of-volumes": {
|
|
466
|
+
"single": "volume",
|
|
467
|
+
"multiple": "volumes"
|
|
468
|
+
},
|
|
469
|
+
"page-first": {
|
|
470
|
+
"single": "page",
|
|
471
|
+
"multiple": "pages"
|
|
472
|
+
},
|
|
473
|
+
"printing": {
|
|
474
|
+
"single": "printing",
|
|
475
|
+
"multiple": "printings"
|
|
476
|
+
},
|
|
477
|
+
"version": {
|
|
478
|
+
"single": "version",
|
|
479
|
+
"multiple": "versions"
|
|
480
|
+
},
|
|
481
|
+
"chapter-number:short": {
|
|
482
|
+
"single": "chap.",
|
|
483
|
+
"multiple": "chaps."
|
|
484
|
+
},
|
|
485
|
+
"citation-number:short": {
|
|
486
|
+
"single": "cit.",
|
|
487
|
+
"multiple": "cits."
|
|
488
|
+
},
|
|
489
|
+
"collection-number:short": {
|
|
490
|
+
"single": "no.",
|
|
491
|
+
"multiple": "nos."
|
|
492
|
+
},
|
|
493
|
+
"edition:short": {
|
|
494
|
+
"single": "ed.",
|
|
495
|
+
"multiple": "eds."
|
|
496
|
+
},
|
|
497
|
+
"first-reference-note-number:short": {
|
|
498
|
+
"single": "ref.",
|
|
499
|
+
"multiple": "refs."
|
|
500
|
+
},
|
|
501
|
+
"number:short": {
|
|
502
|
+
"single": "no.",
|
|
503
|
+
"multiple": "nos."
|
|
504
|
+
},
|
|
505
|
+
"number-of-pages:short": {
|
|
506
|
+
"single": "p.",
|
|
507
|
+
"multiple": "pp."
|
|
508
|
+
},
|
|
509
|
+
"number-of-volumes:short": {
|
|
510
|
+
"single": "vol.",
|
|
511
|
+
"multiple": "vols."
|
|
512
|
+
},
|
|
513
|
+
"page-first:short": {
|
|
514
|
+
"single": "p.",
|
|
515
|
+
"multiple": "pp."
|
|
516
|
+
},
|
|
517
|
+
"printing:short": {
|
|
518
|
+
"single": "ptg.",
|
|
519
|
+
"multiple": "ptgs."
|
|
520
|
+
},
|
|
521
|
+
"version:short": "v.",
|
|
522
|
+
"author": "",
|
|
523
|
+
"chair": {
|
|
524
|
+
"single": "chair",
|
|
525
|
+
"multiple": "chairs"
|
|
526
|
+
},
|
|
527
|
+
"collection-editor": {
|
|
528
|
+
"single": "editor",
|
|
529
|
+
"multiple": "editors"
|
|
530
|
+
},
|
|
531
|
+
"compiler": {
|
|
532
|
+
"single": "compiler",
|
|
533
|
+
"multiple": "compilers"
|
|
534
|
+
},
|
|
535
|
+
"composer": "",
|
|
536
|
+
"container-author": "",
|
|
537
|
+
"contributor": {
|
|
538
|
+
"single": "contributor",
|
|
539
|
+
"multiple": "contributors"
|
|
540
|
+
},
|
|
541
|
+
"curator": {
|
|
542
|
+
"single": "curator",
|
|
543
|
+
"multiple": "curators"
|
|
544
|
+
},
|
|
545
|
+
"director": {
|
|
546
|
+
"single": "director",
|
|
547
|
+
"multiple": "directors"
|
|
548
|
+
},
|
|
549
|
+
"editor": {
|
|
550
|
+
"single": "editor",
|
|
551
|
+
"multiple": "editors"
|
|
552
|
+
},
|
|
553
|
+
"editor-translator": {
|
|
554
|
+
"single": "editor & translator",
|
|
555
|
+
"multiple": "editors & translators"
|
|
556
|
+
},
|
|
557
|
+
"editortranslator": {
|
|
558
|
+
"single": "editor & translator",
|
|
559
|
+
"multiple": "editors & translators"
|
|
560
|
+
},
|
|
561
|
+
"editorial-director": {
|
|
562
|
+
"single": "editor",
|
|
563
|
+
"multiple": "editors"
|
|
564
|
+
},
|
|
565
|
+
"executive-producer": {
|
|
566
|
+
"single": "executive producer",
|
|
567
|
+
"multiple": "executive producers"
|
|
568
|
+
},
|
|
569
|
+
"guest": {
|
|
570
|
+
"single": "guest",
|
|
571
|
+
"multiple": "guests"
|
|
572
|
+
},
|
|
573
|
+
"host": {
|
|
574
|
+
"single": "host",
|
|
575
|
+
"multiple": "hosts"
|
|
576
|
+
},
|
|
577
|
+
"illustrator": {
|
|
578
|
+
"single": "illustrator",
|
|
579
|
+
"multiple": "illustrators"
|
|
580
|
+
},
|
|
581
|
+
"interviewer": "",
|
|
582
|
+
"narrator": {
|
|
583
|
+
"single": "narrator",
|
|
584
|
+
"multiple": "narrators"
|
|
585
|
+
},
|
|
586
|
+
"organizer": {
|
|
587
|
+
"single": "organizer",
|
|
588
|
+
"multiple": "organizers"
|
|
589
|
+
},
|
|
590
|
+
"original-author": "",
|
|
591
|
+
"performer": {
|
|
592
|
+
"single": "performer",
|
|
593
|
+
"multiple": "performers"
|
|
594
|
+
},
|
|
595
|
+
"producer": {
|
|
596
|
+
"single": "producer",
|
|
597
|
+
"multiple": "producers"
|
|
598
|
+
},
|
|
599
|
+
"recipient": "",
|
|
600
|
+
"reviewed-author": "",
|
|
601
|
+
"script-writer": {
|
|
602
|
+
"single": "writer",
|
|
603
|
+
"multiple": "writers"
|
|
604
|
+
},
|
|
605
|
+
"series-creator": {
|
|
606
|
+
"single": "series creator",
|
|
607
|
+
"multiple": "series creators"
|
|
608
|
+
},
|
|
609
|
+
"translator": {
|
|
610
|
+
"single": "translator",
|
|
611
|
+
"multiple": "translators"
|
|
612
|
+
},
|
|
613
|
+
"collection-editor:short": {
|
|
614
|
+
"single": "ed.",
|
|
615
|
+
"multiple": "eds."
|
|
616
|
+
},
|
|
617
|
+
"compiler:short": {
|
|
618
|
+
"single": "comp.",
|
|
619
|
+
"multiple": "comps."
|
|
620
|
+
},
|
|
621
|
+
"contributor:short": {
|
|
622
|
+
"single": "contrib.",
|
|
623
|
+
"multiple": "contribs."
|
|
624
|
+
},
|
|
625
|
+
"curator:short": {
|
|
626
|
+
"single": "cur.",
|
|
627
|
+
"multiple": "curs."
|
|
628
|
+
},
|
|
629
|
+
"director:short": {
|
|
630
|
+
"single": "dir.",
|
|
631
|
+
"multiple": "dirs."
|
|
632
|
+
},
|
|
633
|
+
"editor:short": {
|
|
634
|
+
"single": "ed.",
|
|
635
|
+
"multiple": "eds."
|
|
636
|
+
},
|
|
637
|
+
"editor-translator:short": {
|
|
638
|
+
"single": "ed. & trans.",
|
|
639
|
+
"multiple": "eds. & trans."
|
|
640
|
+
},
|
|
641
|
+
"editortranslator:short": {
|
|
642
|
+
"single": "ed. & trans.",
|
|
643
|
+
"multiple": "eds. & trans."
|
|
644
|
+
},
|
|
645
|
+
"editorial-director:short": {
|
|
646
|
+
"single": "ed.",
|
|
647
|
+
"multiple": "eds."
|
|
648
|
+
},
|
|
649
|
+
"executive-producer:short": {
|
|
650
|
+
"single": "exec. prod.",
|
|
651
|
+
"multiple": "exec. prods."
|
|
652
|
+
},
|
|
653
|
+
"illustrator:short": {
|
|
654
|
+
"single": "ill.",
|
|
655
|
+
"multiple": "ills."
|
|
656
|
+
},
|
|
657
|
+
"narrator:short": {
|
|
658
|
+
"single": "narr.",
|
|
659
|
+
"multiple": "narrs."
|
|
660
|
+
},
|
|
661
|
+
"organizer:short": {
|
|
662
|
+
"single": "org.",
|
|
663
|
+
"multiple": "orgs."
|
|
664
|
+
},
|
|
665
|
+
"performer:short": {
|
|
666
|
+
"single": "perf.",
|
|
667
|
+
"multiple": "perfs."
|
|
668
|
+
},
|
|
669
|
+
"producer:short": {
|
|
670
|
+
"single": "prod.",
|
|
671
|
+
"multiple": "prods."
|
|
672
|
+
},
|
|
673
|
+
"script-writer:short": {
|
|
674
|
+
"single": "wrtr.",
|
|
675
|
+
"multiple": "wrtrs."
|
|
676
|
+
},
|
|
677
|
+
"series-creator:short": {
|
|
678
|
+
"single": "ser. creator",
|
|
679
|
+
"multiple": "ser. creators"
|
|
680
|
+
},
|
|
681
|
+
"translator:short": "trans.",
|
|
682
|
+
"chair:verb": "chaired by",
|
|
683
|
+
"collection-editor:verb": "edited by",
|
|
684
|
+
"compiler:verb": "compiled by",
|
|
685
|
+
"composer:verb": "composed by",
|
|
686
|
+
"container-author:verb": "by",
|
|
687
|
+
"contributor:verb": "with",
|
|
688
|
+
"curator:verb": "curated by",
|
|
689
|
+
"director:verb": "directed by",
|
|
690
|
+
"editor:verb": "edited by",
|
|
691
|
+
"editor-translator:verb": "edited & translated by",
|
|
692
|
+
"editortranslator:verb": "edited & translated by",
|
|
693
|
+
"editorial-director:verb": "edited by",
|
|
694
|
+
"executive-producer:verb": "executive produced by",
|
|
695
|
+
"guest:verb": {
|
|
696
|
+
"single": "with guest",
|
|
697
|
+
"multiple": "with guests"
|
|
698
|
+
},
|
|
699
|
+
"host:verb": "hosted by",
|
|
700
|
+
"illustrator:verb": "illustrated by",
|
|
701
|
+
"interviewer:verb": "interview by",
|
|
702
|
+
"narrator:verb": "narrated by",
|
|
703
|
+
"organizer:verb": "organized by",
|
|
704
|
+
"original-author:verb": "by",
|
|
705
|
+
"performer:verb": "performed by",
|
|
706
|
+
"producer:verb": "produced by",
|
|
707
|
+
"recipient:verb": "to",
|
|
708
|
+
"reviewed-author:verb": "by",
|
|
709
|
+
"script-writer:verb": "written by",
|
|
710
|
+
"series-creator:verb": "created by",
|
|
711
|
+
"translator:verb": "translated by",
|
|
712
|
+
"collection-editor:verb-short": "ed. by",
|
|
713
|
+
"compiler:verb-short": "comp. by",
|
|
714
|
+
"composer:verb-short": "comp. by",
|
|
715
|
+
"curator:verb-short": "cur. by",
|
|
716
|
+
"director:verb-short": "dir. by",
|
|
717
|
+
"editor:verb-short": "ed. by",
|
|
718
|
+
"editor-translator:verb-short": "ed. & trans. by",
|
|
719
|
+
"editortranslator:verb-short": "ed. & trans. by",
|
|
720
|
+
"editorial-director:verb-short": "ed. by",
|
|
721
|
+
"executive-producer:verb-short": "exec. prod. by",
|
|
722
|
+
"illustrator:verb-short": "ill. by",
|
|
723
|
+
"narrator:verb-short": "narr. by",
|
|
724
|
+
"organizer:verb-short": "org. by",
|
|
725
|
+
"performer:verb-short": "perf. by",
|
|
726
|
+
"producer:verb-short": "prod. by",
|
|
727
|
+
"script-writer:verb-short": "writ. by",
|
|
728
|
+
"translator:verb-short": "trans. by",
|
|
729
|
+
"month-01": "January",
|
|
730
|
+
"month-02": "February",
|
|
731
|
+
"month-03": "March",
|
|
732
|
+
"month-04": "April",
|
|
733
|
+
"month-05": "May",
|
|
734
|
+
"month-06": "June",
|
|
735
|
+
"month-07": "July",
|
|
736
|
+
"month-08": "August",
|
|
737
|
+
"month-09": "September",
|
|
738
|
+
"month-10": "October",
|
|
739
|
+
"month-11": "November",
|
|
740
|
+
"month-12": "December",
|
|
741
|
+
"month-01:short": "Jan.",
|
|
742
|
+
"month-02:short": "Feb.",
|
|
743
|
+
"month-03:short": "Mar.",
|
|
744
|
+
"month-04:short": "Apr.",
|
|
745
|
+
"month-05:short": "May",
|
|
746
|
+
"month-06:short": "June",
|
|
747
|
+
"month-07:short": "July",
|
|
748
|
+
"month-08:short": "Aug.",
|
|
749
|
+
"month-09:short": "Sept.",
|
|
750
|
+
"month-10:short": "Oct.",
|
|
751
|
+
"month-11:short": "Nov.",
|
|
752
|
+
"month-12:short": "Dec.",
|
|
753
|
+
"season-01": "Spring",
|
|
754
|
+
"season-02": "Summer",
|
|
755
|
+
"season-03": "Autumn",
|
|
756
|
+
"season-04": "Winter"
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
const MONTHS = {"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"}
|
|
760
|
+
|
|
761
|
+
const NAME_OPTS = {}
|
|
762
|
+
|
|
763
|
+
function _nameConfig(ctx, el) {
|
|
764
|
+
const c = Object.assign({}, NAME_OPTS, ctx._secOpts || {}, el)
|
|
765
|
+
if (el.initialize === false || (ctx._secOpts || {}).initialize === false || NAME_OPTS.initialize === false) c.initialize = false
|
|
766
|
+
if (c.and === 'text') c.andTerm = T['and'] || 'and'
|
|
767
|
+
else if (c.and === 'symbol') c.andTerm = '&'
|
|
768
|
+
if (!c.etAlTerm) c.etAlTerm = T[el._etAlTerm || 'et-al'] || 'et al.'
|
|
769
|
+
if (ctx._disambig) c._disambig = ctx._disambig
|
|
770
|
+
return c
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
function macro_title(item, ctx) {
|
|
774
|
+
let _ch0 = ''
|
|
775
|
+
if ((item.type === "bill" || item.type === "book" || item.type === "graphic" || item.type === "legal_case" || item.type === "legislation" || item.type === "motion_picture" || item.type === "report" || item.type === "song")) {
|
|
776
|
+
const _v1 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
777
|
+
_ch0 = ((applyTextCase(_v1, "title") ? '\uE000' + applyTextCase(_v1, "title") + '\uE001' : '') ? '\uE020title\uE021' + (applyTextCase(_v1, "title") ? '\uE000' + applyTextCase(_v1, "title") + '\uE001' : '') + '\uE022' : '')
|
|
778
|
+
}
|
|
779
|
+
else {
|
|
780
|
+
const _v2 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
781
|
+
_ch0 = (stripNocaseSpans(_v2) ? '\uE020title\uE021' + stripNocaseSpans(_v2) + '\uE022' : '')
|
|
782
|
+
}
|
|
783
|
+
return _ch0
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
function macro_author(item, ctx) {
|
|
787
|
+
let _n3 = ''
|
|
788
|
+
if (item.author && item.author.length) {
|
|
789
|
+
_n3 = formatNames(item.author, _nameConfig(ctx, {"and":"symbol","delimiter":", ","delimiterPrecedesLast":"never","etAlUseLast":false,"initializeWith":". ","nameAsSortOrder":"all","sortSeparator":", "}))
|
|
790
|
+
if (_n3) _n3 = '\uE020author\uE021' + _n3 + '\uE022'
|
|
791
|
+
}
|
|
792
|
+
return _n3
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
function macro_access(item, ctx) {
|
|
796
|
+
let _ch4 = ''
|
|
797
|
+
if ((item.type === "article" || item.type === "dataset" || item.type === "software" || (item.volume != null && item.volume !== ''))) {
|
|
798
|
+
_ch4 = [].filter(v => v !== '').join('')
|
|
799
|
+
}
|
|
800
|
+
else if ((item.DOI != null && item.DOI !== '')) {
|
|
801
|
+
const _v5 = (item.DOI != null && item.DOI !== '' ? String(item.DOI) : '')
|
|
802
|
+
_ch4 = ((stripNocaseSpans(_v5) ? "doi:" + stripNocaseSpans(_v5) : '') ? '\uE020DOI\uE021' + (stripNocaseSpans(_v5) ? "doi:" + stripNocaseSpans(_v5) : '') + '\uE022' : '')
|
|
803
|
+
}
|
|
804
|
+
return _ch4
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
function macro_access_data(item, ctx) {
|
|
808
|
+
let _ch6 = ''
|
|
809
|
+
if ((item.type === "dataset" || item.type === "software")) {
|
|
810
|
+
const _v7 = (item.DOI != null && item.DOI !== '' ? String(item.DOI) : '')
|
|
811
|
+
_ch6 = ((stripNocaseSpans(_v7) ? "https://doi.org/" + stripNocaseSpans(_v7) : '') ? '\uE020DOI\uE021' + (stripNocaseSpans(_v7) ? "https://doi.org/" + stripNocaseSpans(_v7) : '') + '\uE022' : '')
|
|
812
|
+
}
|
|
813
|
+
return _ch6
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
function macro_issuance(item, ctx) {
|
|
817
|
+
let _ch8 = ''
|
|
818
|
+
if ((item.type === "bill" || item.type === "book" || item.type === "graphic" || item.type === "legal_case" || item.type === "legislation" || item.type === "motion_picture" || item.type === "song" || item.type === "thesis" || item.type === "chapter" || item.type === "paper-conference")) {
|
|
819
|
+
const _v13 = (item.publisher != null && item.publisher !== '' ? String(item.publisher) : '')
|
|
820
|
+
const _v14 = (item["publisher-place"] != null && item["publisher-place"] !== '' ? String(item["publisher-place"]) : '')
|
|
821
|
+
const _d15 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
822
|
+
const _g11 = ((item.publisher == null || item.publisher === '') && (item["publisher-place"] == null || item["publisher-place"] === '') && (item.issued == null || item.issued === '')) ? '' : [(stripNocaseSpans(_v13) ? '\uE020publisher\uE021' + stripNocaseSpans(_v13) + '\uE022' : ''), (stripNocaseSpans(_v14) ? '\uE020publisher-place\uE021' + stripNocaseSpans(_v14) + '\uE022' : ''), (_d15 ? '\uE020issued\uE021' + _d15 + '\uE022' : '')].filter(v => v !== '').join(", ")
|
|
823
|
+
const _g9 = ((item.publisher == null || item.publisher === '') && (item["publisher-place"] == null || item["publisher-place"] === '') && (item.issued == null || item.issued === '')) ? '' : [(_g11 ? "(" + _g11 + ")" : '')].filter(v => v !== '').join("; ")
|
|
824
|
+
_ch8 = (_g9 ? _g9 + "." : '')
|
|
825
|
+
}
|
|
826
|
+
else if (item.type === "article") {
|
|
827
|
+
const _gp17 = []
|
|
828
|
+
if ((item.genre != null && item.genre !== '')) {
|
|
829
|
+
const _v18 = (item.genre != null && item.genre !== '' ? String(item.genre) : '')
|
|
830
|
+
_gp17.push((applyTextCase(_v18, "capitalize-first") ? '\uE020genre\uE021' + applyTextCase(_v18, "capitalize-first") + '\uE022' : ''))
|
|
831
|
+
}
|
|
832
|
+
else {
|
|
833
|
+
const _v19 = (T["preprint"] != null ? (typeof T["preprint"] === 'string' ? T["preprint"] : (T["preprint"].single || '')) : '')
|
|
834
|
+
_gp17.push(applyTextCase(_v19, "capitalize-first"))
|
|
835
|
+
}
|
|
836
|
+
const _v20 = (T["at"] != null ? (typeof T["at"] === 'string' ? T["at"] : (T["at"].single || '')) : '')
|
|
837
|
+
_gp17.push(_v20)
|
|
838
|
+
if ((item.DOI != null && item.DOI !== '')) {
|
|
839
|
+
const _v21 = (item.DOI != null && item.DOI !== '' ? String(item.DOI) : '')
|
|
840
|
+
_gp17.push(((stripNocaseSpans(_v21) ? "https://doi.org/" + stripNocaseSpans(_v21) : '') ? '\uE020DOI\uE021' + (stripNocaseSpans(_v21) ? "https://doi.org/" + stripNocaseSpans(_v21) : '') + '\uE022' : ''))
|
|
841
|
+
}
|
|
842
|
+
else {
|
|
843
|
+
const _v22 = (item.URL != null && item.URL !== '' ? String(item.URL) : '')
|
|
844
|
+
_gp17.push((stripNocaseSpans(_v22) ? '\uE020URL\uE021' + stripNocaseSpans(_v22) + '\uE022' : ''))
|
|
845
|
+
}
|
|
846
|
+
const _d23 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
847
|
+
_gp17.push(((_d23 ? "(" + _d23 + ")" : '') ? '\uE020issued\uE021' + (_d23 ? "(" + _d23 + ")" : '') + '\uE022' : ''))
|
|
848
|
+
const _g16 = _gp17.filter(v => v !== '').join(" ")
|
|
849
|
+
_ch8 = _g16
|
|
850
|
+
}
|
|
851
|
+
else if ((item.type === "dataset" || item.type === "software")) {
|
|
852
|
+
const _v26 = (item.publisher != null && item.publisher !== '' ? String(item.publisher) : '')
|
|
853
|
+
const _v27 = macro_access_data(item, ctx)
|
|
854
|
+
const _d28 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
855
|
+
const _g24 = ((item.publisher == null || item.publisher === '') && !macro_access_data(item, ctx) && (item.issued == null || item.issued === '')) ? '' : [(stripNocaseSpans(_v26) ? '\uE020publisher\uE021' + stripNocaseSpans(_v26) + '\uE022' : ''), _v27, ((_d28 ? "(" + _d28 + ")" : '') ? '\uE020issued\uE021' + (_d28 ? "(" + _d28 + ")" : '') + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
856
|
+
_ch8 = _g24
|
|
857
|
+
}
|
|
858
|
+
else if ((item.type === "report" || item.type === "webpage" || item.type === "post" || item.type === "post-weblog")) {
|
|
859
|
+
const _v31 = (item.URL != null && item.URL !== '' ? String(item.URL) : '')
|
|
860
|
+
const _d32 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
861
|
+
const _g29 = ((item.URL == null || item.URL === '') && (item.issued == null || item.issued === '')) ? '' : [(stripNocaseSpans(_v31) ? '\uE020URL\uE021' + stripNocaseSpans(_v31) + '\uE022' : ''), ((_d32 ? "(" + _d32 + ")" : '') ? '\uE020issued\uE021' + (_d32 ? "(" + _d32 + ")" : '') + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
862
|
+
_ch8 = _g29
|
|
863
|
+
}
|
|
864
|
+
else if (item.type === "article-journal") {
|
|
865
|
+
const _gp34 = []
|
|
866
|
+
if (!((item.volume != null && item.volume !== '')) && !((item.page != null && item.page !== ''))) {
|
|
867
|
+
let _ch35 = ''
|
|
868
|
+
if ((item.DOI != null && item.DOI !== '')) {
|
|
869
|
+
const _v36 = (item.DOI != null && item.DOI !== '' ? String(item.DOI) : '')
|
|
870
|
+
_ch35 = ((stripNocaseSpans(_v36) ? "https://doi.org/" + stripNocaseSpans(_v36) : '') ? '\uE020DOI\uE021' + (stripNocaseSpans(_v36) ? "https://doi.org/" + stripNocaseSpans(_v36) : '') + '\uE022' : '')
|
|
871
|
+
}
|
|
872
|
+
else {
|
|
873
|
+
const _v37 = (item.URL != null && item.URL !== '' ? String(item.URL) : '')
|
|
874
|
+
_ch35 = (stripNocaseSpans(_v37) ? '\uE020URL\uE021' + stripNocaseSpans(_v37) + '\uE022' : '')
|
|
875
|
+
}
|
|
876
|
+
_gp34.push(_ch35)
|
|
877
|
+
}
|
|
878
|
+
const _d38 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
879
|
+
_gp34.push(((_d38 ? "(" + _d38 + ")" : '') ? '\uE020issued\uE021' + (_d38 ? "(" + _d38 + ")" : '') + '\uE022' : ''))
|
|
880
|
+
const _g33 = _gp34.filter(v => v !== '').join(" ")
|
|
881
|
+
_ch8 = _g33
|
|
882
|
+
}
|
|
883
|
+
else {
|
|
884
|
+
const _d39 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"year","form":null,"prefix":"","suffix":"","rangeDelimiter":null}],"monthTerms":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"seasonTerms":{"1":"Spring","2":"Summer","3":"Autumn","4":"Winter"}}) : ''
|
|
885
|
+
_ch8 = ((_d39 ? "(" + _d39 + ")" : '') ? '\uE020issued\uE021' + (_d39 ? "(" + _d39 + ")" : '') + '\uE022' : '')
|
|
886
|
+
}
|
|
887
|
+
return _ch8
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
function macro_container_title(item, ctx) {
|
|
891
|
+
let _ch40 = ''
|
|
892
|
+
if (item.type === "article-journal") {
|
|
893
|
+
const _v41 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
|
|
894
|
+
_ch40 = ((stripNocaseSpans(_v41) ? '\uE000' + stripNocaseSpans(_v41) + '\uE001' : '') ? '\uE020container-title\uE021' + (stripNocaseSpans(_v41) ? '\uE000' + stripNocaseSpans(_v41) + '\uE001' : '') + '\uE022' : '')
|
|
895
|
+
}
|
|
896
|
+
else {
|
|
897
|
+
const _v42 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
|
|
898
|
+
_ch40 = ((stripNocaseSpans(_v42) ? '\uE000' + stripNocaseSpans(_v42) + '\uE001' : '') ? '\uE020container-title\uE021' + (stripNocaseSpans(_v42) ? '\uE000' + stripNocaseSpans(_v42) + '\uE001' : '') + '\uE022' : '')
|
|
899
|
+
}
|
|
900
|
+
return _ch40
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
function macro_editor(item, ctx) {
|
|
904
|
+
let _ch43 = ''
|
|
905
|
+
if ((item.type === "chapter" || item.type === "paper-conference")) {
|
|
906
|
+
let _n44 = ''
|
|
907
|
+
if (item.editor && item.editor.length) {
|
|
908
|
+
_n44 = formatNames(item.editor, _nameConfig(ctx, {"and":"symbol","delimiter":", ","delimiterPrecedesLast":"never","etAlUseLast":false,"initializeWith":". ","nameAsSortOrder":"all","sortSeparator":", "}))
|
|
909
|
+
if (_n44) _n44 = '\uE020editor\uE021' + _n44 + '\uE022'
|
|
910
|
+
}
|
|
911
|
+
_ch43 = (_n44 ? "(" + _n44 + ")" : '')
|
|
912
|
+
}
|
|
913
|
+
return _ch43
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
function macro_volume(item, ctx) {
|
|
917
|
+
let _ch45 = ''
|
|
918
|
+
if (item.type === "article-journal") {
|
|
919
|
+
const _v46 = (item.volume != null && item.volume !== '' ? String(item.volume) : '')
|
|
920
|
+
_ch45 = (((stripNocaseSpans(_v46) ? '\uE002' + stripNocaseSpans(_v46) + '\uE003' : '') ? (stripNocaseSpans(_v46) ? '\uE002' + stripNocaseSpans(_v46) + '\uE003' : '') + "," : '') ? '\uE020volume\uE021' + ((stripNocaseSpans(_v46) ? '\uE002' + stripNocaseSpans(_v46) + '\uE003' : '') ? (stripNocaseSpans(_v46) ? '\uE002' + stripNocaseSpans(_v46) + '\uE003' : '') + "," : '') + '\uE022' : '')
|
|
921
|
+
}
|
|
922
|
+
else {
|
|
923
|
+
const _v49 = (() => {
|
|
924
|
+
const _val = item.volume
|
|
925
|
+
if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
|
|
926
|
+
const _term = T["volume:short"]
|
|
927
|
+
if (_term == null) return ''
|
|
928
|
+
if (typeof _term === 'string') return _term
|
|
929
|
+
const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
|
|
930
|
+
return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
|
|
931
|
+
})()
|
|
932
|
+
const _v50 = (item.volume != null && item.volume !== '' ? String(item.volume) : '')
|
|
933
|
+
const _g47 = ((item.volume == null || item.volume === '')) ? '' : [_v49, (stripNocaseSpans(_v50) ? '\uE020volume\uE021' + stripNocaseSpans(_v50) + '\uE022' : '')].filter(v => v !== '').join(" ")
|
|
934
|
+
_ch45 = _g47
|
|
935
|
+
}
|
|
936
|
+
return _ch45
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
const BIB_NAME_OPTS = {"etAlMin":6,"etAlUseFirst":1}
|
|
940
|
+
|
|
941
|
+
export function bibliography(item, ctx = {}) {
|
|
942
|
+
ctx = { ...ctx, _secOpts: BIB_NAME_OPTS }
|
|
943
|
+
const _v51 = (item["citation-number"] != null && item["citation-number"] !== '' ? String(item["citation-number"]) : '')
|
|
944
|
+
const _gp53 = []
|
|
945
|
+
const _v54 = macro_author(item, ctx)
|
|
946
|
+
_gp53.push((_v54 ? _v54 + "." : ''))
|
|
947
|
+
const _v55 = macro_title(item, ctx)
|
|
948
|
+
_gp53.push((_v55 ? _v55 + "." : ''))
|
|
949
|
+
if ((item.type === "chapter" || item.type === "paper-conference")) {
|
|
950
|
+
const _v56 = (T["in"] != null ? (typeof T["in"] === 'string' ? T["in"] : (T["in"].single || '')) : '')
|
|
951
|
+
_gp53.push(_v56)
|
|
952
|
+
}
|
|
953
|
+
const _v57 = macro_container_title(item, ctx)
|
|
954
|
+
_gp53.push(_v57)
|
|
955
|
+
const _v58 = macro_editor(item, ctx)
|
|
956
|
+
_gp53.push(_v58)
|
|
957
|
+
const _v59 = macro_volume(item, ctx)
|
|
958
|
+
_gp53.push(_v59)
|
|
959
|
+
const _v60 = (item.page != null && item.page !== '' ? String(item.page) : '')
|
|
960
|
+
_gp53.push((stripNocaseSpans(_v60) ? '\uE020page\uE021' + stripNocaseSpans(_v60) + '\uE022' : ''))
|
|
961
|
+
const _v61 = macro_issuance(item, ctx)
|
|
962
|
+
_gp53.push(_v61)
|
|
963
|
+
const _v62 = macro_access(item, ctx)
|
|
964
|
+
_gp53.push(_v62)
|
|
965
|
+
const _g52 = _gp53.filter(v => v !== '').join(" ")
|
|
966
|
+
const _first = ((stripNocaseSpans(_v51) ? stripNocaseSpans(_v51) + "." : '') ? '\uE020citation-number\uE021' + (stripNocaseSpans(_v51) ? stripNocaseSpans(_v51) + "." : '') + '\uE022' : '')
|
|
967
|
+
const _rest = [_g52].filter(v => v !== '').join("")
|
|
968
|
+
const _raw = (_first ? _first + (/\s[\uE000-\uE007\uE020-\uE022]*$/.test(_first) ? '' : ' ') : '') + _rest + "."
|
|
969
|
+
const _norm = _normalizePunctuation(_raw)
|
|
970
|
+
const text = stripFormatting(_norm)
|
|
971
|
+
const html = '<div class="csl-entry">' + toHtml(_norm) + '</div>'
|
|
972
|
+
return {
|
|
973
|
+
text,
|
|
974
|
+
html,
|
|
975
|
+
parts: _extractParts(item),
|
|
976
|
+
links: _extractLinks(item),
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
function _extractParts(item) {
|
|
981
|
+
return {
|
|
982
|
+
authors: item.author || [],
|
|
983
|
+
year: item.issued?.['date-parts']?.[0]?.[0]?.toString() || '',
|
|
984
|
+
title: item.title || '',
|
|
985
|
+
container: item['container-title'] || '',
|
|
986
|
+
volume: item.volume?.toString() || '',
|
|
987
|
+
issue: item.issue?.toString() || '',
|
|
988
|
+
pages: item.page || '',
|
|
989
|
+
doi: item.DOI || '',
|
|
990
|
+
url: item.URL || '',
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
function _extractLinks(item) {
|
|
995
|
+
return {
|
|
996
|
+
doi: item.DOI ? 'https://doi.org/' + item.DOI : null,
|
|
997
|
+
url: item.URL || null,
|
|
998
|
+
pdf: item.extended?.pdf_url || null,
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
function _normalizePunctuation(str) {
|
|
1003
|
+
if (!str) return ''
|
|
1004
|
+
// F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
|
|
1005
|
+
const F = '[\uE000-\uE007\uE020-\uE022]*'
|
|
1006
|
+
return str
|
|
1007
|
+
.replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
|
|
1008
|
+
.replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
|
|
1009
|
+
.replace(/ +/g, ' ')
|
|
1010
|
+
.trim()
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
const CIT_NAME_OPTS = {}
|
|
1015
|
+
|
|
1016
|
+
export function citation(cites, ctx = {}) {
|
|
1017
|
+
const _outerCtx = { ...ctx, _secOpts: CIT_NAME_OPTS }
|
|
1018
|
+
const rendered = cites.map(cite => {
|
|
1019
|
+
let ctx = cite._disambig ? { ..._outerCtx, _disambig: cite._disambig } : _outerCtx
|
|
1020
|
+
let item = cite.item || cite
|
|
1021
|
+
if (cite.locator != null) { item = { ...item, locator: cite.locator, _locatorLabel: cite.label || 'page' } }
|
|
1022
|
+
const _v63 = (item["citation-number"] != null && item["citation-number"] !== '' ? String(item["citation-number"]) : '')
|
|
1023
|
+
return [(stripNocaseSpans(_v63) ? '\uE020citation-number\uE021' + stripNocaseSpans(_v63) + '\uE022' : '')].filter(v => v !== '').join('')
|
|
1024
|
+
})
|
|
1025
|
+
const _raw = rendered.join(",")
|
|
1026
|
+
const text = stripFormatting(_raw)
|
|
1027
|
+
const html = '<span class="csl-citation"><sup>' + toHtml(_raw) + '</sup></span>'
|
|
1028
|
+
return { text, html }
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
function _resolveTerm(key) {
|
|
1032
|
+
const val = T[key]
|
|
1033
|
+
if (val == null) return null
|
|
1034
|
+
return typeof val === 'string' ? val : val.single || ''
|
|
1035
|
+
}
|