/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/@los.dev/v-md-editor@2.3.17/lib/base-editor.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define("VMdEditor",["vue"],e):"object"==typeof exports?exports.VMdEditor=e(require("vue")):t.VMdEditor=e(t.Vue)}("undefined"!=typeof self?self:this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return 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 i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));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=109)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return s})),n.d(e,"g",(function(){return l})),n.d(e,"h",(function(){return u})),n.d(e,"i",(function(){return f})),n.d(e,"j",(function(){return d})),n.d(e,"k",(function(){return h})),n.d(e,"l",(function(){return p})),n.d(e,"m",(function(){return m})),n.d(e,"n",(function(){return g})),n.d(e,"o",(function(){return v})),n.d(e,"p",(function(){return b})),n.d(e,"q",(function(){return y})),n.d(e,"r",(function(){return w})),n.d(e,"s",(function(){return x})),n.d(e,"t",(function(){return k})),n.d(e,"u",(function(){return C})),n.d(e,"v",(function(){return j}));var r="bold",i="clear",o="code",a="fullscreen",c="h1",s="h2",l="h3",u="h4",f="h5",d="h6",h="hr",p="image",m="italic",g="link",v="ol",b="quote",y="redo",w="strikethrough",x="sync-scroll",k="table",C="ul",j="undo"},function(t,e,n){"use strict";n.d(e,"f",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return l})),n.d(e,"b",(function(){return u}));var r=Object.prototype.toString,i=function(t){return"[object Object]"===r.call(t)};function o(t,e){return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}function a(t){for(var e={},n=0;n<t.length;n++)t[n]&&o(e,t[n]);return e}function c(t,e){e.keys().forEach((function(n){t[n]=e(n)}))}var s="undefined"!=typeof window;function l(t){return/([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi.test(t)}function u(t){var e,n,r=t.selected,i=t.InsertGetter,o=t.selectedGetter,a=void 0===o?function(t){return t}:o,c=t.ignoreEmptyLine,s=void 0===c||c;return r?(n=a(r),e=i(r,1),-1!==r.indexOf("\n")&&(n=e=r.split("\n").map((function(t,e){return s&&!t?"":i(t,e+1).replace(a(null),"")})).join("\n"))):(e=i(null,1),n=a(r)),{insertContent:e,newSelected:n}}},function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r="data-v-md-line",i="data-v-md-heading",o="data-v-md-anchor"},function(t,e,n){"use strict";e.a={PREVIEW:"preview",EDITABLE:"editable",EDIT:"edit"}},function(t,e,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t){var e=0;return t===window?e=t.pageYOffset:t&&(e=t.scrollTop),e}function i(t,e){t===window?window.scrollTo(window.pageYOffset,e):t&&(t.scrollTop=e)}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}))},function(t,e,n){"use strict";var r=n(5),i=n(11),o=n.n(i),a={svg:[],altGlyph:[],altGlyphDef:[],altGlyphItem:[],animate:[],animateColor:[],animateMotion:[],animateTransform:[],circle:[],clipPath:[],"color-profile":[],cursor:[],"definition-src":[],defs:[],desc:[],ellipse:[],feBlend:[],feColorMatrix:[],feComponentTransfer:[],feComposite:[],feConvolveMatrix:[],feDiffuseLighting:[],feDisplacementMap:[],feDistantLight:[],feFlood:[],feFuncA:[],feFuncB:[],feFuncG:[],feFuncR:[],feGaussianBlur:[],feImage:[],feMerge:[],feMergeNode:[],feMorphology:[],feOffset:[],fePointLight:[],feSpecularLighting:[],feSpotLight:[],feTile:[],feTurbulence:[],filter:[],font:[],foreignObject:[],g:[],glyph:[],glyphRef:[],hkern:[],image:[],line:[],linearGradient:[],marker:[],mask:[],metadata:[],"missing-glyph":[],mpath:[],path:[],pattern:[],polygon:[],polyline:[],radialGradient:[],rect:[],set:[],stop:[],style:[],switch:[],symbol:[],text:[],textPath:[],title:[],tref:[],tspan:[],use:[],view:[],vkern:[]},c={math:[],annotation:[],semantics:[],mtext:[],mn:[],mo:[],mi:[],mspace:[],mover:[],munder:[],munderover:[],msup:[],msub:[],msubsup:[],mfrac:[],mroot:[],msqrt:[],mtable:[],mtr:[],mtd:[],mlabeledtr:[],mrow:[],menclose:[],mstyle:[],mpadded:[],mphantom:[],mglyph:[]},s=["style","align","class","id"],l=["data-"],u=Object(r.a)({},{input:["type"],ol:["reversed","start","type"],button:["type"],summary:[]},c,a),f={whiteList:Object(r.a)({},o.a.getDefaultWhiteList(),u),onIgnoreTagAttr:function(t,e,n){if(a[t]||c[t]||s.find((function(t){return t===e}))||l.find((function(t){return e.startsWith(t)})))return e+'="'+o.a.escapeAttrValue(n)+'"'}},d=new o.a.FilterXSS(f);d.extend=function(t){var e=d.options;Object.keys(t).forEach((function(n){if("whiteList"===n)Object.keys(t.whiteList).forEach((function(n){var r=t.whiteList[n],i=e.whiteList;i[n]?i[n]=[].concat(i[n],r):i[n]=r}));else if("onIgnoreTagAttr"===n){var r=e.onIgnoreTagAttr;e.onIgnoreTagAttr=function(){for(var e,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=r.call.apply(r,[this].concat(i)),c=(e=t.onIgnoreTagAttr).call.apply(e,[this].concat(i));return a||c}}else e[n]=t[n]}))};e.a=d},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r=n(6);function i(t){var e=t.currentScrollTop,n=t.scrollToTop,r=t.scrollFn,i=t.percent,o=void 0===i?10:i,a=t.onScrollEnd,c=n>e?"down":"up",s=o/100*(n-e);window.requestAnimationFrame((function t(){e+=s,"down"===c&&e>=n||"up"===c&&e<=n?(r(n),window.cancelAnimationFrame(undefined),a&&window.requestAnimationFrame(a)):(r(e),window.requestAnimationFrame(t))}))}function o(t){var e=t.scrollTarget,n=t.scrollToTop,o=t.percent,a=void 0===o?10:o,c=t.onScrollEnd;i({currentScrollTop:Object(r.a)(e),scrollToTop:n,scrollFn:function(t){return Object(r.b)(e,t)},percent:a,onScrollEnd:c})}},function(t,e,n){"use strict";n.r(e);var r=n(0);var i=n(7),o=n(13),a=function(){function t(){this.lang=new o.a}var e=t.prototype;return e.defaultMarkdownLoader=function(t){return t},e.use=function(t,e){return"function"==typeof t?t(this,e):t.install(this,e),this},e.theme=function(t){this.themeConfig=t},e.extendMarkdown=function(t){if(!this.themeConfig)return console.error("Please use theme before using plugins");t(this.themeConfig.markdownParser)},e.parse=function(t){var e,n=this.themeConfig.markdownParser,r=(null==n||null==(e=n.render)?void 0:e.bind(n))||this.defaultMarkdownLoader;return"function"==typeof r&&r!==this.defaultMarkdownLoader||console.error("Please configure your markdown parser"),r(t)},t}(),c={name:"v-md-preview",mixins:[n(16).a],props:{text:{type:String,default:""},theme:Object,beforeChange:Function},emits:["change"],data:function(){return{html:""}},watch:{text:function(){this.handleTextChange()},langConfig:function(){this.handleTextChange()}},computed:{vMdParser:function(){return this.$options.vMdParser},previewClass:function(){return this.vMdParser.themeConfig.previewClass},langConfig:function(){return this.vMdParser.lang.langConfig}},created:function(){this.handleTextChange()},methods:{handleTextChange:function(){var t=this,e=function(e){t.html=i.a.process(t.$options.vMdParser.parse(e)),t.$emit("change",e,t.html)};this.beforeChange?this.beforeChange(this.text,e):e(this.text)}}},s=new a;s.lang.config=Object(r.reactive)(s.lang.config),c.vMdParser=new a;var l=c;l.render=function(t,e,n,i,o,a){return Object(r.openBlock)(),Object(r.createBlock)("div",{class:"v-md-editor-preview",style:{tabSize:t.tabSize,"-moz-tab-size":t.tabSize,"-o-tab-size":t.tabSize},onClick:e[1]||(e[1]=function(){return t.handlePreviewClick.apply(t,arguments)})},[Object(r.createVNode)("div",{class:[t.previewClass],innerHTML:t.html},null,10,["innerHTML"])],4)};var u=l;n(18);u.version="2.3.17",u.install=function(t){t.component(u.name,u)},u.xss=i.a,u.use=function(t,e){return"function"==typeof t?t(u,e):t.install(u,e),u};e.default=u},function(t,e,n){var r=n(37)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){var r=n(19),i=n(22),o=n(26);function a(t,e){return new o(e).process(t)}for(var c in(e=t.exports=a).filterXSS=a,e.FilterXSS=o,r)e[c]=r[c];for(var c in i)e[c]=i[c];"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)},function(t,e,n){"use strict";function r(t,e){var n=e.accept;return Object.keys(t).filter((function(e){var r=t[e],i=r.type,o=r.name,a=o.indexOf(".")>-1?"."+o.split(".").pop():"",c=i.replace(/\/.*$/,"");return n.split(",").map((function(t){return t.trim()})).filter((function(t){return t})).some((function(t){return/\..+$/.test(t)?a===t:/\/\*$/.test(t)?c===t.replace(/\/\*$/,""):!!/^[^\/]+\/[^\/]+$/.test(t)&&i===t}))})).map((function(e){return t[e]}))}function i(t){var e=[];return Object.keys(t.items).forEach((function(n){var r=t.items[n];if("file"===r.kind){var i=r.getAsFile();i&&e.push(i)}})),e}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(2),i=Object.prototype.hasOwnProperty;function o(t,e){return Object.keys(e).forEach((function(n){!function(t,e,n){var a=e[n];null!=a&&(i.call(t,n)&&Object(r.f)(a)?t[n]=o(Object(t[n]),e[n]):t[n]=a)}(t,e,n)})),t}var a=function(){function t(t){void 0===t&&(t={}),this.config={lang:"zh-CN",langConfig:{"zh-CN":{}}},this.options=t}var e=t.prototype;return e.use=function(t,e){var n;this.config.lang=t,this.add(((n={})[t]=e,n)),this.options.afterUse&&this.options.afterUse(t,e)},e.add=function(t){void 0===t&&(t={}),o(this.config.langConfig,t)},t}()},function(t,e,n){var r=n(20),i=n(24);for(var o in(e=t.exports=function(t,e){return new i(e).process(t)}).FilterCSS=i,r)e[o]=r[o];"undefined"!=typeof window&&(window.filterCSS=t.exports)},function(t,e){t.exports={indexOf:function(t,e){var n,r;if(Array.prototype.indexOf)return t.indexOf(e);for(n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},forEach:function(t,e,n){var r,i;if(Array.prototype.forEach)return t.forEach(e,n);for(r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}}},function(t,e,n){"use strict";var r=n(6),i=n(8),o=n(3);e.a={props:{tabSize:{type:Number,default:2},scrollContainer:{type:Function,default:function(){return window}},top:{type:Number,default:0}},emits:["image-click"],methods:{handlePreviewClick:function(t){var e=t.target;if("IMG"!==e.tagName){var n=e.getAttribute(o.a),r=this.$el.querySelector("["+o.b+'="'+n+'"]');r&&this.scrollToTarget({target:r})}else{if(!e.getAttribute("src"))return;var i=Array.from(this.$el.querySelectorAll("img")),a=i.map((function(t){return t.getAttribute("src")})).filter((function(t){return t})),c=i.indexOf(e);this.$emit("image-click",a,c)}},getOffsetTop:function(t,e){var n=t.getBoundingClientRect();return e===window||e===document.documentElement?n.top:n.top-e.getBoundingClientRect().top},scrollToTarget:function(t){var e=t.target,n=t.scrollContainer,o=void 0===n?this.scrollContainer():n,a=t.top,c=void 0===a?this.top:a,s=t.onScrollEnd,l=this.getOffsetTop(e,o),u=Object(r.a)(o)+l-c;Object(i.a)({scrollTarget:o,scrollToTop:u,onScrollEnd:s})},scrollToLine:function(t){var e=t.lineIndex,n=t.onScrollEnd;if(e){var r=this.$el.querySelector("["+o.c+'="'+e+'"]');r&&this.scrollToTarget({target:r,onScrollEnd:n})}}}}},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a){try{var c=t[o](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function c(t){r(a,i,o,c,s,"next",t)}function s(t){r(a,i,o,c,s,"throw",t)}c(void 0)}))}}n.d(e,"a",(function(){return i}))},function(t,e,n){},function(t,e,n){var r=n(14).FilterCSS,i=n(14).getDefaultWhiteList,o=n(15);function a(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var c=new r;function s(t){return t.replace(l,"&lt;").replace(u,"&gt;")}var l=/</g,u=/>/g,f=/"/g,d=/&quot;/g,h=/&#([a-zA-Z0-9]*);?/gim,p=/&colon;?/gim,m=/&newline;?/gim,g=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,v=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,b=/u\s*r\s*l\s*\(.*/gi;function y(t){return t.replace(f,"&quot;")}function w(t){return t.replace(d,'"')}function x(t){return t.replace(h,(function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))}))}function k(t){return t.replace(p,":").replace(m," ")}function C(t){for(var e="",n=0,r=t.length;n<r;n++)e+=t.charCodeAt(n)<32?" ":t.charAt(n);return o.trim(e)}function j(t){return t=C(t=k(t=x(t=w(t))))}function O(t){return t=s(t=y(t))}var S=/<!--[\s\S]*?-->/g;e.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},e.getDefaultWhiteList=a,e.onTag=function(t,e,n){},e.onIgnoreTag=function(t,e,n){},e.onTagAttr=function(t,e,n){},e.onIgnoreTagAttr=function(t,e,n){},e.safeAttrValue=function(t,e,n,r){if(n=j(n),"href"===e||"src"===e){if("#"===(n=o.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"data:image/"!==n.substr(0,11)&&"ftp://"!==n.substr(0,6)&&"./"!==n.substr(0,2)&&"../"!==n.substr(0,3)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===e){if(g.lastIndex=0,g.test(n))return""}else if("style"===e){if(v.lastIndex=0,v.test(n))return"";if(b.lastIndex=0,b.test(n)&&(g.lastIndex=0,g.test(n)))return"";!1!==r&&(n=(r=r||c).process(n))}return n=O(n)},e.escapeHtml=s,e.escapeQuote=y,e.unescapeQuote=w,e.escapeHtmlEntities=x,e.escapeDangerHtml5Entities=k,e.clearNonPrintableCharacter=C,e.friendlyAttrValue=j,e.escapeAttrValue=O,e.onIgnoreTagStripAll=function(){return""},e.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var n=!Array.isArray(t),r=[],i=!1;return{onIgnoreTag:function(a,c,s){if(function(e){return!!n||-1!==o.indexOf(t,e)}(a)){if(s.isClosing){var l="[/removed]",u=s.position+10;return r.push([!1!==i?i:s.position,u]),i=!1,l}return i||(i=s.position),"[removed]"}return e(a,c,s)},remove:function(t){var e="",n=0;return o.forEach(r,(function(r){e+=t.slice(n,r[0]),n=r[1]})),e+=t.slice(n)}}},e.stripCommentTag=function(t){return t.replace(S,"")},e.stripBlankChar=function(t){var e=t.split("");return(e=e.filter((function(t){var e=t.charCodeAt(0);return 127!==e&&(!(e<=31)||(10===e||13===e))}))).join("")},e.cssFilter=c,e.getDefaultCSSWhiteList=i},function(t,e){function n(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}var r=/javascript\s*\:/gim;e.whiteList=n(),e.getDefaultWhiteList=n,e.onAttr=function(t,e,n){},e.onIgnoreAttr=function(t,e,n){},e.safeAttrValue=function(t,e){return r.test(e)?"":e}},function(t,e){t.exports={indexOf:function(t,e){var n,r;if(Array.prototype.indexOf)return t.indexOf(e);for(n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},forEach:function(t,e,n){var r,i;if(Array.prototype.forEach)return t.forEach(e,n);for(r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}}},function(t,e,n){var r=n(15);function i(t){var e=r.spaceIndex(t);if(-1===e)var n=t.slice(1,-1);else n=t.slice(1,e+1);return"/"===(n=r.trim(n).toLowerCase()).slice(0,1)&&(n=n.slice(1)),"/"===n.slice(-1)&&(n=n.slice(0,-1)),n}function o(t){return"</"===t.slice(0,2)}var a=/[^a-zA-Z0-9_:\.\-]/gim;function c(t,e){for(;e<t.length;e++){var n=t[e];if(" "!==n)return"="===n?e:-1}}function s(t,e){for(;e>0;e--){var n=t[e];if(" "!==n)return"="===n?e:-1}}function l(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}e.parseTag=function(t,e,n){"use strict";var r="",a=0,c=!1,s=!1,l=0,u=t.length,f="",d="";t:for(l=0;l<u;l++){var h=t.charAt(l);if(!1===c){if("<"===h){c=l;continue}}else if(!1===s){if("<"===h){r+=n(t.slice(a,l)),c=l,a=l;continue}if(">"===h){r+=n(t.slice(a,c)),f=i(d=t.slice(c,l+1)),r+=e(c,r.length,f,d,o(d)),a=l+1,c=!1;continue}if('"'===h||"'"===h)for(var p=1,m=t.charAt(l-p);""===m.trim()||"="===m;){if("="===m){s=h;continue t}m=t.charAt(l-++p)}}else if(h===s){s=!1;continue}}return a<t.length&&(r+=n(t.substr(a))),r},e.parseAttr=function(t,e){"use strict";var n=0,i=[],o=!1,u=t.length;function f(t,n){if(!((t=(t=r.trim(t)).replace(a,"").toLowerCase()).length<1)){var o=e(t,n||"");o&&i.push(o)}}for(var d=0;d<u;d++){var h,p=t.charAt(d);if(!1!==o||"="!==p)if(!1===o||d!==n||'"'!==p&&"'"!==p||"="!==t.charAt(d-1))if(/\s|\n|\t/.test(p)){if(t=t.replace(/\s|\n|\t/g," "),!1===o){if(-1===(h=c(t,d))){f(r.trim(t.slice(n,d))),o=!1,n=d+1;continue}d=h-1;continue}if(-1===(h=s(t,d-1))){f(o,l(r.trim(t.slice(n,d)))),o=!1,n=d+1;continue}}else;else{if(-1===(h=t.indexOf(p,d+1)))break;f(o,r.trim(t.slice(n+1,h))),o=!1,n=(d=h)+1}else o=t.slice(n,d),n=d+1}return n<t.length&&(!1===o?f(t.slice(n)):f(o,l(r.trim(t.slice(n))))),r.trim(i.join(" "))}},function(t,e,n){"use strict";n.r(e);var r=n(10),i=n.n(r),o=n(17),a=n(1),c=n(12);e.default={name:a.l,icon:"v-md-icon-img",title:function(t){return t.langConfig.image.toolbar},menus:[{name:"image-link",text:function(t){return t.langConfig.imageLink.toolbar},action:function(t,e){(null==e?void 0:e.insertWithSize)?t.execCommand(a.l,{width:"auto",height:"auto"}):t.execCommand(a.l)}},{name:"upload-image",text:function(t){return t.langConfig.uploadImage.toolbar},action:function(t){t.uploadConfig=t.uploadImgConfig,t.$nextTick(Object(o.a)(i.a.mark((function e(){var n,r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$refs.uploadFile.upload();case 2:n=e.sent,r=Object(c.a)(n.target.files,t.uploadImgConfig),t.emitUploadImage(n,r);case 5:case"end":return e.stop()}}),e)}))))}}]}},function(t,e,n){var r=n(20),i=n(25);n(21);function o(t){return null==t}function a(t){(t=function(t){var e={};for(var n in t)e[n]=t[n];return e}(t||{})).whiteList=t.whiteList||r.whiteList,t.onAttr=t.onAttr||r.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||r.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||r.safeAttrValue,this.options=t}a.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,n=e.whiteList,r=e.onAttr,a=e.onIgnoreAttr,c=e.safeAttrValue;return i(t,(function(t,e,i,s,l){var u=n[i],f=!1;if(!0===u?f=u:"function"==typeof u?f=u(s):u instanceof RegExp&&(f=u.test(s)),!0!==f&&(f=!1),s=c(i,s)){var d,h={position:e,sourcePosition:t,source:l,isWhite:f};return f?o(d=r(i,s,h))?i+":"+s:d:o(d=a(i,s,h))?void 0:d}}))},t.exports=a},function(t,e,n){var r=n(21);t.exports=function(t,e){";"!==(t=r.trimRight(t))[t.length-1]&&(t+=";");var n=t.length,i=!1,o=0,a=0,c="";function s(){if(!i){var n=r.trim(t.slice(o,a)),s=n.indexOf(":");if(-1!==s){var l=r.trim(n.slice(0,s)),u=r.trim(n.slice(s+1));if(l){var f=e(o,c.length,l,u,n);f&&(c+=f+"; ")}}}o=a+1}for(;a<n;a++){var l=t[a];if("/"===l&&"*"===t[a+1]){var u=t.indexOf("*/",a+2);if(-1===u)break;o=(a=u+1)+1,i=!1}else"("===l?i=!0:")"===l?i=!1:";"===l?i||s():"\n"===l&&s()}return r.trim(c)}},function(t,e,n){var r=n(14).FilterCSS,i=n(19),o=n(22),a=o.parseTag,c=o.parseAttr,s=n(15);function l(t){return null==t}function u(t){(t=function(t){var e={};for(var n in t)e[n]=t[n];return e}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=i.onIgnoreTagStripAll),t.whiteList=t.whiteList||i.whiteList,t.onTag=t.onTag||i.onTag,t.onTagAttr=t.onTagAttr||i.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||i.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||i.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||i.safeAttrValue,t.escapeHtml=t.escapeHtml||i.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new r(t.css))}u.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,n=e.whiteList,r=e.onTag,o=e.onIgnoreTag,u=e.onTagAttr,f=e.onIgnoreTagAttr,d=e.safeAttrValue,h=e.escapeHtml,p=this.cssFilter;e.stripBlankChar&&(t=i.stripBlankChar(t)),e.allowCommentTag||(t=i.stripCommentTag(t));var m=!1;if(e.stripIgnoreTagBody){m=i.StripTagBody(e.stripIgnoreTagBody,o);o=m.onIgnoreTag}var g=a(t,(function(t,e,i,a,m){var g,v={sourcePosition:t,position:e,isClosing:m,isWhite:n.hasOwnProperty(i)};if(!l(g=r(i,a,v)))return g;if(v.isWhite){if(v.isClosing)return"</"+i+">";var b=function(t){var e=s.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var n="/"===(t=s.trim(t.slice(e+1,-1)))[t.length-1];return n&&(t=s.trim(t.slice(0,-1))),{html:t,closing:n}}(a),y=n[i],w=c(b.html,(function(t,e){var n,r=-1!==s.indexOf(y,t);return l(n=u(i,t,e,r))?r?(e=d(i,t,e,p))?t+'="'+e+'"':t:l(n=f(i,t,e,r))?void 0:n:n}));a="<"+i;return w&&(a+=" "+w),b.closing&&(a+=" /"),a+=">"}return l(g=o(i,a,v))?h(a):g}),h);return m&&(g=m.remove(g)),g},t.exports=u},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],c="undefined"!=typeof MutationObserver,s=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function a(){n&&(n=!1,t()),r&&s()}function c(){o(a)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(c,e);i=t}return s}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),l=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},u=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||i},f=v(0,0,0,0);function d(t){return parseFloat(t)||0}function h(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+d(t["border-"+n+"-width"])}),0)}function p(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return f;var r=u(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=d(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,c=d(r.width),s=d(r.height);if("border-box"===r.boxSizing&&(Math.round(c+o)!==e&&(c-=h(r,"left","right")+o),Math.round(s+a)!==n&&(s-=h(r,"top","bottom")+a)),!function(t){return t===u(t).document.documentElement}(t)){var l=Math.round(c+o)-e,p=Math.round(s+a)-n;1!==Math.abs(l)&&(c-=l),1!==Math.abs(p)&&(s-=p)}return v(i.left,i.top,c,s)}var m="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof u(t).SVGGraphicsElement}:function(t){return t instanceof u(t).SVGElement&&"function"==typeof t.getBBox};function g(t){return r?m(t)?function(t){var e=t.getBBox();return v(0,0,e.width,e.height)}(t):p(t):f}function v(t,e,n,r){return{x:t,y:e,width:n,height:r}}var b=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=g(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),y=function(t,e){var n,r,i,o,a,c,s,u=(r=(n=e).x,i=n.y,o=n.width,a=n.height,c="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(c.prototype),l(s,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),s);l(this,{target:t,contentRect:u})},w=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof u(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new b(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof u(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new y(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),x="undefined"!=typeof WeakMap?new WeakMap:new n,k=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=s.getInstance(),r=new w(e,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){k.prototype[t]=function(){var e;return(e=x.get(this))[t].apply(e,arguments)}}));var C=void 0!==i.ResizeObserver?i.ResizeObserver:k;e.a=C}).call(this,n(87))},function(t,e,n){"use strict";n.d(e,"a",(function(){return Nt}));var r=n(13),i=n(0),o=n(2),a={};function c(t,e,n){e?t[e]?console.error("The command name is already in use: "+e):t[e]=n:console.error("Command name is required")}Object(o.c)(a,n(39));var s=n(5),l={};function u(t,e,n){e?t[e]=Object(s.a)({},n):console.error("Toolbar name is required")}Object(o.c)(l,n(62));n(82);var f=n(9),d={class:"v-md-editor__left-area-body"},h={class:"v-md-editor__right-area"},p={class:"v-md-editor__toolbar",ref:"toolbarWrapper"},m={class:"v-md-editor__main"},g={class:"v-md-editor__preview-wrapper",ref:"previewWrapper"};var v={key:0},b={key:0,class:"v-md-editor__toolbar-divider"};var y={key:1,class:"v-md-icon-arrow-down v-md-editor__menu-ctrl",ref:"menuCtrl"};var w={name:"v-md-tooltip",props:{text:String},data:function(){return{position:{x:0,y:0},visible:!1}},methods:{show:function(t){this.position={x:t.x,y:t.y},this.visible=!0,this.$nextTick(this.calculateLayout)},hide:function(){this.visible=!1},calculateLayout:function(){var t=this.$el.getBoundingClientRect().right,e=document.documentElement.clientWidth;e-t<0&&(this.position.x-=t-e)}}};n(83);w.render=function(t,e,n,r,o,a){return Object(i.openBlock)(),Object(i.createBlock)(i.Transition,{name:"v-md-fade-in"},{default:Object(i.withCtx)((function(){return[Object(i.withDirectives)(Object(i.createVNode)("div",{style:{left:o.position.x+"px",top:o.position.y+"px"},class:"v-md-editor__tooltip"},Object(i.toDisplayString)(n.text),5),[[i.vShow,o.visible]])]})),_:1})};var x=w,k={key:1},C={class:"v-md-editor__menu-row"};var j=function(t,e){var n=e.data;return t.render.apply(t,n.$attrs)};j.props=["render"];var O="list",S={name:"v-md-menu",components:{VMdRender:j},inject:["markdownEditor"],props:{mode:{type:String,default:"panel"},menus:Array,itemWidth:{type:String,default:"30px"},rowNum:{type:Number,default:10},visible:Boolean},emits:["update:visible","item-click"],data:function(){return{style:{left:0}}},computed:{rowCount:function(){return Math.ceil(this.menus.length/this.rowNum)},isListMode:function(){return this.mode===O}},watch:{visible:function(){this.visible&&this.$nextTick(this.calculateLayout)}},methods:{calculateLayout:function(){var t=this.$el.getBoundingClientRect().right;document.documentElement.clientWidth-t<0&&(this.style={right:0})},getRowMenus:function(t){var e=t*this.rowNum,n=e-this.rowNum;return this.menus.slice(n,e)},getText:function(t){return"function"==typeof t?t(this.markdownEditor):t},hide:function(){this.$emit("update:visible",!1)},handleClick:function(t){this.$emit("item-click",t),this.hide()}}};n(84);S.render=function(t,e,n,r,o,a){var c=Object(i.resolveComponent)("v-md-render");return Object(i.openBlock)(),Object(i.createBlock)(i.Transition,{name:"v-md-zoom-in-top"},{default:Object(i.withCtx)((function(){return[Object(i.withDirectives)(Object(i.createVNode)("ul",{class:["v-md-editor__menu",["v-md-editor__menu--"+n.mode]],style:o.style,onMousemove:e[1]||(e[1]=Object(i.withModifiers)((function(){}),["stop"])),onClick:e[2]||(e[2]=Object(i.withModifiers)((function(){}),["stop"]))},[a.isListMode?(Object(i.openBlock)(!0),Object(i.createBlock)(i.Fragment,{key:0},Object(i.renderList)(n.menus,(function(e){return Object(i.openBlock)(),Object(i.createBlock)("li",{key:e.name,class:["v-md-editor__menu-item",["v-md-editor__menu-item-"+e.name,e.class]],onClick:Object(i.withModifiers)((function(t){return a.handleClick(e)}),["stop"])},[e.render?(Object(i.openBlock)(),Object(i.createBlock)(c,{key:0,render:e.render,editor:t.$self},null,8,["render","editor"])):(Object(i.openBlock)(),Object(i.createBlock)(i.Fragment,{key:1},[Object(i.createTextVNode)(Object(i.toDisplayString)(a.getText(e.text)),1)],64))],10,["onClick"])})),128)):(Object(i.openBlock)(),Object(i.createBlock)("li",k,[(Object(i.openBlock)(!0),Object(i.createBlock)(i.Fragment,null,Object(i.renderList)(a.rowCount,(function(t){return Object(i.openBlock)(),Object(i.createBlock)("div",C,[(Object(i.openBlock)(!0),Object(i.createBlock)(i.Fragment,null,Object(i.renderList)(a.getRowMenus(t),(function(t){return Object(i.openBlock)(),Object(i.createBlock)("span",{key:t.name,style:{width:n.itemWidth},class:["v-md-editor__menu-item",["v-md-editor__menu-item-"+t.name,t.class]],onClick:Object(i.withModifiers)((function(e){return a.handleClick(t)}),["stop"])},Object(i.toDisplayString)(t.text),15,["onClick"])})),128))])})),256))]))],38),[[i.vShow,n.visible]])]})),_:1})};var T,_=S,E=[],M="@@clickoutsideContext",A=0;function L(t,e,n){return function(r,i){void 0===r&&(r={}),void 0===i&&(i={}),n&&e&&e.instance&&r.target&&i.target&&!t.contains(r.target)&&!t.contains(i.target)&&t!==r.target&&(e.arg&&t[M].methodName&&e.instance[t[M].methodName]?e.instance[t[M].methodName]():t[M].bindingFn&&t[M].bindingFn())}}o.d&&(document.addEventListener("mousedown",(function(t){T=t})),document.addEventListener("mouseup",(function(t){E.forEach((function(e){return e[M].documentHandler(t,T)}))})));var I,B={name:"toolbar-item",directives:{Clickoutside:{beforeMount:function(t,e,n){E.push(t);var r=A++;t[M]={id:r,documentHandler:L(t,e,n),methodName:e.arg,bindingFn:e.value}},updated:function(t,e,n){t[M].documentHandler=L(t,e,n),t[M].methodName=e.arg,t[M].bindingFn=e.value},unmounted:function(t){for(var e=E.length,n=0;n<e;n++)if(E[n][M].id===t[M].id){E.splice(n,1);break}delete t[M]}}},components:(I={},I[x.name]=x,I[_.name]=_,I),props:{name:String,title:String,active:Boolean,text:String,icon:String,menus:[Array,Object],disabledMenus:Array},emits:["click","menu-click"],data:function(){return{menuActive:!1}},computed:{hasMenu:function(){var t;return null==(t=this.menuItems)?void 0:t.length},menuItems:function(){var t=this,e=Object(o.f)(this.menus)?this.menus.items:this.menus;return null==e?void 0:e.filter((function(e){var n,r=e.name;return!(null==(n=t.disabledMenus)?void 0:n.includes(t.name+"/"+r))}))},menuMode:function(){return Object(o.f)(this.menus)?this.menus.mode:O}},methods:{hideMenu:function(){this.hasMenu&&(this.menuActive=!1)},showMenu:function(){this.hasMenu&&(this.menuActive=!0)},handleClick:function(t){this.$emit("click"),this.menuActive?this.hideMenu():this.showMenu(),this.hasMenu?this.handleHideTooltip():this.showTooltip(t)},showTooltip:function(t){var e=this,n=this.$el,r=t.target,i=this.$refs.menuCtrl;if(r!==n&&r!==i||this.menuActive)this.handleHideTooltip();else{this.timmer&&clearTimeout(this.timmer);var o=n.getBoundingClientRect(),a=t.clientX-o.left,c=t.clientY-o.top;this.timmer=setTimeout((function(){var t;null==(t=e.$refs.tooltip)||t.show({x:a-2,y:c+20})}),100)}},handleHideTooltip:function(){this.timmer&&clearTimeout(this.timmer),this.$refs.tooltip.hide()}}};n(85);B.render=function(t,e,n,r,o,a){var c=Object(i.resolveComponent)("v-md-tooltip"),s=Object(i.resolveComponent)("v-md-menu"),l=Object(i.resolveDirective)("clickoutside");return Object(i.withDirectives)((Object(i.openBlock)(),Object(i.createBlock)("li",{class:["v-md-editor__toolbar-item",[n.icon,"v-md-editor__toolbar-item-"+n.name,{"v-md-editor__toolbar-item--active":n.active||o.menuActive},{"v-md-editor__toolbar-item--menu":a.hasMenu}]],onMousedown:e[3]||(e[3]=Object(i.withModifiers)((function(){}),["prevent"])),onMouseleave:e[4]||(e[4]=function(){return a.handleHideTooltip.apply(a,arguments)}),onMousemove:e[5]||(e[5]=function(){return a.showTooltip.apply(a,arguments)}),onClick:e[6]||(e[6]=Object(i.withModifiers)((function(){return a.handleClick.apply(a,arguments)}),["stop"]))},[Object(i.createTextVNode)(Object(i.toDisplayString)(n.text)+" ",1),Object(i.createVNode)(c,{ref:"tooltip",text:n.title},null,8,["text"]),a.hasMenu?(Object(i.openBlock)(),Object(i.createBlock)(s,{key:0,ref:"menu",mode:a.menuMode,menus:a.menuItems,"item-width":n.menus.itemWidth,"row-num":n.menus.rowNum,visible:o.menuActive,"onUpdate:visible":e[1]||(e[1]=function(t){return o.menuActive=t}),onItemClick:e[2]||(e[2]=function(e){return t.$emit("menu-click",e)})},null,8,["mode","menus","item-width","row-num","visible"])):Object(i.createCommentVNode)("v-if",!0),a.hasMenu?(Object(i.openBlock)(),Object(i.createBlock)("i",y,null,512)):Object(i.createCommentVNode)("v-if",!0)],34)),[[l,a.hideMenu,"hideMenu"]])};var $,N=B,z={name:"editor-toolbar",components:($={},$[N.name]=N,$),inject:["markdownEditor"],props:{groups:Array,toolbars:Object,disabledMenus:Array},emits:["item-click","toolbar-menu-click"],methods:{getConfig:function(t,e){var n=this.toolbars[t][e];return"function"==typeof n?n(this.markdownEditor):n}}};n(86);z.render=function(t,e,n,r,o,a){var c=Object(i.resolveComponent)("toolbar-item");return n.groups.length?(Object(i.openBlock)(),Object(i.createBlock)("ul",v,[(Object(i.openBlock)(!0),Object(i.createBlock)(i.Fragment,null,Object(i.renderList)(n.groups,(function(r,o){return Object(i.openBlock)(),Object(i.createBlock)(i.Fragment,null,[(Object(i.openBlock)(!0),Object(i.createBlock)(i.Fragment,null,Object(i.renderList)(r,(function(r){return Object(i.openBlock)(),Object(i.createBlock)(c,{key:r,name:r,title:a.getConfig(r,"title"),icon:a.getConfig(r,"icon"),text:a.getConfig(r,"text"),active:a.getConfig(r,"active"),menus:a.getConfig(r,"menus"),"disabled-menus":n.disabledMenus,onClick:function(e){return t.$emit("item-click",n.toolbars[r])},onMenuClick:e[1]||(e[1]=function(e){return t.$emit("toolbar-menu-click",e)})},null,8,["name","title","icon","text","active","menus","disabled-menus","onClick"])})),128)),o!==n.groups.length-1?(Object(i.openBlock)(),Object(i.createBlock)("li",b)):Object(i.createCommentVNode)("v-if",!0)],64)})),256))])):Object(i.createCommentVNode)("v-if",!0)};var H,D=z,V=n(34),F="undefined"==typeof window,R=function(t){t.forEach((function(t){var e=t.target.__resizeListeners__||[];e.length&&e.forEach((function(t){t()}))}))},P=function(t,e){F||(t.__resizeListeners__||(t.__resizeListeners__=[],t.__ro__=new V.a(R),t.__ro__.observe(t)),t.__resizeListeners__.push(e))},W=function(t,e){t&&t.__resizeListeners__&&(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),t.__resizeListeners__.length||t.__ro__.disconnect())},G=n(4),q={name:"v-md-container",components:(H={},H[D.name]=D,H),props:{leftToolbar:String,rightToolbar:String,toolbars:Object,fullscreen:Boolean,height:String,noresize:Boolean,disabledMenus:Array,leftAreaVisible:Boolean,leftAreaTitle:String,leftAreaReverse:Boolean,leftAreaWidth:{type:String,default:"200px"},mode:{type:String,default:G.a.EDITABLE}},emits:["resize","editor-wrapper-click","toolbar-item-click","toolbar-menu-click"],data:function(){return{toolbarHeight:0}},computed:{heightGetter:function(){return this.fullscreen?"auto":this.height},leftToolbarGroup:function(){return this.getToolbarConfig(this.leftToolbar)},rightToolbarGroup:function(){return this.getToolbarConfig(this.rightToolbar)},isPreviewMode:function(){return this.mode===G.a.PREVIEW},isEditMode:function(){return this.mode===G.a.EDIT}},mounted:function(){this.noresize||(P(this.$refs.editorWrapper,this.handleResize),P(this.$refs.toolbarWrapper,this.handleToolbarWrapperResize))},beforeUnmount:function(){this.noresize||(W(this.$refs.editorWrapper,this.handleResize),W(this.$refs.toolbarWrapper,this.handleToolbarWrapperResize))},methods:{handleResize:function(){this.$emit("resize")},handleToolbarWrapperResize:function(){var t=this.$refs.toolbarWrapper;t&&(this.toolbarHeight=t.offsetHeight)},getToolbarConfig:function(t){var e=this;return t.split("|").map((function(t){return t.split(" ").filter((function(t){return t&&e.toolbars[t]}))}))},handleEditorWrapperClick:function(t){this.$emit("editor-wrapper-click",t)},handleToolbarItemClick:function(t){this.$emit("toolbar-item-click",t)},handleToolbarMenuClick:function(t){this.$emit("toolbar-menu-click",t)}}};n(88);q.render=function(t,e,n,r,o,a){var c=Object(i.resolveComponent)("editor-toolbar");return Object(i.openBlock)(),Object(i.createBlock)("div",{class:["v-md-editor",["v-md-editor--"+n.mode,{"v-md-editor--fullscreen":n.fullscreen,"v-md-editor--left-area-reverse":n.leftAreaReverse}]],style:{height:a.heightGetter}},[Object(i.withDirectives)(Object(i.createVNode)("div",{class:"v-md-editor__left-area",style:{width:n.leftAreaVisible?n.leftAreaWidth:0,borderWidth:n.leftAreaVisible?"1px":0}},[Object(i.createVNode)("div",{class:"v-md-editor__left-area-title",style:{height:o.toolbarHeight+"px",lineHeight:o.toolbarHeight+"px"}},Object(i.toDisplayString)(n.leftAreaTitle),5),Object(i.createVNode)("div",d,[Object(i.renderSlot)(t.$slots,"left-area")])],4),[[i.vShow,!a.isPreviewMode]]),Object(i.createVNode)("div",h,[Object(i.withDirectives)(Object(i.createVNode)("div",p,[Object(i.createVNode)(c,{class:"v-md-editor__toolbar-left",groups:a.leftToolbarGroup,toolbars:n.toolbars,"disabled-menus":n.disabledMenus,onItemClick:a.handleToolbarItemClick,onToolbarMenuClick:a.handleToolbarMenuClick},null,8,["groups","toolbars","disabled-menus","onItemClick","onToolbarMenuClick"]),Object(i.createVNode)(c,{class:"v-md-editor__toolbar-right",groups:a.rightToolbarGroup,toolbars:n.toolbars,"disabled-mens":n.disabledMenus,onItemClick:a.handleToolbarItemClick,onToolbarMenuClick:a.handleToolbarMenuClick},null,8,["groups","toolbars","disabled-mens","onItemClick","onToolbarMenuClick"])],512),[[i.vShow,!a.isPreviewMode]]),Object(i.createVNode)("div",m,[Object(i.withDirectives)(Object(i.createVNode)("div",{ref:"editorWrapper",class:"v-md-editor__editor-wrapper",onClick:e[1]||(e[1]=function(){return a.handleEditorWrapperClick.apply(a,arguments)})},[Object(i.renderSlot)(t.$slots,"editor")],512),[[i.vShow,!a.isPreviewMode]]),Object(i.withDirectives)(Object(i.createVNode)("div",g,[Object(i.renderSlot)(t.$slots,"preview")],512),[[i.vShow,!a.isEditMode]]),Object(i.renderSlot)(t.$slots,"default")])])],6)};var U,K=q,X="undefined"==typeof window,Y={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}};function Q(t){var e=t.move,n=t.size,r=t.bar,i={},o="translate"+r.axis+"("+e+"%)";return i[r.size]=n,i.transform=o,i.msTransform=o,i.webkitTransform=o,i}var Z={name:"Bar",props:{vertical:Boolean,size:String,move:Number},computed:{bar:function(){return Y[this.vertical?"vertical":"horizontal"]},wrap:function(){return this.$parent.wrap}},render:function(){var t=this.size,e=this.move,n=this.bar;return Object(i.createVNode)("div",{class:["scrollbar__bar","is-"+n.key],onMousedown:this.clickTrackHandler,onClick:function(t){return t.stopPropagation()}},[Object(i.createVNode)("div",{ref:"thumb",class:"scrollbar__thumb",onMousedown:this.clickThumbHandler,style:Q({size:t,move:e,bar:n})},null)])},methods:{clickThumbHandler:function(t){t.ctrlKey||2===t.button||(this.startDrag(t),this[this.bar.axis]=t.currentTarget[this.bar.offset]-(t[this.bar.client]-t.currentTarget.getBoundingClientRect()[this.bar.direction]))},clickTrackHandler:function(t){var e=100*(Math.abs(t.target.getBoundingClientRect()[this.bar.direction]-t[this.bar.client])-this.$refs.thumb[this.bar.offset]/2)/this.$el[this.bar.offset];this.wrap[this.bar.scroll]=e*this.wrap[this.bar.scrollSize]/100},startDrag:function(t){t.stopImmediatePropagation(),this.cursorDown=!0,document.addEventListener("mousemove",this.mouseMoveDocumentHandler,!1),document.addEventListener("mouseup",this.mouseUpDocumentHandler,!1),document.onselectstart=function(){return!1}},mouseMoveDocumentHandler:function(t){if(!1!==this.cursorDown){var e=this[this.bar.axis];if(e){var n=100*(-1*(this.$el.getBoundingClientRect()[this.bar.direction]-t[this.bar.client])-(this.$refs.thumb[this.bar.offset]-e))/this.$el[this.bar.offset];this.wrap[this.bar.scroll]=n*this.wrap[this.bar.scrollSize]/100}}},mouseUpDocumentHandler:function(){this.cursorDown=!1,this[this.bar.axis]=0,document.removeEventListener("mousemove",this.mouseMoveDocumentHandler,!1),document.onselectstart=null}},unmounted:function(){document.removeEventListener("mouseup",this.mouseUpDocumentHandler,!1)}},J=n(8),tt={name:"scrollbar",components:{Bar:Z},props:{native:Boolean,disabled:Boolean,wrapStyle:null,wrapClass:null,viewClass:null,viewStyle:null,noresize:Boolean,tag:{type:String,default:"div"}},emits:["scroll"],data:function(){return{sizeWidth:"0",sizeHeight:"0",moveX:0,moveY:0}},computed:{wrap:function(){return this.$refs.wrap}},mounted:function(){this.native||this.disabled||(this.$nextTick(this.update),!this.noresize&&P(this.$refs.resize,this.update))},beforeUnmount:function(){this.native||this.disabled||!this.noresize&&W(this.$refs.resize,this.update)},methods:{getScrollInfo:function(){var t=this.wrap;return{left:t.scrollLeft,top:t.scrollTop,width:t.scrollWidth,height:t.scrollHeight,clientWidth:t.clientWidth,clientHeight:t.clientHeight}},scrollTo:function(t){Object(J.a)({scrollTarget:this.wrap,scrollToTop:t})},handleScroll:function(){var t=this.wrap;this.moveY=100*t.scrollTop/t.clientHeight,this.moveX=100*t.scrollLeft/t.clientWidth,this.$emit("scroll")},update:function(){var t=this.wrap;if(t){var e=100*t.clientHeight/t.scrollHeight,n=100*t.clientWidth/t.scrollWidth;this.sizeHeight=e<100?e+"%":"",this.sizeWidth=n<100?n+"%":""}}},render:function(){if(this.disabled)return this.$slots.default();var t=function(){if(X)return 0;if(void 0!==U)return U;var t=document.createElement("div");t.className="scrollbar__wrap",t.style.visibility="hidden",t.style.width="100px",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);var e=t.offsetWidth;t.style.overflow="scroll";var n=document.createElement("div");n.style.width="100%",t.appendChild(n);var r=n.offsetWidth;return t.parentNode.removeChild(t),U=e-r}(),e=this.wrapStyle;if(t){var n=this.$refs.resize,r=this.$refs.wrap,a=null==n?void 0:n.scrollHeight,c=null==n?void 0:n.scrollWidth,s=null==r?void 0:r.clientHeight,l="-"+t+"px",u="margin-bottom: "+(c>(null==r?void 0:r.clientWidth)?l:0)+"; margin-right: "+(a>s?l:0)+";";Array.isArray(this.wrapStyle)?((e=Object(o.a)(this.wrapStyle)).marginRight=l,e.marginBottom=l):"string"==typeof this.wrapStyle?e+=u:e=u}var f,d=Object(i.h)(this.tag,{class:["scrollbar__view",this.viewClass],style:this.viewStyle,ref:"resize"},this.$slots.default()),h=Object(i.createVNode)("div",{ref:"wrap",style:e,onScroll:this.handleScroll,class:[this.wrapClass,"scrollbar__wrap",t?"":"scrollbar__wrap--hidden-default"]},[[d]]);return f=this.native?[Object(i.createVNode)("div",{ref:"wrap",class:[this.wrapClass,"scrollbar__wrap"],style:e},[[d]])]:[h,Object(i.createVNode)(Z,{move:this.moveX,size:this.sizeWidth},null),Object(i.createVNode)(Z,{vertical:!0,move:this.moveY,size:this.sizeHeight},null)],Object(i.h)("div",{class:"scrollbar"},f)}},et=(n(89),tt),nt={class:"v-md-editor__toc-nav"},rt={class:"v-md-editor__toc-nav-title"};var it={name:"toc-nav",props:{titles:Array,indent:{type:Number,default:16}},emits:["nav-click"]};n(90);it.render=function(t,e,n,r,o,a){return Object(i.openBlock)(),Object(i.createBlock)("ul",nt,[(Object(i.openBlock)(!0),Object(i.createBlock)(i.Fragment,null,Object(i.renderList)(n.titles,(function(e){return Object(i.openBlock)(),Object(i.createBlock)("li",{style:{paddingLeft:n.indent*e.indent+"px"},onClick:function(n){return t.$emit("nav-click",e)},class:"v-md-editor__toc-nav-item"},[Object(i.createVNode)("span",rt,Object(i.toDisplayString)(e.title),1)],12,["onClick"])})),256))])};var ot,at=it,ct={inheritAttrs:!1,components:(ot={},ot[f.default.name]=f.default,ot[K.name]=K,ot[et.name]=et,ot[at.name]=at,ot),provide:function(){return{markdownEditor:this}},props:{height:String,theme:Object,mode:{type:String,default:G.a.EDITABLE},autofocus:Boolean,placeholder:String,tocNavPositionRight:Boolean,tabSize:{type:Number,default:2},beforePreviewChange:{type:Function,default:function(t,e){e(t)}}},emits:["blur","change","save","image-click"],data:function(){return{currentMode:this.mode,uploadConfig:{}}},watch:{mode:function(){this.currentMode=this.mode},currentMode:function(){this.currentMode===G.a.EDITABLE&&this.enableSyncScroll&&this.$nextTick(this.previewSyncScroll)}},created:function(){this.theme&&this.$options.use(this.theme)},computed:{isPreviewMode:function(){return this.currentMode===G.a.PREVIEW},isEditMode:function(){return this.currentMode===G.a.EDIT}},mounted:function(){this.autofocus&&this.$nextTick(this.setFocusEnd)},methods:{setFocusEnd:function(){this.editorFocusEnd(),this.editorScrollToTop(9999),this.previewScrollTo(9999)},handleChange:function(t,e){this.$emit("change",t,e)},handleBlur:function(t){this.$emit("blur",t)},handlePreviewImageClick:function(t,e){this.$emit("image-click",t,e)},save:function(){this.$emit("save",this.text,this.$refs.preview.html)},insert:function(t){var e=this;this.focus();var n=t(this.getCurrentSelectedStr()),r=n.selected,i=n.text;this.replaceSelectionText(i),this.$nextTick((function(){e.changeSelctionTo(i,r)}))}}},st={props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],data:function(){return{text:this.modelValue}},methods:{handleInput:function(t){this.text=t,this.$emit("update:modelValue",t)}}},lt={props:{defaultFullscreen:Boolean},emits:["fullscreen-change"],data:function(){return{fullscreen:!1}},watch:{fullscreen:function(){this.$emit("fullscreen-change",this.fullscreen)}},mounted:function(){window.addEventListener("keyup",this.handleWindowKeyup,!1),this.defaultFullscreen&&this.toggleFullScreen()},beforeUnmount:function(){window.removeEventListener("keyup",this.handleWindowKeyup,!1)},methods:{handleWindowKeyup:function(t){27===t.keyCode&&this.fullscreen&&this.toggleFullScreen(!1)},toggleFullScreen:function(t){void 0===t&&(t=!this.fullscreen),this.fullscreen=t;var e=document.querySelectorAll("html, body"),n=e[0],r=e[1],i=this.fullscreen?"hidden":null;r.style.overflow=i,n.style.overflow=i}}};var ut,ft=n(10),dt=n.n(ft),ht=n(17),pt={name:"v-md-upload-file",props:{uploadConfig:Object},data:function(){return{handleUpload:function(){},key:0}},methods:{upload:function(){var t=this;return Object(ht.a)(dt.a.mark((function e(){var n;return dt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.chooseFile();case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})))()},chooseFile:function(){var t=this;return new Promise((function(e){t.handleUpload=function(n){e(n),t.key++},t.$refs.fileInput.click()}))}},render:function(t,e,n,r,o,a){return Object(i.openBlock)(),Object(i.createBlock)("input",{type:"file",style:{display:"none"},key:o.key,accept:n.uploadConfig.accept,multiple:n.uploadConfig.multiple,onInput:e[1]||(e[1]=function(){return o.handleUpload.apply(o,arguments)}),ref:"fileInput"},null,40,["accept","multiple"])}},mt=pt,gt=n(23),vt=n(12),bt=n(1),yt={accept:"image/*",multiple:!1},wt={components:(ut={},ut[mt.name]=mt,ut),props:{uploadImageConfig:Object},emits:["upload-image"],computed:{uploadImgConfig:function(){return Object(s.a)({},yt,this.uploadImageConfig)},hasUploadImage:function(){return!this.disabledMenus.includes(gt.default.name+"/upload-image")}},methods:{handleDrop:function(t){var e=Object(vt.a)(t.dataTransfer.files,this.uploadImgConfig);this.emitUploadImage(t,e)},handlePaste:function(t){var e=t.clipboardData;if(e){var n=Object(vt.a)(Object(vt.b)(e),this.uploadImgConfig);this.emitUploadImage(t,n)}},emitUploadImage:function(t,e){var n=this;this.hasUploadImage&&e.length&&(t.preventDefault(),this.$emit("upload-image",t,(function(t){n.execCommand(bt.l,t)}),e))}}},xt=n(3),kt={data:function(){return{enableSyncScroll:!0}},methods:{toggleSyncScroll:function(t){void 0===t&&(t=!this.enableSyncScroll),this.enableSyncScroll=t,t&&this.previewSyncScroll()},previewSyncScroll:function(){if(!this.isEditMode){var t=this.$refs.preview.$el,e=this.$refs.previewScroller.$el,n=t.querySelectorAll("["+xt.c+"]"),r=this.getScrollInfo(),i=r.clientHeight,o=r.top,a=r.height,c=e.querySelector(".scrollbar__wrap");if(i+o===a){var s=c.clientHeight,l=c.scrollHeight;this.previewScrollTo(l-s)}else{for(var u,f,d=0;d<n.length;d++){var h=n[d].getAttribute(xt.c);if(!(this.heightAtLine(h-1,"local")<o)){f=h;break}u=h}var p=0;if(u&&f&&u!==f){var m=this.heightAtLine(u-1,"local");p=(o-m)/(this.heightAtLine(f-1,"local")-m)}var g=0,v=c.scrollHeight-c.clientHeight;u&&(g=t.querySelector("["+xt.c+'="'+u+'"]').offsetTop),f&&(v=t.querySelector("["+xt.c+'="'+f+'"]').offsetTop);var b=g+(v-g)*p;this.previewScrollTo(b)}}},handleEditorScroll:function(){this.enableSyncScroll&&!this.ignoreSyncScroll&&(clearTimeout(this.scrollTimmer),this.scrollTimmer=setTimeout(this.previewSyncScroll,60))}}},Ct=function(t){return{props:{leftToolbar:{type:String,default:"undo redo clear | h bold italic strikethrough quote | ul ol table hr | link image code | save"},rightToolbar:{type:String,default:"preview toc sync-scroll fullscreen"},toolbar:{type:Object,default:function(){return{}}},disabledMenus:{type:Array,default:function(){return["image/upload-image"]}},toolbarConfig:{type:Object,default:function(){return{}}}},created:function(){var e=this,n=t.toolbars;this.toolbars={},Object.keys(n).forEach((function(t){e.registerToolbar(t,n[t])})),Object.keys(this.toolbar).forEach((function(t){e.registerToolbar(t,e.toolbar[t])}))},methods:{registerToolbar:function(t,e){u(this.toolbars,t,e)},handleToolbarItemClick:function(t){var e;t.action&&!(null==(e=t.menus)?void 0:e.length)&&"function"==typeof t.action&&t.action.call(t,this,this.toolbarConfig[t.name])},handleToolbarMenuClick:function(t){t.action&&"function"==typeof t.action&&t.action.call(t,this,this.toolbarConfig[t.name])}}}},jt=function(t){return{created:function(){var e=this,n=t.commands;this.commands={},Object.keys(n).forEach((function(t){e.registerCommand(t,n[t])}))},methods:{registerCommand:function(t,e){c(this.commands,t,e)},execCommand:function(t){var e=this.commands[t];if(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.apply(void 0,[this].concat(r))}else console.error("Command not found: "+t)}}}},Ot={data:function(){return{tocVisible:this.defaultShowToc,titles:[]}},props:{includeLevel:{type:Array,default:function(){return[2,3]}},defaultShowToc:Boolean},watch:{text:{immediate:!0,handler:function(t,e){void 0!==e?(this.updateTocNavTimmer&&clearTimeout(this.updateTocNavTimmer),this.updateTocNavTimmer=setTimeout(this.updateTocNav,800)):this.$nextTick(this.updateTocNav)}}},computed:{anchorsSelector:function(){return this.includeLevel.map((function(t){return"h"+t})).join(",")}},methods:{toggleToc:function(t){void 0===t&&(t=!this.tocVisible),this.tocVisible=t},updateTocNav:function(){var t,e=null==(t=this.$refs.preview)?void 0:t.$el;if(e){var n=e.querySelectorAll(this.anchorsSelector),r=Array.from(n).filter((function(t){return!!t.innerText.trim()}));if(r.length){var i=Array.from(new Set(r.map((function(t){return t.tagName})))).sort();this.titles=r.map((function(t){return{title:t.innerText,lineIndex:t.getAttribute(xt.c),indent:i.indexOf(t.tagName)}}))}else this.titles=[]}},handleNavClick:function(t){var e=t.lineIndex;this.scrollToLine(e)}}},St={props:{previewScrollContainer:Function},computed:{getPreviewScrollContainer:function(){var t=this;return function(){var e=t.$refs.previewScroller.$el.querySelector(".scrollbar__wrap"),n=t.isPreviewMode?window:e;return t.previewScrollContainer?t.previewScrollContainer():n}}},methods:{previewScrollTo:function(t){this.$refs.previewScroller.scrollTo(t)},scrollToLine:function(t){var e=this;this.isPreviewMode||this.editorScrollToLine(t),this.isEditMode||(this.ignoreSyncScroll=!0,this.previewScrollToLine({lineIndex:t,onScrollEnd:function(){e.ignoreSyncScroll=!1}}))},editorScrollToLine:function(t){var e=this.heightAtLine(t-1,"local");this.editorScrollToTop(e)},previewScrollToTarget:function(){var t;(t=this.$refs.preview).scrollToTarget.apply(t,arguments)},previewScrollToLine:function(t){var e=t.lineIndex,n=t.onScrollEnd;this.$refs.preview.scrollToLine({lineIndex:e,onScrollEnd:n})}}},Tt={};Object(o.c)(Tt,n(91));var _t=function(t){return{mounted:function(){var e=this;if(!this.isPreviewMode){var n=t.hotkeys;Object.keys(Tt).forEach((function(t){e.registerHotkeys(Tt[t].default)})),n.forEach((function(t){e.registerHotkeys(t)}))}},methods:{registerHotkeys:function(t){var e=this,n=t.modifier,r=t.key,i=t.action,o=t.preventDefault,a=void 0===o||o;this.editorRegisterHotkeys({modifier:n,key:r,preventDefault:a,action:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i.apply(void 0,[e].concat(n))}})}}}},Et=/^\s*([\d]+\.)( \[[ xX]])? /,Mt=/^\s*([-*])( \[[ xX]])? /,At=/([*-] |[\d]+\. )/,Lt=/([\d])+\.( \[[ xX]])? /,It={mounted:function(){var t=this;this.isPreviewMode||this.registerHotkeys({key:"enter",preventDefault:!1,action:function(e,n){if(!n.isComposing){var r,i,o=t.getCursorLineLeftText();if(Et.test(o))r="x. ",i=Lt,n.preventDefault();else{if(!Mt.test(o))return;r="- ",i=At,n.preventDefault()}var a=o.search(i)+r.length,c=o.slice(0,a);o.slice(a,o.length)?("x. "===r&&(c=c.replace(/(\d+)/,window.parseInt(c)+1)),t.replaceSelectionText("\n"+c,"end")):(t.delLineLeft(),t.replaceSelectionText("\n","end"))}}})}},Bt={computed:{langConfig:function(){var t=this.$options.lang.config;return t.langConfig[t.lang]}}},$t=new r.a({afterUse:function(t){f.default.vMdParser.lang.config.lang=t}});function Nt(t){!function(t){t.commands={},t.command=function(e,n){c(t.commands,e,n)},Object.keys(a).forEach((function(e){var n=a[e],r=n.name,i=n.default;t.command(r,i)}))}(t),function(t){t.toolbars={},t.toolbar=function(e,n){u(t.toolbars,e,n)},Object.keys(l).forEach((function(e){var n=l[e].default;t.toolbar(n.name,n)}))}(t),t.name="v-md-editor",t.lang=$t,t.vMdParser=f.default.vMdParser,t.Preview=f.default,t.hotkeys=[],t.hotkey=function(e){t.hotkeys.push(e)},t.mixins=[ct,st,Ct(t),jt(t),_t(t),lt,wt,kt,Ot,St,It,Bt]}$t.config=Object(i.reactive)($t.config),$t.add({"zh-CN":{undo:{toolbar:"撤销"},redo:{toolbar:"重做"},clear:{toolbar:"清空"},h:{toolbar:"标题"},h1:{toolbar:"一级标题",placeholder:"一级标题"},h2:{toolbar:"二级标题",placeholder:"二级标题"},h3:{toolbar:"三级标题",placeholder:"三级标题"},h4:{toolbar:"四级标题",placeholder:"四级标题"},h5:{toolbar:"五级标题",placeholder:"五级标题"},h6:{toolbar:"六级标题",placeholder:"六级标题"},bold:{toolbar:"粗体",placeholder:"粗体"},italic:{toolbar:"斜体",placeholder:"斜体"},strikethrough:{toolbar:"删除线",placeholder:"删除线"},quote:{toolbar:"插入引用",placeholder:"引用"},ul:{toolbar:"无序列表",placeholder:"无序列表"},ol:{toolbar:"有序列表",placeholder:"有序列表"},table:{toolbar:"表格"},hr:{toolbar:"插入分割线"},link:{toolbar:"插入链接",descPlaceholder:"链接"},image:{toolbar:"插入图片"},imageLink:{toolbar:"添加图片链接"},uploadImage:{toolbar:"上传本地图片"},code:{toolbar:"插入代码块"},save:{toolbar:"保存"},preview:{enabled:"开启预览",disabled:"关闭预览"},toc:{title:"目录导航",enabled:"开启目录导航",disabled:"关闭目录导航"},syncScroll:{enabled:"开启同步滚动",disabled:"关闭同步滚动"},fullscreen:{enabled:"全屏（按ESC还原）",disabled:"退出全屏"}}})},function(t,e,n){"use strict";var r={48:0,49:1,50:2,51:3,52:4,53:5,54:6,55:7,56:8,57:9,65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12"},i={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},o=function(){function t(){this.hotkeys={ctrl:{},shift:{},ctrlAlt:{},ctrlShift:{},keys:{}}}var e=t.prototype;return e.dispatch=function(t){var e,n=this.getKeyName(t).toLowerCase();if(n&&(this.isKeyEnterExact(t)?e=this.hotkeys.keys[n]:this.isCtrlEnterExact(t)?e=this.hotkeys.ctrl[n]:this.isShiftEnterExact(t)?e=this.hotkeys.shift[n]:this.isCtrlAltEnterExact(t)?e=this.hotkeys.ctrlAlt[n]:this.isCtrlShiftEnterExact(t)&&(e=this.hotkeys.ctrlShift[n]),e)){var r=e,i=r.action;r.preventDefault&&t.preventDefault(),i(t)}},e.isKeyEnterExact=function(t){return!this.isCtrlEnter(t)&&!this.isShiftEnter(t)&&!this.isAltEnter(t)},e.isCtrlShiftEnterExact=function(t){return this.isCtrlEnter(t)&&this.isShiftEnter(t)&&!this.isAltEnter(t)},e.isCtrlAltEnterExact=function(t){return this.isCtrlEnter(t)&&this.isAltEnter(t)&&!this.isShiftEnter(t)},e.isCtrlEnterExact=function(t){return this.isCtrlEnter(t)&&!this.isShiftEnter(t)&&!this.isAltEnter(t)},e.isShiftEnterExact=function(t){return this.isShiftEnter(t)&&!this.isCtrlEnter(t)&&!this.isAltEnter(t)},e.isCtrlEnter=function(t){return t.ctrlKey||t.metaKey},e.isShiftEnter=function(t){return t.shiftKey},e.isAltEnter=function(t){return t.altKey},e.registerHotkeys=function(t){var e=t.modifier,n=t.key,r=t.preventDefault,i=void 0===r||r,o=t.action;e?this.hotkeys[e][n]={preventDefault:i,action:o}:this.hotkeys.keys[n]={preventDefault:i,action:o}},e.getKeyName=function(t){var e=t.key,n=t.keyCode;return void 0!==e?Object.keys(i).find((function(t){var n=i[t];return"string"==typeof n?n===e:-1!==n.indexOf(e)}))||e:r[n]},t}();e.a=o},function(t,e,n){var r=n(38).default;function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=i=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",u=c.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),c=new _(r||[]);return a(o,"_invoke",{value:j(t,n,c)}),o}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var p={};function m(){}function g(){}function v(){}var b={};f(b,s,(function(){return this}));var y=Object.getPrototypeOf,w=y&&y(y(E([])));w&&w!==n&&o.call(w,s)&&(b=w);var x=v.prototype=m.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,a,c,s){var l=h(t[i],t,a);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,s)}),(function(t){n("throw",t,c,s)})):e.resolve(f).then((function(t){u.value=t,c(u)}),(function(t){return n("throw",t,c,s)}))}s(l.arg)}var i;a(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function j(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return M()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=O(a,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=h(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function O(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=h(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function E(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:M}}function M(){return{value:void 0,done:!0}}return g.prototype=v,a(x,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:g,configurable:!0}),g.displayName=f(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,f(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(C.prototype),f(C.prototype,l,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new C(d(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),f(x,u,"Generator"),f(x,s,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=E,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),s=o.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(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 i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function n(e){return t.exports=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.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r={"./bold.js":40,"./clear.js":41,"./code.js":42,"./fullscreen.js":43,"./h1.js":44,"./h2.js":45,"./h3.js":46,"./h4.js":47,"./h5.js":48,"./h6.js":49,"./hr.js":50,"./image.js":51,"./italic.js":52,"./link.js":53,"./ol.js":54,"./quote.js":55,"./redo.js":56,"./strikethrough.js":57,"./sync-scroll.js":58,"./table.js":59,"./ul.js":60,"./undo.js":61};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=39},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.a})),e.default=function(t){t.insert((function(e){var n=t.langConfig.bold.placeholder,i=function(t){return t||n},o=Object(r.b)({selected:e,InsertGetter:function(t){return"**"+i(t)+"**"},selectedGetter:i});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.d(e,"name",(function(){return r.b})),e.default=function(t){t.clear()}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.d(e,"name",(function(){return r.c})),e.default=function(t){t.insert((function(t){var e="``` language",n=e+"\n```";return t&&(n=e+"\n  "+t+"\n```"),{text:n,selected:"language"}}))}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.d(e,"name",(function(){return r.d})),e.default=function(t,e){t.toggleFullScreen(e)}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.e})),e.default=function(t){t.insert((function(e){var n=t.langConfig.h1.placeholder,i=function(t){return t||n},o=Object(r.b)({selected:e,InsertGetter:function(t){return"# "+i(t)},selectedGetter:i});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.f})),e.default=function(t){t.insert((function(e){var n=t.langConfig.h2.placeholder,i=function(t){return t||n},o=Object(r.b)({selected:e,InsertGetter:function(t){return"## "+i(t)},selectedGetter:i});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.g})),e.default=function(t){t.insert((function(e){var n=t.langConfig.h3.placeholder,i=function(t){return t||n},o=Object(r.b)({selected:e,InsertGetter:function(t){return"### "+i(t)},selectedGetter:i});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.h})),e.default=function(t){t.insert((function(e){var n=t.langConfig.h4.placeholder,i=function(t){return t||n},o=Object(r.b)({selected:e,InsertGetter:function(t){return"#### "+i(t)},selectedGetter:i});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.i})),e.default=function(t){t.insert((function(e){var n=t.langConfig.h5.placeholder,i=function(t){return t||n},o=Object(r.b)({selected:e,InsertGetter:function(t){return"##### "+i(t)},selectedGetter:i});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.j})),e.default=function(t){t.insert((function(e){var n=t.langConfig.h6.placeholder,i=function(t){return t||n},o=Object(r.b)({selected:e,InsertGetter:function(t){return"###### "+i(t)},selectedGetter:i});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.d(e,"name",(function(){return r.k})),e.default=function(t){t.insert((function(){return{text:"------------------------------------"}}))}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.d(e,"name",(function(){return r.l})),e.default=function(t,e){var n=void 0===e?{}:e,r=n.url,i=n.desc,o=n.width,a=n.height;t.insert((function(){var t="http://",e="Description",n=t,c="!["+(i||e)+"]("+(r||t)+")",s=[];return o&&s.push('width="'+o+'"'),a&&s.push('height="'+a+'"'),s.length&&(c+="{{{"+s.join(" ")+"}}}"),r&&i?n=null:r?n=e:i&&(n=t),{text:c,selected:n}}))}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.m})),e.default=function(t){t.insert((function(e){var n=t.langConfig.italic.placeholder,i=function(t){return t||n},o=Object(r.b)({selected:e,InsertGetter:function(t){return"*"+i(t)+"*"},selectedGetter:i});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.n})),e.default=function(t){t.insert((function(e){var n=t.langConfig.link.descPlaceholder,i="http://",o=Object(r.b)({selected:e,InsertGetter:function(t){return"["+(t||n)+"]("+i+")"},selectedGetter:function(t){return t?i:n}});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.o})),e.default=function(t){t.insert((function(e){var n=t.langConfig.ol.placeholder,i=function(t){return t||n},o=Object(r.b)({selected:e,InsertGetter:function(t,e){return e+". "+i(t)},selectedGetter:i,ignoreEmptyLine:!1});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.d(e,"name",(function(){return r.p})),e.default=function(t){t.insert((function(e){var n=e||t.langConfig.quote.placeholder;return{text:"> "+n,selected:n}}))}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.d(e,"name",(function(){return r.q})),e.default=function(t){t.redo()}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.r})),e.default=function(t){t.insert((function(e){var n=t.langConfig.strikethrough.placeholder,i=function(t){return t||n},o=Object(r.b)({selected:e,InsertGetter:function(t){return"~~"+i(t)+"~~"},selectedGetter:i});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.d(e,"name",(function(){return r.s})),e.default=function(t,e){t.toggleSyncScroll(e)}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.d(e,"name",(function(){return r.t})),e.default=function(t){t.insert((function(){return{text:"|column1|column2|column3|\n|-|-|-|\n|content1|content2|content3|",selected:"column1"}}))}},function(t,e,n){"use strict";n.r(e);var r=n(2),i=n(1);n.d(e,"name",(function(){return i.u})),e.default=function(t){t.insert((function(e){var n=t.langConfig.ul.placeholder,i=function(t){return t||n},o=Object(r.b)({selected:e,InsertGetter:function(t){return"- "+i(t)},selectedGetter:i,ignoreEmptyLine:!1});return{text:o.insertContent,selected:o.newSelected}}))}},function(t,e,n){"use strict";n.r(e);var r=n(1);n.d(e,"name",(function(){return r.v})),e.default=function(t){t.undo()}},function(t,e,n){var r={"./bold.js":63,"./clear.js":64,"./code.js":65,"./fullscreen.js":66,"./h.js":67,"./hr.js":68,"./image.js":23,"./italic.js":69,"./link.js":70,"./ol.js":71,"./preview.js":72,"./quote.js":73,"./redo.js":74,"./save.js":75,"./strikethrough.js":76,"./sync-scroll.js":77,"./table.js":78,"./toc.js":79,"./ul.js":80,"./undo.js":81};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=62},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.a,icon:"v-md-icon-bold",title:function(t){return t.langConfig.bold.toolbar+"（Ctrl+B）"},action:function(t){t.execCommand(r.a)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.b,icon:"v-md-icon-clear",title:function(t){return t.langConfig.clear.toolbar},action:function(t){t.execCommand(r.b)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.c,icon:"v-md-icon-code",title:function(t){return t.langConfig.code.toolbar},action:function(t){t.execCommand(r.c)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.d,icon:"v-md-icon-fullscreen",title:function(t){var e=t.langConfig.fullscreen;return t.fullscreen?e.disabled:e.enabled},active:function(t){return t.fullscreen},action:function(t){t.execCommand(r.d,!t.fullscreen)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:"h",text:"H",title:function(t){return t.langConfig.h.toolbar+"（Ctrl+1~6）"},menus:[{name:r.e,text:function(t){return t.langConfig.h1.toolbar},action:function(t){t.execCommand(r.e)}},{name:r.f,text:function(t){return t.langConfig.h2.toolbar},action:function(t){t.execCommand(r.f)}},{name:r.g,text:function(t){return t.langConfig.h3.toolbar},action:function(t){t.execCommand(r.g)}},{name:r.h,text:function(t){return t.langConfig.h4.toolbar},action:function(t){t.execCommand(r.h)}},{name:r.i,text:function(t){return t.langConfig.h5.toolbar},action:function(t){t.execCommand(r.i)}},{name:r.j,text:function(t){return t.langConfig.h6.toolbar},action:function(t){t.execCommand(r.j)}}]}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.k,icon:"v-md-icon-horizontal",title:function(t){return t.langConfig.hr.toolbar},action:function(t){t.execCommand(r.k)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.m,icon:"v-md-icon-italic",title:function(t){return t.langConfig.italic.toolbar+"（Ctrl+I）"},action:function(t){t.execCommand(r.m)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.n,icon:"v-md-icon-link",title:function(t){return t.langConfig.link.toolbar+"（Ctrl+L）"},action:function(t){t.execCommand(r.n)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.o,icon:"v-md-icon-ol",title:function(t){return t.langConfig.ol.toolbar+"（Ctrl+O）"},action:function(t){t.execCommand(r.o)}}},function(t,e,n){"use strict";n.r(e);var r=n(4);e.default={name:"preview",icon:"v-md-icon-preview",title:function(t){var e=t.langConfig.preview;return t.currentMode===r.a.EDITABLE?e.disabled:e.enabled},active:function(t){return t.currentMode===r.a.EDITABLE},action:function(t){t.currentMode=t.currentMode===r.a.EDITABLE?r.a.EDIT:r.a.EDITABLE}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.p,icon:"v-md-icon-quote",title:function(t){return t.langConfig.quote.toolbar+"（Ctrl+Q）"},action:function(t){t.execCommand(r.p)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.q,icon:"v-md-icon-redo",title:function(t){return t.langConfig.redo.toolbar+"（Ctrl+Y）"},action:function(t){t.execCommand(r.q)}}},function(t,e,n){"use strict";n.r(e),e.default={name:"save",icon:"v-md-icon-save",title:function(t){return t.langConfig.save.toolbar+"（Ctrl+S）"},action:function(t){t.save()}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.r,icon:"v-md-icon-strikethrough",title:function(t){return t.langConfig.strikethrough.toolbar},action:function(t){t.execCommand(r.r)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.s,icon:"v-md-icon-sync",title:function(t){var e=t.langConfig.syncScroll;return t.enableSyncScroll?e.disabled:e.enabled},active:function(t){return t.enableSyncScroll},action:function(t){t.execCommand(r.s,!t.enableSyncScroll)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.t,icon:"v-md-icon-table",title:function(t){return t.langConfig.table.toolbar},action:function(t){t.execCommand(r.t)}}},function(t,e,n){"use strict";n.r(e),e.default={name:"toc",icon:"v-md-icon-toc",title:function(t){var e=t.langConfig.toc;return t.tocVisible?e.disabled:e.enabled},active:function(t){return t.tocVisible},action:function(t){t.toggleToc()}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.u,icon:"v-md-icon-ul",title:function(t){return t.langConfig.ul.toolbar+"（Ctrl+U）"},action:function(t){t.execCommand(r.u)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={name:r.v,icon:"v-md-icon-undo",title:function(t){return t.langConfig.undo.toolbar+"（Ctrl+Z）"},action:function(t){t.execCommand(r.v)}}},function(t,e,n){},function(t,e,n){"use strict";n(27)},function(t,e,n){"use strict";n(28)},function(t,e,n){"use strict";n(29)},function(t,e,n){"use strict";n(30)},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n(31)},function(t,e,n){"use strict";n(32)},function(t,e,n){"use strict";n(33)},function(t,e,n){var r={"./bold.js":92,"./h1.js":93,"./h2.js":94,"./h3.js":95,"./h4.js":96,"./h5.js":97,"./h6.js":98,"./italic.js":99,"./link.js":100,"./ol.js":101,"./quote.js":102,"./save.js":103,"./ul.js":104};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=91},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"b",action:function(t){t.execCommand(r.a)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"1",action:function(t){t.execCommand(r.e)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"2",action:function(t){t.execCommand(r.f)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"3",action:function(t){t.execCommand(r.g)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"4",action:function(t){t.execCommand(r.h)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"5",action:function(t){t.execCommand(r.i)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"6",action:function(t){t.execCommand(r.j)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"i",action:function(t){t.execCommand(r.m)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"l",action:function(t){t.execCommand(r.n)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"o",action:function(t){t.execCommand(r.o)}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"q",action:function(t){t.execCommand(r.p)}}},function(t,e,n){"use strict";n.r(e),e.default={modifier:"ctrl",key:"s",action:function(t){t.save()}}},function(t,e,n){"use strict";n.r(e);var r=n(1);e.default={modifier:"ctrl",key:"u",action:function(t){t.execCommand(r.u)}}},function(t,e,n){},,function(t,e,n){"use strict";n(105)},,function(t,e,n){"use strict";n.r(e);var r=n(0);var i=n(10),o=n.n(i),a=n(17),c={class:"v-md-textarea-editor"},s=Object(r.createVNode)("br",null,null,-1);var l,u=n(5);function f(t){if("TEXTAREA"!==t.nodeName)return!1;if(void 0===l){var e=document.createElement("textarea");e.value=1,l=!!e.firstChild}return l}var d=function(t,e){if(t.focus(),document.selection){var n=document.selection.createRange();return n.text=e,n.collapse(!1),void n.select()}if(!document.execCommand("insertText",!1,e)){var r=t.selectionStart,i=t.selectionEnd;if("function"==typeof t.setRangeText)t.setRangeText(e);else{var o=document.createRange(),a=document.createTextNode(e);if(f(t)){var c=t.firstChild;if(c){for(var s=0,l=null,u=null;c&&(null===l||null===u);){var d=c.nodeValue.length;r>=s&&r<=s+d&&o.setStart(l=c,r-s),i>=s&&i<=s+d&&o.setEnd(u=c,i-s),s+=d,c=c.nextSibling}r!==i&&o.deleteContents()}else t.appendChild(a)}if(f(t)&&"#text"===o.commonAncestorContainer.nodeName)o.insertNode(a);else{var h=t.value;t.value=h.slice(0,r)+e+h.slice(i)}}t.setSelectionRange(r+e.length,r+e.length);var p=document.createEvent("UIEvent");p.initEvent("input",!0,!1),t.dispatchEvent(p)}},h=n(36),p=n(2),m={name:"v-md-textarea-editor",props:{modelValue:String,minHeight:String,placeholder:String,historyDebounce:{type:Number,default:400},historyMax:{type:Number,default:30}},emits:["blur","paste","update:modelValue"],data:function(){return{isComposing:!1}},computed:{textareaEl:function(){return this.$refs.textarea}},watch:{modelValue:function(){var t=this;this.clearTimeout(),this.triggerInputBySetHistory||(this.timmer=setTimeout((function(){t.saveHistory(),t.clearTimeout()}),this.historyDebounce))}},created:function(){this.historyStack=[],this.historyIndex=0,this.hotkeysManager=new h.a},mounted:function(){this.saveHistory(),this.textareaEl.addEventListener("keydown",this.handleKeydown,!1)},beforeUnmount:function(){this.textareaEl.removeEventListener("keydown",this.handleKeydown,!1)},methods:{handleCompositionStart:function(){this.isComposing=!0},handleCompositionUpdate:function(t){var e=t.target.value,n=e[e.length-1]||"";this.isComposing=!Object(p.e)(n)},handleCompositionEnd:function(t){this.isComposing&&(this.isComposing=!1,this.handleInput(t))},handlePaste:function(t){this.$emit("paste",t)},handleBlur:function(t){this.$emit("blur",t)},registerHotkeys:function(){var t;(t=this.hotkeysManager).registerHotkeys.apply(t,arguments)},handleKeydown:function(t){this.hotkeysManager.dispatch(t)},heightAtLine:function(t){var e=this.$el.querySelector('section[data-line="'+t+'"]');return e?e.offsetTop+e.offsetHeight:0},clearTimeout:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){this.timmer&&clearTimeout(this.timmer),this.timmer=null})),updateCurrentHistoryRange:function(){this.timmer||this.updateHistory(this.historyIndex,{range:this.getRange()})},handleInput:function(t){this.isComposing||this.$emit("update:modelValue",t.target.value)},saveHistory:function(){var t=this.getRange(),e={value:this.modelValue,range:t};this.historyStack=this.historyStack.slice(0,this.historyIndex+1),this.historyStack.push(e),this.historyStack.length>this.historyMax&&this.historyStack.shift(),this.historyIndex=this.historyStack.length-1},updateHistory:function(t,e){var n=this.historyStack[t];"value"in e&&(n.value=e.value),Object(u.a)(n.range,e.range)},goHistory:function(t){var e=this,n=this.historyStack[t],r=n.value,i=n.range;this.$emit("update:modelValue",r),this.triggerInputBySetHistory=!0,this.$nextTick((function(){e.triggerInputBySetHistory=!1,e.setRange(i)}))},getRange:function(){return{start:this.textareaEl.selectionStart,end:this.textareaEl.selectionEnd}},setRange:function(t){var e=t.start,n=t.end;this.textareaEl.setSelectionRange(e,n),this.updateCurrentHistoryRange()},focus:function(){this.textareaEl.focus()},insertText:function(t){d(this.textareaEl,t)},undo:function(){this.historyIndex>0&&(this.historyIndex--,this.goHistory(this.historyIndex))},redo:function(){this.historyIndex<this.historyStack.length-1&&(this.historyIndex++,this.goHistory(this.historyIndex))}}};n(107);m.render=function(t,e,n,i,o,a){return Object(r.openBlock)(),Object(r.createBlock)("div",c,[Object(r.createVNode)("pre",{style:{minHeight:n.minHeight}},[(Object(r.openBlock)(!0),Object(r.createBlock)(r.Fragment,null,Object(r.renderList)(n.modelValue.split("\n"),(function(t,e){return Object(r.openBlock)(),Object(r.createBlock)("section",{"data-line":e+1},[Object(r.createTextVNode)(Object(r.toDisplayString)(t||" "),1),s],8,["data-line"])})),256))],4),Object(r.createVNode)("textarea",{ref:"textarea",value:n.modelValue,placeholder:n.placeholder,spellcheck:"false",onCompositionstart:e[1]||(e[1]=function(){return a.handleCompositionStart.apply(a,arguments)}),onCompositionupdate:e[2]||(e[2]=function(){return a.handleCompositionUpdate.apply(a,arguments)}),onCompositionend:e[3]||(e[3]=function(){return a.handleCompositionEnd.apply(a,arguments)}),onInput:e[4]||(e[4]=function(){return a.handleInput.apply(a,arguments)}),onClick:e[5]||(e[5]=function(){return a.updateCurrentHistoryRange.apply(a,arguments)}),onPaste:e[6]||(e[6]=function(){return a.handlePaste.apply(a,arguments)}),onBlur:e[7]||(e[7]=function(){return a.handleBlur.apply(a,arguments)}),onKeydown:[e[8]||(e[8]=Object(r.withKeys)(Object(r.withModifiers)((function(){}),["prevent"]),["tab"])),e[9]||(e[9]=Object(r.withKeys)(Object(r.withModifiers)((function(){return a.undo.apply(a,arguments)}),["ctrl","prevent","exact"]),["z"])),e[10]||(e[10]=Object(r.withKeys)(Object(r.withModifiers)((function(){return a.undo.apply(a,arguments)}),["meta","prevent","exact"]),["z"])),e[11]||(e[11]=Object(r.withKeys)(Object(r.withModifiers)((function(){return a.redo.apply(a,arguments)}),["ctrl","prevent","exact"]),["y"])),e[12]||(e[12]=Object(r.withKeys)(Object(r.withModifiers)((function(){return a.redo.apply(a,arguments)}),["meta","prevent","exact"]),["y"]))],onKeyup:[e[13]||(e[13]=Object(r.withKeys)(Object(r.withModifiers)((function(){return a.updateCurrentHistoryRange.apply(a,arguments)}),["shift","exact"]),["up"])),e[14]||(e[14]=Object(r.withKeys)(Object(r.withModifiers)((function(){return a.updateCurrentHistoryRange.apply(a,arguments)}),["shift","exact"]),["down"])),e[15]||(e[15]=Object(r.withKeys)(Object(r.withModifiers)((function(){return a.updateCurrentHistoryRange.apply(a,arguments)}),["shift","exact"]),["left"])),e[16]||(e[16]=Object(r.withKeys)(Object(r.withModifiers)((function(){return a.updateCurrentHistoryRange.apply(a,arguments)}),["shift","exact"]),["right"]))]},null,40,["value","placeholder"])])};var g,v=m,b=n(35),y={components:(g={},g[v.name]=v,g),watch:{modelValue:function(){this.text=this.modelValue},height:{handler:function(){var t=this;return Object(a.a)(o.a.mark((function e(){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p.d){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.$nextTick();case 4:t.height?(n=t.$el.querySelector(".v-md-editor__editor-wrapper"),t.textEditorMinHeight=window.getComputedStyle(n).height):t.textEditorMinHeight="";case 5:case"end":return e.stop()}}),e)})))()},immediate:!0}},data:function(){return{textEditorMinHeight:""}},methods:{handleEditorWrapperClick:function(){this.setFocusEnd()},editorFocusEnd:function(){this.focus(),this.$refs.editorEgine.setRange({start:this.text.length,end:this.text.length})},delLineLeft:function(){var t=this.$refs.editorEgine,e=t.getRange().start,n=this.getCursorLineLeftText();t.setRange({start:e-n.length-1,end:e}),this.replaceSelectionText("\n")},getCursorLineLeftText:function(){var t=this.$refs.editorEgine.getRange(),e=t.start;return e===t.end?this.text.slice(0,e).split("\n").pop():null},editorRegisterHotkeys:function(){var t;(t=this.$refs.editorEgine).registerHotkeys.apply(t,arguments)},editorScrollToTop:function(t){this.$refs.editorScroller.scrollTo(t)},getScrollInfo:function(){return this.$refs.editorScroller.getScrollInfo()},heightAtLine:function(){var t;return(t=this.$refs.editorEgine).heightAtLine.apply(t,arguments)},focus:function(){this.$refs.editorEgine.focus()},undo:function(){this.$refs.editorEgine.undo()},redo:function(){this.$refs.editorEgine.redo()},clear:function(){this.focus(),this.handleInput("")},replaceSelectionText:function(t){this.$refs.editorEgine.insertText(t)},getCurrentSelectedStr:function(){var t=this.$refs.editorEgine.getRange(),e=t.start,n=t.end;return n>e?this.text.slice(e,n):null},changeSelctionTo:function(t,e){var n=this.$refs.editorEgine,r=t.indexOf(e),i=n.getRange().end;if(-1!==r){var o=this.text.slice(0,i).length-t.length+r,a=o+e.length;this.$refs.editorEgine.setRange({start:o,end:a})}}}};Object(b.a)(y);var w=y;w.render=function(t,e,n,i,o,a){var c=Object(r.resolveComponent)("toc-nav"),s=Object(r.resolveComponent)("scrollbar"),l=Object(r.resolveComponent)("v-md-textarea-editor"),u=Object(r.resolveComponent)("v-md-preview"),f=Object(r.resolveComponent)("v-md-upload-file"),d=Object(r.resolveComponent)("v-md-container");return Object(r.openBlock)(),Object(r.createBlock)(d,{"left-toolbar":t.leftToolbar,"right-toolbar":t.rightToolbar,toolbars:t.toolbars,"disabled-menus":t.disabledMenus,height:t.height,fullscreen:t.fullscreen,"left-area-visible":t.tocVisible,"left-area-title":t.langConfig.toc.title,"left-area-reverse":t.tocNavPositionRight,mode:t.currentMode,onEditorWrapperClick:t.handleEditorWrapperClick,onToolbarItemClick:t.handleToolbarItemClick,onToolbarMenuClick:t.handleToolbarMenuClick,ref:"contaner"},{"left-area":Object(r.withCtx)((function(){return[Object(r.createVNode)(s,null,{default:Object(r.withCtx)((function(){return[Object(r.createVNode)(c,{titles:t.titles,onNavClick:t.handleNavClick},null,8,["titles","onNavClick"])]})),_:1})]})),editor:Object(r.withCtx)((function(){return[Object(r.createVNode)(s,{onScroll:t.handleEditorScroll,ref:"editorScroller"},{default:Object(r.withCtx)((function(){return[Object(r.createVNode)(l,{"model-value":t.text,"min-height":t.textEditorMinHeight,placeholder:t.placeholder,"onUpdate:modelValue":t.handleInput,onClick:e[1]||(e[1]=Object(r.withModifiers)((function(){}),["stop"])),onDrop:t.handleDrop,onPaste:t.handlePaste,onBlur:t.handleBlur,ref:"editorEgine"},null,8,["model-value","min-height","placeholder","onUpdate:modelValue","onDrop","onPaste","onBlur"])]})),_:1},8,["onScroll"])]})),preview:Object(r.withCtx)((function(){return[Object(r.createVNode)(s,{ref:"previewScroller"},{default:Object(r.withCtx)((function(){return[Object(r.createVNode)(u,{text:t.text,"tab-size":t.tabSize,"scroll-container":t.getPreviewScrollContainer,"before-change":t.beforePreviewChange,onChange:t.handleChange,onImageClick:t.handlePreviewImageClick,ref:"preview"},null,8,["text","tab-size","scroll-container","before-change","onChange","onImageClick"])]})),_:1},512)]})),default:Object(r.withCtx)((function(){return[t.hasUploadImage?(Object(r.openBlock)(),Object(r.createBlock)(f,{key:0,"upload-config":t.uploadConfig,ref:"uploadFile"},null,8,["upload-config"])):Object(r.createCommentVNode)("v-if",!0)]})),_:1},8,["left-toolbar","right-toolbar","toolbars","disabled-menus","height","fullscreen","left-area-visible","left-area-title","left-area-reverse","mode","onEditorWrapperClick","onToolbarItemClick","onToolbarMenuClick"])};var x=w,k=n(7);n(18);x.version="2.3.17",x.install=function(t){t.component(x.name,x)},x.xss=k.a,x.use=function(t,e){return"function"==typeof t?t(x,e):t.install(x,e),x};e.default=x}]).default}));
//# sourceMappingURL=/sm/e0116228e0c4119a81ec2ebecb52c0727ed2f148e6c3e7c7adbb028f5840738d.map