(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cf7857ea"],{"0bde":function(t,e,r){"use strict";r("7102")},"15be":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"box"},[t.editBtn?r("mavon-editor",{ref:"md",attrs:{toolbars:t.toolbars},model:{value:t.htmlMD,callback:function(e){t.htmlMD=e},expression:"htmlMD"}}):r("div",{staticClass:"m20"},[r("markdown-it-vue",{attrs:{content:t.htmlMD}})],1)],1)},o=[],i=r("e876"),a=r("2b0e"),c=r("b2d8"),u=r.n(c),l=(r("64e1"),r("48cd")),f=r.n(l);r("f417");function s(t){return s="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},s(t)}function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),M(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function g(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void r(l)}c.done?e(u):Promise.resolve(u).then(n,o)}function b(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){g(i,n,o,a,c,"next",t)}function c(t){g(i,n,o,a,c,"throw",t)}a(void 0)}))}}a["default"].use(u.a);var w={name:"",props:{url:{type:String,default:""},editBtn:{type:Boolean,default:!1},fid:{type:String,default:""},file:{type:Object,default:function(){return{}}}},components:{MarkdownItVue:f.a},data:function(){return{htmlMD:"",toolbars:{bold:!0,italic:!0,header:!0,underline:!0,strikethrough:!0,mark:!0,superscript:!0,subscript:!0,quote:!0,ol:!0,ul:!0,link:!0,imagelink:!1,code:!0,table:!0,fullscreen:!0,readmodel:!0,htmlcode:!0,help:!0,undo:!0,redo:!0,trash:!0,save:!1,navigation:!0,alignleft:!0,aligncenter:!0,alignright:!0,subfield:!0,preview:!0}}},watch:{url:function(t){this.fetchMarkdownAndConvertToHtml()}},mounted:function(){this.fetchMarkdownAndConvertToHtml(),console.log(this.file)},methods:{fetchMarkdownAndConvertToHtml:function(){var t=this;return b(m().mark((function e(){var r;return m().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,fetch(t.url);case 2:return r=e.sent,e.next=5,r.text();case 5:t.htmlMD=e.sent;case 6:case"end":return e.stop()}}),e)})))()},save:function(){var t=this,e={content:this.htmlMD,is_file:1};Object(i["d"])(this.fid,this.file.id,e).then((function(e){if(200===e.status){var r=t.$router.history.current.path;t.$router.push({path:r,query:p(p({},t.$route.query),{},{word_url:e.data.file_url})})}t.$emit("closeLoading")}))}}},O=w,x=(r("0bde"),r("2877")),j=Object(x["a"])(O,n,o,!1,null,"1ce432aa",null);e["default"]=j.exports},7102:function(t,e,r){}}]);