12 lines
70 KiB
JavaScript
12 lines
70 KiB
JavaScript
|
(self.webpackChunk=self.webpackChunk||[]).push([["citation-js-bibtex"],{"./node_modules/@citation-js/date/lib/index.js":function(ce,L,S){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),Object.defineProperty(L,"format",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(L,"parse",{enumerable:!0,get:function(){return $.default}});var $=R(S("./node_modules/@citation-js/date/lib/input.js")),P=R(S("./node_modules/@citation-js/date/lib/output.js"));function R(_){return _&&_.__esModule?_:{default:_}}},"./node_modules/@citation-js/date/lib/input.js":function(ce,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;function S(s,h){return D(s)||_(s,h)||P(s,h)||$()}function $(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P(s,h){if(s){if(typeof s=="string")return R(s,h);var c=Object.prototype.toString.call(s).slice(8,-1);if(c==="Object"&&s.constructor&&(c=s.constructor.name),c==="Map"||c==="Set")return Array.from(s);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return R(s,h)}}function R(s,h){(h==null||h>s.length)&&(h=s.length);for(var c=0,v=new Array(h);c<h;c++)v[c]=s[c];return v}function _(s,h){var c=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(c!=null){var v=[],p=!0,O=!1,x,A;try{for(c=c.call(s);!(p=(x=c.next()).done)&&(v.push(x.value),!(h&&v.length===h));p=!0);}catch(i){O=!0,A=i}finally{try{!p&&c.return!=null&&c.return()}finally{if(O)throw A}}return v}}function D(s){if(Array.isArray(s))return s}const j={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},X=/ (?:to|[-/]) | ?(?:--|[–—]) ?/,le=/^(\d{4}-\d{2}-\d{2})\/(\d{4}-\d{2}-\d{2})$/;function B(s){return j[s.toLowerCase().slice(0,3)]}function ne(s){const h=new Date(s);return typeof s=="number"&&!isNaN(h.valueOf())?[h.getFullYear(),h.getMonth()+1,h.getDate()]:null}const W=function(h){const c=/^(\d{4}|[-+]\d{6,})-(\d{2})(?:-(\d{2}))?/;if(typeof h!="string"||!c.test(h))return null;const v=h.match(c),p=S(v,4),O=p[1],x=p[2],A=p[3];return+x?+A?[O,x,A]:[O,x]:[O]},H=function(h){const c=/^(?:[a-z]{3},\s*)?(\d{1,2}) ([a-z]{3}) (\d{4,})/i;if(typeof h!="string"||!c.test(h))return null;let v=h.match(c),p=S(v,4),O=p[1],x=p[2],A=p[3];return x=B(x),x?[A,x,O]:null};function U(s){const h=/^(\d{1,2})\/(\d{1,2})\/(\d{2}(?:\d{2})?)/;if(typeof s!="string"||!h.test(s))return null;const c=s.match(h),v=S(c,4),p=v[1],O=v[2],x=v[3];return new Date(x,p,O).getMonth()===parseInt(p)?[x,p,O]:null}function J(s){const h=/^(\d{1,2})[ .\-/](\d{1,2}|[a-z]{3,10})[ .\-/](-?\d+)/i,c=/^(-?\d+)[ .\-/](\d{1,2}|[a-z]{3,10})[ .\-/](\d{1,2})/i;let v,p,O;if(typeof s!="string")return null;if(h.test(s)){var x=s.match(h),A=S(x,4);O=A[1],p=A[2],v=A[3]}else if(c.test(s)){var i=s.match(c),o=S(i,4);v=o[1],p=o[2],O=o[3]}else return null;if(B(p))p=B(p);else if(isNaN(p))return null;return[v,p,O]}function ue(s){const h=/^([a-z]{3,10}|-?\d+)[^\w-]+([a-z]{3,10}|-?\d+)$/i;if(typeof s=="string"&&h.test(s)){const c=s.match(h).slice(1,3);let v;if(B(c[1]))v=B(c.pop());else if(B(c[0]))v=B(c.shift());else{if(c.some(isNaN)||c.every(O=>+O<0))return null;+c[0]<0||+c[0]>+c[1]&&+c[1]>0?v=c.pop():v=c.shift()}return[c.pop(),v]}else return null}function Q(s){if(typeof s!="string")return null;const h=s.match(/^(\d+) ?(a\.?d\.?|b\.?c\.?)$/i);if(h){const c=h.slice(1),v=S(c,2),p=v[0],O=v[1];return[p*(O.toLowerCase()[0]==="a"?1:-1)]}else return/^-?\d+$/.test(s)?[s]:null}function q(s){const h=ne(s)||W(s)||H(s)||U(s)||J(s)||ue(s)||Q(s);return h&&h.map(c=>parseInt(c))}function G(s){return le.test(s)?s.match(le).slice(1,3):s.split(X)}function ie(s,h){const c=[],v=typeof s=="string"&&G(s);h?c.push(s,h):v&&v.length===2?c.push(...v):c.push(s);const p=c.map(q);return p.filter(Boolean).length===c.length?{"date-parts":p}:{raw:h?c.join("/"):s}}var ae=ie;L.default=ae},"./node_modules/@citation-js/date/lib/output.js":function(ce,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;function S(R,_,D){if(R.length>=_)return R;for(;R.length<_;)R=D+R;return R.slice(-_)}var P=function(_,D="-"){if(!_["date-parts"])return _.raw;const j=_["date-parts"][0].map(X=>X.toString());switch(j.length){case 3:j[2]=S(j[2],2,"0");case 2:j[1]=S(j[1],2,"0");case 1:j[0]=S(j[0],4,"0");break}return j.join(D)};L.default=P},"./node_modules/@citation-js/plugin-bibtex/lib-mjs/index.js":function(ce,L,S){"use strict";var $={};S.r($),S.d($,{argumentCommands:function(){return ie},commands:function(){return U},defaultStrings:function(){return ue},diacritics:function(){return H},fieldTypes:function(){return W},formatting:function(){return G},formattingCommands:function(){return q},formattingEnvs:function(){return Q},ligaturePattern:function(){return ae},ligatures:function(){return s},mathCommands:function(){return
|
||
|
`))}function qe(e){const t={};"language"in e.properties&&(t.language=De(e.properties.language,"language"));for(const r in e.properties){const n=e.properties[r];n!==""&&(t[r]=De(n+"",r,t.language))}for(const r in e.annotations)for(const n in e.annotations[r])t[r+"+an:"+n]=St(e.annotations[r][n]);return Me(Me({},e),{},{properties:t})}function ze(e){return p.parse.strict&&$e(e,ne.biblatex),ht(e.map(qe))}function Fe(e){return p.parse.strict&&$e(e,ne.bibtex),pt(e.map(qe))}const jt="@bibtex",Pt={"@biblatex/text":{parse:T,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){return ze([e])},parseType:{dataType:"SimpleObject",propertyConstraint:{props:["type","label","properties"]}}},"@biblatex/entries+list":{parse:ze,parseType:{elementConstraint:"@biblatex/entry+object"}},"@bibtex/text":{parse:T,outputs:"@bibtex/entries+list"},"@bibtex/entry+object":{parse(e){return Fe([e])}},"@bibtex/entries+list":{parse:Fe},"@bibtxt/text":{parse:C,parseType:{dataType:"String",predicate:/^\s*(\[(?!\s*[{[]).*?\]\s*(\n\s*[^[]((?!:)\S)+\s*:\s*.+?\s*)*\s*)+$/}}},re={};for(const e in U)re[U[e]]=e;for(const e in H)re[H[e]]=e;for(const e in s)re[s[e]]=e;const me={};for(const e in J)me[J[e]]=e;const Ct=/[^a-zA-Z0-9\s!"#%&'()*+,\-./:;=?@[\]{}\u0300-\u0308\u030a-\u030c\u0332\u0323\u0327\u0328\u0361\u0326]/g,Rt=/.[\u0300-\u0308\u030a-\u030c\u0332\u0323\u0327\u0328\u0361\u0326]+/g,At=/[\u0300-\u0308\u030a-\u030c\u0332\u0323\u0327\u0328\u0361\u0326]/g,de={separated:",",list:" and "},Ke={i:"\\textit{",b:"\\textbf{",sc:"\\textsc{",sup:"\\textsuperscript{",sub:"\\textsubscript{",'span style="font-variant:small-caps;"':"\\textsc{",'span class="nocase"':"{"};function It(e){return e in re?re[e]in s?re[e]:`\\${re[e]}{}`:e in me?`$\\${me[e]}$`:""}function fe(e){return p.format.asciiOnly?e.normalize("NFKD").replace(Ct,t=>It(t)).replace(Rt,t=>Array.from(t).reduce((r,n)=>`{\\${re[n]} ${r}}`)).replace(At,""):e}function Ue(e){const t=[];let r=e.split(/<(\/?(?:i|b|sc|sup|sub|span)|span .*?)>/g);return r=r.map((n,a)=>a%2===0?fe(n):n in Ke?(t.push("/"+n.split(" ")[0]),Ke[n]):n===t[t.length-1]?(t.pop(),"}"):""),r.join("")}function Nt(e){if(e.family&&!e.prefix&&!e.given&!e.suffix)return e.family.includes(de.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),fe(t.join(", ").trim())}function Lt(e){return Ue(e).split(/(:\s*)/).map((t,r)=>r%2?t:t.replace(/([^\\])\b([a-z]*[A-Z].*?)\b/g,"$1{$2}")).join("")}function ge(e,t){switch(t){case"title":return Lt(e);case"literal":return Ue(e.toString());case"name":return Nt(e);case"verbatim":case"uri":return e.toString();default:return fe(e.toString())}}function Dt(e,t,r){const n=de[r];return e.map(a=>{const l=ge(a,t);return l.includes(n)?`{${l}}`:l}).join(n)}function be(e){return Array.isArray(e)?e.map(t=>fe(t).replace(/([;,"])/g,"{$1}")).join(", "):'"'+fe(e).replace(/(["])/g,"{$1}")+'"'}function Bt(e,t){if(!(e in W))return ge(t,"verbatim");const[r,n]=W[e];return r in de?Dt(t,n,r):ge(t,n)}function Mt(e){const t=[];if(e.field&&t.push("="+be(e.field)),e.item)for(const[r,n]of Object.entries(e.item)){if(!n)continue;const a=parseInt(r)+1;t.push(a+"="+be(n))}if(e.part)for(const[r,n]of Object.entries(e.part)){if(!n)continue;const a=parseInt(r)+1;for(const l in n)n[l]&&t.push(a+":"+l+"="+be(n[l]))}return t.join("; ")}function Ge({type:e,label:t,properties:r}){const n={type:e,label:t,properties:{}};for(const a in r){const l=r[a],[k,M]=a.split("+an:");M?(n.annotations||(n.annotations={}),n.annotations[k]||(n.annotations[k]={}),n.annotations[k][M]=Mt(l)):n.properties[a]=Bt(a,l)}return n}function $t(e){return mt(e).map(Ge)}function We(e){return ft(e).map(Ge)}function He(e,t,r){return r.listItem.join(`${e} = {${t}},`)}function qt(e,t){const r=[];for(const n in e.properties)if(r.push(He(n,e.properties[n],t)),e.annotations&&e.annotations[n])for(const a in e.annotations[n]){let l=n+p.biber.annotationMarker;a!=="default"&&(l+
|
||
|
`);return t.bibliographyContainer.join(r)}const ye=function(e,t){return function(r,n={}){const{type:a,format:l=a||"text"}=n;if(r=e(r),l==="object")return r;if(P.plugins.dict.has(l))return t(r,P.plugins.dict.get(l),n);throw new RangeError(`Output dictionary "${l}" not available`)}};var Kt={bibtex:ye(We,Je),biblatex:ye($t,Je),bibtxt:ye(We,Ft)};P.plugins.add(jt,{input:Pt,output:Kt,config:p})},"./node_modules/moo/moo.js":function(ce,L){var S,$,P;(function(R,_){$=[],S=_,P=typeof S=="function"?S.apply(L,$):S,P!==void 0&&(ce.exports=P)})(this,function(){"use strict";var R=Object.prototype.hasOwnProperty,_=Object.prototype.toString,D=typeof new RegExp().sticky=="boolean";function j(i){return i&&_.call(i)==="[object RegExp]"}function X(i){return i&&typeof i=="object"&&!j(i)&&!Array.isArray(i)}function le(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function B(i){var o=new RegExp("|"+i);return o.exec("").length-1}function ne(i){return"("+i+")"}function W(i){if(!i.length)return"(?!)";var o=i.map(function(u){return"(?:"+u+")"}).join("|");return"(?:"+o+")"}function H(i){if(typeof i=="string")return"(?:"+le(i)+")";if(j(i)){if(i.ignoreCase)throw new Error("RegExp /i flag not allowed");if(i.global)throw new Error("RegExp /g flag is implied");if(i.sticky)throw new Error("RegExp /y flag is implied");if(i.multiline)throw new Error("RegExp /m flag is implied");return i.source}else throw new Error("Not a pattern: "+i)}function U(i,o){return i.length>o?i:Array(o-i.length+1).join(" ")+i}function J(i,o){for(var u=i.length,f=0;;){var b=i.lastIndexOf(`
|
||
|
`,u-1);if(b===-1||(f++,u=b,f===o)||u===0)break}var m=f<o?0:u+1;return i.substring(m).split(`
|
||
|
`)}function ue(i){for(var o=Object.getOwnPropertyNames(i),u=[],f=0;f<o.length;f++){var b=o[f],m=i[b],y=[].concat(m);if(b==="include"){for(var T=0;T<y.length;T++)u.push({include:y[T]});continue}var w=[];y.forEach(function(g){X(g)?(w.length&&u.push(q(b,w)),u.push(q(b,g)),w=[]):w.push(g)}),w.length&&u.push(q(b,w))}return u}function Q(i){for(var o=[],u=0;u<i.length;u++){var f=i[u];if(f.include){for(var b=[].concat(f.include),m=0;m<b.length;m++)o.push({include:b[m]});continue}if(!f.type)throw new Error("Rule has no type: "+JSON.stringify(f));o.push(q(f.type,f))}return o}function q(i,o){if(X(o)||(o={match:o}),o.include)throw new Error("Matching rules cannot also include states");var u={defaultType:i,lineBreaks:!!o.error||!!o.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var f in o)R.call(o,f)&&(u[f]=o[f]);if(typeof u.type=="string"&&i!==u.type)throw new Error("Type transform cannot be a string (type '"+u.type+"' for token '"+i+"')");var b=u.match;return u.match=Array.isArray(b)?b:b?[b]:[],u.match.sort(function(m,y){return j(m)&&j(y)?0:j(y)?-1:j(m)?1:y.length-m.length}),u}function G(i){return Array.isArray(i)?Q(i):ue(i)}var ie=q("error",{lineBreaks:!0,shouldThrow:!0});function ae(i,o){for(var u=null,f=Object.create(null),b=!0,m=null,y=[],T=[],w=0;w<i.length;w++)i[w].fallback&&(b=!1);for(var w=0;w<i.length;w++){var g=i[w];if(g.include)throw new Error("Inheritance is not allowed in stateless lexers");if(g.error||g.fallback){if(u)throw!g.fallback==!u.fallback?new Error("Multiple "+(g.fallback?"fallback":"error")+" rules not allowed (for token '"+g.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+g.defaultType+"')");u=g}var C=g.match.slice();if(b)for(;C.length&&typeof C[0]=="string"&&C[0].length===1;){var V=C.shift();f[V.charCodeAt(0)]=g}if(g.pop||g.push||g.next){if(!o)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+g.defaultType+"')");if(g.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+g.defaultType+"')")}if(C.length!==0){b=!1,y.push(g);for(var z=0;z<C.length;z++){var Y=C[z];if(j(Y)){if(m===null)m=Y.unicode;else if(m!==Y.unicode&&g.fallback===!1)throw new Error("If one rule is /u then all must be")}}var Z=W(C.map(H)),I=new RegExp(Z);if(I.test(""))throw new Error("RegExp matches empty string: "+I);var oe=B(Z);if(oe>0)throw new Error("RegExp has capture groups: "+I+`
|
||
|
Use (?: \u2026 ) instead`);if(!g.lineBreaks&&I.test(`
|
||
|
`))throw new Error("Rule should declare lineBreaks: "+I);T.push(ne(Z))}}var E=u&&u.fallback,F=D&&!E?"ym":"gm",K=D||E?"":"|";m===!0&&(F+="u");var he=new RegExp(W(T)+K,F);return{regexp:he,groups:y,fast:f,error:u||ie}}function s(i){var o=ae(G(i));return new p({start:o},"start")}function h(i,o,u){var f=i&&(i.push||i.next);if(f&&!u[f])throw new Error("Missing state '"+f+"' (in token '"+i.defaultType+"' of state '"+o+"')");if(i&&i.pop&&+i.pop!=1)throw new Error("pop must be 1 (in token '"+i.defaultType+"' of state '"+o+"')")}function c(i,o){var u=i.$all?G(i.$all):[];delete i.$all;var f=Object.getOwnPropertyNames(i);o||(o=f[0]);for(var b=Object.create(null),m=0;m<f.length;m++){var y=f[m];b[y]=G(i[y]).concat(u)}for(var m=0;m<f.length;m++)for(var y=f[m],T=b[y],w=Object.create(null),g=0;g<T.length;g++){var C=T[g];if(C.include){var V=[g,1];if(C.include!==y&&!w[C.include]){w[C.include]=!0;var z=b[C.include];if(!z)throw new Error("Cannot include nonexistent state '"+C.include+"' (in state '"+y+"')");for(var Y=0;Y<z.length;Y++){var Z=z[Y];T.indexOf(Z)===-1&&V.push(Z)}}T.splice.apply(T,V),g--}}for(var I=Object.create(null),m=0;m<f.length;m++){var y=f[m];I[y]=ae(b[y],!0)}for(var m=0;m<f.length;m++){for(var oe=f[m],E=I[oe],F=E.groups,g=0;g<F.length;g++)h(F[g],oe,I);for(var K=Object.getOwnPropertyNames(E.fast),g=0;g<K.length;g++)h(E.fast[K[g]],oe,I)}return new p(I,o)}function v(i){for(var o=typeof Map<"u",u=o?new Map:Object.create(null),f=Object.getOwnPropertyNames(i),b=0;b<f.length;b++){var m=f[b],y=i[m],T=Array.isArray(y)?y:[y];T.forEach(function(w){if(typeof w!="string")throw new Error("keyword must be string (in keyword '"+m+"')");o?u.set(w,m):u[w]=m})}return function(w){return o?u.get(w):u[w]}}var p=function(i,o){this.startState=o,this.states=i,this.buffer="",this.stack=[],this.reset()};p.prototype.reset=function(i,o){return this.buffer=i||"",this.index=0,this.line=o?o.line:1,this.col=o?o.col:1,this.queuedToken=o?o.queuedToken:null,this.queuedText=o?o.queuedText:"",this.queuedThrow=o?o.queuedThrow:null,this.setState(o?o.state:this.startState),this.stack=o&&o.stack?o.stack.slice():[],this},p.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}},p.prototype.setState=function(i){if(!(!i||this.state===i)){this.state=i;var o=this.states[i];this.groups=o.groups,this.error=o.error,this.re=o.regexp,this.fast=o.fast}},p.prototype.popState=function(){this.setState(this.stack.pop())},p.prototype.pushState=function(i){this.stack.push(this.state),this.setState(i)};var O=D?function(i,o){return i.exec(o)}:function(i,o){var u=i.exec(o);return u[0].length===0?null:u};p.prototype._getGroup=function(i){for(var o=this.groups.length,u=0;u<o;u++)if(i[u+1]!==void 0)return this.groups[u];throw new Error("Cannot find token type for matched text")};function x(){return this.value}if(p.prototype.next=function(){var i=this.index;if(this.queuedGroup){var o=this._token(this.queuedGroup,this.queuedText,i);return this.queuedGroup=null,this.queuedText="",o}var u=this.buffer;if(i!==u.length){var y=this.fast[u.charCodeAt(i)];if(y)return this._token(y,u.charAt(i),i);var f=this.re;f.lastIndex=i;var b=O(f,u),m=this.error;if(b==null)return this._token(m,u.slice(i,u.length),i);var y=this._getGroup(b),T=b[0];return m.fallback&&b.index!==i?(this.queuedGroup=y,this.queuedText=T,this._token(m,u.slice(i,b.index),i)):this._token(y,T,i)}},p.prototype._token=function(i,o,u){var f=0;if(i.lineBreaks){var b=/\n/g,m=1;if(o===`
|
||
|
`)f=1;else for(;b.exec(o);)f++,m=b.lastIndex}var y={type:typeof i.type=="function"&&i.type(o)||i.defaultType,value:typeof i.value=="function"?i.value(o):o,text:o,toString:x,offset:u,lineBreaks:f,line:this.line,col:this.col},T=o.length;if(this.index+=T,this.line+=f,f!==0?this.col=T-m+1:this.col+=T,i.shouldThrow){var w=new Error(this.formatError(y,"invalid syntax"));throw w}return i.pop?this.popState():i.push?this.pushState(i.push):i.next&&this.setState(i.next),y},typeof Symbol<"u"&&Symbol.iterator){var A=function(i){this.lexer=i};A.prototype.next=function(){var i=this.lexer.next();return{value:i,done:!i}},A.prototype[Symbol.iterator]=function(){return this},p.prototype[Symbol.iterator]=function(){return new A(this)}}return p.prototype.formatError=function(i,o){if(i==null)var u=this.buffer.slice(this.index),i={text:u,offset:this.index,lineBreaks:u.indexOf(`
|
||
|
`)===-1?0:1,line:this.line,col:this.col};var f=2,b=Math.max(i.line-f,1),m=i.line+f,y=String(m).length,T=J(this.buffer,this.line-i.line+f+1).slice(0,5),w=[];w.push(o+" at line "+i.line+" col "+i.col+":"),w.push("");for(var g=0;g<T.length;g++){var C=T[g],V=b+g;w.push(U(String(V),y)+" "+C),V===i.line&&w.push(U("",y+i.col+1)+"^")}return w.join(`
|
||
|
`)},p.prototype.clone=function(){return new p(this.states,this.state)},p.prototype.has=function(i){return!0},{compile:s,states:c,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:v}})}}]);
|