UNPKG

balm-ui

Version:

A modular and customizable UI library based on Material Design and Vue 3

1 lines 20.2 kB
!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue"),require("quill")):"function"===typeof define&&define.amd?define("UiEditor",["vue","quill"],t):"object"===typeof exports?exports.UiEditor=t(require("vue"),require("quill")):e.UiEditor=t(e.Vue,e.Quill)}("undefined"!==typeof self?self:this,(function(e,t){return function(){"use strict";var o={744:function(e){var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===o}(e)}(e)};var o="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((o=e,Array.isArray(o)?[]:{}),e,t):e;var o}function r(e,t,o){return e.concat(t).map((function(e){return n(e,o)}))}function l(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function i(e,t){try{return t in e}catch(o){return!1}}function a(e,t,o){var r={};return o.isMergeableObject(e)&&l(e).forEach((function(t){r[t]=n(e[t],o)})),l(t).forEach((function(l){(function(e,t){return i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,l)||(i(e,l)&&o.isMergeableObject(t[l])?r[l]=function(e,t){if(!t.customMerge)return s;var o=t.customMerge(e);return"function"===typeof o?o:s}(l,o)(e[l],t[l],o):r[l]=n(t[l],o))})),r}function s(e,o,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var i=Array.isArray(o);return i===Array.isArray(e)?i?l.arrayMerge(e,o,l):a(e,o,l):n(o,l)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,o){return s(e,o,t)}),{})};var c=s;e.exports=c},600:function(e){e.exports=t},154:function(t){t.exports=e}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var l=n[e]={exports:{}};return o[e](l,l.exports,r),l.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var l={};r.d(l,{default:function(){return ye}});var i=r(744),a=r.n(i);const s=/(?:^\[object\s(.*?)\]$)/;var c=e=>Object.prototype.toString.call(e).replace(s,"$1").toLowerCase();const u=e=>{let{componentProps:t,propName:o,props:n}=e,r=n[o];if("object"===c(r)){const e=t[o].default;t[o].default=()=>a()(e,r)}else Array.isArray(r)?t[o].default=()=>r:t[o].default=r},d=e=>{let{componentMixins:t,propName:o,props:n}=e;if(t.length){let e=t.length;for(;e--;)if(t[e].props&&void 0!==t[e].props[o]){u({componentProps:t[e].props,propName:o,props:n});break}}};var p=(e,t)=>{for(const o of Object.keys(t))e.props?void 0===e.props[o]?d({componentMixins:e.mixins,propName:o,props:t}):u({componentProps:e.props,propName:o,props:t}):d({componentMixins:e.mixins,propName:o,props:t})};var m=e=>{const t={install(t){p(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),t.component(e.name,e)}};return t},f=r(154),b=r(600),h=r.n(b);let g,y,v={};const E="UiEditor",j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(e).length&&(e.quill?y=e.quill:(g=e.Quill,v=e.toolbarHandlers))},q=()=>({Quill:g,quill:y,toolbarHandlers:v}),w="ql-emoji";function S(e,t){return t.name&&("emoji"===e?t.value:t.src)}function _(e){return"emoji"===e.type?`:${e.name}:`:`[${e.name}]`}function O(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=function(e,t){let o=t;return t||(o="emoji"===e.type?document.createElement("span"):document.createElement("img")),"emoji"===e.type?(o.innerHTML=e.value,o.style.fontSize="18px"):(o.src=e.src,o.setAttribute("alt",e.alt||"")),o}(e,o);return o||(t=document.createElement("span"),t.classList.add(w,`ql-${e.type}-${e.name}`),t.appendChild(n)),o?n:t}const T=/(:\w+:)|(\[\w+\])/g;let L=[],x={},k={};var C=class{constructor(e){for(let t=0,o=e.length;t<o;t++){const o=e[t];if(L.push({type:o.type,title:o.title}),!o.content.every((e=>S(o.type,e)))){console.warn(`[${E}]`,"Invalid emotions format"),L=[],x={},k={};break}{let e=[];[].slice.call(o.content).forEach((t=>{const n=Object.assign({type:o.type},t),r=_(n);e.push(n),k[r]=n})),x[o.title]=e}}}static getTypes(){return L}static getEmotion(e){return x[e]}static getEmotions(){return k}static clear(){L=[],x={},k={}}static encode(e){const t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll(`.${w}`).forEach((e=>{const t=e.classList[1]?e.classList[1].split("-"):[];if(3===t.length){!function(e,t){if(e.outerHTML)e.outerHTML=t;else{let o=document.createElement("div");o.innerText=t;let n=e.parentNode;n.replaceChild(o,e),n.innerHTML=n.innerHTML.replace(`<div>${t}</div>`,t)}}(e,_({type:t[1],name:t[2]}))}})),t.querySelector("body").innerHTML}static decode(e){let t=e;try{const o=e.match(T);o&&o.forEach((e=>{let o="emoji"===k[e].type?document.createElement("span"):document.createElement("img");o.classList.add(w);const n=O(k[e],o);t=t.replace(e,n.outerHTML)}))}catch(o){console.warn(`[${E}]`,"The param of the 'decodeEmoji' method must be an async data")}return t}};var N=function(){const{Quill:e}=q(),t=e.import("parchment");class o extends t.EmbedBlot{static create(e){let t="emoji"===e.type?document.createElement("span"):document.createElement("img");if("object"===typeof e)return O(e,t);if("string"===typeof e){return O(C.getEmotions()[e],t)}return console.warn(`[${E}]`,"Invalid emoji"),t}}o.blotName="emoji",o.tagName=["SPAN","IMG"],o.className=w,e.register("formats/emoji",o,!0)};const A={cssClasses:{icon:"material-icons"},EVENTS:{CLICK:"click"},getMaterialIconClass:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return[A.cssClasses.icon,...t]}};var H=A;const I="ql-emoji-toolbar",M="ql-emoji-toolbar-close",$={tabBar:"ql-emoji-tab-bar",tabScroller:"ql-emoji-tab-scroller",tabContent:"ql-emoji-tab-content",tab:"ql-emoji-tab",tabActive:"ql-emoji-tab--active",panel:"ql-emoji-panel"};let B=!1;function R(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"div";const o=document.createElement(t);return o.className=e,o}function P(){let e=document.getElementById(I);return e&&e.remove(),e}function V(e){const t=e.target;if(t&&new RegExp(`^${w}`).test(t.classList[0]))e.preventDefault(),e.stopPropagation();else if(B){let e=t;for(;e&&e.classList&&!e.classList.contains("mdc-editor-quill");)if(e=e.parentNode,e&&e.classList&&e.classList.contains("mdc-editor-quill")){e.querySelector("#ql-emoji-toolbar")||P();break}}else P()}var Q=function(){const{Quill:e}=q(),t=e.import("core/module");e.register("modules/emoji",class extends t{constructor(e,t){super(e,t),this.quill=e;const o=e.getModule("toolbar");"undefined"!==typeof o&&(o.addHandler("emoji",this.openEmojiToolbar.bind(this)),this.quill.on("selection-change",((e,t,o)=>{if(B=e,B){let e=document.getElementById(I);e&&this.setEmojiToolbarBounds(e)}})))}setEmojiToolbarBounds(e){let t=this.quill.getSelection(!0);if(e&&t){let o=this.quill.getBounds(t.index),n=o.left+240;e.style.top=`${o.top+o.height+10}px`,n>this.quill.container.offsetWidth?e.style.left=o.left-250+"px":e.style.left=`${o.left}px`}}openEmojiToolbar(){if(!P()){const e=document.createElement("div");e.id=I,this.quill.container.appendChild(e),this.setEmojiToolbarBounds(e);const t=document.createElement("i");t.id=M,t.className=H.cssClasses.icon,t.innerHTML="close",e.appendChild(t);const o=R($.tabBar),n=R($.tabScroller);o.appendChild(n),e.appendChild(o);const r=R($.panel);e.appendChild(r);const l=C.getTypes();this.addTabs(l,n,r),this.updatePanel(l[0]&&l[0].title,r),this.onEmojiHandler(),this.onCloseHandler()}}addTabs(e,t,o){const n=R($.tabContent,"ul");t.appendChild(n),e.forEach(((e,t)=>{let r=document.createElement("li");r.classList.add($.tab),0===t&&r.classList.add($.tabActive),r.innerHTML=e.title,r.dataset.title=e.title,n.appendChild(r),r.addEventListener(H.EVENTS.CLICK,(e=>{let t=e.target;if(!t.classList.contains($.tabActive)){let e=document.querySelector(`.${$.tabActive}`);e&&e.classList.remove($.tabActive),t.classList.toggle($.tabActive),this.updatePanel(t.dataset.title,o)}}))}))}updatePanel(e,t){if(e){t.innerHTML="",C.getEmotion(e).forEach((e=>{const o=O(e);o.setAttribute("title",_(e)),t.appendChild(o)})),this.quill.focus()}else t.innerHTML="Emotions is empty"}onEmojiHandler(){const t=C.getEmotions();document.querySelector(".ql-emoji-panel").addEventListener(H.EVENTS.CLICK,(o=>{const n=o.target.parentNode;if(n&&n.classList.contains(w)){let o=this.quill.getSelection(!0);o&&(this.quill.insertEmbed(o.index,"emoji",t[n.title],e.sources.USER),this.quill.setSelection(o.index+1,e.sources.SILENT)),P()}}))}onCloseHandler(){document.getElementById(M).addEventListener(H.EVENTS.CLICK,P)}},!0)};var U=function(e){C.getTypes().length||(new C(e),N(),Q())};var F=function(){const{Quill:e}=q(),t=e.import("attributors/style/align");e.register(t,!0)};var z=function(){const{Quill:e}=q(),t=e.import("attributors/style/direction");e.register(t,!0)};const G=[1,2,3,4,5,6,7,8].map((e=>`${e}em`));var D=function(){const{Quill:e}=q(),t=e.import("parchment");let o={scope:t.Scope.BLOCK,whitelist:G};class n extends t.Attributor{add(e,t){if("+1"===t||"-1"===t){let o=this.value(e)||0;t="+1"===t?o+1:o-1}return 0===t?(this.remove(e),!0):super.add(e,`${t}em`)}value(e){return parseInt(super.value(e))||void 0}}const r=new n("indent","margin-left",o),l=new n("textindent","text-indent",o);e.register(r,!0),e.register(l,!0)};var K=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(e.length){const{Quill:t}=q(),o=t.import("attributors/style/font");o.whitelist=e,t.register(o,!0)}};var W=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(e.length){const{Quill:t}=q(),o=t.import("attributors/style/size");o.whitelist=e,t.register(o,!0)}};var X=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(e.length){const{Quill:t}=q(),o=t.import("parchment");let n={scope:o.Scope.INLINE,whitelist:e};const r=new o.Attributor("lineheight","line-height",n);t.register(r,!0)}};var J=function(){const{Quill:e}=q(),t=e.import("parchment");class o extends t.EmbedBlot{static create(e){let t=super.create();return"string"===typeof e&&(t.innerHTML=e),t}}o.blotName="html",o.tagName="DIV",e.register("formats/html",o,!0)};var Y=function(e){let{font:t,size:o,lineheight:n}=e;F(),z(),D(),K(t),W(o),X(n),J()};const Z=`.ql-picker${["header","font","size","lineheight"].map((e=>`:not(.ql-${e})`)).join("")} .ql-picker-label`;function ee(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=document.querySelectorAll(".ql-toolbar button"),o=document.querySelectorAll(`.ql-toolbar ${Z}`),n=document.querySelectorAll(".ql-toolbar .ql-align .ql-picker-item");if([...t,...o,...n].forEach((e=>{e.classList.add(H.cssClasses.icon)})),Object.keys(e).length){const o=document.querySelectorAll(".ql-toolbar .ql-picker");!function(e,t){const o=Object.keys(t);e.forEach((e=>{const n=e.classList[0].replace("ql-","");o.includes(n)&&("object"===typeof t[n]?e.title=t[n][e.value||"default"]:e.title=t[n])}))}([...t,...o],e)}}var te=function(){const{Quill:e}=q();e.register("modules/counter",class{constructor(e,t){this.quill=e,this.options=t,this.container=t.container,e.on("text-change",this.update.bind(this)),this.update()}calculate(){let e=this.quill.getText();return"word"===this.options.unit?(e=e.trim(),e.length>0?e.split(/\s+/).length:0):e.length}update(){let e=this.calculate(),t=this.options.unit||"character";1!==e&&(t+="s"),this.container.innerText=e+" "+t}},!0)};var oe=function(){const{toolbarHandlers:e}=q();e.undo=()=>{const{quill:e}=q();e.history.undo()},e.redo=()=>{const{quill:e}=q();e.history.redo()}};var ne=function(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{Quill:t}=q(),o=t.import("ui/icons");for(const[n,r]of Object.entries(e))o[n]=r}(e),te(),oe()};var re=function(){const{Quill:e}=q(),t=e.import("parchment");class o extends t.EmbedBlot{}o.blotName="divider",o.tagName="HR",e.register("formats/divider",o,!0)};var le=function(){const{Quill:e}=q();e.register("modules/divider",class{constructor(e){this.quill=e;const t=e.getModule("toolbar");"undefined"!==typeof t&&t.addHandler("divider",this.insertHandler.bind(this))}insertHandler(){let t=this.quill.getSelection(!0);t&&(this.quill.insertText(t.index,"\n",e.sources.USER),this.quill.insertEmbed(t.index+1,"divider",!0,e.sources.USER),this.quill.setSelection(t.index+2,e.sources.SILENT))}},!0)};var ie=function(){re(),le()};var ae=function(){const{toolbarHandlers:e}=q();e.linkoff=()=>{const{quill:e}=q();let t=e.getContents().ops.map((e=>(e.attributes&&"undefined"!==typeof e.attributes.link&&delete e.attributes.link,e)));e.setContents(t)}};var se=function(){const{toolbarHandlers:e}=q();e.selectall=()=>{const{quill:e}=q();let t=e.getText();e.setSelection(0,t.length)}};var ce=function(){ie(),ae(),se()};const ue=["divider","emoji"];const de={ERROR:{NON_IMAGE:1,NOT_PREVIEWABLE:2},tmpFileId(){const e=window.crypto||window.msCrypto;let t=new Uint32Array(8);e.getRandomValues(t);let o="";for(let n=0,r=t.length;n<r;n++)o+=(n<2||n>5?"":"-")+t[n].toString(16).slice(-4);return o},createFileObject(e){let{lastModified:t,name:o,size:n,type:r}=e;return{tmpId:de.tmpFileId(),lastModified:t,name:o,size:n,type:r,sourceFile:e}},getPreviewSrc(e){return new Promise(((t,o)=>{if(e.type.startsWith("image/"))if(window.URL)t(window.URL.createObjectURL(e.sourceFile));else if(window.FileReader){let o=new FileReader;o.onload=function(e){t(e.target.result)},o.readAsDataURL(e.sourceFile)}else o(de.ERROR.NOT_PREVIEWABLE);else o(de.ERROR.NON_IMAGE)}))},async handlePreview(e){e.previewSrc="",e.previewError=0;try{e.previewSrc=await de.getPreviewSrc(e)}catch(t){e.previewError=t}}};var pe=async function(e,t,o){const n=[].slice.call(t.target.files);if(n.length){o(await Promise.all(n.map((async t=>{const o=de.createFileObject(t);return e.preview&&await de.handlePreview(o),Promise.resolve(o)})))),t.target.value=""}},me={EVENTS:{TEXT_CHANGE:"update:modelValue",FILE_CHANGE:"file-change"},BLANK:"<p><br></p>",toolbarIcons:{align:{"":"format_align_left",center:"format_align_center",right:"format_align_right",justify:"format_align_justify"},background:"font_download",blockquote:"format_quote",bold:"format_bold",clean:"format_clear",code:"code",color:"text_format",formula:"functions",italic:"format_italic",image:"insert_photo",indent:{"+1":"format_indent_increase","-1":"format_indent_decrease"},link:"insert_link",list:{ordered:"format_list_numbered",bullet:"format_list_bulleted"},script:{sub:"subscript",super:"superscript"},strike:"strikethrough_s",underline:"format_underlined",video:"videocam",divider:"horizontal_rule",emoji:"insert_emoticon",cut:"content_cut",copy:"content_copy",paste:"content_paste",delete:"clear",search:"search",preview:"preview",selectall:"select_all",fullscreen:{"":"fullscreen",exit:"fullscreen_exit"},undo:"undo",redo:"redo",linkoff:"link_off",textindent:{"+1":"format_indent_increase","-1":"format_indent_decrease"},pdf:"picture_as_pdf"},defaultToolbar:[[{header:[]},{font:[]},{size:[]}],["bold","italic","underline",{color:[]},{background:[]}],[{align:""},{align:"center"},{align:"right"},{align:"justify"}],[{list:"ordered"},{list:"bullet"},{indent:"+1"},{indent:"-1"},"blockquote","emoji"],["link","image","video"],["strike",{script:"super"},{script:"sub"},"divider"],["clean","undo","redo"]]};const fe={class:"mdc-editor__content"},be={key:0,class:"mdc-editor-code",contenteditable:""},he={name:E,customOptions:{UI_EDITOR:me}};var ge=Object.assign(he,{props:{modelValue:{type:String,default:""},options:{type:Object,default:()=>({})},toolbar:{type:[Array,String,null],default:null},placeholder:{type:[String,null],default:null},readonly:{type:Boolean,default:!1},fullwidth:{type:Boolean,default:!1},theme:{type:String,default:"snow"},toolbarIcons:{type:Object,default:()=>({})},toolbarTips:{type:Object,default:()=>({})},toolbarOptions:{type:Object,default:()=>({})},toolbarHandlers:{type:Object,default:()=>({})},customImageHandler:{type:Boolean,default:!1},emotions:{type:Array,default:()=>[]},withCounter:{type:Boolean,default:!1},extension:{type:[Boolean,Object],default:!1}},emits:[me.EVENTS.TEXT_CHANGE,me.EVENTS.FILE_CHANGE],setup(e,t){let{expose:o,emit:n}=t;const r=e,l=n,i=(0,f.ref)(null),a=(0,f.ref)(null),s=(0,f.ref)(null),u=(0,f.reactive)({$editor:null,htmlContent:"",editSourceCode:!1}),{htmlContent:d,editSourceCode:p}=(0,f.toRefs)(u),m=(0,f.computed)((()=>({"mdc-editor":!0,"mdc-editor--fullwidth":r.fullwidth})));function b(e,t,o){for(let n of e)"object"===c(n)&&"array"===c(n[t])&&0===n[t].length?n[t]=[!1,...o]:"array"===c(n)&&b(n,t,o)}function g(){let e=r.toolbar;return"array"===c(e)&&Object.keys(r.toolbarOptions).forEach((t=>{r.toolbarOptions[t].length&&b(e,t,r.toolbarOptions[t])})),"full"===r.toolbar?me.defaultToolbar:e}function y(e){const{placeholder:t,readonly:o,theme:n}=r,l={modules:{},placeholder:t,readOnly:o,theme:n};let i=Object.assign(l,r.options);i.modules.toolbar={container:g(),handlers:{}},r.withCounter&&(i.modules.counter={container:e});const a=i.modules.toolbar.handlers;return r.customImageHandler&&(a.image=()=>{s.value.click()}),Object.keys(r.toolbarHandlers).forEach((e=>{a[e]=t=>{r.toolbarHandlers[e](u.$editor,t)}})),i}(0,f.onMounted)((()=>{(0,f.nextTick)((async()=>{const{toolbarTips:e,toolbarOptions:t,emotions:o,extension:n}=r;u.$editor=await function(e,t){let{toolbarIcons:o,toolbarTips:n,toolbarOptions:r,options:l,emotions:i,extension:a}=t;const s=l.modules.toolbar.handlers;j({Quill:h(),toolbarHandlers:s}),ue.forEach((e=>{l.modules[e]=!0})),Y(r),ne(o),ce(),"snow"===l.theme?U(i):delete l.modules.emoji,a&&h().register(a,!0);const c=new(h())(e,l);return j({quill:c}),c.insert=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=c.getSelection(!0);o&&(c.insertEmbed(o.index,e,t,h().sources.USER),c.setSelection(o.index+1,h().sources.SILENT))},ee(n),c}(i.value,{toolbarIcons:Object.assign(me.toolbarIcons,r.toolbarIcons),toolbarTips:e,toolbarOptions:t,options:y(a.value),emotions:o,extension:n}),r.modelValue&&E(r.modelValue),u.$editor.on("text-change",((e,t,o)=>{let n=v();n===me.BLANK&&(n=""),u.htmlContent=n,l(me.EVENTS.TEXT_CHANGE,n)}))})),(0,f.watch)((()=>r.modelValue),(e=>{e?u.htmlContent!==e&&(E(e),u.$editor.blur()):E()})),(0,f.watch)((()=>r.readonly),(e=>e?u.$editor.disable():u.$editor.enable())),document.addEventListener("click",V)})),(0,f.onBeforeUnmount)((()=>{C.clear(),document.removeEventListener("click",V)}));const v=()=>u.$editor.root.innerHTML,E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u.$editor.root.innerHTML=e,function(e){r.placeholder&&(r.readonly&&e?u.$editor.root.setAttribute("data-placeholder",""):u.$editor.root.dataset.placeholder||u.$editor.root.setAttribute("data-placeholder",r.placeholder))}(e)},w=e=>u.$editor.insert("image",e);function S(e){pe(r,e,(e=>{l(me.EVENTS.FILE_CHANGE,e[0],w)}))}return o({useEditor:q,encodeEmoji:e=>C.encode(e),decodeEmoji:e=>C.decode(e)}),(t,o)=>((0,f.openBlock)(),(0,f.createElementBlock)("div",{class:(0,f.normalizeClass)(m.value)},[(0,f.renderSlot)(t.$slots,"toolbar"),(0,f.createElementVNode)("div",fe,[(0,f.unref)(p)?((0,f.openBlock)(),(0,f.createElementBlock)("pre",be,(0,f.toDisplayString)((0,f.unref)(d)),1)):((0,f.openBlock)(),(0,f.createElementBlock)("div",{key:1,ref_key:"editor",ref:i,class:"mdc-editor-quill"},null,512))]),e.withCounter?((0,f.openBlock)(),(0,f.createElementBlock)("div",{key:0,ref_key:"counter",ref:a,class:"mdc-editor__counter"},null,512)):(0,f.createCommentVNode)("",!0),e.customImageHandler?((0,f.openBlock)(),(0,f.createElementBlock)("input",{key:1,ref_key:"file",ref:s,type:"file",accept:"image/*",hidden:"",onChange:S},null,544)):(0,f.createCommentVNode)("",!0),(0,f.renderSlot)(t.$slots,"default")],2))}});var ye=m(ge);return l=l.default}()}));