!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=135)}({10:function(t,e,n){var r=n(34);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},11:function(t,e){function n(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise(function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)})}}},135:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return L});var r=n(3),o=n.n(r),i=n(2),a=n.n(i),c=n(11),s=n.n(c),u=n(15),l=n.n(u),f=n(4),d=n.n(f),h=n(5),p=n.n(h),y=n(9),v=n.n(y),m=n(8),g=n.n(m),b=n(10),E=n.n(b),w=(n(141),n(17)),L=function(t){function e(){var t;return d()(this,e),(t=v()(this,g()(e).apply(this,arguments))).editorCitationObserver=new MutationObserver(function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=t[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value,c=!0,s=!1,u=void 0;try{for(var l,f=a.removedNodes[Symbol.iterator]();!(c=(l=f.next()).done);c=!0){var d=l.value;d instanceof Element&&d.classList.contains(w.a.citationClass)&&dispatchEvent(new CustomEvent(w.a.events.CITATION_DELETED))}}catch(t){s=!0,u=t}finally{try{c||null==f.return||f.return()}finally{if(s)throw u}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}),t.selectionCache={fresh:!1,selection:"",bookmark:{rng:document.createRange()}},t}return E()(e,t),p()(e,[{key:"alert",value:function(t){this.editor.windowManager.alert(t)}},{key:"composeCitations",value:function(t,e,n){this.editor.focus();for(var r=this.editor.getDoc(),o=r.querySelectorAll("\n #".concat(w.a.footnoteId,",\n #").concat(w.a.bibliographyId,"\n ")),i=Array.from(o),a=0;a2&&void 0!==arguments[2]&&arguments[2]?this.setStaticBibliography(e):this.setStandardBibliography(t,e)}},{key:"setLoadingState",value:function(t){this.editor.setProgressState(t||!1)}},{key:"bindEvents",value:function(){var t=this;this.editor.on("focusin",function(){t.selectionCache=Object.assign({},t.selectionCache,{fresh:!1})}),this.editor.on("focusout",function(){t.selectionCache={fresh:!0,selection:t.selection,bookmark:t.editor.selection.getBookmark(1)}}),this.editor.on("hide",function(){dispatchEvent(new CustomEvent(w.a.events.UNAVAILABLE))}),this.editor.on("show",function(){dispatchEvent(new CustomEvent(w.a.events.AVAILABLE))}),this.editor.on("Undo",function(){dispatchEvent(new CustomEvent(w.a.events.UNDO))}),this.editor.addShortcut("meta+alt+r","Add Reference",function(){return dispatchEvent(new CustomEvent(w.a.events.ADD_REFERENCE))}),this.editor.addShortcut("meta+alt+p","Pin Reference List",function(){return dispatchEvent(new CustomEvent(w.a.events.TOGGLE_PINNED))}),this.editorCitationObserver.observe(this.editor.getBody(),{childList:!0,subtree:!0})}},{key:"composeFootnotes",value:function(){var t=this.editor.getDoc(),e=o()(t.querySelectorAll(".".concat(w.a.citationClass)).entries()).reduce(function(t,e){var n=l()(e,2),r=n[0],i=n[1];i.innerHTML="[".concat(r+1,"]");var a=i.getAttribute("data-footnote");return a?[].concat(o()(t),[a]):t},[]);if(0!==e.length){var n=this.editor.selection.getBookmark(),r=w.a.createFootnoteSection(e,["noselect","mceNonEditable"]),i=this.editor.getBody();this.editor.selection.setCursorLocation(i,i.childNodes.length),this.editor.insertContent(r.outerHTML),this.editor.selection.moveToBookmark(n)}}},{key:"setStandardBibliography",value:function(t,e){if("boolean"!=typeof e&&0!==e.length){var n=w.a.createBibliographyElement(t,e,["noselect","mceNonEditable"]),r=this.editor.selection.getBookmark(),o=this.editor.getBody();this.editor.selection.setCursorLocation(o,o.childNodes.length),this.editor.insertContent(n.outerHTML),this.editor.selection.moveToBookmark(r)}}},{key:"setStaticBibliography",value:function(t){var e="boolean"==typeof t?[]:t,n=w.a.createBibliographyElement({},e,["".concat(w.a.staticBibClass),"noselect","mceNonEditable"]);this.selectionCache.fresh&&this.editor.selection.moveToBookmark(this.selectionCache.bookmark),this.editor.insertContent(n.outerHTML)}},{key:"citationIds",get:function(){var t=this.editor.getDoc().querySelectorAll("*:not(.mce-offscreen-selection) > .".concat(w.a.citationClass));return o()(t).map(function(t){return t.id})}},{key:"citationsByIndex",get:function(){var t=this.editor.getDoc(),e=o()(t.querySelectorAll("\n *:not(.mce-offscreen-selection) >\n .".concat(w.a.citationClass,"\n "))),n=null!==t.querySelector("#".concat(w.a.footnoteId));return e.reduce(function(t,e,r){var i=e.getAttribute("data-reflist");if(!i)return t;var a=JSON.parse(i);return[].concat(o()(t),[{citationID:e.id,citationItems:a.map(function(t){return{id:t}}),properties:{index:r,noteIndex:n?1:0}}])},[])}},{key:"relativeCitationPositions",get:function(){var t=this,e=this.editor.getDoc(),n=(this.selectionCache.fresh?this.selectionCache.bookmark:this.editor.selection.getBookmark(1)).rng.startContainer;return o()(e.querySelectorAll("\n *:not(.mce-offscreen-selection) >\n .".concat(w.a.citationClass,"\n "))).reduce(function(e,r,i){if(!r.parentNode)throw new Error("parentNode not defined for citation");switch(n.compareDocumentPosition(r)){case Node.DOCUMENT_POSITION_PRECEDING:e.itemsPreceding=[].concat(o()(e.itemsPreceding),[[r.id,i]]);break;case Node.DOCUMENT_POSITION_FOLLOWING:e.itemsFollowing=[].concat(o()(e.itemsFollowing),[[r.id,i+1]]);break;default:r.parentElement.removeChild(r),t.editor.selection.moveToBookmark(t.selectionCache.bookmark)}return e},{itemsPreceding:[],itemsFollowing:[]})}},{key:"selection",get:function(){return this.selectionCache.fresh?this.selectionCache.selection:this.editor.selection.getContent({format:"html"})}}]),e}(w.a)},14:function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r},141:function(t,e,n){},15:function(t,e,n){var r=n(45),o=n(46),i=n(47);t.exports=function(t,e){return r(t)||o(t,e)||i()}},17:function(t,e,n){"use strict";var r,o=n(4),i=n.n(o),a=n(5),c=n.n(a),s=n(9),u=n.n(s),l=n(8),f=n.n(l),d=n(10),h=n.n(d),p=n(15),y=n.n(p),v=n(3),m=n.n(v),g=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o2&&void 0!==arguments[2]?arguments[2]:[],d=document.createElement("div");if(d.id=t.bibliographyId,d.setAttribute("data-reflist",JSON.stringify(n.map(function(t){return t.id}))),(r=d.classList).add.apply(r,[t.bibliographyId].concat(m()(f))),d.classList.contains(t.staticBibClass)&&(d.classList.remove(t.bibliographyId),d.removeAttribute("id"),0===n.length)){var h=top.ABT.i18n.errors.warnings;return d.innerHTML="".concat(h.warning,": ").concat(h.no_bib,"."),d}a&&("toggle"===l?((o=document.createElement("button")).classList.add("".concat(t.bibliographyId,"__heading"),"".concat(t.bibliographyId,"__heading_toggle")),o.setAttribute("aria-expanded","false"),o.setAttribute("aria-controls","".concat(this.bibliographyId,"__container")),o.setAttribute("data-heading-level",s)):(o=document.createElement(s)).classList.add("".concat(t.bibliographyId,"__heading")),o.textContent=a,d.appendChild(o));var p=document.createElement("div");p.id="".concat(this.bibliographyId,"__container"),p.classList.add("".concat(this.bibliographyId,"__container")),d.appendChild(p);var y=!0,v=!1,g=void 0;try{for(var b,E=n[Symbol.iterator]();!(y=(b=E.next()).done);y=!0){var w=b.value,L=document.createElement("div");L.id=w.id,L.innerHTML=w.html,p.appendChild(L)}}catch(t){v=!0,g=t}finally{try{y||null==E.return||E.return()}finally{if(v)throw g}}return d}},{key:"createFootnoteSection",value:function(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=document.createElement("div");o.id=t.footnoteId,(n=o.classList).add.apply(n,[t.footnoteId].concat(m()(r)));var i=document.createElement("div");i.classList.add("".concat(t.footnoteId,"__heading")),i.textContent=top.ABT.i18n.misc.footnotes,o.appendChild(i);for(var a=Array.from(e.entries()),c=0;c=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:k(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},49:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},5:function(t,e){function n(t,e){for(var n=0;n