3 lines
188 KiB
JavaScript
3 lines
188 KiB
JavaScript
import{parse as e,format as t}from"@citation-js/name";import{parse as r,format as i}from"@citation-js/date";import o from"citeproc";import a from"js-yaml";var n={__proto__:null,currentVersion:function(){return this.log.length},retrieveVersion:function(e=1){if(e<=0||e>this.currentVersion())return null;{const[t,r]=this.log[e-1],i=new this.constructor(JSON.parse(t),JSON.parse(r));return i.log=this.log.slice(0,e),i}},retrieveLastVersion:function(){return this.retrieveVersion(this.currentVersion())},undo:function(e=1){return this.retrieveVersion(this.currentVersion()-e)},save:function(){return this.log.push([JSON.stringify(this.data),JSON.stringify(this._options)]),this}};const s=["real","string"],l=["json","html","string","rtf"],c=["csl","bibtex","bibtxt","citation-*","ris","ndjson"],m=["string","function"];function u(e){if("object"!=typeof e)throw new TypeError("Options not an object!");const{format:t,type:r,style:i,lang:o,append:a,prepend:n}=e;if(t&&!s.includes(t))throw new TypeError(`Option format ("${t}") should be one of: ${s}`);if(r&&!l.includes(r))throw new TypeError(`Option type ("${r}") should be one of: ${l}`);if(i&&!c.includes(i)&&!/^citation/.test(i))throw new TypeError(`Option style ("${i}") should be one of: ${c}`);if(o&&"string"!=typeof o)throw new TypeError("Option lang should be a string, but is a "+typeof o);if(n&&!m.includes(typeof n))throw new TypeError("Option prepend should be a string or a function, but is a "+typeof n);if(a&&!m.includes(typeof a))throw new TypeError("Option append should be a string or a function, but is a "+typeof a);if(/^citation/.test(i)&&"json"===r)throw new Error(`Combination type/style of json/citation-* is not valid: ${r}/${i}`);return!0}var p={__proto__:null,options:function(e,t){return u(e),t&&this.save(),Object.assign(this._options,e),this},defaultOptions:{format:"real",type:"json",style:"csl",lang:"en-US"}};function h(e){switch(e){case void 0:return"Undefined";case null:return"Null";default:return e.constructor.name}}function f(e){switch(typeof e){case"string":return"String";case"object":if(Array.isArray(e))return"Array";if("Object"===h(e))return"SimpleObject";if("Null"!==h(e))return"ComplexObject";default:return"Primitive"}}var d={__proto__:null,typeOf:h,dataTypeOf:f};function g(e,t){if(e._graph){const r=t.findIndex(({type:e})=>"@else/list+object"===e);-1!==r&&t.splice(r+1,0,...e._graph.slice(0,-1))}return e._graph=t,e}function b(e){return delete e._graph,e}var y={__proto__:null,applyGraph:g,removeGraph:b};const v={_output(e,t,r){this._log.push(t,r),this._levels.indexOf(e)<this._levels.indexOf(this.level)||this._console.log(t,...r)},_console:null,_log:[],_levels:["http","debug","unmapped","info","warn","error","silent"],level:"silent"};for(const e of v._levels)v[e]=(t,...r)=>v._output(e,t,r);v._console="function"==typeof console.Console?new console.Console(process.stderr):console;const x={},w={},k={};function T(e,t){switch(t){case"Array":return 0===e.length||e.every(e=>"@csl/object"===j(e))?"@csl/list+object":"@else/list+object";case"SimpleObject":case"ComplexObject":return"@csl/object";default:return"@invalid"}}function E(e=[],t){for(const r of e)if(x[r].predicate(t))return E(x[r].extensions,t)||r}function j(e){const t=f(e);return"Array"===t&&0===e.length?T(e,t):E(w[t],e)||T(e,t)}function S(e,{dataType:t,predicate:r,extends:i}){let o=[];if(e in k&&(o=k[e],delete k[e],v.debug("[core]",`Subclasses "${o}" finally registered to parent type "${e}"`)),x[e]={predicate:r,extensions:o},i){const t=x[i];t?t.extensions.push(e):(k[i]||(k[i]=[]),k[i].push(e),v.debug("[core]",`Subclass "${e}" is waiting on parent type "${i}"`))}else(w[t]||(w[t]=[])).push(e)}function O(e){delete x[e];const t=[...Object.keys(w).map(e=>w[e]),...Object.keys(x).map(e=>x[e].extensions).filter(e=>e.length>0)];t.forEach(t=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)})}const _=/^(?:@(.+?))(?:\/(?:(.+?)\+)?(?:(.+)))?$/;class A{constructor(e){this.validDataTypes=["String","Array","SimpleObject","ComplexObject","Primitive"],this.data=e}validateDataType(){const e=this.data.dataType;if(e&&!this.validDataTypes.includes(e))throw new RangeError(`dataType was ${e}; expected one of ${this.validDataTypes}`)}validateParseType(){const e=this.data.predicate;if(e&&!(e instanceof RegExp||"function"==typeof e))throw new TypeError(`predicate was ${typeof e}; expected RegExp or function`)}validateTokenList(){const e=this.data.tokenList;if(e&&"object"!=typeof e)throw new TypeError(`tokenList was ${typeof e}; expected object or RegExp`)}validatePropertyConstraint(){const e=this.data.propertyConstraint;if(e&&"object"!=typeof e)throw new TypeError(`propertyConstraint was ${typeof e}; expected array or object`)}validateElementConstraint(){const e=this.data.elementConstraint;if(e&&"string"!=typeof e)throw new TypeError(`elementConstraint was ${typeof e}; expected string`)}validateExtends(){const e=this.data.extends;if(e&&"string"!=typeof e)throw new TypeError(`extends was ${typeof e}; expected string`)}validate(){if(null===this.data||"object"!=typeof this.data)throw new TypeError(`typeParser was ${typeof this.data}; expected object`);this.validateDataType(),this.validateParseType(),this.validateTokenList(),this.validatePropertyConstraint(),this.validateElementConstraint(),this.validateExtends()}parseTokenList(){let e=this.data.tokenList;if(!e)return[];e instanceof RegExp&&(e={token:e});const{token:t,split:r=/\s+/,trim:i=!0,every:o=!0}=e,a=o?"every":"some";return[e=>(e=>i?e.trim():e)(e).split(r)[a](e=>t.test(e))]}parsePropertyConstraint(){return[].concat(this.data.propertyConstraint||[]).map(({props:e,match:t,value:r})=>{switch(e=[].concat(e),t){case"any":case"some":return t=>e.some(e=>e in t&&(!r||r(t[e])));case"none":return t=>!e.some(e=>e in t&&(!r||r(t[e])));default:return t=>e.every(e=>e in t&&(!r||r(t[e])))}})}parseElementConstraint(){const e=this.data.elementConstraint;return e?[t=>t.every(t=>j(t)===e)]:[]}parsePredicate(){return this.data.predicate instanceof RegExp?[this.data.predicate.test.bind(this.data.predicate)]:this.data.predicate?[this.data.predicate]:[]}getCombinedPredicate(){const e=[...this.parsePredicate(),...this.parseTokenList(),...this.parsePropertyConstraint(),...this.parseElementConstraint()];return 0===e.length?()=>!0:1===e.length?e[0]:t=>e.every(e=>e(t))}getDataType(){return this.data.dataType?this.data.dataType:this.data.predicate instanceof RegExp||this.data.tokenList?"String":this.data.elementConstraint?"Array":"Primitive"}get dataType(){return this.getDataType()}get predicate(){return this.getCombinedPredicate()}get extends(){return this.data.extends}}class C{constructor(e,{async:t}={}){this.parser=e,this.async=t}validate(){const e=this.parser;if("function"!=typeof e)throw new TypeError(`parser was ${typeof e}; expected function`)}}class R{constructor(e,t={}){this.format=e,t.parseType&&(this.typeParser=new A(t.parseType)),t.parse&&(this.dataParser=new C(t.parse,{async:!1})),t.parseAsync&&(this.asyncDataParser=new C(t.parseAsync,{async:!0}))}validateFormat(){const e=this.format;if(!_.test(e))throw new TypeError(`format name was "${e}"; didn't match expected pattern`)}validate(){this.validateFormat(),this.typeParser&&this.typeParser.validate(),this.dataParser&&this.dataParser.validate(),this.asyncDataParser&&this.asyncDataParser.validate()}}var I={__proto__:null,TypeParser:A,DataParser:C,FormatParser:R};function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},B.apply(this,arguments)}const P=1,L=2,z=3,U=4,D={article:!0,"article-journal":!0,"article-magazine":!0,"article-newspaper":!0,bill:!0,book:!0,broadcast:!0,chapter:!0,classic:!0,collection:!0,dataset:!0,document:!0,entry:!0,"entry-dictionary":!0,"entry-encyclopedia":!0,event:!0,figure:!0,graphic:!0,hearing:!0,interview:!0,legal_case:!0,legislation:!0,manuscript:!0,map:!0,motion_picture:!0,musical_score:!0,pamphlet:!0,"paper-conference":!0,patent:!0,performance:!0,periodical:!0,personal_communication:!0,post:!0,"post-weblog":!0,regulation:!0,report:!0,review:!0,"review-book":!0,software:!0,song:!0,speech:!0,standard:!0,thesis:!0,treaty:!0,webpage:!0,"journal-article":"article-journal","book-chapter":"chapter","posted-content":"manuscript","proceedings-article":"paper-conference"},$={author:L,chair:L,"collection-editor":L,compiler:L,composer:L,"container-author":L,contributor:L,curator:L,director:L,editor:L,"editorial-director":L,"executive-producer":L,guest:L,host:L,interviewer:L,illustrator:L,narrator:L,organizer:L,"original-author":L,performer:L,producer:L,"reviewed-author":L,recipient:L,"script-writer":L,"series-creator":L,translator:L,accessed:z,"available-date":z,container:z,"event-date":z,issued:z,"original-date":z,submitted:z,type:U,categories:"object",custom:"object",id:["string","number"],language:"string",journalAbbreviation:"string",shortTitle:"string",abstract:"string",annote:"string",archive:"string",archive_collection:"string",archive_location:"string","archive-place":"string",authority:"string","call-number":"string","chapter-number":"string","citation-number":"string","citation-key":"string","citation-label":"string","collection-number":"string","collection-title":"string","container-title":"string","container-title-short":"string",dimensions:"string",division:"string",DOI:"string",edition:["string","number"],event:"string","event-title":"string","event-place":"string","first-reference-note-number":"string",genre:"string",ISBN:"string",ISSN:"string",issue:["string","number"],jurisdiction:"string",keyword:"string",locator:"string",medium:"string",note:"string",number:["string","number"],"number-of-pages":"string","number-of-volumes":["string","number"],"original-publisher":"string","original-publisher-place":"string","original-title":"string",page:"string","page-first":"string","part-number":["string","number"],"part-title":"string",PMCID:"string",PMID:"string",printing:"string",publisher:"string","publisher-place":"string",references:"string","reviewed-title":"string","reviewed-genre":"string",scale:"string",section:"string",source:"string",status:"string",supplement:["string","number"],title:"string","title-short":"string",URL:"string",version:"string",volume:["string","number"],"volume-title":"string","volume-title-short":"string","year-suffix":"string"};function N(t,r){return"object"==typeof t&&null!==t&&(t.literal||t.given||t.family)?t:r&&"string"==typeof t?e(t):void 0}function M(e,t){return e.every(e=>"number"==typeof e)?e:!t||e.some(e=>isNaN(parseInt(e)))?void 0:e.map(e=>parseInt(e))}function q(e,t,r){const i=[].concat($[e]);switch($[e]){case P:return N(t,r);case L:return function(e,t){if(e instanceof Array){const r=e.map(e=>N(e,t)).filter(Boolean);return r.length?r:void 0}}(t,r);case z:return function(e,t){const r="date-parts";if("object"==typeof e&&null!==e){if(e[r]instanceof Array&&e[r].every(e=>e instanceof Array)){const i=e[r].map(e=>M(e,t)).filter(Boolean);return i.length?B({},e,{"date-parts":i}):void 0}if(e instanceof Array&&e.every(e=>e[r]instanceof Array)){const i=e.map(e=>M(e[r],t)).filter(Boolean);return i.length?{"date-parts":i}:void 0}if(e[r]instanceof Array){const i=M(e[r],t);return i&&{"date-parts":[i]}}return"literal"in e||"raw"in e?e:void 0}}(t,r);case U:return function(e,t){return e=q("language",e,t),!0===D[e]?e:t&&e in D?D[e]:void 0}(t,r)}if(r){if("string"==typeof t&&i.includes("number")&&!i.includes("string")&&!isNaN(+t))return parseFloat(t);if("number"==typeof t&&i.includes("string")&&!i.includes("number"))return t.toString();if(Array.isArray(t)&&t.length)return q(e,t[0],r)}if(i.includes(typeof t))return t}function F(e,t=!0){return e.map(function(e){const r={};for(const i in e){const o=q(i,e[i],t);void 0!==o&&(r[i]=o)}return r})}var H={__proto__:null,clean:F};function G(e){return Array.isArray(e)?e.map(G):("event"in(e=B({},e))&&(e["event-title"]=e.event,delete e.event),"book"===e.type&&"version"in e&&(e.type="software"),e)}function J(e){return Array.isArray(e)?e.map(J):("event-title"in(e=B({},e))&&(e.event=e["event-title"],delete e["event-title"]),"software"===e.type&&(e.type="book"),e)}function V(e,t=new Set){if("object"!=typeof e||null===e||e.constructor!==Object&&e.constructor!==Array)return e;if(t.has(e))throw new TypeError("Recursively copying circular structure");let r;if(t.add(e),e.constructor===Array)r=e.map(e=>V(e,t));else{const i={};for(const r in e)i[r]=V(e[r],t);r=i}return t.delete(e),r}var K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function W(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function X(e){var t={exports:{}};return e(t,t.exports),t.exports}for(var Y=[],Z=[],Q="undefined"!=typeof Uint8Array?Uint8Array:Array,ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",te=0;te<64;++te)Y[te]=ee[te],Z[ee.charCodeAt(te)]=te;function re(e,t,r){for(var i,o=[],a=t;a<r;a+=3)o.push(Y[(i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]))>>18&63]+Y[i>>12&63]+Y[i>>6&63]+Y[63&i]);return o.join("")}Z["-".charCodeAt(0)]=62,Z["_".charCodeAt(0)]=63;var ie=function(e,t,r,i,o){var a,n,s=8*o-i-1,l=(1<<s)-1,c=l>>1,m=-7,u=r?o-1:0,p=r?-1:1,h=e[t+u];for(u+=p,a=h&(1<<-m)-1,h>>=-m,m+=s;m>0;a=256*a+e[t+u],u+=p,m-=8);for(n=a&(1<<-m)-1,a>>=-m,m+=i;m>0;n=256*n+e[t+u],u+=p,m-=8);if(0===a)a=1-c;else{if(a===l)return n?NaN:Infinity*(h?-1:1);n+=Math.pow(2,i),a-=c}return(h?-1:1)*n*Math.pow(2,a-i)},oe=function(e,t,r,i,o,a){var n,s,l,c=8*a-o-1,m=(1<<c)-1,u=m>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:a-1,f=i?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||Infinity===t?(s=isNaN(t)?1:0,n=m):(n=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-n))<1&&(n--,l*=2),(t+=n+u>=1?p/l:p*Math.pow(2,1-u))*l>=2&&(n++,l/=2),n+u>=m?(s=0,n=m):n+u>=1?(s=(t*l-1)*Math.pow(2,o),n+=u):(s=t*Math.pow(2,u-1)*Math.pow(2,o),n=0));o>=8;e[r+h]=255&s,h+=f,s/=256,o-=8);for(n=n<<o|s,c+=o;c>0;e[r+h]=255&n,h+=f,n/=256,c-=8);e[r+h-f]|=128*d},ae=X(function(e,t){var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return n(e,t,r)}function n(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|p(e,t),i=o(r),n=i.write(e,t);return n!==r&&(i=i.slice(0,n)),i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(D(e,Uint8Array)){var t=new Uint8Array(e);return m(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(D(e,ArrayBuffer)||e&&D(e.buffer,ArrayBuffer))return m(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(D(e,SharedArrayBuffer)||e&&D(e.buffer,SharedArrayBuffer)))return m(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return a.from(i,t,r);var n=function(e){if(a.isBuffer(e)){var t=0|u(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||$(e.length)?o(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return s(e),o(e<0?0:0|u(e))}function c(e){for(var t=e.length<0?0:0|u(e.length),r=o(t),i=0;i<t;i+=1)r[i]=255&e[i];return r}function m(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(i,a.prototype),i}function u(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||D(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(o)return i?-1:L(e).length;t=(""+t).toLowerCase(),o=!0}}function h(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function f(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function d(e,t,r,i,o){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),$(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=a.from(t,i)),a.isBuffer(t))return 0===t.length?-1:g(e,t,r,i,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,i,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,i,o){var a,n=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;n=2,s/=2,l/=2,r/=2}function c(e,t){return 1===n?e[t]:e.readUInt16BE(t*n)}if(o){var m=-1;for(a=r;a<s;a++)if(c(e,a)===c(t,-1===m?0:a-m)){if(-1===m&&(m=a),a-m+1===l)return m*n}else-1!==m&&(a-=a-m),m=-1}else for(r+l>s&&(r=s-l),a=r;a>=0;a--){for(var u=!0,p=0;p<l;p++)if(c(e,a+p)!==c(t,p)){u=!1;break}if(u)return a}return-1}function b(e,t,r,i){r=Number(r)||0;var o=e.length-r;i?(i=Number(i))>o&&(i=o):i=o;var a=t.length;i>a/2&&(i=a/2);for(var n=0;n<i;++n){var s=parseInt(t.substr(2*n,2),16);if($(s))return n;e[r+n]=s}return n}function y(e,t,r,i){return U(L(t,e.length-r),e,r,i)}function v(e,t,r,i){return U(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function x(e,t,r,i){return U(z(t),e,r,i)}function w(e,t,r,i){return U(function(e,t){for(var r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)i=(r=e.charCodeAt(a))>>8,o.push(r%256),o.push(i);return o}(t,e.length-r),e,r,i)}function k(e,t,r){return function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,n=0,s=r-i;n<s;n+=a)o.push(re(e,n,n+a>s?s:n+a));return 1===i?o.push(Y[(t=e[r-1])>>2]+Y[t<<4&63]+"=="):2===i&&o.push(Y[(t=(e[r-2]<<8)+e[r-1])>>10]+Y[t>>4&63]+Y[t<<2&63]+"="),o.join("")}(0===t&&r===e.length?e:e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);for(var i=[],o=t;o<r;){var a,n,s,l,c=e[o],m=null,u=c>239?4:c>223?3:c>191?2:1;if(o+u<=r)switch(u){case 1:c<128&&(m=c);break;case 2:128==(192&(a=e[o+1]))&&(l=(31&c)<<6|63&a)>127&&(m=l);break;case 3:n=e[o+2],128==(192&(a=e[o+1]))&&128==(192&n)&&(l=(15&c)<<12|(63&a)<<6|63&n)>2047&&(l<55296||l>57343)&&(m=l);break;case 4:n=e[o+2],s=e[o+3],128==(192&(a=e[o+1]))&&128==(192&n)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&n)<<6|63&s)>65535&&l<1114112&&(m=l)}null===m?(m=65533,u=1):m>65535&&(i.push((m-=65536)>>>10&1023|55296),m=56320|1023&m),i.push(m),o+=u}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);for(var r="",i=0;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=E));return r}(i)}t.kMaxLength=i,(a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return n(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return function(e,t,r){return s(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}(e,t,r)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(D(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),D(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,i=t.length,o=0,n=Math.min(r,i);o<n;++o)if(e[o]!==t[o]){r=e[o],i=t[o];break}return r<i?-1:i<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var i=a.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var n=e[r];if(D(n,Uint8Array))o+n.length>i.length?a.from(n).copy(i,o):Uint8Array.prototype.set.call(i,n,o);else{if(!a.isBuffer(n))throw new TypeError('"list" argument must be an Array of Buffers');n.copy(i,o)}o+=n.length}return i},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)f(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):h.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(e,t,r,i,o){if(D(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||r>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=r)return 0;if(i>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var n=(o>>>=0)-(i>>>=0),s=(r>>>=0)-(t>>>=0),l=Math.min(n,s),c=this.slice(i,o),m=e.slice(t,r),u=0;u<l;++u)if(c[u]!==m[u]){n=c[u],s=m[u];break}return n<s?-1:s<n?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return d(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return d(this,e,t,r,!1)},a.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":case"latin1":case"binary":return v(this,e,t,r);case"base64":return x(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function j(e,t,r){var i="";r=Math.min(e.length,r);for(var o=t;o<r;++o)i+=String.fromCharCode(127&e[o]);return i}function S(e,t,r){var i="";r=Math.min(e.length,r);for(var o=t;o<r;++o)i+=String.fromCharCode(e[o]);return i}function O(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var o="",a=t;a<r;++a)o+=N[e[a]];return o}function _(e,t,r){for(var i=e.slice(t,r),o="",a=0;a<i.length-1;a+=2)o+=String.fromCharCode(i[a]+256*i[a+1]);return o}function A(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,i,o,n){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<n)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function R(e,t,r,i,o,a){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(e,t,r,i,o){return t=+t,r>>>=0,o||R(e,0,r,4),oe(e,t,r,i,23,4),r+4}function B(e,t,r,i,o){return t=+t,r>>>=0,o||R(e,0,r,8),oe(e,t,r,i,52,8),r+8}a.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var i=this.subarray(e,t);return Object.setPrototypeOf(i,a.prototype),i},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var i=this[e],o=1,a=0;++a<t&&(o*=256);)i+=this[e+a]*o;return i},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var i=this[e+--t],o=1;t>0&&(o*=256);)i+=this[e+--t]*o;return i},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var i=this[e],o=1,a=0;++a<t&&(o*=256);)i+=this[e+a]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var i=t,o=1,a=this[e+--i];i>0&&(o*=256);)a+=this[e+--i]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||A(e,4,this.length),ie(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||A(e,4,this.length),ie(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||A(e,8,this.length),ie(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||A(e,8,this.length),ie(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,i){e=+e,t>>>=0,r>>>=0,i||C(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,a=0;for(this[t]=255&e;++a<r&&(o*=256);)this[t+a]=e/o&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,i){e=+e,t>>>=0,r>>>=0,i||C(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t>>>=0,!i){var o=Math.pow(2,8*r-1);C(this,e,t,r,o-1,-o)}var a=0,n=1,s=0;for(this[t]=255&e;++a<r&&(n*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/n>>0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t>>>=0,!i){var o=Math.pow(2,8*r-1);C(this,e,t,r,o-1,-o)}var a=r-1,n=1,s=0;for(this[t+a]=255&e;--a>=0&&(n*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/n>>0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,i){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);var o=i-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,i):Uint8Array.prototype.set.call(e,this.subarray(r,i),t),o},a.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var o=e.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var n;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{var s=a.isBuffer(e)?e:a.from(e,i),l=s.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=s[n%l]}return this};var P=/[^+/0-9A-Za-z-_]/g;function L(e,t){var r;t=t||Infinity;for(var i=e.length,o=null,a=[],n=0;n<i;++n){if((r=e.charCodeAt(n))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(n+1===i){(t-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function z(e){return function(e){var t,r,i=function(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}(e),o=i[0],a=i[1],n=new Q(function(e,t,r){return 3*(t+r)/4-r}(0,o,a)),s=0,l=a>0?o-4:o;for(r=0;r<l;r+=4)t=Z[e.charCodeAt(r)]<<18|Z[e.charCodeAt(r+1)]<<12|Z[e.charCodeAt(r+2)]<<6|Z[e.charCodeAt(r+3)],n[s++]=t>>16&255,n[s++]=t>>8&255,n[s++]=255&t;return 2===a&&(t=Z[e.charCodeAt(r)]<<2|Z[e.charCodeAt(r+1)]>>4,n[s++]=255&t),1===a&&(t=Z[e.charCodeAt(r)]<<10|Z[e.charCodeAt(r+1)]<<4|Z[e.charCodeAt(r+2)]>>2,n[s++]=t>>8&255,n[s++]=255&t),n}(function(e){if((e=(e=e.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,i){for(var o=0;o<i&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function D(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function $(e){return e!=e}var N=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var i=16*r,o=0;o<16;++o)t[i+o]=e[r]+e[o];return t}()});const{Buffer:ne}=ae;function se(...e){const t=new se.Request(...e),r=new XMLHttpRequest;r.withCredentials="include"===t.credentials,r.timeout=t[le].timeout,r.open(t.method,t.url,!1);let i=!1;try{r.responseType="arraybuffer"}catch(e){r.overrideMimeType("text/plain; charset=x-user-defined"),i=!0}for(const e of t.headers)r.setRequestHeader(...e);r.send(t.body||null);let o=r.getAllResponseHeaders();o=o&&o.split("\r\n").filter(Boolean).map(e=>e.split(": ",2));let a=r.response;if(i){const e=ne.alloc(a.length);for(let t=0;t<a.length;t++)e[t]=255&a.charCodeAt(t);a=e}const n=new se.Response(a,{headers:o,status:r.status,statusText:r.statusText});return n[le].url=r.responseURL,n[le].redirected=r.responseURL!==t.url,n}const le=Symbol("SyncFetch Internals"),ce=["mode","cache","redirect","referrer","integrity"],me={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};class ue{constructor(e,t={}){for(const e of ce)if(e in t)throw new TypeError(`option ${e} not supported`);if("same-origin"===t.credentials)throw new TypeError("option credentials with value 'same-origin' not supported");if(this[le]={method:t.method||"GET",headers:new se.Headers(t.headers),body:t.body?ne.from(t.body):null,credentials:t.credentials||"omit",timeout:t.timeout||0},"string"==typeof e)this[le].url=e;else{if(!(e instanceof ue))throw new TypeError("Request input should be a URL string or a Request object");this[le].url=e.url,t.method||(this[le].method=e.method),t.headers||(this[le].headers=e.headers),t.body||(this[le].body=e[le].body),t.credentials||(this[le].credentials=e.credentials)}}get cache(){return"default"}get credentials(){return this[le].credentials}get destination(){return""}get headers(){return this[le].headers}get integrity(){return""}get method(){return this[le].method}get mode(){return"cors"}get priority(){return"auto"}get redirect(){return"follow"}get referrer(){return"about:client"}get referrerPolicy(){return""}get url(){return this[le].url}clone(){return fe(this),new ue(this.url,this[le])}}class pe{constructor(e,t={}){this[le]={body:e?ne.from(e):null,bodyUsed:!1,headers:new se.Headers(t.headers),status:t.status,statusText:t.statusText}}get headers(){return this[le].headers}get ok(){const e=this[le].status;return e>=200&&e<300}get redirected(){return this[le].redirected}get status(){return this[le].status}get statusText(){return this[le].statusText}get url(){return this[le].url}clone(){return this.redirect(this[le].url,this[le].status)}redirect(e,t){fe(this);const r=new pe(this[le].body,{headers:this[le].headers,status:t||this[le].status,statusText:me[t]||this[le].statusText});return r[le].url=e||this[le].url,r[le].redirected=this[le].redirected,r}}class he{constructor(e){this[le]={body:ne.from(e),bodyUsed:!1}}get bodyUsed(){return this[le].bodyUsed}static mixin(e){for(const t of Object.getOwnPropertyNames(he.prototype)){if("constructor"===t)continue;const r=Object.getOwnPropertyDescriptor(he.prototype,t);Object.defineProperty(e,t,{...r,enumerable:!0})}}arrayBuffer(){const e=de(this);return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}blob(){const e=this.headers&&this.headers.get("content-type");return new Blob([de(this)],e&&{type:e})}text(){return de(this).toString()}json(){try{return JSON.parse(de(this).toString())}catch(e){throw new TypeError(`invalid json response body at ${this.url} reason: ${e.message}`,"invalid-json")}}buffer(){return de(this).clone()}}function fe(e){if(e.bodyUsed)throw new TypeError(`body used already for: ${e.url}`)}function de(e){return fe(e),e[le].bodyUsed=!0,e[le].body||ne.alloc(0)}he.mixin(ue.prototype),he.mixin(pe.prototype);class ge{constructor(e){if(e instanceof se.Headers)this[le]={...e[le]};else if(this[le]={},Array.isArray(e))for(const[t,r]of e)this.append(t,r);else if("object"==typeof e)for(const t in e)this.set(t,e[t])}append(e,t){e=e.toLowerCase(),this[le][e]||(this[le][e]=[]),this[le][e].push(t)}delete(e){delete this[le][e.toLowerCase()]}set(e,t){this[le][e.toLowerCase()]=[t]}entries(){const e=[];for(const t in this[le])for(const r of this[le][t])e.push([t,r]);return e}get(e){return(e=e.toLowerCase())in this[le]?this[le][e].join(", "):null}keys(){return Object.keys(this[le])}has(e){return e.toLowerCase()in this[le]}values(){const e=[];for(const t in this[le])for(const r of this[le][t])e.push(r);return e}*[Symbol.iterator](){for(const e in this[le])for(const t of this[le][e])yield[e,t]}}se.Headers=ge,se.Request=ue,se.Response=pe;var be=X(function(e,t){!function(r){e.exports=function(e){var i=e&&e.Promise||r.Promise,o=e&&e.XMLHttpRequest||r.XMLHttpRequest;return function(){var e=Object.create(r,{fetch:{value:void 0,writable:!0}});return function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,a="URLSearchParams"in r,n="Symbol"in r&&"iterator"in Symbol,s="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),l="FormData"in r,c="ArrayBuffer"in r;if(c)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&m.indexOf(Object.prototype.toString.call(e))>-1};function p(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function h(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function g(e){if(e.bodyUsed)return i.reject(new TypeError("Already read"));e.bodyUsed=!0}function b(e){return new i(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function y(e){var t=new FileReader,r=b(t);return t.readAsArrayBuffer(e),r}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function x(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:s&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:l&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():c&&s&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=g(this);if(e)return e;if(this._bodyBlob)return i.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return i.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return i.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?g(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?i.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):i.resolve(this._bodyArrayBuffer)):this.blob().then(y)}),this.text=function(){var e,t,r,o=g(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,r=b(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return i.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),i=0;i<t.length;i++)r[i]=String.fromCharCode(t[i]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return i.resolve(this._bodyText)},l&&(this.formData=function(){return this.text().then(T)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(e,t){e=p(e),t=h(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},d.prototype.delete=function(e){delete this.map[p(e)]},d.prototype.get=function(e){return e=p(e),this.has(e)?this.map[e]:null},d.prototype.has=function(e){return this.map.hasOwnProperty(p(e))},d.prototype.set=function(e,t){this.map[p(e)]=h(t)},d.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},d.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),f(e)},d.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),f(e)},d.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),f(e)},n&&(d.prototype[Symbol.iterator]=d.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function k(e,t){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,i,o=(t=t||{}).body;if(e instanceof k){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new d(t.headers)),this.method=(i=(r=t.method||this.method||"GET").toUpperCase(),w.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function T(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),i=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(o))}}),t}function E(e,t){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})},x.call(k.prototype),x.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var j=[301,302,303,307,308];E.redirect=function(e,t){if(-1===j.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,a){return new i(function(i,n){var l=new k(e,a);if(l.signal&&l.signal.aborted)return n(new t.DOMException("Aborted","AbortError"));var m=new o;function u(){m.abort()}m.onload=function(){var e,t,r={status:m.status,statusText:m.statusText,headers:(e=m.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var r=e.split(":"),i=r.shift().trim();if(i){var o=r.join(":").trim();t.append(i,o)}}),t)};r.url="responseURL"in m?m.responseURL:r.headers.get("X-Request-URL");var o="response"in m?m.response:m.responseText;setTimeout(function(){i(new E(o,r))},0)},m.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},m.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},m.onabort=function(){setTimeout(function(){n(new t.DOMException("Aborted","AbortError"))},0)},m.open(l.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(l.url),!0),"include"===l.credentials?m.withCredentials=!0:"omit"===l.credentials&&(m.withCredentials=!1),"responseType"in m&&(s?m.responseType="blob":c&&l.headers.get("Content-Type")&&-1!==l.headers.get("Content-Type").indexOf("application/octet-stream")&&(m.responseType="arraybuffer")),!a||"object"!=typeof a.headers||a.headers instanceof d?l.headers.forEach(function(e,t){m.setRequestHeader(t,e)}):Object.getOwnPropertyNames(a.headers).forEach(function(e){m.setRequestHeader(e,h(a.headers[e]))}),l.signal&&(l.signal.addEventListener("abort",u),m.onreadystatechange=function(){4===m.readyState&&l.signal.removeEventListener("abort",u)}),m.send(void 0===l._bodyInit?null:l._bodyInit)})}S.polyfill=!0,r.fetch||(r.fetch=S,r.Headers=d,r.Request=k,r.Response=E),t.Headers=d,t.Request=k,t.Response=E,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}(t),{fetch:e.fetch,Headers:e.Headers,Request:e.Request,Response:e.Response,DOMException:e.DOMException}}()}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:K)});function ye(e,t){let r;for(;void 0===r||e.includes(r);)r=`${t}${Math.random().toString().slice(2)}`;return r}/*@__PURE__*/W(be)();class ve{constructor(e={}){this.data=e}set(e,t){return this.data[e]=t,this}add(...e){return this.set(...e)}delete(e){return delete this.data[e],this}remove(...e){return this.delete(...e)}get(e){return this.data[e]}has(e){return Object.prototype.hasOwnProperty.call(this.data,e)}list(){return Object.keys(this.data)}}class xe{constructor(e,t){this.rules=e,this.defaultState=t,this.mainRule=Object.keys(e)[0],this.log=[]}parse(e,t){return this.lexer=e,this.token=this.lexer.next(),this.state=V(this.defaultState),this.log=[],this.consumeRule(t||this.mainRule)}matchEndOfFile(){return!this.token}matchToken(e){return this.token&&e===this.token.type}consumeToken(e,t){const r=this.token;if(!e||r&&r.type===e)return this.token=this.lexer.next(),r;if(!t){const t=new SyntaxError(this.lexer.formatError(r,`expected "${e}", got ${r?`"${r.type}"`:"EOF"}`));throw t.message+=` (${this.log.join("->")})`,t}}consumeRule(e){this.log.push(e);const t=this.rules[e].call(this);return this.log.pop(),t}}function we(e,t){return t=t===ke.CONVERT_TO_SOURCE,e=e.map(e=>function(e,t){let r,i,o,a;if("string"==typeof e)r=i=e;else{if(!e)return null;r=t?e.target:e.source,i=t?e.source:e.target,e.convert&&(o=t?e.convert.toSource:e.convert.toTarget),e.when&&(a=t?e.when.target:e.when.source,null!=a&&(a=function(e){return function(t){return"boolean"==typeof e?e:Object.keys(e).every(r=>{const i=e[r];return!0===i?r in t:!1===i?!(r in t):"function"==typeof i?i(t[r]):Array.isArray(i)?i.includes(t[r]):t[r]===i})}}(a)))}return r=[].concat(r).filter(Boolean),i=[].concat(i).filter(Boolean),{inputProp:r,outputProp:i,convert:o,condition:a}}(e,t)).filter(Boolean),function(t){const r={};for(const{inputProp:i,outputProp:o,convert:a,condition:n}of e){if(0===o.length)continue;if(n&&!n(t))continue;if(0!==i.length&&i.every(e=>!(e in t)))continue;let e=i.map(e=>t[e]);if(a)try{const r=a.apply(t,e);e=1===o.length?[r]:r}catch(e){throw new Error(`Failed to convert ${i} to ${o}`,{cause:e})}o.forEach((t,i)=>{const o=e[i];void 0!==o&&(r[t]=o)})}return r}}class ke{constructor(e){this.convertToSource=we(e,ke.CONVERT_TO_SOURCE),this.convertToTarget=we(e,ke.CONVERT_TO_TARGET)}}ke.CONVERT_TO_SOURCE=Symbol("convert to source"),ke.CONVERT_TO_TARGET=Symbol("convert to target");class Te{constructor(e,t={}){this.options=Object.assign({generateGraph:!0,forceType:j(e),maxChainLength:10,strict:!0,target:"@csl/list+object"},t),this.type=this.options.forceType,this.data="object"==typeof e?V(e):e,this.graph=[{type:this.type,data:e}],this.iteration=0}iterate(){if(0!==this.iteration){const e=ze(this.type);this.type=e&&e.outputs?e.outputs:j(this.data),this.graph.push({type:this.type})}return!this.error&&this.type!==this.options.target&&(this.iteration>=this.options.maxChainLength?(this.error=new RangeError(`Max. number of parsing iterations reached (${function(e){return e.reduce((e,t)=>{const r=e[e.length-1];return r&&r.type===t.type?r.count=r.count+1||2:e.push(t),e},[]).map(e=>(e.count>1?e.count+"x ":"")+e.type).join(" -> ")}(this.graph)})`),!1):(this.iteration++,!0))}end(){if(this.error){if(v.error("[core]",this.error.message),!1!==this.options.strict)throw this.error;return[]}return"@csl/list+object"===this.options.target?G(this.data).map(this.options.generateGraph?e=>g(e,this.graph):b):this.data}}const Ee=(...e)=>{const t=new Te(...e);for(;t.iterate();)try{t.data=Ce(t.data,t.type)}catch(e){t.error=e}return t.end()},je=async(...e)=>{const t=new Te(...e);for(;t.iterate();)t.data=await Re(t.data,t.type).catch(e=>{t.error=e});return t.end()},Se={},Oe={},_e={"@csl/object":e=>[e],"@csl/list+object":e=>e,"@else/list+object":e=>e.map(Ee).flat(),"@invalid":()=>{throw new Error("This format is not supported or recognized")}},Ae={"@else/list+object":async e=>(await Promise.all(e.map(je))).flat()};function Ce(e,t){if("function"==typeof Se[t])return Se[t](e);throw new Error("This format is not supported or recognized")}async function Re(e,t){if("function"==typeof Oe[t])return Oe[t](e);if("function"==typeof Ae[t])return Ae[t](e);if(Be(t,!1))return Ce(e,t);throw new TypeError(`No parser found for ${t}`)}function Ie(e,{parser:t,async:r}){r?Oe[e]=t:Se[e]=t}function Be(e,t){return t?Oe[e]||Ae[e]:Se[e]||_e[e]}function Pe(e,t){delete(t?Oe:Se)[e]}const Le={};function ze(e){return Le[e]}var Ue={__proto__:null,util:Object.assign({},d,y,I,H),add:function(e,t){const r=new R(e,t);r.validate();const i=Le[e]||(Le[e]={});r.typeParser&&(S(e,r.typeParser),i.type=!0),r.dataParser&&(Ie(e,r.dataParser),i.data=!0),r.asyncDataParser&&(Ie(e,r.asyncDataParser),i.asyncData=!0),t.outputs&&(i.outputs=t.outputs)},get:ze,remove:function(e){const t=Le[e];t&&(t.type&&O(e),t.data&&Pe(e),t.asyncData&&Pe(e,!0),delete Le[e])},has:function(e){return e in Le},list:function(){return Object.keys(Le)},chain:Ee,chainLink:e=>{const t=j(e);return Ce(t.match(/array|object/)?V(e):e,t)},chainAsync:je,chainLinkAsync:async e=>{const t=j(e);return Re(t.match(/array|object/)?V(e):e,t)},type:j,addTypeParser:S,hasTypeParser:function(e){return Object.prototype.hasOwnProperty.call(x,e)},removeTypeParser:O,listTypeParser:function(){return Object.keys(x)},treeTypeParser:function(){const e=t=>({name:t,children:x[t].extensions.map(e)});return{name:"Type tree",children:Object.keys(w).map(t=>({name:t,children:w[t].map(e)}))}},typeMatcher:_,data:Ce,dataAsync:Re,addDataParser:Ie,hasDataParser:Be,removeDataParser:Pe,listDataParser:function(e){return Object.keys(e?Oe:Se)}},De={__proto__:null,add:function(e,t={},r=!1){return!0!==t&&!0!==r||this.save(),this.data.push(...Ee(e,t)),this.data.filter(e=>!Object.prototype.hasOwnProperty.call(e,"id")).forEach(e=>{e.id=ye(this.getIds(),"temp_id_")}),this},addAsync:async function(e,t={},r=!1){return!0!==t&&!0!==r||this.save(),this.data.push(...await je(e,t)),this.data.filter(e=>!Object.prototype.hasOwnProperty.call(e,"id")).forEach(e=>{e.id=ye(this.getIds(),"temp_id_")}),this},set:function(e,t={},r=!1){return!0!==t&&!0!==r||this.save(),this.data=[],"boolean"!=typeof t?this.add(e,t):this.add(e)},setAsync:async function(e,t={},r=!1){return!0!==t&&!0!==r||this.save(),this.data=[],"boolean"!=typeof t?this.addAsync(e,t):this.addAsync(e)},reset:function(e){return e&&this.save(),this.data=[],this._options={},this}};function $e(e){if("citation-label"in e)return e["citation-label"];let t="";return e.author&&(t+=e.author[0].family||e.author[0].literal),e.issued&&e.issued["date-parts"]&&e.issued["date-parts"][0]&&(t+=e.issued["date-parts"][0][0]),e["year-suffix"]?t+=e["year-suffix"]:e.title&&(t+=e.title.replace(/<\/?.*?>/g,"").match(/^(?:(?:the|a|an)\s+)?(\S+)/i)[1]),t}var Ne={label:e=>e.reduce((e,t)=>(e[t.id]=$e(t),e),{})};function Me(e,r,i="label"===r){let o=i?$e(e):e[r];switch(r){case"author":case"editor":return o.map(e=>e.literal||e.family||t(e));case"accessed":case"issued":return o["date-parts"][0];case"page":return o.split("-").map(e=>parseInt(e));case"edition":case"issue":case"volume":return o=parseInt(o),isNaN(o)?-Infinity:o;default:return o||-Infinity}}function qe(e,t,r,i=/^!/.test(r)){const o=Me(e,r=r.replace(/^!/,"")),a=Me(t,r);return(i?-1:1)*(o>a?1:o<a?-1:0)}var Fe={__proto__:null,sort:function(e=[],t){return t&&this.save(),this.data.sort("function"==typeof e?e:function(...e){return(t,r)=>{const i=e.slice();let o=0;for(;!o&&i.length;)o=qe(t,r,i.shift());return o}}(...e,"label")),this}};const He=new ve;function Ge(e,t,...r){if(!He.has(e))throw new Error(`Output format "${e}" unavailable`);return He.get(e)(t,...r)}var Je={__proto__:null,register:He,add:function(e,t){!function(e,t){if("string"!=typeof e)throw new TypeError("Invalid output format name, expected string, got "+typeof e);if("function"!=typeof t)throw new TypeError("Invalid formatter, expected function, got "+typeof t)}(e,t),He.set(e,t)},remove:function(e){He.remove(e)},has:function(e){return He.has(e)},list:function(){return He.list()},format:Ge},Ve={__proto__:null,getIds:function(){return this.data.map(e=>e.id)},format:function(e,...t){return Ge(e,F(this.data),...t)},get:function(e={}){u(e);const t=Object.assign({},this.defaultOptions,this._options.output,e),{type:r,style:i}=t,[o,a]=i.split("-"),n="citation"===o?"bibliography":"csl"===o?"data":o,s="string"===r?"text":"json"===r?"object":r;let l;switch(n){case"bibliography":{const{lang:e,append:r,prepend:i}=t;l={template:a,lang:e,format:s,append:r,prepend:i};break}case"data":case"bibtex":case"bibtxt":case"ndjson":case"ris":l={type:s};break;default:throw new Error(`Invalid style "${n}"`)}const c=this.format(n,Object.assign(l,e._newOptions)),{format:m}=t;if("real"===m&&"html"===s&&"undefined"!=typeof document&&"function"==typeof document.createElement){const e=document.createElement("div");return e.innerHTML=c,e.firstChild}return"string"===m&&"object"==typeof c?JSON.stringify(c):c}},Ke={__proto__:null,async:function(e,t,r){"function"!=typeof t||r||(r=t,t=void 0);const i=(new this).setAsync(e,t);return"function"==typeof r?void i.then(r):i},validateOutputOptions:u,validateOptions:function(e){if("object"!=typeof e)throw new TypeError("Options should be an object");if(e.output)u(e.output);else{if(e.maxChainLength&&"number"!=typeof e.maxChainLength)throw new TypeError("Option maxChainLength should be a number");if(e.forceType&&"string"!=typeof e.forceType)throw new TypeError("Option forceType should be a string");if(null!=e.generateGraph&&"boolean"!=typeof e.generateGraph)throw new TypeError("Option generateGraph should be a boolean");if(null!=e.strict&&"boolean"!=typeof e.strict)throw new TypeError("Option strict should be a boolean");if(null!=e.target&&"string"!=typeof e.target)throw new TypeError("Option target should be a boolean")}return!0}};function We(e,t={}){return this instanceof We?(this._options=t,this.log=[],this.data=[],e.forEach(e=>{this.add(e,t)}),this.options(t),this):new We(e,t)}Object.assign(We.prototype,n,p,De,Fe,Ve),We.prototype[Symbol.iterator]=function*(){yield*this.data},Object.assign(We,Ke);const Xe=new ve({html:{bibliographyContainer:['<div class="csl-bib-body">',"</div>"],entry:['<div class="csl-entry">',"</div>"],list:['<ul style="list-style-type:none">',"</ul>"],listItem:["<li>","</li>"]},text:{bibliographyContainer:["","\n"],entry:["","\n"],list:["\n",""],listItem:["\t","\n"]}});function Ye(e){return Xe.has(e)}function Ze(e){if(!Xe.has(e))throw new Error(`Dict "${e}" unavailable`);return Xe.get(e)}var Qe={__proto__:null,register:Xe,add:function(e,t){!function(e,t){if("string"!=typeof e)throw new TypeError("Invalid dict name, expected string, got "+typeof e);if("object"!=typeof t)throw new TypeError("Invalid dict, expected object, got "+typeof t);for(const e in t){const r=t[e];if(!Array.isArray(r)||r.some(e=>"string"!=typeof e))throw new TypeError(`Invalid dict entry "${e}", expected array of strings`)}}(e,t),Xe.set(e,t)},remove:function(e){Xe.remove(e)},has:Ye,list:function(){return Xe.list()},get:Ze,htmlDict:{wr_start:'<div class="csl-bib-body">',wr_end:"</div>",en_start:'<div class="csl-entry">',en_end:"</div>",ul_start:'<ul style="list-style-type:none">',ul_end:"</ul>",li_start:"<li>",li_end:"</li>"},textDict:{wr_start:"",wr_end:"\n",en_start:"",en_end:"\n",ul_start:"\n",ul_end:"",li_start:"\t",li_end:"\n"}};const et={};var tt={__proto__:null,add:function(e,t){et[e]=t},get:function(e){return et[e]},has:function(e){return Object.prototype.hasOwnProperty.call(et,e)},remove:function(e){delete et[e]},list:function(){return Object.keys(et)}};const rt={input:Ue,output:Je,dict:Qe,config:tt},it={};function ot(e,t={}){const r=it[e]={};for(const i in t){if("config"===i){r.config={[e]:t.config},rt.config.add(e,t.config);continue}const o=r[i]={},a=t[i];for(const e in a){const t=a[e];o[e]=!0,rt[i].add(e,t)}}}var at={__proto__:null,add:ot,remove:function(e){const t=it[e];for(const e in t){const r=t[e];for(const t in r)rt[e].remove(t)}delete it[e]},has:function(e){return e in it},list:function(){return Object.keys(it)},input:Ue,output:Je,dict:Qe,config:tt};function nt(){return[]}const st=[[/((?:\[|:|,)\s*)'((?:\\'|[^'])*?[^\\])?'(?=\s*(?:\]|}|,))/g,'$1"$2"'],[/((?:(?:"|]|}|\/[gmiuys]|\.|(?:\d|\.|-)*\d)\s*,|{)\s*)(?:"([^":\n]+?)"|'([^":\n]+?)'|([^":\n]+?))(\s*):/g,'$1"$2$3$4"$5:']],lt={"@empty/text":{parse:nt,parseType:{dataType:"String",predicate:e=>""===e}},"@empty/whitespace+text":{parse:nt,parseType:{dataType:"String",predicate:/^\s+$/}},"@empty":{parse:nt,parseType:{dataType:"Primitive",predicate:e=>null==e}},"@else/json":{parse:function(e){if("string"!=typeof e)return JSON.parse(e);try{return JSON.parse(e)}catch(t){return v.debug("[plugin-common]","Invalid JSON, switching to experimental parser"),st.forEach(([t,r])=>{e=e.replace(t,r)}),JSON.parse(e)}},parseType:{dataType:"String",predicate:/^\s*(\{[\S\s]*\}|\[[\S\s]*\])\s*$/}},"@else/url":{parseType:{dataType:"String",predicate:/^https?:\/\/(([\w-]+\.)*[\w-]+)(:\d+)?(\/[^?/]*)*(\?[^#]*)?(#.*)?$/i}},"@else/jquery":{parse:function(e){return e.val()||e.text()||e.html()},parseType:{dataType:"ComplexObject",predicate:e=>"undefined"!=typeof jQuery&&e instanceof jQuery}},"@else/html":{parse:function(e){return e.value||e.textContent},parseType:{dataType:"ComplexObject",predicate:e=>"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}}};function ct(e,t,r){return e+(t<r.length-1?",":"")}function mt(e,t){const r=Array.isArray(e);let i;return i=r?e.map(e=>ut(e,t)):Object.keys(e).filter(t=>JSON.stringify(e[t])).map(r=>`"${r}": ${ut(e[r],t)}`),i=i.map(ct).map(e=>t.listItem.join(e)),i=t.list.join(i.join("")),r?`[${i}]`:`{${i}}`}function ut(e,t){return"object"==typeof e&&null!==e?0===e.length?"[]":0===Object.keys(e).length?"{}":mt(e,t):JSON.stringify(e)}var pt={data:(e,{type:t,format:r=t||"text",version:i="1.0.2"}={})=>(i<"1.0.2"&&(e=J(e)),"object"===r?V(e):"text"===r?JSON.stringify(e,null,2):(v.warn("[core]","This feature (JSON output with special formatting) is unstable. See https://github.com/larsgw/citation.js/issues/144"),function(e,t){let r=e.map(e=>mt(e,t));return r=r.map(ct).map(e=>t.entry.join(e)),r=r.join(""),t.bibliographyContainer.join(`[${r}]`)}(e,Ze(r)))),ndjson:(e,{version:t="1.0.2"}={})=>(t<"1.0.2"&&(e=J(e)),e.map(e=>JSON.stringify(e)).join("\n"))};function ht(t){const{firstname:r,lastname:i,firstName:o=r,lastName:a=i}=t;return o&&a?{given:o,family:a}:t.name?e(t.name):void 0}ot("@else",{input:lt,output:Object.assign({},pt,Ne)});const ft=["PMID","PMCID","DOI","ISBN"],dt=["ISSN"];function gt(e,t){const r={};for(const i in e){const o=i.toUpperCase();t.includes(o)&&(r[o]=e[i])}if(e.identifier)for(let{id:i,type:o=""}of e.identifier)o=o.toUpperCase(),t.includes(o)&&(r[o]=i);return r}const bt={article:"article",book:"book",booklet:"book",proceedings:"book",mastersthesis:"thesis",inbook:"chapter",incollection:"chapter",conference:"paper-conference",inproceedings:"paper-conference",manual:"report",misc:"document",online:"website",patent:"patent",phdthesis:"thesis",techreport:"report",unpublished:"manuscript"};function yt(e){const t={type:bt[e.type]||"document",title:e.title};if(e.author&&(t.author=e.author.map(ht).filter(Boolean)),e.editor&&(t.editor=e.editor.map(ht).filter(Boolean)),e.reviewer&&(e.author&&(t["reviewed-author"]=t.author),t.author=e.reviewer.map(ht).filter(Boolean)),Array.isArray(e.keywords)?t.keyword=e.keywords.join():e.keywords&&(t.keyword=e.keywords),e.publisher&&(t.publisher=e.publisher.name||e.publisher),e.date&&e.date.published?t.issued=r(e.date.published):e.year&&(t.issued={"date-parts":[[+e.year]]}),e.date&&e.date.submitted&&(t.submitted=r(e.date.submitted)),e.journal){const r=e.journal;r.name&&(t["container-title"]=r.name),r.volume&&(t.volume=r.volume),r.issue&&(t.issue=r.issue),Object.assign(t,gt(r,dt)),r.firstpage&&(t["page-first"]=r.firstpage),r.pages?t.page=r.pages.replace("--","-"):r.firstpage&&r.lastpage&&(t.page=r.firstpage+"-"+r.lastpage)}return e.link&&"object"==typeof e.link[0]&&(t.URL=e.link[0].url),Object.assign(t,gt(e,ft)),e.cid?t.id=e.cid:t.DOI&&(t.id=t.DOI),t}const vt=["fulltext_html","fulltext_xml","fulltext_pdf"],xt=["name","lastname","lastName","firstname","firstName"],wt={"@bibjson/quickscrape+record+object":{parse:function(e){return Object.assign(yt(e),{type:"article-journal"})},parseType:{propertyConstraint:{props:"link",value:e=>vt.some(t=>e.find(({type:e})=>e===t))},extends:"@bibjson/record+object"}},"@bibjson/record+object":{parse:function(e){return yt(e)},parseType:{dataType:"SimpleObject",propertyConstraint:[{props:"title"},{props:["author","editor"],match:"some",value:e=>Array.isArray(e)&&e[0]&&xt.some(t=>t in e[0])}]}},"@bibjson/collection+object":{parse:e=>e.records,parseType:{dataType:"SimpleObject",propertyConstraint:[{props:"metadata",value:e=>"collection"in e},{props:"records",value:e=>Array.isArray(e)}]}}};ot("@bibjson",{input:wt});var kt=X(function(e){!function(t,r){e.exports?e.exports=r():t.moo=r()}(K,function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r="boolean"==typeof(new RegExp).sticky;function i(e){return e&&"[object RegExp]"===t.call(e)}function o(e){return e&&"object"==typeof e&&!i(e)&&!Array.isArray(e)}function a(e){return e.length?"(?:"+e.map(function(e){return"(?:"+e+")"}).join("|")+")":"(?!)"}function n(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(i(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function s(e,t){return e.length>t?e:Array(t-e.length+1).join(" ")+e}function l(t,r){if(o(r)||(r={match:r}),r.include)throw new Error("Matching rules cannot also include states");var a={defaultType:t,lineBreaks:!!r.error||!!r.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var n in r)e.call(r,n)&&(a[n]=r[n]);if("string"==typeof a.type&&t!==a.type)throw new Error("Type transform cannot be a string (type '"+a.type+"' for token '"+t+"')");var s=a.match;return a.match=Array.isArray(s)?s:s?[s]:[],a.match.sort(function(e,t){return i(e)&&i(t)?0:i(t)?-1:i(e)?1:t.length-e.length}),a}function c(e){return Array.isArray(e)?function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];if(i.include)for(var o=[].concat(i.include),a=0;a<o.length;a++)t.push({include:o[a]});else{if(!i.type)throw new Error("Rule has no type: "+JSON.stringify(i));t.push(l(i.type,i))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),r=[],i=0;i<t.length;i++){var a=t[i],n=[].concat(e[a]);if("include"!==a){var s=[];n.forEach(function(e){o(e)?(s.length&&r.push(l(a,s)),r.push(l(a,e)),s=[]):s.push(e)}),s.length&&r.push(l(a,s))}else for(var c=0;c<n.length;c++)r.push({include:n[c]})}return r}(e)}var m=l("error",{lineBreaks:!0,shouldThrow:!0});function u(e,t){for(var o=null,s=Object.create(null),l=!0,c=null,u=[],p=[],h=0;h<e.length;h++)e[h].fallback&&(l=!1);for(h=0;h<e.length;h++){var f=e[h];if(f.include)throw new Error("Inheritance is not allowed in stateless lexers");if(f.error||f.fallback){if(o)throw!f.fallback==!o.fallback?new Error("Multiple "+(f.fallback?"fallback":"error")+" rules not allowed (for token '"+f.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+f.defaultType+"')");o=f}var d=f.match.slice();if(l)for(;d.length&&"string"==typeof d[0]&&1===d[0].length;)s[d.shift().charCodeAt(0)]=f;if(f.pop||f.push||f.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+f.defaultType+"')");if(f.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+f.defaultType+"')")}if(0!==d.length){l=!1,u.push(f);for(var g=0;g<d.length;g++){var b=d[g];if(i(b))if(null===c)c=b.unicode;else if(c!==b.unicode&&!1===f.fallback)throw new Error("If one rule is /u then all must be")}var y=a(d.map(n)),v=new RegExp(y);if(v.test(""))throw new Error("RegExp matches empty string: "+v);if(new RegExp("|"+y).exec("").length-1>0)throw new Error("RegExp has capture groups: "+v+"\nUse (?: … ) instead");if(!f.lineBreaks&&v.test("\n"))throw new Error("Rule should declare lineBreaks: "+v);p.push("("+y+")")}}var x=o&&o.fallback,w=r&&!x?"ym":"gm",k=r||x?"":"|";return!0===c&&(w+="u"),{regexp:new RegExp(a(p)+k,w),groups:u,fast:s,error:o||m}}function p(e,t,r){var i=e&&(e.push||e.next);if(i&&!r[i])throw new Error("Missing state '"+i+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var h=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};h.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedText=t?t.queuedText:"",this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},h.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},h.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},h.prototype.popState=function(){this.setState(this.stack.pop())},h.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var f=r?function(e,t){return e.exec(t)}:function(e,t){var r=e.exec(t);return 0===r[0].length?null:r};function d(){return this.value}if(h.prototype._getGroup=function(e){for(var t=this.groups.length,r=0;r<t;r++)if(void 0!==e[r+1])return this.groups[r];throw new Error("Cannot find token type for matched text")},h.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var r=this.buffer;if(e!==r.length){if(n=this.fast[r.charCodeAt(e)])return this._token(n,r.charAt(e),e);var i=this.re;i.lastIndex=e;var o=f(i,r),a=this.error;if(null==o)return this._token(a,r.slice(e,r.length),e);var n=this._getGroup(o),s=o[0];return a.fallback&&o.index!==e?(this.queuedGroup=n,this.queuedText=s,this._token(a,r.slice(e,o.index),e)):this._token(n,s,e)}},h.prototype._token=function(e,t,r){var i=0;if(e.lineBreaks){var o=/\n/g,a=1;if("\n"===t)i=1;else for(;o.exec(t);)i++,a=o.lastIndex}var n={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:d,offset:r,lineBreaks:i,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=i,0!==i?this.col=s-a+1:this.col+=s,e.shouldThrow)throw new Error(this.formatError(n,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),n},"undefined"!=typeof Symbol&&Symbol.iterator){var g=function(e){this.lexer=e};g.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},g.prototype[Symbol.iterator]=function(){return this},h.prototype[Symbol.iterator]=function(){return new g(this)}}return h.prototype.formatError=function(e,t){if(null==e){var r=this.buffer.slice(this.index);e={text:r,offset:this.index,lineBreaks:-1===r.indexOf("\n")?0:1,line:this.line,col:this.col}}var i=Math.max(e.line-2,1),o=String(e.line+2).length,a=function(e,t){for(var r=e.length,i=0;;){var o=e.lastIndexOf("\n",r-1);if(-1===o)break;if(r=o,++i===t)break;if(0===r)break}return e.substring(i<t?0:r+1).split("\n")}(this.buffer,this.line-e.line+2+1).slice(0,5),n=[];n.push(t+" at line "+e.line+" col "+e.col+":"),n.push("");for(var l=0;l<a.length;l++){var c=a[l],m=i+l;n.push(s(String(m),o)+" "+c),m===e.line&&n.push(s("",o+e.col+1)+"^")}return n.join("\n")},h.prototype.clone=function(){return new h(this.states,this.state)},h.prototype.has=function(e){return!0},{compile:function(e){var t=u(c(e));return new h({start:t},"start")},states:function(e,t){var r=e.$all?c(e.$all):[];delete e.$all;var i=Object.getOwnPropertyNames(e);t||(t=i[0]);for(var o=Object.create(null),a=0;a<i.length;a++)o[v=i[a]]=c(e[v]).concat(r);for(a=0;a<i.length;a++)for(var n=o[v=i[a]],s=Object.create(null),l=0;l<n.length;l++){var m=n[l];if(m.include){var f=[l,1];if(m.include!==v&&!s[m.include]){s[m.include]=!0;var d=o[m.include];if(!d)throw new Error("Cannot include nonexistent state '"+m.include+"' (in state '"+v+"')");for(var g=0;g<d.length;g++){var b=d[g];-1===n.indexOf(b)&&f.push(b)}}n.splice.apply(n,f),l--}}var y=Object.create(null);for(a=0;a<i.length;a++){var v;y[v=i[a]]=u(o[v],!0)}for(a=0;a<i.length;a++){var x=i[a],w=y[x],k=w.groups;for(l=0;l<k.length;l++)p(k[l],x,y);var T=Object.getOwnPropertyNames(w.fast);for(l=0;l<T.length;l++)p(w.fast[T[l]],x,y)}return new h(y,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t="undefined"!=typeof Map,r=t?new Map:Object.create(null),i=Object.getOwnPropertyNames(e),o=0;o<i.length;o++){var a=i[o],n=e[a];(Array.isArray(n)?n:[n]).forEach(function(e){if("string"!=typeof e)throw new Error("keyword must be string (in keyword '"+a+"')");t?r.set(e,a):r[e]=a})}return function(e){return t?r.get(e):r[e]}}}})});const Tt={biblatex:{article:["author","title","journaltitle",["year","date"]],book:["author","title",["year","date"]],mvbook:["author","title",["year","date"]],inbook:["author","title","booktitle",["year","date"]],booklet:[["author","editor"],"title",["year","date"]],collection:["editor","title",["year","date"]],mvcollection:["editor","title",["year","date"]],incollection:["author","title","booktitle",["year","date"]],dataset:[["author","editor"],"title",["year","date"]],online:[["author","editor"],"title",["year","date"],["doi","eprint","url"]],patent:["author","title","number",["year","date"]],periodical:["editor","title",["year","date"]],proceedings:["title",["year","date"]],mvproceedings:["title",["year","date"]],inproceedings:["author","title","booktitle",["year","date"]],report:["author","title","type","institution",["year","date"]],thesis:["author","title","type","institution",["year","date"]],unpublished:["author","title",["year","date"]],conference:["author","title","booktitle",["year","date"]],electronic:[["author","editor"],"title",["year","date"],["doi","eprint","url"]],mastersthesis:["author","title","institution",["year","date"]],phdthesis:["author","title","institution",["year","date"]],techreport:["author","title","institution",["year","date"]],www:[["author","editor"],"title",["year","date"],["doi","eprint","url"]]},bibtex:{article:["author","title","journal","year"],book:[["author","editor"],"title","publisher","year"],booklet:["title"],inbook:[["author","editor"],"title",["chapter","pages"],"publisher","year"],incollection:["author","title","booktitle","publisher","year"],inproceedings:["author","title","booktitle","year"],mastersthesis:["author","title","school","year"],phdthesis:["author","title","school","year"],proceedings:["title","year"],techreport:["author","title","institution","year"],unpublished:["author","title","note"]}},Et={abstract:["field","literal"],addendum:["field","literal"],afterword:["list","name"],annotation:["field","literal"],annotator:["list","name"],author:["list","name"],authortype:["field","key"],bookauthor:["list","name"],bookpagination:["field","key"],booksubtitle:["field","literal"],booktitle:["field","title"],booktitleaddon:["field","literal"],chapter:["field","literal"],commentator:["list","name"],date:["field","date"],doi:["field","verbatim"],edition:["field","literal"],editor:["list","name"],editora:["list","name"],editorb:["list","name"],editorc:["list","name"],editortype:["field","key"],editoratype:["field","key"],editorbtype:["field","key"],editorctype:["field","key"],eid:["field","literal"],entrysubtype:["field","literal"],eprint:["field","verbatim"],eprintclass:["field","literal"],eprinttype:["field","literal"],eventdate:["field","date"],eventtitle:["field","title"],eventtitleaddon:["field","literal"],file:["field","verbatim"],foreword:["list","name"],holder:["list","name"],howpublished:["field","literal"],indextitle:["field","literal"],institution:["list","literal"],introduction:["list","name"],isan:["field","literal"],isbn:["field","literal"],ismn:["field","literal"],isrn:["field","literal"],issn:["field","literal"],issue:["field","literal"],issuesubtitle:["field","literal"],issuetitle:["field","literal"],iswc:["field","literal"],journalsubtitle:["field","literal"],journaltitle:["field","literal"],label:["field","literal"],language:["list","key"],library:["field","literal"],location:["list","literal"],mainsubtitle:["field","literal"],maintitle:["field","title"],maintitleaddon:["field","literal"],month:["field","literal"],nameaddon:["field","literal"],note:["field","literal"],number:["field","literal"],organization:["list","literal"],origdate:["field","date"],origlanguage:["list","key"],origlocation:["list","literal"],origpublisher:["list","literal"],origtitle:["field","title"],pages:["field","range"],pagetotal:["field","literal"],pagination:["field","key"],part:["field","literal"],publisher:["list","literal"],pubstate:["field","key"],reprinttitle:["field","literal"],series:["field","title"],shortauthor:["list","name"],shorteditor:["list","name"],shorthand:["field","literal"],shorthandintro:["field","literal"],shortjournal:["field","literal"],shortseries:["field","literal"],shorttitle:["field","title"],subtitle:["field","literal"],title:["field","title"],titleaddon:["field","literal"],translator:["list","name"],type:["field","title"],url:["field","uri"],urldate:["field","date"],venue:["field","literal"],version:["field","literal"],volume:["field","integer"],volumes:["field","integer"],year:["field","literal"],crossref:["field","entry key"],entryset:["separated","literal"],execute:["field","code"],gender:["field","gender"],langid:["field","identifier"],langidopts:["field","literal"],ids:["separated","entry key"],indexsorttitle:["field","literal"],keywords:["separated","literal"],options:["separated","options"],presort:["field","string"],related:["separated","literal"],relatedoptions:["separated","literal"],relatedtype:["field","identifier"],relatedstring:["field","literal"],sortkey:["field","literal"],sortname:["list","name"],sortshorthand:["field","literal"],sorttitle:["field","literal"],sortyear:["field","integer"],xdata:["separated","entry key"],xref:["field","entry key"],namea:["list","name"],nameb:["list","name"],namec:["list","name"],nameatype:["field","key"],namebtype:["field","key"],namectype:["field","key"],lista:["list","literal"],listb:["list","literal"],listc:["list","literal"],listd:["list","literal"],liste:["list","literal"],listf:["list","literal"],usera:["field","literal"],userb:["field","literal"],userc:["field","literal"],userd:["field","literal"],usere:["field","literal"],userf:["field","literal"],verba:["field","literal"],verbb:["field","literal"],verbc:["field","literal"],address:["list","literal"],annote:["field","literal"],archiveprefix:["field","literal"],journal:["field","literal"],key:["field","literal"],pdf:["field","verbatim"],primaryclass:["field","literal"],school:["list","literal"],numpages:["field","integer"],pmid:["field","literal"],pmcid:["field","literal"]},jt={"`":"̀","'":"́","^":"̂","~":"̃","=":"̄",u:"̆",".":"̇",'"':"̈",r:"̊",H:"̋",v:"̌",b:"̲",d:"̣",c:"̧",k:"̨",t:"͡",textcommabelow:"̦"},St={textquotesingle:"'",textasciigrave:"`",textquotedbl:'"',textdollar:"$",textless:"<",textgreater:">",textbackslash:"\\",textasciicircum:"^",textunderscore:"_",textbraceleft:"{",textbar:"|",textbraceright:"}",textasciitilde:"~",textexclamdown:"¡",textcent:"¢",textsterling:"£",textcurrency:"¤",textyen:"¥",textbrokenbar:"¦",textsection:"§",textasciidieresis:"¨",textcopyright:"©",textordfeminine:"ª",guillemetleft:"«",guillemotleft:"«",textlnot:"¬",textregistered:"®",textasciimacron:"¯",textdegree:"°",textpm:"±",texttwosuperior:"²",textthreesuperior:"³",textasciiacute:"´",textmu:"µ",textparagraph:"¶",textperiodcentered:"·",textonesuperior:"¹",textordmasculine:"º",guillemetright:"»",guillemotright:"»",textonequarter:"¼",textonehalf:"½",textthreequarters:"¾",textquestiondown:"¿",AE:"Æ",DH:"Ð",texttimes:"×",O:"Ø",TH:"Þ",ss:"ß",ae:"æ",dh:"ð",textdiv:"÷",o:"ø",th:"þ",DJ:"Đ",dj:"đ",i:"ı",IJ:"IJ",ij:"ij",L:"Ł",l:"ł",NG:"Ŋ",ng:"ŋ",OE:"Œ",oe:"œ",textflorin:"ƒ",j:"ȷ",textasciicaron:"ˇ",textasciibreve:"˘",textacutedbl:"˝",textgravedbl:"˵",texttildelow:"˷",textbaht:"฿",SS:"ẞ",textcompwordmark:"",textendash:"–",textemdash:"—",textbardbl:"‖",textquoteleft:"‘",textquoteright:"’",quotesinglbase:"‚",textquotedblleft:"“",textquotedblright:"”",quotedblbase:"„",textdagger:"†",textdaggerdbl:"‡",textbullet:"•",textellipsis:"…",textperthousand:"‰",textpertenthousand:"‱",guilsinglleft:"‹",guilsinglright:"›",textreferencemark:"※",textinterrobang:"‽",textfractionsolidus:"⁄",textlquill:"⁅",textrquill:"⁆",textdiscount:"⁒",textcolonmonetary:"₡",textlira:"₤",textnaira:"₦",textwon:"₩",textdong:"₫",texteuro:"€",textpeso:"₱",textcelsius:"℃",textnumero:"№",textcircledP:"℗",textrecipe:"℞",textservicemark:"℠",texttrademark:"™",textohm:"Ω",textmho:"℧",textestimated:"℮",textleftarrow:"←",textuparrow:"↑",textrightarrow:"→",textdownarrow:"↓",textminus:"−",Hwithstroke:"Ħ",hwithstroke:"ħ",textasteriskcentered:"∗",textsurd:"√",textlangle:"〈",textrangle:"〉",textblank:"␢",textvisiblespace:"␣",textopenbullet:"◦",textbigcircle:"◯",textmusicalnote:"♪",textmarried:"⚭",textdivorced:"⚮",textinterrobangdown:"⸘",textcommabelow:null,copyright:"©",Gamma:"Γ",Delta:"Δ",Theta:"Θ",Lambda:"Λ",Xi:"Ξ",Pi:"Π",Sigma:"Σ",Phi:"Φ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",varepsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",pi:"π",rho:"ρ",varsigma:"ς",sigma:"σ",tau:"τ",upsilon:"υ",varphi:"φ",chi:"χ",psi:"ψ",omega:"ω",vartheta:"ϑ",Upsilon:"ϒ",phi:"ϕ",varpi:"ϖ",varrho:"ϱ",epsilon:"ϵ"},Ot={jan:"01",feb:"02",mar:"03",apr:"04",may:"05",jun:"06",jul:"07",aug:"08",sep:"09",oct:"10",nov:"11",dec:"12",acmcs:"ACM Computing Surveys",acta:"Acta Informatica",cacm:"Communications of the ACM",ibmjrd:"IBM Journal of Research and Development",ibmsj:"IBM Systems Journal",ieeese:"IEEE Transactions on Software Engineering",ieeetc:"IEEE Transactions on Computers",ieeetcad:"IEEE Transactions on Computer-Aided Design of Integrated Circuits",ipl:"Information Processing Letters",jacm:"Journal of the ACM",jcss:"Journal of Computer and System Sciences",scp:"Science of Computer Programming",sicomp:"SIAM Journal on Computing",tocs:"ACM Transactions on Computer Systems",tods:"ACM Transactions on Database Systems",tog:"ACM Transactions on Graphics",toms:"ACM Transactions on Mathematical Software",toois:"ACM Transactions on Office Information Systems",toplas:"ACM Transactions on Programming Languages and Systems",tcs:"Theoretical Computer Science"},_t={it:"italics",itshape:"italics",sl:"italics",slshape:"italics",em:"italics",bf:"bold",bfseries:"bold",sc:"smallcaps",scshape:"smallcaps",rm:void 0,sf:void 0,tt:void 0},At={textit:"italics",textsl:"italics",emph:"italics",mkbibitalic:"italics",mkbibemph:"italics",textbf:"bold",strong:"bold",mkbibbold:"bold",textsc:"smallcaps",textsuperscript:"superscript",textsubscript:"subscript",enquote:"quotes",mkbibquote:"quotes",textmd:void 0,textrm:void 0,textsf:void 0,texttt:void 0,textup:void 0},Ct={italics:["<i>","</i>"],bold:["<b>","</b>"],superscript:["<sup>","</sup>"],subscript:["<sub>","</sub>"],smallcaps:['<span style="font-variant:small-caps;">',"</span>"],nocase:['<span class="nocase">',"</span>"],quotes:["“","”"]},Rt={ElsevierGlyph:e=>String.fromCharCode(parseInt(e,16)),href:(e,t)=>e,url:e=>e},It=/---?|''|``|~/g,Bt={"--":"–","---":"—","``":"“","''":"”","~":" "},Pt={"^":"superscript",sp:"superscript",_:"subscript",sb:"subscript",mathrm:void 0},Lt={"^":{0:"⁰",1:"¹",2:"²",3:"³",4:"⁴",5:"⁵",6:"⁶",7:"⁷",8:"⁸",9:"⁹","+":"⁺","-":"⁻","=":"⁼","(":"⁽",")":"⁾",i:"ⁱ",n:"ⁿ"},_:{0:"₀",1:"₁",2:"₂",3:"₃",4:"₄",5:"₅",6:"₆",7:"₇",8:"₈",9:"₉","+":"₊","-":"₋","=":"₌","(":"₍",")":"₎",a:"ₐ",e:"ₑ",o:"ₒ",x:"ₓ",ə:"ₔ",h:"ₕ",k:"ₖ",l:"ₗ",m:"ₘ",n:"ₙ",s:"ₚ",p:"ₛ",t:"ₜ"}},zt=["american","british","canadian","english","australian","newzealand","usenglish","ukenglish","en","eng","en-au","en-bz","en-ca","en-cb","en-gb","en-ie","en-jm","en-nz","en-ph","en-tt","en-us","en-za","en-zw","anglais"];var Ut={__proto__:null,required:Tt,fieldTypes:Et,diacritics:jt,commands:St,defaultStrings:Ot,formattingEnvs:_t,formattingCommands:At,formatting:Ct,argumentCommands:Rt,ligaturePattern:It,ligatures:Bt,mathScriptFormatting:Pt,mathScripts:Lt,sentenceCaseLanguages:zt};const Dt=/[a-zA-Z_][a-zA-Z0-9_:-]*/,$t={comment:/%.*/,whitespace:{match:/\s+/,lineBreaks:!0}},Nt=kt.states({main:{junk:{match:/@[cC][oO][mM][mM][eE][nN][tT].+|[^@]+/,lineBreaks:!0},at:{match:"@",push:"entry"}},entry:B({},$t,{otherEntryType:{match:/[sS][tT][rR][iI][nN][gG]|[pP][rR][eE][aA][mM][bB][lL][eE]/,next:"otherEntryContents"},dataEntryType:{match:Dt,next:"dataEntryContents"}}),otherEntryContents:B({},$t,{lbrace:{match:/[{(]/,next:"fields"}}),dataEntryContents:B({},$t,{lbrace:{match:/[{(]/,next:"dataEntryContents"},label:/[^,\s]+/,comma:{match:",",next:"fields"}}),fields:B({},$t,{identifier:Dt,number:/-?\d+/,hash:"#",equals:"=",comma:",",quote:{match:'"',push:"quotedLiteral"},lbrace:{match:"{",push:"bracedLiteral"},rbrace:{match:/[})]/,pop:!0}}),quotedLiteral:{lbrace:{match:"{",push:"bracedLiteral"},quote:{match:'"',pop:!0},text:{match:/(?:\\[\\{]|[^{"])+/,lineBreaks:!0}},bracedLiteral:{lbrace:{match:"{",push:"bracedLiteral"},rbrace:{match:"}",pop:!0},text:{match:/(?:\\[\\{}]|[^{}])+/,lineBreaks:!0}}}),Mt={"(":")","{":"}"},qt=new xe({Main(){const e=[];for(;;){for(;this.matchToken("junk");)this.consumeToken("junk");if(this.matchEndOfFile())break;e.push(this.consumeRule("Entry"))}return e.filter(Boolean)},_(){let e;for(;e!==this.token;)e=this.token,this.consumeToken("whitespace",!0),this.consumeToken("comment",!0)},Entry(){this.consumeToken("at"),this.consumeRule("_");const e=(this.matchToken("otherEntryType")?this.consumeToken("otherEntryType"):this.consumeToken("dataEntryType")).value.toLowerCase();this.consumeRule("_");const t=this.consumeToken("lbrace").value;let r;if(this.consumeRule("_"),"string"===e){const[e,t]=this.consumeRule("Field");this.state.strings[e]=t}else if("preamble"===e)this.consumeRule("Expression");else{const t=this.consumeToken("label").value;this.consumeRule("_"),this.consumeToken("comma"),this.consumeRule("_"),r={type:e,label:t,properties:this.consumeRule("EntryBody")}}this.consumeRule("_");const i=this.consumeToken("rbrace").value;return i!==Mt[t]&&v.warn("[plugin-bibtex]",`entry started with "${t}", but ends with "${i}"`),r},EntryBody(){const e={};for(;this.matchToken("identifier");){const[t,r]=this.consumeRule("Field");if(e[t]=r,this.consumeRule("_"),!this.consumeToken("comma",!0))break;this.consumeRule("_")}return e},Field(){const e=this.consumeToken("identifier").value.toLowerCase();return this.consumeRule("_"),this.consumeToken("equals"),this.consumeRule("_"),[e,this.consumeRule("Expression")]},Expression(){let e=this.consumeRule("ExpressionPart");for(this.consumeRule("_");this.matchToken("hash");)this.consumeToken("hash"),this.consumeRule("_"),e+=this.consumeRule("ExpressionPart").toString(),this.consumeRule("_");return e},ExpressionPart(){return this.matchToken("identifier")?this.state.strings[this.consumeToken("identifier").value.toLowerCase()]||"":this.matchToken("number")?parseInt(this.consumeToken("number")):this.matchToken("quote")?this.consumeRule("QuoteString"):this.consumeRule("BracketString")},QuoteString(){let e="";for(this.consumeToken("quote");!this.matchToken("quote");)e+=this.consumeRule("Text");return this.consumeToken("quote"),e},BracketString(){let e="";for(this.consumeToken("lbrace");!this.matchToken("rbrace");)e+=this.consumeRule("Text");return this.consumeToken("rbrace"),e},Text(){return this.matchToken("lbrace")?`{${this.consumeRule("BracketString")}}`:this.consumeToken("text").value}},{strings:Ot});function Ft(e){return qt.parse(Nt.reset(e))}const Ht=/\n\s*(?=\[)/g,Gt=/^\[(.+?)\]\s*(?:\n([\s\S]+))?$/,Jt=/((?=.)\s)*\n\s*/g,Vt=/:(.*)/,Kt=e=>{const[,t,r]=e.match(Gt)||[];if(t&&r){const e={type:"book",label:t,properties:{}};return r.trim().split(Jt).filter(e=>e).forEach(t=>{let[r,i]=t.split(Vt);i&&(r=r.trim(),i=i.trim(),"type"===r?e.type=i:e.properties[r]=i)}),e}return{}},Wt={source:{article:"article-journal",book:"book",mvbook:"book",inbook:"chapter",bookinbook:"book",booklet:"book",collection:"book",mvcollection:"book",incollection:"chapter",dataset:"dataset",online:"webpage",patent:"patent",periodical:"article-journal",proceedings:"book",mvproceedings:"book",inproceedings:"paper-conference",reference:"book",mvreference:"book",inreference:"entry",report:"report",software:"book",thesis:"thesis",unpublished:"manuscript",artwork:"graphic",audio:"song",image:"figure",jurisdiction:"legal_case",legislation:"legislation",legal:"treaty",letter:"personal_communication",movie:"motion_picture",music:"musical_score",review:"review",video:"motion_picture",conference:"paper-conference",electronic:"webpage",mastersthesis:"thesis",phdthesis:"thesis",techreport:"report",www:"webpage"},target:{article:"article","article-journal":"article","article-magazine":"article","article-newspaper":"article",bill:"legislation",book:"book",broadcast:"audio",chapter:"inbook",dataset:"dataset",entry:"inreference","entry-dictionary":"inreference","entry-encyclopedia":"inreference",figure:"artwork",graphic:"artwork",interview:"audio",legal_case:"jurisdiction",legislation:"legislation",manuscript:"unpublished",motion_picture:"movie",musical_score:"music","paper-conference":"inproceedings",patent:"patent",personal_communication:"letter",post:"online","post-weblog":"online",report:"report",review:"review","review-book":"review",song:"music",speech:"audio",thesis:"thesis",treaty:"legal",webpage:"online"}},Xt={source:{article:"article-journal",book:"book",booklet:"book",conference:"paper-conference",inbook:"chapter",incollection:"chapter",inproceedings:"paper-conference",mastersthesis:"thesis",phdthesis:"thesis",proceedings:"book",techreport:"report",unpublished:"manuscript"},target:{article:"article","article-journal":"article","article-magazine":"article","article-newspaper":"article",book:"book",chapter:"inbook",manuscript:"unpublished","paper-conference":"inproceedings",report:"techreport",review:"article","review-book":"article"}};var Yt={constants:Ut,types:{biblatex:Wt,bibtex:Xt},parse:{biblatex:!0,strict:!1,sentenceCase:"never"},format:{useIdAsLabel:!1}};const Zt=new Set(["the","a","an"]),Qt=/(?:<\/?.*?>|[\u0020-\u002F\u003A-\u0040\u005B-\u005E\u0060\u007B-\u007F])+/g,er=/[^\u0020-\u007F]+/g;function tr(e){return e?e.normalize("NFKD").replace(er,"").split(Qt).find(e=>e.length&&!Zt.has(e.toLowerCase())):""}const rr=new ke([{source:"given",target:"given"},{source:"family",target:"family"},{source:"suffix",target:"suffix"},{source:"prefix",target:"non-dropping-particle"},{source:"family",target:"literal",when:{source:!1,target:{family:!1,given:!1}}}]),ir=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],or="BibTeX type",ar="BibTeX label",nr={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12,january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12},sr={bathesis:"Bachelor's thesis",mathesis:"Master's thesis",phdthesis:"PhD thesis",candthesis:"Candidate thesis",techreport:"technical report",resreport:"research report",software:"computer software",datacd:"data cd",audiocd:"audio cd",patent:"patent",patentde:"German patent",patenteu:"European patent",patentfr:"French patent",patentuk:"British patent",patentus:"U.S. patent",patreq:"patent request",patreqde:"German patent request",patreqeu:"European patent request",patreqfr:"French patent request",patrequk:"British patent request",patrequs:"U.S. patent request"},lr=/(^(?:ISAN )?(?:[0-9a-f]{4}-){4}[0-9a-z](?:-(?:[0-9a-f]{4}-){2}[0-9a-z])?$)|(^(?:979-?0-?|M-?)(?:\d{9}|(?=[\d-]{11}$)\d+-\d+-\d)$)|(^ISRN .{1,36}$)|(^(?:ISWC )?T-?\d{9}-?\d$)/i;function cr(e){if(null==e)return[];if(+e)return[parseInt(e,10)];if((e=e.trim().toLowerCase())in nr)return[nr[e]];const t=e.split(/\s+/);let r,i;return t[0]in nr?(r=nr[t[0]],i=parseInt(t[1])):t[1]in nr&&(r=nr[t[1]],i=parseInt(t[0])),i?[r,i]:r?[r]:[]}const mr={PICK:{toTarget:(...e)=>e.find(Boolean),toSource:e=>[e]},DATE:{toTarget(e){const t=e.split("/").map(e=>e&&".."!==e?function(e){const t=e.split("T")[0].replace(/[?~%]$/,"").split("-"),r=+t[0].replace(/^Y(?=-?\d{4}\d+)/,"").replace(/X/g,"0"),i=+t[1],o=+t[2];return!i||i>20?[r]:o?[r,i,o]:[r,i]}(e):void 0);return isNaN(t[0][0])?{literal:e}:{"date-parts":t}},toSource(e){if("date-parts"in e)return e["date-parts"].map(e=>e.map(e=>e.toString().padStart(2,"0")).join("-")).join("/")}},YEAR_MONTH:{toTarget:(e,t,r)=>isNaN(+e)?{literal:e}:isNaN(+r)||isNaN(+t)?{"date-parts":[[+e,...cr(t)]]}:{"date-parts":[[+e,+t,+r]]},toSource(e){if("date-parts"in e){const[t,r,i]=e["date-parts"][0];return[t.toString(),r?i?`${ir[r-1]} ${i}`:r:void 0]}}},EPRINT:{toTarget(e,t){if("pubmed"===t)return e},toSource:e=>[e,"pubmed"]},HOW_PUBLISHED:{toTarget(e){if(e.startsWith("http"))return e}},KEYWORDS:{toTarget:e=>e.join(","),toSource:e=>e.split(",")},LABEL:{toTarget:e=>[e,e],toSource(e,t,r,i,o,a){let n;return n=null===e?"null":void 0===e?"undefined":e.toString().replace(Qt,""),Yt.format.useIdAsLabel?n:t&&!Qt.test(t)?t:function(e,t,r,i){let o="";return e&&e[0]&&(o+=tr(e[0].family||e[0].literal)),t&&t["date-parts"]&&t["date-parts"][0]&&(o+=t["date-parts"][0][0]),r?o+=r:i&&(o+=tr(i)),o}(r,i,o,a)||n}},NAMES:{toTarget:e=>e.map(rr.convertToTarget),toSource:e=>e.map(rr.convertToSource)},STANDARD_NUMBERS:{toTarget:(...e)=>e.find(Boolean),toSource(e){const t=e.toString().match(lr);return t?t.slice(1,5):[]}},STATUS:{toSource(e){if(/^(inpreparation|submitted|forthcoming|inpress|prepublished)$/i.test(e))return e}},TITLE:{toTarget:(e,t,r)=>(t&&(e+=": "+t),e),toSource:e=>[e]}},ur=[{source:"note",target:"accessed",when:{source:!1,target:{note:!1,addendum:!1}},convert:{toSource:e=>`[Online; accessed ${i(e)}]`}},{source:"numpages",target:"number-of-pages",when:{source:{pagetotal:!1},target:!1}},{source:"pmid",target:"PMID",when:{source:{eprinttype:e=>"pmid"!==e,archiveprefix:e=>"pmid"!==e},target:!1}},{source:"pmcid",target:"PMCID",when:{target:!1}},{source:"s2id",target:"custom",convert:{toTarget:e=>({S2ID:e}),toSource:({S2ID:e})=>e}}];var pr=new ke([{source:"annote",target:"annote",when:{source:{annotation:!1},target:!1}},{source:"address",target:"publisher-place",convert:mr.PICK,when:{source:{location:!1},target:!1}},{source:["eprint","archiveprefix"],target:"PMID",convert:mr.EPRINT,when:{source:{eprinttype:!1},target:!1}},{source:"journal",target:"container-title",when:{source:{maintitle:!1,booktitle:!1,journaltitle:!1},target:!1}},{source:"school",target:"publisher",convert:mr.PICK,when:{source:{institution:!1,organization:!1,publisher:!1},target:!1}},...ur,{source:"abstract",target:"abstract"},{source:"urldate",target:"accessed",convert:mr.DATE},{source:"annotation",target:"annote"},{source:"author",target:"author",convert:mr.NAMES},{source:"library",target:"call-number"},{source:"chapter",target:"chapter-number"},{source:"bookauthor",target:"container-author",convert:mr.NAMES},{source:["maintitle","mainsubtitle","maintitleaddon"],target:"container-title",when:{source:!0,target:{"number-of-volumes":!0}},convert:mr.TITLE},{source:["booktitle","booksubtitle","booktitleaddon"],target:"container-title",when:{source:{maintitle:!1},target:{"number-of-volumes":!1,type:e=>!e||!e.startsWith("article")}},convert:mr.TITLE},{source:["journaltitle","journalsubtitle","journaltitleaddon"],target:"container-title",when:{source:{[or]:"article"},target:{type:["article","article-newspaper","article-journal","article-magazine"]}},convert:mr.TITLE},{source:"shortjournal",target:"container-title-short",when:{source:{[or]:"article"},target:{type:["article","article-newspaper","article-journal","article-magazine"]}}},{source:"shortjournal",target:"journalAbbreviation",when:{source:!1,target:{"container-title-short":!1}}},{source:"number",target:"collection-number",when:{source:{[or]:["book","mvbook","inbook","bookinbook","suppbook","collection","mvcollection","incollection","suppcollection","manual","suppperiodical","proceedings","mvproceedings","refererence"]},target:{type:["bill","book","broadcast","chapter","dataset","entry","entry-dictionary","entry-encyclopedia","figure","graphic","interview","legislation","legal_case","manuscript","map","motion_picture","musical_score","pamphlet","post","post-weblog","personal_communication","review","review-book","song","speech","thesis","treaty","webpage"]}}},{source:"series",target:"collection-title"},{source:"shortseries",target:"collection-title-short"},{source:"doi",target:"DOI"},{source:"edition",target:"edition"},{source:"editor",target:"editor",convert:mr.NAMES},{source:[or,"entrysubtype","type"],target:["type","genre"],convert:{toTarget:(e,t,r)=>(r||("mastersthesis"===e&&(r="mathesis"),"phdthesis"===e&&(r="phdthesis"),"techreport"===e&&(r="techreport")),[Wt.source[e]||"document",r||t]),toSource(e,t){const r=Wt.target[e]||"misc";return t in sr?[r,void 0,t]:[r,t]}}},{source:or,when:{target:{type:!1}},convert:{toSource:()=>"misc"}},{source:"eventdate",target:"event-date",convert:mr.DATE},{source:"venue",target:"event-place"},{source:["eventtitle","eventtitleaddon"],target:"event-title",convert:mr.EVENT_TITLE},{source:["eventtitle","eventtitleaddon"],target:"event",convert:mr.EVENT_TITLE,when:{source:!1,target:{"event-title":!1}}},{source:ar,target:["id","citation-key","author","issued","year-suffix","title"],convert:mr.LABEL},{source:"isbn",target:"ISBN"},{source:"issn",target:"ISSN"},{source:"issue",target:"issue",when:{source:{number:!1,[or]:["article","periodical"]},target:{issue:e=>"string"==typeof e&&!e.match(/\d+/),type:["article","article-journal","article-newspaper","article-magazine","periodical"]}}},{source:"number",target:"issue",when:{source:{[or]:["article","periodical","inproceedings"]},target:{issue:e=>e&&("number"==typeof e||e.match(/\d+/)),type:["article","article-journal","article-newspaper","article-magazine","paper-conference","periodical"]}}},{source:"date",target:"issued",convert:mr.DATE},{source:["year","month","day"],target:"issued",convert:mr.YEAR_MONTH,when:{source:{date:!1},target:!1}},{source:"location",target:"jurisdiction",when:{source:{type:"patent"},target:{type:"patent"}}},{source:"keywords",target:"keyword",convert:mr.KEYWORDS},{source:"language",target:"language",convert:mr.PICK},{source:"langid",target:"language",when:{source:{language:!1},target:!1}},{source:"note",target:"note"},{source:"addendum",target:"note",when:{source:{note:!1},target:!1}},{source:"eid",target:"number",when:{target:{type:["article-journal"]}}},{source:["isan","ismn","isrn","iswc"],target:"number",convert:mr.STANDARD_NUMBERS,when:{source:{[or]:e=>"patent"!==e},target:{type:e=>"patent"!==e}}},{source:"number",target:"number",when:{source:{[or]:["patent","report","techreport","legislation"]},target:{type:["patent","report","legislation"]}}},{source:"origdate",target:"original-date",convert:mr.DATE},{source:"origlocation",target:"original-publisher-place",convert:mr.PICK},{source:"origpublisher",target:"original-publisher",convert:mr.PICK},{source:"origtitle",target:"original-title"},{source:"pages",target:"page",when:{source:{bookpagination:[void 0,"page"]}},convert:mr.PAGES},{source:"pagetotal",target:"number-of-pages"},{source:"part",target:"part-number"},{source:["eprint","eprinttype"],target:"PMID",convert:mr.EPRINT},{source:"location",target:"publisher-place",convert:mr.PICK},{source:"publisher",target:"publisher",convert:mr.PICK,when:{source:!0,target:{type:["article","article-journal","article-magazine","article-newspaper","bill","book","broadcast","chapter","classic","collection","dataset","document","entry","entry-dictionary","entry-encyclopedia","event","figure","graphic","hearing","interview","legal_case","legislation","manuscript","map","motion_picture","musical_score","pamphlet","paper-conference","patent","performance","periodical","personal_communication","post","post-weblog","regulation","review","review-book","software","song","speech","standard","treaty"]}}},{source:"organization",target:"publisher",convert:mr.PICK,when:{source:{publisher:!1},target:{type:"webpage"}}},{source:"institution",target:"publisher",convert:mr.PICK,when:{source:{publisher:!1,organization:!1},target:{type:["report","thesis"]}}},{source:"howpublished",target:"publisher",convert:mr.PICK,when:{source:{howpublished:e=>e&&!e.startsWith("http"),publisher:!1,organization:!1,institution:!1},target:{type:"manuscript"}}},{source:["pages","bookpagination"],target:"section",when:{source:{bookpagination:"section"},target:{page:!1}},convert:{toTarget:e=>e,toSource:e=>[e,"section"]}},{source:"pubstate",target:"status",convert:mr.STATUS},{source:"shorttitle",target:"title-short"},{source:"shorttitle",target:"shortTitle",when:{source:!1,target:{"title-short":!1}}},{source:["title","subtitle","titleaddon"],target:"title",convert:mr.TITLE},{source:"translator",target:"translator",convert:mr.NAMES},{source:"url",target:"URL"},{source:"howpublished",target:"URL",convert:mr.HOW_PUBLISHED,when:{source:{url:!1},target:!1}},{source:"version",target:"version"},{source:"volume",target:"volume"},{source:"volumes",target:"number-of-volumes"},{source:["issuetitle","issuesubtitle","issuetitleaddon"],target:"volume-title",convert:mr.TITLE}]),hr=new ke([{source:"note",target:"accessed",when:{source:!1,target:{note:!1}},convert:{toSource:e=>`[Online; accessed ${i(e)}]`}},{source:"annote",target:"annote"},{source:"address",target:"publisher-place",convert:mr.PICK},{source:"author",target:"author",convert:mr.NAMES},{source:"chapter",target:"chapter-number"},{source:"number",target:"collection-number",when:{source:{[or]:["book","mvbook","inbook","collection","mvcollection","incollection","suppcollection","manual","suppperiodical","proceedings","mvproceedings","refererence"]},target:{type:["bill","book","broadcast","chapter","dataset","entry","entry-dictionary","entry-encyclopedia","figure","graphic","interview","legislation","legal_case","manuscript","map","motion_picture","musical_score","pamphlet","post","post-weblog","personal_communication","review","review-book","song","speech","thesis","treaty","webpage"]}}},{source:"series",target:"collection-title"},{source:"booktitle",target:"container-title",when:{target:{type:["chapter","paper-conference"]}}},{source:"journal",target:"container-title",when:{source:{[or]:"article"},target:{type:["article","article-newspaper","article-journal","article-magazine"]}}},{source:"edition",target:"edition"},{source:"editor",target:"editor",convert:mr.NAMES},{source:ar,target:["id","citation-key","author","issued","year-suffix","title"],convert:mr.LABEL},{source:"number",target:"issue",when:{source:{[or]:["article","periodical","inproceedings"]},target:{issue:e=>"number"==typeof e||"string"==typeof e&&e.match(/\d+/),type:["article","article-journal","article-newspaper","article-magazine","paper-conference","periodical"]}}},{source:["year","month","day"],target:"issued",convert:mr.YEAR_MONTH},{source:"note",target:"note"},{source:"number",target:"number",when:{source:{[or]:["patent","report","techreport"]},target:{type:["patent","report"]}}},{source:"pages",target:"page",convert:mr.PAGES},{source:"publisher",target:"publisher",convert:mr.PICK,when:{target:{type:["article","article-journal","article-magazine","article-newspaper","bill","book","broadcast","chapter","classic","collection","dataset","document","entry","entry-dictionary","entry-encyclopedia","event","figure","graphic","hearing","interview","legal_case","legislation","map","motion_picture","musical_score","pamphlet","patent","performance","periodical","personal_communication","post","post-weblog","regulation","review","review-book","software","song","speech","standard","treaty","webpage"]}}},{source:"organization",target:"publisher",convert:mr.PICK,when:{source:{publisher:!1},target:{type:"paper-conference"}}},{source:"institution",target:"publisher",convert:mr.PICK,when:{source:{publisher:!1,organization:!1},target:{type:"report"}}},{source:"school",target:"publisher",convert:mr.PICK,when:{source:{institution:!1,organization:!1,publisher:!1},target:{type:"thesis"}}},{source:"howpublished",target:"publisher",convert:mr.PICK,when:{source:{howpublished:e=>e&&!e.startsWith("http"),publisher:!1,organization:!1,institution:!1,school:!1},target:{type:"manuscript"}}},{source:"title",target:"title"},{source:[or,"type"],target:["type","genre"],convert:{toTarget(e,t){const r=Xt.source[e]||"document";return t?[r,t]:"mastersthesis"===e?[r,"Master's thesis"]:"phdthesis"===e?[r,"PhD thesis"]:[r]},toSource(e,t){const r=Xt.target[e]||"misc";return/^(master'?s|diploma) thesis$/i.test(t)?["mastersthesis"]:/^(phd|doctoral) thesis$/i.test(t)?["phdthesis"]:[r,t]}}},{source:or,when:{target:{type:!1}},convert:{toSource:()=>"misc"}},{source:"howpublished",target:"URL",convert:mr.HOW_PUBLISHED,when:{target:{publisher:!1}}},{source:"volume",target:"volume"}]);function fr(e,t){if(null==e)return{};var r,i,o=function(e,t){if(null==e)return{};var r,i,o={},a=Object.keys(e);for(i=0;i<a.length;i++)t.indexOf(r=a[i])>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)t.indexOf(r=a[i])>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function dr(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}function gr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function br(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yr(e,t){if(e.crossref in t){const r=t[e.crossref].properties;return r===e?e:Object.assign({},yr(r,t),e)}return e}function vr(e,t){const r={};for(const t of e)r[t.label]=t;return e.map(({type:e,label:i,properties:o})=>t.convertToTarget(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(r),!0).forEach(function(t){br(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({[or]:e,[ar]:i},yr(o,r))))}function xr(e,t){return e.map(e=>{const r=t.convertToSource(e),{[or]:i,[ar]:o}=r;return{type:i,label:o,properties:fr(r,[or,ar].map(dr))}})}function wr(e){const t=e.toUpperCase(),r=e.toLowerCase();for(let i=0;i<e.length;i++)if(t[i]!==r[i])return t[i]===e[i];return null}function kr(e){if(0===e.length)return;let t="";for(;e.length>1;){const{value:r,hyphenated:i}=e.shift();t+=r+(i?"-":" ")}const r=t+e[0].value;return r[0]&&r}function Tr(e){if(e[0][0].label){const t={};for(const[{value:r,label:i}]of e)t[i]=r;return t}const t={},[r,i,o]=function(e,t=!0){const r=[],i=[];if(t)for(;e.length>1&&!1!==e[0].upperCase;){for(r.push(...i),i.length=0;e.length>1&&!1!==e[0].upperCase&&!e[0].hyphenated;)r.push(e.shift());for(;e.length>0&&!1!==e[0].upperCase&&e[0].hyphenated;)i.push(e.shift())}const o=[],a=[];for(;e.length>1;){for(o.push(...a),a.length=0;e.length>1&&!1===e[0].upperCase;)o.push(e.shift());for(;e.length>0&&!1!==e[0].upperCase;)a.push(e.shift())}return i.length&&a.unshift(...i),e.length&&a.push(e[0]),[kr(r),kr(o),kr(a)]}(e[0],1===e.length);return o&&(t.family=o),i&&(t.prefix=i),3===e.length?(t.given=kr(e[2]),t.suffix=kr(e[1])):2===e.length?t.given=kr(e[1]):r&&(t.given=r),t}const Er={command:{match:/\\(?:[a-zA-Z]+|.) */,type:kt.keywords({commandBegin:"\\begin",commandEnd:"\\end"}),value:e=>e.slice(1).trim()},lbrace:{match:"{",push:"bracedLiteral"},mathShift:{match:"$",push:"mathLiteral"},whitespace:{match:/[\s]+|~/,lineBreaks:!0,value:e=>"~"===e?" ":" "}},jr=kt.states({stringLiteral:B({},Er,{text:/[^{$}\s~\\]+/}),namesLiteral:B({and:/\s+[aA][nN][dD]\s+/,comma:",",hyphen:"-",equals:"="},Er,{text:/[^{$}\s~\\,=-]+/}),listLiteral:B({and:/\s+and\s+/},Er,{text:/[^{$}\s~\\]+/}),separatedLiteral:B({comma:","},Er,{text:/[^{$}\s~\\,]+/}),bracedLiteral:B({},Er,{rbrace:{match:"}",pop:!0},text:/[^{$}\s~\\]+/}),mathLiteral:B({},Er,{mathShift:{match:"$",pop:!0},script:/[\^_]/,text:/[^{$}\s~\\^_]+/})});function Sr(e,t){return t in Ct?e&&Ct[t].join(e):e}const Or=new xe({String(){let e="";for(;!this.matchEndOfFile();)e+=this.consumeRule("Text");return e},StringNames(){const e=[];for(;;){if(this.consumeToken("whitespace",!0),e.push(this.consumeRule("Name")),this.consumeToken("whitespace",!0),this.matchEndOfFile())return e;this.consumeToken("and")}},Name(){const e=[];for(;;){if(e.push(this.consumeRule("NamePiece")),this.matchEndOfFile()||this.matchToken("and"))return Tr(e);this.consumeToken("comma"),this.consumeToken("whitespace",!0)}},NamePiece(){const e=[];for(;;){const t=this.consumeRule("NameToken");if(t.label)return t.label=kr([...e,{value:t.label}]),[t];if(e.push(t),this.matchEndOfFile()||this.matchToken("and")||this.matchToken("comma"))return e;for(;this.matchToken("hyphen")||this.matchToken("whitespace");)this.consumeToken()}},NameToken(){let e=null,t="";for(;;)if(null===e&&this.matchToken("text")){const r=this.consumeToken().value;t+=r,e=wr(r)}else{if(this.matchEndOfFile()||this.matchToken("and")||this.matchToken("comma")||this.matchToken("whitespace"))return{value:t,upperCase:e};if(this.matchToken("hyphen"))return{value:t,upperCase:e,hyphenated:!0};if(this.matchToken("equals")){this.consumeToken("equals");const e=this.consumeRule("NamePiece");return e[0].label&&(t+="="+e[0].label),{value:kr(e),label:t}}t+=this.consumeRule("Text")}},StringList(){const e=[];for(;!this.matchEndOfFile();){let t="";for(;!this.matchEndOfFile()&&!this.matchToken("and");)t+=this.consumeRule("Text");e.push(t),this.consumeToken("and",!0)}return 1===e.length?e[0]:e},StringSeparated(){const e=[];for(;!this.matchEndOfFile();){let t="";for(;!this.matchEndOfFile()&&!this.matchToken("comma");)t+=this.consumeRule("Text");e.push(t.trim()),this.consumeToken("comma",!0),this.consumeToken("whitespace",!0)}return e},StringVerbatim(){let e="";for(;!this.matchEndOfFile();)e+=this.consumeToken().text;return e},StringUri(){const e=this.consumeRule("StringVerbatim");try{return decodeURI(e)===e?encodeURI(e):e}catch(t){return encodeURI(e)}},StringTitleCase(){this.state.sentenceCase=!0;let e="";for(;!this.matchEndOfFile();)e+=this.consumeRule("Text");return e},BracketString(){var e;let t="";this.consumeToken("lbrace");const r=this.state.sentenceCase;for(this.state.sentenceCase=r&&this.matchToken("command"),(e=this.state).partlyLowercase&&(e.partlyLowercase=this.state.sentenceCase);!this.matchToken("rbrace");)t+=this.consumeRule("Text");const i=r&&!this.state.sentenceCase&&this.state.partlyLowercase;return this.state.sentenceCase=r,this.consumeToken("rbrace"),i?Sr(t,"nocase"):t},MathString(){let e="";for(this.consumeToken("mathShift");!this.matchToken("mathShift");)if(this.matchToken("script")){const t=this.consumeToken("script").value,r=this.consumeRule("Text").split("");r.every(e=>e in Lt[t])?e+=r.map(e=>Lt[t][e]).join(""):e+=Ct[Pt[t]].join(r.join(""))}else{if(this.matchToken("command")){const t=this.token.value;if(t in Pt){this.consumeToken("command"),e+=Sr(this.consumeRule("BracketString"),Pt[t]);continue}}e+=this.consumeRule("Text")}return this.consumeToken("mathShift"),e},Text(){if(this.matchToken("lbrace"))return this.consumeRule("BracketString");if(this.matchToken("mathShift"))return this.consumeRule("MathString");if(this.matchToken("whitespace"))return this.consumeToken("whitespace").value;if(this.matchToken("commandBegin"))return this.consumeRule("EnclosedEnv");if(this.matchToken("command"))return this.consumeRule("Command");const e=this.consumeToken("text").value.replace(It,e=>Bt[e]),t=this.state.afterPunctuation;var r;if(this.state.afterPunctuation=/[?!.:]$/.test(e),!this.state.sentenceCase)return(r=this.state).partlyLowercase||(r.partlyLowercase=e===e.toLowerCase()&&e!==e.toUpperCase()),e;const[i,...o]=e,a=o.join(""),n=a.toLowerCase();return a!==n?e:t?i+n:e.toLowerCase()},Command(){const e=this.consumeToken("command"),t=e.value;if(t in _t)return Sr(this.consumeRule("Env"),_t[t]);if(t in At)return Sr(this.consumeRule("BracketString"),At[t]);if(t in St)return St[t];if(t in jt&&!this.matchEndOfFile()){const e=this.consumeRule("Text");return(e[0]+jt[t]).normalize("NFC")+e.slice(1)}if(t in Rt){const e=Rt[t],r=[];let i=e.length;for(;i-- >0;)this.consumeToken("whitespace",!0),r.push(this.consumeRule("BracketString"));return e(...r)}return/^[&%$#_{}]$/.test(t)?e.text.slice(1):e.text},Env(){let e="";for(;!this.matchEndOfFile()&&!this.matchToken("rbrace");)e+=this.consumeRule("Text");return e},EnclosedEnv(){this.consumeToken("commandBegin");const e=this.consumeRule("BracketString");let t="";for(;!this.matchToken("commandEnd");)t+=this.consumeRule("Text");const r=this.consumeToken("commandEnd"),i=this.consumeRule("BracketString");if(e!==i)throw new SyntaxError(this.lexer.formatError(r,`environment started with "${e}", ended with "${i}"`));return Sr(t,_t[e])}},{sentenceCase:!1,partlyLowercase:!1,afterPunctuation:!0});function _r(e){return zt.includes(e.toLowerCase())}function Ar(e){if("name"===e[1])return"namesLiteral";switch(e[0]){case"list":return"listLiteral";case"separated":return"separatedLiteral";default:return"stringLiteral"}}function Cr(e,t,r=[]){const i=Et[t]||[];return Or.parse(jr.reset(e,{state:Ar(i),line:0,col:0}),function(e,t){if("name"===e[1])return"list"===e[0]?"StringNames":"Name";if("title"===e[1]){const e=Yt.parse.sentenceCase;return"always"===e||"english"===e&&function(e){return Array.isArray(e)?e.every(_r):_r(e)}(t)?"StringTitleCase":"String"}switch("field"===e[0]?e[1]:e[0]){case"list":return"StringList";case"separated":return"StringSeparated";case"verbatim":return"StringVerbatim";case"uri":return"StringUri";default:return"String"}}(i,r))}function Rr(e,t){const r=[];for(const{type:i,label:o,properties:a}of e)if(i in t){const e=[];for(const r of t[i])Array.isArray(r)&&!r.some(e=>e in a)?e.push(r.join("/")):"string"!=typeof r||r in a||e.push(r);e.length&&r.push([o,`missing fields: ${e.join(", ")}`])}else r.push([o,`invalid type: "${i}"`]);if(r.length)throw new RangeError(["Invalid entries:"].concat(r.map(([e,t])=>` - ${e} has ${t}`)).join("\n"))}function Ir(e){const t={};"language"in e.properties&&(t.language=Cr(e.properties.language,"language"));for(const r in e.properties){const i=e.properties[r];""!==i&&(t[r]=Cr(i+"",r,t.language))}return B({},e,{properties:t})}function Br(e){return Yt.parse.strict&&Rr(e,Tt.biblatex),function(e){return vr(e,pr)}(e.map(Ir))}function Pr(e){return Yt.parse.strict&&Rr(e,Tt.bibtex),function(e){return vr(e,hr)}(e.map(Ir))}const Lr={"@biblatex/text":{parse:Ft,parseType:{dataType:"String",predicate:/@\s{0,5}[A-Za-z]{1,13}\s{0,5}\{\s{0,5}[^@{}"=,\\\s]{0,100}\s{0,5},[\s\S]*\}/}},"@biblatex/entry+object":{parse:e=>Br([e]),parseType:{dataType:"SimpleObject",propertyConstraint:{props:["type","label","properties"]}}},"@biblatex/entries+list":{parse:Br,parseType:{elementConstraint:"@biblatex/entry+object"}},"@bibtex/text":{parse:Ft,outputs:"@bibtex/entries+list"},"@bibtex/entry+object":{parse:e=>Pr([e])},"@bibtex/entries+list":{parse:Pr},"@bibtxt/text":{parse:e=>e.trim().split(Ht).map(Kt),parseType:{dataType:"String",predicate:/^\s*(\[(?!\s*[{[]).*?\]\s*(\n\s*[^[]((?!:)\S)+\s*:\s*.+?\s*)*\s*)+$/}}},zr={};for(const e in St)zr[St[e]]=e;for(const e in jt)zr[jt[e]]=e;for(const e in Bt)zr[Bt[e]]=e;const Ur=/[^a-zA-Z0-9\s!"#%&'()*+,\-./:;=?@[\]{}\u0300-\u0308\u030a-\u030c\u0332\u0323\u0327\u0328\u0361\u0326]/g,Dr=/.[\u0300-\u0308\u030a-\u030c\u0332\u0323\u0327\u0328\u0361\u0326]+/g,$r={separated:",",list:" and "},Nr={i:"\\textit{",b:"\\textbf{",sc:"\\textsc{",sup:"\\textsuperscript{",sub:"\\textsubscript{",'span style="font-variant:small-caps;"':"\\textsc{",'span class="nocase"':"{"};function Mr(e){return e.normalize("NFKD").replace(Ur,e=>e in zr?zr[e]in Bt?zr[e]:`\\${zr[e]}{}`:"").replace(Dr,e=>Array.from(e).reduce((e,t)=>`{\\${zr[t]} ${e}}`))}function qr(e){const t=[];let r=e.split(/<(\/?(?:i|b|sc|sup|sub|span)|span .*?)>/g);return r=r.map((e,r)=>r%2==0?Mr(e):e in Nr?(t.push("/"+e.split(" ")[0]),Nr[e]):e===t[t.length-1]?(t.pop(),"}"):""),r.join("")}function Fr(e,t){switch(t){case"title":return qr(e).split(/(:\s*)/).map((e,t)=>t%2?e:e.replace(/(?!^)\b[a-z]*[A-Z].*?\b/g,"{$&}")).join("");case"literal":return qr(e.toString());case"name":return function(e){if(e.family&&!e.prefix&&!e.given&!e.suffix)return e.family.includes($r.list)?e.family:`{${e.family}}`;const t=[""];return e.prefix&&e.family&&(t[0]+=e.prefix+" "),e.family&&(t[0]+=e.family),e.suffix?(t.push(e.suffix),t.push(e.given||"")):t.push(e.given),Mr(t.join(", ").trim())}(e);case"verbatim":case"uri":return e.toString();default:return Mr(e.toString())}}function Hr(e,t){if(!(e in Et))return Fr(t,"verbatim");const[r,i]=Et[e];return r in $r?function(e,t,r){const i=$r[r];return e.map(e=>{const r=Fr(e,t);return r.includes(i)?`{${r}}`:r}).join(i)}(t,i,r):Fr(t,i)}function Gr({type:e,label:t,properties:r}){const i={};for(const e in r)i[e]=Hr(e,r[e]);return{type:e,label:t,properties:i}}function Jr(e){return function(e){return xr(e,hr)}(e).map(Gr)}function Vr(e,t){const r=e.map(e=>function({type:e,label:t,properties:r},i){const o=Object.entries(r).map(([e,t])=>i.listItem.join(`${e} = {${t}},`));return i.entry.join(`@${e}{${t},${i.list.join(o.join(""))}}`)}(e,t)).join("");return t.bibliographyContainer.join(r)}const Kr=function(e,t){return function(r,i={}){const{type:o,format:a=o||"text"}=i;if(r=e(r),"object"===a)return r;if(Ye(a))return t(r,Ze(a),i);throw new RangeError(`Output dictionary "${a}" not available`)}};var Wr={bibtex:Kr(Jr,Vr),biblatex:Kr(function(e){return function(e){return xr(e,pr)}(e).map(Gr)},Vr),bibtxt:Kr(Jr,function(e,t){const r=e.map(e=>function({type:e,label:t,properties:r},i){const o=Object.entries(r).concat([["type",e]]).map(([e,t])=>i.listItem.join(`${e}: ${t}`));return i.entry.join(`[${t}]${i.list.join(o.join(""))}`)}(e,t)).join("\n");return t.bibliographyContainer.join(r)})};ot("@bibtex",{input:Lr,output:Wr,config:Yt});const Xr=new ve({"en-US":'<?xml version="1.0" encoding="utf-8"?><locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="en-US"><info><translator><name>Andrew Dunning</name></translator><translator><name>Sebastian Karcher</name></translator><translator><name>Rintze M. Zelle</name></translator><translator><name>Denis Meier</name></translator><translator><name>Brenton M. Wiernik</name></translator><rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights><updated>2015-10-10T23:31:02+00:00</updated></info><style-options punctuation-in-quote="true"/><date form="text"><date-part name="month" suffix=" "/><date-part name="day" suffix=", "/><date-part name="year"/></date><date form="numeric"><date-part name="month" form="numeric-leading-zeros" suffix="/"/><date-part name="day" form="numeric-leading-zeros" suffix="/"/><date-part name="year"/></date><terms><term name="advance-online-publication">advance online publication</term><term name="album">album</term><term name="audio-recording">audio recording</term><term name="film">film</term><term name="henceforth">henceforth</term><term name="loc-cit">loc. cit.</term><term name="no-place">no place</term><term name="no-place" form="short">n.p.</term><term name="no-publisher">no publisher</term><term name="no-publisher" form="short">n.p.</term><term name="on">on</term><term name="op-cit">op. cit.</term><term name="original-work-published">original work published</term><term name="personal-communication">personal communication</term><term name="podcast">podcast</term><term name="podcast-episode">podcast episode</term><term name="preprint">preprint</term><term name="radio-broadcast">radio broadcast</term><term name="radio-series">radio series</term><term name="radio-series-episode">radio series episode</term><term name="special-issue">special issue</term><term name="special-section">special section</term><term name="television-broadcast">television broadcast</term><term name="television-series">television series</term><term name="television-series-episode">television series episode</term><term name="video">video</term><term name="working-paper">working paper</term><term name="accessed">accessed</term><term name="and">and</term><term name="and others">and others</term><term name="anonymous">anonymous</term><term name="anonymous" form="short">anon.</term><term name="at">at</term><term name="available at">available at</term><term name="by">by</term><term name="circa">circa</term><term name="circa" form="short">c.</term><term name="cited">cited</term><term name="edition"><single>edition</single><multiple>editions</multiple></term><term name="edition" form="short">ed.</term><term name="et-al">et al.</term><term name="forthcoming">forthcoming</term><term name="from">from</term><term name="ibid">ibid.</term><term name="in">in</term><term name="in press">in press</term><term name="internet">internet</term><term name="interview">interview</term><term name="letter">letter</term><term name="no date">no date</term><term name="no date" form="short">n.d.</term><term name="online">online</term><term name="presented at">presented at the</term><term name="reference"><single>reference</single><multiple>references</multiple></term><term name="reference" form="short"><single>ref.</single><multiple>refs.</multiple></term><term name="retrieved">retrieved</term><term name="scale">scale</term><term name="version">version</term><term name="article">preprint</term><term name="article-journal">journal article</term><term name="article-magazine">magazine article</term><term name="article-newspaper">newspaper article</term><term name="bill">bill</term><term name="book">book</term><term name="broadcast">broadcast</term><term name="chapter">book chapter</term><term name="classic">classic</term><term name="collection">collection</term><term name="dataset">dataset</term><term name="document">document</term><term name="entry">entry</term><term name="entry-dictionary">dictionary entry</term><term name="entry-encyclopedia">encyclopedia entry</term><term name="event">event</term><term name="graphic">graphic</term><term name="hearing">hearing</term><term name="interview">interview</term><term name="legal_case">legal case</term><term name="legislation">legislation</term><term name="manuscript">manuscript</term><term name="map">map</term><term name="motion_picture">video recording</term><term name="musical_score">musical score</term><term name="pamphlet">pamphlet</term><term name="paper-conference">conference paper</term><term name="patent">patent</term><term name="performance">performance</term><term name="periodical">periodical</term><term name="personal_communication">personal communication</term><term name="post">post</term><term name="post-weblog">blog post</term><term name="regulation">regulation</term><term name="report">report</term><term name="review">review</term><term name="review-book">book review</term><term name="software">software</term><term name="song">audio recording</term><term name="speech">presentation</term><term name="standard">standard</term><term name="thesis">thesis</term><term name="treaty">treaty</term><term name="webpage">webpage</term><term name="article-journal" form="short">journal art.</term><term name="article-magazine" form="short">mag. art.</term><term name="article-newspaper" form="short">newspaper art.</term><term name="book" form="short">bk.</term><term name="chapter" form="short">bk. chap.</term><term name="document" form="short">doc.</term><term name="graphic" form="short">graph.</term><term name="interview" form="short">interv.</term><term name="manuscript" form="short">MS</term><term name="motion_picture" form="short">video rec.</term><term name="report" form="short">rep.</term><term name="review" form="short">rev.</term><term name="review-book" form="short">bk. rev.</term><term name="song" form="short">audio rec.</term><term name="ad">AD</term><term name="bc">BC</term><term name="bce">BCE</term><term name="ce">CE</term><term name="open-quote">“</term><term name="close-quote">”</term><term name="open-inner-quote">‘</term><term name="close-inner-quote">’</term><term name="page-range-delimiter">–</term><term name="colon">:</term><term name="comma">,</term><term name="semicolon">;</term><term name="ordinal">th</term><term name="ordinal-01">st</term><term name="ordinal-02">nd</term><term name="ordinal-03">rd</term><term name="ordinal-11">th</term><term name="ordinal-12">th</term><term name="ordinal-13">th</term><term name="long-ordinal-01">first</term><term name="long-ordinal-02">second</term><term name="long-ordinal-03">third</term><term name="long-ordinal-04">fourth</term><term name="long-ordinal-05">fifth</term><term name="long-ordinal-06">sixth</term><term name="long-ordinal-07">seventh</term><term name="long-ordinal-08">eighth</term><term name="long-ordinal-09">ninth</term><term name="long-ordinal-10">tenth</term><term name="act"><single>act</single><multiple>acts</multiple></term><term name="appendix"><single>appendix</single><multiple>appendices</multiple></term><term name="article-locator"><single>article</single><multiple>articles</multiple></term><term name="canon"><single>canon</single><multiple>canons</multiple></term><term name="elocation"><single>location</single><multiple>locations</multiple></term><term name="equation"><single>equation</single><multiple>equations</multiple></term><term name="rule"><single>rule</single><multiple>rules</multiple></term><term name="scene"><single>scene</single><multiple>scenes</multiple></term><term name="table"><single>table</single><multiple>tables</multiple></term><term name="timestamp"><single></single><multiple></multiple></term><term name="title-locator"><single>title</single><multiple>titles</multiple></term><term name="book"><single>book</single><multiple>books</multiple></term><term name="chapter"><single>chapter</single><multiple>chapters</multiple></term><term name="column"><single>column</single><multiple>columns</multiple></term><term name="figure"><single>figure</single><multiple>figures</multiple></term><term name="folio"><single>folio</single><multiple>folios</multiple></term><term name="issue"><single>number</single><multiple>numbers</multiple></term><term name="line"><single>line</single><multiple>lines</multiple></term><term name="note"><single>note</single><multiple>notes</multiple></term><term name="opus"><single>opus</single><multiple>opera</multiple></term><term name="page"><single>page</single><multiple>pages</multiple></term><term name="number-of-pages"><single>page</single><multiple>pages</multiple></term><term name="paragraph"><single>paragraph</single><multiple>paragraphs</multiple></term><term name="part"><single>part</single><multiple>parts</multiple></term><term name="section"><single>section</single><multiple>sections</multiple></term><term name="sub-verbo"><single>sub verbo</single><multiple>sub verbis</multiple></term><term name="verse"><single>verse</single><multiple>verses</multiple></term><term name="volume"><single>volume</single><multiple>volumes</multiple></term><term name="appendix"><single>app.</single><multiple>apps.</multiple></term><term name="article-locator"><single>art.</single><multiple>arts.</multiple></term><term name="elocation"><single>loc.</single><multiple>locs.</multiple></term><term name="equation"><single>eq.</single><multiple>eqs.</multiple></term><term name="rule"><single>r.</single><multiple>rr.</multiple></term><term name="scene"><single>sc.</single><multiple>scs.</multiple></term><term name="table"><single>tbl.</single><multiple>tbls.</multiple></term><term name="timestamp"><single></single><multiple></multiple></term><term name="title-locator"><single>tit.</single><multiple>tits.</multiple></term><term name="book" form="short"><single>bk.</single><multiple>bks.</multiple></term><term name="chapter" form="short"><single>chap.</single><multiple>chaps.</multiple></term><term name="column" form="short"><single>col.</single><multiple>cols.</multiple></term><term name="figure" form="short"><single>fig.</single><multiple>figs.</multiple></term><term name="folio" form="short"><single>fol.</single><multiple>fols.</multiple></term><term name="issue" form="short"><single>no.</single><multiple>nos.</multiple></term><term name="line" form="short"><single>l.</single><multiple>ll.</multiple></term><term name="note" form="short"><single>n.</single><multiple>nn.</multiple></term><term name="opus" form="short"><single>op.</single><multiple>opp.</multiple></term><term name="page" form="short"><single>p.</single><multiple>pp.</multiple></term><term name="number-of-pages" form="short"><single>p.</single><multiple>pp.</multiple></term><term name="paragraph" form="short"><single>para.</single><multiple>paras.</multiple></term><term name="part" form="short"><single>pt.</single><multiple>pts.</multiple></term><term name="section" form="short"><single>sec.</single><multiple>secs.</multiple></term><term name="sub-verbo" form="short"><single>s.v.</single><multiple>s.vv.</multiple></term><term name="verse" form="short"><single>v.</single><multiple>vv.</multiple></term><term name="volume" form="short"><single>vol.</single><multiple>vols.</multiple></term><term name="paragraph" form="symbol"><single>¶</single><multiple>¶¶</multiple></term><term name="section" form="symbol"><single>§</single><multiple>§§</multiple></term><term name="chair"><single>chair</single><multiple>chairs</multiple></term><term name="compiler"><single>compiler</single><multiple>compilers</multiple></term><term name="contributor"><single>contributor</single><multiple>contributors</multiple></term><term name="curator"><single>curator</single><multiple>curators</multiple></term><term name="executive-producer"><single>executive producer</single><multiple>executive producers</multiple></term><term name="guest"><single>guest</single><multiple>guests</multiple></term><term name="host"><single>host</single><multiple>hosts</multiple></term><term name="narrator"><single>narrator</single><multiple>narrators</multiple></term><term name="organizer"><single>organizer</single><multiple>organizers</multiple></term><term name="performer"><single>performer</single><multiple>performers</multiple></term><term name="producer"><single>producer</single><multiple>producers</multiple></term><term name="script-writer"><single>writer</single><multiple>writers</multiple></term><term name="series-creator"><single>series creator</single><multiple>series creators</multiple></term><term name="director"><single>director</single><multiple>directors</multiple></term><term name="editor"><single>editor</single><multiple>editors</multiple></term><term name="editorial-director"><single>editor</single><multiple>editors</multiple></term><term name="illustrator"><single>illustrator</single><multiple>illustrators</multiple></term><term name="translator"><single>translator</single><multiple>translators</multiple></term><term name="editortranslator"><single>editor & translator</single><multiple>editors & translators</multiple></term><term name="compiler" form="short"><single>comp.</single><multiple>comps.</multiple></term><term name="contributor" form="short"><single>contrib.</single><multiple>contribs.</multiple></term><term name="curator" form="short"><single>cur.</single><multiple>curs.</multiple></term><term name="executive-producer" form="short"><single>exec. prod.</single><multiple>exec. prods.</multiple></term><term name="narrator" form="short"><single>narr.</single><multiple>narrs.</multiple></term><term name="organizer" form="short"><single>org.</single><multiple>orgs.</multiple></term><term name="performer" form="short"><single>perf.</single><multiple>perfs.</multiple></term><term name="producer" form="short"><single>prod.</single><multiple>prods.</multiple></term><term name="script-writer" form="short"><single>writ.</single><multiple>writs.</multiple></term><term name="series-creator" form="short"><single>cre.</single><multiple>cres.</multiple></term><term name="director" form="short"><single>dir.</single><multiple>dirs.</multiple></term><term name="editor" form="short"><single>ed.</single><multiple>eds.</multiple></term><term name="editorial-director" form="short"><single>ed.</single><multiple>eds.</multiple></term><term name="illustrator" form="short"><single>ill.</single><multiple>ills.</multiple></term><term name="translator" form="short"><single>tran.</single><multiple>trans.</multiple></term><term name="editortranslator" form="short"><single>ed. & tran.</single><multiple>eds. & trans.</multiple></term><term name="chair" form="verb">chaired by</term><term name="compiler" form="verb">compiled by</term><term name="contributor" form="verb">with</term><term name="curator" form="verb">curated by</term><term name="executive-producer" form="verb">executive produced by</term><term name="guest" form="verb">with guest</term><term name="host" form="verb">hosted by</term><term name="narrator" form="verb">narrated by</term><term name="organizer" form="verb">organized by</term><term name="performer" form="verb">performed by</term><term name="producer" form="verb">produced by</term><term name="script-writer" form="verb">written by</term><term name="series-creator" form="verb">created by</term><term name="container-author" form="verb">by</term><term name="director" form="verb">directed by</term><term name="editor" form="verb">edited by</term><term name="editorial-director" form="verb">edited by</term><term name="illustrator" form="verb">illustrated by</term><term name="interviewer" form="verb">interview by</term><term name="recipient" form="verb">to</term><term name="reviewed-author" form="verb">by</term><term name="translator" form="verb">translated by</term><term name="editortranslator" form="verb">edited & translated by</term><term name="compiler" form="verb-short">comp. by</term><term name="contributor" form="verb-short">w.</term><term name="curator" form="verb-short">cur. by</term><term name="executive-producer" form="verb-short">exec. prod. by</term><term name="guest" form="verb-short">w. guest</term><term name="host" form="verb-short">hosted by</term><term name="narrator" form="verb-short">narr. by</term><term name="organizer" form="verb-short">org. by</term><term name="performer" form="verb-short">perf. by</term><term name="producer" form="verb-short">prod. by</term><term name="script-writer" form="verb-short">writ. by</term><term name="series-creator" form="verb-short">cre. by</term><term name="director" form="verb-short">dir. by</term><term name="editor" form="verb-short">ed. by</term><term name="editorial-director" form="verb-short">ed. by</term><term name="illustrator" form="verb-short">illus. by</term><term name="translator" form="verb-short">trans. by</term><term name="editortranslator" form="verb-short">ed. & trans. by</term><term name="month-01">January</term><term name="month-02">February</term><term name="month-03">March</term><term name="month-04">April</term><term name="month-05">May</term><term name="month-06">June</term><term name="month-07">July</term><term name="month-08">August</term><term name="month-09">September</term><term name="month-10">October</term><term name="month-11">November</term><term name="month-12">December</term><term name="month-01" form="short">Jan.</term><term name="month-02" form="short">Feb.</term><term name="month-03" form="short">Mar.</term><term name="month-04" form="short">Apr.</term><term name="month-05" form="short">May</term><term name="month-06" form="short">Jun.</term><term name="month-07" form="short">Jul.</term><term name="month-08" form="short">Aug.</term><term name="month-09" form="short">Sep.</term><term name="month-10" form="short">Oct.</term><term name="month-11" form="short">Nov.</term><term name="month-12" form="short">Dec.</term><term name="season-01">Spring</term><term name="season-02">Summer</term><term name="season-03">Autumn</term><term name="season-04">Winter</term></terms></locale>'}),Yr=new ve({apa:'<?xml version="1.0" encoding="utf-8"?><style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" page-range-format="expanded"><info><title>American Psychological Association 7th edition</title><title-short>APA</title-short><id>http://www.zotero.org/styles/apa</id><link href="http://www.zotero.org/styles/apa" rel="self"/><link href="http://www.zotero.org/styles/apa-6th-edition" rel="template"/><link href="https://apastyle.apa.org/style-grammar-guidelines/references/examples" rel="documentation"/><author><name>Brenton M. Wiernik</name><email>zotero@wiernik.org</email></author><category citation-format="author-date"/><category field="psychology"/><category field="generic-base"/><updated>2022-01-31T14:30:00+00:00</updated><rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights></info><locale xml:lang="en"><terms><term name="editortranslator" form="short"><single>ed. & trans.</single><multiple>eds. & trans.</multiple></term><term name="translator" form="short">trans.</term><term name="interviewer" form="short"><single>interviewer</single><multiple>interviewers</multiple></term><term name="collection-editor" form="short"><single>ed.</single><multiple>eds.</multiple></term><term name="circa" form="short">ca.</term><term name="bc"> B.C.E.</term><term name="ad"> C.E.</term><term name="letter">personal communication</term><term name="letter" form="short">letter</term><term name="issue" form="long"><single>issue</single><multiple>issues</multiple></term></terms></locale><locale xml:lang="af"><terms><term name="letter">persoonlike kommunikasie</term><term name="letter" form="short">brief</term></terms></locale><locale xml:lang="ar"><terms><term name="letter">اتصال شخصي</term><term name="letter" form="short">خطاب</term></terms></locale><locale xml:lang="bg"><terms><term name="letter">лична комуникация</term><term name="letter" form="short">писмо</term></terms></locale><locale xml:lang="ca"><terms><term name="letter">comunicació personal</term><term name="letter" form="short">carta</term></terms></locale><locale xml:lang="cs"><terms><term name="letter">osobní komunikace</term><term name="letter" form="short">dopis</term></terms></locale><locale xml:lang="cy"><terms><term name="letter">cyfathrebu personol</term><term name="letter" form="short">llythyr</term></terms></locale><locale xml:lang="da"><terms><term name="et-al">et al.</term><term name="letter">personlig kommunikation</term><term name="letter" form="short">brev</term></terms></locale><locale xml:lang="de"><terms><term name="et-al">et al.</term><term name="letter">persönliche Kommunikation</term><term name="letter" form="short">Brief</term></terms></locale><locale xml:lang="el"><terms><term name="letter">προσωπική επικοινωνία</term><term name="letter" form="short">επιστολή</term></terms></locale><locale xml:lang="es"><terms><term name="from">de</term><term name="letter">comunicación personal</term><term name="letter" form="short">carta</term></terms></locale><locale xml:lang="et"><terms><term name="letter">isiklik suhtlus</term><term name="letter" form="short">kiri</term></terms></locale><locale xml:lang="eu"><terms><term name="letter">komunikazio pertsonala</term><term name="letter" form="short">gutuna</term></terms></locale><locale xml:lang="fa"><terms><term name="letter">ارتباط شخصی</term><term name="letter" form="short">نامه</term></terms></locale><locale xml:lang="fi"><terms><term name="letter">henkilökohtainen viestintä</term><term name="letter" form="short">kirje</term></terms></locale><locale xml:lang="fr"><terms><term name="letter">communication personnelle</term><term name="letter" form="short">lettre</term><term name="editor" form="short"><single>éd.</single><multiple>éds.</multiple></term></terms></locale><locale xml:lang="he"><terms><term name="letter">תקשורת אישית</term><term name="letter" form="short">מכתב</term></terms></locale><locale xml:lang="hr"><terms><term name="letter">osobna komunikacija</term><term name="letter" form="short">pismo</term></terms></locale><locale xml:lang="hu"><terms><term name="letter">személyes kommunikáció</term><term name="letter" form="short">levél</term></terms></locale><locale xml:lang="id"><terms><term name="letter">komunikasi pribadi</term><term name="letter" form="short">surat</term></terms></locale><locale xml:lang="is"><terms><term name="letter">persónuleg samskipti</term><term name="letter" form="short">bréf</term></terms></locale><locale xml:lang="it"><terms><term name="letter">comunicazione personale</term><term name="letter" form="short">lettera</term></terms></locale><locale xml:lang="ja"><terms><term name="letter">個人的なやり取り</term><term name="letter" form="short">手紙</term></terms></locale><locale xml:lang="ko"><terms><term name="letter">개인 서신</term><term name="letter" form="short">편지</term></terms></locale><locale xml:lang="la"><terms><term name="letter"/><term name="letter" form="short">epistula</term></terms></locale><locale xml:lang="lt"><terms><term name="letter">communicationis personalis</term><term name="letter" form="short"/></terms></locale><locale xml:lang="lv"><terms><term name="letter">personīga komunikācija</term><term name="letter" form="short">vēstule</term></terms></locale><locale xml:lang="mn"><terms><term name="letter">хувийн харилцаа холбоо</term><term name="letter" form="short">захиа</term></terms></locale><locale xml:lang="nb"><terms><term name="et-al">et al.</term><term name="letter">personlig kommunikasjon</term><term name="letter" form="short">brev</term></terms></locale><locale xml:lang="nl"><terms><term name="et-al">et al.</term><term name="letter">persoonlijke communicatie</term><term name="letter" form="short">brief</term></terms></locale><locale xml:lang="nn"><terms><term name="et-al">et al.</term><term name="letter">personlig kommunikasjon</term><term name="letter" form="short">brev</term></terms></locale><locale xml:lang="pl"><terms><term name="letter">osobista komunikacja</term><term name="letter" form="short">list</term></terms></locale><locale xml:lang="pt"><terms><term name="letter">comunicação pessoal</term><term name="letter" form="short">carta</term></terms></locale><locale xml:lang="ro"><terms><term name="letter">comunicare personală</term><term name="letter" form="short">scrisoare</term></terms></locale><locale xml:lang="ru"><terms><term name="letter">личная переписка</term><term name="letter" form="short">письмо</term></terms></locale><locale xml:lang="sk"><terms><term name="letter">osobná komunikácia</term><term name="letter" form="short">list</term></terms></locale><locale xml:lang="sl"><terms><term name="letter">osebna komunikacija</term><term name="letter" form="short">pismo</term></terms></locale><locale xml:lang="sr"><terms><term name="letter">лична комуникација</term><term name="letter" form="short">писмо</term></terms></locale><locale xml:lang="sv"><terms><term name="letter">personlig kommunikation</term><term name="letter" form="short">brev</term></terms></locale><locale xml:lang="th"><terms><term name="letter">การสื่อสารส่วนบุคคล</term><term name="letter" form="short">จดหมาย</term></terms></locale><locale xml:lang="tr"><terms><term name="letter">kişisel iletişim</term><term name="letter" form="short">mektup</term></terms></locale><locale xml:lang="uk"><terms><term name="letter">особисте спілкування</term><term name="letter" form="short">лист</term></terms></locale><locale xml:lang="vi"><terms><term name="letter">giao tiếp cá nhân</term><term name="letter" form="short">thư</term></terms></locale><locale xml:lang="zh-CN"><terms><term name="letter">的私人交流</term><term name="letter" form="short">信函</term></terms></locale><locale xml:lang="zh-TW"><terms><term name="letter">私人通訊</term><term name="letter" form="short">信函</term></terms></locale><macro name="author-bib"><names variable="composer" delimiter=", "><name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/><substitute><names variable="author"/><names variable="illustrator"/><names variable="director"><name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/><label form="long" prefix=" (" suffix=")" text-case="title"/></names><choose><if variable="container-title"><choose><if type="book entry entry-dictionary entry-encyclopedia" match="any"><choose><if variable="title"><group delimiter=" "><text macro="title"/><text macro="parenthetical"/></group></if><else><text macro="title-and-descriptions"/></else></choose></if></choose></if></choose><names variable="editor" delimiter=", "><name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/><label form="short" prefix=" (" suffix=")" text-case="title"/></names><names variable="editorial-director"><name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/><label form="short" prefix=" (" suffix=")" text-case="title"/></names><names variable="collection-editor"><name name-as-sort-order="all" and="symbol" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/><label form="short" prefix=" (" suffix=")" text-case="title"/></names><choose><if variable="title"><group delimiter=" "><text macro="title"/><text macro="parenthetical"/></group></if><else><text macro="title-and-descriptions"/></else></choose></substitute></names></macro><macro name="author-intext"><choose><if type="bill legal_case legislation treaty" match="any"><text macro="title-intext"/></if><else-if type="interview personal_communication" match="any"><choose><if variable="archive container-title DOI publisher URL" match="none"><group delimiter=", "><names variable="author"><name and="symbol" delimiter=", " initialize-with=". "/><substitute><text macro="title-intext"/></substitute></names><text term="letter"/></group></if><else><names variable="author" delimiter=", "><name form="short" and="symbol" delimiter=", " initialize-with=". "/><substitute><text macro="title-intext"/></substitute></names></else></choose></else-if><else><names variable="composer" delimiter=", "><name form="short" and="symbol" delimiter=", " initialize-with=". "/><substitute><names variable="author"/><names variable="illustrator"/><names variable="director"/><choose><if variable="container-title"><choose><if type="book entry entry-dictionary entry-encyclopedia" match="any"><text macro="title-intext"/></if></choose></if></choose><names variable="editor"/><names variable="editorial-director"/><text macro="title-intext"/></substitute></names></else></choose></macro><macro name="date-bib"><group delimiter=" " prefix="(" suffix=")"><choose><if is-uncertain-date="issued"><text term="circa" form="short"/></if></choose><group><choose><if variable="issued"><date variable="issued"><date-part name="year"/></date><text variable="year-suffix"/><choose><if type="article-magazine article-newspaper broadcast interview motion_picture pamphlet personal_communication post post-weblog song speech webpage" match="any"><date variable="issued"><date-part prefix=", " name="month"/><date-part prefix=" " name="day"/></date></if><else-if type="paper-conference"><choose><if variable="collection-editor editor editorial-director issue page volume" match="none"><date variable="issued"><date-part prefix=", " name="month"/><date-part prefix=" " name="day"/></date></if></choose></else-if></choose></if><else-if variable="status"><group><text variable="status" text-case="lowercase"/><text variable="year-suffix" prefix="-"/></group></else-if><else><text term="no date" form="short"/><text variable="year-suffix" prefix="-"/></else></choose></group></group></macro><macro name="date-sort-group"><choose><if variable="issued"><text value="1"/></if><else-if variable="status"><text value="2"/></else-if><else><text value="0"/></else></choose></macro><macro name="date-sort-date"><date variable="issued" form="numeric"/></macro><macro name="date-intext"><choose><if variable="issued"><group delimiter="/"><group delimiter=" "><choose><if is-uncertain-date="original-date"><text term="circa" form="short"/></if></choose><date variable="original-date"><date-part name="year"/></date></group><group delimiter=" "><choose><if is-uncertain-date="issued"><text term="circa" form="short"/></if></choose><group><choose><if type="interview personal_communication" match="any"><choose><if variable="archive container-title DOI publisher URL" match="none"><date variable="issued" form="text"/></if><else><date variable="issued"><date-part name="year"/></date></else></choose></if><else><date variable="issued"><date-part name="year"/></date></else></choose><text variable="year-suffix"/></group></group></group></if><else-if variable="status"><text variable="status" text-case="lowercase"/><text variable="year-suffix" prefix="-"/></else-if><else><text term="no date" form="short"/><text variable="year-suffix" prefix="-"/></else></choose></macro><macro name="title-and-descriptions"><choose><if variable="title"><group delimiter=" "><text macro="title"/><text macro="parenthetical"/><text macro="bracketed"/></group></if><else><group delimiter=" "><text macro="bracketed"/><text macro="parenthetical"/></group></else></choose></macro><macro name="title"><choose><if type="post webpage" match="any"><text variable="title" font-style="italic"/></if><else-if variable="container-title" match="any"><text variable="title"/></else-if><else><choose><if type="article-journal article-magazine article-newspaper post-weblog review review-book" match="any"><text variable="title" font-style="italic"/></if><else-if type="paper-conference"><choose><if variable="collection-editor editor editorial-director" match="any"><group delimiter=": " font-style="italic"><text variable="title"/><choose><if is-numeric="volume" match="none"><group delimiter=" "><label variable="volume" form="short" text-case="capitalize-first"/><text variable="volume"/></group></if></choose></group></if><else><text variable="title" font-style="italic"/></else></choose></else-if><else><group delimiter=": " font-style="italic"><text variable="title"/><choose><if is-numeric="volume" match="none"><group delimiter=" "><label variable="volume" form="short" text-case="capitalize-first"/><text variable="volume"/></group></if></choose></group></else></choose></else></choose></macro><macro name="title-intext"><choose><if variable="title" match="none"><text macro="bracketed-intext" prefix="[" suffix="]"/></if><else-if type="bill"><choose><if variable="number container-title" match="none"><text variable="title" form="short" font-style="italic" text-case="title"/></if><else-if variable="title"><text variable="title" form="short" text-case="title"/></else-if><else><group delimiter=" "><text variable="genre"/><group delimiter=" "><choose><if variable="chapter-number container-title" match="none"><text term="issue" form="short"/></if></choose><text variable="number"/></group></group></else></choose></else-if><else-if type="legal_case" match="any"><text variable="title" font-style="italic"/></else-if><else-if type="legislation treaty" match="any"><text variable="title" form="short" text-case="title"/></else-if><else-if type="post webpage" match="any"><text variable="title" form="short" font-style="italic" text-case="title"/></else-if><else-if variable="container-title" match="any"><text variable="title" form="short" quotes="true" text-case="title"/></else-if><else><text variable="title" form="short" font-style="italic" text-case="title"/></else></choose></macro><macro name="parenthetical"><group prefix="(" suffix=")"><choose><if type="patent"><group delimiter=" "><text variable="authority" form="short"/><choose><if variable="genre"><text variable="genre" text-case="capitalize-first"/></if><else><text value="patent" text-case="capitalize-first"/></else></choose><group delimiter=" "><text term="issue" form="short" text-case="capitalize-first"/><text variable="number"/></group></group></if><else-if type="post webpage" match="any"><group delimiter="; "><text macro="secondary-contributors"/><text macro="database-location"/><text macro="number"/><text macro="locators-booklike"/></group></else-if><else-if variable="container-title"><group delimiter="; "><text macro="secondary-contributors"/><choose><if type="broadcast graphic map motion_picture song" match="any"><text macro="number"/></if></choose></group></else-if><else><group delimiter="; "><text macro="secondary-contributors"/><text macro="database-location"/><text macro="number"/><text macro="locators-booklike"/></group></else></choose></group></macro><macro name="parenthetical-container"><choose><if variable="container-title" match="any"><group prefix="(" suffix=")"><group delimiter="; "><text macro="database-location"/><choose><if type="broadcast graphic map motion_picture song" match="none"><text macro="number"/></if></choose><text macro="locators-booklike"/></group></group></if></choose></macro><macro name="bracketed"><group prefix="[" suffix="]"><choose><if variable="reviewed-author reviewed-title" type="review review-book" match="any"><group delimiter="; "><group delimiter=", "><group delimiter=" "><choose><if variable="number" match="none"><choose><if variable="genre"><text variable="genre" text-case="capitalize-first"/></if><else-if variable="medium"><text variable="medium" text-case="capitalize-first"/></else-if><else><text value="Review of"/></else></choose></if><else><choose><if variable="medium"><text variable="medium" text-case="capitalize-first"/></if><else><text value="Review of"/></else></choose></else></choose><text macro="reviewed-title"/></group><names variable="reviewed-author"><label form="verb-short" suffix=" "/><name and="symbol" initialize-with=". " delimiter=", "/></names></group><choose><if variable="genre" match="any"><choose><if variable="number" match="none"><text variable="medium" text-case="capitalize-first"/></if></choose></if></choose></group></if><else-if type="thesis"><group delimiter="; "><choose><if variable="number" match="none"><group delimiter=", "><text variable="genre" text-case="capitalize-first"/><choose><if variable="archive DOI URL" match="any"><text variable="publisher"/></if></choose></group></if></choose><text variable="medium" text-case="capitalize-first"/></group></else-if><else-if variable="interviewer" type="interview" match="any"><choose><if variable="title"><text macro="format"/></if><else-if variable="genre"><group delimiter="; "><group delimiter=" "><text variable="genre" text-case="capitalize-first"/><group delimiter=" "><text term="author" form="verb"/><names variable="interviewer"><name and="symbol" initialize-with=". " delimiter=", "/></names></group></group></group></else-if><else-if variable="interviewer"><group delimiter="; "><names variable="interviewer"><label form="verb" suffix=" " text-case="capitalize-first"/><name and="symbol" initialize-with=". " delimiter=", "/></names><text variable="medium" text-case="capitalize-first"/></group></else-if><else><text macro="format"/></else></choose></else-if><else-if type="personal_communication"><choose><if variable="recipient"><group delimiter="; "><group delimiter=" "><choose><if variable="number" match="none"><choose><if variable="genre"><text variable="genre" text-case="capitalize-first"/></if><else-if variable="medium"><text variable="medium" text-case="capitalize-first"/></else-if><else><text term="letter" form="short" text-case="capitalize-first"/></else></choose></if><else><choose><if variable="medium"><text variable="medium" text-case="capitalize-first"/></if><else><text term="letter" form="short" text-case="capitalize-first"/></else></choose></else></choose><names variable="recipient" delimiter=", "><label form="verb" suffix=" "/><name and="symbol" delimiter=", "/></names></group><choose><if variable="genre" match="any"><choose><if variable="number" match="none"><text variable="medium" text-case="capitalize-first"/></if></choose></if></choose></group></if><else><text macro="format"/></else></choose></else-if><else-if variable="composer" type="song" match="all"><group delimiter="; "><choose><if variable="number" match="none"><group delimiter=" "><choose><if variable="genre"><text variable="genre" text-case="capitalize-first"/><names variable="author" prefix="recorded by "><name and="symbol" initialize-with=". " delimiter=", "/></names></if><else-if variable="medium"><text variable="medium" text-case="capitalize-first"/><names variable="author" prefix="recorded by "><name and="symbol" initialize-with=". " delimiter=", "/></names></else-if><else><names variable="author" prefix="Recorded by "><name and="symbol" initialize-with=". " delimiter=", "/></names></else></choose></group></if><else><group delimiter=" "><choose><if variable="medium"><text variable="medium" text-case="capitalize-first"/><names variable="author" prefix="recorded by "><name and="symbol" initialize-with=". " delimiter=", "/></names></if><else><names variable="author" prefix="Recorded by "><name and="symbol" initialize-with=". " delimiter=", "/></names></else></choose></group></else></choose><choose><if variable="genre" match="any"><choose><if variable="number" match="none"><text variable="medium" text-case="capitalize-first"/></if></choose></if></choose></group></else-if><else-if variable="container-title" match="none"><text macro="format"/></else-if><else><choose><if type="paper-conference speech" match="any"><choose><if variable="collection-editor editor editorial-director issue page volume" match="any"><text macro="format"/></if></choose></if><else-if type="book"><choose><if variable="version" match="none"><text macro="format"/></if></choose></else-if><else-if type="report" match="none"><text macro="format"/></else-if></choose></else></choose></group></macro><macro name="bracketed-intext"><group prefix="[" suffix="]"><choose><if variable="reviewed-author reviewed-title" type="review review-book" match="any"><text macro="reviewed-title-intext" prefix="Review of "/></if><else-if variable="interviewer" type="interview" match="any"><names variable="interviewer"><label form="verb" suffix=" " text-case="capitalize-first"/><name and="symbol" initialize-with=". " delimiter=", "/><substitute><text macro="format-intext"/></substitute></names></else-if><else-if type="personal_communication"><choose><if variable="recipient"><group delimiter=" "><choose><if variable="number" match="none"><text variable="genre" text-case="capitalize-first"/></if><else><text term="letter" form="short" text-case="capitalize-first"/></else></choose><names variable="recipient" delimiter=", "><label form="verb" suffix=" "/><name and="symbol" delimiter=", "/></names></group></if><else><text macro="format-intext"/></else></choose></else-if><else><text macro="format-intext"/></else></choose></group></macro><macro name="bracketed-container"><group prefix="[" suffix="]"><choose><if type="paper-conference speech" match="any"><choose><if variable="collection-editor editor editorial-director issue page volume" match="none"><text macro="format"/></if></choose></if><else-if type="book" variable="version" match="all"><text macro="format"/></else-if><else-if type="report"><text macro="format"/></else-if></choose></group></macro><macro name="secondary-contributors"><choose><if type="article-journal article-magazine article-newspaper post-weblog review review-book" match="any"><text macro="secondary-contributors-periodical"/></if><else-if type="paper-conference"><choose><if variable="collection-editor editor editorial-director" match="any"><text macro="secondary-contributors-booklike"/></if><else><text macro="secondary-contributors-periodical"/></else></choose></else-if><else><text macro="secondary-contributors-booklike"/></else></choose></macro><macro name="secondary-contributors-periodical"><group delimiter="; "><choose><if variable="title"><names variable="interviewer" delimiter="; "><name and="symbol" initialize-with=". " delimiter=", "/><label form="short" prefix=", " text-case="title"/></names></if></choose><names variable="translator" delimiter="; "><name and="symbol" initialize-with=". " delimiter=", "/><label form="short" prefix=", " text-case="title"/></names></group></macro><macro name="secondary-contributors-booklike"><group delimiter="; "><choose><if variable="title"><names variable="interviewer"><name and="symbol" initialize-with=". " delimiter=", "/><label form="short" prefix=", " text-case="title"/></names></if></choose><choose><if type="post webpage" match="none"><choose><if variable="container-title" match="none"><group delimiter="; "><names variable="container-author"><label form="verb-short" suffix=" " text-case="title"/><name and="symbol" initialize-with=". " delimiter=", "/></names><names variable="editor translator" delimiter="; "><name and="symbol" initialize-with=". " delimiter=", "/><label form="short" prefix=", " text-case="title"/></names></group></if></choose></if><else><group delimiter="; "><names variable="container-author"><label form="verb-short" suffix=" " text-case="title"/><name and="symbol" initialize-with=". " delimiter=", "/></names><names variable="editor translator" delimiter="; "><name and="symbol" initialize-with=". " delimiter=", "/><label form="short" prefix=", " text-case="title"/></names></group></else></choose></group></macro><macro name="database-location"><choose><if variable="archive-place" match="none"><text variable="archive_location"/></if></choose></macro><macro name="number"><choose><if variable="number"><group delimiter=", "><group delimiter=" "><text variable="genre" text-case="title"/><choose><if is-numeric="number"><text term="issue" form="short" text-case="capitalize-first"/><text variable="number"/></if><else><text variable="number"/></else></choose></group><choose><if type="thesis"><choose><if variable="archive DOI URL" match="any"><text variable="publisher"/></if></choose></if></choose></group></if></choose></macro><macro name="locators-booklike"><choose><if type="article-journal article-magazine article-newspaper broadcast interview patent post post-weblog review review-book speech webpage" match="any"/><else-if type="paper-conference"><choose><if variable="collection-editor editor editorial-director" match="any"><group delimiter=", "><text macro="version"/><text macro="edition"/><text macro="volume-booklike"/></group></if></choose></else-if><else><group delimiter=", "><text macro="version"/><text macro="edition"/><text macro="volume-booklike"/></group></else></choose></macro><macro name="version"><choose><if is-numeric="version"><group delimiter=" "><text term="version" text-case="capitalize-first"/><text variable="version"/></group></if><else><text variable="version"/></else></choose></macro><macro name="edition"><choose><if is-numeric="edition"><group delimiter=" "><number variable="edition" form="ordinal"/><label variable="edition" form="short"/></group></if><else><text variable="edition"/></else></choose></macro><macro name="volume-booklike"><group delimiter=", "><choose><if type="report"><group delimiter=" "><text variable="collection-title" text-case="title"/><text variable="collection-number"/></group></if></choose><choose><if variable="volume" match="any"><choose><if is-numeric="volume" match="none"/><else><group delimiter=" "><label variable="volume" form="short" text-case="capitalize-first"/><number variable="volume" form="numeric"/></group></else></choose></if><else><group><text term="volume" form="short" text-case="capitalize-first" suffix=" "/><text term="page-range-delimiter" prefix="1"/><number variable="number-of-volumes" form="numeric"/></group></else></choose><group delimiter=" "><label variable="issue" text-case="capitalize-first"/><text variable="issue"/></group><group delimiter=" "><label variable="page" form="short" suffix=" "/><text variable="page"/></group></group></macro><macro name="reviewed-title"><choose><if variable="reviewed-title"><text variable="reviewed-title" font-style="italic"/></if><else><text variable="title" font-style="italic"/></else></choose></macro><macro name="reviewed-title-intext"><choose><if variable="reviewed-title"><text variable="reviewed-title" form="short" font-style="italic" text-case="title"/></if><else><text variable="title" form="short" font-style="italic" text-case="title"/></else></choose></macro><macro name="format"><choose><if variable="genre medium" match="any"><group delimiter="; "><choose><if variable="number" match="none"><text variable="genre" text-case="capitalize-first"/></if></choose><text variable="medium" text-case="capitalize-first"/></group></if><else-if type="dataset"><text value="Data set"/></else-if><else-if type="book" variable="version" match="all"><text value="Computer software"/></else-if><else-if type="interview personal_communication" match="any"><choose><if variable="archive container-title DOI publisher URL" match="none"><text term="letter" text-case="capitalize-first"/></if><else-if type="interview"><text term="interview" text-case="capitalize-first"/></else-if></choose></else-if><else-if type="map"><text value="Map"/></else-if></choose></macro><macro name="format-intext"><choose><if variable="genre" match="any"><text variable="genre" text-case="capitalize-first"/></if><else-if variable="medium"><text variable="medium" text-case="capitalize-first"/></else-if><else-if type="dataset"><text value="Data set"/></else-if><else-if type="book" variable="version" match="all"><text value="Computer software"/></else-if><else-if type="interview personal_communication" match="any"><choose><if variable="archive container-title DOI publisher URL" match="none"><text term="letter" text-case="capitalize-first"/></if><else-if type="interview"><text term="interview" text-case="capitalize-first"/></else-if></choose></else-if><else-if type="map"><text value="Map"/></else-if></choose></macro><macro name="container"><choose><if type="article-journal article-magazine article-newspaper post-weblog review review-book" match="any"><text macro="container-periodical"/></if><else-if type="paper-conference"><choose><if variable="editor editorial-director collection-editor container-author" match="any"><text macro="container-booklike"/></if><else><text macro="container-periodical"/></else></choose></else-if><else-if type="post webpage" match="none"><text macro="container-booklike"/></else-if></choose></macro><macro name="container-periodical"><group delimiter=". "><group delimiter=", "><text variable="container-title" font-style="italic" text-case="title"/><choose><if variable="volume"><group><text variable="volume" font-style="italic"/><text variable="issue" prefix="(" suffix=")"/></group></if><else><text variable="issue" font-style="italic"/></else></choose><choose><if variable="page"><text variable="page"/></if><else><text variable="number" prefix="Article "/></else></choose></group><choose><if variable="issued"><choose><if variable="issue page volume" match="none"><text variable="status" text-case="capitalize-first"/></if></choose></if></choose></group></macro><macro name="container-booklike"><choose><if variable="container-title" match="any"><group delimiter=" "><text term="in" text-case="capitalize-first"/><group delimiter=", "><names variable="editor translator" delimiter=", & "><name and="symbol" initialize-with=". " delimiter=", "/><label form="short" text-case="title" prefix=" (" suffix=")"/><substitute><names variable="editorial-director"/><names variable="collection-editor"/><names variable="container-author"/></substitute></names><group delimiter=": " font-style="italic"><text variable="container-title"/><choose><if is-numeric="volume" match="none"><group delimiter=" "><label variable="volume" form="short" text-case="capitalize-first"/><text variable="volume"/></group></if></choose></group></group><text macro="parenthetical-container"/><text macro="bracketed-container"/></group></if></choose></macro><macro name="publisher"><group delimiter="; "><choose><if type="thesis"><choose><if variable="archive DOI URL" match="none"><text variable="publisher"/></if></choose></if><else-if type="post webpage" match="any"><group delimiter="; "><text variable="container-title" text-case="title"/><text variable="publisher"/></group></else-if><else-if type="paper-conference"><choose><if variable="collection-editor editor editorial-director" match="any"><text variable="publisher"/></if></choose></else-if><else-if type="article-journal article-magazine article-newspaper post-weblog" match="none"><text variable="publisher"/></else-if></choose><group delimiter=", "><choose><if variable="archive-place"><text variable="archive_location"/></if></choose><text variable="archive"/><text variable="archive-place"/></group></group></macro><macro name="access"><choose><if variable="DOI" match="any"><text variable="DOI" prefix="https://doi.org/"/></if><else-if variable="URL"><group delimiter=" "><choose><if variable="issued status" match="none"><group delimiter=" "><text term="retrieved" text-case="capitalize-first"/><date variable="accessed" form="text" suffix=","/><text term="from"/></group></if></choose><text variable="URL"/></group></else-if></choose></macro><macro name="event"><choose><if variable="event"><choose><if variable="collection-editor editor editorial-director issue page volume" match="none"><group delimiter=", "><text variable="event"/><text variable="event-place"/></group></if></choose></if></choose></macro><macro name="publication-history"><choose><if type="patent" match="none"><group prefix="(" suffix=")"><choose><if variable="references"><text variable="references"/></if><else><group delimiter=" "><text value="Original work published"/><choose><if is-uncertain-date="original-date"><text term="circa" form="short"/></if></choose><date variable="original-date"><date-part name="year"/></date></group></else></choose></group></if><else><text variable="references" prefix="(" suffix=")"/></else></choose></macro><macro name="legal-cites"><choose><if type="legal_case"><group delimiter=". "><group delimiter=", "><text variable="title"/><group delimiter=" "><text macro="container-legal"/><text macro="date-legal"/></group><text variable="references"/></group><text macro="access"/></group></if><else-if type="bill"><group delimiter=". "><group delimiter=", "><choose><if variable="number container-title" match="none"><text variable="title" font-style="italic"/></if><else><text variable="title"/></else></choose><group delimiter=" "><text macro="container-legal"/><text macro="date-legal"/><choose><if variable="number container-title" match="none"><names variable="author" prefix="(testimony of " suffix=")"><name and="symbol" delimiter=", "/></names></if><else><text variable="status" prefix="(" suffix=")"/></else></choose></group><text variable="references"/></group><text macro="access"/></group></else-if><else-if type="legislation"><group delimiter=". "><group delimiter=", "><text variable="title"/><group delimiter=" "><text macro="container-legal"/><text macro="date-legal"/><text variable="status" prefix="(" suffix=")"/></group><text variable="references"/></group><text macro="access"/></group></else-if><else-if type="treaty"><group delimiter=", "><text variable="title" text-case="title"/><names variable="author"><name initialize-with="." form="short" delimiter="-"/></names><text macro="date-legal"/><text macro="container-legal"/><text macro="access"/></group></else-if></choose></macro><macro name="date-legal"><choose><if type="legal_case"><group prefix="(" suffix=")" delimiter=" "><text variable="authority"/><choose><if variable="container-title" match="any"><date variable="issued" form="numeric" date-parts="year"/></if><else><date variable="issued" form="text"/></else></choose></group></if><else-if type="bill legislation" match="any"><group prefix="(" suffix=")" delimiter=" "><group delimiter=" "><date variable="original-date"><date-part name="year"/></date><text term="and" form="symbol"/></group><date variable="issued"><date-part name="year"/></date></group></else-if><else-if type="treaty"><date variable="issued" form="text"/></else-if></choose></macro><macro name="container-legal"><choose><if type="legal_case"><group delimiter=" "><choose><if variable="container-title"><group delimiter=" "><text variable="volume"/><text variable="container-title"/><group delimiter=" "><text term="section" form="symbol"/><text variable="section"/></group><choose><if variable="page page-first" match="any"><text variable="page-first"/></if><else><text value="___"/></else></choose></group></if><else><group delimiter=" "><choose><if is-numeric="number"><text term="issue" form="short" text-case="capitalize-first"/></if></choose><text variable="number"/></group></else></choose></group></if><else-if type="bill"><group delimiter=", "><group delimiter=" "><text variable="genre"/><group delimiter=" "><choose><if variable="chapter-number container-title" match="none"><text term="issue" form="short"/></if></choose><text variable="number"/></group></group><text variable="authority"/><text variable="chapter-number"/><group delimiter=" "><text variable="volume"/><text variable="container-title"/><text variable="page-first"/></group></group></else-if><else-if type="legislation"><choose><if variable="number"><group delimiter=", "><text variable="number" prefix="Pub. L. No. "/><group delimiter=" "><text variable="volume"/><text variable="container-title"/><text variable="page-first"/></group></group></if><else><group delimiter=" "><text variable="volume"/><text variable="container-title"/><choose><if variable="section"><group delimiter=" "><text term="section" form="symbol"/><text variable="section"/></group></if><else><text variable="page-first"/></else></choose></group></else></choose></else-if><else-if type="treaty"><group delimiter=" "><number variable="volume"/><text variable="container-title"/><choose><if variable="page page-first" match="any"><text variable="page-first"/></if><else><group delimiter=" "><text term="issue" form="short" text-case="capitalize-first"/><text variable="number"/></group></else></choose></group></else-if></choose></macro><macro name="citation-locator"><group delimiter=" "><choose><if locator="chapter"><label variable="locator" text-case="capitalize-first"/></if><else><label variable="locator" form="short"/></else></choose><text variable="locator"/></group></macro><citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" collapse="year" givenname-disambiguation-rule="primary-name-with-initials"><sort><key macro="author-bib" names-min="3" names-use-first="1"/><key macro="date-sort-group"/><key macro="date-sort-date" sort="ascending"/><key variable="status"/></sort><layout prefix="(" suffix=")" delimiter="; "><group delimiter=", "><text macro="author-intext"/><text macro="date-intext"/><text macro="citation-locator"/></group></layout></citation><bibliography hanging-indent="true" et-al-min="21" et-al-use-first="19" et-al-use-last="true" entry-spacing="0" line-spacing="2"><sort><key macro="author-bib"/><key macro="date-sort-group"/><key macro="date-sort-date" sort="ascending"/><key variable="status"/><key macro="title"/></sort><layout><choose><if type="bill legal_case legislation treaty" match="any"><choose><if variable="DOI URL" match="any"><text macro="legal-cites"/></if><else><text macro="legal-cites" suffix="."/></else></choose></if><else><group delimiter=" "><group delimiter=". " suffix="."><text macro="author-bib"/><text macro="date-bib"/><text macro="title-and-descriptions"/><text macro="container"/><text macro="event"/><text macro="publisher"/></group><text macro="access"/><text macro="publication-history"/></group></else></choose></layout></bibliography></style>'}),Zr=Symbol.for("proxied"),Qr=function(e){const t=function(t,r){if(t.sys.wrapBibliographyEntry){const[e,i]=t.sys.wrapBibliographyEntry(this.system_id);r=[e,r,i].join("")}return e.call(this,t,r)};return t[Zr]=!0,t};for(const e in o.Output.Formats){const t=o.Output.Formats[e]["@bibliography/entry"];t&&!t[Zr]&&(o.Output.Formats[e]["@bibliography/entry"]=Qr(t))}function ei(e){if(Xr.has(e))return Xr.get(e);const t=e.replace("-","_");return Xr.has(t)?Xr.get(t):{}}const ti={},ri=function(e,t,r,i){if(!o.Output.Formats[i]||!o.Output.Formats[i]["@bibliography/entry"])throw new TypeError(`Cannot find format '${i}'`);const a=e.reduce((e,t)=>(e[t.id]=t,e),{}),n=Yr.get(Yr.has(t)?t:"apa"),s=function(e,t,r,i,a){const n=`${e}|${t}`;let s;return ti[n]instanceof o.Engine?(s=ti[n],s.sys.retrieveItem=i,s.sys.wrapBibliographyEntry=void 0,s.updateItems([])):s=ti[n]=new o.Engine({retrieveLocale:a,retrieveItem:i},r,t,!0),s}(t,r=Xr.has(r)?r:void 0,n,function(e){if(Object.prototype.hasOwnProperty.call(a,e))return a[e];throw new Error(`Cannot find entry with id '${e}'`)},ei);return s.setOutputFormat(i),s},ii=(e,t)=>"function"==typeof t?t(e):t||"";function oi(e){return"object"==typeof e?e:{id:e}}function ai(e){return e.citationItems?e:{citationItems:[].concat(e).map(oi),properties:{noteIndex:0}}}function ni(e){return e?e.map(ai):[]}ot("@csl",{output:{bibliography:function(e,t={}){const{template:r="apa",lang:i,format:o="text",nosort:a=!1}=t,n=t.entry?[].concat(t.entry):e.map(({id:e})=>e);e=J(e);const s=ri(e,r,i,o),l=s.updateItems(n,a);if(t.append||t.prepend){const r=e.reduce((e,t)=>(e[t.id]=t,e),{});s.sys.wrapBibliographyEntry=function(e){const i=r[e];return[ii(i,t.prepend),ii(i,t.append)]}}const c=s.makeBibliography(),[{bibstart:m,bibend:u},p]=c,h=p.map((e,t)=>e.replace(/^\s*<[a-z]+/i,`$& data-csl-entry-id="${l[t]}"`));return t.asEntryArray?h.map((e,t)=>[l[t],e]):m+h.join("")+u},citation:function(e,t={}){const{template:r="apa",lang:i,format:o="text"}=t,a=e.map(({id:e})=>e),n=t.entry?t.entry:a;e=J(e);const s=ri(e,r,i,o),l=ni(t.citationsPre),c=ai(n),m=ni(t.citationsPost);return s.rebuildProcessorState([...l,c,...m],o,[])[l.length][2]}},config:{engine:ri,locales:Xr,templates:Yr}});const si="tag:yaml.org,2002:timestamp",li=a.DEFAULT_SCHEMA.compiledTypeMap.scalar[si],ci=new a.Type(si,{kind:"scalar",resolve:li.resolve,construct:li.construct,instanceOf:Date,represent:e=>e.toISOString().split("T")[0]}),mi=a.DEFAULT_SCHEMA.extend({implicit:[ci],explicit:[]});ot("@else",{input:{"@else/yaml":{parseType:{dataType:"String",tokenList:{split:/\n(\s{2})*(-\s)?/,token:/^[\w-]*: /,every:!1}},parse:e=>a.load(e,{json:!0})}},output:{yaml:e=>a.dump(e,{schema:mi})}});const ui={art:"graphic",article:"article-journal",audiovisual:"motion_picture",bill:"bill",blog:"post-weblog",book:"book",catalogue:"collection",conference:"event","conference-paper":"paper-conference",data:"dataset",database:"dataset",dictionary:"entry-dictionary","edited-work":"document",encyclopedia:"entry-encyclopedia","film-broadcast":"broadcast",generic:"document","government-document":"regulation",grant:"document",hearing:"hearing","historical-work":"classic","legal-case":"legal_case","legal-rule":"legislation","magazine-article":"article-magazine",manual:"report",map:"map",multimedia:"motion_picture",music:"musical_score","newspaper-article":"article-newspaper",pamphlet:"pamphlet",patent:"patent","personal-communication":"personal_communication",proceedings:"book",report:"report",serial:"periodical",slides:"speech",software:"software","software-code":"software","software-container":"software","software-executable":"software","software-virtual-machine":"software","sound-recording":"song",standard:"standard",statute:"legislation",thesis:"thesis",unpublished:"article",video:"motion_picture",website:"webpage"},pi={article:"article","article-journal":"article","article-magazine":"magazine-article","article-newspaper":"newspaper-article",bill:"bill",book:"book",broadcast:"film-broadcast",chapter:"generic",classic:"historical-work",collection:"catalogue",dataset:"data",document:"generic",entry:"generic","entry-dictionary":"dictionary","entry-encyclopedia":"encyclopedia",event:"conference",figure:"generic",graphic:"art",hearing:"hearing",interview:"sound-recording",legal_case:"legal-case",legislation:"statute",manuscript:"historical-work",map:"map",motion_picture:"film-broadcast",musical_score:"music",pamphlet:"pamphlet","paper-conference":"conference-paper",patent:"patent",performance:"generic",periodical:"serial",personal_communication:"personal-communication",post:"serial","post-weblog":"blog",regulation:"government-document",report:"report",review:"generic","review-book":"generic",software:"software",song:"sound-recording",speech:"slides",standard:"standard",thesis:"thesis",treaty:"generic",webpage:"website"},hi=new ke([{source:"family-names",target:"family"},{source:"given-names",target:"given"},{source:"name-particle",target:"non-dropping-particle"},{source:"name-suffix",target:"suffix"},{source:"name",target:"literal"},{source:"orcid",target:"_orcid"}]),fi={names:{toTarget:e=>e.map(hi.convertToTarget),toSource:e=>e.map(hi.convertToSource)},publisher:{toTarget:({name:e,city:t,region:r,country:i})=>[e,[t,r,i].filter(Boolean).join(", ")||void 0],toSource(e,t){const r={name:e};if(t){const e=t.split(", ");r.country=e.pop(),2===e.length&&(r.region=e.pop()),1===e.length&&(r.city=e.pop())}return r}},date:{toTarget:e=>e instanceof Date?r(e.toISOString()):r(new Date(e).toISOString()),toSource(e){if(e.raw)return e.raw;const[t,r,i]=e["date-parts"][0];return i?new Date(Date.UTC(t,r-1,i)):r?new Date(Date.UTC(t,r-1)):new Date(Date.UTC(t))}}},di=["abstract",{source:"authors",target:"author",convert:fi.names},{source:"date-released",target:"issued",when:{target:{type:"software"}},convert:fi.date},{source:"doi",target:"DOI"},{source:"identifiers",target:["DOI","ISBN","ISSN","PMCID","PMID","URL"],convert:{toTarget(e){const t=Array(6).fill(void 0);for(const{type:r,value:i}of e)this.doi||"doi"!==r||(t[0]=i),this.url||"url"!==r||(t[5]=i),"other"===r&&i.startsWith("urn:isbn:")&&(t[1]=i.slice(9)),"other"===r&&i.startsWith("urn:issn:")&&(t[2]=i.slice(9)),"other"===r&&i.startsWith("pmcid:")&&(t[3]=i.slice(6)),"other"===r&&i.startsWith("pmid:")&&(t[4]=i.slice(5));return t},toSource:(e,t,r,i,o,a)=>[e&&{type:"doi",value:e},a&&{type:"url",value:a},t&&{type:"other",value:`urn:isbn:${t}`},r&&{type:"other",value:`urn:issn:${r}`},i&&{type:"other",value:`pmcid:${i}`},o&&{type:"other",value:`pmid:${o}`}].filter(Boolean)}},{source:"keywords",target:"keyword",convert:{toTarget:e=>e.join(","),toSource:e=>e.split(/,\s*/g)}},{source:"title",target:"title",when:{source:{term:!1,entry:!1},target:{type:e=>!["entry","entry-dictionary","entry-encyclopedia"].includes(e)}}},{source:"title",target:"container-title",when:{source:{entry:!0,journal:!1},target:{type:["entry"]}}},{source:"title",target:"container-title",when:{source:{term:!0,journal:!1},target:{type:["entry-dictionary","entry-encyclopedia"]}}},{source:"url",target:"URL"},"version"],gi=[{source:"type",target:"type",convert:{toSource:e=>"dataset"===e?"dataset":"software",toTarget:e=>"dataset"===e?"dataset":"software"}},...di],bi=[...di,{source:"abbreviation",target:"title-short"},{source:"abbreviation",target:"shortTitle"},"collection-title",{source:"recipients",target:"recipient",convert:fi.names},{source:"senders",target:"authors",convert:fi.names},{source:"conference",target:["event-title","event-date","event-place","event"],convert:{toSource(e,t,r,i){const o={name:e||i};return r&&(o.location=r),t&&(o["date-start"]=fi.date.toSource(t),t["date-parts"]&&2===t["date-parts"].length&&(o["date-end"]=fi.date.toSource({"date-parts":[t["date-parts"][1]]}))),o},toTarget:e=>[e.name,r(e["date-start"].toISOString(),e["date-end"].toISOString()),e.location]}},{source:"database",target:"source"},{source:"date-accessed",target:"accessed",convert:fi.date},{source:"date-downloaded",target:"accessed",convert:fi.date,when:{source:{"date-accessed":!1},target:!1}},{source:"date-published",target:"issued",convert:fi.date,when:{source:{"date-released":!1},target(){return"book"!==this.type||!this.version}}},{source:["year","month"],target:"issued",when:{source:{"date-published":!1,"date-released":!1,year:!0}},convert:{toTarget:(e,t)=>({"date-parts":[t?[e,t]:[e]]}),toSource(e){const[t,r]=e["date-parts"][0];return[t,r]}}},{source:"year-original",target:"original-date",convert:{toTarget:e=>({"date-parts":[[e]]}),toSource:e=>e["date-parts"][0][0]}},"edition",{source:"editors",target:"editor",convert:fi.names},{source:"editors-series",target:"collection-editor",convert:fi.names},{source:"entry",target:"title",when:{source:{term:!1},target:{type:"entry"}}},{source:"term",target:"title",when:{target:{type:["entry-dictionary","entry-encyclopedia"]}}},{source:"format",target:"dimensions"},"medium",{source:"data-type",target:"genre",when:{target:{type:e=>"thesis"!==e}}},{source:"thesis-type",target:"genre",when:{source:{"data-type":!1},target:{type:"thesis"}}},{source:"isbn",target:"ISBN"},{source:"issn",target:"ISSN"},{source:"pmcid",target:"PMCID"},"issue",{source:"journal",target:"container-title"},{source:"volume-title",target:"volume-title"},{source:"issue-title",target:"volume-title",when:{source:{"volume-title":!1},target:!1}},{source:"languages",target:"language",when:{target:!0,source:{language:e=>/[a-z]{2,3}/.test(e)}},convert:{toSource:e=>[e],toTarget:e=>e[0]}},{source:"location",target:["archive","archive-place"],convert:fi.publisher},{source:"notes",target:"note",when:{source:{scope:!1}}},{source:"scope",target:"note",when:{target:!1}},"number",{source:"patent-states",target:"jurisdiction",when:{target:!1},convert:{toTarget:e=>e.join(", ")}},{source:["institution","department"],target:["publisher","publisher-place"],when:{source:{publisher:!1},target:{type:"thesis"}},convert:{toTarget(e,t){const[r,i]=fi.publisher.toTarget(e);return[t?`${t}, ${r}`:r,i]},toSource:(e,t)=>[fi.publisher.toSource(e,t)]}},{source:"publisher",target:["publisher","publisher-place"],when:{target:{type:e=>"thesis"!==e}},convert:fi.publisher},"section",{source:"status",target:"status",when:{source:!0,target:{status:["in-preparation","abstract","submitted","in-press","advance-online","preprint"]}}},{source:"start",target:"page-first",when:{target:{page:!1}}},{source:["start","end"],target:"page",convert:{toTarget:(e,t)=>t?`${e}-${t}`:e,toSource(e){const[t,r]=e.split("-");return r?[t,r]:[t]}}},{source:"pages",target:"number-of-pages"},{source:"translators",target:"translator",convert:fi.names},{source:"type",target:"type",convert:{toTarget:e=>ui[e]||"document",toSource(e){return"book"===e&&this["event-title"]?"proceedings":pi[e]||"generic"}}},"volume",{source:"number-volumes",target:"number-of-volumes"}],yi=new ke(gi),vi=new ke(bi),xi="1.2.0";function wi(e){"DOI"in e?e.id=e.DOI:"URL"in e&&(e.id=e.URL.replace("http://","").replace("https://",""))}function ki(e,t){if(!(this instanceof ki))return new ki(e,t);const r=new We(e,t);this._options=r._options,this.log=r.log,this.data=r.data}ot("@cff",{input:{"@cff/object":{parseType:{dataType:"SimpleObject",propertyConstraint:{props:"cff-version"}},parse:function(e){const t=yi.convertToTarget(e);e["cff-version"]<="1.1.0"&&(t.type=ui.software),t._cff_mainReference=!0,wi(t);const r=[t];if(e["preferred-citation"]){const t=vi.convertToTarget(e["preferred-citation"]);wi(t),r.push(t)}return Array.isArray(e.references)&&r.push(...e.references.map(vi.convertToTarget)),r}}},output:{cff(e,t={}){const r=function(e,t={}){e=e.slice();const{main:r,preferred:i,cffVersion:o=xi,message:a="Please cite the following works when using this software."}=t;let n;const s=e.findIndex(e=>i&&e.id===i);o>="1.2.0"&&s>-1&&(n=vi.convertToSource(...e.splice(s,1)));let l=e.findIndex(e=>r?e.id===r:e._cff_mainReference);l=l>-1?l:0;const c=e[l]?yi.convertToSource(...e.splice(l,1)):{};c&&o<"1.2.0"&&delete c.type;const m=B({"cff-version":o,message:a},c);return n&&(m["preferred-citation"]=n),e.length&&(m.references=e.map(vi.convertToSource)),m}(e,t);return"object"===t.type?r:Ge("yaml",r)}}}),ki.plugins=function e(t){const r={};for(const i in t)r[i]="object"==typeof t[i]?e(t[i]):t[i];return r}(at);export{ki as default};
|
||
//# sourceMappingURL=cite.mjs.map
|