@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 ADDED
@@ -0,0 +1,1139 @@
1
+ // Generated by @citestyle/compiler — do not edit
2
+ // Source: AMA Manual of Style 11th edition
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": "american-medical-association",
7
+ "title": "AMA Manual of Style 11th edition",
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 = {"delimiter":", ","initializeWith":"","nameAsSortOrder":"all","sortSeparator":" ","delimiterPrecedesLast":"always"}
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_label_chapter_number(item, ctx) {
774
+ const _gp1 = []
775
+ if ((item["chapter-number"] != null && /^\s*\d/.test(String(item["chapter-number"])))) {
776
+ const _v2 = (() => {
777
+ const _val = item["chapter-number"]
778
+ if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
779
+ const _term = T["chapter:short"]
780
+ if (_term == null) return ''
781
+ if (typeof _term === 'string') return _term
782
+ const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
783
+ return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
784
+ })()
785
+ _gp1.push(_v2.replace(/\./g, ''))
786
+ }
787
+ const _v3 = (item["chapter-number"] != null && item["chapter-number"] !== '' ? String(item["chapter-number"]) : '')
788
+ _gp1.push((stripNocaseSpans(_v3) ? '\uE020chapter-number\uE021' + stripNocaseSpans(_v3) + '\uE022' : ''))
789
+ const _g0 = _gp1.filter(v => v !== '').join(" ")
790
+ return _g0
791
+ }
792
+
793
+ function macro_label_edition(item, ctx) {
794
+ const _gp5 = []
795
+ if ((item.edition != null && /^\s*\d/.test(String(item.edition)))) {
796
+ const _v6 = item.edition != null ? String(item.edition) : ''
797
+ _gp5.push(((_v6 && !isNaN(Number(_v6)) ? ordinal(Number(_v6)) : _v6) ? '\uE020edition\uE021' + (_v6 && !isNaN(Number(_v6)) ? ordinal(Number(_v6)) : _v6) + '\uE022' : ''))
798
+ const _v7 = (() => {
799
+ const _val = item.edition
800
+ if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
801
+ const _term = T["edition:short"]
802
+ if (_term == null) return ''
803
+ if (typeof _term === 'string') return _term
804
+ const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
805
+ return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
806
+ })()
807
+ _gp5.push(_v7)
808
+ }
809
+ else {
810
+ const _v8 = (item.edition != null && item.edition !== '' ? String(item.edition) : '')
811
+ _gp5.push((stripNocaseSpans(_v8) ? '\uE020edition\uE021' + stripNocaseSpans(_v8) + '\uE022' : ''))
812
+ }
813
+ const _g4 = _gp5.filter(v => v !== '').join(" ")
814
+ return _g4
815
+ }
816
+
817
+ function macro_label_supplement_number(item, ctx) {
818
+ const _gp10 = []
819
+ if ((item["supplement-number"] != null && /^\s*\d/.test(String(item["supplement-number"])))) {
820
+ const _v11 = (T["supplement:short"] != null ? (typeof T["supplement:short"] === 'string' ? T["supplement:short"] : (T["supplement:short"].single || '')) : '')
821
+ _gp10.push(_v11.replace(/\./g, ''))
822
+ }
823
+ const _v12 = (item["supplement-number"] != null && item["supplement-number"] !== '' ? String(item["supplement-number"]) : '')
824
+ _gp10.push((stripNocaseSpans(_v12) ? '\uE020supplement-number\uE021' + stripNocaseSpans(_v12) + '\uE022' : ''))
825
+ const _g9 = _gp10.filter(v => v !== '').join(" ")
826
+ return _g9
827
+ }
828
+
829
+ function macro_label_volume(item, ctx) {
830
+ const _gp14 = []
831
+ if ((item.volume != null && /^\s*\d/.test(String(item.volume)))) {
832
+ const _v15 = (() => {
833
+ const _val = item.volume
834
+ if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
835
+ const _term = T["volume:short"]
836
+ if (_term == null) return ''
837
+ if (typeof _term === 'string') return _term
838
+ const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
839
+ return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
840
+ })()
841
+ _gp14.push(applyTextCase(_v15.replace(/\./g, ''), "capitalize-first"))
842
+ }
843
+ const _v16 = (item.volume != null && item.volume !== '' ? String(item.volume) : '')
844
+ _gp14.push((stripNocaseSpans(_v16) ? '\uE020volume\uE021' + stripNocaseSpans(_v16) + '\uE022' : ''))
845
+ const _g13 = _gp14.filter(v => v !== '').join(" ")
846
+ return _g13
847
+ }
848
+
849
+ function macro_editor(item, ctx) {
850
+ let _n17 = ''
851
+ if (item.editor && item.editor.length) {
852
+ _n17 = formatNames(item.editor, _nameConfig(ctx, {}))
853
+ if (_n17) _n17 = '\uE020editor\uE021' + _n17 + '\uE022'
854
+ }
855
+ return _n17
856
+ }
857
+
858
+ function macro_author(item, ctx) {
859
+ let _n18 = ''
860
+ if (item.author && item.author.length) {
861
+ _n18 = formatNames(item.author, _nameConfig(ctx, {}))
862
+ if (_n18) _n18 = '\uE020author\uE021' + _n18 + '\uE022'
863
+ }
864
+ if (!_n18) {
865
+ let _n19 = ''
866
+ if (item.editor && item.editor.length) {
867
+ _n19 = formatNames(item.editor, _nameConfig(ctx, {}))
868
+ if (_n19) _n19 = '\uE020editor\uE021' + _n19 + '\uE022'
869
+ }
870
+ if (!_n18) _n18 = _n19
871
+ const _v20 = macro_title(item, ctx)
872
+ if (!_n18) _n18 = _v20
873
+ }
874
+ return _n18
875
+ }
876
+
877
+ function macro_access(item, ctx) {
878
+ let _ch21 = ''
879
+ if ((item.DOI != null && item.DOI !== '')) {
880
+ const _v22 = (item.DOI != null && item.DOI !== '' ? String(item.DOI) : '')
881
+ _ch21 = ((stripNocaseSpans(_v22) ? "doi:" + stripNocaseSpans(_v22) : '') ? '\uE020DOI\uE021' + (stripNocaseSpans(_v22) ? "doi:" + stripNocaseSpans(_v22) : '') + '\uE022' : '')
882
+ }
883
+ else if ((item.URL != null && item.URL !== '')) {
884
+ const _v27 = (T["accessed"] != null ? (typeof T["accessed"] === 'string' ? T["accessed"] : (T["accessed"].single || '')) : '')
885
+ const _d28 = item.accessed ? formatDate(item.accessed, {"dateParts":[{"name":"month","form":null,"prefix":"","suffix":" ","rangeDelimiter":null},{"name":"day","form":null,"prefix":"","suffix":", ","rangeDelimiter":null},{"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"}}) : ''
886
+ const _g25 = ((item.accessed == null || item.accessed === '')) ? '' : [applyTextCase(_v27, "capitalize-first"), (_d28 ? '\uE020accessed\uE021' + _d28 + '\uE022' : '')].filter(v => v !== '').join(" ")
887
+ const _v29 = (item.URL != null && item.URL !== '' ? String(item.URL) : '')
888
+ const _g23 = ((item.accessed == null || item.accessed === '') && (item.URL == null || item.URL === '')) ? '' : [_g25, (stripNocaseSpans(_v29) ? '\uE020URL\uE021' + stripNocaseSpans(_v29) + '\uE022' : '')].filter(v => v !== '').join(". ")
889
+ _ch21 = _g23
890
+ }
891
+ return _ch21
892
+ }
893
+
894
+ function macro_title(item, ctx) {
895
+ let _ch30 = ''
896
+ 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" || item.type === "thesis")) {
897
+ const _v31 = (item.title != null && item.title !== '' ? String(item.title) : '')
898
+ _ch30 = ((applyTextCase(_v31, "title") ? '\uE000' + applyTextCase(_v31, "title") + '\uE001' : '') ? '\uE020title\uE021' + (applyTextCase(_v31, "title") ? '\uE000' + applyTextCase(_v31, "title") + '\uE001' : '') + '\uE022' : '')
899
+ }
900
+ else {
901
+ const _v32 = (item.title != null && item.title !== '' ? String(item.title) : '')
902
+ _ch30 = (stripNocaseSpans(_v32) ? '\uE020title\uE021' + stripNocaseSpans(_v32) + '\uE022' : '')
903
+ }
904
+ return _ch30
905
+ }
906
+
907
+ const BIB_NAME_OPTS = {"delimiter":", ","initializeWith":"","nameAsSortOrder":"all","sortSeparator":" ","delimiterPrecedesLast":"always","etAlMin":7,"etAlUseFirst":3}
908
+
909
+ export function bibliography(item, ctx = {}) {
910
+ ctx = { ...ctx, _secOpts: BIB_NAME_OPTS }
911
+ const _v33 = (item["citation-number"] != null && item["citation-number"] !== '' ? String(item["citation-number"]) : '')
912
+ const _gp37 = []
913
+ const _v38 = macro_author(item, ctx)
914
+ _gp37.push(_v38)
915
+ const _v39 = macro_title(item, ctx)
916
+ _gp37.push(_v39)
917
+ if ((item.type === "bill" || item.type === "book" || item.type === "graphic" || item.type === "legislation" || item.type === "motion_picture" || item.type === "report" || item.type === "song")) {
918
+ const _v44 = macro_label_volume(item, ctx)
919
+ const _v45 = macro_label_edition(item, ctx)
920
+ const _v46 = macro_editor(item, ctx)
921
+ const _v49 = (item.publisher != null && item.publisher !== '' ? String(item.publisher) : '')
922
+ const _d50 = 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"}}) : ''
923
+ const _g47 = ((item.publisher == null || item.publisher === '') && (item.issued == null || item.issued === '')) ? '' : [(stripNocaseSpans(_v49) ? '\uE020publisher\uE021' + stripNocaseSpans(_v49) + '\uE022' : ''), (_d50 ? '\uE020issued\uE021' + _d50 + '\uE022' : '')].filter(v => v !== '').join("; ")
924
+ const _g42 = (!macro_label_volume(item, ctx) && !macro_label_edition(item, ctx) && !macro_editor(item, ctx) && (item.publisher == null || item.publisher === '') && (item.issued == null || item.issued === '')) ? '' : [_v44, _v45, (_v46 ? "(" + _v46 + ")" : ''), _g47].filter(v => v !== '').join(". ")
925
+ const _v51 = (item.page != null && item.page !== '' ? pageRange(stripNocaseSpans(String(item.page)), "expanded") : '')
926
+ const _g40 = (!macro_label_volume(item, ctx) && !macro_label_edition(item, ctx) && !macro_editor(item, ctx) && (item.publisher == null || item.publisher === '') && (item.issued == null || item.issued === '') && (item.page == null || item.page === '')) ? '' : [_g42, (stripNocaseSpans(_v51) ? '\uE020page\uE021' + stripNocaseSpans(_v51) + '\uE022' : '')].filter(v => v !== '').join(":")
927
+ _gp37.push(_g40)
928
+ }
929
+ else if ((item.type === "chapter" || item.type === "paper-conference" || item.type === "entry-dictionary" || item.type === "entry-encyclopedia")) {
930
+ const _gp53 = []
931
+ const _v56 = (T["in"] != null ? (typeof T["in"] === 'string' ? T["in"] : (T["in"].single || '')) : '')
932
+ const _v59 = macro_editor(item, ctx)
933
+ const _v60 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
934
+ const _v61 = macro_label_volume(item, ctx)
935
+ const _v62 = macro_label_edition(item, ctx)
936
+ const _v63 = (item["collection-title"] != null && item["collection-title"] !== '' ? String(item["collection-title"]) : '')
937
+ const _v66 = (item.publisher != null && item.publisher !== '' ? String(item.publisher) : '')
938
+ const _d67 = 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"}}) : ''
939
+ const _g64 = ((item.publisher == null || item.publisher === '') && (item.issued == null || item.issued === '')) ? '' : [(stripNocaseSpans(_v66) ? '\uE020publisher\uE021' + stripNocaseSpans(_v66) + '\uE022' : ''), (_d67 ? '\uE020issued\uE021' + _d67 + '\uE022' : '')].filter(v => v !== '').join("; ")
940
+ const _g57 = (!macro_editor(item, ctx) && (item["container-title"] == null || item["container-title"] === '') && !macro_label_volume(item, ctx) && !macro_label_edition(item, ctx) && (item["collection-title"] == null || item["collection-title"] === '') && (item.publisher == null || item.publisher === '') && (item.issued == null || item.issued === '')) ? '' : [_v59, ((applyTextCase(_v60, "title") ? '\uE000' + applyTextCase(_v60, "title") + '\uE001' : '') ? '\uE020container-title\uE021' + (applyTextCase(_v60, "title") ? '\uE000' + applyTextCase(_v60, "title") + '\uE001' : '') + '\uE022' : ''), _v61, _v62, (stripNocaseSpans(_v63) ? '\uE020collection-title\uE021' + stripNocaseSpans(_v63) + '\uE022' : ''), _g64].filter(v => v !== '').join(". ")
941
+ const _g54 = (!macro_editor(item, ctx) && (item["container-title"] == null || item["container-title"] === '') && !macro_label_volume(item, ctx) && !macro_label_edition(item, ctx) && (item["collection-title"] == null || item["collection-title"] === '') && (item.publisher == null || item.publisher === '') && (item.issued == null || item.issued === '')) ? '' : [applyTextCase(_v56, "capitalize-first"), _g57].filter(v => v !== '').join(": ")
942
+ _gp53.push(_g54)
943
+ if ((item.page != null && item.page !== '')) {
944
+ const _v68 = (item.page != null && item.page !== '' ? pageRange(stripNocaseSpans(String(item.page)), "expanded") : '')
945
+ _gp53.push((stripNocaseSpans(_v68) ? '\uE020page\uE021' + stripNocaseSpans(_v68) + '\uE022' : ''))
946
+ }
947
+ else {
948
+ const _v69 = macro_label_chapter_number(item, ctx)
949
+ _gp53.push(_v69)
950
+ }
951
+ const _g52 = _gp53.filter(v => v !== '').join(":")
952
+ _gp37.push(_g52)
953
+ }
954
+ else if (item.type === "legal_case") {
955
+ const _v76 = macro_editor(item, ctx)
956
+ const _v79 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
957
+ const _v80 = (item.volume != null && item.volume !== '' ? String(item.volume) : '')
958
+ const _g77 = ((item["container-title"] == null || item["container-title"] === '') && (item.volume == null || item.volume === '')) ? '' : [(stripNocaseSpans(_v79) ? '\uE020container-title\uE021' + stripNocaseSpans(_v79) + '\uE022' : ''), (stripNocaseSpans(_v80) ? '\uE020volume\uE021' + stripNocaseSpans(_v80) + '\uE022' : '')].filter(v => v !== '').join(" ")
959
+ const _g74 = (!macro_editor(item, ctx) && (item["container-title"] == null || item["container-title"] === '') && (item.volume == null || item.volume === '')) ? '' : [(_v76 ? "(" + _v76 + ")" : ''), _g77].filter(v => v !== '').join(". ")
960
+ const _v81 = (item.page != null && item.page !== '' ? pageRange(stripNocaseSpans(String(item.page)), "expanded") : '')
961
+ const _g72 = (!macro_editor(item, ctx) && (item["container-title"] == null || item["container-title"] === '') && (item.volume == null || item.volume === '') && (item.page == null || item.page === '')) ? '' : [_g74, (stripNocaseSpans(_v81) ? '\uE020page\uE021' + stripNocaseSpans(_v81) + '\uE022' : '')].filter(v => v !== '').join(", ")
962
+ const _v84 = (item.authority != null && item.authority !== '' ? String(item.authority) : '')
963
+ const _d85 = 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"}}) : ''
964
+ const _g82 = ((item.authority == null || item.authority === '') && (item.issued == null || item.issued === '')) ? '' : [(stripNocaseSpans(_v84) ? '\uE020authority\uE021' + stripNocaseSpans(_v84) + '\uE022' : ''), (_d85 ? '\uE020issued\uE021' + _d85 + '\uE022' : '')].filter(v => v !== '').join(" ")
965
+ const _g70 = (!macro_editor(item, ctx) && (item["container-title"] == null || item["container-title"] === '') && (item.volume == null || item.volume === '') && (item.page == null || item.page === '') && (item.authority == null || item.authority === '') && (item.issued == null || item.issued === '')) ? '' : [_g72, (_g82 ? "(" + _g82 + ")" : '')].filter(v => v !== '').join(" ")
966
+ _gp37.push(_g70)
967
+ }
968
+ else if ((item.type === "post" || item.type === "post-weblog" || item.type === "webpage")) {
969
+ const _v86 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
970
+ _gp37.push((stripNocaseSpans(_v86) ? '\uE020container-title\uE021' + stripNocaseSpans(_v86) + '\uE022' : ''))
971
+ const _d87 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"month","form":null,"prefix":"","suffix":" ","rangeDelimiter":null},{"name":"day","form":null,"prefix":"","suffix":", ","rangeDelimiter":null},{"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"}}) : ''
972
+ _gp37.push((_d87 ? '\uE020issued\uE021' + _d87 + '\uE022' : ''))
973
+ }
974
+ else if (item.type === "speech") {
975
+ const _gp89 = []
976
+ if ((item.genre != null && item.genre !== '')) {
977
+ const _v92 = (item.genre != null && item.genre !== '' ? String(item.genre) : '')
978
+ const _v93 = (T["presented at"] != null ? (typeof T["presented at"] === 'string' ? T["presented at"] : (T["presented at"].single || '')) : '')
979
+ const _g90 = ((item.genre == null || item.genre === '')) ? '' : [(applyTextCase(_v92, "capitalize-first") ? '\uE020genre\uE021' + applyTextCase(_v92, "capitalize-first") + '\uE022' : ''), _v93].filter(v => v !== '').join(" ")
980
+ _gp89.push(_g90)
981
+ }
982
+ else if (((item["event-title"] != null && item["event-title"] !== '') || (item["event-place"] != null && item["event-place"] !== ''))) {
983
+ const _v94 = (T["presented at"] != null ? (typeof T["presented at"] === 'string' ? T["presented at"] : (T["presented at"].single || '')) : '')
984
+ _gp89.push(applyTextCase(_v94, "capitalize-first"))
985
+ }
986
+ const _v97 = (item["event-title"] != null && item["event-title"] !== '' ? String(item["event-title"]) : '')
987
+ const _d98 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"month","form":null,"prefix":"","suffix":" ","rangeDelimiter":null},{"name":"day","form":null,"prefix":"","suffix":", ","rangeDelimiter":null},{"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"}}) : ''
988
+ const _v99 = (item["event-place"] != null && item["event-place"] !== '' ? String(item["event-place"]) : '')
989
+ const _g95 = ((item["event-title"] == null || item["event-title"] === '') && (item.issued == null || item.issued === '') && (item["event-place"] == null || item["event-place"] === '')) ? '' : [(stripNocaseSpans(_v97) ? '\uE020event-title\uE021' + stripNocaseSpans(_v97) + '\uE022' : ''), (_d98 ? '\uE020issued\uE021' + _d98 + '\uE022' : ''), (stripNocaseSpans(_v99) ? '\uE020event-place\uE021' + stripNocaseSpans(_v99) + '\uE022' : '')].filter(v => v !== '').join("; ")
990
+ _gp89.push(_g95)
991
+ const _g88 = _gp89.filter(v => v !== '').join(": ")
992
+ _gp37.push(_g88)
993
+ }
994
+ else if (item.type === "thesis") {
995
+ const _v100 = (item.genre != null && item.genre !== '' ? String(item.genre) : '')
996
+ _gp37.push((stripNocaseSpans(_v100) ? '\uE020genre\uE021' + stripNocaseSpans(_v100) + '\uE022' : ''))
997
+ const _v103 = (item.publisher != null && item.publisher !== '' ? String(item.publisher) : '')
998
+ const _d104 = 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"}}) : ''
999
+ const _g101 = ((item.publisher == null || item.publisher === '') && (item.issued == null || item.issued === '')) ? '' : [(stripNocaseSpans(_v103) ? '\uE020publisher\uE021' + stripNocaseSpans(_v103) + '\uE022' : ''), (_d104 ? '\uE020issued\uE021' + _d104 + '\uE022' : '')].filter(v => v !== '').join("; ")
1000
+ _gp37.push(_g101)
1001
+ }
1002
+ else {
1003
+ const _v105 = macro_editor(item, ctx)
1004
+ _gp37.push(_v105)
1005
+ const _v106 = (item["container-title"] != null && item["container-title"] !== '' ? String(item["container-title"]) : '')
1006
+ _gp37.push(((stripNocaseSpans(_v106).replace(/\./g, '') ? '\uE000' + stripNocaseSpans(_v106).replace(/\./g, '') + '\uE001' : '') ? '\uE020container-title\uE021' + (stripNocaseSpans(_v106).replace(/\./g, '') ? '\uE000' + stripNocaseSpans(_v106).replace(/\./g, '') + '\uE001' : '') + '\uE022' : ''))
1007
+ let _ch107 = ''
1008
+ if (item.type === "article") {
1009
+ const _v108 = (item.publisher != null && item.publisher !== '' ? String(item.publisher) : '')
1010
+ _ch107 = ((stripNocaseSpans(_v108) ? '\uE000' + stripNocaseSpans(_v108) + '\uE001' : '') ? '\uE020publisher\uE021' + (stripNocaseSpans(_v108) ? '\uE000' + stripNocaseSpans(_v108) + '\uE001' : '') + '\uE022' : '')
1011
+ }
1012
+ _gp37.push(_ch107)
1013
+ const _gp110 = []
1014
+ const _gp112 = []
1015
+ if (((item.issue != null && item.issue !== '') || (item.volume != null && item.volume !== ''))) {
1016
+ const _d113 = 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"}}) : ''
1017
+ _gp112.push((_d113 ? '\uE020issued\uE021' + _d113 + '\uE022' : ''))
1018
+ }
1019
+ else {
1020
+ const _gp115 = []
1021
+ if (item.type === "article") {
1022
+ const _v116 = (T["preprint"] != null ? (typeof T["preprint"] === 'string' ? T["preprint"] : (T["preprint"].single || '')) : '')
1023
+ _gp115.push(applyTextCase(_v116, "capitalize-first"))
1024
+ }
1025
+ else if (item.type === "article-newspaper") {
1026
+ }
1027
+ else {
1028
+ const _v117 = (T["advance-online-publication"] != null ? (typeof T["advance-online-publication"] === 'string' ? T["advance-online-publication"] : (T["advance-online-publication"].single || '')) : '')
1029
+ _gp115.push(applyTextCase(_v117, "capitalize-first"))
1030
+ }
1031
+ const _d118 = item.issued ? formatDate(item.issued, {"dateParts":[{"name":"month","form":null,"prefix":"","suffix":" ","rangeDelimiter":null},{"name":"day","form":null,"prefix":"","suffix":", ","rangeDelimiter":null},{"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"}}) : ''
1032
+ _gp115.push((_d118 ? '\uE020issued\uE021' + _d118 + '\uE022' : ''))
1033
+ const _g114 = _gp115.filter(v => v !== '').join(" ")
1034
+ _gp112.push(_g114)
1035
+ }
1036
+ if (!(item.type === "article-newspaper")) {
1037
+ const _v121 = (item.volume != null && item.volume !== '' ? String(item.volume) : '')
1038
+ const _v122 = (item.issue != null && item.issue !== '' ? String(item.issue) : '')
1039
+ const _v123 = macro_label_supplement_number(item, ctx)
1040
+ const _g119 = ((item.volume == null || item.volume === '') && (item.issue == null || item.issue === '') && !macro_label_supplement_number(item, ctx)) ? '' : [(stripNocaseSpans(_v121) ? '\uE020volume\uE021' + stripNocaseSpans(_v121) + '\uE022' : ''), ((stripNocaseSpans(_v122) ? "(" + stripNocaseSpans(_v122) + ")" : '') ? '\uE020issue\uE021' + (stripNocaseSpans(_v122) ? "(" + stripNocaseSpans(_v122) + ")" : '') + '\uE022' : ''), (_v123 ? "(" + _v123 + ")" : '')].filter(v => v !== '').join('')
1041
+ _gp112.push(_g119)
1042
+ }
1043
+ const _g111 = _gp112.filter(v => v !== '').join(";")
1044
+ _gp110.push(_g111)
1045
+ if ((item.number != null && item.number !== '')) {
1046
+ const _v124 = (item.number != null && item.number !== '' ? String(item.number) : '')
1047
+ _gp110.push((stripNocaseSpans(_v124) ? '\uE020number\uE021' + stripNocaseSpans(_v124) + '\uE022' : ''))
1048
+ }
1049
+ else {
1050
+ const _v125 = (item.page != null && item.page !== '' ? pageRange(stripNocaseSpans(String(item.page)), "expanded") : '')
1051
+ _gp110.push((stripNocaseSpans(_v125) ? '\uE020page\uE021' + stripNocaseSpans(_v125) + '\uE022' : ''))
1052
+ }
1053
+ const _g109 = _gp110.filter(v => v !== '').join(":")
1054
+ _gp37.push(_g109)
1055
+ }
1056
+ const _g36 = _gp37.filter(v => v !== '').join(". ")
1057
+ const _v126 = macro_access(item, ctx)
1058
+ const _g34 = (!macro_author(item, ctx) && !macro_title(item, ctx) && !macro_label_volume(item, ctx) && !macro_label_edition(item, ctx) && !macro_editor(item, ctx) && (item.publisher == null || item.publisher === '') && (item.issued == null || item.issued === '') && (item.page == null || item.page === '') && (item["container-title"] == null || item["container-title"] === '') && (item["collection-title"] == null || item["collection-title"] === '') && !macro_label_chapter_number(item, ctx) && (item.volume == null || item.volume === '') && (item.authority == null || item.authority === '') && (item.genre == null || item.genre === '') && (item["event-title"] == null || item["event-title"] === '') && (item["event-place"] == null || item["event-place"] === '') && (item.issue == null || item.issue === '') && !macro_label_supplement_number(item, ctx) && (item.number == null || item.number === '') && !macro_access(item, ctx)) ? '' : [(_g36 ? _g36 + "." : ''), _v126].filter(v => v !== '').join(". ")
1059
+ const _first = ((stripNocaseSpans(_v33) ? stripNocaseSpans(_v33) + "." : '') ? '\uE020citation-number\uE021' + (stripNocaseSpans(_v33) ? stripNocaseSpans(_v33) + "." : '') + '\uE022' : '')
1060
+ const _rest = [_g34].filter(v => v !== '').join("")
1061
+ const _raw = (_first ? _first + (/\s[\uE000-\uE007\uE020-\uE022]*$/.test(_first) ? '' : ' ') : '') + _rest
1062
+ const _norm = _normalizePunctuation(_raw)
1063
+ const text = stripFormatting(_norm)
1064
+ const html = '<div class="csl-entry">' + toHtml(_norm) + '</div>'
1065
+ return {
1066
+ text,
1067
+ html,
1068
+ parts: _extractParts(item),
1069
+ links: _extractLinks(item),
1070
+ }
1071
+ }
1072
+
1073
+ function _extractParts(item) {
1074
+ return {
1075
+ authors: item.author || [],
1076
+ year: item.issued?.['date-parts']?.[0]?.[0]?.toString() || '',
1077
+ title: item.title || '',
1078
+ container: item['container-title'] || '',
1079
+ volume: item.volume?.toString() || '',
1080
+ issue: item.issue?.toString() || '',
1081
+ pages: item.page || '',
1082
+ doi: item.DOI || '',
1083
+ url: item.URL || '',
1084
+ }
1085
+ }
1086
+
1087
+ function _extractLinks(item) {
1088
+ return {
1089
+ doi: item.DOI ? 'https://doi.org/' + item.DOI : null,
1090
+ url: item.URL || null,
1091
+ pdf: item.extended?.pdf_url || null,
1092
+ }
1093
+ }
1094
+
1095
+ function _normalizePunctuation(str) {
1096
+ if (!str) return ''
1097
+ // F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
1098
+ const F = '[\uE000-\uE007\uE020-\uE022]*'
1099
+ return str
1100
+ .replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
1101
+ .replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
1102
+ .replace(/ +/g, ' ')
1103
+ .trim()
1104
+ }
1105
+
1106
+
1107
+ const CIT_NAME_OPTS = {"delimiter":", ","initializeWith":"","nameAsSortOrder":"all","sortSeparator":" ","delimiterPrecedesLast":"always"}
1108
+
1109
+ export function citation(cites, ctx = {}) {
1110
+ const _outerCtx = { ...ctx, _secOpts: CIT_NAME_OPTS }
1111
+ const rendered = cites.map(cite => {
1112
+ let ctx = cite._disambig ? { ..._outerCtx, _disambig: cite._disambig } : _outerCtx
1113
+ let item = cite.item || cite
1114
+ if (cite.locator != null) { item = { ...item, locator: cite.locator, _locatorLabel: cite.label || 'page' } }
1115
+ const _v127 = (item["citation-number"] != null && item["citation-number"] !== '' ? String(item["citation-number"]) : '')
1116
+ const _v130 = (() => {
1117
+ const _val = item.locator
1118
+ if (_val == null || _val === '' || (Array.isArray(_val) && _val.length === 0)) return ''
1119
+ const _term = T[(item._locatorLabel || 'page') + ":short"]
1120
+ if (_term == null) return ''
1121
+ if (typeof _term === 'string') return _term
1122
+ const _isPlural = typeof _val === 'string' ? /[-,&]/.test(_val) || /\d+\s*[-–]\s*\d+/.test(_val) : Array.isArray(_val) ? _val.length > 1 : Number(_val) !== 1
1123
+ return _isPlural ? (_term.multiple || _term.single || '') : (_term.single || '')
1124
+ })()
1125
+ const _v131 = (item.locator != null && item.locator !== '' ? String(item.locator) : '')
1126
+ const _g128 = ((item.locator == null || item.locator === '')) ? '' : [_v130.replace(/\./g, ''), (stripNocaseSpans(_v131) ? '\uE020locator\uE021' + stripNocaseSpans(_v131) + '\uE022' : '')].filter(v => v !== '').join('')
1127
+ return [(stripNocaseSpans(_v127) ? '\uE020citation-number\uE021' + stripNocaseSpans(_v127) + '\uE022' : ''), (_g128 ? "(" + _g128 + ")" : '')].filter(v => v !== '').join('')
1128
+ })
1129
+ const _raw = rendered.join(",")
1130
+ const text = stripFormatting(_raw)
1131
+ const html = '<span class="csl-citation"><sup>' + toHtml(_raw) + '</sup></span>'
1132
+ return { text, html }
1133
+ }
1134
+
1135
+ function _resolveTerm(key) {
1136
+ const val = T[key]
1137
+ if (val == null) return null
1138
+ return typeof val === 'string' ? val : val.single || ''
1139
+ }