!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1007)}({1007:function(e,t,n){const o=n(4).ipcRenderer;let r=null;function c(e){e&&(document.getElementsByTagName("html")[0].style.fontSize=`${e}px`)}document.addEventListener("click",function(e){if(!e)return;const t=e.target;if(e.preventDefault(),t.tagName&&"a"===t.tagName.toLowerCase()&&t.href)if("#"===t.getAttribute("href"))document.body.scrollTop=0;else if(t.hash&&t.getAttribute("href")===t.hash){const n=e.view.document.getElementById(t.hash.substr(1,t.hash.length-1).toLowerCase());n&&n.scrollIntoView()}else o.sendToHost("did-click-link",t.href)}),document.addEventListener("DOMContentLoaded",()=>{o.sendToHost("wv-first-loaded"),o.on("wv-render-html",(e,t)=>{let{html:n,editorMode:o}=t;const{theme:l,platform:s}=t,{fontSize:i}=t;c(i),n=n||"",o=o||"normal",r||(r=document.getElementById("root")).classList.remove("platform-pdf"),function(e){"preview"===e?r.classList.contains("preview")||r.classList.add("preview"):"preview"!==e&&r.classList.contains("preview")&&r.classList.remove("preview")}(o),function(e){if(!e)return;const t=e?`os-${e}`:"",n=document.documentElement.className;/\bos-\w+\b/.test(n)?document.documentElement.className=n.replace(/\bos-\w+\b/,t):document.documentElement.className=`${n?`${n} `:""}${t}`}(s),function(e){const t=e?`wv-${e}`:"wv-light";document.documentElement.className=document.documentElement.className.replace(/\bwv-\w*\b/,t)}(l),r.innerHTML=n}),o.on("wv-scroll",(e,t)=>{document.body.scrollTop=r.scrollHeight*t-document.body.clientHeight}),o.on("wv-change-fontsize",(e,t)=>{c(t)}),o.on("scroll-target",(e,t)=>{const{text:n,depth:o}=t,r=`h${o}`,c=document.getElementsByTagName(r);let l;const s=c.length;for(let e=0;e<s;e++)if(c[e].innerText===n){l=c[e];break}l&&l.scrollIntoView()})})},4:function(e,t){e.exports=require("electron")}});