{"version":3,"sources":["webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/TinyMCE.js","webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/Utils.js","webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/ScriptLoader.js","webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/EditorPropTypes.js","webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/Editor.js","webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/index.js"],"names":["getGlobal","window","global","getTinymce","tinymce","validEvents","isValidKey","key","map","event","toLowerCase","indexOf","bindHandlers","initEvent","listeners","editor","Object","keys","filter","forEach","handler","on","substring","e","bindModelHandlers","ctx","modelEvents","$props","normalizedEvents","Array","isArray","join","$emit","getContent","format","outputFormat","initEditor","value","initialValue","setContent","initialized","cache","$watch","val","prevVal","$listeners","input","unique","uuid","prefix","time","Date","now","random","Math","floor","String","isTextarea","element","tagName","normalizePluginArray","plugins","split","mergePlugins","initPlugins","inputPlugins","concat","isNullOrUndefined","undefined","createState","scriptId","scriptLoaded","CreateScriptLoader","state","injectScriptTag","doc","url","callback","scriptTag","createElement","referrerPolicy","type","id","src","removeEventListener","addEventListener","head","appendChild","load","push","getElementById","fn","reinitialize","ScriptLoader","editorProps","apiKey","cloudChannel","init","inline","Boolean","toolbar","disabled","tinymceScriptSrc","validator","prop","__assign","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","renderInline","h","attrs","renderIframe","style","visibility","initialise","finalInit","readonly","selector","elementId","inlineEditor","setup","display","Editor","props","created","watch","setMode","mounted","$el","ownerDocument","channel","scriptSrc","beforeDestroy","remove","deactivated","_a","activated","render"],"mappings":"yHAAA,8CAOA,IAAIA,EAAY,WAAc,MAA0B,qBAAXC,OAAyBA,OAASC,GAC3EC,EAAa,WACb,IAAID,EAASF,IACb,OAAOE,GAAUA,EAAOE,QAAUF,EAAOE,QAAU,Q,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O2E,iBAChBT,EAAaL,KAAK8B,KAAK5D,QAAQkF,cAAeE,EAAWjB,EAAWP,SAG5EyB,cAAe,WACU,OAAjB,kBACA,iBAAaC,OAAO1B,KAAKvG,SAGjCkI,YAAa,WACT,IAAIC,EACC5B,KAAKY,eACNZ,KAAK7E,MAAQ6E,KAAKvG,OAAOkB,aACD,QAAvBiH,EAAK,wBAAiC,IAAPA,GAAyBA,EAAGF,OAAO1B,KAAKvG,UAGhFoI,UAAW,YACF7B,KAAKY,cAAgBZ,KAAK9E,aAC3BqF,EAAWP,KAAXO,IAGRuB,OAAQ,SAAU5B,GACd,OAAOF,KAAKY,aAAeX,EAAaC,EAAGF,KAAKW,UAAWX,KAAK3F,OAAOgC,SAAW+D,EAAaF,EAAGF,KAAKW,aCnFhG","file":"js/chunk-vendors~0b05e2c1.6a5ad08c.js","sourcesContent":["/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nvar getGlobal = function () { return (typeof window !== 'undefined' ? window : global); };\nvar getTinymce = function () {\n var global = getGlobal();\n return global && global.tinymce ? global.tinymce : null;\n};\nexport { getTinymce };\n","/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nvar validEvents = [\n 'onActivate',\n 'onAddUndo',\n 'onBeforeAddUndo',\n 'onBeforeExecCommand',\n 'onBeforeGetContent',\n 'onBeforeRenderUI',\n 'onBeforeSetContent',\n 'onBeforePaste',\n 'onBlur',\n 'onChange',\n 'onClearUndos',\n 'onClick',\n 'onContextMenu',\n 'onCopy',\n 'onCut',\n 'onDblclick',\n 'onDeactivate',\n 'onDirty',\n 'onDrag',\n 'onDragDrop',\n 'onDragEnd',\n 'onDragGesture',\n 'onDragOver',\n 'onDrop',\n 'onExecCommand',\n 'onFocus',\n 'onFocusIn',\n 'onFocusOut',\n 'onGetContent',\n 'onHide',\n 'onInit',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'onLoadContent',\n 'onMouseDown',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onNodeChange',\n 'onObjectResizeStart',\n 'onObjectResized',\n 'onObjectSelected',\n 'onPaste',\n 'onPostProcess',\n 'onPostRender',\n 'onPreProcess',\n 'onProgressState',\n 'onRedo',\n 'onRemove',\n 'onReset',\n 'onSaveContent',\n 'onSelectionChange',\n 'onSetAttrib',\n 'onSetContent',\n 'onShow',\n 'onSubmit',\n 'onUndo',\n 'onVisualAid'\n];\nvar isValidKey = function (key) { return validEvents.map(function (event) { return event.toLowerCase(); }).indexOf(key.toLowerCase()) !== -1; };\nvar bindHandlers = function (initEvent, listeners, editor) {\n Object.keys(listeners)\n .filter(isValidKey)\n .forEach(function (key) {\n var handler = listeners[key];\n if (typeof handler === 'function') {\n if (key === 'onInit') {\n handler(initEvent, editor);\n }\n else {\n editor.on(key.substring(2), function (e) { return handler(e, editor); });\n }\n }\n });\n};\nvar bindModelHandlers = function (ctx, editor) {\n var modelEvents = ctx.$props.modelEvents ? ctx.$props.modelEvents : null;\n var normalizedEvents = Array.isArray(modelEvents) ? modelEvents.join(' ') : modelEvents;\n editor.on(normalizedEvents ? normalizedEvents : 'change input undo redo', function () {\n ctx.$emit('input', editor.getContent({ format: ctx.$props.outputFormat }));\n });\n};\nvar initEditor = function (initEvent, ctx, editor) {\n var value = ctx.$props.value ? ctx.$props.value : '';\n var initialValue = ctx.$props.initialValue ? ctx.$props.initialValue : '';\n editor.setContent(value || (ctx.initialized ? ctx.cache : initialValue));\n // Always bind the value listener in case users use :value instead of v-model\n ctx.$watch('value', function (val, prevVal) {\n if (editor && typeof val === 'string' && val !== prevVal && val !== editor.getContent({ format: ctx.$props.outputFormat })) {\n editor.setContent(val);\n }\n });\n // checks if the v-model shorthand is used (which sets an v-on:input listener) and then binds either\n // specified the events or defaults to \"change keyup\" event and emits the editor content on that event\n if (ctx.$listeners.input) {\n bindModelHandlers(ctx, editor);\n }\n bindHandlers(initEvent, ctx.$listeners, editor);\n ctx.initialized = true;\n};\nvar unique = 0;\nvar uuid = function (prefix) {\n var time = Date.now();\n var random = Math.floor(Math.random() * 1000000000);\n unique++;\n return prefix + '_' + random + unique + String(time);\n};\nvar isTextarea = function (element) {\n return element !== null && element.tagName.toLowerCase() === 'textarea';\n};\nvar normalizePluginArray = function (plugins) {\n if (typeof plugins === 'undefined' || plugins === '') {\n return [];\n }\n return Array.isArray(plugins) ? plugins : plugins.split(' ');\n};\nvar mergePlugins = function (initPlugins, inputPlugins) {\n return normalizePluginArray(initPlugins).concat(normalizePluginArray(inputPlugins));\n};\nvar isNullOrUndefined = function (value) { return value === null || value === undefined; };\nexport { bindHandlers, bindModelHandlers, initEditor, isValidKey, uuid, isTextarea, mergePlugins, isNullOrUndefined };\n","/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nimport { uuid } from './Utils';\nvar createState = function () {\n return {\n listeners: [],\n scriptId: uuid('tiny-script'),\n scriptLoaded: false\n };\n};\nvar CreateScriptLoader = function () {\n var state = createState();\n var injectScriptTag = function (scriptId, doc, url, callback) {\n var scriptTag = doc.createElement('script');\n scriptTag.referrerPolicy = 'origin';\n scriptTag.type = 'application/javascript';\n scriptTag.id = scriptId;\n scriptTag.src = url;\n var handler = function () {\n scriptTag.removeEventListener('load', handler);\n callback();\n };\n scriptTag.addEventListener('load', handler);\n if (doc.head) {\n doc.head.appendChild(scriptTag);\n }\n };\n var load = function (doc, url, callback) {\n if (state.scriptLoaded) {\n callback();\n }\n else {\n state.listeners.push(callback);\n if (!doc.getElementById(state.scriptId)) {\n injectScriptTag(state.scriptId, doc, url, function () {\n state.listeners.forEach(function (fn) { return fn(); });\n state.scriptLoaded = true;\n });\n }\n }\n };\n // Only to be used by tests.\n var reinitialize = function () {\n state = createState();\n };\n return {\n load: load,\n reinitialize: reinitialize\n };\n};\nvar ScriptLoader = CreateScriptLoader();\nexport { ScriptLoader };\n","/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nexport var editorProps = {\n apiKey: String,\n cloudChannel: String,\n id: String,\n init: Object,\n initialValue: String,\n inline: Boolean,\n modelEvents: [String, Array],\n plugins: [String, Array],\n tagName: String,\n toolbar: [String, Array],\n value: String,\n disabled: Boolean,\n tinymceScriptSrc: String,\n outputFormat: {\n type: String,\n validator: function (prop) { return prop === 'html' || prop === 'text'; }\n },\n};\n","/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { ScriptLoader } from '../ScriptLoader';\nimport { getTinymce } from '../TinyMCE';\nimport { initEditor, isTextarea, mergePlugins, uuid, isNullOrUndefined } from '../Utils';\nimport { editorProps } from './EditorPropTypes';\nvar renderInline = function (h, id, tagName) {\n return h(tagName ? tagName : 'div', {\n attrs: { id: id }\n });\n};\nvar renderIframe = function (h, id) {\n return h('textarea', {\n attrs: { id: id },\n style: { visibility: 'hidden' }\n });\n};\nvar initialise = function (ctx) { return function () {\n var finalInit = __assign(__assign({}, ctx.$props.init), { readonly: ctx.$props.disabled, selector: \"#\" + ctx.elementId, plugins: mergePlugins(ctx.$props.init && ctx.$props.init.plugins, ctx.$props.plugins), toolbar: ctx.$props.toolbar || (ctx.$props.init && ctx.$props.init.toolbar), inline: ctx.inlineEditor, setup: function (editor) {\n ctx.editor = editor;\n editor.on('init', function (e) { return initEditor(e, ctx, editor); });\n if (ctx.$props.init && typeof ctx.$props.init.setup === 'function') {\n ctx.$props.init.setup(editor);\n }\n } });\n if (isTextarea(ctx.element)) {\n ctx.element.style.visibility = '';\n ctx.element.style.display = '';\n }\n getTinymce().init(finalInit);\n}; };\nexport var Editor = {\n props: editorProps,\n created: function () {\n this.elementId = this.$props.id || uuid('tiny-vue');\n this.inlineEditor = (this.$props.init && this.$props.init.inline) || this.$props.inline;\n this.initialized = false;\n },\n watch: {\n disabled: function () {\n this.editor.setMode(this.disabled ? 'readonly' : 'design');\n }\n },\n mounted: function () {\n this.element = this.$el;\n if (getTinymce() !== null) {\n initialise(this)();\n }\n else if (this.element && this.element.ownerDocument) {\n var channel = this.$props.cloudChannel ? this.$props.cloudChannel : '5';\n var apiKey = this.$props.apiKey ? this.$props.apiKey : 'no-api-key';\n var scriptSrc = isNullOrUndefined(this.$props.tinymceScriptSrc) ?\n \"https://cdn.tiny.cloud/1/\" + apiKey + \"/tinymce/\" + channel + \"/tinymce.min.js\" :\n this.$props.tinymceScriptSrc;\n ScriptLoader.load(this.element.ownerDocument, scriptSrc, initialise(this));\n }\n },\n beforeDestroy: function () {\n if (getTinymce() !== null) {\n getTinymce().remove(this.editor);\n }\n },\n deactivated: function () {\n var _a;\n if (!this.inlineEditor) {\n this.cache = this.editor.getContent();\n (_a = getTinymce()) === null || _a === void 0 ? void 0 : _a.remove(this.editor);\n }\n },\n activated: function () {\n if (!this.inlineEditor && this.initialized) {\n initialise(this)();\n }\n },\n render: function (h) {\n return this.inlineEditor ? renderInline(h, this.elementId, this.$props.tagName) : renderIframe(h, this.elementId);\n }\n};\n","/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nimport { Editor } from './components/Editor';\nexport default Editor;\n"],"sourceRoot":""}