1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[596],{26109:function(t){var e,i,s,r,n,a,o,l,u,p,h={PROCESSOR_VERSION:"1.4.61",error:function(t){if("undefined"==typeof Error)throw Error("citeproc-js error: "+t);throw"citeproc-js error: "+t},debug:function(t){"undefined"==typeof console?dump("CSL: "+t+"\n"):console.log("citeproc-js warning: "+t)},toLocaleUpperCase(t){var e=this.tmp.lang_array;try{t=t.toLocaleUpperCase(e)}catch(e){t=t.toUpperCase()}return t},toLocaleLowerCase(t){var e=this.tmp.lang_array;try{t=t.toLocaleLowerCase(e)}catch(e){t=t.toLowerCase()}return t},LOCATOR_LABELS_REGEXP:RegExp("^((vrs|sv|subpara|op|subch|add|amend|annot|app|art|bibliog|bk|ch|cl|col|cmt|dec|dept|div|ex|fig|fld|fol|n|hypo|illus|intro|l|no|p|pp|para|pt|pmbl|princ|pub|r|rn|sched|sec|ser|subdiv|subsec|supp|tbl|tit|vol)\\.)\\s+(.*)"),STATUTE_SUBDIV_PLAIN_REGEX:/(?:(?:^| )(?:vrs|sv|subpara|op|subch|add|amend|annot|app|art|bibliog|bk|ch|cl|col|cmt|dec|dept|div|ex|fig|fld|fol|n|hypo|illus|intro|l|no|p|pp|para|pt|pmbl|princ|pub|r|rn|sched|sec|ser|subdiv|subsec|supp|tbl|tit|vol)\. *)/,STATUTE_SUBDIV_PLAIN_REGEX_FRONT:/(?:^\s*[.,;]*\s*(?:vrs|sv|subpara|op|subch|add|amend|annot|app|art|bibliog|bk|ch|cl|col|cmt|dec|dept|div|ex|fig|fld|fol|n|hypo|illus|intro|l|no|p|pp|para|pt|pmbl|princ|pub|r|rn|sched|sec|ser|subdiv|subsec|supp|tbl|tit|vol)\. *)/,STATUTE_SUBDIV_STRINGS:{"vrs.":"verse","sv.":"sub-verbo","subpara.":"subparagraph","op.":"opus","subch.":"subchapter","add.":"addendum","amend.":"amendment","annot.":"annotation","app.":"appendix","art.":"article","bibliog.":"bibliography","bk.":"book","ch.":"chapter","cl.":"clause","col.":"column","cmt.":"comment","dec.":"decision","dept.":"department","ex.":"example","fig.":"figure","fld.":"field","fol.":"folio","n.":"note","hypo.":"hypothetical","illus.":"illustration","intro.":"introduction","l.":"line","no.":"issue","p.":"page","pp.":"page","para.":"paragraph","pt.":"part","pmbl.":"preamble","princ.":"principle","pub.":"publication","r.":"rule","rn.":"randnummer","sched.":"schedule","sec.":"section","ser.":"series,","subdiv.":"subdivision","subsec.":"subsection","supp.":"supplement","tbl.":"table","tit.":"title","vol.":"volume"},STATUTE_SUBDIV_STRINGS_REVERSE:{verse:"vrs.","sub-verbo":"sv.","sub verbo":"sv.",subparagraph:"subpara.",opus:"op.",subchapter:"subch.",addendum:"add.",amendment:"amend.",annotation:"annot.",appendix:"app.",article:"art.",bibliography:"bibliog.",book:"bk.",chapter:"ch.",clause:"cl.",column:"col.",comment:"cmt.",decision:"dec.",department:"dept.",example:"ex.",figure:"fig.",field:"fld.",folio:"fol.",note:"n.",hypothetical:"hypo.",illustration:"illus.",introduction:"intro.",line:"l.",issue:"no.",page:"p.",paragraph:"para.",part:"pt.",preamble:"pmbl.",principle:"princ.",publication:"pub.",rule:"r.",randnummer:"rn.",schedule:"sched.",section:"sec.","series,":"ser.",subdivision:"subdiv.",subsection:"subsec.",supplement:"supp.",table:"tbl.",title:"tit.",volume:"vol."},LOCATOR_LABELS_MAP:{vrs:"verse",sv:"sub-verbo",subpara:"subparagraph",op:"opus",subch:"subchapter",add:"addendum",amend:"amendment",annot:"annotation",app:"appendix",art:"article",bibliog:"bibliography",bk:"book",ch:"chapter",cl:"clause",col:"column",cmt:"comment",dec:"decision",dept:"department",ex:"example",fig:"figure",fld:"field",fol:"folio",n:"note",hypo:"hypothetical",illus:"illustration",intro:"introduction",l:"line",no:"issue",p:"page",pp:"page",para:"paragraph",pt:"part",pmbl:"preamble",princ:"principle",pub:"publication",r:"rule",rn:"randnummer",sched:"schedule",sec:"section",ser:"series,",subdiv:"subdivision",subsec:"subsection",supp:"supplement",tbl:"table",tit:"title",vol:"volume"},MODULE_MACROS:{"juris-pretitle":!0,"juris-title":!0,"juris-pretitle-short":!0,"juris-title-short":!0,"juris-main":!0,"juris-main-short":!0,"juris-tail":!0,"juris-tail-short":!0,"juris-locator":!0},MODULE_TYPES:{legal_case:!0,legislation:!0,bill:!0,hearing:!0,gazette:!0,report:!0,regulation:!0,standard:!0,patent:!0,locator:!0},checkNestedBrace:function(t){"note"===t.opt.xclass?(this.depth=0,this.update=function(t){for(var t=t||"",e=t.split(/([\(\)])/),i=1,s=e.length;i<s;i+=2)"("===e[i]?(1==this.depth%2&&(e[i]="["),this.depth+=1):")"===e[i]&&(0==this.depth%2&&(e[i]="]"),this.depth-=1);return e.join("")}):this.update=function(t){return t}},MULTI_FIELDS:["event","publisher","publisher-place","event-place","title","container-title","collection-title","authority","genre","t
1itle-short","medium","country","jurisdiction","archive","archive-place"],LangPrefsMap:{title:"titles","title-short":"titles",event:"titles",genre:"titles",medium:"titles","container-title":"journals","collection-title":"titles",archive:"journals",publisher:"publishers",authority:"publishers","publisher-place":"places","event-place":"places","archive-place":"places",jurisdiction:"places",number:"places",edition:"places",issue:"places",volume:"places"},AbbreviationSegments:function(){this["container-title"]={},this["collection-title"]={},this["institution-entire"]={},this["institution-part"]={},this.nickname={},this.number={},this.title={},this.place={},this.hereinafter={},this.classic={},this["container-phrase"]={},this["title-phrase"]={}},getAbbrevsDomain:function(t,e,i){var s=null;if(t.opt.availableAbbrevDomains&&e&&"default"!==e){var r=t.locale[t.opt.lang].opts["jurisdiction-preference"],n=null;if(t.locale[i]&&(n=t.locale[i].opts["jurisdiction-preference"]),n){for(var a=n.length-1;a>-1;a--)if(t.opt.availableAbbrevDomains[e].indexOf(n[a])>-1){s=n[a];break}}if(!s&&r){for(var a=r.length-1;a>-1;a--)if(t.opt.availableAbbrevDomains[e].indexOf(r[a])>-1){s=r[a];break}}}return s},FIELD_CATEGORY_REMAP:{title:"title","container-title":"container-title","collection-title":"collection-title",country:"place",number:"number",place:"place",archive:"container-title","title-short":"title",genre:"title",event:"title",medium:"title","archive-place":"place","publisher-place":"place","event-place":"place",jurisdiction:"place","language-name":"place","language-name-original":"place","call-number":"number","chapter-number":"number","collection-number":"number",edition:"number",page:"number",issue:"number",locator:"number","locator-extra":"number","number-of-pages":"number","number-of-volumes":"number",volume:"number","citation-number":"number",publisher:"institution-part"},parseLocator:function(t){if(this.opt.development_extensions.locator_date_and_revision&&t.locator){t.locator=""+t.locator;var e=t.locator.indexOf("|");if(e>-1){var i=t.locator;t.locator=i.slice(0,e);var s=(i=i.slice(e+1)).match(/^([0-9]{4}-[0-9]{2}-[0-9]{2}).*/);s&&(t["locator-date"]=this.fun.dateparser.parseDateToObject(s[1]),i=i.slice(s[1].length)),t["locator-extra"]=i.replace(/^\s+/,"").replace(/\s+$/,"")}}return t.locator&&(t.locator=(""+t.locator).replace(/\s+$/,"")),t},normalizeLocaleStr:function(t){if(t){var e=t.split("-");return e[0]=e[0].toLowerCase(),e[1]&&(e[1]=e[1].toUpperCase()),e.join("-")}},parseNoteFieldHacks:function(t,e,i){if("string"==typeof t.note){for(var s=[],r=t.note.split("\n"),n=0,a=r.length;n<a;n++){var o=r[n],s=[],l=o.match(h.NOTE_FIELDS_REGEXP);if(l){for(var u=o.split(h.NOTE_FIELDS_REGEXP),p=0,c=u.length-1;p<c;p++)s.push(u[p]),s.push(l[p]);s.push(u[u.length-1]);for(var p=1,c=s.length;p<c&&(!s[p-1].trim()||!(n>0)&&!(p>1)||s[p-1].match(h.NOTE_FIELD_REGEXP));p+=2)s[p]="\n"+s[p].slice(2,-1).trim()+"\n";r[n]=s.join("")}}r=r.join("\n").split("\n");for(var m=0,f={},n=0,a=r.length;n<a;n++){var o=r[n],d=o.match(h.NOTE_FIELD_REGEXP);if(o.trim()){if(!d){if(0===n)continue;m=n;break}var g=d[1],b=d[2].replace(/^\s+/,"").replace(/\s+$/,"");if("type"===g)t.type=b,r[n]="";else if(h.DATE_VARIABLES.indexOf(g.replace(/^alt-/,""))>-1)(!t[g]||i)&&(t[g]=h.DateParser.parseDateToArray(b),(!e||e[g]&&this.isDateString(b))&&(r[n]=""));else if(!t[g]){if(h.NAME_VARIABLES.indexOf(g.replace(/^alt-/,""))>-1){f[g]||(f[g]=[]);var _=b.split(/\s*\|\|\s*/);if(1===_.length)f[g].push({literal:_[0]});else if(2===_.length){var v={family:_[0],given:_[1]};h.parseParticles(v),f[g].push(v)}}else t[g]=b;(!e||e[g])&&(r[n]="")}}}for(var g in f)t[g]=f[g];if(e){r[m].trim()&&(r[m]="\n"+r[m]);for(var n=m-1;n>-1;n--)r[n].trim()||(r=r.slice(0,n).concat(r.slice(n+1)))}t.note=r.join("\n").trim()}},checkPrefixSpaceAppend:function(t,e){e||(e="");var i="",s=e.replace(/<[^>]+>/g,"").replace(/["'\u201d\u2019\u00bb\u202f\u00a0 ]+$/g,""),r=s.slice(-1);s.match(h.ENDSWITH_ROMANESQUE_REGEXP)?i=" ":h.TERMINAL_PUNCTUATION.slice(0,-1).indexOf(r)>-1?i=" ":r.match(/[\)\],0-9]/)&&(i=" ");var e=(e+i).replace(/\s+/g," ");return e},checkIgnorePredecessor:function(t,e){var i=e.replace(/<[^>]+>/g,"").replace(/["'\u201d\u2019\u00bb\u202f\u00a0 ]+$/g,"").slice(-1);return!!(h.TERMINAL_PUNCTUATION.slice(0,-1).indexOf(i)>-1&&e.trim().indexOf(" ")>-1)&&(t.tmp.term_predecessor=!1,!0)},checkSuffixSpacePrepend:function(t,e){return e?((e.match(h.STARTSWITH_ROMANESQUE_REGEXP)||["[","("].indexOf(e.slice(0,1))>-1)&&(e=" "+e),e):""},GENDERS:["masculine","feminine"],ERROR_NO_RENDERED_FORM:1,PREVIEW:"Just for laughs.",ASSUME_ALL_ITEMS_REGIST
vendor: 5,208 bytes, line 1
1ERED:2,START:0,END:1,SINGLETON:2,SEEN:6,SUCCESSOR:3,SUCCESSOR_OF_SUCCESSOR:4,SUPPRESS:5,SINGULAR:0,PLURAL:1,LITERAL:!0,BEFORE:1,AFTER:2,DESCENDING:1,ASCENDING:2,PRIMARY:1,SECONDARY:2,POSITION_FIRST:0,POSITION_SUBSEQUENT:1,POSITION_IBID:2,POSITION_IBID_WITH_LOCATOR:3,POSITION_CONTAINER_SUBSEQUENT:4,POSITION_MAP:{0:0,4:1,1:2,2:3,3:4},POSITION_TEST_VARS:["position","first-reference-note-number","near-note"],AREAS:["citation","citation_sort","bibliography","bibliography_sort","intext"],CITE_FIELDS:["first-reference-note-number","first-container-reference-note-number","locator","locator-extra"],SWAPPING_PUNCTUATION:[".","!","?",":",","],TERMINAL_PUNCTUATION:[":",".",";","!","?"," "],NONE:0,NUMERIC:1,POSITION:2,TRIGRAPH:3,DATE_PARTS:["year","month","day"],DATE_PARTS_ALL:["year","month","day","season"],DATE_PARTS_INTERNAL:["year","month","day","year_end","month_end","day_end"],NAME_PARTS:["non-dropping-particle","family","given","dropping-particle","suffix","literal"],DISAMBIGUATE_OPTIONS:["disambiguate-add-names","disambiguate-add-givenname","disambiguate-add-year-suffix"],GIVENNAME_DISAMBIGUATION_RULES:["all-names","all-names-with-initials","primary-name","primary-name-with-initials","by-cite"],NAME_ATTRIBUTES:["and","delimiter-precedes-last","delimiter-precedes-et-al","initialize-with","initialize","name-as-sort-order","sort-separator","et-al-min","et-al-use-first","et-al-subsequent-min","et-al-subsequent-use-first","form","prefix","suffix","delimiter"],LOOSE:0,STRICT:1,TOLERANT:2,PREFIX_PUNCTUATION:/[.;:]\s*$/,SUFFIX_PUNCTUATION:/^\s*[.;:,\(\)]/,NUMBER_REGEXP:/(?:^\d+|\d+$)/,NAME_INITIAL_REGEXP:/^([A-Z\u0e01-\u0e5b\u00c0-\u017f\u0400-\u042f\u0590-\u05d4\u05d6-\u05ff\u0600-\u06ff\u0370\u0372\u0376\u0386\u0388-\u03ab\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03fd-\u03ff])([a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0400-\u052f\u0600-\u06ff\u0370-\u03ff\u1f00-\u1fff]*|)(\.)*/,ROMANESQUE_REGEXP:/[-0-9a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0370-\u03ff\u0400-\u052f\u0590-\u05d4\u05d6-\u05ff\u1f00-\u1fff\u0600-\u06ff\u200c\u200d\u200e\u0218\u0219\u021a\u021b\u202a-\u202e]/,ROMANESQUE_NOT_REGEXP:/[^a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0370-\u03ff\u0400-\u052f\u0590-\u05d4\u05d6-\u05ff\u1f00-\u1fff\u0600-\u06ff\u200c\u200d\u200e\u0218\u0219\u021a\u021b\u202a-\u202e]/g,STARTSWITH_ROMANESQUE_REGEXP:/^[&a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0370-\u03ff\u0400-\u052f\u0590-\u05d4\u05d6-\u05ff\u1f00-\u1fff\u0600-\u06ff\u200c\u200d\u200e\u0218\u0219\u021a\u021b\u202a-\u202e]/,ENDSWITH_ROMANESQUE_REGEXP:/[.;:&a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0370-\u03ff\u0400-\u052f\u0590-\u05d4\u05d6-\u05ff\u1f00-\u1fff\u0600-\u06ff\u200c\u200d\u200e\u0218\u0219\u021a\u021b\u202a-\u202e]$/,ALL_ROMANESQUE_REGEXP:/^[a-zA-Z\u0e01-\u0e5b\u00c0-\u017f\u0370-\u03ff\u0400-\u052f\u0590-\u05d4\u05d6-\u05ff\u1f00-\u1fff\u0600-\u06ff\u200c\u200d\u200e\u0218\u0219\u021a\u021b\u202a-\u202e]+$/,VIETNAMESE_SPECIALS:/[\u00c0-\u00c3\u00c8-\u00ca\u00cc\u00cd\u00d2-\u00d5\u00d9\u00da\u00dd\u00e0-\u00e3\u00e8-\u00ea\u00ec\u00ed\u00f2-\u00f5\u00f9\u00fa\u00fd\u0101\u0103\u0110\u0111\u0128\u0129\u0168\u0169\u01a0\u01a1\u01af\u01b0\u1ea0-\u1ef9]/,VIETNAMESE_NAMES:/^(?:(?:[.AaBbCcDdEeGgHhIiKkLlMmNnOoPpQqRrSsTtUuVvXxYy \u00c0-\u00c3\u00c8-\u00ca\u00cc\u00cd\u00d2-\u00d5\u00d9\u00da\u00dd\u00e0-\u00e3\u00e8-\u00ea\u00ec\u00ed\u00f2-\u00f5\u00f9\u00fa\u00fd\u0101\u0103\u0110\u0111\u0128\u0129\u0168\u0169\u01a0\u01a1\u01af\u01b0\u1ea0-\u1ef9]{2,6})(\s+|$))+$/,NOTE_FIELDS_REGEXP:/\{:(?:[\-_a-z]+|[A-Z]+):[^\}]+\}/g,NOTE_FIELD_REGEXP:/^([\-_a-z]+|[A-Z]+):\s*([^\}]+)$/,PARTICLE_GIVEN_REGEXP:/^([^ ]+(?:\u02bb |\u2019 | |\' ) *)(.+)$/,PARTICLE_FAMILY_REGEXP:/^([^ ]+(?:\-|\u02bb|\u2019| |\') *)(.+)$/,DISPLAY_CLASSES:["block","left-margin","right-inline","indent"],NAME_VARIABLES:["author","chair","collection-editor","compiler","composer","container-author","contributor","curator","director","editor","editor-translator","editorial-director","executive-producer","guest","host","illustrator","interviewer","narrator","organizer","original-author","performer","producer","recipient","reviewed-author","script-writer","series-creator","translator","commenter"],CREATORS:["author","chair","collection-editor","compiler","composer","container-author","contributor","curator","director","editor","editor-translator","editorial-director","executive-producer","guest","host","illustrator","interviewer","narrator","organizer","original-author","performer","producer","recipient","reviewed-author","script-writer","series-creator","translator","commenter"],NUMERIC_VARIABLES:["call-number","chapter-number","collection-number","division","edition","page","issue","locator","locator-extra","number","number-of-pages","number-of-volumes","part-number","printing-number","section","supplement-number","version","volume","supplement","citation-number"],DATE_VARIABLES:["locator-date","issued","event-date","accessed","original-date","publication-date","available-date","submitted","alt-issued","alt-event"],VARIABLES_WITH_SHORT_FORM:["title","container-title"],TITLE_FIELD_SPLITS:function(t){for(var e=["title","short","main","sub","subjoin"],i={},s=0,r=e.length;s<r;s++)i[e[s]]=t+"title"+("title"===e[s]?"":"-"+e[s]);return i}
1,demoteNoiseWords:function(t,e,i){var s=t.locale[t.opt.lang].opts["leading-noise-words"];if(e&&i){(e=e.split(/\s+/)).reverse();for(var r=[],n=e.length-1;n>-1;n+=-1)if(s.indexOf(e[n].toLowerCase())>-1)r.push(e.pop());else break;e.reverse();var a=e.join(" "),o=r.join(" ");"drop"!==i&&o?"demote"===i&&(e=[a,o].join(", ")):e=a}return e},extractTitleAndSubtitle:function(t,e){var i=e?"â¯":"",s=[""];this.opt.development_extensions.split_container_title&&s.push("container-");for(var r=0,n=s.length;r<n;r++){var a=s[r],o=h.TITLE_FIELD_SPLITS(a),l=[!1];if(t.multi)for(var u in t.multi._keys[o.short])l.push(u);for(var p=0,c=l.length;p<c;p++){var u=l[p],m={};u?(t.multi._keys[o.title]&&(m[o.title]=t.multi._keys[o.title][u]),t.multi._keys[o.short]&&(m[o.short]=t.multi._keys[o.short][u])):(m[o.title]=t[o.title],m[o.short]=t[o.short]),m[o.main]=m[o.title],m[o.sub]=!1;var f=m[o.short];if(m[o.title]){if(f&&f.toLowerCase()===m[o.title].toLowerCase())m[o.main]=m[o.title],m[o.subjoin]="",m[o.sub]="";else if(f){var d=m[o.title].slice(f.replace(/[\?\!]+$/,"").length),g=m[o.title].replace(d.replace(/^[\?\!]+/,""),"").trim(),b=h.TITLE_SPLIT_REGEXP.matchfirst.exec(d);if(b&&g.toLowerCase()===f.toLowerCase())m[o.main]=g,m[o.subjoin]=b[1].replace(/[\?\!]+(\s*)$/,"$1"),m[o.sub]=d.replace(h.TITLE_SPLIT_REGEXP.matchfirst,""),this.opt.development_extensions.force_short_title_casing_alignment&&(m[o.short]=m[o.main]);else{var _=h.TITLE_SPLIT(m[o.title]);3==_.length?(m[o.main]=_[0],m[o.subjoin]=_[1],m[o.sub]=_[2]):(m[o.main]=m[o.title],m[o.subjoin]="",m[o.sub]="")}}else{var _=h.TITLE_SPLIT(m[o.title]);if(3==_.length){if(m[o.main]=_[0],m[o.subjoin]=_[1],m[o.sub]=_[2],this.opt.development_extensions.implicit_short_title&&"legal_case"!==t.type&&!t[o.short]&&!m[o.main].match(/^[\-\.[0-9]+$/)){var v=m[o.subjoin].trim();-1===["?","!"].indexOf(v)&&(v=""),m[o.short]=m[o.main]+v}}else m[o.main]=m[o.title],m[o.subjoin]="",m[o.sub]=""}if(m[o.subjoin]&&m[o.subjoin].match(/([\?\!])/)){var b=m[o.subjoin].match(/(\s*)$/);m[o.main]=m[o.main]+i+m[o.subjoin].trim(),m[o.subjoin]=b[1]}}if(m[o.subjoin]&&(m[o.subjoin].indexOf(":")>-1&&(m[o.subjoin]=i+": "),(m[o.subjoin].indexOf("-")>-1||m[o.subjoin].indexOf("â")>-1)&&(m[o.subjoin]="â")),u)for(var y in m)t.multi._keys[y]||(t.multi._keys[y]={}),t.multi._keys[y][u]=m[y];else for(var y in m)t[y]=m[y]}}},titlecaseSentenceOrNormal:function(t,e,i,s,r){var n=h.TITLE_FIELD_SPLITS(i),a={};if(s&&e.multi?(e.multi._keys[n.title]&&(a[n.title]=e.multi._keys[n.title][s]),e.multi._keys[n.main]&&(a[n.main]=e.multi._keys[n.main][s]),e.multi._keys[n.sub]&&(a[n.sub]=e.multi._keys[n.sub][s]),e.multi._keys[n.subjoin]&&(a[n.subjoin]=e.multi._keys[n.subjoin][s])):(a[n.title]=e[n.title],a[n.main]=e[n.main],a[n.sub]=e[n.sub],a[n.subjoin]=e[n.subjoin]),a[n.main]&&a[n.sub]){var o=a[n.main],l=a[n.subjoin],u=a[n.sub];return r?(o=h.Output.Formatters.sentence(t,o),u=h.Output.Formatters.sentence(t,u)):t.opt.development_extensions.uppercase_subtitles&&(u=h.Output.Formatters["capitalize-first"](t,u)),[o,l,u].join("")}if(!a[n.title])return"";if(r)return h.Output.Formatters.sentence(t,a[n.title]);if(!t.opt.development_extensions.uppercase_subtitles)return a[n.title];for(var p=h.TITLE_SPLIT(a[n.title]),c=0,m=p.length;c<m;c+=2)p[c]=h.Output.Formatters["capitalize-first"](t,p[c]);for(var c=1,m=p.length-1;c<m;c+=2){var f=p[c].match(/([:\?\!] )/);if(f){var d="fr"===t.opt["default-locale"][0].slice(0,2).toLowerCase()?"â¯":"";p[c]=d+f[1]}(p[c].indexOf("-")>-1||p[c].indexOf("â")>-1)&&(p[c]="â")}return a[n.title]=p.join(""),a[n.title]},getSafeEscape:function(t){if(!(["bibliography","citation"].indexOf(t.tmp.area)>-1))return function(t){return t};var e=[];return(t.opt.development_extensions.thin_non_breaking_space_html_hack&&"html"===t.opt.mode&&e.push(function(t){return t.replace(/\u202f/g,'<span style="white-space:nowrap"> </span>')}),e.length)?function(i){for(var s=0,r=e.length;s<r;s+=1)i=e[s](i);return h.Output.Formats[t.opt.mode].text_escape(i)}:h.Output.Formats[t.opt.mode].text_escape},SKIP_WORDS:["about","above","across","afore","after","against","al","along","alongside","amid","am
1idst","among","amongst","anenst","apropos","apud","around","as","aside","astride","at","athwart","atop","barring","before","behind","below","beneath","beside","besides","between","beyond","but","by","circa","despite","down","during","et","except","for","forenenst","from","given","in","inside","into","lest","like","modulo","near","next","notwithstanding","of","off","on","onto","out","over","per","plus","pro","qua","sans","since","than","through"," thru","throughout","thruout","till","to","toward","towards","under","underneath","until","unto","up","upon","versus","vs.","v.","vs","v","via","vis-\xe0-vis","with","within","without","according to","ahead of","apart from","as for","as of","as per","as regards","aside from","back to","because of","close to","due to","except for","far from","inside of","instead of","near to","next to","on to","out from","out of","outside of","prior to","pursuant to","rather than","regardless of","such as","that of","up to","where as","or","yet","so","for","and","nor","a","an","the","de","d'","von","van","c","ca"],FORMAT_KEY_SEQUENCE:["@strip-periods","@font-style","@font-variant","@font-weight","@text-decoration","@vertical-align","@quotes"],INSTITUTION_KEYS:["font-style","font-variant","font-weight","text-decoration","text-case"],SUFFIX_CHARS:"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z",ROMAN_NUMERALS:[["","i","ii","iii","iv","v","vi","vii","viii","ix"],["","x","xx","xxx","xl","l","lx","lxx","lxxx","xc"],["","c","cc","ccc","cd","d","dc","dcc","dccc","cm"],["","m","mm","mmm","mmmm","mmmmm"]],LANGS:{"af-ZA":"Afrikaans",ar:"Arabic","bg-BG":"Bulgarian","ca-AD":"Catalan","cs-CZ":"Czech","da-DK":"Danish","de-AT":"Austrian","de-CH":"German (CH)","de-DE":"German (DE)","el-GR":"Greek","en-GB":"English (GB)","en-US":"English (US)","es-ES":"Spanish","et-EE":"Estonian",eu:"European","fa-IR":"Persian","fi-FI":"Finnish","fr-CA":"French (CA)","fr-FR":"French (FR)","he-IL":"Hebrew","hr-HR":"Croatian","hu-HU":"Hungarian","is-IS":"Icelandic","it-IT":"Italian","ja-JP":"Japanese","km-KH":"Khmer","ko-KR":"Korean","lt-LT":"Lithuanian","lv-LV":"Latvian","mn-MN":"Mongolian","nb-NO":"Norwegian (Bokm\xe5l)","nl-NL":"Dutch","nn-NO":"Norwegian (Nynorsk)","pl-PL":"Polish","pt-BR":"Portuguese (BR)","pt-PT":"Portuguese (PT)","ro-RO":"Romanian","ru-RU":"Russian","sk-SK":"Slovak","sl-SI":"Slovenian","sr-RS":"Serbian","sv-SE":"Swedish","th-TH":"Thai","tr-TR":"Turkish","uk-UA":"Ukrainian","vi-VN":"Vietnamese","zh-CN":"Chinese (CN)","zh-TW":"Chinese (TW)"},LANG_BASES:{af:"af_ZA",ar:"ar",bg:"bg_BG",ca:"ca_AD",cs:"cs_CZ",da:"da_DK",de:"de_DE",el:"el_GR",en:"en_US",es:"es_ES",et:"et_EE",eu:"eu",fa:"fa_IR",fi:"fi_FI",fr:"fr_FR",he:"he_IL",hr:"hr-HR",hu:"hu_HU",is:"is_IS",it:"it_IT",ja:"ja_JP",km:"km_KH",ko:"ko_KR",lt:"lt_LT",lv:"lv-LV",mn:"mn_MN",nb:"nb_NO",nl:"nl_NL",nn:"nn-NO",pl:"pl_PL",pt:"pt_PT",ro:"ro_RO",ru:"ru_RU",sk:"sk_SK",sl:"sl_SI",sr:"sr_RS",sv:"sv_SE",th:"th_TH",tr:"tr_TR",uk:"uk_UA",vi:"vi_VN",zh:"zh_CN"},SUPERSCRIPTS:{ª:"a","\xb2":"2","\xb3":"3","\xb9":"1",º:"o",ʰ:"h",ʱ:"ɦ",ʲ:"j",ʳ:"r",Ê´:"ɹ",ʵ:"É»",ʶ:"Ê",Ê·:"w",ʸ:"y",Ë :"É£",Ë¡:"l",Ë¢:"s",Ë£:"x",ˤ:"Ê",á´¬:"A",á´:"\xc6",á´®:"B",á´°:"D",á´±:"E",á´²:"Æ",á´³:"G",á´´:"H",á´µ:"I",á´¶:"J",á´·:"K",á´¸:"L",á´¹:"M",á´º:"N",á´¼:"O",á´½:"È¢",á´¾:"P",á´¿:"R",áµ:"T",áµ:"U",áµ:"W",áµ:"a",áµ:"É",áµ
:"É",áµ:"á´",áµ:"b",áµ:"d",áµ:"e",áµ:"É",áµ:"É",áµ:"É",áµ:"g",áµ:"k",áµ:"m",áµ:"Å",áµ:"o",áµ:"É",áµ:"á´",áµ:"á´",áµ:"p",áµ:"t",áµ:"u",áµ:"á´",áµ:"ɯ",áµ:"v",áµ:"á´¥",áµ:"β",áµ:"γ",áµ:"δ",áµ :"Ï",ᵡ:"Ï","â°":"0",â±:"i","â´":"4","âµ":"5","â¶":"6","â·":"7","â¸":"8","â¹":"9","âº":"+","â»":"â","â¼":"=","â½":"(","â¾":")",â¿:"n","â ":"SM","â¢":"TM","ã":"ä¸","ã":"äº","ã":"ä¸","ã":"å","ã":"ä¸","ã":"ä¸","ã":"ä¸","ã":"ç²","ã":"ä¹","ã":"ä¸","ã":"ä¸","ã":"天","ã":"å°","ã":"人",Ë:"Ê",Ë:"Ê",Û¥:"Ù",Û¦:"Ù"},SUPERSCRIPTS_REGEXP:RegExp("[\xaa\xb2\xb3\xb9\xbaÊ°Ê±Ê²Ê³Ê´ÊµÊ¶Ê·Ê¸Ë Ë¡Ë¢Ë£Ë¤á´¬á´á´®á´°á´±á´²á´³á´´á´µá´¶á´·á´¸á´¹á´ºá´¼á´½á´¾á´¿áµáµáµáµáµáµ
áµáµáµáµáµáµáµáµáµáµáµáµáµáµáµáµáµáµáµáµáµáµ
1áµáµáµáµ ᵡâ°â±â´âµâ¶â·â¸â¹âºâ»â¼â½â¾â¿â â¢ããããããããããããããËËÛ¥Û¦]","g"),UPDATE_GROUP_CONTEXT_CONDITION:function(t,e,i,s,r){if(t.opt.use_context_condition){var n=t.tmp.group_context.tip;n.condition?(n.condition.termtxt||(n.condition.termtxt=e,n.condition.valueTerm=i),n.value_seen||"comma-safe-numbers-only"!==n.condition.test||!r||(n.value_seen=!0,r.match(/^[0-9]/)||(t.tmp.just_did_number=!1))):s&&s.decorations.filter(t=>"@vertical-align"===t[0]).length>0?t.tmp.just_did_number=!1:s&&s.strings.suffix?t.tmp.just_did_number=!1:e&&(e.match(/[0-9]$/)?t.tmp.just_did_number=!0:t.tmp.just_did_number=!1)}},EVALUATE_GROUP_CONDITION:function(t,e){if(t.opt.use_context_condition){var i,s="comma-safe-numbers-only"===e.condition.test;if("empty-label"===e.condition.test)i=!e.condition.termtxt;else if("empty-label-no-decor"===e.condition.test)i=!e.condition.termtxt||e.condition.termtxt.indexOf("%s")>-1;else if(["comma-safe","comma-safe-numbers-only"].indexOf(e.condition.test)>-1){var r=e.condition.termtxt,n=!1;e.condition.termtxt&&(n=e.condition.termtxt.slice(0,1).match(h.ALL_ROMANESQUE_REGEXP)),i=t.tmp.just_did_number?e.condition.valueTerm?!s:!r||(n?!s:["always","after-number"].indexOf(t.opt.require_comma_on_symbol)>-1):!e.condition.valueTerm&&!!r&&(n?!s:"always"===t.opt.require_comma_on_symbol)}if(i)var a=!1;else var a=!0;return e.condition.not&&(a=!a),a}},SYS_OPTIONS:["prioritize_disambiguate_condition","csl_reverse_lookup_support","main_title_from_short_title","uppercase_subtitles","force_short_title_casing_alignment","implicit_short_title","split_container_title"],TITLE_SPLIT_REGEXP:{match:RegExp("("+(e=["\\.\\s+","\\!\\s+","\\?\\s+","\\s*::*\\s+","\\s*â\\s*","\\s+\\-\\s+","\\s*\\-\\-\\-*\\s*"]).join("|")+")","g"),matchfirst:RegExp("^("+e.join("|")+")"),split:RegExp("(?:"+e.join("|")+")")},TITLE_SPLIT:function(t){if(!t)return t;for(var e=t.match(h.TITLE_SPLIT_REGEXP.match),i=t.split(h.TITLE_SPLIT_REGEXP.split),s=i.length-2;s>-1;s--)i[s]=i[s].trim(),i[s]&&i[s].slice(-1).toLowerCase()!==i[s].slice(-1)?(i[s]=i[s]+e[s]+i[s+1],i=i.slice(0,s+1).concat(i.slice(s+2))):i=i.slice(0,s+1).concat([e[s]]).concat(i.slice(s+1));return i},GET_COURT_CLASS:function(t,e,i){var s="",r=null,n=e.jurisdiction?e.jurisdiction.split(":")[0]:null,a="court_condition_classes";return i&&(a="court_key_classes"),n&&e.authority&&("string"==typeof e.authority?r=e.authority:e.authority[0]&&e.authority[0].literal&&(r=e.authority[0].literal)),r&&(this.lang&&t.locale[this.lang].opts[a]&&t.locale[this.lang].opts[a][n]&&t.locale[this.lang].opts[a][n][r]?s=t.locale[this.lang].opts[a][n][r]:t.locale[t.opt["default-locale"][0]].opts[a]&&t.locale[t.opt["default-locale"][0]].opts[a][n]&&t.locale[t.opt["default-locale"][0]].opts[a][n][r]&&(s=t.locale[t.opt["default-locale"][0]].opts[a][n][r])),s},SET_COURT_CLASSES:function(t,e,i,s){for(var r=i.getNodesByName(s,"court-class"),n=0,a=i.numberofnodes(r);n<a;n+=1){var o=r[n],l=i.attributes(o),u=l["@name"],p=l["@country"],h=l["@courts"],c="court_key_classes";if(t.registry&&(c="court_condition_classes"),u&&p&&h){h=h.trim().split(/\s+/),t.locale[e].opts[c]||(t.locale[e].opts[c]={}),t.locale[e].opts[c][p]||(t.locale[e].opts[c][p]={});for(var m=0,f=h.length;m<f;m++)t.locale[e].opts[c][p][h[m]]=u}}},INIT_JURISDICTION_MACROS:function(t,e,i,s){if(e["best-jurisdiction"])return!0;if(!t.sys.retrieveStyleModule||!h.MODULE_MACROS[s]||!e.jurisdiction)return!1;var r=t.getJurisdictionList(e.jurisdiction);if(!t.opt.jurisdictions_seen[r[0]]){var n=t.retrieveAllStyleModules(r);for(var a in n){var o=t.loadStyleModule(a,n[a]);o&&!n[o]&&(Object.assign(n,t.retrieveAllStyleModules([o])),t.loadStyleModule(o,n[o],!0))}}var r=t.getJurisdictionList(e.jurisdiction);t.opt.parallel.enable&&!t.parallel&&(t.parallel=new h.Parallel(t));for(var l=0,u=r.length;l<u;l++){var a=r[l];if(i&&t.juris[a]&&!i["best-jurisdiction"]&&t.juris[a].types.locator&&(e["best-jurisdiction"]=a),t.juris[a]&&t.juris[a].types[e.type])return e["best-jurisdiction"]=a,!0}return!1}};h.XmlJSON=function(t){this.dataObj=t,this.institution={name:"institution",attrs:{"institution-parts":"long",delimiter:", "},children:[{name:"institution-part",attrs:{name:"long"},children:[]}]}},h.XmlJSON.prototype.clean=function(t){return t},h.XmlJSON.prototype.getStyleId=function(t,e){var i="id";e&&(i="title");for(var s="",r=t.children,n=0,a=r.length;n<a;n++)if("info"===r[n].name)for(var o=r[n].children,l=0,u=o.length;l<u;l++)o[l].name===i&&(s=o[l].children[0]);return s},h.XmlJSON.prototype.children=function(t){return!!t&&!!t.children.length&&t.children.slice()},h.XmlJSON.prototype.nodename=function(t){return t?t.name:null},h.XmlJSON.prototype.attributes=function(t){var e={};for(var i in t.attrs)e["@"+i]=t.attrs[i];return e},h.XmlJSON.prototype.content=function(t){var e="";if(!t||!t.children)return e;for(var i=0,s=t.children.length;i<s;i+=1)"string"==typeof t.children[i]&&(e+=t.children[i]);return e},h.XmlJSON.prototype.namespace={},h.XmlJSON.prototype.numberofnodes=function(t){return t&&"number"==typeof t.length?t.length:0}
1,h.XmlJSON.prototype.getAttributeValue=function(t,e,i){var s="";return i&&(e=i+":"+e),t&&t.attrs&&(s=t.attrs[e]?t.attrs[e]:""),s},h.XmlJSON.prototype.getNodeValue=function(t,e){var i="";if(e)for(var s=0,r=t.children.length;s<r;s+=1)t.children[s].name===e&&(i=t.children[s].children.length?t.children[s]:"");else t&&(i=t);return i&&i.children&&1==i.children.length&&"string"==typeof i.children[0]&&(i=i.children[0]),i},h.XmlJSON.prototype.setAttributeOnNodeIdentifiedByNameAttribute=function(t,e,i,s,r){"@"===s.slice(0,1)&&(s=s.slice(1));for(var n=0,a=t.children.length;n<a;n+=1)t.children[n].name===e&&t.children[n].attrs.name===i&&(t.children[n].attrs[s]=r)},h.XmlJSON.prototype.deleteNodeByNameAttribute=function(t,e){var i,s;for(i=0,s=t.children.length;i<s;i+=1)t.children[i]&&"string"!=typeof t.children[i]&&t.children[i].attrs.name==e&&(t.children=t.children.slice(0,i).concat(t.children.slice(i+1)))},h.XmlJSON.prototype.deleteAttribute=function(t,e){void 0!==t.attrs[e]&&t.attrs.pop(e)},h.XmlJSON.prototype.setAttribute=function(t,e,i){return t.attrs[e]=i,!1},h.XmlJSON.prototype.nodeCopy=function(t,e){if(!e)var e={};if("object"==typeof e&&void 0===e.length)for(var i in t)"string"==typeof t[i]?e[i]=t[i]:"object"==typeof t[i]&&(void 0===t[i].length?e[i]=this.nodeCopy(t[i],{}):e[i]=this.nodeCopy(t[i],[]));else for(var s=0,r=t.length;s<r;s+=1)"string"==typeof t[s]?e[s]=t[s]:e[s]=this.nodeCopy(t[s],{});return e},h.XmlJSON.prototype.getNodesByName=function(t,e,i,s){if(!s)var s=[];if(!t||!t.children)return s;e===t.name&&(i?i===t.attrs.name&&s.push(t):s.push(t));for(var r=0,n=t.children.length;r<n;r+=1)"object"==typeof t.children[r]&&this.getNodesByName(t.children[r],e,i,s);return s},h.XmlJSON.prototype.nodeNameIs=function(t,e){return void 0!==t&&e==t.name},h.XmlJSON.prototype.makeXml=function(t){return"string"==typeof t&&(t="<"===t.slice(0,1)?this.jsonStringWalker.walkToObject(t):JSON.parse(t)),t},h.XmlJSON.prototype.insertChildNodeAfter=function(t,e,i,s){for(var r=0,n=t.children.length;r<n;r+=1)if(e===t.children[r]){t.children=t.children.slice(0,r).concat([s]).concat(t.children.slice(r+1));break}return t},h.XmlJSON.prototype.insertPublisherAndPlace=function(t){if("group"===t.name){for(var e=!0,i=["publisher","publisher-place"],s=0,r=t.children.length;s<r;s+=1){var n=i.indexOf(t.children[s].attrs.variable);if("text"!==t.children[s].name||!(n>-1)||t.children[s].attrs.prefix||t.children[s].attrs.suffix){e=!1;break}i=i.slice(0,n).concat(i.slice(n+1))}e&&!i.length&&(t.attrs["has-publisher-and-publisher-place"]=!0)}for(var s=0,r=t.children.length;s<r;s+=1)"object"==typeof t.children[s]&&this.insertPublisherAndPlace(t.children[s])},h.XmlJSON.prototype.isChildOfSubstitute=function(t){if(t.length>0){var e=t.slice();return"substitute"===e.pop()||this.isChildOfSubstitute(e)}return!1},h.XmlJSON.prototype.addMissingNameNodes=function(t,e){if(e||(e=[]),"names"===t.name&&!this.isChildOfSubstitute(e)){for(var i=!0,s=0,r=t.children.length;s<r;s++)if("name"===t.children[s].name){i=!1;break}i&&(t.children=[{name:"name",attrs:{},children:[]}].concat(t.children))}e.push(t.name);for(var s=0,r=t.children.length;s<r;s+=1)"object"==typeof t.children[s]&&this.addMissingNameNodes(t.children[s],e);e.pop()},h.XmlJSON.prototype.addInstitutionNodes=function(t){var e;if("names"===t.name){for(var i={},s=-1,r=0,n=t.children.length;r<n;r+=1){if("name"==t.children[r].name){for(var a in t.children[r].attrs)i[a]=t.children[r].attrs[a];i.delimiter=t.children[r].attrs.delimiter,i.and=t.children[r].attrs.and,s=r;for(var o=0,l=t.children[r].children.length;o<l;o+=1)if("family"===t.children[r].children[o].attrs.name)for(var a in t.children[r].children[o].attrs)i[a]=t.children[r].children[o].attrs[a]}if("institution"==t.children[r].name){s=-1;break}}if(s>-1){for(var e=this.nodeCopy(this.institution),r=0,n=h.INSTITUTION_KEYS.length;r<n;r+=1){var u=h.INSTITUTION_KEYS[r];void 0!==i[u]&&(e.children[0].attrs[u]=i[u]),i.delimiter&&(e.attrs.delimiter=i.delimiter),i.and&&(e.attrs.and=i.and)}t.children=t.children.slice(0,s+1).concat([e]).concat(t.children.slice(s+1))}}for(var r=0,n=t.children.length;r<n;r+=1)"string"!=typeof t.children[r]&&this.addInstitutionNodes(t.children[r])}
1,h.XmlJSON.prototype.flagDateMacros=function(t){for(var e=0,i=t.children.length;e<i;e+=1)"macro"===t.children[e].name&&this.inspectDateMacros(t.children[e])&&(t.children[e].attrs["macro-has-date"]="true")},h.XmlJSON.prototype.inspectDateMacros=function(t){if(!t||!t.children)return!1;if("date"===t.name)return!0;for(var e=0,i=t.children.length;e<i;e+=1)if(this.inspectDateMacros(t.children[e]))return!0;return!1},h.stripXmlProcessingInstruction=function(t){return t?t=(t=(t=(t=t.replace(/^<\?[^?]+\?>/,"")).replace(/<!--[^>]+-->/g,"")).replace(/^\s+/g,"")).replace(/\s+$/g,""):t},h.parseXml=function(t){var e=[[]];function i(t){return t.split("&").join("&").split(""").join('"').split(">").join(">").split("<").join("<").replace(/&#([0-9]{1,6});/gi,function(t,e){return String.fromCharCode(parseInt(e,10))}).replace(/&#x([a-f0-9]{1,6});/gi,function(t,e){return String.fromCharCode(parseInt(e,16))})}function s(t){var e=RegExp("^<([^ />]+)"),i=t.match(e);return i?i[1]:null}function r(t){var e={};e.name=s(t),e.attrs={};var r=function(t){var e=t.match(/([^\'\"= ]+)=(?:\"[^\"]*\"|\'[^\']*\')/g);if(e)for(var i=0,s=e.length;i<s;i++)e[i]=e[i].replace(/=.*/,"");return e}(t);if(r)for(var n=0,a=r.length;n<a;n++){var o={name:r[n],value:function(t,e){var i=RegExp("^.*[ ]+"+e+"=(\"(?:[^\"]*)\"|'(?:[^']*)').*$"),s=t.match(i);return s?s[1].slice(1,-1):null}(t,r[n])};e.attrs[o.name]=i(o.value)}return e.children=[],e}function n(t){e.slice(-1)[0].push(t)}for(var a=function(t){for(var e=(t=t.split(/(?:\r\n|\n|\r)/).join(" ").replace(/>[ ]+</g,"><").replace(/<\!--.*?-->/g,"")).split("><"),i=null,s=0,r=e.length;s<r;s++)s>0&&(e[s]="<"+e[s]),s<e.length-1&&(e[s]=e[s]+">"),"number"!=typeof i&&("<style "===e[s].slice(0,7)||"<locale "==e[s].slice(0,8))&&(i=s);e=e.slice(i);for(var s=e.length-2;s>-1;s--)if(-1===e[s].slice(1).indexOf("<")){var n=e[s].slice(0,5);"/>"!==e[s].slice(-2)&&("<term"===n?"</term"===e[s+1].slice(0,6)&&(e[s]=e[s]+e[s+1],e=e.slice(0,s+1).concat(e.slice(s+2))):["<sing","<mult"].indexOf(n)>-1&&"/>"!==e[s].slice(-2)&&"<"===e[s+1].slice(0,1)&&(e[s]=e[s]+e[s+1],e=e.slice(0,s+1).concat(e.slice(s+2))))}return e}(t),o=0,l=a.length;o<l;o++)!function(t){var a,o;t.slice(1).indexOf("<")>-1?((a=r(t.slice(0,t.indexOf(">")+1))).children=[i(t.match(/^.*>([^<]*)<.*$/)[1])],n(a)):"/>"===t.slice(-2)?(a=r(t),"term"===s(t)&&a.children.push(""),n(a)):"</"===t.slice(0,2)?e.pop():(n(a=r(t)),o=a,e.push(o.children))}(a[o]);return[][0]},h.XmlDOM=function(t){this.dataObj=t,"undefined"==typeof DOMParser?((DOMParser=function(){}).prototype.parseFromString=function(t,e){if("undefined"!=typeof ActiveXObject){var i=new ActiveXObject("MSXML.DomDocument");return i.async=!1,i.loadXML(t),i}if("undefined"!=typeof XMLHttpRequest){var i=new XMLHttpRequest;return e||(e="text/xml"),i.open("GET","data:"+e+";charset=utf-8,"+encodeURIComponent(t),!1),i.overrideMimeType&&i.overrideMimeType(e),i.send(null),i.responseXML}if("undefined"!=typeof marknote)return new marknote.Parser().parse(t)},this.hasAttributes=function(t){return!!t.attributes&&!!t.attributes.length}):this.hasAttributes=function(t){return!!t.attributes&&!!t.attributes.length},this.importNode=function(t,e){return void 0===t.importNode?this._importNode(t,e,!0):t.importNode(e,!0)},this._importNode=function(t,e,i){if(1===e.nodeType){var s=t.createElement(e.nodeName);if(e.attributes&&e.attributes.length>0)for(var r=0,n=e.attributes.length;r<n;)s.setAttribute(e.attributes[r].nodeName,e.getAttribute(e.attributes[r++].nodeName));if(i&&e.childNodes&&e.childNodes.length>0)for(var r=0,n=e.childNodes.length;r<n;)s.appendChild(this._importNode(t,e.childNodes[r++],i));return s}},this.parser=new DOMParser;var e=this.parser.parseFromString('<docco><institution institution-parts="long" delimiter=", " substitute-use-first="1" use-last="1"><institution-part name="long"/></institution></docco>',"text/xml"),i=e.getElementsByTagName("institution");this.institution=i.item(0);var s=e.getElementsByTagName("institution-part");this.institutionpart=s.item(0),this.ns="http://purl.org/net/xbiblio/csl"},h.XmlDOM.prototype.clean=function(t){return t=(t=(t=(t=(t=t.replace(/<\?[^?]+\?>/g,"")).replace(/<![^>]+>/g,"")).replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/^\n*/,"")},h.XmlDOM.prototype.getStyleId=function(t,e){var i="",s="id";e&&(s="title");var r=t.getElementsByTagName(s);return r&&r.length&&(r=r.item(0)),r&&(i=r.textContent),i||(i=r.innerText),i||(i=r.innerHTML),i},h.XmlDOM.prototype.children=function(t){var e,i,s,r;if(!t)return[];for(i=0,r=[],s=(e=t.childNodes).length;i<s;i+=1)"#text"!=e[i].nodeName&&r.push(e[i]);return r},h.XmlDOM.prototype.nodename=function(t){return t.nodeName},h.XmlDOM.prototype.attributes=function(t){var e,i,s,r,n;if(e={},t&&this.hasAttributes(t))for(r=0,n=(i=t.attributes).length;r<n;r+=1)e["@"+(s=i[r]).name]=s.value;return e},h.XmlDOM.prototype.content=function(t){return void 0!==t.textContent?t.textContent:void 0!==t.innerText?t.innerText:t.txt},h.XmlDOM.prototype.namespace={xml:"http://www.w3.org/XML/1998/namespace"},h.XmlDOM.prototype.numberofnodes=function(t){return t?t.length:0},h.XmlDOM.prototype.getAttributeName=function(t){return t.name}
1,h.XmlDOM.prototype.getAttributeValue=function(t,e,i){var s="";return i&&(e=i+":"+e),t&&this.hasAttributes(t)&&t.getAttribute(e)&&(s=t.getAttribute(e)),s},h.XmlDOM.prototype.getNodeValue=function(t,e){var i=null;if(e){var s=t.getElementsByTagName(e);s.length>0&&(i=void 0!==s[0].textContent?s[0].textContent:void 0!==s[0].innerText?s[0].innerText:s[0].text)}return null===i&&t&&t.childNodes&&(0==t.childNodes.length||1==t.childNodes.length&&"#text"==t.firstChild.nodeName)&&(i=void 0!==t.textContent?t.textContent:void 0!==t.innerText?t.innerText:t.text),null===i&&(i=t),i},h.XmlDOM.prototype.setAttributeOnNodeIdentifiedByNameAttribute=function(t,e,i,s,r){var n,a,o,l;for("@"===s.slice(0,1)&&(s=s.slice(1)),n=0,a=(o=t.getElementsByTagName(e)).length;n<a;n+=1)(l=o[n]).getAttribute("name")==i&&l.setAttribute(s,r)},h.XmlDOM.prototype.deleteNodeByNameAttribute=function(t,e){var i,s,r,n;for(i=0,s=(n=t.childNodes).length;i<s;i+=1)(r=n[i])&&r.nodeType!=r.TEXT_NODE&&this.hasAttributes(r)&&r.getAttribute("name")==e&&t.removeChild(n[i])},h.XmlDOM.prototype.deleteAttribute=function(t,e){t.removeAttribute(e)},h.XmlDOM.prototype.setAttribute=function(t,e,i){return t.ownerDocument||(t=t.firstChild),["function","unknown"].indexOf(typeof t.setAttribute)>-1&&t.setAttribute(e,i),!1},h.XmlDOM.prototype.nodeCopy=function(t){return t.cloneNode(!0)},h.XmlDOM.prototype.getNodesByName=function(t,e,i){var s,r,n,a,o;for(a=0,s=[],o=(r=t.getElementsByTagName(e)).length;a<o;a+=1)n=r.item(a),(!i||this.hasAttributes(n)&&n.getAttribute("name")==i)&&s.push(n);return s},h.XmlDOM.prototype.nodeNameIs=function(t,e){return e==t.nodeName},h.XmlDOM.prototype.makeXml=function(t){return t||(t="<docco><bogus/></docco>"),t=t.replace(/\s*<\?[^>]*\?>\s*\n*/g,""),this.parser.parseFromString(t,"application/xml").firstChild},h.XmlDOM.prototype.insertChildNodeAfter=function(t,e,i,s){var r;return r=this.importNode(e.ownerDocument,s),t.replaceChild(r,e),t},h.XmlDOM.prototype.insertPublisherAndPlace=function(t){for(var e=t.getElementsByTagName("group"),i=0,s=e.length;i<s;i+=1){for(var r=e.item(i),n=[],a=0,o=r.childNodes.length;a<o;a+=1)1!==r.childNodes.item(a).nodeType&&n.push(a);if(r.childNodes.length-n.length==2){for(var l=[],a=0,o=2;a<o;a+=1)if(!(n.indexOf(a)>-1)){for(var u=r.childNodes.item(a),p=[],h=0,c=u.childNodes.length;h<c;h+=1)1!==u.childNodes.item(h).nodeType&&p.push(h);if(u.childNodes.length-p.length==0&&(l.push(u.getAttribute("variable")),u.getAttribute("suffix")||u.getAttribute("prefix"))){l=[];break}}l.indexOf("publisher")>-1&&l.indexOf("publisher-place")>-1&&r.setAttribute("has-publisher-and-publisher-place",!0)}}},h.XmlDOM.prototype.isChildOfSubstitute=function(t){return!!t.parentNode&&("substitute"===t.parentNode.tagName.toLowerCase()||this.isChildOfSubstitute(t.parentNode))},h.XmlDOM.prototype.addMissingNameNodes=function(t){for(var e=t.getElementsByTagName("names"),i=0,s=e.length;i<s;i+=1){var r=e.item(i),n=r.getElementsByTagName("name");if((!n||0===n.length)&&!this.isChildOfSubstitute(r)){var a=r.ownerDocument.createElement("name");r.appendChild(a)}}},h.XmlDOM.prototype.addInstitutionNodes=function(t){var e,i,s,r,n,a,o,l;for(o=0,l=(e=t.getElementsByTagName("names")).length;o<l;o+=1)if(0!=(n=(i=e.item(o)).getElementsByTagName("name")).length&&0==i.getElementsByTagName("institution").length){r=(s=this.importNode(t.ownerDocument,this.institution)).getElementsByTagName("institution-part").item(0),a=n.item(0),i.insertBefore(s,a.nextSibling);for(var u=0,p=h.INSTITUTION_KEYS.length;u<p;u+=1){var c=h.INSTITUTION_KEYS[u],m=a.getAttribute(c);m&&r.setAttribute(c,m)}for(var f=a.getElementsByTagName("name-part"),u=0,p=f.length;u<p;u+=1)if("family"===f[u].getAttribute("name"))for(var d=0,g=h.INSTITUTION_KEYS.length;d<g;d+=1){var c=h.INSTITUTION_KEYS[d],m=f[u].getAttribute(c);m&&r.setAttribute(c,m)}}},h.XmlDOM.prototype.flagDateMacros=function(t){var e,i,s,r=t.getElementsByTagName("macro");for(e=0,i=r.length;e<i;e+=1)(s=r.item(e)).getElementsByTagName("date").length&&s.setAttribute("macro-has-date","true")},h.setupXml=function(t){var e={},i=null;return void 0!==t?"string"==typeof t?(e="<"===(t=t.replace("^\uFEFF","").replace(/^\s+/,"")).slice(0,1)?h.parseXml(t):JSON.parse(t),i=new h.XmlJSON(e)):i=void 0!==t.getAttribute?new h.XmlDOM(t):void 0!==t.toXMLString?new h.XmlE4X(t):new h.XmlJSON(t):h.error("unable to parse XML input"),i||h.error("citeproc-js error: unable to parse CSL style or locale object"),i},h.getSortCompare=function(t){if(h.stringCompare)return h.stringCompare;var e,i=this,s={sensitivity:"base",ignorePunctuation:!0,numeric:!0};t||(t="en-US");var r=function(t){return t.replace(/^[\[\]\'\"]*/g,"")},n=!!(e=function(e,r){return h.toLocaleLowerCase.call(i,e).localeCompare(h.toLocaleLowerCase.call(i,r),t,s)})("[x","x")&&function(t,i){return e(r(t),r(i))};
1return function(t,i){return n?n(t,i):e(t,i)}},h.ambigConfigDiff=function(t,e){var i,s,r,n;if(t.names.length!==e.names.length)return 1;for(i=0,s=t.names.length;i<s;i+=1){if(t.names[i]!==e.names[i])return 1;for(r=0,n=t.givens[i];r<n;r+=1)if(t.givens[i][r]!==e.givens[i][r])return 1}return t.disambiguate!=e.disambiguate||t.year_suffix!==e.year_suffix?1:0},h.cloneAmbigConfig=function(t,e){var i,s,r,n,a,o={};for(i=0,o.names=[],o.givens=[],o.year_suffix=!1,o.disambiguate=!1,s=t.names.length;i<s;i+=1)a=t.names[i],o.names[i]=a;for(i=0,s=t.givens.length;i<s;i+=1){for(r=0,a=[],n=t.givens[i].length;r<n;r+=1)a.push(t.givens[i][r]);o.givens.push(a)}return e?(o.year_suffix=e.year_suffix,o.disambiguate=e.disambiguate):(o.year_suffix=t.year_suffix,o.disambiguate=t.disambiguate),o},h.getAmbigConfig=function(){var t;return(t=this.tmp.disambig_request)||(t=this.tmp.disambig_settings),h.cloneAmbigConfig(t)},h.getMaxVals=function(){return this.tmp.names_max.mystack.slice()},h.getMinVal=function(){return this.tmp["et-al-min"]},h.tokenExec=function(t,e,i){var s,r;s=t.next,r=!1,t.test&&(s=(function(e){return e?(this.tmp.jump.replace("succeed"),t.succeed):(this.tmp.jump.replace("fail"),t.fail)}).call(this,t.test(e,i)));for(var n=0,a=t.execs.length;n<a;n++)(r=t.execs[n].call(t,this,e,i))&&(s=r);return s},h.expandMacro=function(t,e){i=t.postponed_macro;var i,s,r,n,a=t.strings.sort_direction;t=new h.Token("group",h.START);var o=!1,l=!1;(s=this.cslXml.getNodesByName(this.cslXml.dataObj,"macro",i)).length&&(l=this.cslXml.getAttributeValue(s[0],"cslid"),o=this.cslXml.getAttributeValue(s[0],"macro-has-date")),o&&(i=i+"@"+this.build.current_default_locale,n=function(t){t.tmp.extension&&(t.tmp["doing-macro-with-date"]=!0)},t.execs.push(n)),this.build.macro_stack.indexOf(i)>-1?h.error('CSL processor error: call to macro "'+i+'" would cause an infinite loop'):this.build.macro_stack.push(i),t.cslid=l,h.MODULE_MACROS[i]&&(t.juris=i,this.opt.update_mode=h.POSITION),h.Node.group.build.call(t,this,e,!0),this.cslXml.getNodeValue(s)||h.error('CSL style error: undefined macro "'+i+'"');var u=h.getMacroTarget.call(this,i);if(u&&(h.buildMacro.call(this,u,s),h.configureMacro.call(this,u)),!this.build.extension){var p,n=(p=i,function(t,e,i){for(var s=0;s<t.macros[p].length;)s=h.tokenExec.call(t,t.macros[p][s],e,i)}),c=new h.Token("text",h.SINGLETON);c.execs.push(n),e.push(c)}
1(r=new h.Token("group",h.END)).strings.sort_direction=a,o&&(n=function(t){t.tmp.extension&&(t.tmp["doing-macro-with-date"]=!1)},r.execs.push(n)),t.juris&&(r.juris=i),h.Node.group.build.call(r,this,e,!0),this.build.macro_stack.pop()},h.getMacroTarget=function(t){var e=!1;return this.build.extension?e=this[this.build.root+this.build.extension].tokens:this.macros[t]||(e=[],this.macros[t]=e),e},h.buildMacro=function(t,e){h.makeBuilder(this,t)(void 0===e.length?e:e[0])},h.configureMacro=function(t){this.build.extension||this.configureTokenList(t)},h.XmlToToken=function(t,e,i,s){var r,n,a,o,l,u,p;if(r=t.cslXml.nodename(this),!t.build.skip||t.build.skip===r){if(!r){(n=t.cslXml.content(this))&&(t.build.text=n);return}if(h.Node[t.cslXml.nodename(this)]||h.error('Undefined node name "'+r+'".'),a=t.cslXml.attributes(this),o=h.setDecorations.call(this,t,a),l=new h.Token(r,e),e!==h.END||"if"===r||"else-if"===r||"layout"===r){for(var u in a)if(a.hasOwnProperty(u)){if(e===h.END&&"@language"!==u&&"@locale"!==u)continue;if(a.hasOwnProperty(u)){if(h.Attributes[u])try{h.Attributes[u].call(l,t,""+a[u])}catch(t){h.error(u+" attribute: "+t)}else h.debug('warning: undefined attribute "'+u+'" in style')}}l.decorations=o,h.DATE_VARIABLES.indexOf(a["@variable"])>-1&&s.push(l.variables)}else e===h.END&&a["@variable"]&&(l.hasVariable=!0,h.DATE_VARIABLES.indexOf(a["@variable"])>-1&&(l.variables=s.pop()));p=i||t[t.build.area].tokens,h.Node[r].build.call(l,t,p,!0)}},h.DateParser=function(){for(var t=[["ææ²»",1867],["大æ£",1911],["æå",1925],["å¹³æ",1988]],e={},i=0,s=t.length;i<s;i++){var r=t[i][0],n=t[i][1];e[r]=n}for(var a=[],o={},i=0,s=t.length;i<s;i++){var l=t[i],n=l[0];a.push(n),o[l[0]]=l[1]}var u=a.join("|"),p=RegExp("(?:"+u+")(?:[0-9]+)"),c=RegExp("(?:"+u+")(?:[0-9]+)","g"),m=/(\u6708|\u5E74)/g,f=/\u65E5/g,d=/\u301c/g,g="([?0-9]{4}(?:%%NUMD%%[?0-9]{1,2}){0,2}(?![0-9])|(?:[?0-9]{1,2}%%NUMD%%){0,2}[?0-9]{4}(?![0-9])|[?0-9]{1,3}|[%%DATED%%]|[?~]|[^-/~?0-9]+)",b=new RegExp(g.replace(/%%NUMD%%/g,"-").replace(/%%DATED%%/g,"-")),_=new RegExp(g.replace(/%%NUMD%%/g,"-").replace(/%%DATED%%/g,"/")),v=new RegExp(g.replace(/%%NUMD%%/g,"/").replace(/%%DATED%%/g,"-"));this.monthStrings="january february march april may june july august september october november december spring summer fall winter spring summer".split(" "),this.setOrderDayMonth=function(){this.monthGuess=1,this.dayGuess=0},this.setOrderMonthDay=function(){this.monthGuess=0,this.dayGuess=1},this.resetDateParserMonths=function(){this.monthSets=[];for(var t=0,e=this.monthStrings.length;t<e;t++)this.monthSets.push([this.monthStrings[t]]);this.monthAbbrevs=[];for(var t=0,e=this.monthSets.length;t<e;t++){this.monthAbbrevs.push([]);for(var i=0,s=this.monthSets[t].length;i<s;i++)this.monthAbbrevs[t].push(this.monthSets[t][0].slice(0,3))}this.monthRexes=[];for(var t=0,e=this.monthAbbrevs.length;t<e;t++)this.monthRexes.push(RegExp("(?:"+this.monthAbbrevs[t].join("|")+")"))},this.addDateParserMonths=function(t){if("string"==typeof t&&(t=t.split(/\s+/)),12!==t.length&&16!==t.length){h.debug("month [+season] list of "+t.length+", expected 12 or 16. Ignoring.");return}for(var e=0,i=t.length;e<i;e++){for(var s=null,r=!1,n=3,a={},o=0,l=this.monthAbbrevs.length;o<l;o++){if(a[o]={},o===e){for(var u=0,p=this.monthAbbrevs[e].length;u<p;u++)if(this.monthAbbrevs[e][u]===t[e].slice(0,this.monthAbbrevs[e][u].length)){r=!0;break}}else for(var u=0,p=this.monthAbbrevs[o].length;u<p;u++)if(s=this.monthAbbrevs[o][u].length,this.monthAbbrevs[o][u]===t[e].slice(0,s)){for(;this.monthSets[o][u].slice(0,s)===t[e].slice(0,s);){if(s>t[e].length||s>this.monthSets[o][u].length){h.debug("unable to disambiguate month string in date parser: "+t[e]);break}s+=1}n=s,a[o][u]=s}for(var c in a)for(var m in a[c])s=a[c][m],c=parseInt(c,10),m=parseInt(m,10),this.monthAbbrevs[c][m]=this.monthSets[c][m].slice(0,s)}r||(this.monthSets[e].push(t[e]),this.monthAbbrevs[e].push(t[e].slice(0,n)))}this.monthRexes=[],this.monthRexStrs=[];for(var e=0,i=this.monthAbbrevs.length;e<i;e++)this.monthRexes.push(RegExp("^(?:"+this.monthAbbrevs[e].join("|")+")")),this.monthRexStrs.push("^(?:"+this.monthAbbrevs[e].join("|")+")");if(18===this.monthAbbrevs.length)for(var e=12,i=14;e<i;
1e++)this.monthRexes[e+4]=RegExp("^(?:"+this.monthAbbrevs[e].join("|")+")"),this.monthRexStrs[e+4]="^(?:"+this.monthAbbrevs[e].join("|")+")"},this.convertDateObjectToArray=function(t){t["date-parts"]=[],t["date-parts"].push([]);for(var e,i=0,s=0,r=3;s<r&&t[e=["year","month","day"][s]];s++)i+=1,t["date-parts"][0].push(t[e]),delete t[e];t["date-parts"].push([]);for(var s=0,r=i;s<r&&t[e=["year_end","month_end","day_end"][s]];s++)t["date-parts"][1].push(t[e]),delete t[e];return t["date-parts"][0].length!==t["date-parts"][1].length&&t["date-parts"].pop(),t},this.convertDateObjectToString=function(t){for(var e=[],i=0;i<3;i+=1)if(t[h.DATE_PARTS_ALL[i]])e.push(t[h.DATE_PARTS_ALL[i]]);else break;return e.join("-")},this._parseNumericDate=function(t,e,i,s){i||(i="");for(var r=s.split(e),n=0,a=r.length;n<a;n++)if(4===r[n].length){t["year"+i]=r[n].replace(/^0*/,""),r=n?r.slice(0,n):r.slice(1);break}for(var n=0,a=r.length;n<a;n++)r[n]=parseInt(r[n],10);if(1!==r.length&&(2!==r.length||r[1])){if(2===r.length){if(r[this.monthGuess]>12){var o=r[this.dayGuess],l=r[this.monthGuess];o&&(t["month"+i]=""+o,l&&(t["day"+i]=""+l))}else{var o=r[this.monthGuess],l=r[this.dayGuess];o&&(t["month"+i]=""+o,l&&(t["day"+i]=""+l))}}}else{var o=r[0];o&&(t["month"+i]=""+r[0])}},this.parseDateToObject=function(t){var e,i,s,r=t,n=-1,a=-1,l=!1;if(t){if("-"===(t=t.replace(/^(.*[0-9])T[0-9].*/,"$1")).slice(0,1)&&(l=!0,t=t.slice(1)),t.match(/^[0-9]{1,3}$/))for(;t.length<4;)t="0"+t;var u=(t=(t=""+t).replace(/\s*[0-9]{2}:[0-9]{2}(?::[0-9]+)/,"")).match(m);if(u){var g=(t=(t=(t=(t=(t=(t=t.replace(/\s+/g,"")).replace(f,"")).replace(m,"-")).replace(d,"/")).replace(/\-\//g,"/")).replace(/-$/g,"")).split(p);e=[];var y=t.match(c);if(y){for(var x=[],I=0,O=y.length;I<O;I++)x=x.concat(y[I].match(/([^0-9]+)([0-9]+)/).slice(1));for(var I=0,O=g.length;I<O;I++)if(e.push(g[I]),I!==O-1){var T=2*I;e.push(x[T]),e.push(x[T+1])}}else e=g;for(var I=1,O=e.length;I<O;I+=3)e[I+1]=o[e[I]]+parseInt(e[I+1],10),e[I]="";n=(t=(t=(t=(t=e.join("")).replace(/\s*-\s*$/,"").replace(/\s*-\s*\//,"/")).replace(/\.\s*$/,"")).replace(/\.(?! )/,"")).indexOf("/"),a=t.indexOf("-")}}t=t.replace(/([A-Za-z])\./g,"$1");var S="",N="",A={};if('"'===t.slice(0,1)&&'"'===t.slice(-1))return A.literal=t.slice(1,-1),A;n>-1&&a>-1?t.split("/").length>3?(i="-",t=t.replace(/\_/g,"-"),s="/",e=t.split(v)):(i="/",t=t.replace(/\_/g,"/"),s="-",e=t.split(_)):(t=(t=t.replace(/\//g,"-")).replace(/\_/g,"-"),i="-",s="-",e=t.split(b));for(var E=[],I=0,O=e.length;I<O;I++){var u=e[I].match(/^\s*([\-\/]|[^\-\/\~\?0-9]+|[\-~?0-9]+)\s*$/);u&&E.push(u[1])}var k=E.indexOf(i),R=[],w=!1;k>-1?(R.push([0,k]),R.push([k+1,E.length]),w=!0):R.push([0,E.length]);for(var j="",I=0,O=R.length;I<O;I++){var C=R[I],L=E.slice(C[0],C[1]);t:for(var D=0,P=L.length;D<P;D++){var U=L[D];if(U.indexOf(s)>-1){this._parseNumericDate(A,s,j,U);continue}if(U.match(/[0-9]{4}/)){A["year"+j]=U.replace(/^0*/,"");continue}("~"===U||"?"===U||"c"===U||U.match(/^cir/))&&(A.circa=!0);for(var B=0,M=this.monthRexes.length;B<M;B++)if(U.toLocaleLowerCase().match(this.monthRexes[B])){A["month"+j]=""+(parseInt(B,10)+1);continue t}if(U.match(/^[0-9]+$/)&&(S=U),U.toLocaleLowerCase().match(/^bc/)&&S){A["year"+j]=""+-1*S,S="";continue}if(U.toLocaleLowerCase().match(/^ad/)&&S){A["year"+j]=""+S,S="";continue}if(U.toLocaleLowerCase().match(/(?:mic|tri|hil|eas)/)&&!A["season"+j]){N=U;continue}}S&&(A["day"+j]=S,S=""),N&&!A["season"+j]&&(A["season"+j]=N.trim(),N=""),j="_end"}if(w)for(var D=0,P=h.DATE_PARTS_ALL.length;D<P;D++){var q=h.DATE_PARTS_ALL[D];A[q]&&!A[q+"_end"]?A[q+"_end"]=A[q]:!A[q]&&A[q+"_end"]&&(A[q]=A[q+"_end"])}(!A.year||A.year&&A.day&&!A.month)&&(A={literal:r});for(var X=["year","month","day","year_end","month_end","day_end"],I=0,O=X.length;I<O;I++){var z=X[I];"string"==typeof A[z]&&A[z].match(/^[0-9]+$/)&&(A[z]=parseInt(A[z],10))}return l&&Object.keys(A).indexOf("year")>-1&&(A.year=-1*A.year),A},this.parseDateToArray=function(t){return this.convertDateObjectToArray(this.parseDateToObject(t))},this.parseDateToString=function(t){return this.convertDateObjectToString(this.parseDateToObject(t))},this.parse=function(t){return this.parseDateToObject(t)},this.setOrderMonthDay(),this.resetDateParserMonths()}
1,h.DateParser=new h.DateParser,h.Engine=function(t,e,i,s){for(var r in this.processor_version=h.PROCESSOR_VERSION,this.csl_version="1.0",this.sys=t,"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t){if(null==t)throw TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var s=arguments[i];if(null!=s)for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},writable:!0,configurable:!0}),t.variableWrapper&&(h.VARIABLE_WRAPPER_PREPUNCT_REX=RegExp("^(["+[" "].concat(h.SWAPPING_PUNCTUATION).join("")+"]*)(.*)")),h.retrieveStyleModule&&(this.sys.retrieveStyleModule=h.retrieveStyleModule),h.getAbbreviation&&(this.sys.getAbbreviation=h.getAbbreviation),this.sys.stringCompare&&(h.stringCompare=this.sys.stringCompare),this.sys.AbbreviationSegments=h.AbbreviationSegments,this.transform=new h.Transform(this),this.setParseNames=function(t){this.opt["parse-names"]=t},this.opt=new h.Engine.Opt,this.tmp=new h.Engine.Tmp,this.build=new h.Engine.Build,this.fun=new h.Engine.Fun(this),this.configure=new h.Engine.Configure,this.citation_sort=new h.Engine.CitationSort,this.bibliography_sort=new h.Engine.BibliographySort,this.citation=new h.Engine.Citation(this),this.bibliography=new h.Engine.Bibliography,this.intext=new h.Engine.InText,this.output=new h.Output.Queue(this),this.dateput=new h.Output.Queue(this),this.cslXml=h.setupXml(e),h.SYS_OPTIONS){var n,a=h.SYS_OPTIONS[r];"boolean"==typeof this.sys[a]&&(this.opt.development_extensions[a]=this.sys[a])}(this.opt.development_extensions.uppercase_subtitles||this.opt.development_extensions.implicit_short_title)&&(this.opt.development_extensions.main_title_from_short_title=!0),this.opt.development_extensions.csl_reverse_lookup_support&&(this.build.cslNodeId=0,this.setCslNodeIds=function(t,e){var i=this.cslXml.children(t);this.cslXml.setAttribute(t,"cslid",this.build.cslNodeId),this.opt.nodenames.push(e),this.build.cslNodeId+=1;for(var s=0,r=this.cslXml.numberofnodes(i);s<r;s+=1)(e=this.cslXml.nodename(i[s]))&&this.setCslNodeIds(i[s],e)},this.setCslNodeIds(this.cslXml.dataObj,"style")),this.cslXml.addMissingNameNodes(this.cslXml.dataObj),this.cslXml.addInstitutionNodes(this.cslXml.dataObj),this.cslXml.insertPublisherAndPlace(this.cslXml.dataObj),this.cslXml.flagDateMacros(this.cslXml.dataObj),void 0===this.cslXml.attributes(this.cslXml.dataObj)["@sort-separator"]&&this.cslXml.setAttribute(this.cslXml.dataObj,"sort-separator",", "),this.opt["initialize-with-hyphen"]=!0,this.setStyleAttributes(),this.opt.xclass=this.cslXml.getAttributeValue(this.cslXml.dataObj,"class"),this.opt.class=this.opt.xclass,this.opt.styleID=this.cslXml.getStyleId(this.cslXml.dataObj),this.opt.styleName=this.cslXml.getStyleId(this.cslXml.dataObj,!0),"1.1m"===this.opt.version.slice(0,4)&&(this.opt.development_extensions.consolidate_legal_items=!0,this.opt.development_extensions.consolidate_container_items=!0,this.opt.development_extensions.main_title_from_short_title=!0,this.opt.development_extensions.expect_and_symbol_form=!0,this.opt.development_extensions.require_explicit_legal_case_title_short=!0,this.opt.development_extensions.force_jurisdiction=!0,this.opt.development_extensions.force_title_abbrev_fallback=!0),i&&(i=i.replace("_","-"),i=h.normalizeLocaleStr(i)),this.opt["default-locale"][0]&&(this.opt["default-locale"][0]=this.opt["default-locale"][0].replace("_","-"),this.opt["default-locale"][0]=h.normalizeLocaleStr(this.opt["default-locale"][0])),i&&s&&(this.opt["default-locale"]=[i]),i&&!s&&this.opt["default-locale"][0]&&(i=this.opt["default-locale"][0]),0===this.opt["default-locale"].length&&(i||(i="en-US"),this.opt["default-locale"].push("en-US")),i||(i=this.opt["default-locale"][0]),n=h.localeResolve(i),this.opt.lang=n.best,this.opt["default-locale"][0]=n.best,this.locale={},this.opt["default-locale-sort"]||(this.opt["default-locale-sort"]=this.opt["default-locale"][0]),"dale|".localeCompare("daleb",this.opt["default-locale-sort"])>-1?this.opt.sort_sep="@":this.opt.sort_sep="|",this.localeConfigure(n),this.locale[this.opt.lang].opts["skip-words-regexp"]=RegExp("(?:(?:[?!:]*\\
1s+|-|^)(?:"+(0,this.locale[this.opt.lang].opts["skip-words"]).slice().join("|")+")(?=[!?:]*\\s+|-|$))","g"),this.output.adjust=new h.Output.Queue.adjust(this.getOpt("punctuation-in-quote")),this.registry=new h.Registry(this),this.macros={},this.build.area="citation";var o=this.cslXml.getNodesByName(this.cslXml.dataObj,this.build.area);this.buildTokenLists(o,this[this.build.area].tokens),this.build.area="bibliography";var o=this.cslXml.getNodesByName(this.cslXml.dataObj,this.build.area);this.buildTokenLists(o,this[this.build.area].tokens),this.build.area="intext";var o=this.cslXml.getNodesByName(this.cslXml.dataObj,this.build.area);this.buildTokenLists(o,this[this.build.area].tokens),this.opt.parallel.enable&&(this.parallel=new h.Parallel(this)),this.juris={},this.configureTokenLists(),this.disambiguate=new h.Disambiguation(this),this.splice_delimiter=!1,this.fun.dateparser=h.DateParser,this.fun.flipflopper=new h.Util.FlipFlopper(this),this.setCloseQuotesArray(),this.fun.ordinalizer.init(this),this.fun.long_ordinalizer.init(this),this.fun.page_mangler=h.Util.PageRangeMangler.getFunction(this,"page"),this.fun.year_mangler=h.Util.PageRangeMangler.getFunction(this,"year"),this.setOutputFormat("html")},h.Engine.prototype.setCloseQuotesArray=function(){var t;(t=[]).push(this.getTerm("close-quote")),t.push(this.getTerm("close-inner-quote")),t.push('"'),t.push("'"),this.opt.close_quotes_array=t},h.makeBuilder=function(t,e){var i=[],s=[];return function r(n,a,o){o||(o=[]),n||(n=[]),void 0===n.length&&(n=[n]);for(var l=0;l<n.length;l++){var u,p,c=n[l];null!==t.cslXml.nodename(c)&&((a&&"date"===t.cslXml.nodename(c)&&(h.Util.fixDateNode.call(t,a,l,c),c=t.cslXml.children(a)[l]),t.cslXml.numberofnodes(t.cslXml.children(c)))?(u=c,s.push(u),h.XmlToToken.call(u,t,h.START,e,i),r(t.cslXml.children(c),c,o),function(){var r=s.pop();h.XmlToToken.call(r,t,h.END,e,i)}()):(p=c,h.XmlToToken.call(p,t,h.SINGLETON,e,i)))}}},h.Engine.prototype.buildTokenLists=function(t,e){this.cslXml.getNodeValue(t)&&h.makeBuilder(this,e)(void 0===t.length?t:t[0])},h.Engine.prototype.setStyleAttributes=function(){var t,e,i={};for(e in i.name=this.cslXml.nodename(this.cslXml.dataObj),t=this.cslXml.attributes(this.cslXml.dataObj))t.hasOwnProperty(e)&&h.Attributes[e].call(i,this,t[e])},h.Engine.prototype.getTerm=function(t,e,i,s,r,n){t&&t.match(/[A-Z]/)&&t===t.toUpperCase()&&(h.debug("Warning: term key is in uppercase form: "+t),t=t.toLowerCase()),a=n?this.opt["default-locale"][0]:this.opt.lang;var a,o=h.Engine.getField(h.LOOSE,this.locale[a].terms,t,e,i,s);return o||"range-delimiter"!==t||(o="â"),void 0===o&&(r===h.STRICT?h.error('Error in getTerm: term "'+t+'" does not exist.'):r===h.TOLERANT&&(o="")),o&&(this.tmp.cite_renders_content=!0),o},h.Engine.prototype.getDate=function(t,e){var i;return i=e?this.opt["default-locale"]:this.opt.lang,!!this.locale[i].dates[t]&&this.locale[i].dates[t]},h.Engine.prototype.getOpt=function(t){return void 0!==this.locale[this.opt.lang].opts[t]&&this.locale[this.opt.lang].opts[t]},h.Engine.prototype.getVariable=function(t,e,i,s){return h.Engine.getField(h.LOOSE,t,e,i,s)},h.Engine.prototype.getDateNum=function(t,e){return void 0===t?0:t[e]},h.Engine.getField=function(t,e,i,s,r,n){var a,o,l,u,p,c;if(a="",void 0===e[i]){if(t!==h.STRICT)return;h.error('Error in getField: term "'+i+'" does not exist.')}for(c=n&&e[i][n]?e[i][n]:e[i],o=[],"symbol"===s?o=["symbol","short"]:"verb-short"===s?o=["verb-short","verb"]:"long"!==s&&(o=[s]),p=(o=o.concat(["long"])).length,u=0;u<p;u+=1)if(l=o[u],"string"==typeof c||"number"==typeof c)a=c;else if(void 0!==c[l]){a="string"==typeof c[l]||"number"==typeof c[l]?c[l]:"number"==typeof r?c[l][r]:c[l][0];break}return a},h.Engine.prototype.configureTokenLists=function(){var t,e;for(t=0,e=h.AREAS.length;t<e;t+=1){var i=this[h.AREAS[t]].tokens;this.configureTokenList(i)}return this.version=h.version,this.state},h.Engine.prototype.configureTokenList=function(t){var e,i,s,r,n,a,o;for(e=["year","month","day"],r=a=t.length-1;r>-1;r+=-1){if("date"===(i=t[r]).name&&h.END===i.tokentype&&(s=[]),"date-part"===i.name&&i.strings.name)for(n=0,o=e.length;n<o;n+=1)e[n]===i.strings.name&&s.push(i.strings.name);"date"===i.name&&h.START===i.tokentype&&(s.reverse(),i.dateparts=s),i.next=r+1,i.name&&h.Node[i.name].configure&&h.Node[i.name].configure.call(i,this,r)}},h.Engine.prototype.refetchItems=function(t){for(var e=[],i=0,s=t.length;i<s;
1i+=1)e.push(this.refetchItem(""+t[i]));return e},h.ITERATION=0,h.Engine.prototype.retrieveItem=function(t){if(this.tmp.loadedItemIDs[t])return this.registry.refhash[t];if(this.tmp.loadedItemIDs[t]=!0,this.opt.development_extensions.normalize_lang_keys_to_lowercase&&"boolean"==typeof this.opt.development_extensions.normalize_lang_keys_to_lowercase){for(var e,i=0,s=this.opt["default-locale"].length;i<s;i+=1)this.opt["default-locale"][i]=this.opt["default-locale"][i].toLowerCase();for(var i=0,s=this.opt["locale-translit"].length;i<s;i+=1)this.opt["locale-translit"][i]=this.opt["locale-translit"][i].toLowerCase();for(var i=0,s=this.opt["locale-translat"].length;i<s;i+=1)this.opt["locale-translat"][i]=this.opt["locale-translat"][i].toLowerCase();this.opt.development_extensions.normalize_lang_keys_to_lowercase=100}if(h.ITERATION+=1,m=JSON.parse(JSON.stringify(this.sys.retrieveItem(""+t))),this.opt.development_extensions.normalize_lang_keys_to_lowercase){if(m.multi){if(m.multi._keys)for(var r in m.multi._keys)for(var n in m.multi._keys[r])n!==n.toLowerCase()&&(m.multi._keys[r][n.toLowerCase()]=m.multi._keys[r][n],delete m.multi._keys[r][n]);if(m.multi.main)for(var r in m.multi.main)m.multi.main[r]=m.multi.main[r].toLowerCase()}for(var i=0,s=h.NAME_VARIABLES.length;i>s;i+=1){var a=h.NAME_VARIABLES[i];if(m[a]&&m[a].multi)for(var o=0,l=m[a].length;o<l;o+=1){var u=m[a][o];if(u.multi){if(u.multi._key)for(var n in u.multi._key)n!==n.toLowerCase()&&(u.multi._key[n.toLowerCase()]=u.multi._key[n],delete u.multi._key[n]);u.multi.main&&(u.multi.main=u.multi.main.toLowerCase())}}}}if(m.language&&m.language.match(/[><]/)){var p=m.language.match(/(.*?)([<>])(.*)/);"<"===p[2]?(m["language-name"]=p[1],m["language-name-original"]=p[3]):(m["language-name"]=p[3],m["language-name-original"]=p[1]),this.opt.multi_layout?m["language-name-original"]&&(m.language=m["language-name-original"]):m["language-name"]&&(m.language=m["language-name"])}if(m.page){m["page-first"]=m.page;var p=(""+m.page).split(/\s*(?:&|, |-|\u2013)\s*/);"\\"!==p[0].slice(-1)&&(m["page-first"]=p[0])}for(var n in this.opt.development_extensions.field_hack&&m.note&&h.parseNoteFieldHacks(m,!1,this.opt.development_extensions.allow_field_hack_date_override),m)if(h.DATE_VARIABLES.indexOf(n.replace(/^alt-/,""))>-1){var c=m[n];c&&(this.opt.development_extensions.raw_date_parsing&&c.raw&&(!c["date-parts"]||0===c["date-parts"].length)&&(c=this.fun.dateparser.parseDateToObject(c.raw)),m[n]=this.dateParseArray(c))}if(this.opt.development_extensions.consolidate_legal_items&&m.type&&["bill","gazette","legislation","regulation","treaty"].indexOf(m.type)>-1){for(var m,p,i,f,d=["type","title","jurisdiction","genre","volume","container-title"],g=[],i=0,s=d.length;i<s;i+=1)m[f=d[i]]&&g.push(m[f]);d=["original-date","issued"];for(var i=0,s=d.length;i<s;i+=1)if(m[f=d[i]]&&m[f].year){var b=m[f].year;g.push(b);break}m.legislation_id=g.join("::")}if(this.bibliography.opt.track_container_items&&this.bibliography.opt.track_container_items.indexOf(m.type)>-1){for(var f,d=["type","container-title","publisher","edition"],_=[],i=0,s=d.length;i<s;i+=1)m[f=d[i]]&&_.push(m[f]);m.container_id=_.join("::")}if(this.opt.development_extensions.force_jurisdiction&&"string"==typeof m.authority&&(m.authority=[{literal:m.authority,multi:{_key:{}}}],m.multi&&m.multi._keys&&m.multi._keys.authority))for(var n in m.authority[0].multi._key={},m.multi._keys.authority)m.authority[0].multi._key[n]={literal:m.multi._keys.authority[n]};if(m["title-short"]||(m["title-short"]=m.shortTitle),this.opt.development_extensions.main_title_from_short_title){var v="fr"===this.opt["default-locale"][0].slice(0,2).toLowerCase();h.extractTitleAndSubtitle.call(this,m,v)}var y=["bill","legal_case","legislation","gazette","regulation"].indexOf(m.type)>-1;if(this.opt.development_extensions.force_jurisdiction&&y&&!m.jurisdiction&&(m.jurisdiction="us"),!y&&m.title&&this.sys.getAbbreviation){m.jurisdiction,e=this.sys.normalizeAbbrevsKey?this.sys.normalizeAbbrevsKey("title",m.title):m.title;var x=this.transform.loadAbbreviation(m.jurisdiction,"title",e,m.language);this.transform.abbrevs[x].title&&this.transform.abbrevs[x].title[e]&&(m["title-short"]=this.transform.abbrevs[x].title[e])}if(m["container-title-short"]||(m["container-title-short"]=m.journalAbbreviation),m["container-title"]&&this.sys.getAbbreviation){e=this.sys.normalizeAbbrevsKey?this.sys.normalizeAbbrevsKey(m["container-title"]):m["container-title"];var x=this.transform.loadAbbreviation(m.jurisdiction,"container-title",e,m.language);this.transform.abbrevs[x]["container-title"]&&this.transform.abbrevs[x]["container-title"][e]&&(m["container-title-short"]=this.transform.abbrevs[x]["container-title"][e])}if(m.jurisdiction&&(m.country=m.jurisdiction.split(":")[0]),this.registry.refhash[t]){if(JSON.stringify(this.registry.refhash[t])!=JSON.stringify(m)){for(var n in this.registry.refhash[t])delete this.registry.refhash[t][n];this.tmp.taintedItemIDs[m.id]=!0,Object.assign(this.registry.refhash[t],m)}}else this.registry.refhash[t]=m;return this.registry.refhash[t]},h.Engine.prototype.refetchItem=function(t){return this.registry.refhash[t]}
1,h.Engine.prototype.setOpt=function(t,e,i){"style"===t.name||"cslstyle"===t.name?(this.opt.inheritedAttributes[e]=i,this.citation.opt.inheritedAttributes[e]=i,this.bibliography.opt.inheritedAttributes[e]=i):["citation","bibliography"].indexOf(t.name)>-1?this[t.name].opt.inheritedAttributes[e]=i:t.strings[e]=i},h.Engine.prototype.inheritOpt=function(t,e,i,s){if(void 0!==t.strings[e])return t.strings[e];var r=this[this.tmp.root].opt.inheritedAttributes[i||e];return void 0!==r?r:s},h.Engine.prototype.remapSectionVariable=function(t){for(var e=0,i=t.length;e<i;e+=1){var s=t[e][0],r=t[e][1];if(["bill","gazette","legislation","regulation","treaty"].indexOf(s.type)>-1){if(r.locator){r.locator=r.locator.trim();var n=r.locator.match(h.STATUTE_SUBDIV_PLAIN_REGEX_FRONT);n||(r.label?r.locator=h.STATUTE_SUBDIV_STRINGS_REVERSE[r.label]+" "+r.locator:r.locator="p. "+r.locator)}var a=null;if(s.section){s.section=s.section.trim();var n=s.section.match(h.STATUTE_SUBDIV_PLAIN_REGEX_FRONT);n?a=n[0].trim():(s.section="sec. "+s.section,a="sec.")}if(s.section){if(r.locator){var n=r.locator.match(/^([^ ]*)\s*(.*)/),o=" ";n?("p."===n[1]&&"p."!==a&&(r.locator=n[2]),["[","(",".",",",";",":","?"].indexOf(r.locator.slice(0,1))>-1&&(o="")):o="",r.locator=s.section+o+r.locator}else r.locator=s.section}r.label=""}}},h.Engine.prototype.setNumberLabels=function(t){if(t.number&&["bill","gazette","legislation","regulation","treaty"].indexOf(t.type)>-1&&this.opt.development_extensions.consolidate_legal_items&&!this.tmp.shadow_numbers.number){this.tmp.shadow_numbers.number={},this.tmp.shadow_numbers.number.values=[],this.tmp.shadow_numbers.number.plural=0,this.tmp.shadow_numbers.number.numeric=!1,this.tmp.shadow_numbers.number.label=!1;var e=""+t.number,i=(e=e.split("\\").join("")).split(/\s+/)[0],s=h.STATUTE_SUBDIV_STRINGS[i];if(s){var r=e.split(h.STATUTE_SUBDIV_PLAIN_REGEX);if(r.length>1){for(var n=[],a=1,o=r.length;a<o;a+=1)n.push(r[a].replace(/\s*$/,"").replace(/^\s*/,""));e=n.join(" ")}else e=r[0];this.tmp.shadow_numbers.number.label=s,this.tmp.shadow_numbers.number.values.push(["Blob",e,!1]),this.tmp.shadow_numbers.number.numeric=!1}else this.tmp.shadow_numbers.number.values.push(["Blob",e,!1]),this.tmp.shadow_numbers.number.numeric=!0}},h.substituteOne=function(t){return function(e,i){return i?t.replace("%%STRING%%",i):""}},h.substituteTwo=function(t){return function(e){var i=t.replace("%%PARAM%%",e);return function(t,e){return e?i.replace("%%STRING%%",e):""}}},h.Mode=function(t){var e,i,s,r,n,a;for(s in e={},i=h.Output.Formats[t]){if("@"!==s.slice(0,1)){e[s]=i[s];continue}r=!1,n=i[s],a=s.split("/"),"string"==typeof n&&n.indexOf("%%STRING%%")>-1?r=n.indexOf("%%PARAM%%")>-1?h.substituteTwo(n):h.substituteOne(n):"boolean"!=typeof n||n?"function"==typeof n?r=n:h.error("Bad "+t+" config entry for "+s+": "+n):r=h.Output.Formatters.passthrough,1===a.length?e[a[0]]=r:2===a.length&&(e[a[0]]||(e[a[0]]={}),e[a[0]][a[1]]=r)}return e},h.setDecorations=function(t,e){var i,s,r;for(r in i=[],h.FORMAT_KEY_SEQUENCE){var s=h.FORMAT_KEY_SEQUENCE[r];e[s]&&(i.push([s,e[s]]),delete e[s])}return i},h.Doppeler=function(t,e){var i=RegExp("("+t+")","g"),s=RegExp(t,"g");this.split=function(t){e&&(t=e(t));var r=t.match(i);if(!r)return{tags:[],strings:[t]};for(var n=t.split(s),a=r.length-1;a>-1;a--)"number"==typeof r[a]&&(r[a]=""),"'"===r[a]&&n[a+1].length>0&&(n[a+1]=r[a]+n[a+1],r[a]="");return{tags:r,strings:n,origStrings:n.slice()}},this.join=function(t){for(var e=t.strings.slice(-1),i=t.tags.length-1;i>-1;i--)e.push(t.tags[i]),e.push(t.strings[i]);return e.reverse(),e.join("")}},h.Engine.prototype.normalDecorIsOrphan=function(t,e){if("normal"===e[1]){var i,s=!1;i="citation"===this.tmp.area?[this.citation.opt.layout_decorations].concat(t.alldecor):t.alldecor;for(var r=i.length-1;r>-1;r+=-1)for(var n=i[r].length-1;n>-1;n+=-1)i[r][n][0]===e[0]&&"normal"!==i[r][n][1]&&(s=!0);if(!s)return!0}return!1},h.Engine.prototype.getCitationLabel=function(t){var e="",i=this.getTrigraphParams(),s=i[0],r=this.getTerm("reference","short",0);void 0===r&&(r="reference"),r=(r=r.replace(".","")).slice(0,1).toUpperCase()+r.slice(1);for(var n=0,a=h.NAME_VARIABLES.length;n<a;n+=1){var o=h.NAME_VARIABLES[n];if(t[o]){var l=t[o];s=l.length>i.length?i[i.length-1]:i[l.length-1];for(var u=0,p=l.length;u<p&&u!==s.authors.length;u+=1){var c=this.nameOutput.getName(l[u],"locale-translit",!0).name;c&&c.family?r=(r=c.family).replace(/^([ \'\u2019a-z]+\s+)/,""):c&&c.literal&&(r=c.literal);var m=r.toLowerCase().match(/^(a\s+|the\s+|an\s+)/);if(m&&(r=r.slice(m[1].length)),!(r=r.replace(h.ROMANESQUE_NOT_REGEXP,"")))break;(r=r.slice(0,s.authors[u])).length>1?r=r.slice(0,1).toUpperCase()+r.slice(1).toLowerCase():1===r.length&&(r=r.toUpperCase()),e+=r}break}}if(!e&&t.title){for(var f=this.locale[this.opt.lang].opts["skip-words"],d=t.title.split(/\s+/),n=d.length-1;n>-1;n--)f.indexOf(d[n])>-1&&(d=d.slice(0,n).concat(d.slice(n+1)));var g=d.join("");(g=g.slice(0,i[0].authors[0])).length>1?g=g.slice(0,1).toUpperCase()+g.slice(1).toLowerCase():1===g.length&&(g=g.toUpperCase()),e=g}var b="0000";return t.issued&&t.issued.year&&(b=""+t.issued.year),e+=b=b.slice(-1*s.year)},h.Engine.prototype.getTrigraphParams=function(){var t=[],e=this.opt.trigraph.split(":");this.opt.trigraph&&"A"===this.opt.trigraph.slice(0,1)||h.error("Bad trigraph definition: "+this.opt.trigraph);for(var i=0,s=e.length;i<s;i+=1){for(var r=e[i],n={authors:[],year:0},a=0,o=r.length;a<o;a+=1)switch(r.slice(a,a+1)){case"A":n.authors.push(1);break;case"a":n.authors[n.authors.length-1]+=1;break;case"0":n.year+=1;break;default:h.error("Invalid character in trigraph definition: "+this.opt.trigraph)}t.push(n)}return t},h.Engine.prototype.setOutputFormat=function(t){this.opt.mode=t,this.fun.decorate=h.Mode(t),this.output[t]||(this.output[t]={},this.output[t].tmp={})},h.Engine.prototype.getSortFunc=function(){return function(t,e){return(t=t.split("-"),e=e.split("-"),t.length<e.length)?1:t.length>e.length?-1:(t=t.slice(-1)[0],e=e.slice(-1)[0],t.length<e.length)?1:t.length>e.length?-1:0}},h.Engine.prototype.setLangTagsForCslSort=function(t){var e,i;if(t)for(e=0,this.opt["locale-sort"]=[],i=t.length;e<i;e+=1)this.opt["locale-sort"].push(t[e]);this.opt["locale-sort"].sort(this.getSortFunc())},h.Engine.prototype.setLangTagsForCslTransliteration=function(t){var e,i;if(this.opt["locale-translit"]=[],t)for(e=0,i=t.length;e<i;e+=1)this.opt["locale-translit"].push(t[e]);this.opt["locale-translit"].sort(this.getSortFunc())},h.Engine.prototype.setLangTagsForCslTranslation=function(t){var e,i;if(this.opt["locale-translat"]=[],t)for(e=0,i=t.length;e<i;e+=1)this.opt["locale-translat"].push(t[e]);this.opt["locale-translat"].sort(this.getSortFunc())},h.Engine.prototype.setLangPrefsForCites=function(t,e){var i=this.opt["cite-lang-prefs"];e||(e=function(t){return t.toLowerCase()});for(var s=["Persons","Institutions","Titles","Journals","Publishers","Places"],r=0,n=s.length;r<n;r+=1){var a=e(s[r]),o=s[r].toLowerCase();if(t[a]){for(var l=[];t[a].length>1;)l.push(t[a].pop());var u={orig:1,translit:2,translat:3};for(2===l.length&&u[l[0]]<u[l[1]]&&l.reverse();l.length;)t[a].push(l.pop());for(var p=i[o];p.length;)p.pop();for(var h=0,c=t[a].length;h<c;
1h+=1)p.push(t[a][h])}}},h.Engine.prototype.setLangPrefsForCiteAffixes=function(t){if(t&&48===t.length){for(var e,i=this.opt.citeAffixes,s=0,r=["persons","institutions","titles","journals","publishers","places"],n=["translit","orig","translit","translat"],a=0,o=r.length;a<o;a+=1)for(var l=0,u=n.length;l<u;l+=1)e="",s%8==4&&(i[r[a]]["locale-"+n[l]].prefix||i[r[a]]["locale-"+n[l]].suffix)||(e=t[s]?t[s]:"",i[r[a]]["locale-"+n[l]].prefix=e,e=t[s]?t[s+1]:"",i[r[a]]["locale-"+n[l]].suffix=e),s+=2;this.opt.citeAffixes=i}},h.Engine.prototype.setAutoVietnameseNamesOption=function(t){t?this.opt["auto-vietnamese-names"]=!0:this.opt["auto-vietnamese-names"]=!1},h.Engine.prototype.setAbbreviations=function(t){this.sys.setAbbreviations&&this.sys.setAbbreviations(t)},h.Engine.prototype.setSuppressTrailingPunctuation=function(t){this.citation.opt.suppressTrailingPunctuation=!!t},h.Output={},h.Output.Queue=function(t){this.levelname=["top"],this.state=t,this.queue=[],this.empty=new h.Token("empty");var e={};e.empty=this.empty,this.formats=new h.Stack(e),this.current=new h.Stack(this.queue)},h.Output.Queue.prototype.pop=function(){var t=this.current.value();return t.length?t.pop():t.blobs.pop()},h.Output.Queue.prototype.getToken=function(t){return this.formats.value()[t]},h.Output.Queue.prototype.mergeTokenStrings=function(t,e){var i,s,r,n;if(i=this.formats.value()[t],s=this.formats.value()[e],r=i,s){i||((i=new h.Token(t,h.SINGLETON)).decorations=[]),r=new h.Token(t,h.SINGLETON);var n="";for(var n in i.strings)i.strings.hasOwnProperty(n)&&(r.strings[n]=i.strings[n]);for(var n in s.strings)s.strings.hasOwnProperty(n)&&(r.strings[n]=s.strings[n]);r.decorations=i.decorations.concat(s.decorations)}return r},h.Output.Queue.prototype.addToken=function(t,e,i){var s,r;if(s=new h.Token("output"),"string"==typeof i&&(i=this.formats.value()[i]),i&&i.strings){for(r in i.strings)i.strings.hasOwnProperty(r)&&(s.strings[r]=i.strings[r]);s.decorations=i.decorations}"string"==typeof e&&(s.strings.delimiter=e),this.formats.value()[t]=s},h.Output.Queue.prototype.pushFormats=function(t){t||(t={}),t.empty=this.empty,this.formats.push(t)},h.Output.Queue.prototype.popFormats=function(){this.formats.pop()},h.Output.Queue.prototype.startTag=function(t,e){var i={};this.state.tmp["doing-macro-with-date"]&&this.state.tmp.extension&&(e=this.empty,t="empty"),i[t]=e,this.pushFormats(i),this.openLevel(t)},h.Output.Queue.prototype.endTag=function(t){this.closeLevel(t),this.popFormats()},h.Output.Queue.prototype.openLevel=function(t){var e,i;"object"==typeof t?e=new h.Blob(void 0,t):void 0===t?e=new h.Blob(void 0,this.formats.value().empty,"empty"):(this.formats.value()&&this.formats.value()[t]||h.error('CSL processor error: call to nonexistent format token "'+t+'"'),e=new h.Blob(void 0,this.formats.value()[t],t)),i=this.current.value(),!this.state.tmp.just_looking&&this.checkNestedBrace&&(e.strings.prefix=this.checkNestedBrace.update(e.strings.prefix)),i.push(e),this.current.push(e)},h.Output.Queue.prototype.closeLevel=function(t){t&&t!==this.current.value().levelname&&h.error("Level mismatch error: wanted "+t+" but found "+this.current.value().levelname);var e=this.current.pop();!this.state.tmp.just_looking&&this.checkNestedBrace&&(e.strings.suffix=this.checkNestedBrace.update(e.strings.suffix))},h.Output.Queue.prototype.append=function(t,e,i,s,r){var n,a,o,l=!0;if(i&&(s=!0),this.state.tmp["doing-macro-with-date"]&&!i){if("macro-with-date"!==e)return!1;"macro-with-date"===e&&(e="empty")}if(void 0===t||("number"==typeof t&&(t=""+t),!i&&this.state.tmp.element_trace&&"suppress-me"===this.state.tmp.element_trace.value()))return!1;if(a=!1,e?"literal"===e?(n=!0,l=!1):n="string"==typeof e?this.formats.value()[e]:e:n=this.formats.value().empty,n||h.error("CSL processor error: unknown format token name: "+e),n.strings&&void 0===n.strings.delimiter&&(n.strings.delimiter=""),"string"==typeof t&&t.length&&(t=t.replace(/ ([:;?!\u00bb])/g,"â¯$1").replace(/\u00ab /g,"\xabâ¯"),this.last_char_rendered=t.slice(-1),t=t.replace(/\s+'/g," '"),i||(t=t.replace(/^'/g," '")),s?i&&(this.state.tmp.term_predecessor_name=!0):(this.state.tmp.term_predecessor=!0,this.state.tmp.in_cite_predecessor=!0)),a=new h.Blob(t,n),void 0===(o=this.current.value())&&0===this.current.mystack.length&&(this.current.mystack.push([]),o=this.current.value()),"string"==typeof a.blobs&&(s?i&&(this.state.tmp.term_predecessor_name=!0):(this.state.tmp.term_predecessor=!0,this.state.tmp.in_cite_predecessor=!0)),"string"==typeof t){if("string"==typeof a.blobs&&" "!==a.blobs.slice(0,1)){for(var u="",p=a.blobs;h.TERMINAL_PUNCTUATION.indexOf(p.slice(0,1))>-1;)u+=p.slice(0,1),p=p.slice(1);
1p&&u&&(a.strings.prefix=a.strings.prefix+u,a.blobs=p)}a.strings["text-case"]&&(a.blobs=h.Output.Formatters[a.strings["text-case"]](this.state,t)),this.state.tmp.strip_periods&&!r&&(a.blobs=a.blobs.replace(/\.([^a-z]|$)/g,"$1"));for(var c=a.decorations.length-1;c>-1;c+=-1)"@quotes"===a.decorations[c][0]&&"false"!==a.decorations[c][1]&&(a.punctuation_in_quote=this.state.getOpt("punctuation-in-quote")),a.blobs.match(h.ROMANESQUE_REGEXP)||"@font-style"!==a.decorations[c][0]||(a.decorations=a.decorations.slice(0,c).concat(a.decorations.slice(c+1)));o.push(a),this.state.fun.flipflopper.processTags(a)}else l?o.push(a):o.push(t);return!0},h.Output.Queue.prototype.string=function(t,e,i){var s,r,n,a,o,l,u,p,c,m=h.getSafeEscape(this.state),f=e.slice(),d=[];if(0===f.length)return d;var g="";i?g=i.strings.delimiter:(t.tmp.count_offset_characters=!1,t.tmp.offset_characters=0),i&&i.new_locale&&(i.old_locale=t.opt.lang,t.opt.lang=i.new_locale);for(var s=0,r=f.length;s<r;s+=1){if((l=f[s]).strings.first_blob&&(t.tmp.count_offset_characters=l.strings.first_blob),"string"==typeof l.blobs){if("number"==typeof l.num)d.push(l);else if(l.blobs){l.particle&&(l.blobs=l.particle+l.blobs,l.particle="");var b=(o=m(l.blobs)).length;if(!t.tmp.suppress_decorations)for(n=0,a=l.decorations.length;n<a;n+=1)"@showid"===(c=l.decorations[n])[0]||t.normalDecorIsOrphan(l,c)||(o=t.fun.decorate[c[0]][c[1]].call(l,t,o,c[2]));if(o&&o.length){if(o=m(l.strings.prefix)+o+m(l.strings.suffix),t.opt.development_extensions.csl_reverse_lookup_support&&!t.tmp.suppress_decorations)for(n=0,a=l.decorations.length;n<a;n+=1)"@showid"===(c=l.decorations[n])[0]&&(o=t.fun.decorate[c[0]][c[1]].call(l,t,o,c[2]));d.push(o),t.tmp.count_offset_characters&&(t.tmp.offset_characters+=b+l.strings.suffix.length+l.strings.prefix.length)}}}else if(l.blobs.length){var _=t.output.string(t,l.blobs,l);if(i&&"string"!==_&&_.length>1&&l.strings.delimiter)for(var v=!1,n=0,a=_.length;n<a;n++)"string"!=typeof _[n]?v=!0:v&&(_[n]=l.strings.delimiter+_[n]);d=d.concat(_)}l.strings.first_blob&&t.registry.registry[l.strings.first_blob]&&(t.registry.registry[l.strings.first_blob].offset=t.tmp.offset_characters,t.tmp.count_offset_characters=!1)}for(s=0,r=d.length-1;s<r;s+=1)"number"!=typeof d[s].num||"number"!=typeof d[s+1].num||d[s+1].UGLY_DELIMITER_SUPPRESS_HACK||(d[s].strings.suffix=d[s].strings.suffix+(g||""),d[s+1].successor_prefix="",d[s+1].UGLY_DELIMITER_SUPPRESS_HACK=!0);for(var y=0,s=0,r=d.length;s<r;s+=1)"string"==typeof d[s]&&(y=parseInt(s,10)+1,s<d.length-1&&"object"==typeof d[s+1]&&(g&&!d[s+1].UGLY_DELIMITER_SUPPRESS_HACK&&(d[s]+=m(g)),d[s+1].UGLY_DELIMITER_SUPPRESS_HACK=!0));if(i&&(i.decorations.length||i.strings.suffix))y=d.length;else if(i&&i.strings.prefix){for(var s=0,r=d.length;s<r;s++)if(void 0!==d[s].num){y=s,0===s&&(d[s].strings.prefix=i.strings.prefix+d[s].strings.prefix);break}}var x=t.output.renderBlobs(d.slice(0,y),g,!1,i);if(x&&i&&(i.decorations.length||i.strings.suffix||i.strings.prefix)){if(!t.tmp.suppress_decorations)for(var s=0,r=i.decorations.length;s<r;s+=1)!(["@cite","@bibliography","@display","@showid"].indexOf((c=i.decorations[s])[0])>-1||t.normalDecorIsOrphan(l,c))&&c[0]&&"string"==typeof x&&(x=t.fun.decorate[c[0]][c[1]].call(i,t,x,c[2]));if(o=x,u=i.strings.suffix,o&&o.length&&(o=m(p=i.strings.prefix)+o+m(u),t.tmp.count_offset_characters&&(t.tmp.offset_characters+=p.length+u.length)),x=o,!t.tmp.suppress_decorations)for(var s=0,r=i.decorations.length;s<r;s+=1)-1!==["@cite","@bibliography","@display","@showid"].indexOf((c=i.decorations[s])[0])&&"string"==typeof x&&(x=t.fun.decorate[c[0]][c[1]].call(i,t,x,c[2]))}var I=d.slice(y,d.length);return!I.length&&x?d=[x]:I.length&&!x?d=I:x&&I.length&&(d=[x].concat(I)),void 0===i?(this.queue=[],this.current.mystack=[],this.current.mystack.push(this.queue),t.tmp.suppress_decorations&&(d=t.output.renderBlobs(d,void 0,!1))):"boolean"==typeof i&&(d=t.output.renderBlobs(d,void 0,!0)),i&&i.new_locale&&(t.opt.lang=i.old_locale),d},h.Output.Queue.prototype.clearlevel=function(){var t,e,i;for(e=0,i=(t=this.current.value()).blobs.length;e<i;e+=1)t.blobs.pop()}
1,h.Output.Queue.prototype.renderBlobs=function(t,e,i,s){if(d=h.getSafeEscape(this.state),e||(e=""),r=this.state,n="",a="",u=t.length,"citation"===this.state.tmp.area&&!this.state.tmp.just_looking&&1===u&&"object"==typeof t[0]&&s)return t[0].strings.prefix=s.strings.prefix+t[0].strings.prefix,t[0].strings.suffix=t[0].strings.suffix+s.strings.suffix,t[0].decorations=t[0].decorations.concat(s.decorations),t[0].params=s.params,t[0];var r,n,a,o,l,u,p,c,m,f,d,g=!0;for(l=0;l<u;l+=1)t[l].checkNext?(t[l].checkNext(t[l+1],g),g=!1):g=!t[l+1]||!t[l+1].splice_prefix;var b=!0;for(l=t.length-1;l>0;l+=-1)t[l].checkLast?b&&t[l].checkLast(t[l-1])&&(b=!1):b=!0;for(l=0,u=t.length;l<u;l+=1)if(o=t[l],n&&(a=e),"string"==typeof o)n+=d(a)+o,r.tmp.count_offset_characters&&(r.tmp.offset_characters+=a.length);else if(i)n=n?[n,o]:[o];else if(o.status!==h.SUPPRESS){var _=(m=o.particle?o.particle+o.num:o.formatter.format(o.num,o.gender)).replace(/<[^>]*>/g,"").length;this.append(m,"empty",!0);var v=this.pop(),y=r.tmp.count_offset_characters;if(m=this.string(r,[v],!1),r.tmp.count_offset_characters=y,o.strings["text-case"]&&(m=h.Output.Formatters[o.strings["text-case"]](this.state,m)),m&&this.state.tmp.strip_periods&&(m=m.replace(/\.([^a-z]|$)/g,"$1")),!r.tmp.suppress_decorations)for(p=0,c=o.decorations.length;p<c;p+=1)f=o.decorations[p],r.normalDecorIsOrphan(o,f)||(m=r.fun.decorate[f[0]][f[1]].call(o,r,m,f[2]));m=d(o.strings.prefix)+m+d(o.strings.suffix);var x="";o.status===h.END?x=d(o.range_prefix):o.status===h.SUCCESSOR?x=d(o.successor_prefix):o.status===h.START?x=l>0&&!o.suppress_splice_prefix?d(o.splice_prefix):"":o.status===h.SEEN&&(x=d(o.splice_prefix)),n+=x+m,r.tmp.count_offset_characters&&(r.tmp.offset_characters+=x.length+o.strings.prefix.length+_+o.strings.suffix.length)}return n},h.Output.Queue.purgeEmptyBlobs=function(t){if("object"==typeof t&&"object"==typeof t.blobs&&t.blobs.length)for(var e=t.blobs.length-1;e>-1;e--){h.Output.Queue.purgeEmptyBlobs(t.blobs[e]);var i=t.blobs[e];if(!i||!i.blobs||!i.blobs.length){for(var s=[];t.blobs.length-1>e;)s.push(t.blobs.pop());for(t.blobs.pop();s.length;)t.blobs.push(s.pop())}}},h.Output.Queue.adjust=function(t){var e={";":!0,":":!0},i={".":!0,"!":!0,"?":!0},s={"!":{".":"!","?":"!?",":":"!",",":"!,",";":"!;"},"?":{"!":"?!",".":"?",":":"?",",":"?,",";":"?;"},".":{"!":".!","?":".?",":":".:",",":".,",";":".;"},":":{"!":"!","?":"?",".":":",",":":,",";":":;"},",":{"!":",!","?":",?",":":",:",".":",.",";":",;"},";":{"!":"!","?":"?",":":";",",":";,",".":";"}},r={},n={},a={},o={};for(var l in s)a[l]=!0,o[l]=!0,e[l]||(r[l]=!0),i[l]||(n[l]=!0);o[" "]=!0,o["\xa0"]=!0;var u={};for(var l in s)for(var p in s[l])u[p]||(u[p]={}),u[p][l]=s[l][p];function h(t){return"number"==typeof t.num||t.blobs&&1===t.blobs.length&&"number"==typeof t.blobs[0].num}function c(t,e){var i=!1,s=["@font-style","@font-variant","@font-weight","@text-decoration","@vertical-align"];if(e&&s.push("@quotes"),t.decorations){for(var r=0,n=t.decorations.length;r<n;r++)if(s.indexOf(t.decorations[r][0])>-1){i=!0;break}}return i}function m(t,e,i,r,n){var a="blobs"===e?t:t.strings,o="blobs"===r?i:i.strings,l=a[e].slice(-1),p=o[r].slice(0,1);function h(){o[r]=o[r].slice(1)}function c(){a[e]=a[e].slice(0,-1)}var m=n?function(){return s[l]}:function(){return u[p]},f=n?function(){var t=s[l][p];"string"==typeof t?(c(),h(),o[r]=t+o[r]):(o[r]=l+o[r],c())}:function(){var t=u[p][l];"string"==typeof t?(c(),h(),a[e]+=t):(a[e]+=p,h())};l===p?(n?c:h)():m()&&f()}this.upward=function(t){if(t.blobs&&"string"==typeof t.blobs){a[t.strings.suffix.slice(0,1)]&&t.strings.suffix.slice(0,1)===t.blobs.slice(-1)&&(t.strings.suffix=t.strings.suffix.slice(1));return}if("object"==typeof t&&"object"==typeof t.blobs&&t.blobs.length)for(var e=c(t,!0),i=t.blobs.length-1;i>-1;i--){this.upward(t.blobs[i]);var s=t.strings,r=t.blobs[i].strings;if(0===i){" "===s.prefix.slice(-1)&&" "===r.prefix.slice(0,1)&&(r.prefix=r.prefix.slice(1));var n=r.prefix.slice(0,1);e||!o[n]||s.prefix||(s.prefix+=n,r.prefix=r.prefix.slice(1))}if(i===t.blobs.length-1){var n=r.suffix.slice(-1);!e&&[" "].indexOf(n)>
1-1&&(s.suffix.slice(0,1)!==n&&(s.suffix=n+s.suffix),r.suffix=r.suffix.slice(0,-1))}s.delimiter&&i>0&&o[s.delimiter.slice(-1)]&&s.delimiter.slice(-1)===r.prefix.slice(0,1)&&(r.prefix=r.prefix.slice(1))}},this.leftward=function(t){if("object"==typeof t&&"object"==typeof t.blobs&&t.blobs.length){for(var e=t.blobs.length-1;e>-1;e--)if(this.leftward(t.blobs[e]),e<t.blobs.length-1&&!t.strings.delimiter){var i=t.blobs[e],s=i.strings.suffix.slice(-1),r=t.blobs[e+1],n=r.strings.prefix.slice(0,1),o=c(i)||c(r),l="number"==typeof s||"number"==typeof n;if(!o&&!l&&a[n]&&!l){var u=n===i.strings.suffix.slice(-1),p=!i.strings.suffix&&"string"==typeof i.blobs&&i.blobs.slice(-1)===n;u||p?r.strings.prefix=r.strings.prefix.slice(1):m(i,"suffix",r,"prefix")}}}},this.downward=function(e){if(e.blobs&&"string"==typeof e.blobs){a[e.strings.suffix.slice(0,1)]&&e.strings.suffix.slice(0,1)===e.blobs.slice(-1)&&(e.strings.suffix=e.strings.suffix.slice(1));return}if("object"==typeof e&&"object"==typeof e.blobs&&e.blobs.length){for(var i=e.strings,s=0,r=e.blobs.length;s<r&&!h(e.blobs[s]);s++);if(i.delimiter&&a[i.delimiter.slice(0,1)]){for(var n=i.delimiter.slice(0,1),s=e.blobs.length-2;s>-1;s--){var l=e.blobs[s].strings;l.suffix.slice(-1)!==n&&(l.suffix+=n)}i.delimiter=i.delimiter.slice(1)}for(var s=e.blobs.length-1;s>-1;s--){var p=e.blobs[s],l=e.blobs[s].strings,f=c(p,!0),d=h(p);if(s===e.blobs.length-1){var g=i.suffix.slice(0,1),b=!1;!a[g]||(b=function t(e,i){var s=i.strings.suffix.slice(-1);s||"string"!=typeof i.blobs||(s=i.blobs.slice(-1));var r=u[e][s];return!!r&&1===r.length||"object"==typeof i.blobs&&!!t(e,i.blobs[i.blobs.length-1])}(g,p))||!t||(b=function t(e){if(e.decorations){for(var i=0,s=e.decorations.length;i<s;i++)if("@quotes"===e.decorations[i][0]&&"false"!==e.decorations[i][1])return!0}return"object"==typeof e.blobs&&t(e.blobs[e.blobs.length-1])}(p)),b&&a[g]&&!function t(e){return"number"==typeof e.num||!!e.blobs&&"object"==typeof e.blobs&&(!!t(e.blobs[e.blobs.length-1])||void 0)}(p)&&("string"==typeof p.blobs?m(p,"blobs",e,"suffix"):m(p,"suffix",e,"suffix"),"."===i.suffix.slice(0,1)&&(l.suffix+=i.suffix.slice(0,1),i.suffix=i.suffix.slice(1))),"\xa0"===l.suffix.slice(-1)&&" "===i.suffix.slice(0,1)&&(i.suffix=i.suffix.slice(1)),o[l.suffix.slice(0,1)]&&("string"==typeof p.blobs&&p.blobs.slice(-1)===l.suffix.slice(0,1)&&(l.suffix=l.suffix.slice(1)),l.suffix.slice(-1)===i.suffix.slice(0,1)&&(i.suffix=i.suffix.slice(0,-1))),function t(e,i){if(!a[i])return!1;if("string"==typeof e.blobs)return e.blobs.slice(-1)===i;var s=e.blobs[e.blobs.length-1];return!!s&&(s.strings.suffix.slice(-1)?s.strings.suffix.slice(-1)==i:t(s,i))}(e,e.strings.suffix.slice(0,1))&&(e.strings.suffix=e.strings.suffix.slice(1))}else if(i.delimiter)o[i.delimiter.slice(0,1)]&&i.delimiter.slice(0,1)===l.suffix.slice(-1)&&(e.blobs[s].strings.suffix=e.blobs[s].strings.suffix.slice(0,-1));else{var _=e.blobs[s+1].strings;h(p)||f||!o[l.suffix.slice(-1)]||l.suffix.slice(-1)!==_.prefix.slice(0,1)||(_.prefix=_.prefix.slice(1))}d||f||!a[l.suffix.slice(0,1)]||"string"!=typeof p.blobs||m(p,"blobs",p,"suffix"),this.downward(e.blobs[s])}}},this.fix=function(e){if("object"==typeof e&&"object"==typeof e.blobs&&e.blobs.length){for(var i,s=0,a=e.blobs.length;s<a;s++){for(var o=e.blobs[s],l=!1,u=0,p=o.decorations.length;u<p;u++){var h=o.decorations[u];"@quotes"===h[0]&&"false"!==h[1]&&(l=!0)}l&&(t?function(t){var e=t.strings.suffix.slice(0,1);if("string"==typeof t.blobs)for(;r[e];)m(t,"blobs",t,"suffix"),e=t.strings.suffix.slice(0,1);else for(;r[e];)m(t.blobs[t.blobs.length-1],"suffix",t,"suffix"),e=t.strings.suffix.slice(0,1)}(o):function(t){if("string"==typeof t.blobs)for(var e=t.blobs.slice(-1);n[e];)m(t,"blobs",t,"suffix",!0),e=t.blobs.slice(-1);else for(var e=t.blobs[t.blobs.length-1].strings.suffix.slice(-1);n[e];)m(t.blobs[t.blobs.length-1],"suffix",t,"suffix",!0),e=t.blobs[t.blobs.length-1].strings.suffix.slice(-1)}(o)),i=this.fix(e.blobs[s]),o.blobs&&"string"==typeof o.blobs&&(i=o.blobs.slice(-1))}return i}}},h.Engine.Opt=function(){this.parallel={enable:!1},this.has_disambiguate=!1,this.mode="html",this.dates={},this.jurisdictions_seen={},this.suppressedJurisdictions={},this.inheritedAttributes={},this["locale-sort"]=[],this["locale-translit"]=[],this["locale-translat"]=[],this.citeAffixes={persons:{"locale-orig":{prefix:"",suffix:""},"locale-translit":{prefix:"",suffix:""},"locale-translat":{prefix:"",suffix:""}},institutions:{"locale-orig":{prefix:"",suffix:""},"locale-translit":{prefix:"",suffix:""},"locale-translat":{prefix:"",suffix:""}},titles:{"locale-orig":{prefix:"",suffix:""},"locale-translit":{prefix:"",suffix:""},"locale-translat":{prefix:"",suffix:""}},journals:{"locale-orig":{prefix:"",suffix:""},"locale-translit":{prefix:"",suffix:""},"locale-translat":{prefix:"",suffix:""}},publishers:{"locale-orig":{prefix:"",suffix:""},"locale-translit":{prefix:"",suffix:""},"locale-translat":{prefix:"",suffix:""}},places:{"locale-orig":{prefix:"",suffix:""},"locale-translit":{prefix:"",suffix:""},"locale-translat":{prefix:"",suffix:""}}},this["default-locale"]=[],this.update_mode=h.NONE,this.bib_mode=h.NONE,this.sort_citations=!1,this["et-al-min"]=0,this["et-al-use-first"]=1,this["et-al-use-last"]=!1,this["et-al-subsequent-min"]=!1,this["et-al-subsequent-use-first"]=!1,this["demote-non-dropping-particle"]="display-and-sort",this["parse-names"]=!0,this.citation_number_slug=!1,this.trigraph="Aaaa00:AaAa00:AaAA00:AAAA00",this.nodenames=[],this.gender={},this["cite-lang-prefs"]={persons:["orig"],institutions:["orig"],titles:["orig"],journals:["orig"],publishers:["orig"],places:["orig"],number:["orig"]},this.has_layout_locale=!1,this.disable_duplicate_year_suppression=[],this.use_context_condition=!1,this.jurisdiction_fallbacks={},this.development_extensions={},this.development_extensions.field_hack=!0,this.development_extensions.allow_field_hack_date_override=!0,this.development_extensions.locator_date_and_revision=!0,this.development_extensions.locator_label_parse=!0,this.development_extensions.raw_date_parsing=!0,this.development_extensions.clean_up_csl_flaws=!0,this.development_extensions.consolidate_legal_items=!1,this.development_extensions.csl_reverse_lookup_support=!1,this.development_extensions.wrap_url_and_doi=!1,this.development_extensions.thin_non_breaking_space_html_hack=!1,this.development_extensions.apply_citation_wrapper=!1,this.development_extensions.main_title_from_short_title=!1,this.development_extensions.uppercase_subtitles=!1,this.development_extensions.normalize_lang_keys_to_lowercase=!1,this.development_extensions.strict_text_case_locales=!1,this.development_extensions.expect_and_symbol_form=!1,this.development_extensions.require_explicit_legal_case_title_short=!1,this.development_extensions.spoof_institutional_affiliations=!1,this.development_extensions.force_jurisdiction=!1,this.development_extensions.parse_names=!0,this.development_extensions.hanging_indent_legacy_number=!1,this.development_extensions.throw_on_empty=!1,this.development_extensions.strict_inputs=!0,this.development_extensions.prioritize_disambiguate_condition=!1,this.development_extensions.force_short_title_casing_alignment=!0,this.development_extensions.implicit_short_title=!1,this.development_extensions.force_title_abbrev_fallback=!1,this.development_extensions.split_container_title=!1,this.development_extensions.legacy_institution_name_ordering=!1,this.development_extensions.etal_min_etal_usefirst_hack=!1},h.Engine.Tmp=function(){this.names_max=new h.Stack,this.names_base=new h.Stack,this.givens_base=new h.Stack,this.value=[],this.namepart_decorations={},this.namepart_type=!1,this.area="citation",this.root="citation",this.extension="",this.can_substitute=new h.Stack(0,h.LITERAL),this.element_rendered_ok=!1,this.element_trace=new h.Stack("style"),this.nameset_counter=0,this.group_context=new h.Stack({term_intended:!1,variable_attempt:!1,variable_success:!1,output_tip:void 0,label_form:void 0,parallel_first:void 0,parallel_last:void 0,parallel_delimiter_override:void 0,condition:!1,force_suppress:!1,done_vars:[]}),this.term_predecessor=!1,this.in_cite_predecessor=!1,this.jump=new h.Stack(0,h.LITERAL),this.decorations=new h.Stack,this.tokenstore_stack=new h.Stack,this.last_suffix_used="",this.last_names_used=[],this.last_years_used=[],this.years_used=[],this.names_used=[],this.taintedItemIDs={},this.taintedCitationIDs={},this.initialize_with=new h.Stack,this.disambig_request=!1,this["name-as-sort-order"]=!1,this.suppress_decorations=!1,this.disambig_settings=new h.AmbigConfig,this.bib_sort_keys=[],this.prefix=new h.Stack("",h.LITERAL),this.suffix=new h.Stack("",h.LITERAL),this.delimiter=new h.Stack("",h.LITERAL),this.cite_locales=[],this.cite_affixes={citation:!1,bibliography:!1,citation_sort:!1,bibliography_sort:!1},this.strip_periods=0,this.shadow_numbers={},this.authority_stop_last=0,this.loadedItemIDs={},this.condition_counter=0,this.condition_lang_val_arr=[],this.condition_lang_counter_arr=[]},h.Engine.Fun=function(t){this.match=new h.Util.Match,this.suffixator=new h.Util.Suffixator(h.SUFFIX_CHARS),this.romanizer=new h.Util.Romanizer,this.ordinalizer=new h.Util.Ordinalizer(t),this.long_ordinalizer=new h.Util.LongOrdinalizer},h.Engine.Build=function(){this["alternate-term"]=!1,this.in_bibliography=!1,this.in_style=!1,this.skip=!1,this.postponed_macro=!1,this.layout_flag=!1,this.name=!1,this.names_variables=[[]],this.name_label=[{}],this.form=!1,this.term=!1,this.macro={},this.macro_stack=[],this.text=!1,this.lang=!1,this.area="citation",this.root="citation",this.extension="",this.substitute_level=new h.Stack(0,h.LITERAL),this.names_level=0,this.render_nesting_level=0,this.render_seen=!1,this.bibliography_key_pos=0},h.Engine.Configure=function(){this.tests=[],this.fail=[],this.succeed=[]},h.Engine.Citation=function(t){this.opt={inheritedAttributes:{}},this.tokens=[],this.srt=new h.Registry.Comparifier(t,"citation_sort"),this.opt.collapse=[],this.opt["disambiguate-add-names"]=!1,this.opt["disambiguate-add-givenname"]=!1,this.opt["disambiguate-add-year-suffix"]=!1,this.opt["givenname-disambiguation-rule"]="by-cite",this.opt["near-note-distance"]=5,this.opt.topdecor=[],this.opt.layout_decorations=[],this.opt.layout_prefix="",this.opt.layout_suffix="",this.opt.layout_delimiter="",this.opt.sort_locales=[],this.opt.max_number_of_names=0,this.root="citation"},h.Engine.Bibliography=function(){this.opt={inheritedAttributes:{}},this.tokens=[],this.opt.collapse=[],this.opt.topdecor=[],this.opt.layout_decorations=[],this.opt.layout_prefix="",this.opt.layout_suffix="",this.opt.layout_delimiter="",this.opt["line-spacing"]=1,this.opt["entry-spacing"]=1,this.opt.sort_locales=[],this.opt.max_number_of_names=0,this.root="bibliography"},h.Engine.BibliographySort=function(){this.tokens=[],this.opt={},this.opt.sort_directions=[],this.opt.topdecor=[],this.opt.citation_number_sort_direction=h.ASCENDING,this.opt.citation_number_secondary=!1,this.tmp={},this.keys=[],this.root="bibliography"},h.Engine.CitationSort=function(){this.tokens=[],this.opt={},this.opt.sort_directions=[],this.keys=[],this.opt.topdecor=[],this.root="citation"},h.Engine.InText=function(){this.opt={inheritedAttributes:{}},this.tokens=[],this.opt.collapse=[],this.opt["disambiguate-add-names"]=!1,this.opt["disambiguate-add-givenname"]=!1,this.opt["disambiguate-add-year-suffix"]=!1,this.opt["givenname-disambiguation-rule"]="by-cite",this.opt["near-note-distance"]=5,this.opt.topdecor=[],this.opt.layout_decorations=[],this.opt.layout_prefix="",this.opt.layout_suffix="",this.opt.layout_delimiter="",this.opt.sort_locales=[],this.opt.max_number_of_names=0,this.root="intext"}
1,h.Engine.prototype.previewCitationCluster=function(t,e,i,s){var r=this.opt.mode;this.setOutputFormat(s),t.citationID&&delete t.citationID;var n=this.processCitationCluster(t,e,i,h.PREVIEW);return this.setOutputFormat(r),n[1]},h.Engine.prototype.appendCitationCluster=function(t){for(var e=[],i=this.registry.citationreg.citationByIndex.length,s=0;s<i;s+=1){var r=this.registry.citationreg.citationByIndex[s];e.push([""+r.citationID,r.properties.noteIndex])}return this.processCitationCluster(t,e,[])[1]},h.Engine.prototype.processCitationCluster=function(t,e,i,s){if(this.debug=!1,this.tmp.loadedItemIDs={},this.tmp.citation_errors=[],this.registry.return_data={bibchange:!1},this.setCitationId(t),s===h.PREVIEW){this.debug&&h.debug("****** start state save *********"),ti=this.registry.citationreg.citationByIndex.slice(),ts=this.registry.reflist.slice();for(var r=e.concat(i),n={},a=[],o=0,l=r.length;o<l;o+=1)for(V=0,$=(z=this.registry.citationreg.citationById[r[o][0]]).citationItems.length;V<$;V+=1)n[z.citationItems[V].id]=!0,a.push(""+z.citationItems[V].id);for(V=0,$=t.citationItems.length;V<$;V+=1)n[t.citationItems[V].id]=!0,a.push(""+t.citationItems[V].id);tr={};for(var o=0,l=ts.length;o<l;o+=1)if(!n[ts[o].id]){var u=this.registry.registry[ts[o].id].ambig,p=this.registry.ambigcites[u];if(p)for(V=0,$=p.length;V<$;V+=1)tr[p[V]]=h.cloneAmbigConfig(this.registry.registry[p[V]].disambig)}this.debug&&h.debug("****** end state save *********")}this.tmp.taintedCitationIDs={};for(var c=[],m={},o=0,l=t.citationItems.length;o<l;o+=1){for(var f in Z={},t.citationItems[o])Z[f]=t.citationItems[o][f];if((K=this.retrieveItem(""+Z.id)).id&&this.transform.loadAbbreviation("default","hereinafter",K.id,K.language),Z=h.parseLocator.call(this,Z),this.opt.development_extensions.consolidate_legal_items&&this.remapSectionVariable([[K,Z]]),this.opt.development_extensions.locator_label_parse&&Z.locator&&-1===["bill","gazette","legislation","regulation","treaty"].indexOf(K.type)&&(!Z.label||"page"===Z.label)){var d=h.LOCATOR_LABELS_REGEXP.exec(Z.locator);if(d){var g=h.LOCATOR_LABELS_MAP[d[2]];this.getTerm(g)&&(Z.label=g,Z.locator=d[3])}}var b=[K,Z];c.push(b),t.citationItems[o].item=K}t.sortedItems=c;var _=[],v={};for(o=0,l=e.length;o<l;o+=1)G=e[o],this.opt.development_extensions.strict_inputs&&(v[G[0]]&&h.error("Previously referenced citationID "+G[0]+" encountered in citationsPre"),G[1]&&(tn>G[1]&&h.debug("Note index sequence is not sane at citationsPre["+o+"]"),tn=G[1])),this.registry.citationreg.citationById[G[0]].properties.noteIndex=G[1],_.push(this.registry.citationreg.citationById[G[0]]),v[G[0]]=this.registry.citationreg.citationById[G[0]];for(t.properties||(t.properties={noteIndex:0}),this.opt.development_extensions.strict_inputs&&(v[t.citationID]&&h.error("Citation with previously referenced citationID "+t.citationID),t.properties.noteIndex&&(tn>t.properties.noteIndex&&h.debug("Note index sequence is not sane for citation "+t.citationID),tn=t.properties.noteIndex)),_.push(t),v[t.citationID]=t,o=0,l=i.length;o<l;o+=1)F=i[o],this.opt.development_extensions.strict_inputs&&(v[F[0]]&&h.error("Previously referenced citationID "+F[0]+" encountered in citationsPost"),F[1]&&(tn>F[1]&&h.debug("Note index sequence is not sane at postCitation["+o+"]"),tn=F[1])),this.registry.citationreg.citationById[F[0]].properties.noteIndex=F[1],_.push(this.registry.citationreg.citationById[F[0]]),v[F[0]]=this.registry.citationreg.citationById[F[0]];this.registry.citationreg.citationByIndex=_,this.registry.citationreg.citationById=v,this.registry.citationreg.citationsByItemId={},this.opt.update_mode===h.POSITION&&(tt=[],Y=[],te={});for(var y=[],o=0,l=_.length;o<l;o+=1){for(V=0,_[o].properties.index=o,$=_[o].sortedItems.length;V<$;V+=1)Z=_[o].sortedItems[V],this.registry.citationreg.citationsByItemId[Z[1].id]||(this.registry.citationreg.citationsByItemId[Z[1].id]=[],y.push(""+Z[1].id)),-1===this.registry.citationreg.citationsByItemId[Z[1].id].indexOf(_[o])&&this.registry.citationreg.citationsByItemId[Z[1].id].push(_[o]);this.opt.update_mode===h.POSITION&&(_[o].properties.noteIndex?Y.push(_[o]):(_[o].properties.noteIndex=0,tt.push(_[o])))}
1if(s!==h.ASSUME_ALL_ITEMS_REGISTERED&&(this.debug&&h.debug("****** start update items *********"),this.updateItems(y,null,null,!0),this.debug&&h.debug("****** endo update items *********")),!this.opt.citation_number_sort&&c&&c.length>1&&this.citation_sort.tokens.length>0){for(var o=0,l=c.length;o<l;o+=1)c[o][1].sortkeys=h.getSortKeys.call(this,c[o][0],"citation_sort");if(this.opt.grouped_sort&&!t.properties.unsorted){for(var o=0,l=c.length;o<l;o+=1){var x=c[o][1].sortkeys;this.tmp.authorstring_request=!0;var I=this.registry.registry[c[o][0].id].disambig;this.tmp.authorstring_request=!0,h.getAmbiguousCite.call(this,c[o][0],I);var O=this.registry.authorstrings[c[o][0].id];this.tmp.authorstring_request=!1,c[o][1].sortkeys=[O].concat(x)}c.sort(this.citation.srt.compareCompositeKeys);for(var T=!1,S=!1,N=!1,o=0,l=c.length;o<l;o+=1)c[o][1].sortkeys[0]!==T&&(N=c[o][1].sortkeys[0],S=c[o][1].sortkeys[1]),c[o][1].sortkeys[0]=""+S+o,T=N}t.properties.unsorted||c.sort(this.citation.srt.compareCompositeKeys)}if(this.opt.parallel.enable&&this.parallel.StartCitation(t.sortedItems),this.opt.update_mode===h.POSITION)for(var o=0;o<2;o+=1){var A={},E={},k={};for(V=0,$=(ta=[tt,Y][o]).length;V<$;V+=1){var R=ta[V];for(ta[V].properties.noteIndex||(ta[V].properties.noteIndex=0),ta[V].properties.noteIndex=parseInt(ta[V].properties.noteIndex,10),V>0&&R.properties.noteIndex&&ta[V-1].properties.noteIndex>R.properties.noteIndex&&(te={},A={},E={},k={}),W=0,J=R.sortedItems.length;W<J;W+=1)R.sortedItems[W][1].parallel&&"first"!==R.sortedItems[W][1].parallel||(te[R.properties.noteIndex]?te[R.properties.noteIndex]+=1:te[R.properties.noteIndex]=1);for(W=0,J=ta[V].sortedItems.length;W<J;W+=1){var w=(Z=ta[V].sortedItems[W])[0].id,j=Z[0].legislation_id?Z[0].legislation_id:Z[0].id,C=Z[0].legislation_id?Z[0].legislation_id:Z[0].container_id?Z[0].container_id:Z[0].id,L=Z[1]["locator-extra"],D=Z[1].locator,P=Z[1].label;if(W>0){if(R.sortedItems[W-1][0].legislation_id)to=R.sortedItems[W-1][0].legislation_id;else{to=R.sortedItems[W-1][1].id,tl=R.sortedItems[W-1][1]["locator-extra"];for(var U=W-2;U>-1;U--)"first"===R.sortedItems[U][1].parallel&&(to=R.sortedItems[U][1].id,tl=R.sortedItems[U][1]["locator-extra"])}}if(s===h.PREVIEW&&R.citationID!=t.citationID){void 0===A[Z[1].id]&&(A[j]=R.properties.noteIndex),E[C]=R.properties.noteIndex;continue}var B={};if(B.position=Z[1].position,B["first-reference-note-number"]=Z[1]["first-reference-note-number"],B["first-container-reference-note-number"]=Z[1]["first-container-reference-note-number"],B["near-note"]=Z[1]["near-note"],Z[1]["first-reference-note-number"]=0,Z[1]["first-container-reference-note-number"]=0,Z[1]["near-note"]=!1,this.registry.citationreg.citationsByItemId[w]&&"note"===this.opt.xclass&&this.opt.has_disambiguate){var M=this.registry.registry[Z[0].id]["citation-count"],q=this.registry.citationreg.citationsByItemId[w].length;if(this.registry.registry[Z[0].id]["citation-count"]=this.registry.citationreg.citationsByItemId[w].length,"number"==typeof M){if(M<2!=q<2)for(var U=0,X=this.registry.citationreg.citationsByItemId[w].length;U<X;U++)m[this.registry.registry[Z[0].id].ambig]=!0,this.tmp.taintedCitationIDs[this.registry.citationreg.citationsByItemId[w][U].citationID]=!0}else for(var U=0,X=this.registry.citationreg.citationsByItemId[w].length;U<X;U++)m[this.registry.registry[Z[0].id].ambig]=!0,this.tmp.taintedCitationIDs[this.registry.citationreg.citationsByItemId[w][U].citationID]=!0}if(void 0===E[C]&&"author-only"!==R.properties.mode)A[j]=R.properties.noteIndex,E[C]=R.properties.noteIndex,k[C]=R.properties.noteIndex,Z[1].position=h.POSITION_FIRST;else{var z,G,F,o,l,V,$,W,J,Q,H,f,K,Z,Y,tt,d,te,ti,ts,tr,tn,ta,to,tl,tu,tp,th,tc,tm,tf,td=!1,tg=!1,tb=null;if(V>0)var tb=ta[V-1];var t_=ta[V];if(V>0){var tv=1;"author-only"===tb.properties.mode&&V>1&&(tv=2);var ty=V-tv;ta[ty].sortedItems.length&&(tu=ta[ty].sortedItems.slice(-1)[0][1].id,tp=ta[V-tv].sortedItems.slice(-1)[0][1]["locator-extra"]),tb.sortedItems.length&&tb.sortedItems[0].slice(-1)[0].legislation_id&&(tu=tb.sortedItems[0].slice(-1)[0].legislation_id)}if(V>0&&0===W&&tb.properties.noteIndex!==t_.properties.noteIndex){var tx=!1,tI=tb.sortedItems[0][0].id;if(tb.sortedItems[0][0].legislation_id&&(tI=tb.sortedItems[0][0].legislation_id),tI==j&&tb.properties.noteIndex>=t_.properties.noteIndex-1){var tO=tb.sortedItems[0][1]["locator-extra"],tT=t_.sortedItems[0][1]["locator-extra"];(1===te[tb.properties.noteIndex]||0===tb.properties.noteIndex)&&tO===tT&&(tx=!0)}tx?td=!0:tg=!0}else W>0&&to==j&&tl==L?td=!0:0===W&&V>0&&tb.properties.noteIndex==t_.properties.noteIndex&&tb.sortedItems.length&&tu==j&&tp==L?td=!0:tg=!0;td&&((th=W>0?R.sortedItems[W-1][1]:ta[V-1].sortedItems[0][1]).locator?(tm=th.label?th.label:"",tc=""+th.locator+tm):tc=th.locator,tf=D?""+D+(P||""):D),td&&tc&&!tf&&(td=!1,tg=!0),td&&(!tc&&tf?Z[1].position=h.POSITION_IBID_WITH_LOCATOR:tc||tf?tc&&tf===tc?Z[1].position=h.POSITION_IBID:tc&&tf&&tf!==tc?Z[1].position=h.POSITION_IBID_WITH_LOCATOR:(td=!1,tg=!0):Z[1].position=h.POSITION_IBID),tg&&(Z[1].position=h.POSITION_CONTAINER_SUBSEQUENT,void 0===A[j]?A[j]=R.properties.noteIndex:Z[1].position=h.POSITION_SUBSEQUENT),(tg||td)&&("author-only"===R.properties.mode&&(Z[1].position=h.POSITION_FIRST),k[C]!=R.properties.noteIndex&&(Z[1]["first-container-reference-note-number"]=k[C],this.registry.registry[Z[0].id]&&(this.registry.registry[Z[0].id]["first-container-reference-note-number"]=k[C])),A[j]!=R.properties.noteIndex&&(Z[1]["first-reference-note-number"]=A[j],this.registry.registry[Z[0].id]&&(this.registry.registry[Z[0].id]["first-reference-note-number"]=A[j])))}if(R.properties.noteIndex){var tS=parseInt(R.properties.noteIndex,10)-parseInt(E[C],10);Z[1].position!==h.POSITION_FIRST&&tS<=this.citation.opt["near-note-distance"]&&(Z[1]["near-note"]=!0),E[C]=R.properties.noteIndex}else Z[1].position!==h.POSITION_FIRST&&(Z[1]["near-note"]=!0);if(R.citationID!=t.citationID)for(Q=0,H=h.POSITION_TEST_VARS.length;Q<H;Q+=1){var tN=h.POSITION_TEST_VARS[Q];Z[1][tN]!==B[tN]&&(this.registry.registry[Z[0].id]&&"first-reference-note-number"===tN&&(m[this.registry.registry[Z[0].id].ambig]=!0,this.tmp.taintedItemIDs[Z[0].id]=!0),this.tmp.taintedCitationIDs[R.citationID]=!0)}this.sys.variableWrapper&&(Z[1].index=R.properties.index,Z[1].noteIndex=R.properties.noteIndex)}}}if(this.opt.citation_number_sort&&c&&c.length>1&&this.citation_sort.tokens.length>0&&!t.properties.unsorted){for(var o=0,l=c.length;o<l;o+=1)c[o][1].sortkeys=h.getSortKeys.call(this,c[o][0],"citation_sort");c.sort(this.citation.srt.compareCompositeKeys)}for(var f in this.tmp.taintedItemIDs)if(this.tmp.taintedItemIDs.hasOwnProperty(f)&&(ta=this.registry.citationreg.citationsByItemId[f]))for(var o=0,l=ta.length;o<l;o+=1)this.tmp.taintedCitationIDs[ta[o].citationID]=!0;var tA=[];if(s===h.PREVIEW){this.debug&&h.debug("****** start run processor *********");try{tA=this.process_CitationCluster.call(this,t.sortedItems,t)}catch(t){h.error("Error running CSL processor for preview: "+t)}this.debug&&(h.debug("****** end run processor *********"),h.debug("****** start state restore *********")),this.registry.citationreg.citationByIndex=ti,this.registry.citationreg.citationById={};for(var o=0,l=ti.length;o<l;o+=1)this.registry.citationreg.citationById[ti[o].citationID]=ti[o];this.debug&&h.debug("****** start final update *********");for(var tE=[],o=0,l=ts.length;o<l;o+=1)tE.push(""+ts[o].id);for(var f in this.updateItems(tE,null,null,!0),this.debug&&h.debug("****** end final update *********"),tr)tr.hasOwnProperty(f)&&(this.registry.registry[f].disambig=tr[f]);this.debug&&h.debug("****** end state restore *********")}else{for(var tk in m)this.disambiguate.run(tk,t);for(var f in this.tmp.taintedCitationIDs)if(f!=t.citationID){var tR,tw=this.registry.citationreg.citationById[f];if(!tw.properties.unsorted){for(var o=0,l=tw.sortedItems.length;o<l;o+=1)tw.sortedItems[o][1].sortkeys=h.getSortKeys.call(this,tw.sortedItems[o][0],"citation_sort");tw.sortedItems.sort(this.citation.srt.compareCompositeKeys)}this.tmp.citation_pos=tw.properties.index,this.tmp.citation_note_index=tw.properties.noteIndex,this.tmp.citation_id=""+tw.citationID,(tR=[]).push(tw.properties.index),tR.push(this.process_CitationCluster.call(this,tw.sortedItems,tw)),tR.push(tw.citationID),tA.push(tR)}this.tmp.taintedItemIDs={},this.tmp.taintedCitationIDs={},this.tmp.citation_pos=t.properties.index,this.tmp.citation_note_index=t.properties.noteIndex,this.tmp.citation_id=""+t.citationID,(tR=[]).push(e.length),tR.push(this.process_CitationCluster.call(this,c,t)),tR.push(t.citationID),tA.push(tR),tA.
1sort(function(t,e){return t[0]>e[0]?1:t[0]<e[0]?-1:0})}return this.registry.return_data.citation_errors=this.tmp.citation_errors.slice(),[this.registry.return_data,tA]},h.Engine.prototype.process_CitationCluster=function(t,e){var i="";if(e&&e.properties&&"composite"===e.properties.mode){e.properties.mode="author-only";var s=h.getCitationCluster.call(this,t,e);e.properties.mode="suppress-author";var r="";e.properties.infix&&(this.output.append(e.properties.infix),"object"==typeof(r=this.output.string(this,this.output.queue))&&(r=r.join("")));var n=h.getCitationCluster.call(this,t,e);e.properties.mode="composite",s&&r&&h.SWAPPING_PUNCTUATION.concat(["â","'"]).indexOf(r[0])>-1&&(s+=r,r=!1),i=[s,r,n].filter(function(t){return t}).join(" ")}else i=h.getCitationCluster.call(this,t,e);return i},h.Engine.prototype.makeCitationCluster=function(t){for(n=0,i=[],a=t.length;n<a;n+=1){for(var e in o={},t[n])o[e]=t[n][e];if(l=this.retrieveItem(""+o.id),this.opt.development_extensions.locator_label_parse&&o.locator&&-1===["bill","gazette","legislation","regulation","treaty"].indexOf(l.type)&&(!o.label||"page"===o.label)){var i,s,r,n,a,o,l,u=h.LOCATOR_LABELS_REGEXP.exec(o.locator);if(u){var p=h.LOCATOR_LABELS_MAP[u[2]];this.getTerm(p)&&(o.label=p,o.locator=u[3])}}o.locator&&(o.locator=(""+o.locator).replace(/\s+$/,"")),s=[l,o],i.push(s)}if(this.opt.development_extensions.consolidate_legal_items&&this.remapSectionVariable(i),i&&i.length>1&&this.citation_sort.tokens.length>0){for(n=0,a=i.length;n<a;n+=1)i[n][1].sortkeys=h.getSortKeys.call(this,i[n][0],"citation_sort");i.sort(this.citation.srt.compareCompositeKeys)}this.tmp.citation_errors=[];var r=h.getCitationCluster.call(this,i);return r},h.getAmbiguousCite=function(t,e,i,s){var r,n=this.tmp.group_context.tip,a={term_intended:n.term_intended,variable_attempt:n.variable_attempt,variable_success:n.variable_success,output_tip:n.output_tip,label_form:n.label_form,non_parallel:n.non_parallel,parallel_last:n.parallel_last,parallel_first:n.parallel_first,parallel_last_override:n.parallel_last_override,parallel_delimiter_override:n.parallel_delimiter_override,parallel_delimiter_override_on_suppress:n.parallel_delimiter_override_on_suppress,condition:n.condition,force_suppress:n.force_suppress,done_vars:n.done_vars.slice()};e?this.tmp.disambig_request=e:this.tmp.disambig_request=!1;var o={position:h.POSITION_SUBSEQUENT,"near-note":!0};s&&(o.locator=s.locator,o.label=s.label),this.registry.registry[t.id]&&this.registry.citationreg.citationsByItemId&&this.registry.citationreg.citationsByItemId[t.id]&&this.registry.citationreg.citationsByItemId[t.id].length&&i&&"by-cite"===this.citation.opt["givenname-disambiguation-rule"]&&(o["first-reference-note-number"]=this.registry.registry[t.id]["first-reference-note-number"]),this.tmp.area="citation",this.tmp.root="citation";var l=this.tmp.suppress_decorations;this.tmp.suppress_decorations=!0,this.tmp.just_looking=!0,h.getCite.call(this,t,o,null,!1);for(var u=0,p=this.output.queue.length;u<p;u+=1)h.Output.Queue.purgeEmptyBlobs(this.output.queue[u]);if(this.opt.development_extensions.clean_up_csl_flaws)for(var c=0,m=this.output.queue.length;c<m;c+=1)this.output.adjust.upward(this.output.queue[c]),this.output.adjust.leftward(this.output.queue[c]),this.output.adjust.downward(this.output.queue[c]),this.output.adjust.fix(this.output.queue[c]);var r=this.output.string(this,this.output.queue);return this.tmp.just_looking=!1,this.tmp.suppress_decorations=l,this.tmp.group_context.replace(a),r},h.getSpliceDelimiter=function(t,e,i){if(void 0!==this.citation.opt["after-collapse-delimiter"])t?this.tmp.splice_delimiter=this.citation.opt["after-collapse-delimiter"]:e&&!this.tmp.have_collapsed?this.tmp.splice_delimiter=this.citation.opt["after-collapse-delimiter"]:e||this.tmp.have_collapsed||"year-suffix"===this.citation.opt.collapse?this.tmp.splice_delimiter=this.citation.opt.layout_delimiter:this.tmp.splice_delimiter=this.citation.opt["after-collapse-delimiter"];else if(this.tmp.use_cite_group_delimiter)this.tmp.splice_delimiter=this.citation.opt.cite_group_delimiter;else if(this.tmp.have_collapsed&&"in-text"===this.opt.xclass&&this.opt.update_mode!==h.NUMERIC)this.tmp.splice_delimiter=", ";else if(this.tmp.cite_locales[i-1]){var s=this.tmp.cite_affixes[this.tmp.area][this.tmp.cite_locales[i-1]];s&&s.delimiter&&(this.tmp.splice_delimiter=s.delimiter)}else this.tmp.splice_delimiter||(this.tmp.splice_delimiter="");return this.tmp.splice_delimiter},h.getCitationCluster=function(t,e){var i,s,r,n,a,o,l,u,p,c,m,f,d,g,b,_,v,y,x,I,O,T="";this.output.checkNestedBrace=new h.checkNestedBrace(this),e&&(x=e.citationID,I="author-only"===e.properties.mode&&!!e.properties.mode,"note"!==this.opt.xclass&&(O="suppress-author"===e.properties.mode&&!!e.properties.mode),e.properties.prefix&&(T=h.checkPrefixSpaceAppend(this,e.properties.prefix))),t=t||[],this.tmp.last_primary_names_string=!1,v=h.getSafeEscape(this),this.tmp.area="citation",this.tmp.root="citation",i="",s=[],this.tmp.last_suffix_used="",this.tmp.last_names_used=[],this.tmp.last_years_used=[],this.tmp.backref_index=[],this.tmp.cite_locales=[],this.tmp.just_looking||(this.tmp.abbrev_trimmer={QUASHES:{}});var S=this.output.checkNestedBrace.update(this.citation.opt.layout_prefix+T),N=!1;if(this.citation.opt.suppressTrailingPunctuation&&(N=!0),x&&this.registry.citationreg.citationById[x].properties["suppress-trailing-punctuation"]&&(N=!0),"note"===this.opt.xclass){for(var A=[],E=!1,k=!1,R=[],w=0,j=t.length;w<j;w+=1){var C=t[w][0].type,L=t[w][0].title,D=t[w][1].position,P=t[w][0].id;L&&"legal_case"===C&&P!==k&&D&&((L!==E||0===A.length)&&(R=[],A.push(R)),R.push(t[w][1])),E=L,k=P}for(w=0,j=A.length;w<j;w+=1)if(!((R=A[w]).length<2)){var U=R.slice(-1)[0].locator;if(U)for(var B=0,M=R.length-1;B<M;B+=1)R[B].locator&&(U=!1);U&&(R[0].locator=U,delete R.slice(-1)[0].locator,R[0].label=R.slice(-1)[0].label,R.slice(-1)[0].label&&delete R.slice(-1)[0].label)}}for(r=[],n=t.length,t[0]&&t[0][1]&&(I?(delete t[0][1]["suppress-author"],t[0][1]["author-only"]=!0):O&&(delete t[0][1]["author-only"],t[0][1]["suppress-author"]=!0)),this.opt.parallel.enable&&this.parallel.StartCitation(t),a=0;a<n;a+=1){this.tmp.cite_index=a,f=t[a][0],o=t[a][1],o=h.parseLocator.call(this,o),l=this.tmp.have_collapsed;var q=!1;if(a>0&&t[a-1][1]&&(q=!!t[a-1][1].locator),u={},this.tmp.shadow_numbers={},!this.tmp.just_looking&&this.opt.hasPlaceholderTerm){var X=this.output;this.output=new h.Output.Queue(this),this.output.adjust=new h.Output.Queue.adjust,h.getAmbiguousCite.call(this,f,null,!1,o),this.output=X}if(this.tmp.in_cite_predecessor=!1,a>0?h.getCite.call(this,f,o,""+t[a-1][0].id,!0):(this.tmp.term_predecessor=!1,h.getCite.call(this,f,o,null,!0)),this.tmp.cite_renders_content||(y={citationID:""+this.tmp.citation_id,index:this.tmp.citation_pos,noteIndex:this.tmp.citation_note_index,itemID:""+f.id,citationItems_pos:a,error_code:h.ERROR_NO_RENDERED_FORM},this.tmp.citation_errors.push(y)),u.splice_delimiter=h.getSpliceDelimiter.call(this,q,l,a),o&&o["author-only"]&&(this.tmp.suppress_decorations=!0),a>0){var z=(_=t[a-1][1]).suffix&&[";",".",","].indexOf(_.suffix.slice(-1))>-1,G=!_.suffix&&o.prefix&&[";",".",","].indexOf(o.prefix.slice(0,1))>-1;if(z||G){var F=u.splice_delimiter.indexOf(" ");F>-1&&!G?u.splice_delimiter=u.splice_delimiter.slice(F):u.splice_delimiter=""}}if(u.suppress_decorations=this.tmp.suppress_decorations,u.have_collapsed=this.tmp.have_collapsed,r.push(u),o["author-only"])break}m=this.output.queue.slice();var V="";e&&(V=h.checkSuffixSpacePrepend(this,e.properties.suffix));var $=this.citation.opt.layout_suffix,W=this.tmp.cite_locales[this.tmp.cite_locales.length-1];W&&this.tmp.cite_affixes[this.tmp.area][W]&&this.tmp.cite_affixes[this.tmp.area][W].suffix&&($=this.tmp.cite_affixes[this.tmp.area][W].suffix
1),h.TERMINAL_PUNCTUATION.slice(0,-1).indexOf($.slice(0,1))>-1&&($=$.slice(0,1)),$=this.output.checkNestedBrace.update(V+$);for(var w=0,j=this.output.queue.length;w<j;w+=1)h.Output.Queue.purgeEmptyBlobs(this.output.queue[w]);if(this.tmp.suppress_decorations||!this.output.queue.length||this.opt.development_extensions.apply_citation_wrapper&&this.sys.wrapCitationEntry&&!this.tmp.just_looking&&"citation"===this.tmp.area||(N||(this.output.queue[this.output.queue.length-1].strings.suffix=$),this.output.queue[0].strings.prefix=S),this.opt.development_extensions.clean_up_csl_flaws)for(var B=0,M=this.output.queue.length;B<M;B+=1)this.output.adjust.upward(this.output.queue[B]),this.output.adjust.leftward(this.output.queue[B]),this.output.adjust.downward(this.output.queue[B]),this.tmp.last_chr=this.output.adjust.fix(this.output.queue[B]);for(a=0,n=m.length;a<n;a+=1){var J=[];if(this.output.queue=[m[a]],this.tmp.suppress_decorations=r[a].suppress_decorations,this.tmp.splice_delimiter=r[a].splice_delimiter,m[a].parallel_delimiter&&(this.tmp.splice_delimiter=m[a].parallel_delimiter),this.tmp.have_collapsed=r[a].have_collapsed,p=this.output.string(this,this.output.queue),this.tmp.suppress_decorations=!1,"string"==typeof p)return this.tmp.suppress_decorations=!1,p||(this.opt.development_extensions.throw_on_empty?h.error("Citation would render no content"):p="[NO_PRINTED_FORM]"),p;if("object"==typeof p&&0===p.length&&!o["suppress-author"]){if(0===a){var Q=0===a?v(this.citation.opt.layout_prefix):"",H=a===m.length-1?v(this.citation.opt.layout_suffix):"";p.push(Q+"[CSL STYLE ERROR: reference with no printed form.]"+H)}else if(a===m.length-1){var K=s[s.length-1];"string"==typeof K?s[s.length-1]+=v(this.citation.opt.layout_suffix):"object"==typeof K&&(K.strings.suffix+=v(this.citation.opt.layout_suffix))}}if(J.length&&"string"==typeof p[0]){p.reverse();var Z=p.pop();Z&&","===Z.slice(0,1)?J.push(Z):"string"==typeof J.slice(-1)[0]&&","===J.slice(-1)[0].slice(-1)?J.push(" "+Z):Z&&J.push(v(this.tmp.splice_delimiter)+Z)}else p.reverse(),void 0!==(c=p.pop())&&(J.length&&"string"==typeof J[J.length-1]&&(J[J.length-1]+=c.successor_prefix),J.push(c));for(g=0,d=p.length;g<d;g+=1){if("string"==typeof(b=p[g])){J.push(v(this.tmp.splice_delimiter)+b);continue}void 0!==(c=p.pop())&&J.push(c)}0===J.length&&t[a][1]["suppress-author"],J.length>1&&"string"!=typeof J[0]&&(J=[this.output.renderBlobs(J)]),J.length&&("string"==typeof J[0]?a>0&&(J[0]=v(this.tmp.splice_delimiter)+J[0]):a>0?J[0].splice_prefix=this.tmp.splice_delimiter:J[0].splice_prefix=""),s=s.concat(J)}if((i+=this.output.renderBlobs(s))&&!this.tmp.suppress_decorations)for(a=0,n=this.citation.opt.layout_decorations.length;a<n;a+=1)"normal"!==(u=this.citation.opt.layout_decorations[a])[1]&&(o&&o["author-only"]||(i=this.fun.decorate[u[0]][u[1]](this,i)));return this.tmp.suppress_decorations=!1,i||(this.opt.development_extensions.throw_on_empty?h.error("Citation would render no content"):i="[NO_PRINTED_FORM]"),i},h.getCite=function(t,e,i,s){var r,n,a=this.tmp.area;for(e&&e["author-only"]&&this.intext&&this.intext.tokens.length>0&&(this.tmp.area="intext"),this.tmp.cite_renders_content=!1,this.tmp.probably_rendered_something=!1,this.tmp.prevItemID=i,h.citeStart.call(this,t,e,s),r=0,this.tmp.name_node={},this.nameOutput=new h.NameOutput(this,t,e);r<this[this.tmp.area].tokens.length;)r=h.tokenExec.call(this,this[this.tmp.area].tokens[r],t,e);return h.citeEnd.call(this,t,e),this.tmp.cite_renders_content||this.tmp.just_looking||"bibliography"!==this.tmp.area||(n={index:this.tmp.bibliography_pos,itemID:""+t.id,error_code:h.ERROR_NO_RENDERED_FORM},this.tmp.bibliography_errors.push(n)),this.tmp.area=a,""+t.id},h.citeStart=function(t,e,i){if(this.tmp.lang_array=[],t.language){var s=t.language.match(/^([a-zA-Z]+).*/);s&&this.tmp.lang_array.push(s[1].toLowerCase())}if(this.tmp.lang_array.push(this.opt.lang),i||(this.tmp.shadow_numbers={}),this.tmp.disambiguate_count=0,this.tmp.disambiguate_maxMax=0,this.tmp.same_author_as_previous_cite=!1,this.tmp.suppress_decorations?this.tmp.subsequent_author_substitute_ok=!1:this.tmp.subsequent_author_substitute_ok=!0,this.tmp.lastchr="","citation"===this.tmp.area&&this.citation.opt.collapse&&this.citation.opt.collapse.length?this.tmp.have_collapsed=!0:this.tmp.have_collapsed=!1,this.tmp.render_seen=!1,this.tmp.disambig_request&&!this.tmp.disambig_override?this.tmp.disambig_settings=this.tmp.disambig_request:this.registry.registry[t.id]&&!this.tmp.disambig_override?(this.tmp.disambig_request=this.registry.registry[t.id].disambig,this.tmp.disambig_settings=this.registry.registry[t.id].disambig):this.tmp.disambig_settings=new h.AmbigConfig,"citation"!==this.tmp.area){if(this.registry.registry[t.id]){if
1(this.tmp.disambig_restore=h.cloneAmbigConfig(this.registry.registry[t.id].disambig),"bibliography"===this.tmp.area&&this.tmp.disambig_settings&&this.tmp.disambig_override&&(this.opt["disambiguate-add-names"]&&(this.tmp.disambig_settings.names=this.registry.registry[t.id].disambig.names.slice(),this.tmp.disambig_request&&(this.tmp.disambig_request.names=this.registry.registry[t.id].disambig.names.slice())),this.opt["disambiguate-add-givenname"])){this.tmp.disambig_request=this.tmp.disambig_settings,this.tmp.disambig_settings.givens=this.registry.registry[t.id].disambig.givens.slice(),this.tmp.disambig_request.givens=this.registry.registry[t.id].disambig.givens.slice();for(var r=0,n=this.tmp.disambig_settings.givens.length;r<n;r+=1)this.tmp.disambig_settings.givens[r]=this.registry.registry[t.id].disambig.givens[r].slice();for(var r=0,n=this.tmp.disambig_request.givens.length;r<n;r+=1)this.tmp.disambig_request.givens[r]=this.registry.registry[t.id].disambig.givens[r].slice()}}else this.tmp.disambig_restore=new h.AmbigConfig}this.tmp.names_used=[],this.tmp.nameset_counter=0,this.tmp.years_used=[],this.tmp.names_max.clear(),this.tmp.just_looking||e&&"first"!==e.parallel&&e.parallel||(this.tmp.abbrev_trimmer={QUASHES:{}}),this.tmp.splice_delimiter=this[this.tmp.area].opt.layout_delimiter,this.bibliography_sort.keys=[],this.citation_sort.keys=[],this.tmp.has_done_year_suffix=!1,this.tmp.last_cite_locale=!1,!this.tmp.just_looking&&e&&!e.position&&this.registry.registry[t.id]&&(this.tmp.disambig_restore=h.cloneAmbigConfig(this.registry.registry[t.id].disambig)),this.tmp.first_name_string=!1,this.tmp.authority_stop_last=0},h.citeEnd=function(t,e){if(this.tmp.disambig_restore&&this.registry.registry[t.id]){this.registry.registry[t.id].disambig.names=this.tmp.disambig_restore.names.slice(),this.registry.registry[t.id].disambig.givens=this.tmp.disambig_restore.givens.slice();for(var i=0,s=this.registry.registry[t.id].disambig.givens.length;i<s;i+=1)this.registry.registry[t.id].disambig.givens[i]=this.tmp.disambig_restore.givens[i].slice()}if(this.tmp.disambig_restore=!1,e&&e.suffix?this.tmp.last_suffix_used=e.suffix:this.tmp.last_suffix_used="",this.tmp.last_years_used=this.tmp.years_used.slice(),this.tmp.last_names_used=this.tmp.names_used.slice(),this.tmp.cut_var=!1,this.tmp.disambig_request=!1,this.tmp.cite_locales.push(this.tmp.last_cite_locale),this.tmp.issued_date&&this.tmp.renders_collection_number){for(var r=[],i=this.tmp.issued_date.list.length-1;i>this.tmp.issued_date.pos;i+=-1)r.push(this.tmp.issued_date.list.pop());for(this.tmp.issued_date.list.pop(),i=r.length-1;i>-1;i+=-1)this.tmp.issued_date.list.push(r.pop())}this.tmp.issued_date=!1,this.tmp.renders_collection_number=!1},h.Engine.prototype.makeBibliography=function(t){if(!t&&(this.bibliography.opt.exclude_types||this.bibliography.opt.exclude_with_fields)){if(t={exclude:[]},this.bibliography.opt.exclude_types)for(var e in this.bibliography.opt.exclude_types){var i,s,r,n,a,o,l,u=this.bibliography.opt.exclude_types[e];t.exclude.push({field:"type",value:u})}if(this.bibliography.opt.exclude_with_fields)for(var e in this.bibliography.opt.exclude_with_fields){var p=this.bibliography.opt.exclude_with_fields[e];t.exclude.push({field:p,value:!0})}}if(!this.bibliography.tokens.length)return!1;"string"==typeof t&&(this.opt.citation_number_slug=t,t=!1),o=(i=h.getBibliographyEntries.call(this,t))[0],l=i[1];var c=i[2];for(s={maxoffset:0,entryspacing:this.bibliography.opt["entry-spacing"],linespacing:this.bibliography.opt["line-spacing"],"second-field-align":!1,entry_ids:o,bibliography_errors:this.tmp.bibliography_errors.slice(),done:c},this.bibliography.opt["second-field-align"]&&(s["second-field-align"]=this.bibliography.opt["second-field-align"]),a=0,n=this.registry.reflist.length;a<n;a+=1)(r=this.registry.reflist[a]).offset>s.maxoffset&&(s.maxoffset=r.offset);return this.bibliography.opt.hangingindent&&(s.hangingindent=this.bibliography.opt.hangingindent),s.bibstart=this.fun.decorate.bibstart,s.bibend=this.fun.decorate.bibend,this.opt.citation_number_slug=!1,[s,l]},h.getBibliographyEntries=function(t){function e(t,e){return"boolean"!=typeof t&&t?"string"==typeof e?t===e:!!e&&function(t,e){for(m=0,c=e.length;m<c;m+=1)if(t===e[m])return!0;return!1}(t,e):t?!!e:!e}if(i=[],I=[],this.tmp.area="bibliography",this.tmp.root="bibliography",this.tmp.last_rendered_name=!1,this.tmp.bibliography_errors=[],this.tmp.bibliography_pos=0,s=t&&t.page_start&&t.page_length?this.registry.getSortedIds():this.refetchItems(this.registry.getSortedIds()),this.tmp.disambig_override=!0,y={},t&&t.page_start&&t.page_length&&(S=0,!0!==t.page_start))for(b=0,_=s.length;b<_&&(y[s[b]]=!0,t.page_start!=s[b]);b+=1);var i,s,r,n,a,o,l,u,p,c,m,f,d,g,b,_,v,y,x,I,O,T,S,N=[],A={};for(b=0,this.tmp.container_item_count={},s=s.filter(t=>{var e=t;return t.legislation_id?A[t.legislation_id]?e=!1:A[t.legislation_id]=!0:t.container_id&&(this.tmp.container_item_count[t.container_id]||(this.tmp.container_item_count[t.container_id]=0),this.tmp.container_item_count[t.container_id]++,this.bibliography.opt.consolidate_containers.indexOf(t.type)>-1&&(A[t.container_id]?e=!1:A[t.container_id]=!0)),e}),this.tmp.container_item_pos={},_=s.length;b<_;b+=1){if(t&&t.page_start&&t.page_length){if(y[s[b]])continue;if(u=this.refetchItem(s[b]),S===t.page_length)break}else if(y[(u=s[b]).id])continue;if(t){if(r=!0,t.include){for(O=0,r=!1,T=t.include.length;O<T;O+=1)if(e((p=t.include[O]).value,u[p.field])){r=!0;break}}else if(t.exclude){for(O=0,n=!1,T=t.exclude.length;O<T;O+=1)if(e((p=t.exclude[O]).value,u[p.field])){n=!0;break}n&&(r=!1)}else if(t.select){for(O=0,r=!1,a=!0,T=t.select.length;O<T;O+=1)e((p=t.select[O]).value,u[p.field])||(a=!1);a&&(r=!0)}if(t.quash){for(O=0,a=!0,T=t.quash.length;O<T;O+=1)e((p=t.quash[O]).value,u[p.field])||(a=!1);a&&(r=!1)}if(!r)continue}if(g&&h.debug("BIB: "+u.id),u.container_id&&(this.tmp.container_item_pos[u.container_id]||(this.tmp.container_item_pos[u.container_id]=0),this.tmp.container_item_pos[u.container_id]++),(o=new h.Token("group",h.START)).decorations=[["@bibliography","entry"]].concat(this.bibliography.opt.layout_decorations),this.output.startTag("bib_entry",o),u.system_id&&this.sys.embedBibliographyEntry?this.output.current.value().item_id=u.system_id:this.output.current.value().system_id=u.id,d=[],this.registry.registry[u.id].master&&!(t&&t.page_start&&t.page_length)){x=[[u,{id:u.id}]],v=this.registry.registry[u.id].siblings;for(var O=0,T=v.length;O<T;O++)x.push([this.refetchItem(v[O]),{id:v[O]}]);for(this.parallel.StartCitation(x),this.registry.registry[u.id].parallel_delimiter_override?this.output.queue[0].strings.delimiter=this.registry.registry[u.id].parallel_delimiter_override:this.output.queue[0].strings.delimiter=", ",this.tmp.term_predecessor=!1,this.tmp.cite_index=0,O=0,T=x.length;O<T;O+=1)O<x.length-1?this.tmp.parallel_and_not_last=!0:delete this.tmp.parallel_and_not_last,d.push(""+h.getCite.call(this,x[O][0],x[O][1])),this.tmp.cite_index++,y[x[O][0].id]=!0}else!this.registry.registry[u.id].siblings&&(this.tmp.term_predecessor=!1,this.tmp.cite_index=0,d.push(""+h.getCite.call(this,u)),t&&t.page_start&&t.page_length&&(S+=1));for(I.push(""),this.tmp.bibliography_pos+=1,N.push(d),this.output.endTag("bib_entry"),this.output.queue[0].blobs.length&&this.output.queue[0].blobs[0].blobs.length&&((f=this.output.queue[0].blobs[0].blobs[0].strings?this.output.queue[0].blobs[0].blobs:this.output.queue[0].blobs)[0].strings.prefix=this.bibliography.opt.layout_prefix+f[0].strings.prefix),O=0,T=this.output.queue.length;O<T;O+=1)h.Output.Queue.purgeEmptyBlobs(this.output.queue[O]);for(O=0,T=this.output.queue.length;O<T;O+=1)this.output.adjust.upward(this.output.queue[O]),this.output.adjust.leftward(this.output.queue[O]),this.output.adjust.downward(this.output.queue[O],!0),this.output.adjust.fix(this.output.queue[O]);if(!(l=this.output.string(this,this.output.queue)[0])&&this.opt.update_mode===h.NUMERIC){var E=i.length+1+". [CSL STYLE ERROR: reference with no printed form.]";l=h.Output.Formats[this.opt.mode]["@bibliography/entry"](this,E)}l&&i.push(l)}var k=!1;if(t&&t.page_start&&t.page_length){var R=s.slice(-1)[0],w=N.slice(-1)[0];R&&w&&R!=w||(k=!0)}return this.tmp.disambig_override=!1,[N,i,k]},h.Engine.prototype.setCitationId=function(t,e){var i,s,r;if(i=!1,!t.citationID||e){for(s=Math.floor(1e14*Math.random());;){if(r=0,this.registry.citationreg.citationById[s])r=!r&&s<5e13?1:-1;else{t.citationID="a"+s.toString(32);break}1===r?s+=1:s+=-1}i=""+s}return this.registry.citationreg.citationById[t.citationID]=t,i}
1,h.Engine.prototype.rebuildProcessorState=function(t,e,i){t||(t=[]),e||(e="html");for(var s={},r=[],n=0,a=t.length;n<a;n+=1)for(var o=0,l=t[n].citationItems.length;o<l;o+=1){var u=""+t[n].citationItems[o].id;s[u]||r.push(u),s[u]=!0}this.updateItems(r);var p=[],c=[],m=[],f=this.opt.mode;this.setOutputFormat(e);for(var n=0,a=t.length;n<a;n+=1){var d=this.processCitationCluster(t[n],p,c,h.ASSUME_ALL_ITEMS_REGISTERED);p.push([t[n].citationID,t[n].properties.noteIndex]);for(var o=0,l=d[1].length;o<l;o+=1){var g=d[1][o][0];m[g]=[p[g][0],p[g][1],d[1][o][1]]}}return this.updateUncitedItems(i),this.setOutputFormat(f),m},h.Engine.prototype.restoreProcessorState=function(t){l=[],u=[],t||(t=[]);var e,i,s,r,n,a,o,l,u,p,c=[],m={};for(e=0,i=t.length;e<i;e+=1)m[t[e].citationID]&&this.setCitationId(t[e],!0),m[t[e].citationID]=!0,c.push(t[e].properties.index);var f=t.slice();for(f.sort(function(t,e){return t.properties.index<e.properties.index?-1:t.properties.index>e.properties.index?1:0}),e=0,i=f.length;e<i;e+=1)f[e].properties.index=e;for(e=0,i=f.length;e<i;e+=1){for(s=0,p=[],r=f[e].citationItems.length;s<r;s+=1)void 0===(n=f[e].citationItems[s]).sortkeys&&(n.sortkeys=[]),o=[a=this.retrieveItem(""+n.id),n],p.push(o),f[e].citationItems[s].item=a,u.push(""+n.id);f[e].properties.unsorted||p.sort(this.citation.srt.compareCompositeKeys),f[e].sortedItems=p,this.registry.citationreg.citationById[f[e].citationID]=f[e]}for(this.updateItems(u),e=0,i=t.length;e<i;e+=1)l.push([""+t[e].citationID,t[e].properties.noteIndex]);var d=[];return t&&t.length?d=this.processCitationCluster(t[0],[],l.slice(1)):(this.registry=new h.Registry(this),this.tmp=new h.Engine.Tmp,this.disambiguate=new h.Disambiguation(this)),d},h.Engine.prototype.updateItems=function(t,e,i,s){var r=this.tmp.area,n=this.tmp.root,a=this.tmp.extension;if(0===this.bibliography_sort.tokens.length&&(e=!0),this.tmp.area="citation",this.tmp.root="citation",this.tmp.extension="",s||(this.tmp.loadedItemIDs={}),this.registry.init(t),i)for(var o in this.registry.ambigcites)this.registry.ambigsTouched[o]=!0;return this.registry.dodeletes(this.registry.myhash),this.registry.doinserts(this.registry.mylist),this.registry.dorefreshes(),this.registry.rebuildlist(e),this.registry.setsortkeys(),this.registry.setdisambigs(),this.registry.sorttokens(e),this.registry.renumber(),this.tmp.extension=a,this.tmp.area=r,this.tmp.root=n,this.registry.getSortedIds()},h.Engine.prototype.updateUncitedItems=function(t,e){var i,s=this.tmp.area,r=this.tmp.root,n=this.tmp.extension;if(0===this.bibliography_sort.tokens.length&&(e=!0),this.tmp.area="citation",this.tmp.root="citation",this.tmp.extension="",this.tmp.loadedItemIDs={},t||(t=[]),"object"==typeof t){if(void 0===t.length)for(var a in i=t,t=[],i)t.push(a);else if("number"==typeof t.length){i={};for(var o=0,l=t.length;o<l;o+=1)i[t[o]]=!0}}return this.registry.init(t,!0),this.registry.dopurge(i),this.registry.doinserts(this.registry.mylist),this.registry.dorefreshes(),this.registry.rebuildlist(e),this.registry.setsortkeys(),this.registry.setdisambigs(),this.registry.sorttokens(e),this.registry.renumber(),this.tmp.extension=n,this.tmp.area=s,this.tmp.root=r,this.registry.getSortedIds()},h.localeResolve=function(t,e){var i,s;return(e||(e="en-US"),t||(t=e),i={},s=t.split(/[\-_]/),i.base=h.LANG_BASES[s[0]],void 0===i.base)?{base:e,best:t,bare:s[0]}:(1===s.length&&(i.generic=!0),1===s.length||"x"===s[1]?i.best=i.base.replace("_","-"):i.best=s.slice(0,2).join("-"),i.base=i.base.replace("_","-"),i.bare=s[0],i)},h.Engine.prototype.localeConfigure=function(t,e){var i;if((!e||!this.locale[t.best])&&("en-US"===t.best?(i=h.setupXml(this.sys.retrieveLocale("en-US")),this.localeSet(i,"en-US",t.best)):"en-US"!==t.best&&(t.base!==t.best&&(i=h.setupXml(this.sys.retrieveLocale(t.base)),this.localeSet(i,t.base,t.best)),i=h.setupXml(this.sys.retrieveLocale(t.best)),this.localeSet(i,t.best,t.best)),this.localeSet(this.cslXml,"",t.best),this.localeSet(this.cslXml,t.bare,t.best),t.base!==t.best&&this.localeSet(this.cslXml,t.base,t.best),this.localeSet(this.cslXml,t.best,t.best),void 0===this.locale[t.best].terms["page-range-delimiter"]&&(["fr","pt"].indexOf(t.best.slice(0,2).toLowerCase())>-1?this.locale[t.best].terms["page-range-delimiter"]="-":this.locale[t.best].terms["page-range-delimiter"]="â"),void 0===this.locale[t.best].terms["year-range-delimiter"]&&(this.locale[t.best].terms["year-range-delimiter"]="â"),void 0===this.locale[t.best].terms["citation-range-delimiter"]&&(this.locale[t.best].terms["citation-range-delimiter"]="â"),this.opt.development_extensions.normalize_lang_keys_to_lowercase)){for(var s=["default-locale","locale-sort","locale-translit","locale-translat"],r=0,n=s.length;r<n;r+=1)for(var a=0,o=this.opt[s[r]].length;a<o;a+=1)this.opt[s[r]][a]=this.opt[s[r]][a].toLowerCase();this.opt.lang=this.opt.lang.toLowerCase()}}
1,h.Engine.prototype.localeSet=function(t,e,i){if(e=e.replace("_","-"),i=i.replace("_","-"),this.opt.development_extensions.normalize_lang_keys_to_lowercase&&(e=e.toLowerCase(),i=i.toLowerCase()),this.locale[i]||(this.locale[i]={},this.locale[i].terms={},this.locale[i].opts={},this.locale[i].opts["skip-words"]=h.SKIP_WORDS,this.locale[i].opts["leading-noise-words"]||(this.locale[i].opts["leading-noise-words"]=[]),this.locale[i].dates={},this.locale[i].ord={"1.0.1":!1,keys:{}},this.locale[i]["noun-genders"]={}),r=t.makeXml(),t.nodeNameIs(t.dataObj,"locale"))r=t.dataObj;else{n=t.getNodesByName(t.dataObj,"locale");var s,r,n,a,o,l,u,p,c,m,f,d,g,b,_,v,y=!1;for(o=0,d=t.numberofnodes(n);o<d;o+=1)if(s=n[o],y||t.getAttributeValue(s,"lang","xml")!==e){var x=t.getAttributeValue(s,"lang","xml"),I=t.getNodesByName(s,"style-options");if(x&&I&&I.length){var O=t.getAttributeValue(I[0],"jurisdiction-preference");O&&(this.locale[x]||(this.locale[x]={opts:{}}),this.locale[x].opts["jurisdiction-preference"]=O.split(/\s+/))}}else r=s,y=!0}for(_=0,n=t.getNodesByName(r,"type"),v=t.numberofnodes(n);_<v;_+=1){var T=n[_],S=t.getAttributeValue(T,"name"),N=t.getAttributeValue(T,"gender");this.opt.gender[S]=N}if(t.getNodesByName(r,"term","ordinal").length){for(var A in this.locale[i].ord.keys)delete this.locale[i].terms[A];this.locale[i].ord={"1.0.1":!1,keys:{}}}n=t.getNodesByName(r,"term");var E={"last-digit":{},"last-two-digits":{},"whole-number":{}},k=!1,R={};for(o=0,d=t.numberofnodes(n);o<d;o+=1){if(l=n[o],"sub verbo"===(p=t.getAttributeValue(l,"name"))&&(p="sub-verbo"),"ordinal"===p.slice(0,7)){if("ordinal"===p)k=!0;else{var w=t.getAttributeValue(l,"match"),j=p.slice(8),g=t.getAttributeValue(l,"gender-form");g||(g="neuter"),w||(w="last-two-digits","0"!==j.slice(0,1)||(w="last-digit")),"0"===j.slice(0,1)&&(j=j.slice(1)),E[w][j]||(E[w][j]={}),E[w][j][g]=p}this.locale[i].ord.keys[p]=!0}void 0===this.locale[i].terms[p]&&(this.locale[i].terms[p]={}),u="long",g=!1,t.getAttributeValue(l,"form")&&(u=t.getAttributeValue(l,"form")),t.getAttributeValue(l,"gender-form")&&(g=t.getAttributeValue(l,"gender-form")),t.getAttributeValue(l,"gender")&&(this.locale[i]["noun-genders"][p]=t.getAttributeValue(l,"gender")),g?(this.locale[i].terms[p][g]={},this.locale[i].terms[p][g][u]=[],b=this.locale[i].terms[p][g],R[p]=!0):(this.locale[i].terms[p][u]=[],b=this.locale[i].terms[p]),t.numberofnodes(t.getNodesByName(l,"multiple"))?(b[u][0]=t.getNodeValue(l,"single"),b[u][0].indexOf("%s")>-1&&(this.opt.hasPlaceholderTerm=!0),b[u][1]=t.getNodeValue(l,"multiple"),b[u][1].indexOf("%s")>-1&&(this.opt.hasPlaceholderTerm=!0)):(b[u]=t.getNodeValue(l),b[u].indexOf("%s")>-1&&(this.opt.hasPlaceholderTerm=!0))}if(this.locale[i].terms.supplement||(this.locale[i].terms.supplement={}),this.locale[i].terms.supplement.long||(this.locale[i].terms.supplement.long=["supplement","supplements"]),k){for(var C in R){var L={},D=0;for(var P in this.locale[i].terms[C])["masculine","feminine"].indexOf(P)>-1?L[P]=this.locale[i].terms[C][P]:D+=1;if(!D){if(L.feminine)for(var P in L.feminine)this.locale[i].terms[C][P]=L.feminine[P];else if(L.masculine)for(var P in L.masculine)this.locale[i].terms[C][P]=L.masculine[P]}}this.locale[i].ord["1.0.1"]=E}for(p in this.locale[i].terms)for(_=0,v=2;_<v;_+=1)if(g=h.GENDERS[_],this.locale[i].terms[p][g])for(u in this.locale[i].terms[p])this.locale[i].terms[p][g][u]||(this.locale[i].terms[p][g][u]=this.locale[i].terms[p][u]);for(o=0,n=t.getNodesByName(r,"style-options"),d=t.numberofnodes(n);o<d;o+=1)for(f in c=n[o],a=t.attributes(c))if(a.hasOwnProperty(f)){if("@punctuation-in-quote"===f||"@limit-day-ordinals-to-day-1"===f)"true"===a[f]?this.locale[i].opts[f.slice(1)]=!0:this.locale[i].opts[f.slice(1)]=!1;else if("@jurisdiction-preference"===f){var U=a[f].split(/\s+/);this.locale[i].opts[f.slice(1)]=U}else if("@skip-words"===f){var B=a[f].split(/\s*,\s*/);this.locale[i].opts[f.slice(1)]=B}else if("@leading-noise-words"===f){var M=a[f].split(/\s*,\s*/);this.locale[i].opts["leading-noise-words"]=M}else if("@name-as-sort-order"===f){this.locale[i].opts["name-as-sort-order"]={};for(var q=a[f].split(/\s+/),_=0,v=q.length;_<v;_+=1)this.locale[i].opts["name-as-sort-order"][q[_]]=!0}else if("@name-as-reverse-order"===f){this.locale[i].opts["name-as-reverse-order"]={};for(var q=a[f].split(/\s+/),_=0,v=q.length;_<v;_+=1)this.locale[i].opts["name-as-reverse-order"][q[_]]=!0}else if("@name-never-short"===f){this.locale[i].opts["name-never-short"]={};for(var q=a[f].split(/\s+/),_=0,v=q.length;_<v;_+=1)this.locale[i].opts["name-never-short"][q[_]]=!0}}for(o=0,n=t.getNodesByName(r,"date"),d=t.numberofnodes(n);o<d;o+=1){var m=n[o];this.locale[i].dates[t.getAttributeValue(m,"form")]=m}h.SET_COURT_CLASSES(this,i,t,r)}
1,h.getLocaleNames=function(t,e){var i=h.setupXml(t);function s(t,e){var i=["base","best"];if(e)for(var s=h.localeResolve(e),r=0,n=i.length;r<n;r++)s[i[r]]&&-1===t.indexOf(s[i[r]])&&t.push(s[i[r]])}var r=["en-US"];s(r,e);var n=i.getNodesByName(i.dataObj,"style")[0];s(r,i.getAttributeValue(n,"default-locale"));for(var a=["layout","if","else-if","condition"],o=0,l=a.length;o<l;o++)!function(t){for(var e=i.getNodesByName(i.dataObj,t),s=0,n=e.length;s<n;s++){var a=i.getAttributeValue(e[s],"locale");if(a){a=a.split(/ +/);for(var o=0,l=a.length;o<l;o++)this.extendLocaleList(r,a[o])}}}(i,r,a[o]);return r},h.Node={},h.Node.bibliography={build:function(t,e){this.tokentype===h.START&&(t.build.area="bibliography",t.build.root="bibliography",t.build.extension="",this.execs.push(function(t){t.tmp.area="bibliography",t.tmp.root="bibliography",t.tmp.extension=""})),e.push(this)}},h.Node.choose={build:function(t,e){var i;this.tokentype===h.START&&(i=function(t){t.tmp.jump.push(void 0,h.LITERAL)}),this.tokentype===h.END&&(i=function(t){t.tmp.jump.pop()}),this.execs.push(i),e.push(this)},configure:function(t,e){this.tokentype===h.END?(t.configure.fail.push(e),t.configure.succeed.push(e)):(t.configure.fail.pop(),t.configure.succeed.pop())}},h.Node.citation={build:function(t,e){if(this.tokentype===h.START&&(t.build.area="citation",t.build.root="citation",t.build.extension="",this.execs.push(function(t){t.tmp.area="citation",t.tmp.root="citation",t.tmp.extension=""})),this.tokentype===h.END){if(t.opt.grouped_sort="in-text"===t.opt.xclass&&t.citation.opt.collapse&&t.citation.opt.collapse.length||t.citation.opt.cite_group_delimiter&&t.citation.opt.cite_group_delimiter.length&&t.opt.update_mode!==h.POSITION&&t.opt.update_mode!==h.NUMERIC,t.opt.grouped_sort&&t.citation_sort.opt.sort_directions.length){var i=t.citation_sort.opt.sort_directions[0].slice();t.citation_sort.opt.sort_directions=[i].concat(t.citation_sort.opt.sort_directions)}t.citation.srt=new h.Registry.Comparifier(t,"citation_sort")}e.push(this)}},h.Node["#comment"]={build:function(){}},h.Node.date={build:function(t,e){var i,s,r,n,a,o,l,u;(this.tokentype===h.START||this.tokentype===h.SINGLETON)&&(t.dateput.string(t,t.dateput.queue),t.tmp.date_token=h.Util.cloneToken(this),t.tmp.date_token.strings.prefix="",t.tmp.date_token.strings.suffix="",t.dateput.openLevel(this),t.build.date_parts=[],t.build.date_variables=this.variables,t.build.extension||h.Util.substituteStart.call(this,t,e),i=t.build.extension?h.dateMacroAsSortKey:function(t,e,i){var p;if(t.tmp.element_rendered_ok=!1,t.tmp.donesies=[],t.tmp.dateparts=[],p=[],this.variables.length&&!(t.tmp.just_looking&&"accessed"===this.variables[0])){for(void 0===(s=e[this.variables[0]])&&(s={"date-parts":[[0]]},t.opt.development_extensions.locator_date_and_revision&&i&&"locator-date"===this.variables[0]&&i["locator-date"]&&(s=i["locator-date"])),t.tmp.date_object=s,r=this.dateparts.length,n=0;n<r;n+=1)a=this.dateparts[n],void 0!==t.tmp.date_object[a+"_end"]?p.push(a):"month"===a&&void 0!==t.tmp.date_object.season_end&&p.push(a);for(n=0,o=[],r=(l=["year","month","day"]).length;n<r;n+=1)p.indexOf(l[n])>-1&&o.push(l[n]);for(n=0,p=o.slice(),u=2,r=p.length;n<r;n+=1)if(a=p[n],t.tmp.date_object[a]!==t.tmp.date_object[a+"_end"]){u=n;break}t.tmp.date_collapse_at=p.slice(u)}else t.tmp.date_object=!1},this.execs.push(i),i=function(t,e){if(e[this.variables[0]]&&(t.output.startTag("date",this),"issued"===this.variables[0]&&("legal_case"===e.type||"legislation"===e.type)&&-1===t.opt.disable_duplicate_year_suppression.indexOf(e.country)&&!t.tmp.extension&&""+e["collection-number"]==""+t.tmp.date_object.year&&1===this.dateparts.length&&"year"===this.dateparts[0])){for(var i in t.tmp.date_object)if(t.tmp.date_object.hasOwnProperty(i)&&"year"===i.slice(0,4)){t.tmp.issued_date={};var s=t.output.current.mystack.slice(-2)[0].blobs;t.tmp.issued_date.list=s,t.tmp.issued_date.pos=s.length-1}}},this.execs.push(i)),t.build.extension||this.tokentype!==h.END&&this.tokentype!==h.SINGLETON||(i=function(t,e){e[this.variables[0]]&&t.output.endTag()},this.execs.push(i)),e.push(this),this.tokentype!==h.END&&this.tokentype!==h.SINGLETON||t.build.extension||h.Util.substituteEnd.call(this,t,e)}},h.Node["date-part"]={build:function(t,e){this.strings.form||(this.strings.form="long"),t.build.date_parts.push(this.strings.name);var i,s,r,n,a,o,l,u,p,c,m,f,d,g,b,_,v,y,x,I,O=t.build.date_variables[0];function T(e,i,s){if(!s)return s;if(s=""+h.Util.Dates[this.strings.name][e](t,s,i,this.default_locale),"month"===this.strings.name){if(t.tmp.strip_periods)s=s.replace(/\./g,"");else for(var r=0,n=this.decorations.length;r<n;r+=1)if("@strip-periods"===this.decorations[r][0]&&"true"===this.decorations[r][1]){s=s.replace(/\./g,"");break}}return s}i=function(t,e){if(t.tmp.date_object){t.tmp.probably_rendered_something=!0;var i="";if(n=!0,a="",o="",t.tmp.donesies.push(this.strings.name),t.tmp.date_object.literal&&"year"===this.strings.name&&(i=t.tmp.date_object.literal,t.output.append(t.tmp.date_object.literal,this)),t.tmp.date_object&&(a=t.tmp.date_object[this.strings.name],o=t.tmp.date_object[this.strings.name+"_end"]),"year"!==this.strings.name||0!==a||t.tmp.suppress_decorations||(a=!1),l=!t.tmp.suppress_decorations,u=t.tmp.have_collapsed,p="year-suffix"===t[t.tmp.area].opt.collapse||"year-suffix-ranged"===t[t.tmp.area].opt.collapse,c=t.opt["disambiguate-add-year-suffix"],l&&c&&p&&(t.tmp.years_used.push(a),t.tmp.last_years_used.length>=t.tmp.years_used.length&&u&&t.tmp.last_years_used[t.tmp.years_used.length-1]===a&&(a=!1)),void 0!==a){m=!1,f=!1,"year"===this.strings.name&&(500>parseInt(a,10)&&parseInt(a,10)>0&&(f=t.getTerm("ad")),0>parseInt(a,10)&&(m=t.getTerm("bc"),a=-1*parseInt(a,10)),o&&(500>parseInt(o,10)&&parseInt(o,10)>0&&t.getTerm("ad"),0>parseInt(o,10)&&(t.getTerm("bc"),o=-1*parseInt(o,10))));for(var S=""+t.tmp.date_object.month;S.length<2;)S="0"+S;S="month-"+S;var N=t.locale[t.opt.lang]["noun-genders"][S];if(this.strings.form){var A=this.strings.form,E=this.strings.form;"day"===this.strings.name&&"ordinal"===A&&t.locale[t.opt.lang].opts["limit-day-ordinals-to-day-1"]&&(1!=a&&(A="numeric"),1!=o&&(E="numeric")),a=T.call(this,A,N,a),o=T.call(this,E,N,o)}if(t.output.openLevel("empty"),t.tmp.date_collapse_at.length){for(s=0,d=!0,r=t.tmp.date_collapse_at.length;s<r;s+=1)if(x=t.tmp.date_collapse_at[s],-1===t.tmp.donesies.indexOf(x)){d=!1;break}if(d){if(""+o!="0"){if(0===t.dateput.queue.length&&(n=!0),t.opt["year-range-format"]&&"expanded"!==t.opt["year-range-format"]&&!t.tmp.date_object.day&&!t.tmp.date_object.month&&!t.tmp.date_object.season&&"year"===this.strings.name&&a&&o){o=t.fun.year_mangler(a+"-"+o,!0);var k=t.getTerm("year-range-delimiter");o=o.slice(o.indexOf(k)+1)}i=o,t.dateput.append(o,this),n&&(I=t.dateput.current.value().blobs[0])&&(I.strings.prefix="")}i=a,t.output.append(a,this),(I=(g=t.output.current.value()).blobs[g.blobs.length-1])&&(I.strings.suffix=""),this.strings["range-delimiter"]?t.output.append(this.strings["range-delimiter"]):t.output.append(t.getTerm("year-range-delimiter"),"empty"),t.dateput.closeLevel(),b=t.dateput.current.value(),g.blobs=g.blobs.concat(b),t.dateput.string(t,t.dateput.queue),t.dateput.openLevel(t.tmp.date_token),t.tmp.date_collapse_at=[]}else i=a,t.output.append(a,this),t.tmp.date_collapse_at.indexOf(this.strings.name)>-1&&""+o!="0"&&(0===t.dateput.queue.length&&(n=!0),t.dateput.openLevel("empty"),i=o,t.dateput.append(o,this),n&&(I=t.dateput.current.value().blobs[0])&&(I.strings.prefix=""),m&&(i=m,t.dateput.append(m)),f&&(i=f,t.dateput.append(f)),t.dateput.closeLevel())}else i=a,t.output.append(a,this);m&&(i=m,t.output.append(m)),f&&(i=f,t.output.append(f)),t.output.closeLevel()}else"month"===this.strings.name&&t.tmp.date_object.season&&((a=""+t.tmp.date_object.season)&&a.match(/^[1-4]$/)?(t.tmp.group_context.tip.variable_success=!0,i="winter",t.output.append(t.getTerm("season-0"+a),this)):a&&(i=a,t.output.append(a,this)));t.tmp.value=[],e[O]&&(a||t.tmp.have_collapsed)&&!t.opt.has_year_suffix&&"year"===this.strings.name&&!t.tmp.just_looking&&t.registry.registry[e.id]&&!1!==t.registry.registry[e.id].disambig.year_suffix&&!t.tmp.has_done_year_suffix&&(t.tmp.has_done_year_suffix=!0,i="x",v=parseInt(t.registry.registry[e.id].disambig.year_suffix,10),_=new h.NumericBlob(t,!1,v,this,e.id),this.successor_prefix=t[t.build.area].opt.layout_delimiter,this.splice_prefix=t[t.build.area].opt.layout_delimiter,y=new h.Util.Suffixator(h.SUFFIX_CHARS),_.setFormatter(y),"year-suffix-ranged"===t[t.tmp.area].opt.collapse&&(_.range_prefix=t.getTerm("citation-range-delimiter")),t[t.tmp.area].opt.cite_group_delimiter?_.successor_prefix=t[t.tmp.area].opt.cite_group_delimiter:t[t.tmp.area].opt["year-suffix-delimiter"]?_.successor_prefix=t[t.tmp.area].opt["year-suffix-delimiter"]:_.successor_prefix=t[t.tmp.area].opt.layout_delimiter,_.UGLY_DELIMITER_SUPPRESS_HACK=!0,t.output.append(_,"literal")),i&&!t.tmp.group_context.tip.condition&&(t.tmp.just_did_number=i.match(/[0-9]$/),t.output.current.tip.strings.suffix&&(t.tmp.just_did_number=!1))}},this.execs.push(i),e.push(this)}}
1,h.Node["else-if"]={build:function(t,e){h.Conditions.TopNode.call(this,t,e),e.push(this)},configure:function(t,e){h.Conditions.Configure.call(this,t,e)}},h.Node.else={build:function(t,e){e.push(this)},configure:function(t,e){this.tokentype===h.START&&(t.configure.fail[t.configure.fail.length-1]=e)}},h.Node["et-al"]={build:function(t,e){("citation"===t.build.area||"bibliography"===t.build.area)&&this.execs.push(function(t){t.tmp.etal_node=this,"string"==typeof this.strings.term&&(t.tmp.etal_term=this.strings.term)}),e.push(this)}},h.Node.group={build:function(t,e,i){var s,r;if(this.realGroup=i,this.tokentype===h.START&&(h.Util.substituteStart.call(this,t,e),t.build.substitute_level.value()&&t.build.substitute_level.replace(t.build.substitute_level.value()+1),this.juris||e.push(this),s=function(t){if(t.output.startTag("group",this),this.strings.label_form_override&&!t.tmp.group_context.tip.label_form&&(t.tmp.group_context.tip.label_form=this.strings.label_form_override),this.strings.label_capitalize_if_first_override&&!t.tmp.group_context.tip.label_capitalize_if_first&&(t.tmp.group_context.tip.label_capitalize_if_first=this.strings.label_capitalize_if_first_override),this.realGroup){t.tmp.group_context.tip.condition&&h.UPDATE_GROUP_CONTEXT_CONDITION(t,this.strings.prefix,null,this);var e=!1,i=!1;t.tmp.group_context.mystack.length&&(t.output.current.value().parent=t.tmp.group_context.tip.output_tip);var s=t.tmp.group_context.tip.label_form;s||(s=this.strings.label_form_override);var r=t.tmp.group_context.tip.label_capitalize_if_first;r||(r=this.strings.label_capitalize_if_first),t.tmp.group_context.tip.condition?(e=t.tmp.group_context.tip.condition,i=t.tmp.group_context.tip.force_suppress):this.strings.reject?e={test:this.strings.reject,not:!0}:this.strings.require&&(e={test:this.strings.require,not:!1});var n={old_term_predecessor:t.tmp.term_predecessor,term_intended:!1,variable_attempt:!1,variable_success:!1,variable_success_parent:t.tmp.group_context.tip.variable_success,output_tip:t.output.current.tip,label_form:s,label_static:t.tmp.group_context.tip.label_static,label_capitalize_if_first:r,parallel_delimiter_override:this.strings.set_parallel_delimiter_override,parallel_delimiter_override_on_suppress:this.strings.set_parallel_delimiter_override_on_suppress,condition:e,force_suppress:i,done_vars:t.tmp.group_context.tip.done_vars.slice()};if(this.non_parallel){var a=t.tmp.group_context.tip.non_parallel;a||(a={}),Object.assign(a,this.non_parallel),n.non_parallel=a}if(this.parallel_first){var o=t.tmp.group_context.tip.parallel_first;o||(o={}),Object.assign(o,this.parallel_first),n.parallel_first=o}if(this.parallel_last){var l=t.tmp.group_context.tip.parallel_last;l||(l={}),Object.assign(l,this.parallel_last),n.parallel_last=l}if(t.tmp.abbrev_trimmer&&t.tmp.abbrev_trimmer.LAST_TO_FIRST&&n.parallel_last)for(var u in n.parallel_first||(n.parallel_first={}),t.tmp.abbrev_trimmer.LAST_TO_FIRST)n.parallel_last[u]&&(n.parallel_first[u]=!0,delete n.parallel_last[u]);if(t.tmp.group_context.push(n),t.tmp.abbrev_trimmer&&this.parallel_last_to_first)for(var u in t.tmp.abbrev_trimmer.LAST_TO_FIRST||(t.tmp.abbrev_trimmer.LAST_TO_FIRST={}),this.parallel_last_to_first)t.tmp.abbrev_trimmer.LAST_TO_FIRST[u]=!0}},(r=[]).push(s),this.execs=r.concat(this.execs),this.strings["has-publisher-and-publisher-place"]&&(t.build["publisher-special"]=!0,this.strings["subgroup-delimiter"]&&(s=function(t,e){if(e.publisher&&e["publisher-place"]){var i=e.publisher.split(/;\s*/),s=e["publisher-place"].split(/;\s*/);i.length>1&&i.length===s.length&&(t.publisherOutput=new h.PublisherOutput(t,this),t.publisherOutput["publisher-list"]=i,t.publisherOutput["publisher-place-list"]=s)}},this.execs.push(s))),this.juris)){var n,a=new h.Token("choose",h.START);h.Node.choose.build.call(a,t,e);var o=new h.Token("if",h.START);n=this.juris,s=function(e,i){return h.INIT_JURISDICTION_MACROS(t,e,i,n)},o.tests||(o.tests=[]),o.tests.push(s),o.test=t.fun.match.any(o,t,o.tests),e.push(o);var l=new h.Token("text",h.SINGLETON);s=function(t,e,i){var s=e;i&&i["best-jurisdiction"]&&"juris-locator"===this.juris&&(s=i);var r=0;if(t.juris[s["best-jurisdiction"]][this.juris])for(;r<t.juris[s["best-jurisdiction"]][this.juris].length;)r=h.tokenExec.call(t,t.juris[s["best-jurisdiction"]][this.juris][r],e,i)},l.juris=this.juris,l.execs.push(s),e.push(l);var u=new h.Token("if",h.END);h.Node.if.build.call(u,t,e);var p=new h.Token("else",h.START);h.Node.else.build.call(p,t,e)}if(this.tokentype===h.END&&(t.build["publisher-special"]&&(t.build["publisher-special"]=!1,s=function(t){t.publisherOutput&&(t.publisherOutput.render(),t.publisherOutput=!1)}
1,this.execs.push(s)),s=function(t,e,i){if(!t.tmp.group_context.tip.condition&&t.output.current.tip.strings.suffix&&(t.tmp.just_did_number=!1),t.output.endTag(),this.realGroup){var s=t.tmp.group_context.pop();if(s.parallel_delimiter_override&&(t.tmp.group_context.tip.parallel_delimiter_override=s.parallel_delimiter_override,!t.tmp.just_looking&&t.registry.registry[e.id].master&&(t.registry.registry[e.id].parallel_delimiter_override=s.parallel_delimiter_override)),s.parallel_delimiter_override_on_suppress&&(t.tmp.group_context.tip.parallel_delimiter_override_on_suppress=s.parallel_delimiter_override_on_suppress),"bibliography_sort"===t.tmp.area){var r=s.done_vars.indexOf("citation-number");this.strings.sort_direction&&r>-1&&1==t.tmp.group_context.length()&&(this.strings.sort_direction===h.DESCENDING?t.bibliography_sort.opt.citation_number_sort_direction=h.DESCENDING:t.bibliography_sort.opt.citation_number_sort_direction=h.ASCENDING,s.done_vars=s.done_vars.slice(0,r).concat(s.done_vars.slice(r+1)))}if(s.condition&&(s.force_suppress=h.EVALUATE_GROUP_CONDITION(t,s)),t.tmp.group_context.tip.condition&&(t.tmp.group_context.tip.force_suppress=s.force_suppress),!s.force_suppress&&(s.variable_success||s.term_intended&&!s.variable_attempt)){this.isJurisLocatorLabel||(t.tmp.group_context.tip.variable_success=!0);var n=t.output.current.value().blobs;if(t.output.current.value().blobs.length,!t.tmp.just_looking&&(s.non_parallel||s.parallel_last||s.parallel_first||s.parallel_delimiter_override||s.parallel_delimiter_override_on_suppress)){var a=t.parallel.checkRepeats(s);if(a&&n&&n.pop(),t.tmp.cite_index>0&&(a||!s.parallel_first&&!s.parallel_last&&!s.non_parallel)){var o=t.tmp.suppress_repeats[t.tmp.cite_index-1];a&&s.parallel_delimiter_override_on_suppress&&(o.SIBLING||o.ORPHAN)?t.output.queue.slice(-1)[0].parallel_delimiter=s.parallel_delimiter_override_on_suppress:s.parallel_delimiter_override&&o.SIBLING&&(t.output.queue.slice(-1)[0].parallel_delimiter=s.parallel_delimiter_override)}}}else{if(t.tmp.term_predecessor=s.old_term_predecessor,t.tmp.group_context.tip.variable_attempt=s.variable_attempt,s.force_suppress&&!t.tmp.group_context.tip.condition&&(t.tmp.group_context.tip.variable_attempt=!0,t.tmp.group_context.tip.variable_success=s.variable_success_parent),s.force_suppress)for(var l=0,u=s.done_vars.length;l<u;l++)for(var p=s.done_vars[l],c=0,m=t.tmp.done_vars.length;c<m;c++)t.tmp.done_vars[c]===p&&(t.tmp.done_vars=t.tmp.done_vars.slice(0,c).concat(t.tmp.done_vars.slice(c+1)));t.output.current.value().blobs&&t.output.current.value().blobs.pop()}}},this.execs.push(s),this.juris)){var c=new h.Token("else",h.END);h.Node.else.build.call(c,t,e);var m=new h.Token("choose",h.END);h.Node.choose.build.call(m,t,e)}this.tokentype===h.END&&(this.juris||e.push(this),t.build.substitute_level.value()&&t.build.substitute_level.replace(t.build.substitute_level.value()-1),h.Util.substituteEnd.call(this,t,e))}}
1,h.Node.if={build:function(t,e){h.Conditions.TopNode.call(this,t,e),e.push(this)},configure:function(t,e){h.Conditions.Configure.call(this,t,e)}},h.Node.conditions={build:function(t){this.tokentype===h.START&&t.tmp.conditions.addMatch(this.match),this.tokentype===h.END&&t.tmp.conditions.matchCombine()}},h.Node.condition={build:function(t){if(this.tokentype===h.SINGLETON){var e=t.fun.match[this.match](this,t,this.tests);t.tmp.conditions.addTest(e)}}},h.Conditions={},h.Conditions.TopNode=function(t){var e;(this.tokentype===h.START||this.tokentype===h.SINGLETON)&&(this.locale&&(t.opt.lang=this.locale),this.tests&&this.tests.length?this.test=t.fun.match[this.match](this,t,this.tests):t.tmp.conditions=new h.Conditions.Engine(t,this),0===t.build.substitute_level.value()&&(e=function(t){t.tmp.condition_counter++},this.execs.push(e))),(this.tokentype===h.END||this.tokentype===h.SINGLETON)&&(0===t.build.substitute_level.value()&&(e=function(t){t.tmp.condition_counter--,t.tmp.condition_lang_counter_arr.length>0&&t.tmp.condition_lang_counter_arr.slice(-1)[0]===t.tmp.condition_counter&&(t.opt.lang=t.tmp.condition_lang_val_arr.pop(),t.tmp.condition_lang_counter_arr.pop()),this.locale_default&&(t.output.current.value().old_locale=this.locale_default,t.output.closeLevel("empty"),t.opt.lang=this.locale_default)},this.execs.push(e)),e=function(t){return this[t.tmp.jump.value()]},this.execs.push(e),this.locale_default&&(t.opt.lang=this.locale_default))},h.Conditions.Configure=function(t,e){this.tokentype===h.START?(this.fail=t.configure.fail.slice(-1)[0],this.succeed=this.next,t.configure.fail[t.configure.fail.length-1]=e):this.tokentype===h.SINGLETON?(this.fail=this.next,this.succeed=t.configure.succeed.slice(-1)[0],t.configure.fail[t.configure.fail.length-1]=e):(this.succeed=t.configure.succeed.slice(-1)[0],this.fail=this.next)},h.Conditions.Engine=function(t,e){this.token=e,this.state=t},h.Conditions.Engine.prototype.addTest=function(t){this.token.tests||(this.token.tests=[]),this.token.tests.push(t)},h.Conditions.Engine.prototype.addMatch=function(t){this.token.match=t},h.Conditions.Engine.prototype.matchCombine=function(){this.token.test=this.state.fun.match[this.token.match](this.token,this.state,this.token.tests)},h.Node.info={build:function(t){this.tokentype===h.START?t.build.skip="info":t.build.skip=!1}},h.Node.institution={build:function(t,e){[h.SINGLETON,h.START].indexOf(this.tokentype)>-1&&this.execs.push(function(t){"string"==typeof this.strings.delimiter?t.tmp.institution_delimiter=this.strings.delimiter:t.tmp.institution_delimiter=t.tmp.name_delimiter,"text"===t.inheritOpt(this,"and")?this.and_term=t.getTerm("and","long",0):"symbol"===t.inheritOpt(this,"and")?t.opt.development_extensions.expect_and_symbol_form?this.and_term=t.getTerm("and","symbol",0):this.and_term="&":"none"===t.inheritOpt(this,"and")&&(this.and_term=t.tmp.institution_delimiter),void 0===this.and_term&&t.tmp.and_term&&(this.and_term=t.tmp.and_term),h.STARTSWITH_ROMANESQUE_REGEXP.test(this.and_term)?(this.and_prefix_single=" ",this.and_prefix_multiple=", ","string"==typeof t.tmp.institution_delimiter&&(this.and_prefix_multiple=t.tmp.institution_delimiter),this.and_suffix=" "):(this.and_prefix_single="",this.and_prefix_multiple="",this.and_suffix=""),"always"===t.inheritOpt(this,"delimiter-precedes-last")?this.and_prefix_single=t.tmp.institution_delimiter:"never"===t.inheritOpt(this,"delimiter-precedes-last")&&this.and_prefix_multiple&&(this.and_prefix_multiple=" "),this.and={},void 0!==this.and_term?(t.output.append(this.and_term,"empty",!0),this.and.single=t.output.pop(),this.and.single.strings.prefix=this.and_prefix_single,this.and.single.strings.suffix=this.and_suffix,t.output.append(this.and_term,"empty",!0),this.and.multiple=t.output.pop(),this.and.multiple.strings.prefix=this.and_prefix_multiple,this.and.multiple.strings.suffix=this.and_suffix):"undefined"!==this.strings.delimiter&&(this.and.single=new h.Blob(t.tmp.institution_delimiter),this.and.single.strings.prefix="",this.and.single.strings.suffix="",this.and.multiple=new h.Blob(t.tmp.institution_delimiter),this.and.multiple.strings.prefix="",this.and.multiple.strings.suffix=""),t.nameOutput.institution=this}),e.push(this)},configure:function(t){[h.SINGLETON,h.START].indexOf(this.tokentype)>-1&&(t.build.has_institution=!0)}},h.Node["institution-part"]={build:function(t,e){var i;"long"===this.strings.name?i=this.strings["if-short"]?function(t){t.nameOutput.institutionpart["long-with-short"]=this}:function(t){t.nameOutput.institutionpart.long=this}:"short"===this.strings.name&&(i=function(t){t.nameOutput.institutionpart.short=this}),this.execs.push(i),e.push(this)}},h.Node.key={build:function(t,e){e=t[t.build.root+"_sort"].tokens;var i,s=new h.Token("key",h.START);t.tmp.root=t.build.root,s.strings["et-al-min"]=t.inheritOpt(this,"et-al-min"),s.strings["et-al-use-first"]=t.inheritOpt(this,"et-al-use-first"),s.strings["et-al-use-last"]=t.inheritOpt(this,"et-al-use-last"),i=function(t){t.tmp.done_vars=[]},s.execs.push(i),i=function(t){t.output.openLevel("empty")},s.execs.push(i);var r=[];if(this.strings.sort_direction===h.DESCENDING?(r.push(1),r.push(-1)):(r.push(-1),r.push(1)),t[t.build.area].opt.sort_directions.push(r),h.DATE_VARIABLES.indexOf(this.variables[0])>-1&&(t.build.date_key=!0),i=function(t){t.tmp.sort_key_flag=!0,t.inheritOpt(this,"et-al-min")&&(t.tmp["et-al-min"]=t.inheritOpt(this,"et-al-min")),t.inheritOpt(this,"et-al-use-first")&&(t.tmp["et-al-use-first"]=t.inheritOpt(this,"et-al-use-first")),"boolean"==typeof t.inheritOpt(this,"et-al-use-last")&&(t.tmp["et-al-use-last"]=t.inheritOpt(this,"et-al-use-last"))},s.execs.push(i),e.push(s),this.variables.length){var n=this.variables[0];if(h.NAME_VARIABLES.indexOf(n)>-1){var a=new h.Token("names",h.START);a.tokentype=h.START,a.variables=this.variables,h.Node.names.build.call(a,t,e);var o=new h.Token("name",h.SINGLETON);o.tokentype=h.SINGLETON,o.strings["name-as-sort-order"]="all",o.strings["sort-separator"]=" ",o.strings["et-al-use-last"]=t.inheritOpt(this,"et-al-use-last"),o.strings["et-al-min"]=t.inheritOpt(this,"et-al-min"),o.strings["et-al-use-first"]=t.inheritOpt(this,"et-al-use-first"),h.Node.name.build.call(o,t,e);var l=new h.Token("institution",h.SINGLETON);l.tokentype=h.SINGLETON,h.Node.institution.build.call(l,t,e);var u=new h.Token("names",h.END);u.tokentype=h.END,h.Node.names.build.call(u,t,e)}else{var p=new h.Token("text",h.SINGLETON);p.strings.sort_direction=this.strings.sort_direction,p.dateparts=this.dateparts,h.NUMERIC_VARIABLES.indexOf(n)>-1?i="citation-number"===n?function(t,e){if("bibliography_sort"===t.tmp.area&&(this.strings.sort_direction===h.DESCENDING?t.bibliography_sort.opt.citation_number_sort_direction=h.DESCENDING:t.bibliography_sort.opt.citation_number_sort_direction=h.ASCENDING),"citation_sort"===t.tmp.area&&t.bibliography_sort.tmp.citation_number_map)var i=t.bibliography_sort.tmp.citation_number_map[t.registry.registry[e.id].seq];else var i=t.registry.registry[e.id].seq;i&&(i=h.Util.padding(""+i)),t.output.append(i,this)}:function(t,e){var i=!1;(i=e[n])&&(i=h.Util.padding(i)),t.output.append(i,this)}:"citation-label"===n?i=function(t,e){var i=t.getCitationLabel(e);t.output.append(i,this)}:h.DATE_VARIABLES.indexOf(n)>-1?(i=h.dateAsSortKey,p.variables=this.variables):i="title"===n?t.transform.getOutputFunction(this.variables,"title",!1,!1,!0):"court-class"===n?function(t,e,
1i){h.INIT_JURISDICTION_MACROS(t,e,i,"juris-main");var s=h.GET_COURT_CLASS(t,e,!0);t.output.append(s,"empty")}:function(t,e){var i=e[n];t.output.append(i,"empty")},p.execs.push(i),e.push(p)}}else{var c=new h.Token("text",h.SINGLETON);c.strings.sort_direction=this.strings.sort_direction,c.postponed_macro=this.postponed_macro,h.expandMacro.call(t,c,e)}var m=new h.Token("key",h.END);i=function(t){var e=t.output.string(t,t.output.queue);t.sys.normalizeUnicode&&(e=t.sys.normalizeUnicode(e)),""===(e=e?e.split(" ").join(t.opt.sort_sep)+t.opt.sort_sep:"")&&(e=void 0),"string"!=typeof e&&(e=void 0),t[t[t.tmp.area].root+"_sort"].keys.push(e),t.tmp.value=[]},m.execs.push(i),t.build.date_key&&("citation"===t.build.area&&"_sort"===t.build.extension&&(t[t.build.area].opt.sort_directions.push([-1,1]),i=function(t,e){var i=t.registry.registry[e.id].disambig.year_suffix;i||(i=0);var s=h.Util.padding(""+i);t[t.tmp.area].keys.push(s)},m.execs.push(i)),t.build.date_key=!1),i=function(t){t.tmp["et-al-min"]=void 0,t.tmp["et-al-use-first"]=void 0,t.tmp["et-al-use-last"]=void 0,t.tmp.sort_key_flag=!1},m.execs.push(i),e.push(m)}},h.Node.label={build:function(t,e){if(this.strings.term)this.execs.push(function(t,e,i){var s=h.evaluateLabel(this,t,e,i);i&&"locator"===this.strings.term&&(i.section_form_override=this.strings.form),s&&(t.tmp.group_context.tip.term_intended=!0),h.UPDATE_GROUP_CONTEXT_CONDITION(t,s,null,this),-1===s.indexOf("%s")&&(!this.strings.capitalize_if_first||t.tmp.term_predecessor||"in-text"===t.opt.class&&"citation"===t.tmp.area||(s=h.Output.Formatters["capitalize-first"](t,s)),t.output.append(s,this))});else{this.strings.form||(this.strings.form="long");for(var i=t.build.names_variables[t.build.names_variables.length-1],s=t.build.name_label[t.build.name_label.length-1],r=0,n=i.length;r<n;r+=1)s[i[r]]||(s[i[r]]={});if(t.build.name_flag)for(var r=0,n=i.length;r<n;r+=1)s[i[r]].after=this;else for(var r=0,n=i.length;r<n;r+=1)s[i[r]].before=this}e.push(this)}},h.Node.layout={build:function(t,e){function i(){"bibliography"===t.build.area&&(n=new h.Token("text",h.SINGLETON),s=function(t){if(!t.tmp.parallel_and_not_last){e=t.tmp.cite_affixes[t.tmp.area][t.tmp.last_cite_locale]?t.tmp.cite_affixes[t.tmp.area][t.tmp.last_cite_locale].suffix:t.bibliography.opt.layout_suffix;var e,i=t.output.current.value();t.opt.using_display?i.blobs[i.blobs.length-1].strings.suffix=e:i.strings.suffix=e}t.bibliography.opt["second-field-align"]&&t.output.endTag("bib_other")},n.execs.push(s),e.push(n))}if(this.tokentype===h.START&&(this.locale_raw?t.build.current_default_locale=this.locale_raw:t.build.current_default_locale=t.opt["default-locale"],s=function(t,e,i){if(t.opt.development_extensions.apply_citation_wrapper&&t.sys.wrapCitationEntry&&!t.tmp.just_looking&&e.system_id&&"citation"===t.tmp.area){var s=new h.Token("group",h.START);s.decorations=[["@cite","entry"]],t.output.startTag("cite_entry",s),t.output.current.value().item_id=e.system_id,i&&(t.output.current.value().locator_txt=i.locator_txt,t.output.current.value().suffix_txt=i.suffix_txt)}},this.execs.push(s)),this.tokentype!==h.START||t.tmp.cite_affixes[t.build.area]||(s=function(t,e,i){if(t.tmp.done_vars=[],i&&i["author-only"]&&t.tmp.done_vars.push("locator"),t.opt.suppressedJurisdictions[e.country]&&e.country&&-1===["treaty","patent"].indexOf(e.type)&&t.tmp.done_vars.push("country"),!t.tmp.just_looking&&t.registry.registry[e.id]&&t.registry.registry[e.id].parallel&&t.tmp.done_vars.push("first-reference-note-number"),!t.tmp.just_looking&&t.tmp.abbrev_trimmer&&e.jurisdiction)for(var s in t.tmp.abbrev_trimmer.QUASHES[e.jurisdiction])t.tmp.done_vars.push(s);t.tmp.rendered_name=!1},this.execs.push(s),s=function(t){t.tmp.sort_key_flag=!1},this.execs.push(s),s=function(t){t.tmp.nameset_counter=0},this.execs.push(s),s=function(t,e){var i=new h.Token;t.output.openLevel(i)},this.execs.push(s),e.push(this),"citation"===t.build.area&&(r=new h.Token("text",h.SINGLETON),s=function(t,e,i){if(i&&i.prefix){var s=h.checkPrefixSpaceAppend(t,i.prefix);t.tmp.just_looking||(s=t.output.checkNestedBrace.update(s));var r=h.checkIgnorePredecessor(t,s);t.output.append(s,this,!1,r)}},r.execs.push(s),e.push(r))),this.locale_raw&&((o=new h.Token("dummy",h.START)).locale=this.locale_raw,o.strings.delimiter=this.strings.delimiter,o.strings.suffix=this.strings.suffix,t.tmp.cite_affixes[t.build.area]||(t.tmp.cite_affixes[t.build.area]={})),this.tokentype===h.START&&(t.build.layout_flag=!0,!this.locale_raw&&(t[t.tmp.area].opt.topdecor=[this.decorations],t[t.tmp.area+"_sort"].opt.topdecor=[this.decorations],t[t.build.area].opt.layout_prefix=this.strings.prefix,t[t.build.area].opt.layout_suffix=this.strings.suffix,t[t.build.area].opt.layout_delimiter=this.strings.delimiter,t[t.build.area].opt.layout_decorations=this.decorations,t.tmp.cite_affixes[t.build.area]&&(a=new h.Token("else",h.START),h.Node.else.build.call(a,t,e))),this.locale_raw)){if(t.build.layout_locale_flag)o.name="else-if",h.Attributes["@locale-internal"].call(o,t,this.locale_raw),h.Node["else-if"].build.call(o,t,e);else{var s,r,n,a,o,l=new h.Token("choose",h.START);h.Node.choose.build.call(l,t,e),o.name="if",h.Attributes["@locale-internal"].call(o,t,this.locale_raw),h.Node.if.build.call(o,t,e)}t.tmp.cite_affixes[t.build.area][o.locale]={},t.tmp.cite_affixes[t.build.area][o.locale].delimiter=this.strings.delimiter,t.tmp.cite_affixes[t.build.area][o.locale].suffix=this.strings.suffix}this.tokentype!==h.END||(this.locale_raw&&(i(),t.build.layout_locale_flag?(o.name="else-if",o.tokentype=h.END,h.Attributes["@locale-internal"].call(o,t,this.locale_raw),h.Node["else-if"].build.call(o,t,e)):(o.name="if",o.tokentype=h.END,h.Attributes["@locale-internal"].call(o,t,this.locale_raw),h.Node.if.build.call(o,t,e),t.build.layout_locale_flag=!0)),this.locale_raw||(i(),t.tmp.cite_affixes[t.build.area]&&t.build.layout_locale_flag&&(a=new h.Token("else",h.END),h.Node.else.build.call(a,t,e),a=new h.Token("choose",h.END),h.Node.choose.build.call(a,t,e)),t.build_layout_locale_flag=!0,"citation"===t.build.area&&(n=new h.Token("text",h.SINGLETON),s=function(t,e,
1i){if(i&&i.suffix){var s=h.checkSuffixSpacePrepend(t,i.suffix);t.tmp.just_looking||(s=t.output.checkNestedBrace.update(s)),t.output.append(s,this)}},n.execs.push(s),e.push(n)),s=function(t){t.output.closeLevel()},this.execs.push(s),s=function(t,e){t.opt.development_extensions.apply_citation_wrapper&&t.sys.wrapCitationEntry&&!t.tmp.just_looking&&e.system_id&&"citation"===t.tmp.area&&t.output.endTag()},this.execs.push(s),e.push(this),t.build.layout_flag=!1,t.build.layout_locale_flag=!1))}},h.Node.macro={build:function(){}},h.Node.alternative={build:function(t,e){if(this.tokentype===h.START){var i=new h.Token("choose",h.START);h.Node.choose.build.call(i,t,e);var s=new h.Token("if",h.START);h.Attributes["@alternative-node-internal"].call(s,t),h.Node.if.build.call(s,t,e);var r=function(t,e){if(t.tmp.oldItem=e,t.tmp.oldLang=t.opt.lang,t.tmp.abort_alternative=!0,e["language-name"]&&e["language-name-original"]){var i=JSON.parse(JSON.stringify(e));i.language=i["language-name"];var s=h.localeResolve(i.language,t.opt["default-locale"][0]);if(t.opt.multi_layout)for(var r in t.opt.multi_layout){var n=t.opt.multi_layout[r],a=!1;for(var o in n){var l=n[o];if(s.best===l.best||s.base===l.base||s.bare===l.bare){a=n[0].best;break}}a||(a=t.opt["default-locale"][0]),t.opt.lang=a}for(var u in i)if(-1===["id","type","language","multi"].indexOf(u)&&"alt-"!==u.slice(0,4)){if(i.multi&&i.multi._keys[u]){var p=!0;for(var c in i.multi._keys[u])if(s.bare===c.replace(/^([a-zA-Z]+).*/,"$1")){p=!1;break}p&&delete i[u]}else delete i[u]}for(var u in i)"alt-"===u.slice(0,4)?(i[u.slice(4)]=i[u],t.tmp.abort_alternative=!1):i.multi&&i.multi._keys&&!i["alt-"+u]&&i.multi._keys[u]&&(i.multi._keys[u][s.best]?(i[u]=i.multi._keys[u][s.best],t.tmp.abort_alternative=!1):i.multi._keys[u][s.base]?(i[u]=i.multi._keys[u][s.base],t.tmp.abort_alternative=!1):i.multi._keys[u][s.bare]&&(i[u]=i.multi._keys[u][s.bare],t.tmp.abort_alternative=!1))}t.output.openLevel(this),t.registry.refhash[e.id]=i,t.nameOutput=new h.NameOutput(t,i)};this.execs.push(r),e.push(this);var i=new h.Token("choose",h.START);h.Node.choose.build.call(i,t,e);var s=new h.Token("if",h.START);h.Attributes["@alternative-node-internal"].call(s,t);var r=function(t){t.tmp.abort_alternative=!0};s.execs.push(r),h.Node.if.build.call(s,t,e)}else if(this.tokentype===h.END){var s=new h.Token("if",h.END);h.Node.if.build.call(s,t,e);var i=new h.Token("choose",h.END);h.Node.choose.build.call(i,t,e);var r=function(t,e){t.output.closeLevel(),t.registry.refhash[e.id]=t.tmp.oldItem,t.opt.lang=t.tmp.oldLang,t.nameOutput=new h.NameOutput(t,t.tmp.oldItem),t.tmp.abort_alternative=!1};this.execs.push(r),e.push(this);var s=new h.Token("if",h.END);h.Node.if.build.call(s,t,e);var i=new h.Token("choose",h.END);h.Node.choose.build.call(i,t,e)}}},h.Node["alternative-text"]={build:function(t,e){this.tokentype===h.SINGLETON&&this.execs.push(function(t,e){var e=t.refetchItem(e.id);h.getCite.call(t,e)}),e.push(this)}},h.NameOutput=function(t,e,i){this.debug=!1,this.state=t,this.debug&&this.state.sys.print("(1)"),this.Item=e,this.item=i,this.nameset_base=0,this.etal_spec={},this._first_creator_variable=!1,this._please_chop=!1},h.NameOutput.prototype.init=function(t){this.requireMatch=t.requireMatch,this.state.tmp.term_predecessor&&(this.state.tmp.subsequent_author_substitute_ok=!1),this.nameset_offset&&(this.nameset_base=this.nameset_base+this.nameset_offset),this.nameset_offset=0,this.names=t,this.variables=t.variables,this.state.tmp.value=[],this.state.tmp.rendered_name=[],this.state.tmp.label_blob=!1,this.state.tmp.etal_node=!1,this.state.tmp.etal_term=!1;for(var e=0,i=this.variables.length;e<i;e+=1)this.Item[this.variables[e]]&&this.Item[this.variables[e]].length&&(this.state.tmp.value=this.state.tmp.value.concat(this.Item[this.variables[e]]));if(this["et-al"]=void 0,this.with=void 0,this.name=void 0,this.institutionpart={},this.state.tmp.group_context.tip.variable_attempt=!0,this.labelVariable=this.variables[0],this.state.tmp.value.length&&this.checkCommonAuthor(this.requireMatch)){for(var e in this.state.tmp.can_substitute.pop(),this.state.tmp.can_substitute.push(!0),this.variables){var s=this.state.tmp.done_vars.indexOf(this.variables[e]);s>-1&&(this.state.tmp.done_vars=this.state.tmp.done_vars.slice(0,s).concat(this.state.tmp.done_vars.slice(e+1)))}this.state.tmp.common_term_match_fail=!0,this.variables=[]}},h.NameOutput.prototype.reinit=function(t,e){if(this.requireMatch=t.requireMatch,this.labelVariable=e,this.state.tmp.can_substitute.value()){this.nameset_offset=0,this.variables=t.variables;var i=this.state.tmp.value.slice();this.state.tmp.value=[];for(var s=0,r=this.variables.length;s<r;s+=1)this.Item[this.variables[s]]&&this.Item[this.variables[s]].length&&(this.state.tmp.value=this.state.tmp.value.concat(this.Item[this.variables[s]]));this.state.tmp.value.length&&this.state.tmp.can_substitute.replace(!1,h.LITERAL),this.state.tmp.value=i}if(this.checkCommonAuthor(this.requireMatch)){for(var s in this.state.tmp.can_substitute.pop(),this.state.tmp.can_substitute.push(!0),this.variables){var n=this.state.tmp.done_vars.indexOf(this.variables[s]);n>-1&&(this.state.tmp.done_vars=this.state.tmp.done_vars.slice(0,n).concat(this.state.tmp.done_vars.slice(s+1)))}this.variables=[]}}
1,h.NameOutput.prototype.outputNames=function(){var t,e,i=this.variables;if(!this.institution.and||(this.institution.and.single.blobs&&this.institution.and.single.blobs.length||(this.institution.and.single.blobs=this.name.and.single.blobs),this.institution.and.multiple.blobs&&this.institution.and.multiple.blobs.length||(this.institution.and.multiple.blobs=this.name.and.multiple.blobs)),this.variable_offset={},this.family)for(t=0,this.family_decor=h.Util.cloneToken(this.family),this.family_decor.strings.prefix="",this.family_decor.strings.suffix="",e=this.family.execs.length;t<e;t+=1)this.family.execs[t].call(this.family_decor,this.state,this.Item);else this.family_decor=!1;if(this.given)for(t=0,this.given_decor=h.Util.cloneToken(this.given),this.given_decor.strings.prefix="",this.given_decor.strings.suffix="",e=this.given.execs.length;t<e;t+=1)this.given.execs[t].call(this.given_decor,this.state,this.Item);else this.given_decor=!1;if(this.debug&&this.state.sys.print("(2)"),this.getEtAlConfig(),this.debug&&this.state.sys.print("(3)"),this.divideAndTransliterateNames(),this.debug&&this.state.sys.print("(4)"),this.truncatePersonalNameLists(),this.debug&&this.state.sys.print("(5)"),this.debug&&this.state.sys.print("(6)"),this.disambigNames(),this.constrainNames(),this.debug&&this.state.sys.print("(7)"),"count"===this.name.strings.form){(this.state.tmp.extension||0!=this.names_count)&&(this.state.output.append(this.names_count,"empty"),this.state.tmp.group_context.tip.variable_success=!0);return}this.debug&&this.state.sys.print("(8)"),this.setEtAlParameters(),this.debug&&this.state.sys.print("(9)"),this.setCommonTerm(this.requireMatch),this.debug&&this.state.sys.print("(10)"),this.renderAllNames(),this.debug&&this.state.sys.print("(11)");var s=[];for(t=0,e=i.length;t<e;t+=1){var r=i[t],n=[],a=!1,o=null;if(this.state.opt.development_extensions.spoof_institutional_affiliations){this.debug&&this.state.sys.print("(11a)");for(var l=0,u=this.institutions[r].length;l<u;l+=1)n.push(this.joinPersonsAndInstitutions([this.persons[r][l],this.institutions[r][l]]));if(this.debug&&this.state.sys.print("(11b)"),this.institutions[r].length){var p=this.nameset_base+this.variable_offset[r];this.freeters[r].length&&(p+=1),a=this.joinInstitutionSets(n,p)}this.debug&&this.state.sys.print("(11c)");var o=this.joinFreetersAndInstitutionSets([this.freeters[r],a]);this.debug&&this.state.sys.print("(11d)")}else o=this._join([this.freeters[r]],"");if(o&&(this.state.tmp.extension||(o=this._applyLabels(o,r)),s.push(o)),this.debug&&this.state.sys.print("(11e)"),this.common_term)break}for(this.debug&&this.state.sys.print("(12)"),this.state.output.openLevel("empty"),this.state.output.current.value().strings.delimiter=this.state.inheritOpt(this.names,"delimiter","names-delimiter"),this.debug&&this.state.sys.print("(13)"),t=0,e=s.length;t<e;t+=1)this.state.output.append(s[t],"literal",!0);!this.state.tmp.just_looking&&s.length>0&&(this.state.tmp.probably_rendered_something=!0),this.debug&&this.state.sys.print("(14)"),this.state.output.closeLevel("empty"),this.debug&&this.state.sys.print("(15)");var c=this.state.output.pop();this.state.tmp.name_node.top=c,this.debug&&this.state.sys.print("(16)");var m=h.Util.cloneToken(this.names);if(this.state.tmp.group_context.tip.condition&&h.UPDATE_GROUP_CONTEXT_CONDITION(this.state,this.names.strings.prefix,null,this.names),this.state.output.append(c,m),this.state.tmp.term_predecessor_name&&(this.state.tmp.term_predecessor=!0),this.debug&&this.state.sys.print("(17)"),this.debug&&this.state.sys.print("(18)"),"authority"!==i[0]){var f=[],d=this.Item[i[0]];if(d)for(var t=0,e=d.length;t<e;t+=1){var g=h.Util.Names.getRawName(d[t]);g&&f.push(g)}(f=f.join(", "))&&(this.state.tmp.name_node.string=f)}if(this.state.tmp.name_node.string&&!this.state.tmp.first_name_string&&(this.state.tmp.first_name_string=this.state.tmp.name_node.string),"classic"===this.Item.type&&this.state.tmp.first_name_string){var b=[];b.push(this.state.tmp.first_name_string),this.Item.title&&b.push(this.Item.title),(b=b.join(", "))&&this.state.sys.getAbbreviation&&(this.state.sys.normalizeAbbrevsKey&&(b=this.state.sys.normalizeAbbrevsKey("classic",b)),this.state.transform.loadAbbreviation("default","classic",b,this.Item.language),this.state.transform.abbrevs.default.classic[b]&&(this.state.tmp.done_vars.push("title"),this.state.output.append(this.state.transform.abbrevs.default.classic[b],"empty",!0),c=this.state.output.pop(),this.state.tmp.name_node.top.blobs.pop(),this.state.tmp.name_node.top.blobs.push(c)))}this._collapseAuthor(),this.variables=[],this.state.tmp.authority_stop_last=0,this.debug&&this.state.sys.print("(19)")},h.NameOutput.prototype._applyLabels=function(t,e){if(!this.label||!this.label[this.labelVariable])return t;var i,s=0,r=this.freeters_count[e]+this.institutions_count[e];if(r>1)s=1;else{for(var n=0,a=this.persons[e].length;n<a;n+=1)r+=this.persons_count[e][n];r>1&&(s=1)}return this.label[this.labelVariable].before?("number"==typeof this.label[this.labelVariable].before.strings.plural&&(s=this.label[this.labelVariable].before.strings.plural),i=this._buildLabel(e,s,"before",this.labelVariable),this.state.output.openLevel("empty"),this.state.output.append(i,this.label[this.labelVariable].before,!0),this.state.output.append(t,"literal",!0),this.state.output.closeLevel("empty"),t=this.state.output.pop()):this.label[this.labelVariable].after&&("number"==typeof this.label[this.labelVariable].after.strings.plural&&(s=this.label[this.labelVariable].after.strings.plural),i=this._buildLabel(e,s,"after",this.labelVariable),this.state.output.openLevel("empty"),this.state.output.append(t,"literal",!0),this.state.output.append(i,this.label[this.labelVariable].after,!0),this.state.tmp.label_blob=this.state.output.pop(),this.state.output.append(this.state.tmp.label_blob,"literal",!0),this.state.output.closeLevel("empty"),t=this.state.output.pop()),t}
1,h.NameOutput.prototype._buildLabel=function(t,e,i,s){this.common_term&&(t=this.common_term);var r=!1,n=this.label[s][i];return n&&(r=h.castLabel(this.state,n,t,e,h.TOLERANT)),r},h.NameOutput.prototype._collapseAuthor=function(){var t,e,i;0!==this.state.tmp.name_node.top.blobs.length&&(0===this.nameset_base&&this.Item[this.variables[0]]&&!this._first_creator_variable&&(this._first_creator_variable=this.variables[0]),(this.state[this.state.tmp.area].opt.collapse&&this.state[this.state.tmp.area].opt.collapse.length||this.state[this.state.tmp.area].opt.cite_group_delimiter&&this.state[this.state.tmp.area].opt.cite_group_delimiter.length)&&(this.state.tmp.authorstring_request?(e="",t=this.state.tmp.name_node.top.blobs.slice(-1)[0].blobs,i=this.state.tmp.offset_characters,t&&(e=this.state.output.string(this.state,t,!1)),this.state.tmp.offset_characters=i,this.state.registry.authorstrings[this.Item.id]=e):!this.state.tmp.just_looking&&!this.state.tmp.suppress_decorations&&(this.state[this.state.tmp.area].opt.collapse&&this.state[this.state.tmp.area].opt.collapse.length||this.state[this.state.tmp.area].opt.cite_group_delimiter&&this.state[this.state.tmp.area].opt.cite_group_delimiter)&&(e="",t=this.state.tmp.name_node.top.blobs.slice(-1)[0].blobs,i=this.state.tmp.offset_characters,t&&(e=this.state.output.string(this.state,t,!1)),e===this.state.tmp.last_primary_names_string?((this.item["suppress-author"]||this.state[this.state.tmp.area].opt.collapse&&this.state[this.state.tmp.area].opt.collapse.length)&&(this.state.tmp.name_node.top.blobs.pop(),this.state.tmp.name_node.children=[],this.state.tmp.offset_characters=i),this.state[this.state.tmp.area].opt.cite_group_delimiter&&this.state[this.state.tmp.area].opt.cite_group_delimiter&&(this.state.tmp.use_cite_group_delimiter=!0)):(this.state.tmp.last_primary_names_string=e,this.variables.indexOf(this._first_creator_variable)>-1&&this.item&&this.item["suppress-author"]&&"legal_case"!==this.Item.type&&(this.state.tmp.name_node.top.blobs.pop(),this.state.tmp.name_node.children=[],this.state.tmp.offset_characters=i,this.state.tmp.term_predecessor=!1),this.state.tmp.have_collapsed=!1,this.state[this.state.tmp.area].opt.cite_group_delimiter&&this.state[this.state.tmp.area].opt.cite_group_delimiter&&(this.state.tmp.use_cite_group_delimiter=!1)))))},h.NameOutput.prototype.isPerson=function(t){return!t.literal&&(!!t.given||!t.family||!t.isInstitution)},h.NameOutput.prototype.truncatePersonalNameLists=function(){var t,e,i,s,r,n;for(t in this.freeters_count={},this.persons_count={},this.institutions_count={},this.freeters)this.freeters.hasOwnProperty(t)&&(this.freeters_count[t]=this.freeters[t].length,this.freeters[t]=this._truncateNameList(this.freeters,t));for(t in this.persons)if(this.persons.hasOwnProperty(t))for(this.institutions_count[t]=this.institutions[t].length,this._truncateNameList(this.institutions,t),this.persons[t]=this.persons[t].slice(0,this.institutions[t].length),this.persons_count[t]=[],s=0,r=this.persons[t].length;s<r;s+=1)this.persons_count[t][s]=this.persons[t][s].length,this.persons[t][s]=this._truncateNameList(this.persons,t,s);if((n=!!this.state.opt.development_extensions.etal_min_etal_usefirst_hack&&1===this.etal_min&&1===this.etal_use_first&&!(this.state.tmp.extension||this.state.tmp.just_looking)&&t)||this._please_chop)for(e=0,i=this.variables.length;e<i;e+=1){t=this.variables[e],this.freeters[t].length&&(this._please_chop===t?(this.freeters[t]=this.freeters[t].slice(1),this.freeters_count[t]+=-1,this._please_chop=!1):n&&!this._please_chop&&(this.freeters[t]=this.freeters[t].slice(0,1),this.freeters_count[t]=1,this.institutions[t]=[],this.persons[t]=[],this._please_chop=n));for(var s=0,r=this.persons[t].length;s<r;s++)if(this.persons[t][s].length){if(this._please_chop===t){this.persons[t][s]=this.persons[t][s].slice(1),this.persons_count[t][s]+=-1,this._please_chop=!1;break}if(n&&!this._please_chop){this.freeters[t]=this.persons[t][s].slice(0,1),this.freeters_count[t]=1,this.institutions[t]=[],this.persons[t]=[],this._please_chop=n;break}}this.institutions[t].length&&(this._please_chop===t?(this.institutions[t]=this.institutions[t].slice(1),this.institutions_count[t]+=-1,this._please_chop=!1):n&&!this._please_chop&&(this.institutions[t]=this.institutions[t].slice(0,1),this.institutions_count[t]=1,this._please_chop=n))}for(e=0,i=this.variables.length;e<i;e+=1){this.institutions[t].length&&(this.nameset_offset+=1);for(var s=0,r=this.persons[t].length;s<r;s++)this.persons[t][s].length&&(this.nameset_offset+=1)}}
1,h.NameOutput.prototype._truncateNameList=function(t,e,i){var s;if(s=void 0===i?t[e]:t[e][i],this.state[this.state[this.state.tmp.area].root].opt.max_number_of_names&&s.length>50&&s.length>this.state[this.state[this.state.tmp.area].root].opt.max_number_of_names+2){var r=this.state[this.state[this.state.tmp.area].root].opt.max_number_of_names;s=s.slice(0,r+1).concat(s.slice(-1))}return s},h.NameOutput.prototype.divideAndTransliterateNames=function(){var t,e,i,s,r=this.Item,n=this.variables;for(t=0,this.varnames=n.slice(),this.freeters={},this.persons={},this.institutions={},e=n.length;t<e;t+=1){var a=n[t];this.variable_offset[a]=this.nameset_offset;var o=this._normalizeVariableValue(r,a);if(this.name.strings["suppress-min"]&&o.length>=this.name.strings["suppress-min"]&&(o=[]),this.name.strings["suppress-max"]&&o.length<=this.name.strings["suppress-max"]&&(o=[]),this._getFreeters(a,o),this._getPersonsAndInstitutions(a,o),this.state.opt.development_extensions.spoof_institutional_affiliations){if(0===this.name.strings["suppress-min"])for(i=0,this.freeters[a]=[],s=this.persons[a].length;i<s;i+=1)this.persons[a][i]=[];else if(0===this.institution.strings["suppress-min"]){for(i=0,this.institutions[a]=[],this.freeters[a]=this.freeters[a].concat(this.persons[a]),s=this.persons[a].length;i<s;i+=1)for(var l=0,u=this.persons[a][i].length;l<u;l+=1)this.freeters[a].push(this.persons[a][i][l]);this.persons[a]=[]}}}},h.NameOutput.prototype._normalizeVariableValue=function(t,e){var i;return"string"==typeof t[e]||"number"==typeof t[e]?(h.debug('name variable "'+e+'" is string or number, not array. Attempting to fix.'),i=[{literal:t[e]+""}]):t[e]?("number"!=typeof t[e].length&&(h.debug('name variable "'+e+'" is object, not array. Attempting to fix.'),t[e]=[t[e]]),i=t[e].slice()):i=[],i},h.NameOutput.prototype._getFreeters=function(t,e){if(this.freeters[t]=[],this.state.opt.development_extensions.spoof_institutional_affiliations)for(var i=e.length-1;i>-1;i--)if(this.isPerson(e[i])){var s=this._checkNickname(e.pop());s&&this.freeters[t].push(s)}else break;else for(var i=e.length-1;i>-1;i--){var s=e.pop();if(this.isPerson(s))var s=this._checkNickname(s);this.freeters[t].push(s)}this.freeters[t].reverse(),this.freeters[t].length&&(this.nameset_offset+=1)},h.NameOutput.prototype._getPersonsAndInstitutions=function(t,e){if(this.persons[t]=[],this.institutions[t]=[],this.state.opt.development_extensions.spoof_institutional_affiliations){for(var i=[],s=!1,r=!0,n=e.length-1;n>-1;n+=-1)if(this.isPerson(e[n])){var a=this._checkNickname(e[n]);a&&i.push(a)}else s=!0,this.institutions[t].push(e[n]),r||(i.reverse(),this.persons[t].push(i),i=[]),r=!1;s&&(i.reverse(),this.persons[t].push(i),this.persons[t].reverse(),this.institutions[t].reverse())}},h.NameOutput.prototype._clearValues=function(t){for(var e=t.length-1;e>-1;e+=-1)t.pop()},h.NameOutput.prototype._checkNickname=function(t){if(["interview","personal_communication"].indexOf(this.Item.type)>-1){var e="";if((e=h.Util.Names.getRawName(t))&&this.state.sys.getAbbreviation&&!(this.item&&this.item["suppress-author"])){var i=e;this.state.sys.normalizeAbbrevsKey&&(i=this.state.sys.normalizeAbbrevsKey("author",e)),this.state.transform.loadAbbreviation("default","nickname",i,this.Item.language);var s=this.state.transform.abbrevs.default.nickname[i];s&&(t="!here>>>"!==s&&{family:s,given:""})}}return t},h.NameOutput.prototype._purgeEmptyBlobs=function(t){for(var e=t.length-1;e>-1;e+=-1)t[e]&&0!==t[e].length&&t[e].blobs.length||(t=t.slice(0,e).concat(t.slice(e+1)));return t},h.NameOutput.prototype.joinPersons=function(t,e,i,s){return t=this._purgeEmptyBlobs(t),s||(s="name"),void 0===i?1===this.etal_spec[e].freeters?this._joinEtAl(t):2===this.etal_spec[e].freeters?this._joinEllipsis(t):this.state.tmp.sort_key_flag?this._join(t,this.state.inheritOpt(this.name,"delimiter","name-delimiter",", ")):this._joinAnd(t):1===this.etal_spec[e].persons[i]?this._joinEtAl(t):2===this.etal_spec[e].persons[i]?this._joinEllipsis(t):this.state.tmp.sort_key_flag?this._join(t,this.state.inheritOpt(this.name,"delimiter","name-delimiter",", ")):this._joinAnd(t)},h.NameOutput.prototype.joinInstitutionSets=function(t,e){return t=this._purgeEmptyBlobs(t),1===this.etal_spec[e].institutions?this._joinEtAl(t,"institution"):2===this.etal_spec[e].institutions?this._joinEllipsis(t,"institution"):this._joinAnd(t)},h.NameOutput.prototype.joinPersonsAndInstitutions=function(t){t=this._purgeEmptyBlobs(t);var e=this._join(t,this.state.tmp.name_delimiter);return e.isInstitution=!0,e},h.NameOutput.prototype.joinFreetersAndInstitutionSets=function(t){return t=this._purgeEmptyBlobs(t),this._join(t,"[never here]",this.with.single,this.with.multiple)}
1,h.NameOutput.prototype._getAfterInvertedName=function(t,e,i){if(i&&t.length>1&&"after-inverted-name"===this.state.inheritOpt(this.name,"delimiter-precedes-last")){var s=t[t.length-2];s.blobs.length>0&&s.blobs[0].isInverted&&(i.strings.prefix=e)}return i},h.NameOutput.prototype._getAndJoin=function(t,e){var i=!1;if(t.length>1){var s="single";t.length>2&&(s="multiple"),i=JSON.parse(JSON.stringify(i=t[t.length-1].isInstitution?this.institution.and[s]:this.name.and[s])),i=this._getAfterInvertedName(t,e,i)}return i},h.NameOutput.prototype._joinEtAl=function(t){var e=this.state.inheritOpt(this.name,"delimiter","name-delimiter",", "),i=this._join(t,e);return this.state.output.openLevel(this._getToken("name")),this.state.output.current.value().strings.delimiter="",this.state.output.append(i,"literal",!0),t.length>1?this.state.output.append(this["et-al"].multiple,"literal",!0):1===t.length&&this.state.output.append(this["et-al"].single,"literal",!0),this.state.output.closeLevel(),this.state.output.pop()},h.NameOutput.prototype._joinEllipsis=function(t){var e=this.state.inheritOpt(this.name,"delimiter","name-delimiter",", "),i=!1;if(t.length>1){var s="single";t.length>2&&(s="multiple"),i=JSON.parse(JSON.stringify(this.name.ellipsis[s])),i=this._getAfterInvertedName(t,e,i)}return this._join(t,e,i)},h.NameOutput.prototype._joinAnd=function(t){var e=this.state.inheritOpt(this.name,"delimiter","name-delimiter",", "),i=this._getAndJoin(t,e);return this._join(t,e,i)},h.NameOutput.prototype._join=function(t,e,i){var s,r;if(!t||!(t=this._purgeEmptyBlobs(t)).length)return!1;if(t.length>1){if(2===t.length)i?t=[t[0],i,t[1]]:t[0].strings.suffix+=e;else{n=i?1:0;for(var n,a=t.pop(),s=0,r=t.length-n;s<r;s++)t[s].strings.suffix+=e;t.push(i),t.push(a)}}for(this.state.output.openLevel(),s=0,r=t.length;s<r;s+=1)this.state.output.append(t[s],!1,!0);return this.state.output.closeLevel(),this.state.output.pop()},h.NameOutput.prototype._getToken=function(t){var e=this[t];return"institution"===t?new h.Token:e},h.NameOutput.prototype.checkCommonAuthor=function(t){if(!t)return!1;var e=!1;if(2===this.variables.length){var i=this.variables.slice();i.sort(),e=i.join("")}if(!e)return!1;var s=!1;if(this.state.locale[this.state.opt.lang].terms[e]&&(s=!0),!s)return this.state.tmp.done_vars.push(this.variables[0]),this.state.tmp.done_vars.push(this.variables[1]),!1;var r=this.Item[this.variables[0]],n=this.Item[this.variables[1]],a=this._compareNamesets(r,n);return!0===a&&(this.state.tmp.done_vars.push(this.variables[0]),this.state.tmp.done_vars.push(this.variables[1])),!a},h.NameOutput.prototype.setCommonTerm=function(){var t=this.variables.slice();if(t.sort(),this.common_term=t.join(""),this.common_term){var e=!1;if(this.label&&this.label[this.variables[0]]&&(this.label[this.variables[0]].before?e=this.state.getTerm(this.common_term,this.label[this.variables[0]].before.strings.form,0):this.label[this.variables[0]].after&&(e=this.state.getTerm(this.common_term,this.label[this.variables[0]].after.strings.form,0))),!this.state.locale[this.state.opt.lang].terms[this.common_term]||!e||this.variables.length<2){this.common_term=!1;return}for(var i=0,s=this.variables.length-1;i<s;i+=1){var r=this.variables[i],n=this.variables[i+1];if((this.freeters[r].length||this.freeters[n].length)&&(this.etal_spec[r].freeters!==this.etal_spec[n].freeters||!this._compareNamesets(this.freeters[r],this.freeters[n]))||this.persons[r].length!==this.persons[n].length){this.common_term=!1;return}for(var a=0,o=this.persons[r].length;a<o;a+=1)if(this.etal_spec[r].persons[a]!==this.etal_spec[n].persons[a]||!this._compareNamesets(this.persons[r][a],this.persons[n][a])){this.common_term=!1;return}}}},h.NameOutput.prototype._compareNamesets=function(t,e){if(!t||!e||t.length!==e.length)return!1;for(var i=0,s=e.length;i<s;i+=1)for(var r=0,n=h.NAME_PARTS.length;r<n;r+=1){var a=h.NAME_PARTS[r];if(!t[i]||t[i][a]!=e[i][a])return!1}return!0},h.NameOutput.prototype.constrainNames=function(){this.names_count=0;for(var t,e=0,i=this.variables.length;e<i;e+=1){var s=this.variables[e];t=this.nameset_base+e,this.freeters[s].length&&(this.state.tmp.names_max.push(this.freeters[s].length,"literal"),this._imposeNameConstraints(this.freeters,this.freeters_count,s,t),this.names_count+=this.freeters[s].length),this.institutions[s].length&&(this.state.tmp.names_max.push(this.institutions[s].length,"literal"),this._imposeNameConstraints(this.institutions,this.institutions_count,s,t),this.persons[s]=this.persons[s].slice(0,this.institutions[s].length),this.names_count+=this.institutions[s].length);for(var r=0,n=this.persons[s].length;r<n;r+=1)this.persons[s][r].length&&(this.state.tmp.names_max.push(this.persons[s][r].length,"literal"),this._imposeNameConstraints(this.persons[s],this.persons_count[s],r,t),this.names_count+=this.persons[s][r].length)}}
1,h.NameOutput.prototype._imposeNameConstraints=function(t,e,i,s){var r=t[i],n=this.state.tmp["et-al-min"];this.state.tmp.suppress_decorations?this.state.tmp.disambig_request&&this.state.tmp.disambig_request.names[s]?n=this.state.tmp.disambig_request.names[s]:e[i]>=this.etal_min&&(n=this.etal_use_first):(this.state.tmp.disambig_request&&this.state.tmp.disambig_request.names[s]>this.etal_use_first?n=e[i]<this.etal_min?e[i]:this.state.tmp.disambig_request.names[s]:e[i]>=this.etal_min&&(n=this.etal_use_first),this.etal_use_last&&n>this.etal_min-2&&(n=this.etal_min-2));var a=this.etal_min>=this.etal_use_first,o=e[i]>n;n>e[i]&&(n=r.length),a&&o&&(this.etal_use_last?t[i]=r.slice(0,n).concat(r.slice(-1)):t[i]=r.slice(0,n)),this.state.tmp.disambig_settings.names[s]=t[i].length,this.state.disambiguate.padBase(this.state.tmp.disambig_settings)},h.NameOutput.prototype.disambigNames=function(){for(var t,e=0,i=this.variables.length;e<i;e+=1){var s=this.variables[e];if(t=this.nameset_base+e,this.freeters[s].length&&this._runDisambigNames(this.freeters[s],t),this.institutions[s].length){void 0===this.state.tmp.disambig_settings.givens[t]&&(this.state.tmp.disambig_settings.givens[t]=[]);for(var r=0,n=this.institutions[s].length;r<n;r+=1)void 0===this.state.tmp.disambig_settings.givens[t][r]&&this.state.tmp.disambig_settings.givens[t].push(2)}for(var r=0,n=this.persons[s].length;r<n;r+=1)this.persons[s][r].length&&this._runDisambigNames(this.persons[s][r],t)}},h.NameOutput.prototype._runDisambigNames=function(t,e){var i,s,r,n,a,o;for(n=0,a=t.length;n<a;n+=1)if(t[n].given||t[n].family){if(s=this.state.inheritOpt(this.name,"initialize-with"),this.state.registry.namereg.addname(""+this.Item.id,t[n],n),void 0===this.state.tmp.disambig_settings.givens[e])for(var l=0,u=e+1;l<u;l+=1)this.state.tmp.disambig_settings.givens[l]||(this.state.tmp.disambig_settings.givens[l]=[]);if(void 0===this.state.tmp.disambig_settings.givens[e][n]&&(i=this.state.inheritOpt(this.name,"form","name-form","long"),r=this.state.registry.namereg.evalname(""+this.Item.id,t[n],n,0,i,s),this.state.tmp.disambig_settings.givens[e].push(r)),i=this.state.inheritOpt(this.name,"form","name-form","long"),o=this.state.registry.namereg.evalname(""+this.Item.id,t[n],n,0,i,s),this.state.tmp.disambig_request){var p=this.state.tmp.disambig_settings.givens[e][n];1===p&&"by-cite"===this.state.citation.opt["givenname-disambiguation-rule"]&&(void 0===this.state.inheritOpt(this.name,"initialize-with")||void 0===t[n].given)&&(p=2),r=p,this.state.opt["disambiguate-add-givenname"]&&t[n].given&&(r=this.state.registry.namereg.evalname(""+this.Item.id,t[n],n,r,this.state.inheritOpt(this.name,"form","name-form","long"),this.state.inheritOpt(this.name,"initialize-with")))}else r=o;!this.state.tmp.just_looking&&this.item&&this.item.position===h.POSITION_FIRST&&o>r&&(r=o),this.state.tmp.sort_key_flag||(this.state.tmp.disambig_settings.givens[e][n]=r,"string"!=typeof s||void 0!==this.name.strings.initialize&&!0!==this.name.strings.initialize||(this.state.tmp.disambig_settings.use_initials=!0))}},h.NameOutput.prototype.getEtAlConfig=function(){var t=this.item;this["et-al"]={},this.state.output.append(this.etal_term,this.etal_style,!0),this["et-al"].single=this.state.output.pop(),this["et-al"].single.strings.suffix=this.etal_suffix,this["et-al"].single.strings.prefix=this.etal_prefix_single,this.state.output.append(this.etal_term,this.etal_style,!0),this["et-al"].multiple=this.state.output.pop(),this["et-al"].multiple.strings.suffix=this.etal_suffix,this["et-al"].multiple.strings.prefix=this.etal_prefix_multiple,void 0===t&&(t={}),t.position?(this.state.inheritOpt(this.name,"et-al-subsequent-min")?this.etal_min=this.state.inheritOpt(this.name,"et-al-subsequent-min"):this.etal_min=this.state.inheritOpt(this.name,"et-al-min"),this.state.inheritOpt(this.name,"et-al-subsequent-use-first")?this.etal_use_first=this.state.inheritOpt(this.name,"et-al-subsequent-use-first"):this.etal_use_first=this.state.inheritOpt(this.name,"et-al-use-first")):(this.state.tmp["et-al-min"]?this.etal_min=this.state.tmp["et-al-min"]:this.etal_min=this.state.inheritOpt(this.name,"et-al-min"),this.state.tmp["et-al-use-first"]?this.etal_use_first=this.state.tmp["et-al-use-first"]:this.etal_use_first=this.state.inheritOpt(this.name,"et-al-use-first"),"boolean"==typeof this.state.tmp["et-al-use-last"]?this.etal_use_last=this.state.tmp["et-al-use-last"]:this.etal_use_last=this.state.inheritOpt(this.name,"et-al-use-last")),this.state.tmp["et-al-min"]||(this.state.tmp["et-al-min"]=this.etal_min)},h.NameOutput.prototype.setEtAlParameters=function(){var t,e,i,s;for(t=0,e=this.variables.length;t<e;t+=1){var r=this.variables[t];for(void 0===this.etal_spec[r]&&(this.etal_spec[r]={freeters:0,institutions:0,persons:[]}),this.etal_spec[this.nameset_base+t]=this.etal_spec[r],this.freeters[r].length&&this._setEtAlParameter("freeters",r),i=0,s=this.persons[r].length;i<s;i+=1)void 0===this.etal_spec[r][i]&&(this.etal_spec[r].persons[i]=0),this._setEtAlParameter("persons",r,i);this.institutions[r].length&&this._setEtAlParameter("institutions",r)}}
1,h.NameOutput.prototype._setEtAlParameter=function(t,e,i){var s,r;"persons"===t?(s=this.persons[e][i],r=this.persons_count[e][i]):(s=this[t][e],r=this[t+"_count"][e]),s.length<r&&!this.state.tmp.sort_key_flag?this.etal_use_last?"persons"===t?this.etal_spec[e].persons[i]=2:this.etal_spec[e][t]=2:"persons"===t?this.etal_spec[e].persons[i]=1:this.etal_spec[e][t]=1:"persons"===t?this.etal_spec[e].persons[i]=0:this.etal_spec[e][t]=0},h.NameOutput.prototype.renderAllNames=function(){for(var t,e=0,i=this.variables.length;e<i;e+=1){var s=this.variables[e];(this.freeters[s].length||this.institutions[s].length)&&!this.state.tmp.group_context.tip.condition&&(this.state.tmp.just_did_number=!1),t=this.nameset_base+e,this.freeters[s].length&&(this.freeters[s]=this._renderNames(s,this.freeters[s],t));for(var r=0,n=this.institutions[s].length;r<n;r+=1)this.persons[s][r]=this._renderNames(s,this.persons[s][r],t,r)}this.renderInstitutionNames()},h.NameOutput.prototype.renderInstitutionNames=function(){for(var t=0,e=this.variables.length;t<e;t+=1)for(var i=this.variables[t],s=0,r=this.institutions[i].length;s<r;s+=1){var n,s,r,a,o=this.institutions[i][s];a=this.state.tmp.extension?["sort"]:o.isInstitution||o.literal?this.state.opt["cite-lang-prefs"].institutions:this.state.opt["cite-lang-prefs"].persons;var l={primary:"locale-orig",secondary:!1,tertiary:!1};if(a)for(var u=["primary","secondary","tertiary"],p=0,h=u.length;p<h&&!(a.length-1<p);p+=1)a[p]&&(l[u[p]]="locale-"+a[p]);else l.primary="locale-translat";"bibliography"===this.state.tmp.area||"citation"===this.state.tmp.area&&"note"===this.state.opt.xclass&&this.item&&!this.item.position||(l.secondary=!1,l.tertiary=!1),this.setRenderedName(o);var n=this._renderInstitutionName(i,o,l,s);this.institutions[i][s]=n}},h.NameOutput.prototype._renderInstitutionName=function(t,e,i,s){var r,n,a,o,l,u,p=this.getName(e,i.primary,!0),h=p.name,c=p.usedOrig;if(h&&(h=this.fixupInstitution(h,t,s)),r=!1,i.secondary){var r=(p=this.getName(e,i.secondary,!1,c)).name;c=p.usedOrig,r&&(r=this.fixupInstitution(r,t,s))}n=!1,i.tertiary&&(n=(p=this.getName(e,i.tertiary,!1,c)).name)&&(n=this.fixupInstitution(n,t,s));var m={l:{pri:!1,sec:!1,ter:!1},s:{pri:!1,sec:!1,ter:!1}};switch(h&&(m.l.pri=h.long,m.s.pri=h.short.length?h.short:h.long),r&&(m.l.sec=r.long,m.s.sec=r.short.length?r.short:r.long),n&&(m.l.ter=n.long,m.s.ter=n.short.length?n.short:n.long),this.institution.strings["institution-parts"]){case"short":h.short.length?(o=this._getShortStyle(),l=[this._composeOneInstitutionPart([m.s.pri,m.s.sec,m.s.ter],i,o,t)]):(a=this._getLongStyle(h,t,s),l=[this._composeOneInstitutionPart([m.l.pri,m.l.sec,m.l.ter],i,a,t)]);break;case"short-long":a=this._getLongStyle(h,t,s),o=this._getShortStyle(),l=[u=this._renderOneInstitutionPart(h.short,o),this._composeOneInstitutionPart([m.l.pri,m.l.sec,m.l.ter],i,a,t)];break;case"long-short":a=this._getLongStyle(h,t,s),o=this._getShortStyle(),u=this._renderOneInstitutionPart(h.short,o),l=[this._composeOneInstitutionPart([m.l.pri,m.l.sec,m.l.ter],i,a,t),u];break;default:a=this._getLongStyle(h,t,s),l=[this._composeOneInstitutionPart([m.l.pri,m.l.sec,m.l.ter],i,a,t)]}var f=this._join(l," ");return f&&(f.isInstitution=!0),this.state.tmp.name_node.children.push(f),f},h.NameOutput.prototype._composeOneInstitutionPart=function(t,e,i){var s,r,n,a,o=!1,l=!1,u=!1;if(t[0]){if(r=h.Util.cloneToken(i),this.state.opt.citeAffixes[e.primary]&&"<i>"===this.state.opt.citeAffixes.institutions[e.primary].prefix){for(var p=!1,c=0,m=r.decorations.length;c<m;c+=1)"@font-style"===i.decorations[c][0]&&"italic"===r.decorations[c][1]&&(p=!0);p||r.decorations.push(["@font-style","italic"])}o=this._renderOneInstitutionPart(t[0],r)}if(t[1]&&(l=this._renderOneInstitutionPart(t[1],i)),t[2]&&(u=this._renderOneInstitutionPart(t[2],i)),l||u){this.state.output.openLevel("empty"),this.state.output.append(o),n=h.Util.cloneToken(i),e.secondary&&(n.strings.prefix=this.state.opt.citeAffixes.institutions[e.secondary].prefix,n.strings.suffix=this.state.opt.citeAffixes.institutions[e.secondary].suffix,n.strings.prefix||(n.strings.prefix=" "));var f=new h.Token;f.decorations.push(["@font-style","normal"]),f.decorations.push(["@font-weight","normal"]),this.state.output.openLevel(f),this.state.output.append(l,n),this.state.output.closeLevel(),a=h.Util.cloneToken(i),e.tertiary&&(a.strings.prefix=this.state.opt.citeAffixes.institutions[e.tertiary].prefix,a.strings.suffix=this.state.opt.citeAffixes.institutions[e.tertiary].suffix,a.strings.prefix||(a.strings.prefix=" "));var d=new h.Token;d.decorations.push(["@font-style","normal"]),d.decorations.push(["@font-weight","normal"]),this.state.output.openLevel(d),this.state.output.append(u,a),this.state.output.closeLevel(),this.state.output.closeLevel(),s=this.state.output.pop()}else s=o;return s},h.NameOutput.prototype._renderOneInstitutionPart=function(t,e){for(var i=0,s=t.length;i<s;i+=1)if(t[i]){var r=t[i];if(this.state.tmp.strip_periods)r=r.replace(/\./g,"");else for(var n=0,a=e.decorations.length;n<a;n+=1)if("@strip-periods"===e.decorations[n][0]&&"true"===e.decorations[n][1]){r=r.replace(/\./g,"");break}this.state.tmp.group_context.tip.variable_success=!0,this.state.tmp.can_substitute.replace(!1,h.LITERAL),"!here>>>"===r?t[i]=!1:(this.state.output.append(r,e,!0),t[i]=this.state.output.pop())}return void 0===this.institution.strings["part-separator"]&&(this.institution.strings["part-separator"]=this.state.tmp.name_delimiter),this._join(t,this.institution.strings["part-separator"])}
1,h.NameOutput.prototype._renderNames=function(t,e,i,s){var r=!1;if(e.length){for(var n=[],a=0,o=e.length;a<o;a+=1){var r,l,u=e[a];l=this.state.tmp.extension?["sort"]:u.isInstitution||u.literal?this.state.opt["cite-lang-prefs"].institutions:this.state.opt["cite-lang-prefs"].persons;var p={primary:"locale-orig",secondary:!1,tertiary:!1};if(l)for(var c=["primary","secondary","tertiary"],m=0,f=c.length;m<f&&!(l.length-1<m);m+=1)p[c[m]]="locale-"+l[m];else p.primary="locale-translat";if((this.state.tmp.sort_key_flag||"bibliography"!==this.state.tmp.area&&!("citation"===this.state.tmp.area&&"note"===this.state.opt.xclass&&this.item&&!this.item.position))&&(p.secondary=!1,p.tertiary=!1),this.setRenderedName(u),u.literal||u.isInstitution)n.push(this._renderInstitutionName(t,u,p,s));else{var d=this._renderPersonalName(t,u,p,i,a,s),g=h.Util.cloneToken(this.name);this.state.output.append(d,g,!0),n.push(this.state.output.pop())}}r=this.joinPersons(n,i,s)}return r},h.NameOutput.prototype._renderPersonalName=function(t,e,i,s,r,n){var a,o=this.getName(e,i.primary,!0),l=this._renderOnePersonalName(o.name,s,r,n),u=!1;i.secondary&&(o=this.getName(e,i.secondary,!1,o.usedOrig)).name&&(u=this._renderOnePersonalName(o.name,s,r,n));var p=!1;if(i.tertiary&&(o=this.getName(e,i.tertiary,!1,o.usedOrig)).name&&(p=this._renderOnePersonalName(o.name,s,r,n)),u||p){this.state.output.openLevel("empty"),this.state.output.append(l);var c=new h.Token;i.secondary&&(c.strings.prefix=this.state.opt.citeAffixes.persons[i.secondary].prefix,c.strings.suffix=this.state.opt.citeAffixes.persons[i.secondary].suffix,c.strings.prefix||(c.strings.prefix=" ")),this.state.output.append(u,c);var m=new h.Token;i.tertiary&&(m.strings.prefix=this.state.opt.citeAffixes.persons[i.tertiary].prefix,m.strings.suffix=this.state.opt.citeAffixes.persons[i.tertiary].suffix,m.strings.prefix||(m.strings.prefix=" ")),this.state.output.append(p,m),this.state.output.closeLevel(),a=this.state.output.pop()}else a=l;return a},h.NameOutput.prototype._isRomanesque=function(t){var e,i=2;return t.family.replace(/\"/g,"").match(h.ROMANESQUE_REGEXP)||(i=0),!i&&t.given&&t.given.match(h.STARTSWITH_ROMANESQUE_REGEXP)&&(i=1),2==i&&(t.multi&&t.multi.main?e=t.multi.main.slice(0,2):this.Item.language&&(e=this.Item.language.slice(0,2)),["ja","zh"].indexOf(e)>-1&&(i=1)),i},h.NameOutput.prototype._renderOnePersonalName=function(t,e,i,s){var r=this._droppingParticle(t,e,s),n=this._familyName(t),a=this._nonDroppingParticle(t),o=this._givenName(t,e,i),l=o.blob,u=this._nameSuffix(t);!1===l&&(r=!1,u=!1);var p=this.state.inheritOpt(this.name,"sort-separator");p||(p=""),f=t["comma-suffix"]?", ":" ";var c=this._isRomanesque(t),m=function t(e){return!!e&&("string"!=typeof e.blobs?t(e.blobs[e.blobs.length-1]):["â","'","-"," "].indexOf(e.blobs.slice(-1))>-1)}(a);if(d=["fr","ru","cs"].indexOf(this.state.opt["default-locale"][0].slice(0,2))>-1?"\xa0":" ",0===c)g=this._join([a,n,l],"");else if(1===c||t["static-ordering"])b=this._join([a,n],d),g=this._join([b,l]," ");else if(t["reverse-ordering"])b=this._join([a,n],d),g=this._join([l,b]," ");else if(this.state.tmp.sort_key_flag)"never"===this.state.opt["demote-non-dropping-particle"]?(b=this._join([a,n],d),b=this._join([b,r]," "),b=this._join([b,l],this.state.opt.sort_sep)):(v=this._join([l,r,a]," "),b=this._join([n,v],this.state.opt.sort_sep)),g=this._join([b,u]," ");else if("all"===this.state.inheritOpt(this.name,"name-as-sort-order")||"first"===this.state.inheritOpt(this.name,"name-as-sort-order")&&0===i&&(0===s||void 0===s))["Lord","Lady"].indexOf(t.given)>-1&&(p=", "),["always","display-and-sort"].indexOf(this.state.opt["demote-non-dropping-particle"])>-1?(v=this._join([l,r],t["comma-dropping-particle"]+" "),(v=this._join([v,a]," "))&&this.given&&(v.strings.prefix=this.given.strings.prefix,v.strings.suffix=this.given.strings.suffix),n&&this.family&&(n.strings.prefix=this.family.strings.prefix,n.strings.suffix=this.family.strings.suffix),b=this._join([n,v],p)):((_=m?this._join([a,n],""):this._join([a,n],d))&&this.family&&(_.strings.prefix=this.family.strings.prefix,_.strings.suffix=this.family.strings.suffix),(v=this._join([l,r],t["comma-dropping-particle"]+" "))&&this.given&&(v.strings.prefix=this.given.strings.prefix,v.strings.suffix=this.given.strings.suffix),b=this._join([_,v],p)),(g=this._join([b,u],p)).isInverted=!0;else{if(t["dropping-particle"]&&t.family&&!t["non-dropping-particle"]){var f,d,g,b,_,v,y,x=t["dropping-particle"];["'","ʼ","â","-"].indexOf(x.slice(-1))>-1&&"de"!==x.slice(0,-1)&&(n=this._join([r,n],""),r=!1)}m?(v=this._join([a,n],""),v=this._join([r,v],d)):v=this._join([r,a,n],d),(v=this._join([v,u],f))&&this.family&&(v.strings.prefix=this.family.strings.prefix,v.strings.suffix=this.family.strings.suffix),l&&this.given&&(l.strings.prefix=this.given.strings.prefix,l.strings.suffix=this.given.strings.suffix),v.strings.prefix&&(t["comma-dropping-particle"]=""),y=this.state.inheritOpt(this.name,"initialize-with")&&this.state.inheritOpt(this.name,"initialize-with").match(/[\u00a0\ufeff]/)&&1===o.initializationLevel?d:" ",g=this._join([l,v],t["comma-dropping-particle"]+y)}return this.state.tmp.group_context.tip.variable_success=!0,this.state.tmp.can_substitute.replace(!1,h.LITERAL),this.state.tmp.term_predecessor=!0,this.state.tmp.name_node.children.push(g),g},h.NameOutput.prototype._normalizeNameInput=function(t){var e={literal:t.literal,family:t.family,isInstitution:t.isInstitution,given:t.given,suffix:t.suffix,"comma-suffix":t["comma-suffix"],"non-dropping-particle":t["non-dropping-particle"],"dropping-particle":t["dropping-particle"],"static-ordering":t["static-ordering"],"static-particles":t["static-particles"],"reverse-ordering":t["reverse-ordering"],"full-form-always":t["full-form-always"],"parse-names":t["parse-names"],"comma-dropping-particle":"",block_initialize:t.block_initialize,multi:t.multi};return this._parseName(e),e},h.NameOutput.prototype._stripPeriods=function(t,e){var i=this[t+"_decor"];if(e){if(this.state.tmp.strip_periods)e=e.replace(/\./g,"");else if(i){for(var s=0,r=i.decorations.length;s<r;s+=1)if("@strip-periods"===i.decorations[s][0]&&"true"===i.decorations[s][1]){e=e.replace(/\./g,"");break}}}return e},h.NameOutput.prototype._nonDroppingParticle=function(t){var e=t["non-dropping-particle"];e&&this.state.tmp.sort_key_flag&&(e=e.replace(/[\'\u2019]/,""));var i=this._stripPeriods("family",e);return!!this.state.output.append(i,this.family_decor,!0)&&this.state.output.pop()}
1,h.NameOutput.prototype._droppingParticle=function(t,e,i){var s=t["dropping-particle"];s&&this.state.tmp.sort_key_flag&&(s=s.replace(/[\'\u2019]/,""));var r=this._stripPeriods("given",s);if(t["dropping-particle"]&&t["dropping-particle"].match(/^et.?al[^a-z]$/))this.state.inheritOpt(this.name,"et-al-use-last")?void 0===i?this.etal_spec[e].freeters=2:this.etal_spec[e].persons=2:void 0===i?this.etal_spec[e].freeters=1:this.etal_spec[e].persons=1,t["comma-dropping-particle"]="";else if(this.state.output.append(r,this.given_decor,!0))return this.state.output.pop();return!1},h.NameOutput.prototype._familyName=function(t){var e=this._stripPeriods("family",t.family);return!!this.state.output.append(e,this.family_decor,!0)&&this.state.output.pop()},h.NameOutput.prototype._givenName=function(t,e,i){var s,r,n="long"!==this.state.inheritOpt(this.name,"form","name-form","long"),a=!1!==this.state.inheritOpt(this.name,"initialize"),o="string"==typeof this.state.inheritOpt(this.name,"initialize-with")&&!t.block_initialize;if(t["full-form-always"])r=2;else{s=n?0:o?1:2;var l=this.state.tmp.disambig_settings.givens[e][i];r=l>s?l:s}var u=this.state.citation.opt["givenname-disambiguation-rule"];if(u&&"-with-initials"===u.slice(-14)&&(o=!0),t.family&&1===r){if(o){var p=this.state.inheritOpt(this.name,"initialize-with",!1,"");t.given=h.Util.Names.initializeWith(this.state,t.given,p,!a)}else t.given=h.Util.Names.unInitialize(this.state,t.given)}else{if(0===r)return{blob:!1};2===r&&(t.given=h.Util.Names.unInitialize(this.state,t.given))}var c=this._stripPeriods("given",t.given);return this.state.output.append(c,this.given_decor,!0)?{blob:this.state.output.pop(),initializationLevel:r}:{blob:!1}},h.NameOutput.prototype._nameSuffix=function(t){var e,i=t.suffix;i&&"string"==typeof this.state.inheritOpt(this.name,"initialize-with")&&(i=h.Util.Names.initializeWith(this.state,i,this.state.inheritOpt(this.name,"initialize-with"),!0));var s="";return(i=this._stripPeriods("family",i))&&"."===i.slice(-1)&&(i=i.slice(0,-1),s="."),!!this.state.output.append(i,"empty",!0)&&((e=this.state.output.pop()).strings.suffix=s+e.strings.suffix,e)},h.NameOutput.prototype._getLongStyle=function(t){var e;return(e=t.short.length&&this.institutionpart["long-with-short"]?this.institutionpart["long-with-short"]:this.institutionpart.long)||(e=new h.Token),e},h.NameOutput.prototype._getShortStyle=function(){return this.institutionpart.short?this.institutionpart.short:new h.Token},h.NameOutput.prototype._parseName=function(t){var e;if(!t["parse-names"]&&void 0!==t["parse-names"])return t;t.family&&!t.given&&t.isInstitution&&(t.literal=t.family,t.family=void 0,t.isInstitution=void 0),t.family&&'"'===t.family.slice(0,1)&&'"'===t.family.slice(-1)||!t["parse-names"]&&void 0!==t["parse-names"]?(t.family=t.family.slice(1,-1),e=!0,t["parse-names"]=0):e=!1,this.state.opt.development_extensions.parse_names&&!t["non-dropping-particle"]&&t.family&&!e&&t.given&&!t["static-particles"]&&h.parseParticles(t,!0)},h.NameOutput.prototype.getName=function(t,e,i,s){if(s&&"locale-orig"===e)return{name:!1,usedOrig:s};t.family||(t.family=""),t.given||(t.given="");var r,n={};n["static-ordering"]=this.getStaticOrder(t);var a=!0;if("locale-orig"!==e&&(a=!1,t.multi)){for(var o=this.state.opt[e],l=0,u=o.length;l<u;l+=1)if(r=o[l],t.multi._key[r]){a=!0;var p=t.isInstitution;(t=t.multi._key[r]).isInstitution=p,(n=this.getNameParams(r)).transliterated=!0;break}}return(!a&&(r=!1,t.multi&&t.multi.main?r=t.multi.main:this.Item.language&&(r=this.Item.language),r&&(n=this.getNameParams(r))),i||a)?(t.family||(t.family=""),t.given||(t.given=""),t.literal&&(delete t.family,delete t.given),!(t={family:t.family,given:t.given,"non-dropping-particle":t["non-dropping-particle"],"dropping-particle":t["dropping-particle"],suffix:t.suffix,"static-ordering":n["static-ordering"],"static-particles":t["static-particles"],"reverse-ordering":n["reverse-ordering"],"full-form-always":n["full-form-always"],"parse-names":t["parse-names"],"comma-suffix":t["comma-suffix"],"comma-dropping-particle":t["comma-dropping-particle"],transliterated:n.transliterated,block_initialize:n["block-initialize"],literal:t.literal,isInstitution:t.isInstitution,multi:t.multi}).literal&&!t.given&&t.family&&t.isInstitution&&(t.literal=t.family),t.literal&&(delete t.family,delete t.given),{name:t=this._normalizeNameInput(t),usedOrig:s||!a}):{name:!1,usedOrig:s}},h.NameOutput.prototype.getNameParams=function(t){var e={},i=h.localeResolve(this.Item.language,this.state.opt["default-locale"][0]),s=this.state.locale[i.best]?i.best:this.state.opt["default-locale"][0],r=this.state.locale[s].opts["name-as-sort-order"],n=this.state.locale[s].opts["name-as-reverse-order"],a=this.state.locale[s].opts["name-never-short"],o=t.split("-")[0];return r&&r[o]&&(e["static-ordering"]=!0,e["reverse-ordering"]=!1),n&&n[o]&&(e["reverse-ordering"]=!0,e["static-ordering"]=!1),a&&a[o]&&(e["full-form-always"]=!0),e["static-ordering"]&&(e["block-initialize"]=!0),e},h.NameOutput.prototype.setRenderedName=function(t){if("bibliography"===this.state.tmp.area){for(var e="",i=0,s=h.NAME_PARTS.length;i<s;i+=1)t[h.NAME_PARTS[i]]&&(e+=t[h.NAME_PARTS[i]]);this.state.tmp.rendered_name.push(e)}}
1,h.NameOutput.prototype.fixupInstitution=function(t,e,i){!t.literal&&t.family&&(t.literal=t.family,delete t.family);var s=t.literal,r=s,n={long:s.split(/\s*\|\s*/),short:r.split(/\s*\|\s*/)};if(this.state.sys.getAbbreviation){if("short"===this.institution.strings.form){let t=this.Item.jurisdiction;t=this.state.transform.loadAbbreviation(t,"institution-entire",s,this.Item.language),this.state.transform.abbrevs[t]["institution-entire"][s]?s=this.state.transform.abbrevs[t]["institution-entire"][s]:(t=this.Item.jurisdiction,t=this.state.transform.loadAbbreviation(t,"institution-part",s,this.Item.language),this.state.transform.abbrevs[t]["institution-part"][s]&&(s=this.state.transform.abbrevs[t]["institution-part"][s])),s=this._quashChecks(t,s)}if(["short","short-long","long-short"].indexOf(this.institution.strings["institution-parts"])>-1){let t=this.Item.jurisdiction;t=this.state.transform.loadAbbreviation(t,"institution-part",r,this.Item.language),this.state.transform.abbrevs[t]["institution-part"][r]&&(r=this.state.transform.abbrevs[t]["institution-part"][r]),r=this._quashChecks(t,r),["short-long","long-short"].indexOf(this.institution.strings["institution-parts"])>-1&&r===s&&(r="")}if(n.long=s.split(/\s*\|\s*/),n.short=r.split(/\s*\|\s*/),["short","short-long","long-short"].indexOf(this.institution.strings["institution-parts"])>-1)for(var a=n.short.length-1;a>-1;a--){let t=this.Item.jurisdiction;var o=n.short[a];if(t=this.state.transform.loadAbbreviation(t,"institution-part",o,this.Item.language),this.state.transform.abbrevs[t]["institution-part"][o]&&(n.short[a]=this.state.transform.abbrevs[t]["institution-part"][o]),n.short[a].indexOf("|")>-1){let t=n.short,e=t[a].split(/\s*\|\s*/);n.short=t.slice(0,a).concat(e).concat(t.slice(a+1))}}if(this.state.opt.development_extensions.legacy_institution_name_ordering&&n.short.reverse(),n.short=this._trimInstitution(n.short),this.institution.strings["reverse-order"]&&n.short.reverse(),!this.state.tmp.just_looking&&this.Item.jurisdiction){let t=this.Item.jurisdiction;var l=this.state.tmp.abbrev_trimmer;if(l&&l[t]&&l[t][e])for(var u=0,p=n.short.length;u<p;u++){var h=n.short[u];n.short[u]=h.replace(l[t][e],"").trim()}}}return this.state.opt.development_extensions.legacy_institution_name_ordering&&n.long.reverse(),n.long=this._trimInstitution(n.long),this.institution.strings["reverse-order"]&&n.long.reverse(),n},h.NameOutput.prototype.getStaticOrder=function(t,e){var i=!1;return!e&&t["static-ordering"]?i=!0:0===this._isRomanesque(t)?i=!0:(!t.multi||!t.multi.main)&&this.Item.language&&["vi","hu"].indexOf(this.Item.language)>-1?i=!0:t.multi&&t.multi.main&&["vi","hu"].indexOf(t.multi.main.slice(0,2))>-1?i=!0:this.state.opt["auto-vietnamese-names"]&&h.VIETNAMESE_NAMES.exec(t.family+" "+t.given)&&h.VIETNAMESE_SPECIALS.exec(t.family+t.given)&&(i=!0),i},h.NameOutput.prototype._quashChecks=function(t,e){var e=this.state.transform.quashCheck(t,e),i=e.split(/>>[0-9]{4}>>/),s=e.match(/>>([0-9]{4})>>/);e=i.pop();var r=this.Item["original-date"]?this.Item["original-date"]:this.Item.issued;if(r&&(r=!isNaN(r=parseInt(r.year,10))&&r),r){if(i.length>0)for(var n=s.length-1;n>0&&!(r>=parseInt(s[n],10));n--)e=i.pop();e=e.replace(/\s*\|\s*/g,"|")}return e},h.NameOutput.prototype._trimInstitution=function(t){var e=!1,i=!1,s=!1,r=!1,n=t.slice();if(this.institution){if(void 0!==this.institution.strings["use-first"]&&(e=this.institution.strings["use-first"]),void 0!==this.institution.strings["use-last"]&&(s=this.institution.strings["use-last"]),void 0!==this.institution.strings["stop-first"]&&(r=this.institution.strings["stop-first"]),void 0!==this.institution.strings["stop-last"]&&(i=this.institution.strings["stop-last"]),e&&(i&&(n=n.slice(0,-1*i)),n=n.slice(0,e)),s){var a=t.slice();e?r=e:n=[],r&&(a=a.slice(r)),a=a.slice(-1*s),n=n.concat(a)}t=n}return t},h.PublisherOutput=function(t,e){this.state=t,this.group_tok=e,this.varlist=[]},h.PublisherOutput.prototype.render=function(){this.clearVars(),this.composeAndBlob(),this.composeElements(),this.composePublishers(),this.joinPublishers()},h.PublisherOutput.prototype.composeAndBlob=function(){this.and_blob={};var t=!1;"text"===this.group_tok.strings.and?t=this.state.getTerm("and"):"symbol"===this.group_tok.strings.and&&(t="&");var e=new h.Token;e.strings.suffix=" ",e.strings.prefix=" ",this.state.output.append(t,e,!0);var i=this.state.output.pop();e.strings.prefix=this.group_tok.strings["subgroup-delimiter"],this.state.output.append(t,e,!0);var s=this.state.output.pop();this.and_blob.single=!1,this.and_blob.multiple=!1,t&&("always"===this.group_tok.strings["subgroup-delimiter-precedes-last"]?this.and_blob.single=s:"never"===this.group_tok.strings["subgroup-delimiter-precedes-last"]?(this.and_blob.single=i,this.and_blob.multiple=i):(this.and_blob.single=i,this.and_blob.multiple=s))},h.PublisherOutput.prototype.composeElements=function(){for(var t=0;t<2;t+=1)for(var e=["publisher","publisher-place"][t],i=0,s=this["publisher-list"].length;i<s;i+=1){var r=this[e+"-list"][i],n=this[e+"-token"];this.state.output.append(r,n,!0),this[e+"-list"][i]=this.state.output.pop()}},h.PublisherOutput.prototype.composePublishers=function(){for(var t,e=0,i=this["publisher-list"].length;e<i;e+=1)t=[this[this.varlist[0]+"-list"][e],this[this.varlist[1]+"-list"][e]],this["publisher-list"][e]=this._join(t,this.group_tok.strings.delimiter)},h.PublisherOutput.prototype.joinPublishers=function(){var t=this["publisher-list"],e=this._join(t,this.group_tok.strings["subgroup-delimiter"],this.and_blob.single,this.and_blob.multiple,this.group_tok);this.state.output.append(e,"literal")},h.PublisherOutput.prototype._join=h.NameOutput.prototype._join,h.PublisherOutput.prototype._getToken=h.NameOutput.prototype._getToken,h.PublisherOutput.prototype.clearVars=function(){this.state.tmp["publisher-list"]=!1,this.state.tmp["publisher-place-list"]=!1,this.state.tmp["publisher-group-token"]=!1,this.state.tmp["publisher-token"]=!1,this.state.tmp["publisher-place-token"]=!1}
1,h.evaluateLabel=function(t,e,i,s){"locator"===t.strings.term?(s&&s.label&&(r="sub verbo"===s.label?"sub-verbo":s.label),r||(r="page")):r=t.strings.term;var r,n=t.strings.plural;if("number"!=typeof n){var a=s&&"locator"===t.strings.term?s:i;a[t.strings.term]&&(e.processNumber(!1,a,t.strings.term,i.type),n=e.tmp.shadow_numbers[t.strings.term].plural,e.tmp.shadow_numbers[t.strings.term].labelForm||e.tmp.shadow_numbers[t.strings.term].labelDecorations||(t.strings.form?e.tmp.shadow_numbers[t.strings.term].labelForm=t.strings.form:e.tmp.group_context.tip.label_form&&(e.tmp.shadow_numbers[t.strings.term].labelForm=e.tmp.group_context.tip.label_form),e.tmp.shadow_numbers[t.strings.term].labelCapitalizeIfFirst=t.strings.capitalize_if_first,e.tmp.shadow_numbers[t.strings.term].labelDecorations=t.decorations.slice()),["locator","number","page"].indexOf(t.strings.term)>-1&&e.tmp.shadow_numbers[t.strings.term].label&&(r=e.tmp.shadow_numbers[t.strings.term].label),t.decorations&&e.opt.development_extensions.csl_reverse_lookup_support&&(t.decorations.reverse(),t.decorations.push(["@showid","true",t.cslid]),t.decorations.reverse()))}return h.castLabel(e,t,r,n,h.TOLERANT)},h.castLabel=function(t,e,i,s,r){var n=e.strings.form,a=e.strings.capitalize_if_first;t.tmp.group_context.tip.label_form&&("static"===n?t.tmp.group_context.tip.label_static=!0:n=t.tmp.group_context.tip.label_form),t.tmp.group_context.tip.label_capitalize_if_first&&(a=t.tmp.group_context.tip.label_capitalize_if_first);var o=t.getTerm(i,n,s,!1,r,e.default_locale);if(a&&(o=h.Output.Formatters["capitalize-first"](t,o)),t.tmp.strip_periods)o=o.replace(/\./g,"");else for(var l=0,u=e.decorations.length;l<u;l+=1)if("@strip-periods"===e.decorations[l][0]&&"true"===e.decorations[l][1]){o=o.replace(/\./g,"");break}return o},h.Node.name={build:function(t,e){var i,s;[h.SINGLETON,h.START].indexOf(this.tokentype)>-1&&(void 0===t.tmp.root?(s=void 0,t.tmp.root="citation"):s=t.tmp.root,t.inheritOpt(this,"et-al-subsequent-min")&&t.inheritOpt(this,"et-al-subsequent-min")!==t.inheritOpt(this,"et-al-min")&&(t.opt.update_mode=h.POSITION),t.inheritOpt(this,"et-al-subsequent-use-first")&&t.inheritOpt(this,"et-al-subsequent-use-first")!==t.inheritOpt(this,"et-al-use-first")&&(t.opt.update_mode=h.POSITION),t.tmp.root=s,i=function(t){t.tmp.etal_term="et-al",t.tmp.name_delimiter=t.inheritOpt(this,"delimiter","name-delimiter",", "),t.tmp["delimiter-precedes-et-al"]=t.inheritOpt(this,"delimiter-precedes-et-al"),"text"===t.inheritOpt(this,"and")?this.and_term=t.getTerm("and","long",0):"symbol"===t.inheritOpt(this,"and")&&(t.opt.development_extensions.expect_and_symbol_form?this.and_term=t.getTerm("and","symbol",0):this.and_term="&"),t.tmp.and_term=this.and_term,h.STARTSWITH_ROMANESQUE_REGEXP.test(this.and_term)?(this.and_prefix_single=" ",this.and_prefix_multiple=", ","string"==typeof t.tmp.name_delimiter&&(this.and_prefix_multiple=t.tmp.name_delimiter),this.and_suffix=" "):(this.and_prefix_single="",this.and_prefix_multiple="",this.and_suffix=""),"always"===t.inheritOpt(this,"delimiter-precedes-last")?this.and_prefix_single=t.tmp.name_delimiter:"never"===t.inheritOpt(this,"delimiter-precedes-last")?this.and_prefix_multiple&&(this.and_prefix_multiple=" "):"after-inverted-name"===t.inheritOpt(this,"delimiter-precedes-last")&&(this.and_prefix_single&&(this.and_prefix_single=t.tmp.name_delimiter),this.and_prefix_multiple&&(this.and_prefix_multiple=" ")),this.and={},t.inheritOpt(this,"and")?(t.output.append(this.and_term,"empty",!0),this.and.single=t.output.pop(),this.and.single.strings.prefix=this.and_prefix_single,this.and.single.strings.suffix=this.and_suffix,t.output.append(this.and_term,"empty",!0),this.and.multiple=t.output.pop(),this.and.multiple.strings.prefix=this.and_prefix_multiple,this.and.multiple.strings.suffix=this.and_suffix):t.tmp.name_delimiter&&(this.and.single=new h.Blob(t.tmp.name_delimiter),this.and.single.strings.prefix="",this.and.single.strings.suffix="",this.and.multiple=new h.Blob(t.tmp.name_delimiter),this.and.multiple.strings.prefix="",this.and.multiple.strings.suffix=""),this.ellipsis={},t.inheritOpt(this,"et-al-use-last")&&(this.ellipsis_term="â¦",this.ellipsis_prefix_single=" ",this.ellipsis_prefix_multiple=t.inheritOpt(this,"delimiter","name-delimiter",", "),this.ellipsis_suffix=" ",this.ellipsis.single=new h.Blob(this.ellipsis_term),this.ellipsis.single.strings.prefix=this.ellipsis_prefix_single,this.ellipsis.single.strings.suffix=this.ellipsis_suffix,this.ellipsis.multiple=new h.Blob(this.ellipsis_term),this.ellipsis.multiple.strings.prefix=this.ellipsis_prefix_multiple,this.ellipsis.multiple.strings.suffix=this.ellipsis_suffix),void 0===t.tmp["et-al-min"]&&(t.tmp["et-al-min"]=t.inheritOpt(this,"et-al-min")),void 0===t.tmp["et-al-use-first"]&&(t.tmp["et-al-use-first"]=t.inheritOpt(this,"et-al-use-first")),void 0===t.tmp["et-al-use-last"]&&(t.tmp["et-al-use-last"]=t.inheritOpt(this,"et-al-use-last")),t.nameOutput.name=this},t.build.name_flag=!0,this.execs.push(i)),e.push(this)}},h.Node["name-part"]={build:function(t){t.build[this.strings.name]=this}},h.Node.names={build:function(t,e){var i;if((this.tokentype===h.START||this.tokentype===h.SINGLETON)&&(h.Util.substituteStart.call(this,t,e),t.build.substitute_level.push(1)),this.tokentype===h.SINGLETON){for(var s in t.build.names_variables[t.build.names_variables.length-1].concat(this.variables),this.variables){var r=this.variables[s],n=t.build.name_label[t.build.name_label.length-1];Object.keys(n).length&&(n[r]=n[Object.keys(n)[0]])}i=function(t){t.nameOutput.reinit(this,this.variables_real[0])},this.execs.push(i)}if(this.tokentype===h.START&&(t.build.names_flag=!0,t.build.name_flag=!1,t.build.names_level+=1,t.build.names_variables.push(this.variables),t.build.name_label.push({}),i=function(t){t.tmp.can_substitute.push(!0),t.tmp.name_node={}
1,t.tmp.name_node.children=[],t.nameOutput.init(this)},this.execs.push(i)),this.tokentype===h.END){for(var s=0;s<3;s+=1){var a=["family","given","et-al"][s];this[a]=t.build[a],1===t.build.names_level&&(t.build[a]=void 0)}this.label=t.build.name_label[t.build.name_label.length-1],t.build.names_level+=-1,t.build.names_variables.pop(),t.build.name_label.pop(),i=function(t){t.tmp.etal_node?this.etal_style=t.tmp.etal_node:this.etal_style="empty",this.etal_term=t.getTerm(t.tmp.etal_term,"long",0),this.etal_prefix_single=" ",this.etal_prefix_multiple=t.tmp.name_delimiter,"always"===t.tmp["delimiter-precedes-et-al"]?this.etal_prefix_single=t.tmp.name_delimiter:"never"===t.tmp["delimiter-precedes-et-al"]?this.etal_prefix_multiple=" ":"after-inverted-name"===t.tmp["delimiter-precedes-et-al"]&&(this.etal_prefix_single=t.tmp.name_delimiter,this.etal_prefix_multiple=" "),this.etal_suffix="",h.STARTSWITH_ROMANESQUE_REGEXP.test(this.etal_term)||(" "===this.etal_prefix_single&&(this.etal_prefix_single="")," "===this.etal_prefix_multiple&&(this.etal_prefix_multiple="")," "!==this.etal_suffix||(this.etal_suffix=""));for(var e=0;e<3;e+=1){var i=["family","given"][e];t.nameOutput[i]=this[i]}t.nameOutput.with=this.with;var s="with",r="",n="";h.STARTSWITH_ROMANESQUE_REGEXP.test(s)&&(r=" ",n=" ");var a={};a.single=new h.Blob(s),a.single.strings.suffix=n,a.multiple=new h.Blob(s),a.multiple.strings.suffix=n,"always"===t.inheritOpt(t.nameOutput.name,"delimiter-precedes-last")?(a.single.strings.prefix=t.inheritOpt(this,"delimiter","names-delimiter"),a.multiple.strings.prefix=t.inheritOpt(this,"delimiter","names-delimiter")):"contextual"===t.inheritOpt(t.nameOutput.name,"delimiter-precedes-last")?(a.single.strings.prefix=r,a.multiple.strings.prefix=t.inheritOpt(this,"delimiter","names-delimiter")):("after-inverted-name"===t.inheritOpt(t.nameOutput.name,"delimiter-precedes-last")?a.single.strings.prefix=t.inheritOpt(this,"delimiter","names-delimiter"):a.single.strings.prefix=r,a.multiple.strings.prefix=r),t.nameOutput.with=a,t.nameOutput.label=this.label,t.nameOutput.etal_style=this.etal_style,t.nameOutput.etal_term=this.etal_term,t.nameOutput.etal_prefix_single=this.etal_prefix_single,t.nameOutput.etal_prefix_multiple=this.etal_prefix_multiple,t.nameOutput.etal_suffix=this.etal_suffix,t.nameOutput.outputNames(),t.tmp["et-al-use-first"]=void 0,t.tmp["et-al-min"]=void 0,t.tmp["et-al-use-last"]=void 0},this.execs.push(i),i=function(t){t.tmp.can_substitute.pop()||t.tmp.can_substitute.replace(!1,h.LITERAL),1===t.tmp.can_substitute.mystack.length&&(t.tmp.can_block_substitute=!1)},this.execs.push(i),t.build.name_flag=!1}e.push(this),(this.tokentype===h.END||this.tokentype===h.SINGLETON)&&(t.build.substitute_level.pop(),h.Util.substituteEnd.call(this,t,e))}},h.Node.number={build:function(t,e){var i;h.Util.substituteStart.call(this,t,e),"roman"===this.strings.form?this.formatter=t.fun.romanizer:"ordinal"===this.strings.form?this.formatter=t.fun.ordinalizer:"long-ordinal"===this.strings.form&&(this.formatter=t.fun.long_ordinalizer),void 0===this.successor_prefix&&(this.successor_prefix=t[t.build.area].opt.layout_delimiter),void 0===this.splice_prefix&&(this.splice_prefix=t[t.build.area].opt.layout_delimiter),i=function(t,e,i){if(0!==this.variables.length){if(s=this.variables[0],void 0===i)var s,i={};if(["locator","locator-extra"].indexOf(s)>-1){if(t.tmp.just_looking||!i[s])return}else if(!e[s])return;if("collection-number"===s&&"legal_case"===e.type&&(t.tmp.renders_collection_number=!0),t.tmp.group_context.tip.force_suppress)return!1;if(["locator","locator-extra"].indexOf(s)>-1?t.processNumber.call(t,this,i,s,e.type):(!t.tmp.group_context.tip.condition&&e[s]&&(t.tmp.just_did_number=(""+e[s]).match(/[0-9]$/)),t.processNumber.call(t,this,e,s,e.type)),this.substring){var r=e[s].slice(this.substring);t.output.append(r,this)}else h.Util.outputNumericField(t,s,e.id);["locator","locator-extra"].indexOf(this.variables_real[0])>-1&&!t.tmp.just_looking&&(t.tmp.done_vars.push(this.variables_real[0]),t.tmp.group_context.tip.done_vars.push(this.variables_real[0]))}},this.execs.push(i),e.push(this),h.Util.substituteEnd.call(this,t,e)}},h.Node.sort={build:function(t,e){if(e=t[t.build.root+"_sort"].tokens,this.tokentype===h.START){"citation"===t.build.area&&(t.opt.sort_citations=!0),t.build.area=t.build.root+"_sort",t.build.extension="_sort";var i=function(t,e){if(t.opt.has_layout_locale){for(var i,s=h.localeResolve(e.language,t.opt["default-locale"][0]),r=t[t.tmp.area.slice(0,-5)].opt.sort_locales,n=0,a=r.length;n<a&&((i=r[n][s.bare])||(i=r[n][s.best]),!i);n+=1);i||(i=t.opt["default-locale"][0]),t.tmp.lang_sort_hold=t.opt.lang,t.opt.lang=i}};this.execs.push(i)}if(this.tokentype===h.END){t.build.area=t.build.root,t.build.extension="";var i=function(t){t.opt.has_layout_locale&&(t.opt.lang=t.tmp.lang_sort_hold,delete t.tmp.lang_sort_hold)};this.execs.push(i)}e.push(this)}},h.Node.substitute={build:function(t,e){var i;if(this.tokentype===h.START){var s=new h.Token("choose",h.START);h.Node.choose.build.call(s,t,e);var r=new h.Token("if",h.SINGLETON);i=function(){return!!t.tmp.value.length&&!t.tmp.common_term_match_fail},r.tests=[i],r.test=t.fun.match.any(r,t,r.tests),e.push(r),i=function(t){t.tmp.can_block_substitute=!0,t.tmp.value.length&&!t.tmp.common_term_match_fail&&t.tmp.can_substitute.replace(!1,h.LITERAL),t.tmp.common_term_match_fail=!1},this.execs.push(i),e.push(this)}if(this.tokentype===h.END){e.push(this);var n=new h.Token("choose",h.END);h.Node.choose.build.call(n,t,e)}}},h.Node.text={build:function(t,e){var i,s,r,n,a,o,l,u,p,c,m;if(this.postponed_macro){var f=h.Util.cloneToken(this);f.name="group",f.tokentype=h.START,h.Node.group.build.call(f,t,e),h.expandMacro.call(t,this,e);var d=h.Util.cloneToken(this);d.name="group",d.tokentype=h.END,"juris-locator-label"===this.postponed_macro&&(d.isJurisLocatorLabel=!0),h.Node.group.build.call(d,t,e)}else{if(h.Util.substituteStart.call(this,t,e),this.variables_real||(this.variables_real=[]),this.variables||(this.variables=[]),s="long",r=0,this.strings.form&&(s=this.strings.form),this.strings.plural&&(r=this.strings.plural),"citation-number"===this.variables_real[0]||"year-suffix"===this.variables_real[0]||"citation-label"===this.variables_real[0])"citation-number"===this.variables_real[0]?("citation"===t.build.root&&(t.opt.update_mode=h.NUMERIC),"bibliography"===t.build.root&&(t.opt.bib_mode=h.NUMERIC),"citation-number"===t[t.tmp.area].opt.collapse&&(this.range_prefix=t.getTerm("citation-range-delimiter")),this.successor_prefix=t[t.build.area].opt.layout_delimiter,this.splice_prefix=t[t.build.area].opt.layout_delimiter,i=function(t,e,
1i){if(n=""+e.id,!t.tmp.just_looking){if("_sort"===t.tmp.area.slice(-5)&&"citation-number"===this.variables[0]){if("bibliography_sort"===t.tmp.area&&t.tmp.group_context.tip.done_vars.push("citation-number"),"citation_sort"===t.tmp.area&&t.bibliography_sort.tmp.citation_number_map)var s=t.bibliography_sort.tmp.citation_number_map[t.registry.registry[e.id].seq];else var s=t.registry.registry[e.id].seq;s&&(s=h.Util.padding(""+s)),t.output.append(s,this);return}i&&i["author-only"]&&t.tmp.element_trace.replace("suppress-me"),s="bibliography_sort"!==t.tmp.area&&t.bibliography_sort.tmp.citation_number_map&&t.bibliography_sort.opt.citation_number_sort_direction===h.DESCENDING?t.bibliography_sort.tmp.citation_number_map[t.registry.registry[n].seq]:t.registry.registry[n].seq,t.opt.citation_number_slug?t.output.append(t.opt.citation_number_slug,this):(o=new h.NumericBlob(t,!1,s,this,e.id),t.tmp.in_cite_predecessor&&(o.suppress_splice_prefix=!0),t.output.append(o,"literal"))}},this.execs.push(i)):"year-suffix"===this.variables_real[0]?(t.opt.has_year_suffix=!0,"year-suffix-ranged"===t[t.tmp.area].opt.collapse&&(this.range_prefix=t.getTerm("citation-range-delimiter")),this.successor_prefix=t[t.build.area].opt.layout_delimiter,t[t.tmp.area].opt["year-suffix-delimiter"]&&(this.successor_prefix=t[t.build.area].opt["year-suffix-delimiter"]),i=function(t,e){if(t.registry.registry[e.id]&&!1!==t.registry.registry[e.id].disambig.year_suffix&&!t.tmp.just_looking){a=parseInt(t.registry.registry[e.id].disambig.year_suffix,10),t[t.tmp.area].opt.cite_group_delimiter&&(this.successor_prefix=t[t.tmp.area].opt.cite_group_delimiter),o=new h.NumericBlob(t,!1,a,this,e.id),l=new h.Util.Suffixator(h.SUFFIX_CHARS),o.setFormatter(l),t.output.append(o,"literal"),u=!1;for(var i=0,s=t.tmp.group_context.mystack.length;i<s;i++){var r=t.tmp.group_context.mystack[i];if(!r.variable_success&&(r.variable_attempt||!r.variable_attempt&&!r.term_intended)){u=!0;break}}p=t[t.tmp.area].opt["year-suffix-delimiter"],u&&p&&!t.tmp.sort_key_flag&&(t.tmp.splice_delimiter=t[t.tmp.area].opt["year-suffix-delimiter"])}},this.execs.push(i)):"citation-label"===this.variables_real[0]&&("bibliography"===t.build.root&&(t.opt.bib_mode=h.TRIGRAPH),t.opt.has_year_suffix=!0,i=function(t,e){(c=e["citation-label"])||(c=t.getCitationLabel(e)),t.tmp.just_looking||(m="",t.registry.registry[e.id]&&!1!==t.registry.registry[e.id].disambig.year_suffix&&(a=parseInt(t.registry.registry[e.id].disambig.year_suffix,10),m=t.fun.suffixator.format(a)),c+=m),t.output.append(c,this)},this.execs.push(i));else if(this.strings.term)i=function(t,e){var i,n=t.opt.gender[e.type],a=this.strings.term;if(""!==(a=t.getTerm(a,s,r,n,h.TOLERANT,this.default_locale))&&(t.tmp.group_context.tip.term_intended=!0),h.UPDATE_GROUP_CONTEXT_CONDITION(t,a,null,this),i=t.tmp.term_predecessor||"in-text"===t.opt.class&&"citation"===t.tmp.area?a:h.Output.Formatters["capitalize-first"](t,a),t.tmp.strip_periods)i=i.replace(/\./g,"");else for(var o=0,l=this.decorations.length;o<l;o+=1)if("@strip-periods"===this.decorations[o][0]&&"true"===this.decorations[o][1]){i=i.replace(/\./g,"");break}t.output.append(i,this),t.tmp.can_block_substitute&&t.tmp.can_substitute.replace(!1,h.LITERAL)},this.execs.push(i),t.build.term=!1,t.build.form=!1,t.build.plural=!1;else if(this.variables_real.length){if(i=function(t,e){"locator"!==this.variables_real[0]&&(t.tmp.have_collapsed=!1),!t.tmp.group_context.tip.condition&&e[this.variables[0]]&&(t.tmp.just_did_number=!1);var i=e[this.variables[0]];i&&!t.tmp.group_context.tip.condition&&((""+i).slice(-1).match(/[0-9]/)?t.tmp.just_did_number=!0:t.tmp.just_did_number=!1)},this.execs.push(i),h.MULTI_FIELDS.indexOf(this.variables_real[0])>-1||this.variables_real[0].indexOf("-main")>-1||this.variables_real[0].indexOf("-sub")>-1||["language-name","language-name-original"].indexOf(this.variables_real[0])>-1){var g=this.variables[0],b=!1,_=!1,v=!1;"short"===s?"-short"!==this.variables_real[0].slice(-6)&&(_=this.variables_real[0]+"-short"):g=!1,t.build.extension?v=!0:(v=!0,b=!0),i=t.transform.getOutputFunction(this.variables,g,b,_,v)}else i=h.CITE_FIELDS.indexOf(this.variables_real[0])>
1-1?function(t,e,i){i&&i[this.variables[0]]&&(t.processNumber(this,i,this.variables[0],e.type),h.Util.outputNumericField(t,this.variables[0],e.id),["locator","locator-extra"].indexOf(this.variables_real[0])>-1&&!t.tmp.just_looking&&t.tmp.done_vars.push(this.variables_real[0]))}:["page","page-first","chapter-number","collection-number","edition","issue","number","number-of-pages","number-of-volumes","volume"].indexOf(this.variables_real[0])>-1?function(t,e){t.processNumber(this,e,this.variables[0],e.type),h.Util.outputNumericField(t,this.variables[0],e.id)}:["URL","DOI"].indexOf(this.variables_real[0])>-1?function(t,e){var i;if(this.variables[0]&&(i=t.getVariable(e,this.variables[0],s))){if("URL"===this.variables[0]&&"short"===s&&(i=i.replace(/(.*\.[^\/]+)\/.*/,"$1")).match(/\/\/www\./)&&(i=i.replace(/https?:\/\//,"")),t.opt.development_extensions.wrap_url_and_doi){if(this.decorations.length&&this.decorations[0][0]==="@"+this.variables[0])t.output.append(i,this,!1,!1,!0);else{var r=h.Util.cloneToken(this),n=new h.Blob(null,null,"url-wrapper");if(n.decorations.push(["@DOI","true"]),"DOI"===this.variables_real[0]){this.strings.prefix&&this.strings.prefix.match(/^.*https:\/\/doi\.org\/$/)&&(a=(i=i.replace(/^https?:\/\/doi\.org\//,"")).match(/^https?:\/\//)?"":"https://doi.org/",r.strings.prefix=this.strings.prefix.slice(0,r.strings.prefix.length-16));var a,o=new h.Blob(a),l=new h.Blob(i);n.push(o),n.push(l),t.output.append(n,r,!1,!1,!0)}else{var l=new h.Blob(i);n.push(l),t.output.append(n,r,!1,!1,!0)}}}else{if(this.decorations.length)for(var u=this.decorations.length-1;u>-1;u--)this.decorations[u][0]==="@"+this.variables[0]&&(this.decorations=this.decorations.slice(0,u).concat(this.decorations.slice(u+1)));t.output.append(i,this,!1,!1,!0)}}}:"section"===this.variables_real[0]?function(t,e){var i;(i=t.getVariable(e,this.variables[0],s))&&t.output.append(i,this)}:"hereinafter"===this.variables_real[0]?function(t,e){var i=t.transform.abbrevs.default.hereinafter[e.id];i&&(t.output.append(i,this),t.tmp.group_context.tip.variable_success=!0)}:function(t,e){var i;this.variables[0]&&(i=t.getVariable(e,this.variables[0],s))&&(i=(i=""+i).split("\\").join(""),t.output.append(i,this))};this.execs.push(i)}else this.strings.value&&(i=function(t){t.tmp.group_context.tip.term_intended=!0,h.UPDATE_GROUP_CONTEXT_CONDITION(t,this.strings.value,!0,this),t.output.append(this.strings.value,this),t.tmp.can_block_substitute&&t.tmp.can_substitute.replace(!1,h.LITERAL)},this.execs.push(i));e.push(this),h.Util.substituteEnd.call(this,t,e)}}},h.Node.intext={build:function(t,e){this.tokentype===h.START&&(t.build.area="intext",t.build.root="intext",t.build.extension="",this.execs.push(function(t,e){t.tmp.area="intext",t.tmp.root="intext",t.tmp.extension=""})),this.tokentype===h.END&&(t.intext_sort={opt:{sort_directions:t.citation_sort.opt.sort_directions}},t.intext.srt=t.citation.srt),e.push(this)}},h.Attributes={},h.Attributes["@disambiguate"]=function(t,e){if(this.tests||(this.tests=[]),"true"===e){t.opt.has_disambiguate=!0;var i=function(e){if("bibliography"===t.tmp.area){if(t.tmp.disambiguate_count<t.registry.registry[e.id].disambig.disambiguate)return t.tmp.disambiguate_count+=1,!0}else if(t.tmp.disambiguate_maxMax+=1,t.tmp.disambig_settings.disambiguate&&t.tmp.disambiguate_count<t.tmp.disambig_settings.disambiguate)return t.tmp.disambiguate_count+=1,!0;return!1};this.tests.push(i)}else if("check-ambiguity-and-backreference"===e){var i=function(e){return!!t.registry.registry[e.id].disambig.disambiguate&&t.registry.registry[e.id]["citation-count"]>1};this.tests.push(i)}},h.Attributes["@is-numeric"]=function(t,e){this.tests||(this.tests=[]);for(var i=e.split(/\s+/),s=function(e){return function(i,s){var r=i;if(s&&["locator","locator-extra"].indexOf(e)>-1&&(r=s),!r[e])return!1;if(h.NUMERIC_VARIABLES.indexOf(e)>-1){if(t.tmp.shadow_numbers[e]||t.processNumber(!1,r,e,i.type),t.tmp.shadow_numbers[e].numeric)return!0}else if(["title","version"].indexOf(e)>-1&&r[e].slice(-1)===""+parseInt(r[e].slice(-1),10))return!0;return!1}},r=0;r<i.length;r+=1)this.tests.push(s(i[r]))},h.Attributes["@is-uncertain-date"]=function(t,e){this.tests||(this.tests=[]);for(var i=e.split(/\s+/),s=function(t){return function(e){return!!e[t]&&!!e[t].circa}},r=0,n=i.length;r<n;r+=1)this.tests.push(s(i[r]))},h.Attributes["@locator"]=function(t,e){this.tests||(this.tests=[]);var i=e.replace("sub verbo","sub-verbo");i=i.split(/\s+/);for(var s=function(e){return function(i,s){var r;return t.processNumber(!1,s,"locator"),!!(r=t.tmp.shadow_numbers.locator.label)&&e===r}},r=0,n=i.length;r<n;r+=1)this.tests.push(s(i[r]))},h.Attributes["@position"]=function(t,e){this.tests||(this.tests=[]),t.opt.update_mode=h.POSITION;for(var i,s=e.split(/\s+/),r=function(t,e){return!!e&&h.POSITION_MAP[e.position]>=h.POSITION_MAP[h.POSITION_SUBSEQUENT]&&!!e["near-note"]},n=function(t,e){return!!e&&h.POSITION_MAP[e.position]==h.POSITION_MAP[h.POSITION_SUBSEQUENT]&&!e["near-note"]},a=function(e){return function(i,s){if("bibliography"===t.tmp.area)return!1;if(s&&void 0===s.position&&(s.position=0),s&&"number"==typeof s.position){if(0===s.position&&0===e||e>0&&h.POSITION_MAP[s.position]>=h.POSITION_MAP[e])return!0}else if(0===e)return!0;return!1}},o=0,l=s.length;o<l;o+=1){var i=s[o];"first"===i?i=h.POSITION_FIRST:"container-subsequent"===i?i=h.POSITION_CONTAINER_SUBSEQUENT:"subsequent"===i?i=h.POSITION_SUBSEQUENT:"ibid"===i?i=h.POSITION_IBID:"ibid-with-locator"===i&&(i=h.POSITION_IBID_WITH_LOCATOR),"near-note"===i?this.tests.push(r):"far-note"===i?this.tests.push(n):this.tests.push(a(i))}},h.Attributes["@type"]=function(t,e){this.tests||(this.tests=[]);for(var i=e.split(/\s+/),s=function(t){return function(e){return e.type===t}},r=[],n=0,a=i.length;n<a;n+=1)r.push(s(i[n]));this.tests.push(t.fun.match.any(this,t,r))},h.Attributes["@variable"]=function(t,e){if(this.tests||(this.tests=[]),this.variables=e.split(/\s+/),this.variables_real=this.variables.slice(),"label"===this.name&&this.variables[0])this.strings.term=this.variables[0];else if(["names","date","text","number"].indexOf(this.name)>
1-1)i=function(t,e,i){for(var s=this.variables.length-1;s>-1;s+=-1)this.variables.pop();for(var s=0,r=this.variables_real.length;s<r;s++)-1===t.tmp.done_vars.indexOf(this.variables_real[s])&&this.variables.push(this.variables_real[s]),t.tmp.can_block_substitute&&t.tmp.done_vars.push(this.variables_real[s])},this.execs.push(i),i=function(t,e,i){for(var s=!1,r=0,n=this.variables.length;r<n;r++){var a=this.variables[r];if(["authority","committee"].indexOf(a)>-1&&"string"==typeof e[a]&&"names"===this.name){var o=!0,l=e[a].split(/\s*;\s*/),u={};if(e.multi&&e.multi._keys[a]){for(var p in e.multi._keys[a])if(u[p]=e.multi._keys[a][p].split(/\s*;\s*/),u[p].length!==l.length){o=!1;break}}o||(l=[e[a]],u=e.multi._keys[a]);for(var c=0,m=l.length;c<m;c++){var f={literal:l[c],multi:{_key:{}}};for(var p in u){var d={literal:u[p][c]};f.multi._key[p]=d}l[c]=f}e[a]=l}if("short"!==this.strings.form||e[a]||("title"===a?a="title-short":"container-title"!==a||(a="container-title-short")),"year-suffix"===a){s=!0;break}if(h.DATE_VARIABLES.indexOf(a)>-1){if(t.opt.development_extensions.locator_date_and_revision&&"locator-date"===a){s=!0;break}if(e[a]){for(var g in e[a])if((-1!==this.dateparts.indexOf(g)||"literal"===g)&&e[a][g]){s=!0;break}if(s)break}}else if("locator"===a){i&&i.locator&&(s=!0);break}else if("locator-extra"===a){i&&i["locator-extra"]&&(s=!0);break}else if(["citation-number","citation-label"].indexOf(a)>-1){s=!0;break}else if("first-reference-note-number"===a){i&&i["first-reference-note-number"]&&(s=!0);break}else if("first-container-reference-note-number"===a){i&&i["first-container-reference-note-number"]&&(s=!0);break}else if("hereinafter"===a){t.transform.abbrevs.default.hereinafter[e.id]&&t.sys.getAbbreviation&&e.id&&(s=!0);break}else if("object"==typeof e[a])break;else if("string"==typeof e[a]&&e[a]){s=!0;break}else if("number"==typeof e[a]){s=!0;break}if(s)break}if(s){for(var r=0,n=this.variables_real.length;r<n;r++){var a=this.variables_real[r];("citation-number"!==a||"bibliography"!==t.tmp.area)&&(t.tmp.cite_renders_content=!0),t.tmp.group_context.tip.variable_success=!0,t.tmp.can_substitute.value()&&"bibliography"===t.tmp.area&&"string"==typeof e[a]&&(t.tmp.name_node.top=t.output.current.value(),t.tmp.rendered_name.push(e[a]))}t.tmp.can_substitute.replace(!1,h.LITERAL)}else t.tmp.group_context.tip.variable_attempt=!0},this.execs.push(i);else if(["if","else-if","condition"].indexOf(this.name)>-1)for(var i,s=function(e){return function(i,s){var r=i;if(s&&["locator","locator-extra","first-reference-note-number","first-container-reference-note-number","locator-date"].indexOf(e)>-1&&(r=s),"hereinafter"===e&&t.sys.getAbbreviation&&r.id){if(t.transform.abbrevs.default.hereinafter[r.id])return!0}else if(r[e]){if("number"==typeof r[e]||"string"==typeof r[e])return!0;if("object"==typeof r[e]){for(var n in r[e])if(r[e][n])return!0}}return!1}},r=0,n=this.variables.length;r<n;r+=1)this.tests.push(s(this.variables[r]))},h.Attributes["@page"]=function(t,e){this.tests||(this.tests=[]);var i=e.replace("sub verbo","sub-verbo");i=i.split(/\s+/);for(var s=function(e){return function(i){var s;return t.processNumber(!1,i,"page",i.type),s=t.tmp.shadow_numbers.page.label?"sub verbo"===t.tmp.shadow_numbers.page.label?"sub-verbo":t.tmp.shadow_numbers.page.label:"page",t.tmp.shadow_numbers.page.values.length>0&&t.tmp.shadow_numbers.page.values[0].gotosleepability&&(t.tmp.shadow_numbers.page.values[0].labelVisibility=!1),e===s}},r=0,n=i.length;r<n;r+=1)this.tests.push(s(i[r]))},h.Attributes["@number"]=function(t,e){this.tests||(this.tests=[]);for(var i=e.split(/\s+/),s=function(e){return function(i){return t.processNumber(!1,i,"number",i.type),e===(t.tmp.shadow_numbers.number.label?t.tmp.shadow_numbers.number.label:"number")}},r=0,n=i.length;r<n;r+=1)this.tests.push(s(i[r]))},h.Attributes["@jurisdiction"]=function(t,e){this.tests||(this.tests=[]);var i=e.split(/\s+/);this.tests.push(function(t){if(!t.jurisdiction)return!1;for(var e=t.jurisdiction,s=0,r=i.length;s<r;s++)if(e===i[s])return!0;return!1})},h.Attributes["@country"]=function(t,e){this.tests||(this.tests=[]);var i=e.split(/\s+/);this.tests.push(function(t){if(!t.country)return!1;for(var e=t.country,s=0,r=i.length;s<r;s++)if(e===i[s])return!0;return!1})},h.Attributes["@context"]=function(t,e){this.tests||(this.tests=[]),this.tests.push(function(){return["bibliography","citation"].indexOf(e)>-1?t.tmp.area.slice(0,e.length)===e:"alternative"===e?!!t.tmp.abort_alternative:void 0})},h.Attributes["@has-year-only"]=function(t,e){this.tests||(this.tests=[]);for(var i=e.split(/\s+/),s=function(t){return function(e){var i=e[t];return!!i&&!i.month&&!i.season}},r=0,n=i.length;r<n;r+=1)this.tests.push(s(i[r]))},h.Attributes["@has-to-month-or-season"]=function(t,e){this.tests||(this.tests=[]);for(var i=e.split(/\s+/),s=function(t){return function(e){var i=e[t];return!!i&&(!!i.month||!!i.season)&&!i.day}},r=0,n=i.length;r<n;r+=1)this.tests.push(s(i[r]))},h.Attributes["@has-day"]=function(t,e){this.tests||(this.tests=[]);for(var i=e.split(/\s+/),s=function(t){return function(e){var i=e[t];return!!i&&!!i.day}},r=0,n=i.length;r<n;r+=1)this.tests.push(s(i[r]))},h.Attributes["@is-plural"]=function(t,e){this.tests||(this.tests=[]),this.tests.push(function(i){var s=i[e];if(s&&s.length){for(var r=0,n=0,a=!1,o=0,l=s.length;o<l;o+=1)t.opt.development_extensions.spoof_institutional_affiliations&&(s[o].literal||s[o].isInstitution&&s[o].family&&!s[o].given)?(n+=1,a=!1):(r+=1,a=!0);if(r>1||n>1||n&&a)return!0}return!1})},h.Attributes["@is-multiple"]=function(t,e){this.tests||(this.tests=[]),this.tests.push(function(t){return(""+t[e]).split(/(?:,\s|\s(?:tot\sen\smet|lÄ«dz|oraz|and|bis|ÎÏÏ|και|och|až|do|en|et|in|ir|ja|og|sa|to|un|und|és|Èi|i|u|y|à |e|a|и|-|â)\s|â|\&)/).length>1})},h.Attributes["@locale"]=function(t,e){this.tests||(this.tests=[]);var i,s,r,n,a,o=t.opt["default-locale"][0];if("layout"===this.name){if(this.locale_raw=e,this.tokentype===h.START){t.opt.multi_layout||(t.opt.multi_layout=[]);var l=[],u=e.split(/\s+/),p={},c=h.localeResolve(u[0],o);l.push(c),c.generic?p[c.generic]=c.best:p[c.best]=c.best;for(var n=1,a=u.length;n<a;n+=1){var m=h.localeResolve(u[n],o);l.push(m),m.generic?p[m.generic]=c.best:p[m.best]=c.best}t[t.build.area].opt.sort_locales.push(p),t.opt.multi_layout.push(l)}t.opt.has_layout_locale=!0}else{r=e.split(/\s+/);var f=[];for(n=0,a=r.length;n<a;n+=1)s=r[n],i=h.localeResolve(s,o),2===r[n].length&&f.push(i.bare),t.localeConfigure(i,!0),r[n]=i;var d=r.slice();this.tests.push(function(e){i=!1;var i,s,r=!1;for(n=0,s=e.language?e.language:o,r=h.localeResolve(s,o),a=d.length;n<a;n+=1)if(r.best===d[n].best){t.tmp.condition_lang_counter_arr.push(t.tmp.condition_counter),t.tmp.condition_lang_val_arr.push(t.opt.lang),t.opt.lang=d[0].best,i=!0;break}return!i&&f.indexOf(r.bare)>-1&&(t.tmp.condition_lang_counter_arr.push(t.tmp.condition_counter),t.tmp.condition_lang_val_arr.push(t.opt.lang),t.opt.lang=d[0].best,i=!0),i})}},h.Attributes["@alternative-node-internal"]=function(t){this.tests||(this.tests=[]),this.tests.push(function(){return!t.tmp.abort_alternative})},h.Attributes["@locale-internal"]=function(t,e){var i,s,r,n,a,o;for(this.tests||(this.tests=[]),r=e.split(/\s+/),this.locale_bares=[],n=0,a=r.length;n<a;n+=1)s=r[n],i=h.localeResolve(s,t.opt["default-locale"][0]),2===r[n].length&&this.locale_bares.push(i.bare),t.localeConfigure(i),r[n]=i;this.locale_default=t.opt["default-locale"][0],this.locale=r[0].best,this.locale_list=r.slice(),this.tests.push((o=this,function(e){i=!1;var i,r=!1;if(e.language&&(s=e.language,(r=h.localeResolve(s,t.opt["default-locale"][0])).best===t.opt["default-locale"][0]&&(r=!1)),r){for(n=0,a=o.locale_list.length;n<a;n+=1)if(r.best===o.locale_list[n].best){t.opt.lang=o.locale,t.tmp.last_cite_locale=o.locale,t.output.openLevel("empty"),t.output.current.value().new_locale=o.locale,i=!0;break}!i&&o.locale_bares.indexOf(r.bare)>-1&&(t.opt.lang=o.locale,t.tmp.last_cite_locale=o.locale,t.output.openLevel("empty"),t.output.current.value().new_locale=o.locale,i=!0)}return i}))},h.Attributes["@court-class"]=function(t,e){this.tests||(this.tests=[]);for(var i=e.split(/\s+/),s=function(e){return function(i){return h.GET_COURT_CLASS(t,i)===e}},r=0,n=i.length;r<n;r++)this.tests.push(s(i[r]))},h.Attributes["@container-multiple"]=function(t,e){var i;this.tests||(this.tests=[]),this.tests.push((i="true"===e,function(e){return t.tmp.container_item_count[e.container_id]&&t.tmp.container_item_count[e.container_id]>1?i:!i}))},h.Attributes["@container-subsequent"]=function(t,e){var i;this.tests||(this.tests=[]),this.tests.push((i="true"===e,function(e){return t.tmp.container_item_pos[e.container_id]>1?i:!i}))},h.Attributes["@has-subunit"]=function(t,e){this.tests||(this.tests=[]),this.tests.push(function(t){var i=0;for(var s in t[e]){var r=t[e][s];
1if(!r.given){var n=(r.literal?r.literal:r.family).split("|").length;(0===i||n<i)&&(i=n)}}return i>1})},h.Attributes["@cite-form"]=function(t,e){this.tests||(this.tests=[]),this.tests.push(function(t){return t["cite-form"]===e})},h.Attributes["@disable-duplicate-year-suppression"]=function(t,e){t.opt.disable_duplicate_year_suppression=e.split(/\s+/)},h.Attributes["@consolidate-containers"]=function(t,e){h.Attributes["@track-containers"](t,e);var i=e.split(/\s+/);t.bibliography.opt.consolidate_containers=i},h.Attributes["@track-containers"]=function(t,e){var i=e.split(/\s+/);t.bibliography.opt.track_container_items||(t.bibliography.opt.track_container_items=[]),t.bibliography.opt.consolidate_containers||(t.bibliography.opt.consolidate_containers=[]),t.bibliography.opt.track_container_items=t.bibliography.opt.track_container_items.concat(i)},h.Attributes["@parallel-first"]=function(t,e){t.opt.parallel.enable=!0;var i=e.split(/\s+/);for(var s in t.opt.track_repeat||(t.opt.track_repeat={}),this.parallel_first={},i){var r=i[s];this.parallel_first[r]=!0,t.opt.track_repeat[r]=!0}},h.Attributes["@parallel-last"]=function(t,e){t.opt.parallel.enable=!0;var i=e.split(/\s+/);for(var s in t.opt.track_repeat||(t.opt.track_repeat={}),this.parallel_last={},i){var r=i[s];this.parallel_last[r]=!0,t.opt.track_repeat[r]=!0}},h.Attributes["@parallel-last-to-first"]=function(t,e){t.opt.parallel.enable=!0;var i=e.split(/\s+/);this.parallel_last_to_first={};for(var s=0,r=i.length;s<r;s++)this.parallel_last_to_first[i[s]]=!0},h.Attributes["@parallel-delimiter-override"]=function(t,e){t.opt.parallel.enable=!0,this.strings.set_parallel_delimiter_override=e},h.Attributes["@parallel-delimiter-override-on-suppress"]=function(t,e){t.opt.parallel.enable=!0,this.strings.set_parallel_delimiter_override_on_suppress=e},h.Attributes["@no-repeat"]=function(t,e){t.opt.parallel.enable=!0;var i=e.split(/\s+/);for(var s in t.opt.track_repeat||(t.opt.track_repeat={}),this.non_parallel={},i){var r=i[s];this.non_parallel[r]=!0,t.opt.track_repeat[r]=!0}},h.Attributes["@require"]=function(t,e){t.opt.use_context_condition=!0,this.strings.require=e},h.Attributes["@reject"]=function(t,e){t.opt.use_context_condition=!0,this.strings.reject=e},h.Attributes["@require-comma-on-symbol"]=function(t,e){t.opt.require_comma_on_symbol=e},h.Attributes["@gender"]=function(t,e){this.gender=e},h.Attributes["@cslid"]=function(t,e){this.cslid=parseInt(e,10)},h.Attributes["@capitalize-if-first"]=function(t,e){this.strings.capitalize_if_first_override=e},h.Attributes["@label-capitalize-if-first"]=function(t,e){this.strings.label_capitalize_if_first_override=e},h.Attributes["@label-form"]=function(t,e){this.strings.label_form_override=e},h.Attributes["@part-separator"]=function(t,e){this.strings["part-separator"]=e},h.Attributes["@leading-noise-words"]=function(t,e){this["leading-noise-words"]=e},h.Attributes["@name-never-short"]=function(t,e){this["name-never-short"]=e},h.Attributes["@class"]=function(t,e){t.opt.class=e},h.Attributes["@version"]=function(t,e){t.opt.version=e},h.Attributes["@value"]=function(t,e){this.strings.value=e},h.Attributes["@name"]=function(t,e){this.strings.name=e},h.Attributes["@form"]=function(t,e){this.strings.form=e},h.Attributes["@date-parts"]=function(t,e){this.strings["date-parts"]=e},h.Attributes["@range-delimiter"]=function(t,e){this.strings["range-delimiter"]=e},h.Attributes["@macro"]=function(t,e){this.postponed_macro=e},h.Attributes["@term"]=function(t,e){"sub verbo"===e?this.strings.term="sub-verbo":this.strings.term=e},h.Attributes["@xmlns"]=function(){},h.Attributes["@lang"]=function(t,e){e&&(t.build.lang=e)},h.Attributes["@lingo"]=function(){},h.Attributes["@macro-has-date"]=function(){this["macro-has-date"]=!0},h.Attributes["@suffix"]=function(t,e){this.strings.suffix=e},h.Attributes["@prefix"]=function(t,e){this.strings.prefix=e},h.Attributes["@delimiter"]=function(t,e){this.strings.delimiter=e},h.Attributes["@match"]=function(t,e){this.match=e},h.Attributes["@names-min"]=function(t,e){var i=parseInt(e,10);t[t.build.area].opt.max_number_of_names<i&&(t[t.build.area].opt.max_number_of_names=i),this.strings["et-al-min"]=i},h.Attributes["@names-use-first"]=function(t,e){this.strings["et-al-use-first"]=parseInt(e,10)},h.Attributes["@names-use-last"]=function(t,e){"true"===e?this.strings["et-al-use-last"]=!0:this.strings["et-al-use-last"]=!1},h.Attributes["@sort"]=function(t,e){"descending"===e&&(this.strings.sort_direction=h.DESCENDING)},h.Attributes["@plural"]=function(t,e){"always"===e||"true"===e?this.strings.plural=1:"never"===e||"false"===e?this.strings.plural=0:"contextual"===e&&(this.strings.plural=!1)},h.Attributes["@has-publisher-and-publisher-place"]=function(){this.strings["has-publisher-and-publisher-place"]=!0}
1,h.Attributes["@publisher-delimiter-precedes-last"]=function(t,e){this.strings["publisher-delimiter-precedes-last"]=e},h.Attributes["@publisher-delimiter"]=function(t,e){this.strings["publisher-delimiter"]=e},h.Attributes["@publisher-and"]=function(t,e){this.strings["publisher-and"]=e},h.Attributes["@givenname-disambiguation-rule"]=function(t,e){h.GIVENNAME_DISAMBIGUATION_RULES.indexOf(e)>-1&&(t.citation.opt["givenname-disambiguation-rule"]=e)},h.Attributes["@collapse"]=function(t,e){e&&(t[this.name].opt.collapse=e)},h.Attributes["@cite-group-delimiter"]=function(t,e){e&&(t[t.tmp.area].opt.cite_group_delimiter=e)},h.Attributes["@names-delimiter"]=function(t,e){t.setOpt(this,"names-delimiter",e)},h.Attributes["@name-form"]=function(t,e){t.setOpt(this,"name-form",e)},h.Attributes["@subgroup-delimiter"]=function(t,e){this.strings["subgroup-delimiter"]=e},h.Attributes["@subgroup-delimiter-precedes-last"]=function(t,e){this.strings["subgroup-delimiter-precedes-last"]=e},h.Attributes["@name-delimiter"]=function(t,e){t.setOpt(this,"name-delimiter",e)},h.Attributes["@et-al-min"]=function(t,e){var i=parseInt(e,10);t[t.build.area].opt.max_number_of_names<i&&(t[t.build.area].opt.max_number_of_names=i),t.setOpt(this,"et-al-min",i)},h.Attributes["@et-al-use-first"]=function(t,e){t.setOpt(this,"et-al-use-first",parseInt(e,10))},h.Attributes["@et-al-use-last"]=function(t,e){"true"===e?t.setOpt(this,"et-al-use-last",!0):t.setOpt(this,"et-al-use-last",!1)},h.Attributes["@et-al-subsequent-min"]=function(t,e){var i=parseInt(e,10);t[t.build.area].opt.max_number_of_names<i&&(t[t.build.area].opt.max_number_of_names=i),t.setOpt(this,"et-al-subsequent-min",i)},h.Attributes["@et-al-subsequent-use-first"]=function(t,e){t.setOpt(this,"et-al-subsequent-use-first",parseInt(e,10))},h.Attributes["@suppress-min"]=function(t,e){this.strings["suppress-min"]=parseInt(e,10)},h.Attributes["@suppress-max"]=function(t,e){this.strings["suppress-max"]=parseInt(e,10)},h.Attributes["@and"]=function(t,e){t.setOpt(this,"and",e)},h.Attributes["@delimiter-precedes-last"]=function(t,e){t.setOpt(this,"delimiter-precedes-last",e)},h.Attributes["@delimiter-precedes-et-al"]=function(t,e){t.setOpt(this,"delimiter-precedes-et-al",e)},h.Attributes["@initialize-with"]=function(t,e){t.setOpt(this,"initialize-with",e)},h.Attributes["@initialize"]=function(t,e){"false"===e&&t.setOpt(this,"initialize",!1)},h.Attributes["@name-as-reverse-order"]=function(t,e){this["name-as-reverse-order"]=e},h.Attributes["@name-as-sort-order"]=function(t,e){"style-options"===this.name?this["name-as-sort-order"]=e:t.setOpt(this,"name-as-sort-order",e)},h.Attributes["@sort-separator"]=function(t,e){t.setOpt(this,"sort-separator",e)},h.Attributes["@require-match"]=function(t,e){"true"===e&&(this.requireMatch=!0)},h.Attributes["@exclude-types"]=function(t,e){t.bibliography.opt.exclude_types=e.split(/\s+/)},h.Attributes["@exclude-with-fields"]=function(t,e){t.bibliography.opt.exclude_with_fields=e.split(/\s+/)},h.Attributes["@year-suffix-delimiter"]=function(t,e){t[this.name].opt["year-suffix-delimiter"]=e},h.Attributes["@after-collapse-delimiter"]=function(t,e){t[this.name].opt["after-collapse-delimiter"]=e},h.Attributes["@subsequent-author-substitute"]=function(t,e){t[this.name].opt["subsequent-author-substitute"]=e},h.Attributes["@subsequent-author-substitute-rule"]=function(t,e){t[this.name].opt["subsequent-author-substitute-rule"]=e},h.Attributes["@disambiguate-add-names"]=function(t,e){"true"===e&&(t.opt["disambiguate-add-names"]=!0)},h.Attributes["@disambiguate-add-givenname"]=function(t,e){"true"===e&&(t.opt["disambiguate-add-givenname"]=!0)},h.Attributes["@disambiguate-add-year-suffix"]=function(t,e){"true"===e&&"numeric"!==t.opt.xclass&&(t.opt["disambiguate-add-year-suffix"]=!0)},h.Attributes["@second-field-align"]=function(t,e){("flush"===e||"margin"===e)&&(t[this.name].opt["second-field-align"]=e)},h.Attributes["@hanging-indent"]=function(t,e){"true"===e&&(t.opt.development_extensions.hanging_indent_legacy_number?t[this.name].opt.hangingindent=2:t[this.name].opt.hangingindent=!0)},h.Attributes["@line-spacing"]=function(t,e){e&&e.match(/^[.0-9]+$/)&&(t[this.name].opt["line-spacing"]=parseFloat(e,10))},h.Attributes["@entry-spacing"]=function(t,e){e&&e.match(/^[.0-9]+$/)&&(t[this.name].opt["entry-spacing"]=parseFloat(e,10))},h.Attributes["@near-note-distance"]=function(t,e){t[this.name].opt["near-note-distance"]=parseInt(e,10)},h.Attributes["@substring"]=function(t,e){this.substring=parseInt(e,10)},h.Attributes["@text-case"]=function(t,e){this.execs.push(function(t,i){"normal"===e?this.text_c
1ase_normal=!0:(this.strings["text-case"]=e,"title"===e&&i.jurisdiction&&(this.strings["text-case"]="passthrough"))})},h.Attributes["@page-range-format"]=function(t,e){t.opt["page-range-format"]=e},h.Attributes["@year-range-format"]=function(t,e){t.opt["year-range-format"]=e},h.Attributes["@default-locale"]=function(t,e){if("style"===this.name){var i,s,r,n,a=e.match(/-x-(sort|translit|translat)-/g);if(a)for(r=0,s=a.length;r<s;r+=1)a[r]=a[r].replace(/^-x-/,"").replace(/-$/,"");for(r=1,n=[(i=e.split(/-x-(?:sort|translit|translat)-/))[0]],s=i.length;r<s;r+=1)n.push(a[r-1]),n.push(i[r]);for(r=1,s=(i=n.slice()).length;r<s;r+=2)t.opt["locale-"+i[r]].push(i[r+1].replace(/^\s*/g,"").replace(/\s*$/g,""));i.length?t.opt["default-locale"]=i.slice(0,1):t.opt["default-locale"]=["en"]}else"true"===e&&(this.default_locale=!0)},h.Attributes["@default-locale-sort"]=function(t,e){t.opt["default-locale-sort"]=e},h.Attributes["@demote-non-dropping-particle"]=function(t,e){t.opt["demote-non-dropping-particle"]=e},h.Attributes["@initialize-with-hyphen"]=function(t,e){"false"===e&&(t.opt["initialize-with-hyphen"]=!1)},h.Attributes["@institution-parts"]=function(t,e){this.strings["institution-parts"]=e},h.Attributes["@if-short"]=function(t,e){"true"===e&&(this.strings["if-short"]=!0)},h.Attributes["@substitute-use-first"]=function(t,e){this.strings["substitute-use-first"]=parseInt(e,10)},h.Attributes["@use-first"]=function(t,e){this.strings["use-first"]=parseInt(e,10)},h.Attributes["@use-last"]=function(t,e){this.strings["use-last"]=parseInt(e,10)},h.Attributes["@stop-first"]=function(t,e){this.strings["stop-first"]=parseInt(e,10)},h.Attributes["@stop-last"]=function(t,e){this.strings["stop-last"]=-1*parseInt(e,10)},h.Attributes["@reverse-order"]=function(t,e){"true"===e&&(this.strings["reverse-order"]=!0)},h.Attributes["@display"]=function(t,e){2===t.bibliography.tokens.length&&(t.opt.using_display=!0),this.strings.cls=e},h.Stack=function(t,e){this.mystack=[],(e||t)&&this.mystack.push(t),this.tip=this.mystack[0]},h.Stack.prototype.push=function(t,e){e||t?this.mystack.push(t):this.mystack.push(""),this.tip=this.mystack[this.mystack.length-1]},h.Stack.prototype.clear=function(){this.mystack=[],this.tip={}},h.Stack.prototype.replace=function(t,e){0===this.mystack.length&&h.error("Internal CSL processor error: attempt to replace nonexistent stack item with "+t),e||t?this.mystack[this.mystack.length-1]=t:this.mystack[this.mystack.length-1]="",this.tip=this.mystack[this.mystack.length-1]},h.Stack.prototype.pop=function(){var t=this.mystack.pop();return this.mystack.length?this.tip=this.mystack[this.mystack.length-1]:this.tip={},t},h.Stack.prototype.value=function(){return this.mystack.slice(-1)[0]},h.Stack.prototype.length=function(){return this.mystack.length},h.Parallel=function(t){this.state=t},h.Parallel.prototype.StartCitation=function(t,e){if(this.state.tmp.suppress_repeats=[],!(t.length<2)){for(var i=0,s=!1,r=[],n=0,a=t.length-1;n<a;n++){var o=t[n][0],l=t[n+1][0],u=!1,p={};if(t[n][0].seeAlso&&t[n][0].seeAlso.length>0&&!s){u=!0;var h=(s=[t[n][0].id].concat(t[n][0].seeAlso)).slice(),c=t.slice(n);c[0][1].parallel="first";for(var m=0,f=c.length;m<f;m++){var d=c[m][0].id,g=h.indexOf(d);if(i=!1,-1===g?i=n+m-1:n+m===t.length-1&&(i=n+m),i){r.push([n,i]);break}h=h.slice(0,g).concat(h.slice(g+1))}}for(var b in n>0&&u&&(this.state.tmp.suppress_repeats[n-1].START=!0,u=!1),this.state.opt.track_repeat)if(o[b]&&l[b]){if("string"==typeof l[b]||"number"==typeof l[b]){if("title"===b&&o["title-short"]&&l["title-short"])var _=o["title-short"],v=l["title-short"];else var _=o[b],v=l[b];_==v?p[b]=!0:p[b]=!1}else if(void 0===o[b].length){p[b]=!1;var y=o[b].year,x=l[b].year;y&&x&&y==x&&(p[b]=!0)}else{var _=JSON.stringify(o[b]),v=JSON.stringify(l[b]);_===v?p[b]=!0:p[b]=!1}}else p[b]=!1;s||(p.ORPHAN=!0),i===n&&(p.END=!0,s=!1),this.state.tmp.suppress_repeats.push(p)}for(var m=0,f=r.length;m<f;m++){var I=t[r[m][0]][0].id;this.state.registry.registry[I].master=!0,this.state.registry.registry[I].siblings=[];for(var O=r[m][0],T=r[m][1],S=O;S<T;S++){this.state.tmp.suppress_repeats[S].SIBLING=!0;var N=t[S+1][0].id;t[S+1][1].parallel="other",this.state.registry.registry[I].siblings.push(N)}}}},h.Parallel.prototype.checkRepeats=function(t){var e=this.state.tmp.cite_index;if(this.state.tmp.suppress_repeats){if(t.parallel_first&&Object.keys(t.parallel_first).length>0){var i=[{}].concat(this.state.tmp.suppress_repeats),s=!0;for(var r in t.parallel_first)(!i[e][r]||i[e].START)&&(s=!1);return s}if(t.parallel_last&&Object.keys(t.parallel_last).length>0){var i=this.state.tmp.suppress_repeats.concat([{}]),s=Object.keys(t.parallel_last).length>0;for(var r in t.parallel_last)(!i[e][r]||i[e].END)&&(s=!1);return s}if(t.non_parallel&&Object.keys(t.non_parallel).length>0){var i=[{}].concat(this.state.tmp.suppress_repeats),s=!0;for(var r in t.non_parallel)i[e][r]||(s=!1);return s}}return!1},h.Util={}
1,h.Util.Match=function(){this.any=function(t,e,i){return function(t,e){for(var s=0,r=i.length;s<r;s+=1)if(i[s](t,e))return!0;return!1}},this.none=function(t,e,i){return function(t,e){for(var s=0,r=i.length;s<r;s+=1)if(i[s](t,e))return!1;return!0}},this.all=function(t,e,i){return function(t,e){for(var s=0,r=i.length;s<r;s+=1)if(!i[s](t,e))return!1;return!0}},this[void 0]=this.all,this.nand=function(t,e,i){return function(t,e){for(var s=0,r=i.length;s<r;s+=1)if(!i[s](t,e))return!0;return!1}}},h.Transform=function(t){function e(e,i,s){var r="";return t.sys.getHumanForm&&("country"===e?r=(r=t.sys.getHumanForm(i.toLowerCase(),!1,!0)).split("|")[0]:"jurisdiction"===e&&(r=t.sys.getHumanForm(i.toLowerCase(),!1,!0),r=s?"":r.split("|").slice(1).join(", "))),r}function i(t,i,s,r,n,a,o){var l,u="",p=h.FIELD_CATEGORY_REMAP[a];if(!p)return n;var c=n;t.sys.normalizeAbbrevsKey&&(c=t.sys.normalizeAbbrevsKey(a,n));var m=!1;if("jurisdiction"===a&&c&&(m=-1===c.indexOf(":")),["jurisdiction","country"].indexOf(a)>-1&&n===n.toLowerCase()&&(c=n.toUpperCase()),t.sys.getAbbreviation){l=["jurisdiction","country","language-name","language-name-original"].indexOf(a)>-1?"default":s.jurisdiction?s.jurisdiction:"default";var f=t.transform.loadAbbreviation(l,p,c,s.language);if(t.transform.abbrevs[f][p]&&c){var d=t.transform.abbrevs[f][p][c];u="short"===i.strings.form&&d?m?"":d:e(a,c,m)}}return!u&&(!t.opt.development_extensions.require_explicit_legal_case_title_short||"legal_case"!==s.type)&&r&&s[r]&&o&&(u=s[r]),u||t.sys.getAbbreviation||!t.sys.getHumanForm||(u=e(a,c,m)),u||m||t.sys.getHumanForm&&"jurisdiction"===a||(u=n),t.opt.development_extensions.force_title_abbrev_fallback&&"title"===a&&u===n&&s["title-short"]&&(u=s["title-short"]),u}function s(e,i){var s,r=t.opt["default-locale"][0].slice(0,2);if(s=t.opt.development_extensions.strict_text_case_locales?RegExp("^([a-zA-Z]{2})(?:$|-.*| .*)"):RegExp("^([a-zA-Z]{2})(?:$|-.*|.*)"),e.language){var n=(""+e.language).match(s);r=n?n[1]:"tlh"}return e.multi&&e.multi&&e.multi.main&&e.multi.main[i]&&(r=e.multi.main[i]),(!t.opt.development_extensions.strict_text_case_locales||t.opt.development_extensions.normalize_lang_keys_to_lowercase)&&(r=r.toLowerCase()),r}function r(e,i,r,n,a,o){var l=!1;if(!e[i])return{name:"",usedOrig:a,token:h.Util.cloneToken(this)};var u=!1;h.VARIABLES_WITH_SHORT_FORM.indexOf(i)>-1&&o&&(i+="-short",u=!0);var p=!1,c=null,m=[];"-short"===i.slice(-6)?(m.push(i),m.push(i.slice(0,-6))):m.push(i);for(var f=0,d=m.length;f<d;f++){var g=!1,i=m[f];I={name:"",usedOrig:a,locale:s(e,i)},O=t.opt[r]?t.opt[r].slice():[];var b=!1;if("locale-orig"===r?(a||(I.name=e[i],I.usedOrig=!1),b=!0,l=!0):n&&(void 0===O||0===O.length)&&(I.name=e[i],I.usedOrig=!0,b=!0,l=!0),!b){for(var _=0,v=O.length;_<v;_+=1){if(x=(y=O[_]).split(/[\-_]/)[0],y&&e.multi&&e.multi._keys[i]&&e.multi._keys[i][y]){I.name=e.multi._keys[i][y],I.locale=y,b=!0,g=!0,l=!1;break}if(x&&e.multi&&e.multi._keys[i]&&e.multi._keys[i][x]){I.name=e.multi._keys[i][x],I.locale=x,b=!0,g=!0,l=!1;break}}!I.name&&n&&(I={name:e[i],usedOrig:!0,locale:s(e,i)},l=!0)}if(I.token=h.Util.cloneToken(this),0===f?(g&&(I.found_variant_ok=!0),c=I,u||void 0!==O&&0!==O.length||(p=!0),g&&(p=!0)):u||g||!c?g&&(I.found_variant_ok=!0):(I=c,i=m[0]),["title","container-title"].indexOf(i)>-1&&!a&&(!I.token.strings["text-case"]||"sentence"===I.token.strings["text-case"]||"normal"===I.token.strings["text-case"])){t.opt.lang,T=!l&&I.locale;var y,x,I,O,T,S=i.slice(0,-5),N="sentence"===I.token.strings["text-case"];I.name=h.titlecaseSentenceOrNormal(t,e,S,T,N),delete I.token.strings["text-case"]}if(p)break}return I}function n(e,i){var s=i.match(/^(?:#[0-9]+)*(?:!((?:[-_a-z]+(?:(?:.*)))(?:,(?:[-_a-z]+(?:(?:.*))))*))*>>>/);if(s&&(i=i.slice(s[0].length),s[1]))for(var r=s[1].split(","),n=0,a=r.length;n<a;n+=1){var o=r[n].match(/^([-_a-z]+)(?:\:(.*))*$/),l=o[1],u=t.tmp.abbrev_trimmer;o[2]?u&&e&&(u[e]||(u[e]={}),u[e][l]=o[2]):-1===t.tmp.done_vars.indexOf(l)&&(u&&e&&(u.QUASHES[e]||(u.QUASHES[e]={}),u.QUASHES[e][l]=!0),t.tmp.done_vars.push(l))}return i}this.abbrevs={},this.abbrevs.default=new t.sys.AbbreviationSegments,this.getTextSubField=r,this.loadAbbreviation=function(e,i,s,r){e||(e="default");var n=e.split(":")[0],a=h.getAbbrevsDomain(t,n,r);return(a&&(e+="@"+a),s)?!t.sys.getAbbreviation||(e=t.sys.getAbbreviation(t.opt.styleID,t.transform.abbrevs,e,i,s))||(e="default",a&&(e+="@"+a)):(t.transform.abbrevs[e]||(t.transform.abbrevs[e]=new t.sys.AbbreviationSegments),t.transform.abbrevs[e][i]||(t.transform.abbrevs[e][i]={})),e},this.quashCheck=n,this.getOutputFunction=function(e,s,a,o){var l,u=h.LangPrefsMap[e[0]];return l=!!u&&t.opt["cite-lang-prefs"][u],function(a,p,c){if(!e[0]||!p[e[0]]&&!p[o]||!a.tmp.just_looking&&c&&c["suppress-author"]&&!a.tmp.probably_rendered_something&&a.tmp.can_substitute.length()>1)return null;var m,f,d,g,b,_,v,y,x,I,O,T={primary:!1,secondary:!1,tertiary:!1};if("_sort"===a.tmp.area.slice(-5))T.primary="locale-sort";else if(l&&1===l.length&&"locale-orig"===l[0])T.primary="locale-orig",l=!1;else if(l&&!a.tmp.multi_layout)for(var S=["primary","secondary","tertiary"],N=0,A=S.length;N<A&&!(l.length-1<N);N+=1)l[N]&&(T[S[N]]="locale-"+l[N]);else T.primary="locale-orig";if("title-short"!==e[0]&&("bibliography"===a.tmp.area||"citation"===a.tmp.area&&"note"===a.opt.xclass&&c&&!c.position)||(T.secondary=!1,T.tertiary=!1),a.tmp.multi_layout&&(T.secondary=!1,T.tertiary=!1),a.tmp["publisher-list"])return"publisher"===e[0]?a.tmp["publisher-token"]=this:"publisher-place"===e[0]&&(a.tmp["publisher-place-token"]=this),null;var E=a.tmp.lang_array.slice(),k=r.call(this,p,e[0],T.primary,!0,null,s);f=k.name,d=k.locale;var y=k.token,R=k.usedOrig;if(s&&!k.found_variant_ok&&(f=i(a,y,p,o,f,s,!0))&&((m=f.match(/^#([0-9]+).*>>>/))&&m[1]&&(p["cite-form"]=m[1]),a.tmp.just_looking||(f=n(p.jurisdiction,f))),function(e,s,r,n){var a=e.variables[0];if(t.publisherOutput&&r){if(-1===["publisher","publisher-place"].indexOf(a));else{t.publisherOutput[a+"-token"]=e,t.publisherOutput.varlist.push(a);var o=r.split(/;\s*/);o.length===t.publisherOutput[a+"-list"].length&&(t.publisherOutput[a+"-list"]=o);for(var l=0,u=o.length;l<u;l+=1)o[l]=i(t,e,s,!1,o[l],n,!0);return t.tmp[a+"-token"]=e,!0}}return!1}(this,p,f,s))return a.tmp.lang_array=E,null;if(g=!1,_=!1,T.secondary&&(g=(k=r.call(this,p,e[0],T.secondary,!1,k.usedOrig,null,s)).name,b=k.locale,x=k.token,s&&!k.found_variant_ok&&g&&(g=i(a,x,p,!1,g,s,!0))),T.tertiary&&(_=(k=r.call(this,p,e[0],T.tertiary,!1,k.usedOrig,null,s)).name,v=k.locale,I=k.token,s&&!k.found_variant_ok&&_&&(_=i(a,I,p,!1,_,s,!0))),"locale-translit"===T.primary&&(O=a.opt.citeAffixes[u][T.primary].prefix),"<i>"===O&&"title"===e[0]&&!R){for(var w=!1,N=0,A=y.decorations.length;N<A;N+=1)"@font-style"===y.decorations[N][0]&&"italic"===y.decorations[N][1]&&(w=!0);
1w||y.decorations.push(["@font-style","italic"])}if("en"!==d&&"title"===y.strings["text-case"]&&(y.strings["text-case"]="passthrough"),"title"===e[0]&&(f=h.demoteNoiseWords(a,f,this["leading-noise-words"])),g||_){if(a.output.openLevel("empty"),y.strings.suffix=y.strings.suffix.replace(/[ .,]+$/,""),d&&(a.tmp.lang_array=[d].concat(E)),h.UPDATE_GROUP_CONTEXT_CONDITION(a,null,null,y,y.strings.prefix+f),a.output.append(f,y),a.tmp.probably_rendered_something=!0,f===g&&(g=!1),g){x.strings.prefix=a.opt.citeAffixes[u][T.secondary].prefix,x.strings.suffix=a.opt.citeAffixes[u][T.secondary].suffix,x.strings.prefix||(x.strings.prefix=" ");for(var N=x.decorations.length-1;N>-1;N+=-1)["@quotes/true","@font-style/italic","@font-style/oblique","@font-weight/bold"].indexOf(x.decorations[N].join("/"))>-1&&(x.decorations=x.decorations.slice(0,N).concat(x.decorations.slice(N+1)));"en"!==b&&"title"===x.strings["text-case"]&&(x.strings["text-case"]="passthrough"),b&&(a.tmp.lang_array=[b].concat(E));var j=new h.Token;j.decorations.push(["@font-style","normal"]),j.decorations.push(["@font-weight","normal"]),a.output.openLevel(j),a.output.append(g,x),a.output.closeLevel(),a.output.current.value(),a.output.current.value().blobs.length}if(f===_&&(_=!1),_){I.strings.prefix=a.opt.citeAffixes[u][T.tertiary].prefix,I.strings.suffix=a.opt.citeAffixes[u][T.tertiary].suffix,I.strings.prefix||(I.strings.prefix=" ");for(var N=I.decorations.length-1;N>-1;N+=-1)["@quotes/true","@font-style/italic","@font-style/oblique","@font-weight/bold"].indexOf(I.decorations[N].join("/"))>-1&&(I.decorations=I.decorations.slice(0,N).concat(I.decorations.slice(N+1)));"en"!==v&&"title"===I.strings["text-case"]&&(I.strings["text-case"]="passthrough"),v&&(a.tmp.lang_array=[v].concat(E));var C=new h.Token;C.decorations.push(["@font-style","normal"]),C.decorations.push(["@font-weight","normal"]),a.output.openLevel(C),a.output.append(_,I),a.output.closeLevel(),a.output.current.value(),a.output.current.value().blobs.length}a.output.closeLevel()}else d&&(a.tmp.lang_array=[d].concat(E)),h.UPDATE_GROUP_CONTEXT_CONDITION(a,null,null,y,y.strings.prefix+f),a.output.append(f,y),a.tmp.probably_rendered_something=!0;return a.tmp.lang_array=E,a.tmp.can_block_substitute&&a.tmp.name_node.children.push(a.output.current.value()),null}}},h.Token=function(t,e,i){this.name=t,this.strings={},this.strings.delimiter=void 0,this.strings.prefix="",this.strings.suffix="",this.decorations=[],this.variables=[],this.execs=[],this.tokentype=e},h.Util.cloneToken=function(t){var e,i,s,r;if("string"==typeof t)return t;for(var i in e=new h.Token(t.name,t.tokentype),t.strings)t.strings.hasOwnProperty(i)&&(e.strings[i]=t.strings[i]);if(t.decorations)for(s=0,e.decorations=[],r=t.decorations.length;s<r;s+=1)e.decorations.push(t.decorations[s].slice());return t.variables&&(e.variables=t.variables.slice()),t.execs&&(e.execs=t.execs.slice(),t.tests&&(e.tests=t.tests.slice())),e},h.AmbigConfig=function(){this.maxvals=[],this.minval=1,this.names=[],this.givens=[],this.year_suffix=!1,this.disambiguate=0},h.Blob=function(t,e,i){var s,r,n;if(this.levelname=i,e){for(var n in this.strings={prefix:"",suffix:""},e.strings)e.strings.hasOwnProperty(n)&&(this.strings[n]=e.strings[n]);for(r=0,this.decorations=[],s=void 0===e.decorations?0:e.decorations.length;r<s;r+=1)this.decorations.push(e.decorations[r].slice())}else this.strings={},this.strings.prefix="",this.strings.suffix="",this.strings.delimiter="",this.decorations=[];"string"==typeof t?this.blobs=t:t?this.blobs=[t]:this.blobs=[],this.alldecor=[this.decorations]},h.Blob.prototype.push=function(t){"string"==typeof this.blobs?h.error("Attempt to push blob onto string object"):!1!==t&&(t.alldecor=t.alldecor.concat(this.alldecor),this.blobs.push(t))},h.NumericBlob=function(t,e,i,s,r){if(this.id=r,this.alldecor=[],this.num=i,this.particle=e,this.blobs=i.toString(),this.status=h.START,this.strings={},s){if(s.strings["text-case"]){var n=s.strings["text-case"];this.particle=h.Output.Formatters[n](t,this.particle),this.blobs=h.Output.Formatters[n](t,this.blobs)}this.gender=s.gender,this.decorations=s.decorations,this.strings.prefix=s.strings.prefix,this.strings.suffix=s.strings.suffix,this.strings["text-case"]=s.strings["text-case"],this.successor_prefix=s.successor_prefix,this.range_prefix=s.range_prefix,this.splice_prefix=s.splice_prefix,this.formatter=s.formatter,this.formatter||(this.formatter=new h.Output.DefaultFormatter),this.formatter&&(this.t
1ype=this.formatter.format(1))}else this.decorations=[],this.strings.prefix="",this.strings.suffix="",this.successor_prefix="",this.range_prefix="",this.splice_prefix="",this.formatter=new h.Output.DefaultFormatter},h.NumericBlob.prototype.setFormatter=function(t){this.formatter=t,this.type=this.formatter.format(1)},h.Output.DefaultFormatter=function(){},h.Output.DefaultFormatter.prototype.format=function(t){return t.toString()},h.NumericBlob.prototype.checkNext=function(t,e){e?(this.status=h.START,"object"==typeof t&&(t.num===this.num+1?t.status=h.SUCCESSOR:t.status=h.SEEN)):t&&t.num&&this.type===t.type&&t.num===this.num+1?this.status===h.START||this.status===h.SEEN?t.status=h.SUCCESSOR:(this.status===h.SUCCESSOR||this.status===h.SUCCESSOR_OF_SUCCESSOR)&&(this.range_prefix?(t.status=h.SUCCESSOR_OF_SUCCESSOR,this.status=h.SUPPRESS):t.status=h.SUCCESSOR):(this.status===h.SUCCESSOR_OF_SUCCESSOR&&(this.status=h.END),"object"==typeof t&&(t.status=h.SEEN))},h.NumericBlob.prototype.checkLast=function(t){return(this.status===h.SEEN||t.num!==this.num-1&&this.status===h.SUCCESSOR)&&(this.status=h.SUCCESSOR,!0)},h.Util.fixDateNode=function(t,e,i){var s,r,n,a,o,l,u,p,h,c,m,f,d,g=this.cslXml.getAttributeValue(i,"lingo"),b=this.cslXml.getAttributeValue(i,"default-locale");if(this.build.date_key=!0,s=this.cslXml.getAttributeValue(i,"form"),g=b?this.opt["default-locale"][0]:this.cslXml.getAttributeValue(i,"lingo"),!this.getDate(s,b))return t;var _=this.cslXml.getAttributeValue(i,"date-parts");for(var v in r=this.cslXml.getAttributeValue(i,"variable"),p=this.cslXml.getAttributeValue(i,"prefix"),h=this.cslXml.getAttributeValue(i,"suffix"),f=this.cslXml.getAttributeValue(i,"display"),d=this.cslXml.getAttributeValue(i,"cslid"),n=this.cslXml.nodeCopy(this.getDate(s,b)),this.cslXml.setAttribute(n,"lingo",this.opt.lang),this.cslXml.setAttribute(n,"form",s),this.cslXml.setAttribute(n,"date-parts",_),this.cslXml.setAttribute(n,"cslid",d),this.cslXml.setAttribute(n,"variable",r),this.cslXml.setAttribute(n,"default-locale",b),p&&this.cslXml.setAttribute(n,"prefix",p),h&&this.cslXml.setAttribute(n,"suffix",h),f&&this.cslXml.setAttribute(n,"display",f),c=this.cslXml.children(n))a=c[v],"date-part"===this.cslXml.nodename(a)&&(o=this.cslXml.getAttributeValue(a,"name"),b&&this.cslXml.setAttributeOnNodeIdentifiedByNameAttribute(n,"date-part",o,"@default-locale","true"));for(var v in c=this.cslXml.children(i))if(a=c[v],"date-part"===this.cslXml.nodename(a))for(l in o=this.cslXml.getAttributeValue(a,"name"),m=this.cslXml.attributes(a))"@name"===l||g&&g!==this.opt.lang&&["@suffix","@prefix","@form"].indexOf(l)>-1||(u=m[l],this.cslXml.setAttributeOnNodeIdentifiedByNameAttribute(n,"date-part",o,l,u));if("year"===this.cslXml.getAttributeValue(i,"date-parts"))this.cslXml.deleteNodeByNameAttribute(n,"month"),this.cslXml.deleteNodeByNameAttribute(n,"day");else if("year-month"===this.cslXml.getAttributeValue(i,"date-parts"))this.cslXml.deleteNodeByNameAttribute(n,"day");else if("month-day"===this.cslXml.getAttributeValue(i,"date-parts")){for(var y=this.cslXml.children(n),x=1,I=this.cslXml.numberofnodes(y);x<I;x++)if("year"===this.cslXml.getAttributeValue(y[x],"name")){this.cslXml.setAttribute(y[x-1],"suffix","");break}this.cslXml.deleteNodeByNameAttribute(n,"year")}return this.cslXml.insertChildNodeAfter(t,i,e,n)},h.dateMacroAsSortKey=function(t,e){h.dateAsSortKey.call(this,t,e,!0)},h.dateAsSortKey=function(t,e,i){var s,r,n,a,o,l,u,p,c=this.variables[0],m="empty";if(i&&t.tmp.extension&&(m="macro-with-date"),void 0===(s=e[c])&&(s={"date-parts":[[0]]}),void 0===this.dateparts&&(this.dateparts=["year","month","day"]),s.raw?s=t.fun.dateparser.parseDateToArray(s.raw):s["date-parts"]&&(s=t.dateParseArray(s)),void 0===s&&(s={}),s.year)for(u=0,p=h.DATE_PARTS_INTERNAL.length;u<p;u+=1)if(r=h.DATE_PARTS_INTERNAL[u],n=0,"_end"===(a=r).slice(-4)&&(a=a.slice(0,-4)),s[r]&&this.dateparts.indexOf(a)>-1&&(n=s[r]),"year"===r.slice(0,4)){o=h.Util.Dates[a].numeric(t,n);var l="1";"-"===o[0]&&(l="0",o=9999-parseInt(o=o.slice(1),10)),t.output.append(h.Util.Dates[r.slice(0,4)].numeric(t,l+o),m)}else(n=h.Util.Dates[a]["numeric-leading-zeros"](t,n))||(n="00"),t.output.append(n,m)},h.Engine.prototype.dateParseArray=function(t){var e,i,s,r;for(i in e={},t)if("date-parts"===i){(s=t["date-parts"]).length>1&&s[0].length!==s[1].length&&h.error("CSL data error: element mismatch in date range input."),r=["","_end"];for(var n=0,a=s.length;n<a;n+=1)for(var o=0,l=h.DATE_PARTS.length;o<l;o+=1)isNaN(parseInt(s[n][o],10))?e[h.DATE_PARTS[o]+r[n]]=void 0:e[h.DATE_PARTS[o]+r[n]]=parseInt(s[n][o],10)}
1else t.hasOwnProperty(i)&&("literal"===i&&"object"==typeof t.literal&&"string"==typeof t.literal.part?(h.debug("Warning: fixing up weird literal date value"),e.literal=t.literal.part):e[i]=t[i]);return e},h.Util.Names={},h.Util.Names.compareNamesets=h.NameOutput.prototype._compareNamesets,h.Util.Names.unInitialize=function(t,e){var i,s,r,n,a;if(!e)return"";for(i=0,r=e.split(/(?:\-|\s+)/),n=e.match(/(\-|\s+)/g),a="",s=r.length;i<s;i+=1)a+=r[i],i<s-1&&(a+=n[i]);return a},h.Util.Names.initializeWith=function(t,e,i,s){if(!e)return"";if(i||(i=""),["Lord","Lady"].indexOf(e)>-1||!e.replace(/^(?:<[^>]+>)*/,"").match(h.STARTSWITH_ROMANESQUE_REGEXP)&&!i.match("%s"))return e;!1===t.opt["initialize-with-hyphen"]&&(e=e.replace(/\-/g," ")),e=(e=e.replace(/\s*\-\s*/g,"-").replace(/\s+/g," ")).replace(/-([a-z])/g,"â$1");for(var r,n,r=e.length-2;r>-1;r+=-1)"."===e.slice(r,r+1)&&" "!==e.slice(r+1,r+2)&&(e=e.slice(0,r)+". "+e.slice(r+1));var a=h.Output.Formatters.nameDoppel.split(e),o=[];if(o=[a.strings[0]],0===a.tags.length){var l=o[0].match(/[^\.]+$/);l&&1===l[0].length&&l[0]!==l[0].toLowerCase()&&(o[0]+=".")}for(r=1,n=a.strings.length;r<n;r+=1)o.push(a.tags[r-1]),o.push(a.strings[r]);return(s?this.doNormalize(t,o,i):this.doInitialize(t,o,i)).replace(/\u2013([a-z])/g,"-$1")},h.Util.Names.notag=function(t){return t.replace(/^(?:<[^>]+>)*/,"")},h.Util.Names.mergetag=function(t,e,i){var s=e.match(/(?:-*<[^>]+>-*)/g);return s&&(e=s.join(""),(s=i.match(/^(.*[^\s])*(\s+)$/))?(s[1]=s[1]?s[1]:"",i=s[1]+e+s[2]):i+=e),i},h.Util.Names.tagonly=function(t,e){var i=e.match(/(?:<[^>]+>)+/);return i?i.join(""):e},h.Util.Names.doNormalize=function(t,e,i){i=i||"";var s,r,n=[];for(s=0,r=e.length;s<r;s+=1)this.notag(e[s]).length>1&&"."===this.notag(e[s]).slice(-1)?(e[s]=e[s].replace(/^(.*)\.(.*)$/,"$1$2"),n.push(!0)):1===e[s].length&&e[s].toUpperCase()===e[s]?n.push(!0):n.push(!1);for(s=0,r=e.length;s<r;s+=2)n[s]&&(s<e.length-2&&(e[s+1]=this.tagonly(t,e[s+1]),n[s+2]||(e[s+1]=this.tagonly(t,e[s+1])+" "),e[s+2].length>1?e[s+1]=i.replace(/\ufeff$/,"")+e[s+1]:e[s+1]=this.mergetag(t,e[s+1],i)),s===e.length-1&&(e[s]=e[s]+i));return e.join("").replace(/[\u0009\u000a\u000b\u000c\u000d\u0020\ufeff\u00a0]+$/,"").replace(/\s*\-\s*/g,"-").replace(/[\u0009\u000a\u000b\u000c\u000d\u0020]+/g," ")},h.Util.Names.doInitialize=function(t,e,i){for(s=0,r=e.length;s<r;s+=2)if(u=e[s]){if(!(n=u.match(h.NAME_INITIAL_REGEXP))&&!u.match(h.STARTSWITH_ROMANESQUE_REGEXP)&&u.length>1&&i.match("%s")&&(n=u.match(/(.)(.*)/)),n&&n[2]&&n[3]&&(n[1]=n[1]+n[2],n[2]=""),n&&n[1].slice(0,1)===n[1].slice(0,1).toUpperCase()){var s,r,n,a,o,l,u,p="";if(n[2]){var c="";for(a=0,o=(l=n[2].split("")).length;a<o;a+=1){var m=l[a];if(m===m.toUpperCase())c+=m;else break}c.length<n[2].length&&(p=h.toLocaleLowerCase.call(t,c))}e[s]=n[1]+p,s<r-1?i.match("%s")?e[s]=i.replace("%s",e[s]):e[s+1].indexOf("-")>-1?e[s+1]=this.mergetag(t,e[s+1].replace("-",""),i)+"-":e[s+1]=this.mergetag(t,e[s+1],i):i.match("%s")?e[s]=i.replace("%s",e[s]):e.push(i)}else!u.match(h.ROMANESQUE_REGEXP)||n&&n[3]||(e[s]=" "+u)}return e.join("").replace(/[\u0009\u000a\u000b\u000c\u000d\u0020\ufeff\u00a0]+$/,"").replace(/\s*\-\s*/g,"-").replace(/[\u0009\u000a\u000b\u000c\u000d\u0020]+/g," ")},h.Util.Names.getRawName=function(t){var e=[];return t.literal?e.push(t.literal):(t.given&&e.push(t.given),t.family&&e.push(t.family)),e.join(" ")},h.Util.Dates={},h.Util.Dates.year={},h.Util.Dates.year.long=function(t,e){return e||(e="boolean"==typeof e?"":0),e.toString()},h.Util.Dates.year.imperial=function(t,e,i){var s,r,n="";e||(e="boolean"==typeof e?"":0),i=i?"_end":"";var a=t.tmp.date_object["month"+i];for(a=a?""+a:"1";a.length<2;)a="0"+a;var o=t.tmp.date_object["day"+i];for(o=o?""+o:"1";o.length<2;)o="0"+o;var l=parseInt(e+a+o,10);if(l>=18680908&&l<19120730?(s="ææ²»",r=1867):l>=19120730&&l<19261225?(s="大æ£",r=1911):l>=19261225&&l<19890108?(s="æå",r=1925):l>=19890108&&(s="å¹³æ",r=1988),s&&r){var u=s;t.sys.normalizeAbbrevsKey&&(u=t.sys.normalizeAbbrevsKey("number",s)),t.transform.abbrevs.default.number[u]||t.transform.loadAbbreviation("default","number",u,null),t.transform.abbrevs.default.number[u]&&(s=t.transform.abbrevs.default.number[u]),n=s+(e-r)}return n},h.Util.Dates.year.short=function(t,e){if((e=e.toString())&&4===e.length)return e.substr(2)},h.Util.Dates.year.numeric=function(t,e){var i,s=(e=""+e).match(/([0-9]*)$/);for(s?(i=e.slice(0,-1*s[1].length),e=s[1]):(i=e,e="");e.length<4;)e="0"+e;return i+e},h.Util.Dates.normalizeMonth=function(t,e){var i;if(t||(t=0),(t=""+t).match(/^[0-9]+$/)||(t=0),t=parseInt(t,10),e){var s={stub:"month-",num:t};if(s.num<1||s.num>24)s.num=0;else{for(;s.num>16;)s.num=s.num-4;s.num>12&&(s.stub="season-",s.num=s.num-12)}i=s}else(t<1||t>12)&&(t=0),i=t;return i},h.Util.Dates.month={},h.Util.Dates.month.numeric=function(t,e){var e=h.Util.Dates.normalizeMonth(e);return e||(e=""),e},h.Util.Dates.month["numeric-leading-zeros"]=function(t,e){var e=h.Util.Dates.normalizeMonth(e);if(e)for(e=""+e;e.length<2;)e="0"+e;else e="";return e}
1,h.Util.Dates.month.long=function(t,e,i,s){var r=h.Util.Dates.normalizeMonth(e,!0),e=r.num;if(e){for(e=""+e;e.length<2;)e="0"+e;e=t.getTerm(r.stub+e,"long",0,0,!1,s)}else e="";return e},h.Util.Dates.month.short=function(t,e,i,s){var r=h.Util.Dates.normalizeMonth(e,!0),e=r.num;if(e){for(e=""+e;e.length<2;)e="0"+e;e=t.getTerm(r.stub+e,"short",0,0,!1,s)}else e="";return e},h.Util.Dates.day={},h.Util.Dates.day.numeric=function(t,e){return e.toString()},h.Util.Dates.day.long=h.Util.Dates.day.numeric,h.Util.Dates.day["numeric-leading-zeros"]=function(t,e){for(e||(e=0),e=e.toString();e.length<2;)e="0"+e;return e.toString()},h.Util.Dates.day.ordinal=function(t,e,i){return t.fun.ordinalizer.format(e,i)},h.Util.Sort={},h.Util.Sort.strip_prepositions=function(t){var e;return"string"==typeof t&&(e=t.match(/^(([aA]|[aA][nN]|[tT][hH][eE])\s+)/)),e&&(t=t.substr(e[1].length)),t},h.Util.substituteStart=function(t,e){var i,s,r,n,a,o,l;n=function(t,e,i){for(var s=0,r=this.decorations.length;s<r;s+=1)if("@strip-periods"===this.decorations[s][0]&&"true"===this.decorations[s][1]){t.tmp.strip_periods+=1;break}},this.execs.push(n),this.decorations&&t.opt.development_extensions.csl_reverse_lookup_support&&(this.decorations.reverse(),this.decorations.push(["@showid","true",this.cslid]),this.decorations.reverse()),l=["number","date","names"],("text"===this.name&&!this.postponed_macro||l.indexOf(this.name)>-1)&&(i=function(t,e,i){"author"===t.tmp.element_trace.value()||"names"===this.name?(!t.tmp.just_looking&&i&&i["author-only"]&&"intext"!==t.tmp.area&&t.tmp.probably_rendered_something&&t.tmp.element_trace.push("suppress-me"),!t.tmp.just_looking&&i&&i["suppress-author"]&&!t.tmp.probably_rendered_something&&t.tmp.element_trace.push("suppress-me")):"date"===this.name?!t.tmp.just_looking&&i&&i["author-only"]&&"intext"!==t.tmp.area&&t.tmp.probably_rendered_something&&t.tmp.element_trace.push("suppress-me"):!t.tmp.just_looking&&i&&i["author-only"]&&"intext"!==t.tmp.area?!t.tmp.probably_rendered_something&&t.tmp.can_block_substitute||t.tmp.element_trace.push("suppress-me"):i&&i["suppress-author"]&&t.tmp.element_trace.push("do-not-suppress-me")},this.execs.push(i)),s=this.strings.cls,this.strings.cls=!1,0===t.build.render_nesting_level&&("bibliography"===t.build.area&&t.bibliography.opt["second-field-align"]?((r=new h.Token("group",h.START)).decorations=[["@display","left-margin"]],n=function(t,e){t.tmp.render_seen||(r.strings.first_blob=e.id,t.output.startTag("bib_first",r))},r.execs.push(n),e.push(r)):h.DISPLAY_CLASSES.indexOf(s)>-1&&((r=new h.Token("group",h.START)).decorations=[["@display",s]],n=function(t,e){r.strings.first_blob=e.id,t.output.startTag("bib_first",r)},r.execs.push(n),e.push(r)),t.build.cls=s),t.build.render_nesting_level+=1,1===t.build.substitute_level.value()&&(a=new h.Token("choose",h.START),h.Node.choose.build.call(a,t,e),o=new h.Token("if",h.START),n=function(){return!!t.tmp.can_substitute.value()},o.tests||(o.tests=[]),o.tests.push(n),o.test=t.fun.match.any(this,t,o.tests),e.push(o)),t.sys.variableWrapper&&this.variables_real&&this.variables_real.length&&(n=function(t,e,i){if(!t.tmp.just_looking&&!t.tmp.suppress_decorations){var s=new h.Token("text",h.START);s.decorations=[["@showid","true"]],t.output.startTag("variable_entry",s);var r=null;i&&(r=i.position),r||(r=0);var n=0;i&&i.noteIndex&&(n=i.noteIndex);var a=0;i&&i["first-reference-note-number"]&&(a=i["first-reference-note-number"]);var o=0;i&&i["first-container-reference-note-number"]&&(o=i["first-container-reference-note-number"]);var l=0;i&&i["citation-number"]&&(l=i["citation-number"]);var u=0;i&&i.index&&(u=i.index);var p={itemData:e,variableNames:this.variables,context:t.tmp.area,xclass:t.opt.xclass,position:["first","container-subsequent","subsequent","ibid","ibid-with-locator"][r],"note-number":n,"first-reference-note-number":a,"first-container-reference-note-number":o,"citation-number":l,index:u,mode:t.opt.mode};t.output.current.value().params=p}},this.execs.push(n))},h.Util.substituteEnd=function(t,e){var i,s,r,n,a,o;if(t.sys.variableWrapper&&(this.hasVariable||this.variables_real&&this.variables_real.length)&&(i=function(t){t.tmp.just_looking||t.tmp.suppress_decorations||t.output.endTag("variable_entry")},this.execs.push(i)),i=function(t){for(var e=0,i=this.decorations.length;e<i;e+=1)if("@strip-periods"===this.decorations[e][0]&&"true"===this.decorations[e][1]){t.tmp.strip_periods+=-1;break}},this.execs.push(i),t.build.render_nesting_level+=-1,0===t.build.render_nesting_level&&(t.build.cls?(i=function(t){t.output.endTag("bib_first")},this.execs.push(i),t.build.cls=!1):"bibliography"===t.build.area&&t.bibliography.opt["second-field-align"]&&(s=new h.Token("group",h.END),i=function(t){t.tmp.render_seen||t.output.endTag("bib_first")},s.execs.push(i),e.push(s),(r=new h.Token("group",h.START)).decorations=[["@display","right-inline"]],i=function(t){t.tmp.render_seen||(t.tmp.render_seen=!0,t.output.startTag("bib_other",r))},r.execs.push(i),e.push(r))),1===t.build.substitute_level.value()&&(n=new h.Token("if",h.END),e.push(n),a=new h.Token("choose",h.END),h.Node.choose.build.call(a,t,e)),"names"===this.name||"text"===this.name&&"title"!==this.variables_real){new h.Token("text",h.SINGLETON);var l=this.name;i=function(t,e){if("bibliography"===t.tmp.area&&"string"==typeof t.bibliography.opt["subsequent-author-substitute"]&&(!this.variables_real||e[this.variables_real])&&(!this.variables_real||"names"!==l)){var i,s,r=t.bibliography.opt["subsequent-author-substitute-rule"];if(!t.tmp.suppress_decorations&&t.tmp.subsequent_author_substitute_ok&&t.tmp.rendered_name){if("partial-each"===r||"partial-first"===r){var n=!0,a=[];for(i=0,s=t.tmp.name_node.children.length;i<s;i+=1){var u=t.tmp.rendered_name[i];n&&t.tmp.last_rendered_name&&t.tmp.last_rendered_name.length>i-1&&u&&!u.localeCompare(t.tmp.last_rendered_name[i])?(o=new h.Blob(t[t.tmp.area].opt["subsequent-author-substitute"]),t.tmp.name_node.children[i].blobs=[o],"partial-first"===r&&(n=!1)):n=!1,a.push(u)}t.tmp.last_rendered_name=a}else if("complete-each"===r){var a=t.tmp.rendered_name.join(",");
1if(a){if(t.tmp.last_rendered_name&&!a.localeCompare(t.tmp.last_rendered_name))for(i=0,s=t.tmp.name_node.children.length;i<s;i+=1)o=new h.Blob(t[t.tmp.area].opt["subsequent-author-substitute"]),t.tmp.name_node.children[i].blobs=[o];t.tmp.last_rendered_name=a}}else{var a=t.tmp.rendered_name.join(",");a&&(t.tmp.last_rendered_name&&!a.localeCompare(t.tmp.last_rendered_name)&&(o=new h.Blob(t[t.tmp.area].opt["subsequent-author-substitute"]),t.tmp.label_blob?t.tmp.name_node.top.blobs=[o,t.tmp.label_blob]:t.tmp.name_node.top.blobs.length?t.tmp.name_node.top.blobs[0].blobs=[o]:t.tmp.name_node.top.blobs=[o],t.tmp.substituted_variable=l),t.tmp.last_rendered_name=a)}t.tmp.subsequent_author_substitute_ok=!1}}},this.execs.push(i)}("text"===this.name&&!this.postponed_macro||["number","date","names"].indexOf(this.name)>-1)&&(i=function(t,e){t.tmp.element_trace.mystack.length>1&&t.tmp.element_trace.pop()},this.execs.push(i))},h.Util.padding=function(t){var e=t.match(/\s*(-{0,1}[0-9]+)/);if(e)for((t=parseInt(e[1],10))<0&&(t=1e20+t),t=""+t;t.length<20;)t="0"+t;return t},h.Util.LongOrdinalizer=function(){},h.Util.LongOrdinalizer.prototype.init=function(t){this.state=t},h.Util.LongOrdinalizer.prototype.format=function(t,e){t<10&&(t="0"+t);var i=h.Engine.getField(h.LOOSE,this.state.locale[this.state.opt.lang].terms,"long-ordinal-"+t,"long",0,e);return i||(i=this.state.fun.ordinalizer.format(t,e)),this.state.tmp.cite_renders_content=!0,i},h.Util.Ordinalizer=function(t){this.state=t,this.suffixes={}},h.Util.Ordinalizer.prototype.init=function(){if(!this.suffixes[this.state.opt.lang]){this.suffixes[this.state.opt.lang]={};for(var t=0;t<3;t+=1){var e=[void 0,"masculine","feminine"][t];this.suffixes[this.state.opt.lang][e]=[];for(var i=1;i<5;i+=1){var s=this.state.getTerm("ordinal-0"+i,"long",!1,e);if(void 0===s){delete this.suffixes[this.state.opt.lang][e];break}this.suffixes[this.state.opt.lang][e].push(s)}}}},h.Util.Ordinalizer.prototype.format=function(t,e){r=""+(t=parseInt(t,10));var i="",s=[];if(e&&s.push(e),s.push("neuter"),this.state.locale[this.state.opt.lang].ord["1.0.1"]){i=this.state.getTerm("ordinal",!1,0,e);for(var r,n,a=0,o=s.length;a<o;a+=1){n=s[a];var l=this.state.locale[this.state.opt.lang].ord["1.0.1"];if(l["whole-number"][r]&&l["whole-number"][r][n]?i=this.state.getTerm(this.state.locale[this.state.opt.lang].ord["1.0.1"]["whole-number"][r][n],!1,0,e):l["last-two-digits"][r.slice(r.length-2)]&&l["last-two-digits"][r.slice(r.length-2)][n]?i=this.state.getTerm(this.state.locale[this.state.opt.lang].ord["1.0.1"]["last-two-digits"][r.slice(r.length-2)][n],!1,0,e):l["last-digit"][r.slice(r.length-1)]&&l["last-digit"][r.slice(r.length-1)][n]&&(i=this.state.getTerm(this.state.locale[this.state.opt.lang].ord["1.0.1"]["last-digit"][r.slice(r.length-1)][n],!1,0,e)),i)break}}else e||(e=void 0),this.state.fun.ordinalizer.init(),i=t/10%10==1||t>10&&t<20?this.suffixes[this.state.opt.lang][e][3]:t%10==1&&t%100!=11?this.suffixes[this.state.opt.lang][e][0]:t%10==2&&t%100!=12?this.suffixes[this.state.opt.lang][e][1]:t%10==3&&t%100!=13?this.suffixes[this.state.opt.lang][e][2]:this.suffixes[this.state.opt.lang][e][3];return r+i},h.Util.Romanizer=function(){},h.Util.Romanizer.prototype.format=function(t){var e,i,s,r,n;if(e="",t<6e3)for((r=t.toString().split("")).reverse(),i=0,s=0,n=r.length,i=0;i<n;i+=1)s=parseInt(r[i],10),e=h.ROMAN_NUMERALS[i][s]+e;return e},h.Util.Suffixator=function(t){t||(t=h.SUFFIX_CHARS),this.slist=t.split(",")},h.Util.Suffixator.prototype.format=function(t){t+=1;var e,i="";do{e=t%26==0?26:t%26;var i=this.slist[e-1]+i;t=(t-e)/26}while(0!==t);return i},h.Engine.prototype.processNumber=function(t,e,i){var s,r=this,n=i;i="page-first"===i?"page":i;var a=",\\s+and\\s+|\\s+and\\s+";"en"!==this.opt.lang.slice(0,2)&&(a+="|,\\s+"+this.getTerm("and")+"\\s+|\\s+"+this.getTerm("and")+"\\s+");var o="\\s*&\\s*",l=RegExp("^"+o+"$"),u=RegExp("("+o+"|"+a+"|;\\s+|,\\s+|\\s*\\\\*[\\-\\u2013]+\\s*)","g"),p=RegExp("(?:"+o+"|"+a+"|;\\s+|,\\s+|\\s*\\\\*[\\-\\u2013]+\\s*)"),c=this.getTerm("and"),m=this.getTerm("and","symbol");function f(t,e,s,r,a){r=r||"";var o={};if(e||h.STATUTE_SUBDIV_STRINGS_REVERSE[i]||(e="var:"+i),e){var l=e.match(/(\s*)([^\s]+)(\s*)/);"page"===n&&0===a&&-1===["p.","pp."].indexOf(l[2])?(o.gotosleepability=!0,o.labelVisibility=!0):o.labelVisibility=!1,o.label=l[2],o.origLabel=t,o.labelSuffix=l[3]?l[3]:"",o.plural=0}var l=s.match(/^([0-9]*[a-zA-Z]+0*)?([0-9]+(?:[a-zA-Z]*|[-,a-zA-Z]+))$/);return l?(o.particle=l[1]?l[1]:"",o.value=l[2]):(o.particle="",o.value=s),o.joiningSuffix=r.replace(/\s*-\s*/,"-"),o}
1function d(t,e,i){var s=t[i.pos],r=t[e].value,n="\\-"===s.joiningSuffix;r.particle&&r.particle!==s.particle&&(i.collapsible=!1);var a=r.match(/^[0-9]+([-,:a-zA-Z]*)$/),o=s.value.match(/^(?:[0-9]+|[ixv]+)([-,:a-zA-Z]*|\-[\-0-9]+)$/);if((!r||!a||!o||n)&&(i.collapsible=!1,r&&o||(i.numeric=!1),n&&i.count--),(a&&a[1]||o&&o[1])&&(i.collapsible=!1),void 0===t[e].collapsible){for(var l=e,u=e+i.count;l<u;l++)isNaN(parseInt(t[l].value))&&!t[l].value.match(/^[ivxlcmIVXLCM]+$/)?t[l].collapsible=!1:t[l].collapsible=!0;i.collapsible=t[e].collapsible}for(var p=i.collapsible,l=i.pos,u=i.pos+i.count;l<u;l++)i.count>1&&p&&(t[l].plural=1),t[l].numeric=i.numeric,t[l].collapsible=i.collapsible}function g(t,e,s){"var:"!==s.label.slice(0,4)&&(0===s.pos?(["locator","number","locator-extra","page"].indexOf(i)>-1&&void 0===r.getTerm(h.STATUTE_SUBDIV_STRINGS[s.label])&&(t[s.pos].labelVisibility=!0),-1===["locator","number","locator-extra","page"].indexOf(i)&&h.STATUTE_SUBDIV_STRINGS[s.label]!==i&&(t[0].labelVisibility=!0)):t[s.pos].labelVisibility=!0)}function b(t){return t.replace("\\-","-")}function _(e){var i=h.Util.cloneToken(t),s=new h.Token;r.tmp.just_looking||(s.decorations=i.decorations,i.decorations=[],s.strings.prefix=i.strings.prefix,i.strings.prefix="",s.strings.suffix=i.strings.suffix,i.strings.suffix="");var n=e.length?e[0].label:null;if(e.length){for(var a=0,o=e.length;a<o;a++){var l=e[a],u=h.Util.cloneToken(i);u.gender=t.gender,n===l.label&&(u.formatter=t.formatter),l.numeric&&(u.successor_prefix=l.successor_prefix),u.strings.suffix=u.strings.suffix+b(l.joiningSuffix),l.styling=u}r.tmp.just_looking||'"'!==e[0].value.slice(0,1)||'"'!==e[e.length-1].value.slice(-1)||(e[0].value=e[0].value.slice(1),e[e.length-1].value=e[e.length-1].value.slice(0,-1),s.decorations.push(["@quotes",!0]))}return s}function v(t,e){return"page"===t||["locator","locator-extra"].indexOf(t)>-1&&(["p."].indexOf(e.label)>-1||["p."].indexOf(e.origLabel)>-1)}function y(t,e,i,s){var n,a,o=v(t,e);return a=!0,["locator","locator-extra","page"].indexOf(t)>-1&&(n=e.origLabel?e.origLabel:e.label,a=!!r.getTerm(h.STATUTE_SUBDIV_STRINGS[n])),!a||"-"!==i||!s||((o||["locator","locator-extra","issue","volume","edition","number"].indexOf(t)>-1)&&!(i=r.getTerm("page-range-delimiter"))&&(i="â"),"collection-number"!==t||(i=r.getTerm("year-range-delimiter"))||(i="â")),i}function x(t,e,s){if(!(e<1)&&2===s.count&&t[e-1].particle===t[e].particle){if("-"!==t[e-1].joiningSuffix){s.count=1;return}if(!r.opt["page-range-format"]&&parseInt(t[e-1].value,10)>parseInt(t[e].value,10)){t[e-1].joiningSuffix=y(i,t[e],t[e-1].joiningSuffix,!0);return}var n,a=t[e];!v(i,a)||isNaN(parseInt(t[e-1].value))||isNaN(parseInt(t[e].value))?((""+t[e-1].value).match(/^([0-9]+|[ivxlcmIVXLCM]+)$/)&&(""+t[e].value).match(/^([0-9]+|[ivxlcmIVXLCM]+)$/)&&(t[e-1].joiningSuffix=r.getTerm("page-range-delimiter")),n=t[e-1].value+b(t[e-1].joiningSuffix)+t[e].value):(n=t[e-1].particle+t[e-1].value+" - "+t[e].particle+t[e].value,n=r.fun.page_mangler(n));var o=n.match(/^((?:[0-9]*[a-zA-Z]+0*))?([0-9]+[a-z]*)(\s*[^0-9]+\s*)([-,a-zA-Z]?0*)([0-9]+[a-z]*)$/);if(o){var l=o[3];l=y(i,a,l,t[e].numeric),t[e-1].particle=o[1],t[e-1].value=o[2],t[e-1].joiningSuffix=l,t[e].particle=o[4],t[e].value=o[5]}s.count=0}}function I(e){if(t&&-1!==["page","chapter-number","collection-number","edition","issue","number","number-of-pages","number-of-volumes","volume","locator","locator-extra"].indexOf(i)){for(var s={count:0,label:null,lastHadRangeDelimiter:!1},r=0,n=e.length;r<n;r++){var a=e[r];if(a.collapsible)s.label===a.label&&"-"===a.joiningSuffix?s.count=1:s.label===a.label&&"-"!==a.joiningSuffix?(s.count++,2===s.count&&x(e,r,s)):s.label!==a.label?(s.label=a.label,s.count=1):(s.count=1,s.label=a.label);else{s.count=0,s.label=null;var o=a.numeric;a.joiningSuffix=y(i,a,a.joiningSuffix,o)}}2===s.count&&x(e,e.length-1,s)}}if(c===m&&(m="&"),t&&this.tmp.shadow_numbers[n]&&this.tmp.shadow_numbers[n].values.length){var O=this.tmp.shadow_numbers[n].values;I(O),this.tmp.shadow_numbers[n].masterStyling=_(O);return}if(this.tmp.shadow_numbers[n]||(this.tmp.shadow_numbers[n]={values:[]}),e){var T=h.LangPrefsMap[i];if(T){var S=this.opt["cite-lang-prefs"][T][0];s=(s=this.transform.getTextSubField(e,n,"locale-"+S,!0)).name}else s=e[n];if(s&&"number"===n&&"legal_case"===e.type&&(s=s.replace(/[\\]*-/g,"\\-")),s&&this.sys.getAbbreviation){if(this.sys.normalizeAbbrevsKey)var N=this.sys.normalizeAbbrevsKey(n,s);else var N=s;var A=this.transform.loadAbbreviation(e.jurisdiction,"number",N,e.language);this.transform.abbrevs[A].number&&(this.transform.abbrevs[A].number[N]?s=this.transform.abbrevs[A].number[N]:void 0!==this.transform.abbrevs[A].number[N]&&delete this.transform.abbrevs[A].number[N])}if(void 0!==s&&("string"==typeof s||"number"==typeof s)){"number"==typeof s&&(s=""+s);var E=h.STATUTE_SUBDIV_STRINGS_REVERSE[i];if(0===this.tmp.shadow_numbers[n].values.length){var k,R,w,O=function(t,s){if(t=function(t){var s=(t=t.trim()).match(/^([^ ]+)/);if(s&&!h.STATUTE_SUBDIV_STRINGS[s[1]]){var r=null;(r=["locator","locator-extra","page"].indexOf(i)>-1?e.label?h.STATUTE_SUBDIV_STRINGS_REVERSE[e.label]:"p.":h.STATUTE_SUBDIV_STRINGS_REVERSE[i])&&(t=r+" "+t)}return t}(t,s=s||""),"page"===i&&t.indexOf("â")>-1&&(t=t.replace(/\u2013/g,"-")),t.indexOf("\\-")>
1-1){v=new RegExp(u.source.replace("\\-","")),y=new RegExp(p.source.replace("\\-",""));for(var n=t.split("\\-"),a=0,o=n.length;a<o;a++)n[a]=n[a].replace(/\-/g,"â");x=(x=n.join("\\-")).replace(/\\/g,"")}else v=u,y=p,x=t;var c=[],d=x.match(v);if(d){for(var n=x.split(y),a=0,o=d.length;a<o;a++)d[a].match(l)&&(n[a].match(/[a-zA-Z]$/)&&n[a].match(/^[a-zA-Z]/)?d[a]=m:d[a]=" "+m+" ");for(var a in n)if((""+n[a]).replace(/^[a-z]\.\s+/,"").match(/[^\s0-9ivxlcmIVXLCM]/))break;for(var a=0,o=n.length-1;a<o;a++)c.push(n[a]),c.push(d[a]);c.push(n[n.length-1]),c=function(t){for(var e=t.length-2;e>-1;e-=2)"-"===t[e]&&t[e-1].match(/^(?:(?:[a-z]|[a-z][a-z]|[a-z][a-z][a-z]|[a-z][a-z][a-z][a-z])\. *)*[0-9]+[,a-zA-Z]+$/)&&t[e+1].match(/^[,a-zA-Z]+$/)&&(t[e-1]=t.slice(e-1,e+2).join(""),t=t.slice(0,e).concat(t.slice(e+2)));return t}(c)}else var c=[x];for(var g=[],b=s,_="",a=0,o=c.length;a<o;a+=2){var v,y,x,I,d=c[a].match(/((?:^| )(?:[a-z]|[a-z][a-z]|[a-z][a-z][a-z]|[a-z][a-z][a-z][a-z]|subpara|subch|amend|bibliog|annot|illus|princ|intro|sched|subdiv|subsec)(?:\.| ) *)/g);if(d){for(var I,n=c[a].split(/(?:(?:^| )(?:[a-z]|[a-z][a-z]|[a-z][a-z][a-z]|[a-z][a-z][a-z][a-z]|subpara|subch|amend|bibliog|annot|illus|princ|intro|sched|subdiv|subsec)(?:\.| ) *)/),O=n.length-1;O>0;O--)!n[O-1]||n[O].match(/^[0-9]+([-;,:a-zA-Z]*)$/)&&n[O-1].match(/^[0-9]+([-;,:a-zA-Z]*)$/)||(n[O-1]=n[O-1]+d[O-1]+n[O],n=n.slice(0,O).concat(n.slice(O+1)),d=d.slice(0,O-1).concat(d.slice(O)));if(d.length>0){var T=d[0].trim();h.STATUTE_SUBDIV_STRINGS[T]&&void 0!==r.getTerm(h.STATUTE_SUBDIV_STRINGS[T])&&(-1!==["locator","number","locator-extra","page"].indexOf(i)||h.STATUTE_SUBDIV_STRINGS[T]===i)?_=T:0===a&&(d=d.slice(1),n[0]=n[0]+" "+T+" "+n[1],n=n.slice(0,1).concat(n.slice(2)))}for(var O=0,S=n.length;O<S;O++)(n[O]||O===n.length-1)&&(I=_===(b=d[O-1]?d[O-1]:b).trim()?"":_,x=n[O]?n[O].trim():"",O===n.length-1?g.push(f(I,b,x,c[a+1],a)):g.push(f(I,b,x,null,a)))}else I=_===b.trim()?"":_,g.push(f(I,b,c[a],c[a+1]))}return g}(s,E);for(var j of(function(t){for(var e=0,i=t.length-1;e<i;e++)!t[e].joiningSuffix&&t[e+1].label&&(t[e].joiningSuffix=" ")}(O),function(t){if(0!==t.length){for(var s=0,r=1,a=1,o=t.length;a<o;a++){var l=t[a-1],u=t[a];if(l.label===u.label&&l.particle==l.particle)r++;else{var p=JSON.parse(JSON.stringify(t[s]));p.pos=s,p.count=r,p.numeric=!0,d(t,s,p),l.label!==u.label&&g(t,s,p),s=a,r=1}}var p=JSON.parse(JSON.stringify(t[s]));p.pos=s,p.count=r,p.numeric=!0,d(t,s,p),g(t,s,p),t.length&&t[0].numeric&&"number-of-"===i.slice(0,10)&&parseInt(e[n],10)>1&&(t[0].plural=1)}}(O),O))j.numeric||(j.plural=0);this.tmp.shadow_numbers[n].values=O,t&&(I(O),this.tmp.shadow_numbers[n].masterStyling=_(O)),k=this.tmp.shadow_numbers,R=O,w=k[n],R.length&&(w.numeric=R[0].numeric,w.collapsible=R[0].collapsible,w.plural=R[0].plural,w.label=h.STATUTE_SUBDIV_STRINGS[R[0].label],"number"===i&&"issue"===w.label&&r.getTerm("number")&&(w.label="number"))}var C=this.tmp.shadow_numbers[n];"number"===i&&1===C.values.length&&C.values[0].value.indexOf("|")>-1&&(C.values[0].value=C.values[0].value.replace(/\|/g,", "),C.values[0].numeric=!0,C.values[0].plural=1,C.values[0].collapsible=!1,C.numeric=!0,C.plural=1,C.collapsible=!1),1===C.values.length&&C.values[0].value.match(/^[0-9]+(?:\/[0-9]+)+$/)&&(C.values[0].numeric=!0,C.values[0].plural=0,C.values[0].collapsible=!1,C.numeric=!0,C.plural=0,C.collapsible=!1),"page"===i&&C.values.length>0&&C.values[0].gotosleepability&&(C.labelForm="short")}}},h.Util.outputNumericField=function(t,e,i){t.output.openLevel(t.tmp.shadow_numbers[e].masterStyling);var s=t.tmp.shadow_numbers[e].masterStyling,r=t.tmp.shadow_numbers[e].values,n=r.length?r[0].label:null,a=t.tmp.shadow_numbers[e].labelForm,o=t.tmp.group_context.tip.label_static;f=a||"short";for(var l=t.tmp.shadow_numbers[e].labelCapitalizeIfFirst,u=t.tmp.shadow_numbers[e].labelDecorations,p=null,c=0,m=r.length;c<m;c++){var f,d,g,b=r[c],_="";b.label&&(d="var:"===b.label.slice(0,4)?b.label.slice(4):h.STATUTE_SUBDIV_STRINGS[b.label])&&(b.label===n?(o&&-1===(_=t.getTerm(d,"static",b.plural)).indexOf("%s")&&(_=""),_||(_=t.getTerm(d,a,b.plural))):(o&&-1===(_=t.getTerm(d,"static",b.plural)).indexOf("%s")&&(_=""),_||(_=t.getTerm(d,f,b.plural))),l&&(_=h.Output.Formatters["capitalize-first"](t,_)));var v=-1;_&&(v=_.indexOf("%s"));var y=h.Util.cloneToken(b.styling);if(y.formatter=b.styling.formatter,y.type=b.styling.type,y.num=b.styling.num,y.gender=b.styling.gender,v>0&&v<_.length-2)y.strings.prefix+=_.slice(0,v),y.strings.suffix=_.slice(v+2)+y.strings.suffix;else if(b.labelVisibility){if(_||(_=b.label,d=b.label),v>0){var x=new h.Token;x.decorations=u,t.output.append(_.slice(0,v),x)}else(v===_.length-2||-1===v)&&t.output.append(_+b.labelSuffix,"empty")}
1if(h.UPDATE_GROUP_CONTEXT_CONDITION(t,s.strings.prefix,null,s,`${b.particle}${b.value}`),b.collapsible?(void 0===(g=b.value.match(/^[1-9][0-9]*$/)&&Number.isSafeInteger(parseInt(b.value,10))?new h.NumericBlob(t,b.particle,parseInt(b.value,10),y,i):new h.NumericBlob(t,b.particle,b.value,y,i)).gender&&(g.gender=t.locale[t.opt.lang]["noun-genders"][e]),t.output.append(g,"literal")):t.output.append(b.particle+b.value,y),0===v&&v<_.length-2&&(null===p&&(p=d),d!==p||c===r.length-1)){var I=new h.Token;I.decorations=u,t.output.append(_.slice(v+2),I)}p=d,t.tmp.term_predecessor=!0}t.output.closeLevel()},h.Util.PageRangeMangler={},h.Util.PageRangeMangler.getFunction=function(t,e){var i,s,r,n,a,o,l,u,p,h,c,m,f,d,g,b,_,v,y=t.getTerm(e+"-range-delimiter");i=/([0-9]*[a-zA-Z]+0*)?([0-9]+[a-z]*)\s*(?:\u2013|-)\s*([0-9]*[a-zA-Z]+0*)?([0-9]+[a-z]*)/,n=function(i){for(s=1,r=i.length;s<r;s+=2)"object"==typeof i[s]&&(i[s]=i[s].join(""));return i.join("").replace(/([^\\])\-/g,"$1"+t.getTerm(e+"-range-delimiter"))},a=function(t){var e,i,n,a="\\s+\\-\\s+",o=RegExp("([^\\\\])[-"+("-"===y?"":y)+"\\u2013]","g");t=t.replace(o,"$1 - ").replace(/\s+-\s+/g," - ");var l=RegExp("((?:[0-9]*[a-zA-Z]+0*)?[0-9]+[a-z]*"+a+"(?:[0-9]*[a-zA-Z]+0*)?[0-9]+[a-z]*)","g"),u=RegExp("(?:[0-9]*[a-zA-Z]+0*)?[0-9]+[a-z]*"+a+"(?:[0-9]*[a-zA-Z]+0*)?[0-9]+[a-z]*");if(e=t.match(l),0===(i=t.split(u)).length)n=e;else for(s=1,n=[i[0]],r=i.length;s<r;s+=1)n.push(e[s-1].replace(/\s*\-\s*/g,"-")),n.push(i[s]);return n},o=function(t){for(s=1,r=(c=a(t=""+t)).length;s<r;s+=2)(m=c[s].match(i))&&(!m[3]||m[1]===m[3])&&(m[4].length<m[2].length&&(m[4]=m[2].slice(0,m[2].length-m[4].length)+m[4]),parseInt(m[2],10)<parseInt(m[4],10)&&(m[3]=y+(m[1]?m[1]:""),c[s]=m.slice(1))),"string"==typeof c[s]&&(c[s]=c[s].replace(/\-/g,y));return c},l=function(t,e,i){r=t.length;for(var s=1,a=t.length;s<a;s+=2)"object"==typeof t[s]&&(t[s][3]=u(t[s][1],t[s][3],e,i),t[s][2].slice(1)===t[s][0]&&(t[s][2]=y));return n(t)},u=function(t,e,i,s){if(i||(i=0),f=(""+t).split(""),(g=(d=(""+e).split("")).slice()).reverse(),f.length===d.length)for(var r=0,n=f.length;r<n;r+=1)if(f[r]===d[r]&&g.length>i)g.pop();else{if(i&&s&&3===g.length){var a=f.slice(0,r);a.reverse(),g=g.concat(a)}break}return g.reverse(),g.join("")},p=function(t){for(s=1,r=t.length;s<r;s+=2)"object"==typeof t[s]&&(b=parseInt((m=t[s])[1],10),_=parseInt(m[3],10),b>100&&b%100&&parseInt(b/100,10)===parseInt(_/100,10)?m[3]=""+_%100:b>=1e4&&(m[3]=""+_%1e3)),m[2].slice(1)===m[0]&&(m[2]=y);return n(t)},h=function(t){for(s=1,r=t.length;s<r;s+=2){if("object"==typeof t[s]&&(b=parseInt((m=t[s])[1],10),d=""+(_=parseInt(m[3],10)),b>100&&b%100))for(var e=2;e<d.length;e++){var i=Math.pow(10,e);if(Math.floor(b/i)===Math.floor(_/i)){m[3]=""+_%i;break}}m[2].slice(1)===m[0]&&(m[2]=y)}return n(t)};var x=function(t,e,i,s){return e(o(t=""+t),i,s)};return t.opt[e+"-range-format"]?"expanded"===t.opt[e+"-range-format"]?v=function(t){return x(t,n)}:"minimal"===t.opt[e+"-range-format"]?v=function(t){return x(t,l)}:"minimal-two"===t.opt[e+"-range-format"]?v=function(t,e){return x(t,l,2,e)}:"chicago"===t.opt[e+"-range-format"]?v=function(t){return x(t,p)}:"chicago-15"===t.opt[e+"-range-format"]?v=function(t){return x(t,p)}:"chicago-16"===t.opt[e+"-range-format"]&&(v=function(t){return x(t,h)}):v=function(t){return x(t,n)},v},h.Util.FlipFlopper=function(t){var e=[],i={'<span class="nocase">':{type:"nocase",opener:'<span class="nocase">',closer:"</span>",attr:null,outer:null,flipflop:null},'<span class="nodecor">':{type:"nodecor",opener:'<span class="nodecor">',closer:"</span>",attr:"@class",outer:"nodecor",flipflop:{nodecor:"nodecor"}},'<span style="font-variant:small-caps;">':{type:"tag",opener:'<span style="font-variant:small-caps;">',closer:"</span>",attr:"@font-variant",outer:"small-caps",flipflop:{"small-caps":"normal",normal:"small-caps"}},"<sc>":{type:"tag",opener:"<sc>",closer:"</sc>",attr:"@font-variant",outer:"small-caps",flipflop:{"small-caps":"normal",normal:"small-caps"}},"<i>":{type:"tag",opener:"<i>",closer:"</i>",attr:"@font-style",outer:"italic",flipflop:{italic:"normal",normal:"italic"}},"<b>":{type:"tag",opener:"<b>",closer:"</b>",attr:"@font-weight",outer:"bold",flipflop:{bold:"normal",normal:"bold"}},"<sup>":{type:"tag",opener:"<sup>",closer:"</sup>",attr:"@vertical-align",outer:"sup",flipflop:{sub:"sup",sup:"sup"}},"<sub>":{type:"tag",opener:"<sub>",closer:"</sub>",attr:"@vertical-align",outer:"sub",flipflop:{sup:"sub",sub:"sub"}},' "':{type:"quote",opener:' "',closer:'"',attr:"@quotes",outer:"true",flipflop:{true:"inner",inner:"true",false:"true"}}," '":{type:"quote",opener:" '",closer:"'",attr:"@quotes",outer:"inner",flipflop:{true:"inner",inner:"true",false:"true"}}};i['("']=i[' "'],i["('"]=i[" '"];var s=t.getTerm("open-quote"),r=t.getTerm("close-quote"),n=t.getTerm("open-inner-quote"),a=t.getTerm("close-inner-quote");s&&r&&-1===[' "'," '",'"',"'"].indexOf(s)&&(i[s]=JSON.parse(JSON.stringify(i[' "'])),i[s].opener=s,i[s].closer=r),n&&a&&-1===[' "'," '",'"',"'"].indexOf(n)&&(i[n]=JSON.parse(JSON.stringify(i[" '"])),i[n].opener=n,i[n].closer=a);var o=function(){for(var t={},e=Object.keys(i),s=0,r=e.length;s<r;s++){var n=e[s];t[n]=function(t){for(var e=[],s=Object.keys(i),r=0,n=s.length;r<n;r++){var a=s[r];"quote"===i[t].type&&i[t]||e.push(a)}var o=i[t];
1return o.opener=RegExp("^(?:"+e.map(function(t){return t.replace("(","\\(")}).join("|")+")"),o}(n)}return t}(),l=function(){var t=[],e=[],i={};for(var s in o)t.push(s),i[o[s].closer]=!0;for(var r=Object.keys(i),n=0,a=r.length;n<a;n++){var l=r[n];e.push(l)}var u=t.concat(e).map(function(t){return t.replace("(","\\(")}).join("|");return{matchAll:RegExp("((?:"+u+"))","g"),splitAll:RegExp("(?:"+u+")","g"),open:RegExp("(^(?:"+t.map(function(t){return t.replace("(","\\(")}).join("|")+")$)"),close:RegExp("(^(?:"+e.join("|")+")$)")}}(),u=function(e){var s=[];this.set=function(r){for(var n=i[r].attr,a=null,o=s.length-1;o>-1;o--){var l=s[o];if(l[0]===n){a=l;break}}if(!a){var u=[t[t.tmp.area].opt.layout_decorations].concat(e.alldecor);t:for(var o=u.length-1;o>-1;o--){var p=u[o];if(p)for(var h=p.length-1;h>-1;h--){var l=p[h];if(l[0]===n){a=l;break t}}}}a=a?[n,i[r].flipflop[a[1]]]:[n,i[r].outer],s.push(a)},this.pair=function(){return s[s.length-1]},this.pop=function(){s.pop()}};this.processTags=function(s){var r=s.blobs,n=!1;" "!==r.slice(0,1)||r.match(/^\s+[\'\"]/)||(n=!0);var a=RegExp("("+h.ROMANESQUE_REGEXP.source+")â("+h.ROMANESQUE_REGEXP.source+")","g"),r=" "+r.replace(a,"$1'$2"),p=function(t){var e=[],s=(t=(t=t.replace(/(<span)\s+(style=\"font-variant:)\s*(small-caps);?\"[^>]*(>)/g,'$1 $2$3;"$4')).replace(/(<span)\s+(class=\"no(?:case|decor)\")[^>]*(>)/g,"$1 $2$3")).match(l.matchAll);if(!s)return{tags:[],strings:[t],forcedSpaces:[]};for(var r=t.split(l.splitAll),n=0,a=s.length-1;n<a;n++)i[s[n]]&&(""===r[n+1]&&['"',"'"].indexOf(s[n+1])>-1?(s[n+1]=" "+s[n+1],e.push(!0)):e.push(!1));return{tags:s,strings:r,forcedSpaces:e}}(r);if(0!==p.tags.length){for(var c=!1,m=0,f=p.tags.length;m<f;m++){var d,g=p.tags[m],r=p.strings[m+1],b=function(t,e){if("'"===t){if(e&&e.match(/^[^\,\.\?\:\;\ ]/))return"â"}else if(" '"===t&&e&&e.match(/^[\ ]/))return" â";return!1}(g,r);if(b)p.strings[m+1]=b+p.strings[m+1],p.tags[m]="";else{for(;;)if(d=function(t,i){var s;return t.match(l.open)?!(s=e[e.length-1])||t.match(s.opener)?(e.push({type:o[t].type,opener:o[t].opener,closer:o[t].closer,pos:i}),!1):(e.pop(),e.push({type:o[t].type,opener:o[t].opener,closer:o[t].closer,pos:i}),{fixtag:s.pos}):function(t,i){var s=e[e.length-1];return s&&t===s.closer?(e.pop(),"nocase"===s.type&&{nocase:{open:s.pos,close:i}}):s?{fixtag:s.pos}:{fixtag:i}}(t,i)}(g,m)){if(Object.keys(d).indexOf("fixtag")>-1){if(g.match(l.close)&&"'"===g)p.strings[m+1]="â"+p.strings[m+1],p.tags[m]="";else{var _=p.tags[d.fixtag];p.forcedSpaces[d.fixtag-1]&&(_=_.slice(1)),p.strings[d.fixtag+1]=_+p.strings[d.fixtag+1],p.tags[d.fixtag]=""}if(e.length>0){if("'"!==g)e.pop();else break}else break}else if(d.nocase){p.tags[d.nocase.open]="",p.tags[d.nocase.close]="";break}else break}else break;d&&(d.fixtag||0===d.fixtag)&&(p.strings[m+1]=p.tags[m]+p.strings[m+1],p.tags[m]="")}}for(var m=e.length-1;m>-1;m--){var v=e[m].pos,g=p.tags[v];" '"===g||"'"===g?p.strings[v+1]=" â"+p.strings[v+1]:p.strings[v+1]=p.tags[v]+p.strings[v+1],p.tags[v]="",e.pop()}for(var m=p.tags.length-1;m>-1;m--)p.tags[m]||(p.tags=p.tags.slice(0,m).concat(p.tags.slice(m+1)),p.strings[m]=p.strings[m]+p.strings[m+1],p.strings=p.strings.slice(0,m+1).concat(p.strings.slice(m+2)));for(var m=0,f=p.tags.length;m<f;m++){var y,g=p.tags[m],x=p.forcedSpaces[m-1];[' "'," '",'("',"('"].indexOf(g)>-1&&(c||(i[y=g].outer="true",i[({" '":' "',' "':" '",'("':"('","('":'("'})[y]].outer="inner",c=!0),x||(p.strings[m]+=g.slice(0,1)))}!function(e,i,s){var r=!0,n=new u(e);e.blobs=[];var a=new function(e){this.stack=[e],this.latest=e,this.addStyling=function(e,i){if(r&&(" "===e.slice(0,1)&&(e=e.slice(1))," "===e.slice(0,1)&&(e=e.slice(1)),r=!1),this.latest=this.stack[this.stack.length-1],i){if("string"==typeof this.latest.blobs){var s=new h.Blob;s.blobs=this.latest.blobs,s.alldecor=this.latest.alldecor.slice(),this.latest.blobs=[s]}var n=new h.Token,a=new h.Blob(null,n);if(a.alldecor=this.latest.alldecor.slice(),"@class"===i[0]&&"nodecor"===i[1]){for(var o=[],l={},u=[t[t.tmp.area].opt.layout_decorations].concat(a.alldecor),p=u.length-1;p>-1;p--){var c=u[p];if(c)for(var m=c.length-1;m>-1;m--){var f=c[m];["@font-weight","@font-style","@font-variant"].indexOf(f[0])>-1&&!l[f[0]]&&("normal"!==i[1]&&(a.decorations.push([f[0],"normal"]),o.push([f[0],"normal"])),l[f[0]]=!0)}}a.alldecor.push(o)}else a.decorations.push(i),a.alldecor.push([i]);if(this.latest.blobs.push(a),this.stack.push(a),this.latest=a,e){var n=new h.Token,a=new h.Blob(null,n);a.blobs=e,a.alldecor=this.latest.alldecor.slice(),this.latest.blobs.push(a)}}else if(e){var s=new h.Blob;s.blobs=e,s.alldecor=this.latest.alldecor.slice(),this.latest.blobs.push(s)}},this.popStyling=function(){this.stack.pop()}}(e);if(i.strings.length){var o=i.strings[0];s&&(o=" "+o),a.addStyling(o)}for(var p=0,c=i.tags.length;p<c;p++){var m=i.tags[p],o=i.strings[p+1];m.match(l.open)?(n.set(m),a.addStyling(o,n.pair())):(n.pop(),a.popStyling(),a.addStyling(o))}}(s,p,n)}}},h.Output.Formatters=function(){var t=new h.Doppeler('(?:â|â|â|â| "| \'|"|\'|[-ââ/.,;?!:]|\\[|\\]|\\(|\\)|<span style="font-variant: small-caps;">|<span class="no(?:case|decor)">|</span>|</?(?:i|sc|b|sub|sup)>)',function(t){return t.replace(/(<span)\s+(class=\"no(?:case|decor)\")[^>]*(>)/g,"$1 $2$3").replace(/(<span)\s+(style=\"font-variant:)\s*(small-caps);?(\")[^>]*(>)/g,"$1 $2 $3;$4$5")}),e=new h.Doppeler('(?:[-\\s]*<\\/*(?:spans+class="no(?:case|decor)"|i|sc|b|sub|sup)>[-\\s]*|[-\\s]+)'),i=new h.Doppeler("(?:[\xa0 \xa0â-ââã]+)"),s={'<span style="font-variant: small-caps;">':"</span>",'<span class="nocase">':"</span>",'<span class="nodecor">':"</span>","<sc>":"</sc>","<sub>":"</sub>","<sup>":"</sup>"};function r(t){var e=t.match(/(^\s*)((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))(.*)/);
1return e&&!(e[2].match(/^[\u0370-\u03FF]$/)&&!e[3])?e[1]+h.toLocaleUpperCase.call(this,e[2])+e[3]:t}function n(e,n){if(!n)return"";e.doppel=t.split(n);var a={' "':{opener:" '",closer:'"'}," '":{opener:' "',closer:"'"},"â":{opener:"â",closer:"â"},"â":{opener:"â",closer:"â"}};e.doppel.strings.length&&e.doppel.strings[0].trim()&&(e.doppel.strings[0]=e.capitaliseWords(e.doppel.strings[0],0,e.doppel.tags[0]));for(var o=0,l=e.doppel.tags.length;o<l;o++){var u=e.doppel.tags[o],p=e.doppel.strings[o+1];if(null!==e.tagState&&(s[u]?e.tagState.push(s[u]):e.tagState.length&&u===e.tagState[e.tagState.length-1]&&e.tagState.pop()),null!==e.afterPunct&&u.match(/[\!\?\:]$/)&&(e.afterPunct=!0),0===e.tagState.length?e.doppel.strings[o+1]=e.capitaliseWords(p,o+1,e.doppel,e.doppel.tags[o+1]):e.doppel.strings[o+1].trim()&&(e.lastWordPos=null),null!==e.quoteState){var c=function(t,i){var s,r=t.match(/(^(?:\u2018|\u2019|\u201C|\u201D|\"|\')|(?: \"| \')$)/);if(r)return["â","â",' "'," '"].indexOf(s=r[1])>-1?function(t,i){if(0===e.quoteState.length||t===e.quoteState[e.quoteState.length-1].opener)return e.quoteState.push({opener:a[t].opener,closer:a[t].closer,pos:i}),!1;var s=e.quoteState[e.quoteState.length-1].pos;return e.quoteState.pop(),e.quoteState.push({opener:a[t].opener,closer:a[t].closer,positions:i}),s}(s,i):function(t,i){if(!(e.quoteState.length>0)||t!==e.quoteState[e.quoteState.length-1].closer)return i;e.quoteState.pop()}(s,i)}(u,o);if(c||0===c){var m=e.doppel.origStrings[c+1].slice(0,1);e.doppel.strings[c+1]=m+e.doppel.strings[c+1].slice(1),e.lastWordPos=null}}e.isFirst&&p.trim()&&(e.isFirst=!1),e.afterPunct&&p.trim()&&(e.afterPunct=!1)}if(e.quoteState)for(var o=0,l=e.quoteState.length;o<l;o++){var c=e.quoteState[o].pos;if(void 0!==c){var m=e.doppel.origStrings[c+1].slice(0,1);e.doppel.strings[c+1]=m+e.doppel.strings[c+1].slice(1)}}if(e.lastWordPos){var f=i.split(e.doppel.strings[e.lastWordPos.strings]),d=f.strings[e.lastWordPos.words];d.length>1&&h.toLocaleLowerCase.call(this,d).match(e.skipWordsRex)&&(d=r.call(this,d),f.strings[e.lastWordPos.words]=d),e.doppel.strings[e.lastWordPos.strings]=i.join(f)}return t.join(e.doppel)}return{nameDoppel:e,passthrough:function(t,e){return e},lowercase:function(t,e){return n.call(t,{quoteState:null,capitaliseWords:function(e){for(var i=e.split(" "),s=0,r=i.length;s<r;s++){var n=i[s];n&&(i[s]=h.toLocaleLowerCase.call(t,n))}return i.join(" ")},skipWordsRex:null,tagState:[],afterPunct:null,isFirst:null},e)},uppercase:function(t,e){return n.call(t,{quoteState:null,capitaliseWords:function(e){for(var i=e.split(" "),s=0,r=i.length;s<r;s++){var n=i[s];n&&(i[s]=h.toLocaleUpperCase.call(t,n))}return i.join(" ")},skipWordsRex:null,tagState:[],afterPunct:null,isFirst:null},e)},sentence:function(t,e){var i={quoteState:[],capitaliseWords:function(e){for(var s=e.split(" "),n=0,a=s.length;n<a;n++){var o=s[n];o&&(i.isFirst?(s[n]=r.call(t,o),i.isFirst=!1):s[n]=h.toLocaleLowerCase.call(t,o))}return s.join(" ")},skipWordsRex:null,tagState:[],afterPunct:null,isFirst:!0};return n.call(t,i,e)},title:function(t,e){var s={quoteState:[],capitaliseWords:function(e,n,a){if(e.trim()){for(var o=i.split(e),l=o.strings,u=0,p=l.length;u<p;u++){var c=l[u];if(!c)continue;let e=h.toLocaleLowerCase.call(t,c),i=!1;c.length>1&&!e.match(s.skipWordsRex)?i=!0:u===l.length-1&&"-"===a?i=!0:s.isFirst?i=!0:s.afterPunct&&(i=!0),i&&c===e&&(l[u]=r.call(t,c)),s.afterPunct=!1,s.isFirst=!1,s.lastWordPos={strings:n,words:u}}e=i.join(o)}return e},skipWordsRex:t.locale[t.opt.lang].opts["skip-words-regexp"],tagState:[],afterPunct:!1,isFirst:!0};return n.call(t,s,e)},"capitalize-first":function(t,e){var s={quoteState:[],capitaliseWords:function(e){for(var n=i.split(e),a=n.strings,o=0,l=a.length;o<l;o++){var u=a[o];if(u&&s.isFirst){u===h.toLocaleLowerCase.call(t,u)&&(a[o]=r.call(t,u)),s.isFirst=!1;break}}return i.join(n)},skipWordsRex:null,tagState:[],afterPunct:null,isFirst:!0};return n.call(t,s,e)},"capitalize-all":function(t,e){return n.call(t,{quoteState:[],capitaliseWords:function(e){for(var s=i.split(e),n=s.strings,a=0,o=n.length;a<o;a++){var l=n[a];l&&l===h.toLocaleLowerCase.call(t,l)&&(n[a]=r.call(t,l))}return i.join(s)},skipWordsRex:null,tagState:[],afterPunct:null,isFirst:null},e)}}}(),h.Output.Formats=function(){},h.Output.Formats.prototype.html={text_escape:function(t){return t||(t=""),t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\s\s/g,"\xa0 ").replace(h.SUPERSCRIPTS_REGEXP,function(t){return"<sup>"+h.SUPERSCRIPTS[t]+"</sup>"})},bibstart:'<div class="csl-bib-body">\n',bibend:"</div>","@font-style/italic":"<i>%%STRING%%</i>","@font-style/oblique":"<em>%%STRING%%</em>","@font-style/normal":'<span style="font-style:normal;">%%STRING%%</span>',"@font-variant/small-caps":'<span style="font-variant:small-caps;">%%STRING%%</span>',"@passthrough/true":h.Output.Formatters.passthrough,"@font-variant/normal":'<span style="font-variant:normal;">%%STRING%%</span>',"@font-weight/bold":"<b>%%STRING%%</b>","@font-weight/normal":'<span style="font-weight:normal;">%%STRING%%</span>',"@font-weight/light":!1,"@text-decoration/none":'<span style="text-decoration:none;">%%STRING%%</span>',"@text-decoration/underline":'<span style="text-decoration:underline;">%%STRING%%</span>',"@vertical-align/sup":"<sup>%%STRING%%</sup>","@vertical-align/sub":"<sub>%%STRING%%</sub>","@vertical-align/baseline":'<span style="baseline">%%STRING%%</span>',"@strip-periods/true":h.Output.Formatters.passthrough,"@strip-periods/false":h.Output.Formatters.passthrough,"@quotes/true":function(t,e){return void 0===e?t.getTerm("open-quote"):t.getTerm("open-quote")+e+t.getTerm("close-quote")},"@quotes/inner":function(t,e){return void 0===e?"â":t.getTerm("open-inner-quote")+e+t.getTerm("close-inner-quote")},"@quotes/false":!1,"@cite/entry":function(t,e){return t.sys.wrapCitationEntry(e,this.item_id,this.locator_txt,this.suffix_txt)},"@bibliography/entry":function(t,e){var i="";return t.sys.embedBibliographyEntry&&(i=t.sys.embedBibliographyEntry(this.item_id)+"\n"),' <div class="csl-entry">'+e+"</div>\n"+i},"@display/block":function(t,e){return'\n\n <div class="csl-block">'+e+"</div>\n"},"@display/left-margin":function(t,e){return'\n <div class="csl-left-margin">'+e+"</div>"},"@display/right-inline":function(t,e){return'<div class="csl-right-inline">'+e+"</div>\n "},"@display/indent":function(t,e){return'<div class="csl-indent">'+e+"</div>\n "}
1,"@showid/true":function(t,e,i){if(t.tmp.just_looking||t.tmp.suppress_decorations)return e;if(i)return'<span class="'+t.opt.nodenames[i]+'" cslid="'+i+'">'+e+"</span>";if(!this.params||"string"!=typeof e)return e;var s="";if(e){var r=e.match(h.VARIABLE_WRAPPER_PREPUNCT_REX);s=r[1],e=r[2]}var n="";return e&&h.SWAPPING_PUNCTUATION.indexOf(e.slice(-1))>-1&&(n=e.slice(-1),e=e.slice(0,-1)),t.sys.variableWrapper(this.params,s,e,n)},"@URL/true":function(t,e){return'<a href="'+e+'">'+e+"</a>"},"@DOI/true":function(t,e){var i=e;return e.match(/^https?:\/\//)||(i="https://doi.org/"+e),'<a href="'+i+'">'+e+"</a>"}},h.Output.Formats.prototype.text={text_escape:function(t){return t||(t=""),t},bibstart:"",bibend:"","@font-style/italic":!1,"@font-style/oblique":!1,"@font-style/normal":!1,"@font-variant/small-caps":!1,"@passthrough/true":h.Output.Formatters.passthrough,"@font-variant/normal":!1,"@font-weight/bold":!1,"@font-weight/normal":!1,"@font-weight/light":!1,"@text-decoration/none":!1,"@text-decoration/underline":!1,"@vertical-align/baseline":!1,"@vertical-align/sup":!1,"@vertical-align/sub":!1,"@strip-periods/true":h.Output.Formatters.passthrough,"@strip-periods/false":h.Output.Formatters.passthrough,"@quotes/true":function(t,e){return void 0===e?t.getTerm("open-quote"):t.getTerm("open-quote")+e+t.getTerm("close-quote")},"@quotes/inner":function(t,e){return void 0===e?"â":t.getTerm("open-inner-quote")+e+t.getTerm("close-inner-quote")},"@quotes/false":!1,"@cite/entry":function(t,e){return t.sys.wrapCitationEntry(e,this.item_id,this.locator_txt,this.suffix_txt)},"@bibliography/entry":function(t,e){return e+"\n"},"@display/block":function(t,e){return"\n"+e},"@display/left-margin":function(t,e){return e+" "},"@display/right-inline":function(t,e){return e},"@display/indent":function(t,e){return"\n "+e},"@showid/true":function(t,e){return e},"@URL/true":function(t,e){return e},"@DOI/true":function(t,e){return e}},h.Output.Formats.prototype.rtf={text_escape:function(t){return t||(t=""),t.replace(/([\\{}])/g,"\\$1").replace(h.SUPERSCRIPTS_REGEXP,function(t){return"\\super "+h.SUPERSCRIPTS[t]+"\\nosupersub{}"}).replace(/[\u007F-\uFFFF]/g,function(t){return"\\uc0\\u"+t.charCodeAt(0).toString()+"{}"}).split(" ").join("\\tab{}")},"@passthrough/true":h.Output.Formatters.passthrough,"@font-style/italic":"{\\i{}%%STRING%%}","@font-style/normal":"{\\i0{}%%STRING%%}","@font-style/oblique":"{\\i{}%%STRING%%}","@font-variant/small-caps":"{\\scaps %%STRING%%}","@font-variant/normal":"{\\scaps0{}%%STRING%%}","@font-weight/bold":"{\\b{}%%STRING%%}","@font-weight/normal":"{\\b0{}%%STRING%%}","@font-weight/light":!1,"@text-decoration/none":!1,"@text-decoration/underline":"{\\ul{}%%STRING%%}","@vertical-align/baseline":!1,"@vertical-align/sup":"\\super %%STRING%%\\nosupersub{}","@vertical-align/sub":"\\sub %%STRING%%\\nosupersub{}","@strip-periods/true":h.Output.Formatters.passthrough,"@strip-periods/false":h.Output.Formatters.passthrough,"@quotes/true":function(t,e){return void 0===e?h.Output.Formats.rtf.text_escape(t.getTerm("open-quote")):h.Output.Formats.rtf.text_escape(t.getTerm("open-quote"))+e+h.Output.Formats.rtf.text_escape(t.getTerm("close-quote"))},"@quotes/inner":function(t,e){return void 0===e?h.Output.Formats.rtf.text_escape("â"):h.Output.Formats.rtf.text_escape(t.getTerm("open-inner-quote"))+e+h.Output.Formats.rtf.text_escape(t.getTerm("close-inner-quote"))},"@quotes/false":!1,bibstart:"{\\rtf ",bibend:"}","@display/block":"\\line{}%%STRING%%\\line\r\n","@cite/entry":function(t,e){return t.sys.wrapCitationEntry(e,this.item_id,this.locator_txt,this.suffix_txt)},"@bibliography/entry":function(t,e){return e},"@display/left-margin":function(t,e){return e+"\\tab "},"@display/right-inline":function(t,e){return e+"\r\n"},"@display/indent":function(t,e){return"\n\\tab "+e+"\\line\r\n"},"@showid/true":function(t,e){if(t.tmp.just_looking||t.tmp.suppress_decorations)return e;var i="";if(e){var s=e.match(h.VARIABLE_WRAPPER_PREPUNCT_REX);i=s[1],e=s[2]}var r="";return e&&h.SWAPPING_PUNCTUATION.indexOf(e.slice(-1))>-1&&(r=e.slice(-1),e=e.slice(0,-1)),t.sys.variableWrapper(this.params,i,e,r)},"@URL/true":function(t,e){return e},"@DOI/true":function(t,e){return e}},h.Output.Formats.prototype.asciidoc={text_escape:function(t){return t||(t=""),t.replace("*","pass:[*]","g").replace("_","pass:[_]","g").replace("#","pass:[#]","g").replace("^","pass:[^]","g").replace("~","pass:[~]","g").replace("[[","pass:[[[]","g").replace(" ","  ","g").replace(h.SUPERSCRIPTS_REGEXP,function(t){return"^"+h.SUPERSCRIPTS[t]+"^"})},bibstart:"",bibend:"","@passthrough/true":h.Output.Formatters.passthrough,"@font-style/italic":"__%%STRING%%__","@font-style/oblique":"__%%STRING%%__","@font-style/normal":!1,"@font-variant/small-caps":"[small-caps]#%%STRING%%#","@font-variant/normal":!1,"@font-weight/bold":"**%%STRING%%**","@font-weight/normal":!1,"@font-weight/light":!1,"@text-decoration/none":!1,"@text-decoration/underline":"[underline]##%%STRING%%##","@vertical-align/sup":"^^%%STRING%%^^","@vertical-align/sub":"~~%%STRING%%~~","@vertical-align/baseline":!1,"@strip-periods/true":h.Output.Formatters.passthrough,"@strip-periods/false":h.Output.Formatters.passthrough,"@quotes/true":function(t,e){return void 0===e?"``":"``"+e+"''"},"@quotes/inner":function(t,e){return void 0===e?"`":"`"+e+"'"},"@quotes/false":!1,"@cite/entry":function(t,e){return t.sys.wrapCitationEntry(e,this.item_id,this.locator_txt,this.suffix_txt)},"@bibliography/entry":function(t,e){return e+"\n"},"@display/block":function(t,e){return e},"@display/left-margin":function(t,e){return e},"@display/right-inline":function(t,e){return" "+e},"@display/indent":function(t,e){return" "+e},"@showid/true":function(t,e){if(t.tmp.just_looking||t.tmp.suppress_decorations||!this.params||"string"!=typeof e)return e;var i="";if(e){var s=e.match(h.VARIABLE_WRAPPER_PREPUNCT_REX);i=s[1],e=s[2]}var r="";return e&&h.SWAPPING_PUNCTUATION.indexOf(e.slice(-1))>-1&&(r=e.slice(-1),e=e.slice(0,-1)),t.sys.variableWrapper(this.params,i,e,r)},"@URL/true":function(t,e){return e},"@DOI/true":function(t,e){var i=e;return e.match(/^https?:\/\//)||(i="https://doi.org/"+e),i+"["+e+"]"}},h.Output.Formats.prototype.fo={text_escape:function(t){return t||(t=""),t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(" ","  ","g").replace(h.SUPERSCRIPTS_REGEXP,function(t){return'<fo:inline vertical-align="super">'+h.SUPERSCRIPTS[t]+"</fo:inline>"})},bibstart:"",bibend:"","@passthrough/true":h.Output.Formatters.passthrough,"@font-style/italic":'<fo:inline font-style="italic">%%STRING%%</fo:inline>',"@font-style/oblique":'<fo:inline font-style="oblique">%%STRING%%</fo:inline>',"@font-style/normal":'<fo:inline font-style="normal">%%STRING%%</fo:inline>',"@font-variant/small-caps":'<fo:inline font-variant="small-caps">%%STRING%%</fo:inline>',"@font-variant/normal":'<fo:inline font-variant="normal">%%STRING%%</fo:inline>',"@font-weight/bold":'<fo:inline font-weight="bold">%%STRING%%</fo:inline>',"@font-weight/normal":'<fo:inline font-weight="normal">%%STRING%%</fo:inline>',"@font-weight/light":'<fo:inline font-weight="lighter">%%STRING%%</fo:inline>',"@text-decoration/none":'<fo:inline text-decoration="none">%%STRING%%</fo:inline>',"@text-decoration/underline":'<fo:inline text-decoration="underline">%%STRING%%</fo:inline>',"@vertical-align/sup":'<fo:inline vertical-align="super">%%STRING%%</fo:inline>',"@vertical-align/sub":'<fo:inline vertical-align="sub">%%STRING%%</fo:inline>',"@vertical-align/baseline":'<fo:inline vertical-align="baseline">%%STRING%%</fo:inline>',"@strip-periods/true":h.Output.Formatters.passthrough,"@strip-periods/false":h.Output.Formatters.passthrough,"@quotes/true":function(t,e){return void 0===e?t.getTerm("open-quote"):t.getTerm("open-quote")+e+t.getTerm("close-quote")},"@quotes/inner":function(t,e){return void 0===e?"â":t.getTerm("open-inner-quote")+e+t.getTerm("close-inner-quote")},"@quotes/false":!1,"@cite/entry":function(t,e){return t.sys.wrapCitationEntry(e,this.item_id,this.locator_txt,this.suffix_txt)},"@bibliography/entry":function(t,e){var i="";if(t.bibliography&&t.bibliography.opt&&t.bibliography.opt.hangingindent){var s=t.bibliography.opt.hangingindent;i=' start-indent="'+s+'em" text-indent="-'+s+'em"'}var r="";return t.sys.embedBibliographyEntry&&(r=t.sys.embedBibliographyEntry(this.item_id)+"\n"),'<fo:block id="'+this.system_id+'"'+i+">"+e+"</fo:block>\n"+r},"@display/block":function(t,e){return"\n <fo:block>"+e+"</fo:block>\n"},"@display/left-margin":function(t,e){return'\n <fo:table table-layout="fixed" width="100%">\n <fo:table-column column-number="1" column-width="$$$__COLUMN_WIDTH_1__$$$"/>\n <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>\n <fo:table-body>\n <fo:table-row>\n <fo:table-cell>\n <fo:block>'+e+"</fo:block>\n </fo:table-cell>\n "},"@display/right-inline":function(t,e){return"<fo:table-cell>\n <fo:block>"+e+"</fo:block>\n </fo:table-cell>\n </fo:table-row>\n </fo:table-body>\n </fo:table>\n"},"@display/indent":function(t,e){return'<fo:block margin-left="2em">'+e+"</fo:block>\n"},"@showid/true":function(t,e){if(t.tmp.just_looking||t.tmp.suppress_decorations||!this.params||"string"!=typeof e)return e;var i="";if(e){var s=e.match(h.VARIABLE_WRAPPER_PREPUNCT_REX);i=s[1],e=s[2]}var r="";return e&&h.SWAPPING_PUNCTUATION.indexOf(e.slice(-1))>-1&&(r=e.slice(-1),e=e.slice(0,-1)),t.sys.variableWrapper(this.params,i,e,r)},"@URL/true":function(t,e){return"<fo:basic-link external-destination=\"url('"+e+"')\">"+e+"</fo:basic-link>"},"@DOI/true":function(t,e){var i=e;return e.match(/^https?:\/\//)||(i="https://doi.org/"+e),"<fo:basic-link external-destination=\"url('"+i+"')\">"+e+"</fo:basic-link>"}},h.Output.Formats.prototype.latex={text_escape:function(t){return t||(t=""),t},bibstart:"\\begin{thebibliography}{4}",bibend:"\\end{thebibliography}","@font-style/italic":"{\\em %%STRING%%}","@font-style/oblique":!1,"@font-style/normal":!1,"@font-variant/small-caps":!1,"@passthrough/true":h.Output.Formatters.passthrough,"@font-variant/normal":!1,"@font-weight/bold":"{\\bf %%STRING%%}","@font-weight/normal":!1,"@font-weight/light":!1,"@text-decoration/none":!1,"@text-decoration/underline":!1,"@vertical-align/baseline":!1,"@vertical-align/sup":!1,"@vertical-align/sub":!1,"@strip-periods/true":h.Output.Formatters.passthrough,"@strip-periods/false":h.Output.Formatters.passthrough,"@quotes/true":function(t,e){return void 0===e?t.getTerm("open-quote"):t.getTerm("open-quote")+e+t.getTerm("close-quote")},"@quotes/inner":function(t,e){return void 0===e?"â":t.getTerm("open-inner-quote")+e+t.getTerm("close-inner-quote")},"@quotes/false":!1,"@cite/entry":function(t,e){return t.sys.wrapCitationEntry(e,this.item_id,this.locator_txt,this.suffix_txt)},"@bibliography/entry":function(t,e){return"\\bibitem{"+t.sys.embedBibliographyEntry(this.item_id)+"}\n"},"@display/block":function(t,e){return"\n"+e},"@display/left-margin":function(t,e){return e},"@display/right-inline":function(t,e){return e},"@display/indent":function(t,e){return"\n "+e}
1,"@showid/true":function(t,e,i){return e},"@URL/true":function(t,e){return e},"@DOI/true":function(t,e){return e}},h.Output.Formats=new h.Output.Formats,h.Registry=function(t){this.debug=!1,this.state=t,this.registry={},this.reflist=[],this.refhash={},this.namereg=new h.Registry.NameReg(t),this.citationreg=new h.Registry.CitationReg(t),this.authorstrings={},this.masterMap={},this.mylist=[],this.myhash={},this.deletes=[],this.inserts=[],this.uncited={},this.refreshes={},this.akeys={},this.oldseq={},this.return_data={},this.ambigcites={},this.ambigresets={},this.sorter=new h.Registry.Comparifier(t,"bibliography_sort"),this.getSortedIds=function(){for(var t=[],e=0,i=this.reflist.length;e<i;e+=1)t.push(""+this.reflist[e].id);return t},this.getSortedRegistryItems=function(){for(var t=[],e=0,i=this.reflist.length;e<i;e+=1)t.push(this.reflist[e]);return t}},h.Registry.prototype.init=function(t,e){var i,s;if(this.oldseq={},e){this.uncited={};for(var i=0,s=t.length;i<s;i+=1)this.myhash[t[i]]||this.mylist.push(""+t[i]),this.uncited[t[i]]=!0,this.myhash[t[i]]=!0}else{for(var r in this.uncited)t.push(r);var n={};for(i=t.length-1;i>-1;i+=-1)n[t[i]]?t=t.slice(0,i).concat(t.slice(i+1)):n[t[i]]=!0;this.mylist=t,this.myhash=n}this.refreshes={},this.touched={},this.ambigsTouched={},this.ambigresets={}},h.Registry.prototype.dopurge=function(t){for(var e=this.mylist.length-1;e>-1;e+=-1)!this.citationreg.citationsByItemId||this.citationreg.citationsByItemId&&this.citationreg.citationsByItemId[this.mylist[e]]||t[this.mylist[e]]||(delete this.myhash[this.mylist[e]],delete this.uncited[this.mylist[e]],this.mylist=this.mylist.slice(0,e).concat(this.mylist.slice(e+1)));this.dodeletes(this.myhash)},h.Registry.prototype.dodeletes=function(t){var e,i,s,r,n,a,o,l;if("string"==typeof t){var e=t;(t={})[e]=!0}for(var e in this.registry)if(!t[e]){if(this.uncited[e])continue;for(a in this.namereg.delitems(e))this.refreshes[a]=!0;for(i=this.registry[e].ambig,(o=this.ambigcites[i].indexOf(e))>-1&&(n=this.ambigcites[i].slice(),this.ambigcites[i]=n.slice(0,o).concat(n.slice(o+1,n.length)),this.ambigresets[i]=this.ambigcites[i].length),r=this.ambigcites[i].length,s=0;s<r;s+=1)l=""+this.ambigcites[i][s],this.refreshes[l]=!0;if(this.registry[e].siblings){if(1==this.registry[e].siblings.length){var u=this.registry[e].siblings[0];this.registry[u].siblings&&(this.registry[u].siblings.pop(),this.registry[u].master=!0)}else if(this.registry[e].siblings.length>1){var p=[e];if(this.registry[e].master){var h=this.registry[e].siblings[0];this.registry[h].master=!0,p.push(h)}for(var c=[],m=this.registry[e].siblings.length-1;m>-1;m+=-1){var f=this.registry[e].siblings.pop();-1===p.indexOf(f)&&c.push(f)}for(var m=c.length-1;m>-1;m+=-1)this.registry[e].siblings.push(c[m])}}for(var d=this.reflist.length-1;d>-1;d--)this.reflist[d].id===e&&(this.reflist=this.reflist.slice(0,d).concat(this.reflist.slice(d+1)));delete this.registry[e],delete this.refhash[e],this.return_data.bibchange=!0}},h.Registry.prototype.doinserts=function(t){var e,i,s,r,n,a,o;"string"==typeof t&&(t=[t]);for(var a=0,o=t.length;a<o;a+=1)e=t[a],this.registry[e]||(i=this.state.retrieveItem(e),s=h.getAmbiguousCite.call(this.state,i),this.ambigsTouched[s]=!0,i.legislation_id||(this.akeys[s]=!0),r={id:""+e,seq:0,offset:0,sortkeys:!1,ambig:!1,rendered:!1,disambig:!1,ref:i,newItem:!0},this.registry[e]=r,this.citationreg.citationsByItemId&&this.citationreg.citationsByItemId[e]&&(this.registry[e]["first-reference-note-number"]=this.citationreg.citationsByItemId[e][0].properties.noteIndex),n=h.getAmbigConfig.call(this.state),this.registerAmbigToken(s,e,n),this.touched[e]=!0,this.return_data.bibchange=!0)},h.Registry.prototype.rebuildlist=function(t){var e,i,s,r;if(t)for(i=0,this.reflist=[],e=this.mylist.length;i<e;i+=1)s=this.mylist[i],r=this.registry[s],this.reflist.push(r),this.oldseq[s]=this.registry[s].seq,this.registry[s].seq=i+1;else for(i=0,this.reflist_inserts=[],e=this.mylist.length;i<e;i+=1)s=this.mylist[i],(r=this.registry[s]).newItem&&this.reflist_inserts.push(r),this.oldseq[s]=this.registry[s].seq,this.registry[s].seq=i+1},h.Registry.prototype.dorefreshes=function(){var t,e,i,s,r;for(var t in this.refreshes)if(e=this.registry[t]){e.sortkeys=void 0,i=this.state.refetchItem(t);var s=e.ambig;for(var n in void 0===s&&(this.state.tmp.disambig_settings=!1,s=h.getAmbiguousCite.call(this.state,i),r=h.getAmbigConfig.call(this.state),this.registerAmbigToken(s,t,r)),this.ambigresets)if(1===this.ambigresets[n]){var a=this.ambigcites[s][0],i=this.state.refetchItem(a);this.registry[a].disambig=new h.AmbigConfig,this.state.tmp.disambig_settings=!1;var s=h.getAmbiguousCite.call(this.state,i),r=h.getAmbigConfig.call(this.state);this.registerAmbigToken(s,a,r)}this.state.tmp.taintedItemIDs[t]=!0,this.ambigsTouched[s]=!0,i.legislation_id||(this.akeys[s]=!0),this.touched[t]=!0}},h.Registry.prototype.setdisambigs=function(){for(var t in this.ambigsTouched)this.state.disambiguate.run(t);this.ambigsTouched={},this.akeys={}},h.Registry.prototype.renumber=function(){var t,e,i;for(this.state.bibliography_sort.opt.citation_number_sort_direction===h.DESCENDING&&(this.state.bibliography_sort.tmp.citation_number_map={}),t=this.reflist.length,e=0;e<t;e+=1)(i=this.reflist[e]).seq=e+1,this.state.bibliography_sort.opt.citation_number_sort_direction===h.DESCENDING&&(this.state.bibliography_sort.tmp.citation_number_map[i.seq]=this.reflist.length-i.seq+1),this.state.opt.update_mode===h.NUMERIC&&i.seq!=this.oldseq[i.id]&&(this.state.tmp.taintedItemIDs[i.id]=!0),i.seq!=this.oldseq[i.id]&&(this.return_data.bibchange=!0)},h.Registry.prototype.setsortkeys=function(){for(var t,e=0,i=this.mylist.length;e<i;e+=1){var t=this.mylist[e];(this.touched[t]||this.state.tmp.taintedItemIDs[t]||!this.registry[t].sortkeys)&&(this.registry[t].sortkeys=h.getSortKeys.call(this.state,this.state.retrieveItem(t),"bibliography_sort"))}},h.Registry.prototype._insertItem=function(t,e){return e.splice(this._locationOf(t,e)+1,0,t),e}
1,h.Registry.prototype._locationOf=function(t,e,i,s){if(0===e.length)return -1;var r=(i=i||0)+(s=s||e.length)>>1,n=this.sorter.compareKeys(t,e[r]);if(s-i<=1)return -1==n?r-1:r;switch(n){case -1:return this._locationOf(t,e,i,r);case 0:return r;case 1:return this._locationOf(t,e,r,s)}},h.Registry.prototype.sorttokens=function(t){var e,i,s,r;if(!t){for(r=0,this.reflist_inserts=[],e=this.mylist.length;r<e;r+=1)i=this.mylist[r],(s=this.registry[i]).newItem&&this.reflist_inserts.push(s);for(var n in this.state.tmp.taintedItemIDs)if(this.registry[n]&&!this.registry[n].newItem)for(var a=this.reflist.length-1;a>-1;a--)this.reflist[a].id===n&&(this.reflist_inserts.push(this.reflist[a]),this.reflist=this.reflist.slice(0,a).concat(this.reflist.slice(a+1)));for(var a=0,o=this.reflist_inserts.length;a<o;a++){var s=this.reflist_inserts[a];delete s.newItem,this.reflist=this._insertItem(s,this.reflist)}for(r=0;r<e;r+=1)i=this.mylist[r],s=this.registry[i],this.registry[i].seq=r+1}},h.Registry.Comparifier=function(t,e){var i,s,r,n,a=h.getSortCompare.call(t,t.opt["default-locale-sort"]);i=t[e].opt.sort_directions,this.compareKeys=function(t,e){for(r=0,s=t.sortkeys?t.sortkeys.length:0;r<s;r+=1){var n=0;if(0<(n=t.sortkeys[r]===e.sortkeys[r]?0:void 0===t.sortkeys[r]?i[r][1]:void 0===e.sortkeys[r]?i[r][0]:a(t.sortkeys[r],e.sortkeys[r])))return i[r][1];if(0>n)return i[r][0]}return t.seq>e.seq?1:t.seq<e.seq?-1:0},n=this.compareKeys,this.compareCompositeKeys=function(t,e){return n(t[1],e[1])}},h.Registry.prototype.compareRegistryTokens=function(t,e){return t.seq>e.seq?1:t.seq<e.seq?-1:0},h.Registry.prototype.registerAmbigToken=function(t,e,i){if(this.registry[e]||h.debug("Warning: unregistered item: itemID=("+e+"), akey=("+t+")"),this.registry[e]&&this.registry[e].disambig&&this.registry[e].disambig.names){for(var s=0,r=i.names.length;s<r;s+=1)if(i.names[s]!==this.registry[e].disambig.names[s])this.state.tmp.taintedItemIDs[e]=!0;else if(i.givens[s])for(var n=0,a=i.givens[s].length;n<a;n+=1)i.givens[s][n]!==this.registry[e].disambig.givens[s][n]&&(this.state.tmp.taintedItemIDs[e]=!0)}this.ambigcites[t]||(this.ambigcites[t]=[]),-1===this.ambigcites[t].indexOf(""+e)&&this.ambigcites[t].push(""+e),this.registry[e].ambig=t,this.registry[e].disambig=h.cloneAmbigConfig(i)},h.getSortKeys=function(t,e){var i,s,r,n,a,o;for(i=this.tmp.area,s=this.tmp.root,r=this.tmp.extension,n=h.Util.Sort.strip_prepositions,this.tmp.area=e,this.tmp.root=e.indexOf("_")>-1?e.slice(0,-5):e,this.tmp.extension="_sort",this.tmp.disambig_override=!0,this.tmp.disambig_request=!1,this.tmp.suppress_decorations=!0,h.getCite.call(this,t),this.tmp.suppress_decorations=!1,this.tmp.disambig_override=!1,a=this[e].keys.length,o=0;o<a;o+=1)this[e].keys[o]=n(this[e].keys[o]);return this.tmp.area=i,this.tmp.root=s,this.tmp.extension=r,this[e].keys},h.Registry.NameReg=function(t){var e,i,s,r,n,a,o,l,u,p,c,m;this.state=t,this.namereg={},this.nameind={},this.nameindpkeys={},this.itemkeyreg={},o=function(t){return t||(t=""),t.replace(/\./g," ").replace(/\s+/g," ").replace(/\s+$/,"")},l=function(t,r,n){e=o(n.family),"never"===t.opt["demote-non-dropping-particle"]&&n["non-dropping-particle"]&&n.family&&(e=`${e} ${n["non-dropping-particle"]}`);var a=(s=o(n.given)).match(/[,\!]* ([^,]+)$/);a&&a[1]===a[1].toLowerCase()&&(s=s.replace(/[,\!]* [^,]+$/,"")),i=h.Util.Names.initializeWith(t,s,"%s"),"by-cite"===t.citation.opt["givenname-disambiguation-rule"]&&(e=""+r+e)},u=function(s,a,o,u,p,h){if("bibliography"===t.tmp.area.slice(0,12)&&!p)return"string"==typeof h?1:2;a=t.nameOutput.getName(a,"locale-translit",!0).name,l(this.state,""+s,a),c=2,r=t.opt["disambiguate-add-givenname"];var c,m=n=t.citation.opt["givenname-disambiguation-rule"];return("by-cite"===n&&(n="all-names"),"short"===p?c=0:"string"==typeof h&&(c=1),void 0===this.namereg[e]||void 0===this.namereg[e].ikey[i])?c:"by-cite"===m&&c<=u?u:!r||"string"==typeof n&&"primary-name"===n.slice(0,12)&&o>0||(n&&"all-names"!==n&&"primary-name"!==n?("all-names-with-initials"===n||"primary-name-with-initials"===n)&&(c=this.namereg[e].count>1?1:0):(this.namereg[e].count>1&&(c=1),(this.namereg[e].ikey&&this.namereg[e].ikey[i].count>1||this.namereg[e].count>1&&"string"!=typeof h)&&(c=2)),t.registry.registry[s])?c:"short"==p?0:"string"==typeof h?1:void 0},p=function(r){var n,o,l,u,p;for(("string"==typeof r||"number"==typeof r)&&(r=[""+r]),o=r.length,n=0;n<o;n+=1)if(u=""+r[n],this.nameind[u]){for(p in this.nameind[u])if(this.nameind[u].hasOwnProperty(p)){var h=p.split("::");if(e=h[0],i=h[1],s=h[2],void 0===this.namereg[e])continue;if(a=this.namereg[e].items,s&&this.namereg[e].ikey[i]&&this.namereg[e].ikey[i].skey[s]&&((l=(m=this.namereg[e].ikey[i].skey[s].items).indexOf(""+u))>-1&&(this.namereg[e].ikey[i].skey[s].items=m.slice(0,l).concat(m.slice([l+1]))),0===this.namereg[e].ikey[i].skey[s].items.length&&(delete this.namereg[e].ikey[i].skey[s],this.namereg[e].ikey[i].count+=-1,this.namereg[e].ikey[i].count<2)))for(var c=0,f=this.namereg[e].ikey[i].items.length;c<f;c+=1)t.tmp.taintedItemIDs[this.namereg[e].ikey[i].items[c]]=!0;if(i&&this.namereg[e].ikey[i]&&((l=this.namereg[e].ikey[i].items.indexOf(""+u))>-1&&(a=this.namereg[e].ikey[i].items.slice(),this.namereg[e].ikey[i].items=a.slice(0,l).concat(a.slice([l+1]))),0===this.namereg[e].ikey[i].items.length&&(delete this.namereg[e].ikey[i],this.namereg[e].count+=-1,this.namereg[e].count<2)))for(var c=0,f=this.namereg[e].items.length;c<f;c+=1)t.tmp.taintedItemIDs[this.namereg[e].items[c]]=!0;e&&((l=this.namereg[e].items.indexOf(""+u))>-1&&(a=this.namereg[e].items.slice(),this.namereg[e].items=a.slice(0,l).concat(a.slice([l+1],a.length))),this.namereg[e].items.length<2&&delete this.namereg[e]),delete this.nameind[u][p]}delete this.nameind[u],delete this.nameindpkeys[u]}return{}},c=function(r,n,a){var o,u;if(n=t.nameOutput.getName(n,"locale-translit",!0).name,!t.citation.opt["givenname-disambiguation-rule"]||"primary-"!==t.citation.opt["givenname-disambiguation-rule"].slice(0,8)||0===a){if(l(this.state,""+r,n),e&&(void 0===this.namereg[e]?(this.namereg[e]={},this.namereg[e].count=0,this.namereg[e].ikey={},this.namereg[e].items=[r]):-1===this.namereg[e].items.indexOf(r)&&this.namereg[e].items.push(r)),e&&i){if(void 0===this.namereg[e].ikey[i]){if(this.namereg[e].ikey[i]={},this.namereg[e].ikey[i].count=0,this.namereg[e].ikey[i].skey={},this.namereg[e].ikey[i].items=[r],this.namereg[e].count+=1,2===this.namereg[e].count)for(var o=0,u=this.namereg[e].items.length;o<u;o+=1)t.tmp.taintedItemIDs[this.namereg[e].items[o]]=!0}else -1===this.namereg[e].ikey[i].items.indexOf(r)&&this.namereg[e].ikey[i].items.push(r)}if(e&&i&&s){if(void 0===this.namereg[e].ikey[i].skey[s]){if(this.namereg[e].ikey[i].skey[s]={},this.namereg[e].ikey[i].skey[s].items=[r],this.namereg[e].ikey[i].count+=1,2===this.namereg[e].ikey[i].count)for(var o=0,u=this.namereg[e].ikey[i].items.length;o<u;o+=1)t.tmp.taintedItemIDs[this.namereg[e].ikey[i].items[o]]=!0}else -1===this.namereg[e].ikey[i].skey[s].items.indexOf(r)&&this.namereg[e].ikey[i].skey[s].items.push(r)}void 0===this.nameind[r]&&(this.nameind[r]={},this.nameindpkeys[r]={}),e&&(this.nameind[r][e+"::"+i+"::"+s]=!0,this.nameindpkeys[r][e]=this.namereg[e])}},this.addname=c,this.delitems=p,this.evalname=u},h.Registry.CitationReg=function(){this.citationById={},this.citationByIndex=[]},h.Disambiguation=function(t){this.state=t,this.sys=this.state.sys,this.registry=t.registry.registry,this.ambigcites=t.registry.ambigcites,this.configModes(),this.debug=!1},h.Disambiguation.prototype.run=function(t){this.modes.length&&(this.debug&&this.state.sys.print("[A] === RUN ==="),this.akey=t,this.initVars(t)&&this.runDisambig())},h.Disambiguation.prototype.runDisambig=function(){var t;for(this.debug&&this.state.sys.print("[C] === runDisambig() ==="),this.initGivens=!0;this.lists.length;
1){for(this.gnameset=0,this.gname=0,this.clashes=[1,0];this.lists[0][1].length;)this.listpos=0,this.base||(this.base=this.lists[0][0]),t=this.incrementDisambig(),this.scanItems(this.lists[0]),this.evalScan(t);this.lists=this.lists.slice(1)}},h.Disambiguation.prototype.scanItems=function(t){this.debug&&this.state.sys.print("[2] === scanItems() ==="),this.Item=t[1][0],this.ItemCite=h.getAmbiguousCite.call(this.state,this.Item,this.base,!0),this.scanlist=t[1],this.partners=[],this.partners.push(this.Item),this.nonpartners=[];for(var e,i,s,r=0,e=1,i=t[1].length;e<i;e+=1){s=t[1][e];var n=h.getAmbiguousCite.call(this.state,s,this.base,!0);this.debug&&e>1&&this.state.sys.print(" -----------"),this.ItemCite===n?(this.debug&&(this.state.sys.print(" [CLASH]--> "+this.Item.id+": "+this.ItemCite),this.state.sys.print(" "+s.id+": "+n)),r+=1,this.partners.push(s)):(this.debug&&(this.state.sys.print(" [clear]--> "+this.Item.id+": "+this.ItemCite),this.state.sys.print(" "+s.id+": "+n)),this.nonpartners.push(s))}this.clashes[0]=this.clashes[1],this.clashes[1]=r},h.Disambiguation.prototype.evalScan=function(t){this[this.modes[this.modeindex]](t),t&&(this.modeindex<this.modes.length-1?this.modeindex+=1:this.lists[this.listpos+1]=[this.base,[]])},h.Disambiguation.prototype.disNames=function(t){var e,i;if(this.debug&&this.state.sys.print("[3] == disNames() =="),0===this.clashes[1]&&1===this.nonpartners.length)this.captureStepToBase(),this.debug&&(this.state.sys.print(" ** RESOLUTION [a]: lone partner, one nonpartner"),this.state.sys.print(" registering "+this.partners[0].id+" and "+this.nonpartners[0].id)),this.state.registry.registerAmbigToken(this.akey,""+this.nonpartners[0].id,this.betterbase),this.state.registry.registerAmbigToken(this.akey,""+this.partners[0].id,this.betterbase),this.lists[this.listpos]=[this.betterbase,[]];else if(0===this.clashes[1])this.captureStepToBase(),this.debug&&(this.state.sys.print(" ** RESOLUTION [b]: lone partner, unknown number of remaining nonpartners"),this.state.sys.print(" registering "+this.partners[0].id)),this.state.registry.registerAmbigToken(this.akey,""+this.partners[0].id,this.betterbase),this.lists[this.listpos]=[this.betterbase,this.nonpartners],this.nonpartners.length&&(this.initGivens=!0);else if(1===this.nonpartners.length)this.captureStepToBase(),this.debug&&(this.state.sys.print(" ** RESOLUTION [c]: lone nonpartner, unknown number of partners remaining"),this.state.sys.print(" registering "+this.nonpartners[0].id)),this.state.registry.registerAmbigToken(this.akey,""+this.nonpartners[0].id,this.betterbase),this.lists[this.listpos]=[this.betterbase,this.partners];else if(this.clashes[1]<this.clashes[0])this.captureStepToBase(),this.debug&&this.state.sys.print(" ** RESOLUTION [d]: better result, but no entries safe to register"),this.lists[this.listpos]=[this.betterbase,this.partners],this.lists.push([this.betterbase,this.nonpartners]);else if(this.debug&&this.state.sys.print(" ** RESOLUTION [e]: no improvement, and clashes remain"),t&&(this.lists[this.listpos]=[this.betterbase,this.nonpartners],this.lists.push([this.betterbase,this.partners]),this.modeindex===this.modes.length-1)){this.debug&&this.state.sys.print(" (registering clashing entr
1ies because we've run out of options)");for(var e=0,i=this.partners.length;e<i;e+=1)this.state.registry.registerAmbigToken(this.akey,""+this.partners[e].id,this.betterbase);this.lists[this.listpos]=[this.betterbase,[]]}},h.Disambiguation.prototype.disExtraText=function(){this.debug&&this.state.sys.print("[3] === disExtraText ==");var t=!1;if(0===this.clashes[1]&&this.nonpartners.length<2&&(t=!0),t||this.base.disambiguate&&this.state.tmp.disambiguate_count===this.state.tmp.disambiguate_maxMax){if(t||this.state.tmp.disambiguate_count===this.state.tmp.disambiguate_maxMax){if(t||this.modeindex===this.modes.length-1){for(var e=this.lists[this.listpos][0],i=0,s=this.lists[this.listpos][1].length;i<s;i+=1)this.state.tmp.taintedItemIDs[this.lists[this.listpos][1][i].id]=!0,this.state.registry.registerAmbigToken(this.akey,""+this.lists[this.listpos][1][i].id,e);this.lists[this.listpos]=[this.betterbase,[]]}else{this.modeindex=this.modes.length-1;var e=this.lists[this.listpos][0];e.disambiguate=!0;for(var i=0,s=this.lists[this.listpos][1].length;i<s;i+=1)this.state.tmp.taintedItemIDs[this.lists[this.listpos][1][i].id]=!0,this.state.registry.registerAmbigToken(this.akey,""+this.lists[this.listpos][1][i].id,e)}}}else if(this.modeindex=0,this.base.disambiguate=this.state.tmp.disambiguate_count,this.betterbase.disambiguate=this.state.tmp.disambiguate_count,this.base.disambiguate)this.disNames();else{this.initGivens=!0,this.base.disambiguate=1;for(var i=0,s=this.lists[this.listpos][1].length;i<s;i+=1)this.state.tmp.taintedItemIDs[this.lists[this.listpos][1][i].id]=!0}},h.Disambiguation.prototype.disYears=function(){this.debug&&this.state.sys.print("[3] === disYears =="),i=[];var t,e,i,s,r=this.lists[this.listpos][0];if(this.clashes[1])for(var n=0,a=this.state.registry.mylist.length;n<a;n+=1)for(var o=this.state.registry.mylist[n],l=0,u=this.lists[this.listpos][1].length;l<u;l+=1){var s=this.lists[this.listpos][1][l];if(s.id==o){i.push(this.registry[s.id]);break}}i.sort(this.state.registry.sorter.compareKeys);for(var t=0,e=i.length;t<e;t+=1){r.year_suffix=""+t;var p=this.state.registry.registry[i[t].id].disambig;this.state.registry.registerAmbigToken(this.akey,""+i[t].id,r),h.ambigConfigDiff(p,r)&&(this.state.tmp.taintedItemIDs[i[t].id]=!0)}this.lists[this.listpos]=[this.betterbase,[]]},h.Disambiguation.prototype.incrementDisambig=function(){if(this.debug&&this.state.sys.print("\n[1] === incrementDisambig() ==="),this.initGivens)return this.initGivens=!1,!1;var t=!1,e=!0;if("disNames"===this.modes[this.modeindex]){e=!1,"number"!=typeof this.givensMax&&(e=!0);var i=!1;"number"!=typeof this.namesMax&&(i=!0),"number"==typeof this.givensMax&&(this.base.givens.length&&this.base.givens[this.gnameset][this.gname]<this.givensMax?this.base.givens[this.gnameset][this.gname]+=1:e=!0),"number"==typeof this.namesMax&&e&&(this.state.opt["disambiguate-add-names"]?(i=!1,this.gname<this.namesMax?(this.base.names[this.gnameset]+=1,this.gname+=1):i=!0):i=!0),"number"==typeof this.namesetsMax&&i&&this.gnameset<this.namesetsMax&&(this.gnameset+=1,this.base.names[this.gnameset]=1,this.gname=0),this.debug&&(this.state.sys.print(" ------------------"),this.state.sys.print(" incremented values"),this.state.sys.print(" ------------------"),this.state.sys.print(" | gnameset: "+this.gnameset),this.state.sys.print(" | gname: "+this.gname),this.state.sys.print(" | names value: "+this.base.names[this.gnameset]),this.base.givens.length?this.state.sys.print(" | givens value: "+this.base.givens[this.gnameset][this.gname]):this.state.sys.print(" | givens value: nil"),this.state.sys.print(" | namesetsMax: "+this.namesetsMax),this.state.sys.print(" | namesMax: "+this.namesMax),this.state.sys.print(" | givensMax: "+this.givensMax)),("number"!=typeof this.namesetsMax||-1===this.namesetsMax||this.gnameset===this.namesetsMax)&&(!this.state.opt["disambiguate-add-names"]||"number"!=typeof this.namesMax||this.gname===this.namesMax)&&("number"!=typeof this.givensMax||void 0===this.base.givens[this.gnameset]||void 0===this.base.givens[this.gnameset][this.gname]||this.base.givens[this.gnameset][this.gname]===this.givensMax)&&(t=!0,this.debug&&this.state.sys.print(" MAXED"))}else"disExtraText"===this.modes[this.modeindex]&&(this.base.disambiguate+=1,this.betterbase.disambiguate+=1);return t},h.Disambiguation.prototype.initVars=function(t){if(this.debug&&this.state.sys.print("[B] === initV
1ars() ==="),this.lists=[],this.base=!1,this.betterbase=!1,this.akey=t,this.maxNamesByItemId={},i=[],!(e=this.ambigcites[t])||!e.length)return!1;var e,i,s,r,n,a=this.state.refetchItem(""+e[0]);if(this.getCiteData(a),this.base=h.getAmbigConfig.call(this.state),e&&e.length>1){i.push([this.maxNamesByItemId[a.id],a]);for(var r=1,n=e.length;r<n;r+=1)a=this.state.refetchItem(""+e[r]),this.getCiteData(a,this.base),i.push([this.maxNamesByItemId[a.id],a]);i.sort(function(t,e){return t[0]>e[0]?1:t[0]<e[0]?-1:t[1].id>e[1].id?1:t[1].id<e[1].id?-1:0}),s=[];for(var r=0,n=i.length;r<n;r+=1)s.push(i[r][1]);this.lists.push([this.base,s]),this.Item=this.lists[0][1][0]}else this.Item=this.state.refetchItem(""+e[0]);return this.modeindex=0,this.state.citation.opt["disambiguate-add-names"],this.namesMax=this.maxNamesByItemId[this.Item.id][0],this.padBase(this.base),this.padBase(this.betterbase),this.base.year_suffix=!1,this.base.disambiguate=!1,this.betterbase.year_suffix=!1,this.betterbase.disambiguate=!1,"by-cite"===this.state.citation.opt["givenname-disambiguation-rule"]&&this.state.opt["disambiguate-add-givenname"]&&(this.givensMax=2),!0},h.Disambiguation.prototype.padBase=function(t){for(var e=0,i=t.names.length;e<i;e+=1){t.givens[e]||(t.givens[e]=[]);for(var s=0,r=t.names[e];s<r;s+=1)t.givens[e][s]||(t.givens[e][s]=0)}},h.Disambiguation.prototype.configModes=function(){var t,e;this.modes=[],t=this.state.opt["disambiguate-add-givenname"],e=this.state.citation.opt["givenname-disambiguation-rule"],(this.state.opt["disambiguate-add-names"]||t&&"by-cite"===e)&&this.modes.push("disNames"),this.state.opt.development_extensions.prioritize_disambiguate_condition?(this.state.opt.has_disambiguate&&this.modes.push("disExtraText"),this.state.opt["disambiguate-add-year-suffix"]&&this.modes.push("disYears")):(this.state.opt["disambiguate-add-year-suffix"]&&this.modes.push("disYears"),this.state.opt.has_disambiguate&&this.modes.push("disExtraText"))},h.Disambiguation.prototype.getCiteData=function(t,e){if(!this.maxNamesByItemId[t.id]){h.getAmbiguousCite.call(this.state,t,e),e=h.getAmbigConfig.call(this.state),this.maxNamesByItemId[t.id]=h.getMaxVals.call(this.state),this.state.registry.registry[t.id].disambig.givens=this.state.tmp.disambig_settings.givens.slice();for(var i=0,s=this.state.registry.registry[t.id].disambig.givens.length;i<s;i+=1)this.state.registry.registry[t.id].disambig.givens[i]=this.state.tmp.disambig_settings.givens[i].slice();this.namesetsMax=this.state.registry.registry[t.id].disambig.names.length-1,this.base||(this.base=e,this.betterbase=h.cloneAmbigConfig(e)),e.names.length<this.base.names.length&&(this.base=e);for(var i=0,s=e.names.length;i<s;i+=1)e.names[i]>this.base.names[i]&&(this.base.givens[i]=e.givens[i].slice(),this.base.names[i]=e.names[i],this.betterbase.names=this.base.names.slice(),this.betterbase.givens=this.base.givens.slice(),this.padBase(this.base),this.padBase(this.betterbase));this.betterbase.givens=this.base.givens.slice();for(var r=0,n=this.base.givens.length;r<n;r+=1)this.betterbase.givens[r]=this.base.givens[r].slice()}},h.Disambiguation.prototype.captureStepToBase=function(){"by-cite"===this.state.citation.opt["givenname-disambiguation-rule"]&&this.base.givens&&this.base.givens.length&&void 0!==this.base.givens[this.gnameset][this.gname]&&(this.betterbase.givens.length<this.base.givens.length&&(this.betterbase.givens=JSON.parse(JSON.stringify(this.base.givens))),this.betterbase.givens[this.gnameset][this.gname]=this.base.givens[this.gnameset][this.gname]),this.betterbase.names[this.gnameset]=this.base.names[this.gnameset]},h.Engine.prototype.getJurisdictionList=function(t){for(var e=[],i=t.split(":"),s=i.length;s>0;s--){var r=i.slice(0,s).join(":");if(e.push(r),this.opt.jurisdiction_fallbacks[r]){var n=this.opt.jurisdiction_fallbacks[r];e.push(n)}}return -1===e.indexOf("us")&&e.push("us"),e},h.Engine.prototype.loadStyleModule=function(t,e,i){var s=null;this.juris[t]={};var r=h.setupXml(e);r.addMissingNameNodes(r.dataObj),r.addInstitutionNodes(r.dataObj),r.insertPublisherAndPlace(r.dataObj),r.flagDateMacros(r.dataObj);for(var n=r.getNodesByName(r.dataObj,"law-module"),a=0,o=n.length;a<o;a++){var l=r.getAttributeValue(n[a],"types");if(l){this.juris[t].types={},l=l.split(/\s+/);for(var u=0,p=l.length;u<p;u++)this.juris[t].types[l[u]]=!0}!i&&(s=r.getAttributeValue(n[a],"fallback"))&&"us"!==t&&(this.opt.jurisdiction_fallbacks[t]=s)}var c=this.opt.lang?this.opt.lang:this.opt["default-locale"][0];
1h.SET_COURT_CLASSES(this,c,r,r.dataObj),this.juris[t].types||(this.juris[t].types=h.MODULE_TYPES);for(var n=r.getNodesByName(r.dataObj,"macro"),a=0,o=n.length;a<o;a++){var m=r.getAttributeValue(n[a],"name");if(!h.MODULE_MACROS[m]){h.debug('CSL: skipping non-modular macro name "'+m+'" in module context');continue}this.juris[t][m]=[],this.buildTokenLists(n[a],this.juris[t][m]),this.configureTokenList(this.juris[t][m])}return s},h.Engine.prototype.retrieveAllStyleModules=function(t){var e={},i=this.locale[this.opt.lang].opts["jurisdiction-preference"];i=[""].concat(i=i||[]);for(var s=i.length-1;s>-1;s--)for(var r=i[s],n=0,a=t.length;n<a;n++){var o=t[n];if(!this.opt.jurisdictions_seen[o]){var l=this.sys.retrieveStyleModule(o,r);(l||r)&&!l||(this.opt.jurisdictions_seen[o]=!0),l&&(e[o]=l)}}return e},h.ParticleList=[["'s",s=[[null,[0,1]]]],["'s-",s],["'t",s],["a",s],["aan 't",r=[[null,[0,2]]]],["aan de",r],["aan den",r],["aan der",r],["aan het",r],["aan t",r],["aan",s],["ad-",a=[[null,[0,1]],[[0,1],null]]],["adh-",a],["af",a],["al",a],["al-",a],["am de",r],["am",s],["an-",a],["ar-",a],["as-",a],["ash-",a],["at-",a],["ath-",a],["auf dem",u=[[[0,2],null],[null,[0,2]]]],["auf den",u],["auf der",u],["auf ter",r],["auf",l=[[[0,1],null],[null,[0,1]]]],["aus 'm",u],["aus dem",u],["aus den",u],["aus der",u],["aus m",u],["aus",l],["aus'm",u],["az-",a],["aÅ¡-",a],["aá¸-",a],["aá¸-",a],["aá¹£-",a],["aá¹-",a],["aṯ-",a],["aáº-",a],["ben",s],["bij 't",r],["bij de",r],["bij den",r],["bij het",r],["bij t",r],["bij",s],["bin",s],["boven d",r],["boven d'",r],["d",s],["d'",a],["da",a],["dal",s],["dal'",s],["dall'",s],["dalla",s],["das",a],["de die le",n=[[null,[0,3]]]],["de die",r],["de l",r],["de l'",r],["de la",p=[[null,[0,2]],[[0,1],[1,2]]]],["de las",p],["de le",r],["de li",o=[[null,[0,2]],[[0,2],null]]],["de van der",n],["de",a],["de'",a],["deca",s],["degli",a],["dei",a],["del",a],["dela",i=[[[0,1],null]]],["dell'",a],["della",a],["delle",a],["dello",a],["den",a],["der",a],["des",a],["di",a],["die le",r],["do",s],["don",s],["dos",a],["du",a],["ed-",a],["edh-",a],["el",a],["el-",a],["en-",a],["er-",a],["es-",a],["esh-",a],["et-",a],["eth-",a],["ez-",a],["eÅ¡-",a],["eá¸-",a],["eá¸-",a],["eá¹£-",a],["eá¹-",a],["eṯ-",a],["eáº-",a],["het",s],["i",s],["il",i],["im",s],["in 't",r],["in de",r],["in den",r],["in der",o],["in het",r],["in t",r],["in",s],["l",s],["l'",s],["la",s],["las",s],["le",s],["les",a],["lo",a],["los",s],["lou",s],["of",s],["onder 't",r],["onder de",r],["onder den",r],["onder het",r],["onder t",r],["onder",s],["op 't",r],["op de",o],["op den",r],["op der",r],["op gen",r],["op het",r],["op t",r],["op ten",r],["op",s],["over 't",r],["over de",r],["over den",r],["over het",r],["over t",r],["over",s],["s",s],["s'",s],["sen",i],["t",s],["te",s],["ten",s],["ter",s],["tho",s],["thoe",s],["thor",s],["to",s],["toe",s],["tot",s],["uijt 't",r],["uijt de",r],["uijt den",r],["uijt te de",n],["uijt ten",r],["uijt",s],["uit 't",r],["uit de",r],["uit den",r],["uit het",r],["uit t",r],["uit te de",n],["uit ten",r],["uit",s],["unter",s],["v",s],["v.",s],["v.d.",s],["van 't",r],["van de l",n],["van de l'",n],["van de",r],["van de",r],["van den",r],["van der",r],["van gen",r],["van het",r],["van la",r],["van t",r],["van ter",r],["van van de",n],["van",a],["vander",s],["vd",s],["ver",s],["vom und zum",[[[0,3],null]]],["vom",a],["von 't",r],["von dem",u],["von den",u],["von der",u],["von t",r],["von und zu",[[[0,3],null],[null,[0,3]]]],["von zu",u],["von",l],["voor 't",r],["voor de",r],["voor den",r],["voor in 't",n],["voor in t",n],["voor",s],["vor der",u],["vor",l],["z",i],["ze",i],["zu",l],["zum",a],["zur",a]],h.parseParticles=function(){function t(t,e,i){var s,r,n=t;t=i?t.toLowerCase():t;var a=[];e?(t=t.split("").reverse().join(""),s=h.PARTICLE_GIVEN_REGEXP):s=h.PARTICLE_FAMILY_REGEXP;for(var o=t.match(s);o;){var l=e?o[1].split("").reverse().join(""):o[1],u=!!o&&l,u=!!u&&l.replace(/^[-\'\u02bb\u2019\s]*(.).*$/,"$1");if(!(r=!!u&&u.toUpperCase()!==u))break;e?(a.push(n.slice(-1*l.length)),n=n.slice(0,-1*l.length)):(a.push(n.slice(0,l.length)),n=n.slice(l.length)),o=(t=o[2]).match(s)}if(e){t=t.split("").reverse().join(""),a.reverse();for(var p=1,c=a.length;p<c;p++)" "==a[p].slice(0,1)&&(a[p-1]+=" ");for(var p=0,c=a.length;p<c;p++)" "==a[p].slice(0,1)&&(a[p]=a[p].slice(1));t=n.slice(0,t.length)}else t=n.slice(-1*t.length);return[r,t,a]}return function(e){var i,s,r=t(e.family),n=r[1],a=r[2];e.family=n;var o=(s=(i=a.join("")).slice(-1),i=i.trim()," "===s&&["'","â"].indexOf(i.slice(-1))>-1&&(i+=" "),i);o&&(e["non-dropping-particle"]=o),function(t){if(!t.suffix&&t.given){var e=t.given.match(/(\s*,!*\s*)/);if(e){var i=t.given.indexOf(e[1]),s=t.given.slice(i+e[1].length),r=t.given.slice(i,i+e[1].length).replace(/\s*/g,"");"et al"!==s.replace(/\./g,"")||t["dropping-particle"]?(2===r.length&&(t["comma-suffix"]=!0),t.suffix=s):(t["dropping-particle"]=s,t["comma-dropping-particle"]=","),t.given=t.given.slice(0,i)}}}(e);var r=t(e.given,!0),l=r[1],u=r[2];e.given=l;var p=u.join("").trim();p&&(e["dropping-particle"]=p)}}(),t.exports=h}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.