text: (()=>{var __webpack_modules__={710:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(645),o=r.n(n),i=r(40),a=o()((function(e){return e[1]}));a.i(i.Z),a.push([e.id,'.pbmap{font-family:verdana, \'Source Han Sans\', "Microsoft YaHei", "黑体", sans-serif;margin:auto;min-width:1110px;margin:50px auto}.pbmap small{color:gray}.pbmap #title{margin-right:.5ex}.pbmap #note{margin-top:.7em}.pbmap a{color:#007bff;text-decoration:none;background-color:transparent}.pbmap h2,.pbmap h5{line-height:1.2;margin-top:0;margin-bottom:.5em;font-weight:400}.pbmap h2{text-align:center;font-size:2rem}.pbmap h5{font-size:1.25rem;text-align:right}.pbmap .box{margin:0 auto;max-width:1110px}.pbmap table{margin:0 auto;border-collapse:collapse;border-spacing:2px}.pbmap table tr{border:0}.pbmap table th{font-weight:normal;text-align:right;padding:3px;margin-right:5px;font-size:17px}.pbmap table th:first-child{padding-right:1em}.pbmap table td{height:30px;padding:3px;align-content:left;border-right:1px solid gray}.pbmap table tr.hline td{border-top:2px solid lightgray;padding:0px;height:0px}.pbmap table tr.hline th{height:0px;padding:0px}.pbmap table td.cmt{font-weight:none;width:auto;border:none}.pbmap fl,.pbmap hf,.pbmap tec,.pbmap qt{font-weight:600;text-align:center;font-family:\'Courier New\', Courier, monospace;line-height:1.5;display:inline-block}.pbmap fl{width:14px;font-size:20px}.pbmap hf{padding-top:5px;width:7px;font-size:15px;text-decoration:underline}.pbmap tec{padding-top:6px;font-size:11px;text-decoration-line:underline;width:4.6667px}.pbmap qt{padding-top:7px;width:3.5px;font-size:10px;text-decoration-line:underline}body{margin:0;top:0;left:0;right:0;bottom:0;overflow:hidden}.cont{padding:0 30px;min-width:fit-content}#preview{flex-grow:1}.mainframe{width:100vw;height:100vh;overflow:hidden}.mainframe .handle{width:8px;left:-8px;margin:0 2px;background:center/contain no-repeat url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==")}.left-content{overflow-y:auto;height:100vh}.left-content .row.multiple{display:flex;flex-direction:row;flex-wrap:wrap}.left-content .row.multiple div{min-width:250px;margin-left:0;flex-grow:1}.left-content::-webkit-scrollbar{width:8px}.left-content::-webkit-scrollbar-thumb{border-radius:8px;background-color:#90caf9}.rightblock::-webkit-scrollbar{width:8px;height:12px}.rightblock::-webkit-scrollbar-thumb{border-radius:8px;background-color:#80cbc4}.codearea{font-family:verdana, sans-serif, "黑体";line-height:135%}.controlswitches{position:sticky;top:0px;z-index:9999;padding:10px 24px}.controlswitches .row{display:flex;flex-wrap:wrap}.controlswitches .row .switch{margin:4px 8px}.buttons .btn{margin:4px 8px}\n',""]);const c=a},40:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(645),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".mainframe{\r\n    display:flex;\r\n}\r\n.leftblock{\r\n    position: relative;\r\n}\r\n.left{\r\n    min-width:400px;\r\n    width: 40vw;\r\n    max-width: 70vw;\r\n    background: #ccc;\r\n    resize:horizontal;\r\n    overflow:scroll;\r\n    height:100vh;\r\n    opacity:0;\r\n    position: relative;\r\n    z-index: 0;\r\n    margin-right: -8px;\r\n}\r\n.left-content{\r\n    position: absolute;\r\n    width: 100%;\r\n    height: 100vh;\r\n    color:#000;\r\n    left: 0;\r\n    top:0;\r\n    margin-right:8px;\r\n}\r\n.left::-webkit-scrollbar {\r\n    width: 8px;\r\n    height: inherit;\r\n}\r\n.rightblock{\r\n    margin-left: 0px;\r\n    flex: 1;\r\n    overflow: auto;\r\n}",""]);const i=o},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);n&&o[l[0]]||(r&&(l[2]?l[2]="".concat(r," and ").concat(l[2]):l[2]=r),t.push(l))}},t}},971:(e,t,r)=>{var n=r(195),o=r(15),i=[r(257)];e.exports=n.createStore(o,i)},257:(e,t,r)=>{e.exports=function(){return r(703),{}}},703:()=>{"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var r,n,o,i,a,c=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(l)){for(i=l.length,r=0;r<i;r+=1)a[r]=str(r,l)||"null";return o=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+c+"]":"["+a.join(",")+"]",gap=c,o}if(rep&&"object"==typeof rep)for(i=rep.length,r=0;r<i;r+=1)"string"==typeof rep[r]&&(o=str(n=rep[r],l))&&a.push(quote(n)+(gap?": ":":")+o);else for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(o=str(n,l))&&a.push(quote(n)+(gap?": ":":")+o);return o=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+c+"}":"{"+a.join(",")+"}",gap=c,o}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;n<r;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var r,n,o=e[t];if(o&&"object"==typeof o)for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(void 0!==(n=walk(o,r))?o[r]=n:delete o[r]);return reviver.call(e,t,o)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},195:(e,t,r)=>{var n=r(78),o=n.slice,i=n.pluck,a=n.each,c=n.bind,l=n.create,p=n.isList,s=n.isFunction,u=n.isObject;e.exports={createStore:d};var f={version:"2.0.12",enabled:!1,get:function(e,t){var r=this.storage.read(this._namespacePrefix+e);return this._deserialize(r,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(r,n){e.call(t,t._deserialize(r),(n||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return d.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return d(this.storage,this.plugins,e)}};function d(e,t,r){r||(r=""),e&&!p(e)&&(e=[e]),t&&!p(t)&&(t=[t]);var n=r?"__storejs_"+r+"_":"",d=r?new RegExp("^"+n):null;if(!/^[a-zA-Z0-9_\-]*$/.test(r))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var h=l({_namespacePrefix:n,_namespaceRegexp:d,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var r=e.read(t)===t;return e.remove(t),r}catch(e){return!1}},_assignPluginFnProp:function(e,t){var r=this[t];this[t]=function(){var t=o(arguments,0),n=this;function i(){if(r)return a(arguments,(function(e,r){t[r]=e})),r.apply(n,t)}var c=[i].concat(t);return e.apply(n,c)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var r="";try{r=JSON.parse(e)}catch(t){r=e}return void 0!==r?r:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(p(e))a(e,(function(e){t._addPlugin(e)}));else if(!i(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!s(e))throw new Error("Plugins must be function values that return objects");var r=e.call(this);if(!u(r))throw new Error("Plugins must return an object of function properties");a(r,(function(r,n){if(!s(r))throw new Error("Bad plugin property: "+n+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(r,n)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;e&&(e.warn?e.warn:e.log).apply(e,arguments)}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},f,{plugins:[]});return h.raw={},a(h,(function(e,t){s(e)&&(h.raw[t]=c(h,e))})),a(e,(function(e){h._addStorage(e)})),a(t,(function(e){h._addPlugin(e)})),h}},78:(e,t,r)=>{var n=Object.assign?Object.assign:function(e,t,r,n){for(var o=1;o<arguments.length;o++)l(Object(arguments[o]),(function(t,r){e[r]=t}));return e},o=function(){if(Object.create)return function(e,t,r,o){var i=c(arguments,1);return n.apply(this,[Object.create(e)].concat(i))};{function e(){}return function(t,r,o,i){var a=c(arguments,1);return e.prototype=t,n.apply(this,[new e].concat(a))}}}(),i=String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},a="undefined"!=typeof window?window:r.g;function c(e,t){return Array.prototype.slice.call(e,t||0)}function l(e,t){p(e,(function(e,r){return t(e,r),!1}))}function p(e,t){if(s(e)){for(var r=0;r<e.length;r++)if(t(e[r],r))return e[r]}else for(var n in e)if(e.hasOwnProperty(n)&&t(e[n],n))return e[n]}function s(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}e.exports={assign:n,create:o,trim:i,bind:function(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}},slice:c,each:l,map:function(e,t){var r=s(e)?[]:{};return p(e,(function(e,n){return r[n]=t(e,n),!1})),r},pluck:p,isList:s,isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isObject:function(e){return e&&"[object Object]"==={}.toString.call(e)},Global:a}},15:(e,t,r)=>{e.exports=[r(627),r(347),r(524),r(580),r(855),r(728)]},580:(e,t,r)=>{var n=r(78),o=n.Global,i=n.trim;e.exports={name:"cookieStorage",read:function(e){if(!e||!p(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(a.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){e&&(a.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:c,remove:l,clearAll:function(){c((function(e,t){l(t)}))}};var a=o.document;function c(e){for(var t=a.cookie.split(/; ?/g),r=t.length-1;r>=0;r--)if(i(t[r])){var n=t[r].split("="),o=unescape(n[0]);e(unescape(n[1]),o)}}function l(e){e&&p(e)&&(a.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function p(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(a.cookie)}},627:(e,t,r)=>{var n=r(78).Global;function o(){return n.localStorage}function i(e){return o().getItem(e)}e.exports={name:"localStorage",read:i,write:function(e,t){return o().setItem(e,t)},each:function(e){for(var t=o().length-1;t>=0;t--){var r=o().key(t);e(i(r),r)}},remove:function(e){return o().removeItem(e)},clearAll:function(){return o().clear()}}},728:e=>{e.exports={name:"memoryStorage",read:function(e){return t[e]},write:function(e,r){t[e]=r},each:function(e){for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)},remove:function(e){delete t[e]},clearAll:function(e){t={}}};var t={}},347:(e,t,r)=>{var n=r(78).Global;e.exports={name:"oldFF-globalStorage",read:function(e){return o[e]},write:function(e,t){o[e]=t},each:i,remove:function(e){return o.removeItem(e)},clearAll:function(){i((function(e,t){delete o[e]}))}};var o=n.globalStorage;function i(e){for(var t=o.length-1;t>=0;t--){var r=o.key(t);e(o[r],r)}}},524:(e,t,r)=>{var n=r(78).Global;e.exports={name:"oldIE-userDataStorage",write:function(e,t){if(!c){var r=p(e);a((function(e){e.setAttribute(r,t),e.save(o)}))}},read:function(e){if(!c){var t=p(e),r=null;return a((function(e){r=e.getAttribute(t)})),r}},each:function(e){a((function(t){for(var r=t.XMLDocument.documentElement.attributes,n=r.length-1;n>=0;n--){var o=r[n];e(t.getAttribute(o.name),o.name)}}))},remove:function(e){var t=p(e);a((function(e){e.removeAttribute(t),e.save(o)}))},clearAll:function(){a((function(e){var t=e.XMLDocument.documentElement.attributes;e.load(o);for(var r=t.length-1;r>=0;r--)e.removeAttribute(t[r].name);e.save(o)}))}};var o="storejs",i=n.document,a=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var e,t,r;try{(t=new ActiveXObject("htmlfile")).open(),t.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,r=e.createElement("div")}catch(t){r=i.createElement("div"),e=i.body}return function(t){var n=[].slice.call(arguments,0);n.unshift(r),e.appendChild(r),r.addBehavior("#default#userData"),r.load(o),t.apply(this,n),e.removeChild(r)}}(),c=(n.navigator?n.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./),l=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function p(e){return e.replace(/^\d/,"___$&").replace(l,"___")}},855:(e,t,r)=>{var n=r(78).Global;function o(){return n.sessionStorage}function i(e){return o().getItem(e)}e.exports={name:"sessionStorage",read:i,write:function(e,t){return o().setItem(e,t)},each:function(e){for(var t=o().length-1;t>=0;t--){var r=o().key(t);e(i(r),r)}},remove:function(e){return o().removeItem(e)},clearAll:function(){return o().clear()}}},379:(e,t,r)=>{"use strict";var n,o=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),i=[];function a(e){for(var t=-1,r=0;r<i.length;r++)if(i[r].identifier===e){t=r;break}return t}function c(e,t){for(var r={},n=[],o=0;o<e.length;o++){var c=e[o],l=t.base?c[0]+t.base:c[0],p=r[l]||0,s="".concat(l," ").concat(p);r[l]=p+1;var u=a(s),f={css:c[1],media:c[2],sourceMap:c[3]};-1!==u?(i[u].references++,i[u].updater(f)):i.push({identifier:s,updater:g(f,t),references:1}),n.push(s)}return n}function l(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=r.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var p,s=(p=[],function(e,t){return p[e]=t,p.filter(Boolean).join("\n")});function u(e,t,r,n){var o=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=s(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function f(e,t,r){var n=r.css,o=r.media,i=r.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var d=null,h=0;function g(e,t){var r,n,o;if(t.singleton){var i=h++;r=d||(d=l(t)),n=u.bind(null,r,i,!1),o=u.bind(null,r,i,!0)}else r=l(t),n=f.bind(null,r,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n));var r=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var o=a(r[n]);i[o].references--}for(var l=c(e,t),p=0;p<r.length;p++){var s=a(r[p]);0===i[s].references&&(i[s].updater(),i.splice(s,1))}r=l}}}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var __webpack_exports__={};(()=>{"use strict";var e=__webpack_require__(379),t=__webpack_require__.n(e),r=__webpack_require__(710);t()(r.Z,{insert:"head",singleton:!1}),r.Z.locals;var n=__webpack_require__(971),o=__webpack_require__.n(n),i={f:"fl",h:"hf",t:"tec",q:"qt"};const a=function(e,t,r,n,o){return{title:e||"",artist:t||"",info:r||"",note:n||"",map:o||"",compile(){var e;return"<table><tbody>"+this.map.replace(/\n/g,"").replace(/(\>|\-\-\-\-|)(.*?),([RL\# ])(|\@[\w])\{(.*?)\}/g,(function(t,r,n,o,a,c){return"#"==o?r+"<tr><th>"+n+"</th><th></th><td class='cmt' colspan='8'>"+c+"</td></tr>":(e=i[a.slice(1)]?i[a.slice(1)]:"fl",r+"<tr><th>"+n+"</th><th>"+o+"</th>"+("<td>"+c+"</td>").replace(/([A-Z\d])([A-Z\d])/g,"$1<"+e+">$2</"+e+">").replace(/([^fhqtA-Z\d])([A-Z\d])/g,"$1<"+e+">$2</"+e+">").replace(/([fhtq])([ A-Z\d])/g,(function(e,t,r){return"<"+i[t]+">"+(" "==r?"":r)+"</"+i[t]+">"})).replace(/ /g,"<"+e+"></"+e+">").replace(/\|/g,"</td><td>")+"</tr>")})).replace(/\-\-\-\-/g,'<tr class="hline"><th></th><td colspan="9"></td></tr>')+"</tbody></table>"},extract(){return{title:this.title,artist:this.artist,info:this.info,note:this.note,map:this.map}}}};function c(e){return 1===e.toString().length?"0"+e.toString():e}function l(e){return e.getFullYear()+"-"+c(e.getMonth()+1)+"-"+c(e.getDate())+" "+c(e.getHours())+":"+c(e.getMinutes())+":"+c(e.getSeconds())}new Vue({el:"#app",data:{pbmap:new a,interface:{editor:!0,detail:!0,buttons:!0,rescale:1},lastsave:void 0},methods:{resize(){M.textareaAutoResize(document.querySelector("#note")),M.textareaAutoResize(document.querySelector("#content"))},importJson(){console.log("importing from json");var e=document.getElementById("jsonupload");if(e.value){var t=e.files[0];if("application/json"===t.type){var r=new FileReader;r.onload=e=>{var r=e.target.result;console.log("got file"+t.name);try{var n=JSON.parse(r);this.autoFill(n),this.autoSave()}catch(e){return console.error(e),void alert("导入失败\n"+e)}},r.readAsText(t)}else alert("文件类型不匹配")}},exportJson(){console.log("exporting to json"),this.autoDownload(this.pbmap.title+".json",JSON.stringify(this.pbmap))},exportHTML(){console.log("exporting HTML");var e='<!DOCTYPE html><html><head><meta charset="utf-8"/><title>{{title}}</title><style>.pbmap{font-family:verdana,"Source Han Sans","Microsoft YaHei","黑体",sans-serif;margin:auto;min-width:1110px;margin:50px auto}.pbmap small{color:gray}.pbmap #title{margin-right:.5ex}.pbmap #note{margin-top:.7em}.pbmap a{color:#007bff;text-decoration:none;background-color:transparent}.pbmap h2,.pbmap h5{line-height:1.2;margin-top:0;margin-bottom:.5em;font-weight:400}.pbmap h2{text-align:center;font-size:2rem}.pbmap h5{font-size:1.25rem;text-align:right}.pbmap .box{margin:0 auto;max-width:1110px}.pbmap table{margin:0 auto;border-collapse:collapse;border-spacing:2px}.pbmap table tr{border:0}.pbmap table th{font-weight:normal;text-align:right;padding:3px;margin-right:5px;font-size:17px}.pbmap table th:first-child{padding-right:1em}.pbmap table td{height:30px;padding:3px;align-content:left;border-right:1px solid gray}.pbmap table tr.hline td{border-top:2px solid #d3d3d3;padding:0px;height:0px}.pbmap table tr.hline th{height:0px;padding:0px}.pbmap table td.cmt{font-weight:none;width:auto;border:none}.pbmap fl,.pbmap hf,.pbmap tec,.pbmap qt{font-weight:600;text-align:center;font-family:"Courier New",Courier,monospace;line-height:1.5;display:inline-block}.pbmap fl{width:14px;font-size:20px}.pbmap hf{padding-top:5px;width:7px;font-size:15px;text-decoration:underline}.pbmap tec{padding-top:6px;font-size:11px;text-decoration-line:underline;width:4.6667px}.pbmap qt{padding-top:7px;width:3.5px;font-size:10px;text-decoration-line:underline}</style></head><body><div class="pbmap" style="margin: 50px auto;">{{pbmap}}</div></body></html>'.replace("{{title}}",this.pbmap.title).replace("{{pbmap}}",document.getElementById("export").innerHTML);this.autoDownload(this.pbmap.title+".html",e)},clearAll(){console.log("clear all"),this.pbmap=new a,setTimeout(this.resize,50)},autoDownload(e,t){var r=new Blob([t]),n=document.getElementById("autod");n.setAttribute("download",e),n.setAttribute("href",URL.createObjectURL(r)),n.click(),n.setAttribute("href",""),n.setAttribute("download","")},autoSave(){var e=this.pbmap.extract();const t=new Date;e.time=t.getTime(),o().set("autosave",e),this.lastsave=l(t),console.log("Autosaved.")},autoFill(e){this.pbmap=new a(e.title,e.artist,e.info,e.note,e.map),setTimeout(this.resize,50)}},mounted(){let e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;this.observer=new e((e=>{this.resize()})),this.observer.observe(document.querySelector(".left"),{attributes:!0,attributeFilter:["style"],attributeOldValue:!1}),window.onresize=()=>{this.resize()},this.resize();const t=o().get("autosave");t&&(this.autoFill(t),this.lastsave=l(new Date(t.time)),console.log("Loading from storage:",t)),this.autosaver=setInterval(this.autoSave,6e4)},computed:{preview(){return this.pbmap.compile()}}})})()})();