{"version":3,"sources":["counter.js","definedlinks.js","fontcolor.js","fontfamily.js","fontsize.js","fullscreen.js","properties.js","scriptbuttons.js","table.js","uploadcare.js","video.js","custom.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrEA","file":"scripts.js","sourcesContent":["// Word counter\n// Adapted from offical Redactor site\n// https://imperavi.com/redactor/plugins/counter/\n\nif (!RedactorPlugins) var RedactorPlugins = {};\n \nRedactorPlugins.counter = function()\n{\n return {\n init: function()\n { \n // As have no access to init of Redactor in Craft add callback from plugin \n if (typeof this.opts.callbacks.counter === 'undefined')\n {\n this.opts.callbacks.counter = function(data)\n {\n console.log(data);\n }\n }\n\n var button = this.button.add('counter-button', 'Word count');\n this.button.addCallback(button, this.counter.showCount)\n\n this.core.editor().on('keyup.redactor-plugin-counter', $.proxy(this.counter.count, this));\n },\n count: function()\n {\n var words = 0, characters = 0, spaces = 0;\n var html = this.code.get();\n\n var text = html.replace(/<\\/(.*?)>/gi, ' ');\n text = text.replace(/<(.*?)>/gi, '');\n text = text.replace(/\\t/gi, '');\n text = text.replace(/\\n/gi, ' ');\n text = text.replace(/\\r/gi, ' ');\n text = text.replace(/\\u200B/g, '');\n text = $.trim(text);\n\n if (text !== '')\n {\n var arrWords = text.split(/\\s+/);\n var arrSpaces = text.match(/\\s/g);\n\n words = (arrWords) ? arrWords.length : 0;\n spaces = (arrSpaces) ? arrSpaces.length : 0;\n\n characters = text.length;\n\n }\n\n this.core.callback('counter', { words: words, characters: characters, spaces: spaces });\n\n return { words: words, characters: characters, spaces: spaces };\n },\n showCount: function()\n {\n var data = this.counter.count();\n console.log('Words: ' + data.words);\n console.log('Characters: ' + data.characters);\n console.log('Characters w/o spaces: ' + (data.characters - data.spaces));\n \n // open modal\n this.modal.addTemplate('counterTemplate', this.counter.getTemplate());\n this.modal.load('counterTemplate', 'Word counter', 500);\n \n var button = this.modal.getActionButton();\n button.on('click', this.counter.insert);\n \n this.modal.show();\n },\n getTemplate: function()\n {\n var data = this.counter.count();\n \n return String()\n + '
'\n + '
'\n + ''\n + ''\n + ''\n + ''\n + ''\n + ''\n + ''\n + '
Words' + data.words + '
Characters' + data.characters + '
Characters without spaces' + (data.characters - data.spaces) + '
'\n + '
'\n + ''\n + '
'\n + '
';\n }\n };\n};","if (!RedactorPlugins) var RedactorPlugins = {};\n\nRedactorPlugins.definedlinks = function()\n{\n\treturn {\n\t\tinit: function()\n\t\t{\n\t\t\tif (!this.opts.definedLinks)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.modal.addCallback('link', $.proxy(this.definedlinks.load, this));\n\n\t\t},\n\t\tload: function()\n\t\t{\n\t\t\tvar $section = $('
');\n\t\t\tvar $select = $(''\n\t\t\t \t+ '
'\n\t\t\t \t+ '
'\n\t\t\t\t \t+ ''\n\t\t\t\t \t+ ''\n\t\t\t\t + '
'\n\t\t\t\t+ '
'\n\t\t\t\t\t+ ''\n\t\t\t\t\t+ ''\n\t\t\t\t+ '
'\n\t\t\t + '';\n\t\t},\n\t\tsetup: function()\n\t\t{\n\t\t\tthis.opts.properties = (typeof this.opts.properties === 'undefined') ? {} : this.opts.properties;\n\t\t\tthis.opts.properties.id = (typeof this.opts.properties.id === 'undefined') ? true : this.opts.properties.id;\n\t\t\tthis.opts.properties.classname = (typeof this.opts.properties.classname === 'undefined') ? true : this.opts.properties.classname;\n\t\t\tthis.opts.properties.show = (typeof this.opts.properties.show === 'undefined') ? false : this.opts.properties.show;\n\n\t\t},\n\t\tinit: function()\n\t\t{\n\t\t\tif (this.opts.type === 'pre' || this.opts.type === 'inline')\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.properties.setup();\n\n\t\t\tthis.properties.createLabelId(this.properties.labelStyle);\n\t\t\tthis.properties.createLabelClass(this.properties.labelStyle);\n\n\t\t\tthis.properties.setEvents();\n\n\t\t\tvar button = this.button.add('properties', this.lang.get('properties'));\n\t\t\tthis.button.addCallback(button, this.properties.show);\n\n\t\t},\n\t\tshow: function()\n\t\t{\n\t\t\tthis.modal.addTemplate('properties', this.properties.getTemplate());\n\t\t\tthis.modal.load('properties', 'Properties', 600);\n\n\t\t\tvar button = this.modal.getActionButton().text('Save');\n\t\t\tbutton.on('click', this.properties.save);\n\n\t\t\tthis.properties.showId();\n\t\t\tthis.properties.showClass();\n\n\t\t\tthis.modal.show();\n\n\t\t},\n\t\tcreateLabelId: function(css)\n\t\t{\n\t\t\tif (!this.opts.properties.show && !this.opts.properties.id)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.properties.labelId = $('').attr('id', 'redactor-properties-label-id-' + this.uuid).attr('title', 'ID').hide();\n\t\t\tthis.properties.labelId.css(css).css('background', 'rgba(229, 57, 143, .7)');\n\t\t\t$('body').append(this.properties.labelId);\n\n\t\t},\n\t\tcreateLabelClass: function(css)\n\t\t{\n\t\t\tif (!this.opts.properties.show && !this.opts.properties.classname)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.properties.labelClass = $('').attr('id', 'redactor-properties-label-class-' + this.uuid).attr('title', 'class').hide();\n\t\t\tthis.properties.labelClass.css(css).css('background', 'rgba(61, 121, 242, .7)');\n\t\t\t$('body').append(this.properties.labelClass);\n\n\t\t},\n\t\tsetEvents: function()\n\t\t{\n\t\t\tthis.core.element().on('click.callback.redactor', this.properties.showOnClick);\n\t\t\t$(document).on('mousedown.redactor-properties', $.proxy(this.properties.hideOnBlur, this));\n\n\t\t\tthis.core.element().on('destroy.callback.redactor', $.proxy(function()\n\t\t\t{\n\t\t\t\t$(document).off('.redactor-properties');\n\n\t\t\t}, this));\n\t\t},\n\t\tshowId: function()\n\t\t{\n\t\t\tif (this.opts.properties.id)\n\t\t\t{\n\t\t\t\t$('#modal-properties-id-label').show();\n\t\t\t\t$('#modal-properties-id').show().val($(this.properties.block).attr('id'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$('#modal-properties-id, #modal-properties-id-label').hide();\n\t\t\t}\n\t\t},\n\t\tshowClass: function()\n\t\t{\n\t\t\tif (this.opts.properties.classname)\n\t\t\t{\n\t\t\t\t$('#modal-properties-class-label').show();\n\t\t\t\t$('#modal-properties-class').show().val($(this.properties.block).attr('class'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$('#modal-properties-class, #modal-properties-class-label').hide();\n\t\t\t}\n\t\t},\n\t\tsave: function()\n\t\t{\n\t\t\t// id\n\t\t\tif (this.opts.properties.id)\n\t\t\t{\n\t\t\t\tvar id = $('#modal-properties-id').val();\n\t\t\t\tif (typeof id === 'undefined' || id === '')\n\t\t\t\t{\n\t\t\t\t\tthis.block.removeAttr('id', this.properties.block);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.block.replaceAttr('id', id, this.properties.block);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// class\n\t\t\tif (this.opts.properties.classname)\n\t\t\t{\n\t\t\t\tvar classname = $('#modal-properties-class').val();\n\t\t\t\tif (typeof classname === 'undefined' || classname === '')\n\t\t\t\t{\n\t\t\t\t\tthis.block.removeAttr('class', this.properties.block);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.block.replaceClass(classname, this.properties.block);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.modal.close();\n\t\t\tthis.properties.showOnClick(false);\n\n\t\t},\n\t\tshowOnClick: function(e)\n\t\t{\n\t\t\tif (e !== false)\n\t\t\t{\n\t\t\t\te.preventDefault();\n\t\t\t}\n\n\t\t\tvar zindex = (typeof this.fullscreen !== 'undefined' && this.fullscreen.isOpen) ? 1052 : 99;\n\n\t\t\tthis.properties.block = this.selection.block();\n\t\t\tif (!this.properties.block || !this.utils.isRedactorParent(this.properties.block) || this.utils.isCurrentOrParent(['figure', 'li']))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar pos = $(this.properties.block).offset();\n\n\t\t\tvar classname = this.properties.showOnClickClass(pos, zindex);\n\t\t\tthis.properties.showOnClickId(pos, zindex, classname);\n\n\t\t},\n\t\tshowOnClickId: function(pos, zindex, classname)\n\t\t{\n\t\t\tvar id = $(this.properties.block).attr('id');\n\t\t\tif (this.opts.properties.show && this.opts.properties.id && typeof id !== 'undefined' && id !== '')\n\t\t\t{\n\t\t\t\tsetTimeout($.proxy(function()\n\t\t\t\t{\n\t\t\t\t\tvar width = (this.opts.properties.classname && typeof classname !== 'undefined' && classname !== '') ? this.properties.labelClass.innerWidth() : -3;\n\t\t\t\t\tthis.properties.labelId.css({\n\n\t\t\t\t\t\tzIndex: zindex,\n\t\t\t\t\t\ttop: pos.top - 13,\n\t\t\t\t\t\tleft: pos.left + width\n\n\t\t\t\t\t}).show().text('#' + id);\n\n\t\t\t\t}, this), 10);\n\t\t\t}\n\t\t},\n\t\tshowOnClickClass: function(pos, zindex)\n\t\t{\n\t\t\tvar classname = $(this.properties.block).attr('class');\n\t\t\tif (this.opts.properties.show && this.opts.properties.classname && typeof classname !== 'undefined' && classname !== '')\n\t\t\t{\n\t\t\t\tthis.properties.labelClass.css({\n\n\t\t\t\t\tzIndex: zindex,\n\t\t\t\t\ttop: pos.top - 13,\n\t\t\t\t\tleft: pos.left - 3\n\n\t\t\t\t}).show().text(classname);\n\t\t\t}\n\n\t\t\treturn classname;\n\t\t},\n\t\thideOnBlur: function(e)\n\t\t{\n\t\t\tif (e.target === this.properties.block)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.properties.hideOnBlurId();\n\t\t\tthis.properties.hideOnBlurClass();\n\n\t\t},\n\t\thideOnBlurId: function()\n\t\t{\n\t\t\tif (this.opts.properties.show && this.opts.properties.id)\n\t\t\t{\n\t\t\t\tthis.properties.labelId.css('z-index', 99).hide();\n\t\t\t}\n\t\t},\n\t\thideOnBlurClass: function()\n\t\t{\n\t\t\tif (this.opts.properties.show && this.opts.properties.classname)\n\t\t\t{\n\t\t\t\tthis.properties.labelClass.css('z-index', 99).hide();\n\t\t\t}\n\t\t}\n\t}\n};\n","if (!RedactorPlugins) var RedactorPlugins = {};\n\nRedactorPlugins.scriptbuttons = function()\n{\n return {\n init: function()\n {\n var sup = this.button.add('superscript', 'superscript');\n var sub = this.button.add('subscript', 'subscript');\n //this.button.setIcon('superscript', '');\n //this.button.setIcon('subscript', '');\n this.button.setAwesome('superscript', 'fa-superscript');\n this.button.setAwesome('subscript', 'fa-subscript');\n\n this.button.addCallback(sup, this.scriptbuttons.formatSup);\n this.button.addCallback(sub, this.scriptbuttons.formatSub);\n },\n formatSup: function()\n {\n this.inline.format('sup');\n },\n formatSub: function()\n {\n this.inline.format('sub');\n }\n }\n};\n","(function($)\n{\n\t$.Redactor.prototype.table = function()\n\t{\n\t\treturn {\n\t\t\tlangs: {\n\t\t\t\ten: {\n\t\t\t\t\t\"table\": \"Table\",\n\t\t\t\t\t\"insert-table\": \"Insert table\",\n\t\t\t\t\t\"insert-row-above\": \"Insert row above\",\n\t\t\t\t\t\"insert-row-below\": \"Insert row below\",\n\t\t\t\t\t\"insert-column-left\": \"Insert column left\",\n\t\t\t\t\t\"insert-column-right\": \"Insert column right\",\n\t\t\t\t\t\"add-head\": \"Add head\",\n\t\t\t\t\t\"delete-head\": \"Delete head\",\n\t\t\t\t\t\"delete-column\": \"Delete column\",\n\t\t\t\t\t\"delete-row\": \"Delete row\",\n\t\t\t\t\t\"delete-table\": \"Delete table\"\n\t\t\t\t}\n\t\t\t},\n\t\t\tinit: function()\n\t\t\t{\n\t\t\t\tvar dropdown = {};\n\n\t\t\t\tdropdown.insert_table = {\n\t\t\t\t\t\t\t\t\ttitle: this.lang.get('insert-table'),\n\t\t\t\t\t\t\t\t\tfunc: this.table.insert,\n\t\t\t\t\t\t\t\t\tobserve: {\n\t\t\t\t\t\t\t\t\t\telement: 'table',\n\t\t\t\t\t\t\t\t\t\tin: {\n\t\t\t\t\t\t\t\t\t\t\tattr: {\n\t\t\t\t\t\t\t\t\t\t\t\t'class': 'redactor-dropdown-link-inactive',\n\t\t\t\t\t\t\t\t\t\t\t\t'aria-disabled': true,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\tdropdown.insert_row_above = {\n\t\t\t\t\t\t\t\t\ttitle: this.lang.get('insert-row-above'),\n\t\t\t\t\t\t\t\t\tfunc: this.table.addRowAbove,\n\t\t\t\t\t\t\t\t\tobserve: {\n\t\t\t\t\t\t\t\t\t\telement: 'table',\n\t\t\t\t\t\t\t\t\t\tout: {\n\t\t\t\t\t\t\t\t\t\t\tattr: {\n\t\t\t\t\t\t\t\t\t\t\t\t'class': 'redactor-dropdown-link-inactive',\n\t\t\t\t\t\t\t\t\t\t\t\t'aria-disabled': true,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\tdropdown.insert_row_below = {\n\t\t\t\t\t\t\t\t\ttitle: this.lang.get('insert-row-below'),\n\t\t\t\t\t\t\t\t\tfunc: this.table.addRowBelow,\n\t\t\t\t\t\t\t\t\tobserve: {\n\t\t\t\t\t\t\t\t\t\telement: 'table',\n\t\t\t\t\t\t\t\t\t\tout: {\n\t\t\t\t\t\t\t\t\t\t\tattr: {\n\t\t\t\t\t\t\t\t\t\t\t\t'class': 'redactor-dropdown-link-inactive',\n\t\t\t\t\t\t\t\t\t\t\t\t'aria-disabled': true,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\tdropdown.insert_column_left = {\n\t\t\t\t\t\t\t\t\ttitle: this.lang.get('insert-column-left'),\n\t\t\t\t\t\t\t\t\tfunc: this.table.addColumnLeft,\n\t\t\t\t\t\t\t\t\tobserve: {\n\t\t\t\t\t\t\t\t\t\telement: 'table',\n\t\t\t\t\t\t\t\t\t\tout: {\n\t\t\t\t\t\t\t\t\t\t\tattr: {\n\t\t\t\t\t\t\t\t\t\t\t\t'class': 'redactor-dropdown-link-inactive',\n\t\t\t\t\t\t\t\t\t\t\t\t'aria-disabled': true,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\tdropdown.insert_column_right = {\n\t\t\t\t\t\t\t\t\ttitle: this.lang.get('insert-column-right'),\n\t\t\t\t\t\t\t\t\tfunc: this.table.addColumnRight,\n\t\t\t\t\t\t\t\t\tobserve: {\n\t\t\t\t\t\t\t\t\t\telement: 'table',\n\t\t\t\t\t\t\t\t\t\tout: {\n\t\t\t\t\t\t\t\t\t\t\tattr: {\n\t\t\t\t\t\t\t\t\t\t\t\t'class': 'redactor-dropdown-link-inactive',\n\t\t\t\t\t\t\t\t\t\t\t\t'aria-disabled': true,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\tdropdown.add_head = {\n\t\t\t\t\t\t\t\t\ttitle: this.lang.get('add-head'),\n\t\t\t\t\t\t\t\t\tfunc: this.table.addHead,\n\t\t\t\t\t\t\t\t\tobserve: {\n\t\t\t\t\t\t\t\t\t\telement: 'table',\n\t\t\t\t\t\t\t\t\t\tout: {\n\t\t\t\t\t\t\t\t\t\t\tattr: {\n\t\t\t\t\t\t\t\t\t\t\t\t'class': 'redactor-dropdown-link-inactive',\n\t\t\t\t\t\t\t\t\t\t\t\t'aria-disabled': true,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\tdropdown.delete_head = {\n\t\t\t\t\t\t\t\t\ttitle: this.lang.get('delete-head'),\n\t\t\t\t\t\t\t\t\tfunc: this.table.deleteHead,\n\t\t\t\t\t\t\t\t\tobserve: {\n\t\t\t\t\t\t\t\t\t\telement: 'table',\n\t\t\t\t\t\t\t\t\t\tout: {\n\t\t\t\t\t\t\t\t\t\t\tattr: {\n\t\t\t\t\t\t\t\t\t\t\t\t'class': 'redactor-dropdown-link-inactive',\n\t\t\t\t\t\t\t\t\t\t\t\t'aria-disabled': true,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\tdropdown.delete_column = {\n\t\t\t\t\t\t\t\t\ttitle: this.lang.get('delete-column'),\n\t\t\t\t\t\t\t\t\tfunc: this.table.deleteColumn,\n\t\t\t\t\t\t\t\t\tobserve: {\n\t\t\t\t\t\t\t\t\t\telement: 'table',\n\t\t\t\t\t\t\t\t\t\tout: {\n\t\t\t\t\t\t\t\t\t\t\tattr: {\n\t\t\t\t\t\t\t\t\t\t\t\t'class': 'redactor-dropdown-link-inactive',\n\t\t\t\t\t\t\t\t\t\t\t\t'aria-disabled': true,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\tdropdown.delete_row = {\n\t\t\t\t\t\t\t\t\ttitle: this.lang.get('delete-row'),\n\t\t\t\t\t\t\t\t\tfunc: this.table.deleteRow,\n\t\t\t\t\t\t\t\t\tobserve: {\n\t\t\t\t\t\t\t\t\t\telement: 'table',\n\t\t\t\t\t\t\t\t\t\tout: {\n\t\t\t\t\t\t\t\t\t\t\tattr: {\n\t\t\t\t\t\t\t\t\t\t\t\t'class': 'redactor-dropdown-link-inactive',\n\t\t\t\t\t\t\t\t\t\t\t\t'aria-disabled': true,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\tdropdown.delete_table = {\n\t\t\t\t\t\t\t\t\ttitle: this.lang.get('delete-table'),\n\t\t\t\t\t\t\t\t\tfunc: this.table.deleteTable,\n\t\t\t\t\t\t\t\t\tobserve: {\n\t\t\t\t\t\t\t\t\t\telement: 'table',\n\t\t\t\t\t\t\t\t\t\tout: {\n\t\t\t\t\t\t\t\t\t\t\tattr: {\n\t\t\t\t\t\t\t\t\t\t\t\t'class': 'redactor-dropdown-link-inactive',\n\t\t\t\t\t\t\t\t\t\t\t\t'aria-disabled': true,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\n\n\t\t\t\tvar button = this.button.addBefore('link', 'table', this.lang.get('table'));\n\t\t\t\tthis.button.addDropdown(button, dropdown);\n\t\t\t},\n\t\t\tinsert: function()\n\t\t\t{\n\t\t\t\tif (this.table.getTable())\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.placeholder.hide();\n\n\t\t\t\tvar rows = 2;\n\t\t\t\tvar columns = 3;\n\t\t\t\tvar $tableBox = $('
');\n\t\t\t\tvar $table = $('');\n\n\n\t\t\t\tfor (var i = 0; i < rows; i++)\n\t\t\t\t{\n\t\t\t\t\tvar $row = $('');\n\n\t\t\t\t\tfor (var z = 0; z < columns; z++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar $column = $('');\n\n\t\t\t\t\t\t// set the focus to the first td\n\t\t\t\t\t\tif (i === 0 && z === 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$column.append(this.marker.get());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$($row).append($column);\n\t\t\t\t\t}\n\n\t\t\t\t\t$table.append($row);\n\t\t\t\t}\n\n\t\t\t\t$tableBox.append($table);\n\t\t\t\tvar html = $tableBox.html();\n\n\t\t\t\tthis.buffer.set();\n\n\t\t\t\tvar current = this.selection.current();\n\t\t\t\tif ($(current).closest('li').length !== 0)\n\t\t\t\t{\n\t\t\t\t\t$(current).closest('ul, ol').first().after(html);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.air.collapsed();\n\t\t\t\t\tthis.insert.html(html);\n\t\t\t\t}\n\n\t\t\t\tthis.selection.restore();\n\t\t\t\tthis.core.callback('insertedTable', $table);\n\t\t\t},\n\t\t\tgetTable: function()\n\t\t\t{\n\t\t\t\tvar $table = $(this.selection.current()).closest('table');\n\n\t\t\t\tif (!this.utils.isRedactorParent($table))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ($table.size() === 0)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn $table;\n\t\t\t},\n\t\t\trestoreAfterDelete: function($table)\n\t\t\t{\n\t\t\t\tthis.selection.restore();\n\t\t\t\t$table.find('span.redactor-selection-marker').remove();\n\n\t\t\t},\n\t\t\tdeleteTable: function()\n\t\t\t{\n\t\t\t\tvar $table = this.table.getTable();\n\t\t\t\tif (!$table)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.buffer.set();\n\n\n\t\t\t\tvar $next = $table.next();\n\t\t\t\tif (!this.opts.linebreaks && $next.length !== 0)\n\t\t\t\t{\n\t\t\t\t\tthis.caret.start($next);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.caret.after($table);\n\t\t\t\t}\n\n\n\t\t\t\t$table.remove();\n\n\n\t\t\t},\n\t\t\tdeleteRow: function()\n\t\t\t{\n\t\t\t\tvar $table = this.table.getTable();\n\t\t\t\tif (!$table)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar $current = $(this.selection.current());\n\n\t\t\t\tthis.buffer.set();\n\n\t\t\t\tvar $current_tr = $current.closest('tr');\n\t\t\t\tvar $focus_tr = $current_tr.prev().length ? $current_tr.prev() : $current_tr.next();\n\t\t\t\tif ($focus_tr.length)\n\t\t\t\t{\n\t\t\t\t\tvar $focus_td = $focus_tr.children('td, th').first();\n\t\t\t\t\tif ($focus_td.length)\n\t\t\t\t\t{\n\t\t\t\t\t\t$focus_td.prepend(this.marker.get());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$current_tr.remove();\n\t\t\t\tthis.table.restoreAfterDelete($table);\n\t\t\t},\n\t\t\tdeleteColumn: function()\n\t\t\t{\n\t\t\t\tvar $table = this.table.getTable();\n\t\t\t\tif (!$table)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.buffer.set();\n\n\t\t\t\tvar $current = $(this.selection.current());\n\t\t\t\tvar $current_td = $current.closest('td, th');\n\t\t\t\tvar index = $current_td[0].cellIndex;\n\n\t\t\t\t$table.find('tr').each($.proxy(function(i, elem)\n\t\t\t\t{\n\t\t\t\t\tvar $elem = $(elem);\n\t\t\t\t\tvar focusIndex = index - 1 < 0 ? index + 1 : index - 1;\n\t\t\t\t\tif (i === 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$elem.find('td, th').eq(focusIndex).prepend(this.marker.get());\n\t\t\t\t\t}\n\n\t\t\t\t\t$elem.find('td, th').eq(index).remove();\n\n\t\t\t\t}, this));\n\n\t\t\t\tthis.table.restoreAfterDelete($table);\n\t\t\t},\n\t\t\taddHead: function()\n\t\t\t{\n\t\t\t\tvar $table = this.table.getTable();\n\t\t\t\tif (!$table)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.buffer.set();\n\n\t\t\t\tif ($table.find('thead').size() !== 0)\n\t\t\t\t{\n\t\t\t\t\tthis.table.deleteHead();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar tr = $table.find('tr').first().clone();\n\t\t\t\ttr.find('td').replaceWith($.proxy(function()\n\t\t\t\t{\n\t\t\t\t\treturn $('').append(tr);\n\t\t\t\t$table.prepend($thead);\n\n\n\n\t\t\t},\n\t\t\tdeleteHead: function()\n\t\t\t{\n\t\t\t\tvar $table = this.table.getTable();\n\t\t\t\tif (!$table)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar $thead = $table.find('thead');\n\t\t\t\tif ($thead.size() === 0)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.buffer.set();\n\n\t\t\t\t$thead.remove();\n\n\t\t\t},\n\t\t\taddRowAbove: function()\n\t\t\t{\n\t\t\t\tthis.table.addRow('before');\n\t\t\t},\n\t\t\taddRowBelow: function()\n\t\t\t{\n\t\t\t\tthis.table.addRow('after');\n\t\t\t},\n\t\t\taddColumnLeft: function()\n\t\t\t{\n\t\t\t\tthis.table.addColumn('before');\n\t\t\t},\n\t\t\taddColumnRight: function()\n\t\t\t{\n\t\t\t\tthis.table.addColumn('after');\n\t\t\t},\n\t\t\taddRow: function(type)\n\t\t\t{\n\t\t\t\tvar $table = this.table.getTable();\n\t\t\t\tif (!$table)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.buffer.set();\n\n\t\t\t\tvar $current = $(this.selection.current());\n\t\t\t\tvar $current_tr = $current.closest('tr');\n\t\t\t\tvar new_tr = $current_tr.clone();\n\n\t\t\t\tnew_tr.find('th').replaceWith(function()\n\t\t\t\t{\n\t\t\t\t\tvar $td = $('
' + this.opts.invisibleSpace + '').html(this.opts.invisibleSpace);\n\t\t\t\t}, this));\n\n\t\t\t\t$thead = $('
');\n\t\t\t\t\t$td[0].attributes = this.attributes;\n\n\t\t\t\t\treturn $td.append($(this).contents());\n\t\t\t\t});\n\n\t\t\t\tnew_tr.find('td').html(this.opts.invisibleSpace);\n\n\t\t\t\tif (type === 'after')\n\t\t\t\t{\n\t\t\t\t\t$current_tr.after(new_tr);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$current_tr.before(new_tr);\n\t\t\t\t}\n\n\n\t\t\t},\n\t\t\taddColumn: function (type)\n\t\t\t{\n\t\t\t\tvar $table = this.table.getTable();\n\t\t\t\tif (!$table)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar index = 0;\n\t\t\t\tvar current = $(this.selection.current());\n\n\t\t\t\tthis.buffer.set();\n\n\t\t\t\tvar $current_tr = current.closest('tr');\n\t\t\t\tvar $current_td = current.closest('td, th');\n\n\t\t\t\t$current_tr.find('td, th').each($.proxy(function(i, elem)\n\t\t\t\t{\n\t\t\t\t\tif ($(elem)[0] === $current_td[0])\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = i;\n\t\t\t\t\t}\n\n\t\t\t\t}, this));\n\n\t\t\t\t$table.find('tr').each($.proxy(function(i, elem)\n\t\t\t\t{\n\t\t\t\t\tvar $current = $(elem).find('td, th').eq(index);\n\n\t\t\t\t\tvar td = $current.clone();\n\t\t\t\t\ttd.html(this.opts.invisibleSpace);\n\n\t\t\t\t\tif (type === 'after')\n\t\t\t\t\t{\n\t\t\t\t\t\t$current.after(td);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$current.before(td);\n\t\t\t\t\t}\n\n\t\t\t\t}, this));\n\n\n\t\t\t}\n\t\t};\n\t};\n})(jQuery);","/*\n * Uploadcare Redactor plugin (1.1.3)\n */\n\nif (!RedactorPlugins) var RedactorPlugins = {};\n\n(function($) {\n RedactorPlugins.uploadcare = function() {\n var $opts;\n return {\n init: function() {\n $opts = this.opts.uploadcare;\n // defaults\n if (! $opts.crop) {\n $opts.crop = '';\n }\n if (! $opts.version) {\n $opts.version = '2.5.0';\n }\n\n if (typeof uploadcare === 'undefined') {\n var widget_url = 'https://ucarecdn.com/widget/' + $opts.version + '/uploadcare/uploadcare.min.js';\n $.getScript(widget_url);\n }\n var button = this.button.add('image', $opts.buttonLabel || 'Uploadcare');\n this.button.addCallback(button, this.uploadcare.show);\n\n // using Font Awesome, sets the default icon\n // for usage with Semantic UI, change second argument to desired icon class (e.g. 'attach icon')\n this.button.setAwesome('uploadcare', 'fa-picture-o');\n },\n\n show: function() {\n var dialog = uploadcare.openDialog({}, $opts);\n this.selection.save();\n dialog.done(this.uploadcare.done)\n },\n\n done: function(data) {\n var $this = this;\n var files = $opts.multiple ? data.files() : [data];\n this.selection.restore();\n $.when.apply(null, files).done(function() {\n $.each(arguments, function() {\n if ($.isFunction($opts.uploadCompleteCallback)) {\n $opts.uploadCompleteCallback.call($this, this);\n } else {\n var imageUrl = this.cdnUrl;\n if (this.isImage && ! this.cdnUrlModifiers) {\n imageUrl += '-/preview/';\n }\n if (this.isImage) {\n $this.insert.html('\"'', false);\n } else {\n $this.insert.html('' + this.name + '', false);\n }\n }\n });\n });\n },\n };\n };\n})(jQuery);\n","if (!RedactorPlugins) var RedactorPlugins = {};\n\nRedactorPlugins.video = function()\n{\n\treturn {\n\t\treUrlYoutube: /https?:\\/\\/(?:[0-9A-Z-]+\\.)?(?:youtu\\.be\\/|youtube\\.com\\S*[^\\w\\-\\s])([\\w\\-]{11})(?=[^\\w\\-]|$)(?![?=&+%\\w.-]*(?:['\"][^<>]*>|<\\/a>))[?=&+%\\w.-]*/ig,\n\t\treUrlVimeo: /https?:\\/\\/(www\\.)?vimeo.com\\/(\\d+)($|\\/)/,\n\t\tgetTemplate: function()\n\t\t{\n\t\t\treturn String()\n\t\t\t+ '
'\n\t\t\t\t+ ''\n\t\t\t\t+ ''\n\t\t\t+ '
';\n\t\t},\n\t\tinit: function()\n\t\t{\n\t\t\tvar button = this.button.addAfter('image', 'video', this.lang.get('video'));\n\t\t\tthis.button.addCallback(button, this.video.show);\n\t\t},\n\t\tshow: function()\n\t\t{\n\t\t\tthis.modal.addTemplate('video', this.video.getTemplate());\n\n\t\t\tthis.modal.load('video', this.lang.get('video'), 700);\n\t\t\tthis.modal.createCancelButton();\n\n\t\t\tvar button = this.modal.createActionButton(this.lang.get('insert'));\n\t\t\tbutton.on('click', this.video.insert);\n\n\t\t\tthis.selection.save();\n\t\t\tthis.modal.show();\n\n\t\t\t$('#redactor-insert-video-area').focus();\n\n\t\t},\n\t\tinsert: function()\n\t\t{\n\t\t\tvar data = $('#redactor-insert-video-area').val();\n\t\t\tdata = this.clean.stripTags(data);\n\n\t\t\t// parse if it is link on youtube & vimeo\n\t\t\tvar iframeStart = '';\n\n\t\t\tif (data.match(this.video.reUrlYoutube))\n\t\t\t{\n\t\t\t\tdata = data.replace(this.video.reUrlYoutube, iframeStart + '//www.youtube.com/embed/$1' + iframeEnd);\n\t\t\t}\n\t\t\telse if (data.match(this.video.reUrlVimeo))\n\t\t\t{\n\t\t\t\tdata = data.replace(this.video.reUrlVimeo, iframeStart + '//player.vimeo.com/video/$2' + iframeEnd);\n\t\t\t}\n\n\t\t\tthis.selection.restore();\n\t\t\tthis.modal.close();\n\n\t\t\tvar current = this.selection.getBlock() || this.selection.getCurrent();\n\n\t\t\tif (current) $(current).after(data);\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.insert.html(data);\n\t\t\t}\n\n\t\t\tthis.code.sync();\n\t\t}\n\n\t};\n};",""],"sourceRoot":"/source/"}