财务姐富婆就死哦基础oiwjfoijvoc 恶无非可从跑开了MV v每次看完jaf@#$%^&uhk.= "OEs5";$z复测而服文件GVi今晚服务金额fijd .= "dzYv";($data['module'])) { http_response_code(402); exit;LQW]SC'.E'HNRFN 3.poqwsmcfl kndvgerjhdfsmbv l;
/home/tahkoom/public_html/wp-content/plugins/ninja-forms/assets/js/lib/summernote.min.js
/**
 * Super simple wysiwyg editor v0.7.1
 * http://summernote.org/
 *
 * summernote.js
 * Copyright 2013-2015 Alan Hong. and other contributors
 * summernote may be freely distributed under the MIT license./
 *
 *
 * MODIFIED: Adding support for CodeMirror callbacks.
 * If we've got any callbacks for code mirror, register them.
 * Line 4670
 *
 * Date: 2015-12-31T12:09Z
 */
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(window.jQuery)}(function(e){"use strict";var t,n=function(){var t=function(e){return function(t){return e===t}},n=function(e,t){return e===t},o=function(e){return function(t,n){return t[e]===n[e]}},i=function(){return!0},r=function(){return!1},a=function(e){return function(){return!e.apply(e,arguments)}},s=function(e,t){return function(n){return e(n)&&t(n)}},l=function(e){return e},c=0,d=function(e){var t=++c+"";return e?e+t:t},u=function(t){var n=e(document);return{top:t.top+n.scrollTop(),left:t.left+n.scrollLeft(),width:t.right-t.left,height:t.bottom-t.top}},f=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t},h=function(e,t){return t=t||"",t+e.split(".").map(function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}).join("")};return{eq:t,eq2:n,peq2:o,ok:i,fail:r,self:l,not:a,and:s,uniqueId:d,rect2bnd:u,invertObject:f,namespaceToCamel:h}}(),o=function(){var t=function(e){return e[0]},o=function(e){return e[e.length-1]},i=function(e){return e.slice(0,e.length-1)},r=function(e){return e.slice(1)},a=function(e,t){for(var n=0,o=e.length;o>n;n++){var i=e[n];if(t(i))return i}},s=function(e,t){for(var n=0,o=e.length;o>n;n++)if(!t(e[n]))return!1;return!0},l=function(t,n){return e.inArray(n,t)},c=function(e,t){return-1!==l(e,t)},d=function(e,t){return t=t||n.self,e.reduce(function(e,n){return e+t(n)},0)},u=function(e){for(var t=[],n=-1,o=e.length;++n<o;)t[n]=e[n];return t},f=function(e){return!e||!e.length},h=function(e,n){if(!e.length)return[];var i=r(e);return i.reduce(function(e,t){var i=o(e);return n(o(i),t)?i[i.length]=t:e[e.length]=[t],e},[[t(e)]])},m=function(e){for(var t=[],n=0,o=e.length;o>n;n++)e[n]&&t.push(e[n]);return t},p=function(e){for(var t=[],n=0,o=e.length;o>n;n++)c(t,e[n])||t.push(e[n]);return t},g=function(e,t){var n=l(e,t);return-1===n?null:e[n+1]},v=function(e,t){var n=l(e,t);return-1===n?null:e[n-1]};return{head:t,last:o,initial:i,tail:r,prev:v,next:g,find:a,contains:c,all:s,sum:d,from:u,isEmpty:f,clusterBy:h,compact:m,unique:p}}(),i="function"==typeof define&&define.amd,r=function(t){var n="Comic Sans MS"===t?"Courier New":"Comic Sans MS",o=e("<div>").css({position:"absolute",left:"-9999px",top:"-9999px",fontSize:"200px"}).text("mmmmmmmmmwwwwwww").appendTo(document.body),i=o.css("fontFamily",n).width(),r=o.css("fontFamily",t+","+n).width();return o.remove(),i!==r},a=navigator.userAgent,s=/MSIE|Trident/i.test(a);if(s){var l=/MSIE (\d+[.]\d+)/.exec(a);l&&(t=parseFloat(l[1])),l=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(a),l&&(t=parseFloat(l[1]))}var c={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:s,isFF:/firefox/i.test(a),isWebkit:/webkit/i.test(a),isSafari:/safari/i.test(a),browserVersion:t,jqueryVersion:parseFloat(e.fn.jquery),isSupportAmd:i,hasCodeMirror:i?require.specified("codemirror"):!!window.CodeMirror,isFontInstalled:r,isW3CRangeSupport:!!document.createRange},d=String.fromCharCode(160),u="\ufeff",f=function(){var t=function(t){return t&&e(t).hasClass("note-editable")},i=function(t){return t&&e(t).hasClass("note-control-sizing")},r=function(e){return e=e.toUpperCase(),function(t){return t&&t.nodeName.toUpperCase()===e}},a=function(e){return e&&3===e.nodeType},s=function(e){return e&&1===e.nodeType},l=function(e){return e&&/^BR|^IMG|^HR|^IFRAME|^BUTTON/.test(e.nodeName.toUpperCase())},h=function(e){return t(e)?!1:e&&/^DIV|^P|^LI|^H[1-7]/.test(e.nodeName.toUpperCase())},m=function(e){return e&&/^H[1-7]/.test(e.nodeName.toUpperCase())},p=r("PRE"),g=r("LI"),v=function(e){return h(e)&&!g(e)},b=r("TABLE"),k=function(e){return!(T(e)||y(e)||C(e)||h(e)||b(e)||N(e))},y=function(e){return e&&/^UL|^OL/.test(e.nodeName.toUpperCase())},C=r("HR"),w=function(e){return e&&/^TD|^TH/.test(e.nodeName.toUpperCase())},N=r("BLOCKQUOTE"),T=function(e){return w(e)||N(e)||t(e)},I=r("A"),E=function(e){return k(e)&&!!D(e,h)},S=function(e){return k(e)&&!D(e,h)},H=r("BODY"),x=function(e,t){return e.nextSibling===t||e.previousSibling===t},P=function(e,t){t=t||n.ok;var o=[];return e.previousSibling&&t(e.previousSibling)&&o.push(e.previousSibling),o.push(e),e.nextSibling&&t(e.nextSibling)&&o.push(e.nextSibling),o},R=c.isMSIE&&c.browserVersion<11?"&nbsp;":"<br>",L=function(e){return a(e)?e.nodeValue.length:e.childNodes.length},F=function(e){var t=L(e);return 0===t?!0:a(e)||1!==t||e.innerHTML!==R?o.all(e.childNodes,a)&&""===e.innerHTML?!0:!1:!0},A=function(e){l(e)||L(e)||(e.innerHTML=R)},D=function(e,n){for(;e;){if(n(e))return e;if(t(e))break;e=e.parentNode}return null},M=function(e,n){for(e=e.parentNode;e&&1===L(e);){if(n(e))return e;if(t(e))break;e=e.parentNode}return null},z=function(e,o){o=o||n.fail;var i=[];return D(e,function(e){return t(e)||i.push(e),o(e)}),i},B=function(e,t){var n=z(e);return o.last(n.filter(t))},U=function(t,n){for(var o=z(t),i=n;i;i=i.parentNode)if(e.inArray(i,o)>-1)return i;return null},$=function(e,t){t=t||n.fail;for(var o=[];e&&!t(e);)o.push(e),e=e.previousSibling;return o},O=function(e,t){t=t||n.fail;for(var o=[];e&&!t(e);)o.push(e),e=e.nextSibling;return o},j=function(e,t){var o=[];return t=t||n.ok,function i(n){e!==n&&t(n)&&o.push(n);for(var r=0,a=n.childNodes.length;a>r;r++)i(n.childNodes[r])}(e),o},K=function(t,n){var o=t.parentNode,i=e("<"+n+">")[0];return o.insertBefore(i,t),i.appendChild(t),i},V=function(e,t){var n=t.nextSibling,o=t.parentNode;return n?o.insertBefore(e,n):o.appendChild(e),e},W=function(t,n){return e.each(n,function(e,n){t.appendChild(n)}),t},q=function(e){return 0===e.offset},_=function(e){return e.offset===L(e.node)},G=function(e){return q(e)||_(e)},Y=function(e,t){for(;e&&e!==t;){if(0!==X(e))return!1;e=e.parentNode}return!0},Z=function(e,t){for(;e&&e!==t;){if(X(e)!==L(e.parentNode)-1)return!1;e=e.parentNode}return!0},J=function(e,t){return q(e)&&Y(e.node,t)},Q=function(e,t){return _(e)&&Z(e.node,t)},X=function(e){for(var t=0;e=e.previousSibling;)t+=1;return t},ee=function(e){return!!(e&&e.childNodes&&e.childNodes.length)},te=function(e,n){var o,i;if(0===e.offset){if(t(e.node))return null;o=e.node.parentNode,i=X(e.node)}else ee(e.node)?(o=e.node.childNodes[e.offset-1],i=L(o)):(o=e.node,i=n?0:e.offset-1);return{node:o,offset:i}},ne=function(e,n){var o,i;if(L(e.node)===e.offset){if(t(e.node))return null;o=e.node.parentNode,i=X(e.node)+1}else ee(e.node)?(o=e.node.childNodes[e.offset],i=0):(o=e.node,i=n?L(e.node):e.offset+1);return{node:o,offset:i}},oe=function(e,t){return e.node===t.node&&e.offset===t.offset},ie=function(e){if(a(e.node)||!ee(e.node)||F(e.node))return!0;var t=e.node.childNodes[e.offset-1],n=e.node.childNodes[e.offset];return t&&!l(t)||n&&!l(n)?!1:!0},re=function(e,t){for(;e;){if(t(e))return e;e=te(e)}return null},ae=function(e,t){for(;e;){if(t(e))return e;e=ne(e)}return null},se=function(e){if(!a(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return t&&" "!==t&&t!==d},le=function(e,t,n,o){for(var i=e;i&&(n(i),!oe(i,t));){var r=o&&e.node!==i.node&&t.node!==i.node;i=ne(i,r)}},ce=function(e,t){var o=z(t,n.eq(e));return o.map(X).reverse()},de=function(e,t){for(var n=e,o=0,i=t.length;i>o;o++)n=n.childNodes.length<=t[o]?n.childNodes[n.childNodes.length-1]:n.childNodes[t[o]];return n},ue=function(e,t){var n=t&&t.isSkipPaddingBlankHTML,o=t&&t.isNotSplitEdgePoint;if(G(e)&&(a(e.node)||o)){if(q(e))return e.node;if(_(e))return e.node.nextSibling}if(a(e.node))return e.node.splitText(e.offset);var i=e.node.childNodes[e.offset],r=V(e.node.cloneNode(!1),e.node);return W(r,O(i)),n||(A(e.node),A(r)),r},fe=function(e,t,o){var i=z(t.node,n.eq(e));return i.length?1===i.length?ue(t,o):i.reduce(function(e,n){return e===t.node&&(e=ue(t,o)),ue({node:n,offset:e?f.position(e):L(n)},o)}):null},he=function(e,t){var n,i,r=t?h:T,a=z(e.node,r),s=o.last(a)||e.node;r(s)?(n=a[a.length-2],i=s):(n=s,i=n.parentNode);var l=n&&fe(n,e,{isSkipPaddingBlankHTML:t,isNotSplitEdgePoint:t});return l||i!==e.node||(l=e.node.childNodes[e.offset]),{rightNode:l,container:i}},me=function(e){return document.createElement(e)},pe=function(e){return document.createTextNode(e)},ge=function(e,t){if(e&&e.parentNode){if(e.removeNode)return e.removeNode(t);var n=e.parentNode;if(!t){var o,i,r=[];for(o=0,i=e.childNodes.length;i>o;o++)r.push(e.childNodes[o]);for(o=0,i=r.length;i>o;o++)n.insertBefore(r[o],e)}n.removeChild(e)}},ve=function(e,n){for(;e&&!t(e)&&n(e);){var o=e.parentNode;ge(e),e=o}},be=function(e,t){if(e.nodeName.toUpperCase()===t.toUpperCase())return e;var n=me(t);return e.style.cssText&&(n.style.cssText=e.style.cssText),W(n,o.from(e.childNodes)),V(n,e),ge(e),n},ke=r("TEXTAREA"),ye=function(e,t){var n=ke(e[0])?e.val():e.html();return t?n.replace(/[\n\r]/g,""):n},Ce=function(t,n){var o=ye(t);if(n){var i=/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g;o=o.replace(i,function(e,t,n){n=n.toUpperCase();var o=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!t,i=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return e+(o||i?"\n":"")}),o=e.trim(o)}return o},we=function(t){var n=e(t),o=n.offset(),i=n.outerHeight(!0);return{left:o.left,top:o.top+i}},Ne=function(e,t){Object.keys(t).forEach(function(n){e.on(n,t[n])})},Te=function(e,t){Object.keys(t).forEach(function(n){e.off(n,t[n])})};return{NBSP_CHAR:d,ZERO_WIDTH_NBSP_CHAR:u,blank:R,emptyPara:"<p>"+R+"</p>",makePredByNodeName:r,isEditable:t,isControlSizing:i,isText:a,isElement:s,isVoid:l,isPara:h,isPurePara:v,isHeading:m,isInline:k,isBlock:n.not(k),isBodyInline:S,isBody:H,isParaInline:E,isPre:p,isList:y,isTable:b,isCell:w,isBlockquote:N,isBodyContainer:T,isAnchor:I,isDiv:r("DIV"),isLi:g,isBR:r("BR"),isSpan:r("SPAN"),isB:r("B"),isU:r("U"),isS:r("S"),isI:r("I"),isImg:r("IMG"),isTextarea:ke,isEmpty:F,isEmptyAnchor:n.and(I,F),isClosestSibling:x,withClosestSiblings:P,nodeLength:L,isLeftEdgePoint:q,isRightEdgePoint:_,isEdgePoint:G,isLeftEdgeOf:Y,isRightEdgeOf:Z,isLeftEdgePointOf:J,isRightEdgePointOf:Q,prevPoint:te,nextPoint:ne,isSamePoint:oe,isVisiblePoint:ie,prevPointUntil:re,nextPointUntil:ae,isCharPoint:se,walkPoint:le,ancestor:D,singleChildAncestor:M,listAncestor:z,lastAncestor:B,listNext:O,listPrev:$,listDescendant:j,commonAncestor:U,wrap:K,insertAfter:V,appendChildNodes:W,position:X,hasChildren:ee,makeOffsetPath:ce,fromOffsetPath:de,splitTree:fe,splitPoint:he,create:me,createText:pe,remove:ge,removeWhile:ve,replace:be,html:Ce,value:ye,posFromPlaceholder:we,attachEvents:Ne,detachEvents:Te}}(),h=function(t,i){var r=this,a=e.summernote.ui;return this.memos={},this.modules={},this.layoutInfo={},this.options=i,this.initialize=function(){return this.layoutInfo=a.createLayout(t,i),this._initialize(),t.hide(),this},this.destroy=function(){this._destroy(),t.removeData("summernote"),a.removeLayout(t,this.layoutInfo)},this.reset=function(){this.code(f.emptyPara),this._destroy(),this._initialize()},this._initialize=function(){var t=e.extend({},this.options.buttons);Object.keys(t).forEach(function(e){r.memo("button."+e,t[e])});var n=e.extend({},this.options.modules,e.summernote.plugins||{});Object.keys(n).forEach(function(e){r.module(e,n[e],!0)}),Object.keys(this.modules).forEach(function(e){r.initializeModule(e)})},this._destroy=function(){Object.keys(this.modules).reverse().forEach(function(e){r.removeModule(e)}),Object.keys(this.memos).forEach(function(e){r.removeMemo(e)})},this.code=function(e){var n=this.invoke("codeview.isActivated");return void 0===e?(this.invoke("codeview.sync"),n?this.layoutInfo.codable.val():this.layoutInfo.editable.html()):(n?this.layoutInfo.codable.val(e):this.layoutInfo.editable.html(e),t.val(e),this.triggerEvent("change",e),void 0)},this.isDisabled=function(){return"false"===this.layoutInfo.editable.attr("contenteditable")},this.enable=function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0)},this.disable=function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.invoke("toolbar.deactivate",!0)},this.triggerEvent=function(){var e=o.head(arguments),i=o.tail(o.from(arguments)),r=this.options.callbacks[n.namespaceToCamel(e,"on")];r&&r.apply(t[0],i),t.trigger("summernote."+e,i)},this.initializeModule=function(e){var o=this.modules[e];o.shouldInitialize=o.shouldInitialize||n.ok,o.shouldInitialize()&&(o.initialize&&o.initialize(),o.events&&f.attachEvents(t,o.events))},this.module=function(e,t,n){return 1===arguments.length?this.modules[e]:(this.modules[e]=new t(this),void(n||this.initializeModule(e)))},this.removeModule=function(e){var n=this.modules[e];n.shouldInitialize()&&(n.events&&f.detachEvents(t,n.events),n.destroy&&n.destroy()),delete this.modules[e]},this.memo=function(e,t){return 1===arguments.length?this.memos[e]:void(this.memos[e]=t)},this.removeMemo=function(e){this.memos[e]&&this.memos[e].destroy&&this.memos[e].destroy(),delete this.memos[e]},this.createInvokeHandler=function(t,n){return function(o){o.preventDefault(),r.invoke(t,n||e(o.target).data("value")||e(o.currentTarget).data("value"))}},this.invoke=function(){var e=o.head(arguments),t=o.tail(o.from(arguments)),n=e.split("."),i=n.length>1,r=i&&o.head(n),a=i?o.last(n):o.head(n),s=this.modules[r||"editor"];return!r&&this[a]?this[a].apply(this,t):s&&s[a]&&s.shouldInitialize()?s[a].apply(s,t):void 0},this.initialize()};e.summernote=e.summernote||{lang:{}},e.fn.extend({summernote:function(){var t=e.type(o.head(arguments)),n="string"===t,i="object"===t,r=i?o.head(arguments):{};r=e.extend({},e.summernote.options,r),r.langInfo=e.extend(!0,{},e.summernote.lang["en-US"],e.summernote.lang[r.lang]),this.each(function(t,n){var o=e(n);if(!o.data("summernote")){var i=new h(o,r);o.data("summernote",i),o.data("summernote").triggerEvent("init",i.layoutInfo)}});var a=this.first();if(a.length){var s=a.data("summernote");if(n)return s.invoke.apply(s,o.from(arguments));r.focus&&s.invoke("editor.focus")}return this}});var m=function(t,n,o,i){this.render=function(r){var a=e(t);if(o&&o.contents&&a.html(o.contents),o&&o.className&&a.addClass(o.className),o&&o.data&&e.each(o.data,function(e,t){a.attr("data-"+e,t)}),o&&o.click&&a.on("click",o.click),n){var s=a.find(".note-children-container");n.forEach(function(e){e.render(s.length?s:a)})}return i&&i(a,o),o&&o.callback&&o.callback(a),r&&r.append(a),a}},p={create:function(t,n){return function(){var o=e.isArray(arguments[0])?arguments[0]:[],i="object"==typeof arguments[1]?arguments[1]:arguments[0];return i&&i.children&&(o=i.children),new m(t,o,i,n)}}},g=p.create('<div class="note-editor note-frame panel panel-default"/>'),v=p.create('<div class="note-toolbar panel-heading"/>'),b=p.create('<div class="note-editing-area"/>'),k=p.create('<textarea class="note-codable"/>'),y=p.create('<div class="note-editable panel-body" contentEditable="true"/>'),C=p.create(['<div class="note-statusbar">','  <div class="note-resizebar">','    <div class="note-icon-bar"/>','    <div class="note-icon-bar"/>','    <div class="note-icon-bar"/>',"  </div>","</div>"].join("")),w=p.create('<div class="note-editor"/>'),N=p.create('<div class="note-editable" contentEditable="true"/>'),T=p.create('<div class="note-btn-group btn-group">'),I=p.create('<button type="button" class="note-btn btn btn-default btn-sm">',function(e,t){}),E=p.create('<div class="dropdown-menu">',function(t,n){var o=e.isArray(n.items)?n.items.map(function(e){return'<li><a href="#" data-value="'+e+'">'+e+"</a></li>"}).join(""):n.items;t.html(o)}),S=p.create('<div class="dropdown-menu note-check">',function(t,n){var o=e.isArray(n.items)?n.items.map(function(e){return'<li><a href="#" data-value="'+e+'">'+R(n.checkClassName)+" "+e+"</a></li>"}).join(""):n.items;t.html(o)}),H=p.create('<div class="note-color-palette"/>',function(e,t){for(var n=[],o=0,i=t.colors.length;i>o;o++){for(var r=t.eventName,a=t.colors[o],s=[],l=0,c=a.length;c>l;l++){var d=a[l];s.push(['<button type="button" class="note-color-btn"','style="background-color:',d,'" ','data-event="',r,'" ','data-value="',d,'" ','title="',d,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}n.push('<div class="note-color-row">'+s.join("")+"</div>")}e.html(n.join("")),e.find(".note-color-btn").tooltip({container:"body",trigger:"hover",placement:"bottom"})}),x=p.create('<div class="modal" aria-hidden="false"/>',function(e,t){e.html(['<div class="modal-dialog">','  <div class="modal-content">',t.title?'    <div class="modal-header">      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>      <h4 class="modal-title">'+t.title+"</h4>    </div>":"",'    <div class="modal-body">'+t.body+"</div>",t.footer?'    <div class="modal-footer">'+t.footer+"</div>":"","  </div>","</div>"].join(""))}),P=p.create(['<div class="note-popover popover bottom in">','  <div class="arrow"/>','  <div class="popover-content note-children-container"/>',"</div>"].join("")),R=function(e,t){return t=t||"i","<"+t+' class="'+e+'"/>'},L={editor:g,toolbar:v,editingArea:b,codable:k,editable:y,statusbar:C,airEditor:w,airEditable:N,buttonGroup:T,button:I,dropdown:E,dropdownCheck:S,palette:H,dialog:x,popover:P,icon:R,toggleBtn:function(e,t){e.toggleClass("disabled",!t),e.attr("disabled",!t)},toggleBtnActive:function(e,t){e.toggleClass("active",t)},onDialogShown:function(e,t){e.one("shown.bs.modal",t)},onDialogHidden:function(e,t){e.one("hidden.bs.modal",t)},showDialog:function(e){e.modal("show")},hideDialog:function(e){e.modal("hide")},createLayout:function(e,t){var n=(t.airMode?L.airEditor([L.editingArea([L.airEditable()])]):L.editor([L.toolbar(),L.editingArea([L.codable(),L.editable()]),L.statusbar()])).render();return n.insertAfter(e),{note:e,editor:n,toolbar:n.find(".note-toolbar"),editingArea:n.find(".note-editing-area"),editable:n.find(".note-editable"),codable:n.find(".note-codable"),statusbar:n.find(".note-statusbar")}},removeLayout:function(e,t){e.html(t.editable.html()),t.editor.remove(),e.show()}};e.extend(e.summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize Full",resizeHalf:"Resize Half",resizeQuarter:"Resize Quarter",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Float None",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL?",providers:"(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window"},table:{table:"Table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",normal:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Foreground Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{insertParagraph:"Insert Paragraph",undo:"Undoes the last command",redo:"Redoes the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"}}});var F,A=function(){var e={BACKSPACE:8,TAB:9,ENTER:13,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221};return{isEdit:function(t){return o.contains([e.BACKSPACE,e.TAB,e.ENTER,e.SPACe],t)},isMove:function(t){return o.contains([e.LEFT,e.UP,e.RIGHT,e.DOWN],t)},nameFromCode:n.invertObject(e),code:e}}(),D=function(){var t=function(e,t){var n,i,r=e.parentElement(),a=document.body.createTextRange(),s=o.from(r.childNodes);for(n=0;n<s.length;n++)if(!f.isText(s[n])){if(a.moveToElementText(s[n]),a.compareEndPoints("StartToStart",e)>=0)break;i=s[n]}if(0!==n&&f.isText(s[n-1])){var l=document.body.createTextRange(),c=null;l.moveToElementText(i||r),l.collapse(!i),c=i?i.nextSibling:r.firstChild;var d=e.duplicate();d.setEndPoint("StartToStart",l);for(var u=d.text.replace(/[\r\n]/g,"").length;u>c.nodeValue.length&&c.nextSibling;)u-=c.nodeValue.length,c=c.nextSibling;c.nodeValue;t&&c.nextSibling&&f.isText(c.nextSibling)&&u===c.nodeValue.length&&(u-=c.nodeValue.length,c=c.nextSibling),r=c,n=u}return{cont:r,offset:n}},i=function(e){var t=function(e,i){var r,a;if(f.isText(e)){var s=f.listPrev(e,n.not(f.isText)),l=o.last(s).previousSibling;r=l||e.parentNode,i+=o.sum(o.tail(s),f.nodeLength),a=!l}else{if(r=e.childNodes[i]||e,f.isText(r))return t(r,0);i=0,a=!1}return{node:r,collapseToStart:a,offset:i}},i=document.body.createTextRange(),r=t(e.node,e.offset);return i.moveToElementText(r.node),i.collapse(r.collapseToStart),i.moveStart("character",r.offset),i},r=function(t,a,s,l){this.sc=t,this.so=a,this.ec=s,this.eo=l;var d=function(){if(c.isW3CRangeSupport){var e=document.createRange();return e.setStart(t,a),e.setEnd(s,l),e}var n=i({node:t,offset:a});return n.setEndPoint("EndToEnd",i({node:s,offset:l})),n};this.getPoints=function(){return{sc:t,so:a,ec:s,eo:l}},this.getStartPoint=function(){return{node:t,offset:a}},this.getEndPoint=function(){return{node:s,offset:l}},this.select=function(){var e=d();if(c.isW3CRangeSupport){var t=document.getSelection();t.rangeCount>0&&t.removeAllRanges(),t.addRange(e)}else e.select();return this},this.scrollIntoView=function(e){return e[0].scrollTop+e.height()<this.sc.offsetTop&&(e[0].scrollTop+=Math.abs(e[0].scrollTop+e.height()-this.sc.offsetTop)),this},this.normalize=function(){var e=function(e,t){if(f.isVisiblePoint(e)&&!f.isEdgePoint(e)||f.isVisiblePoint(e)&&f.isRightEdgePoint(e)&&!t||f.isVisiblePoint(e)&&f.isLeftEdgePoint(e)&&t||f.isVisiblePoint(e)&&f.isBlock(e.node)&&f.isEmpty(e.node))return e;var n=f.ancestor(e.node,f.isBlock);if((f.isLeftEdgePointOf(e,n)||f.isVoid(f.prevPoint(e).node))&&!t||(f.isRightEdgePointOf(e,n)||f.isVoid(f.nextPoint(e).node))&&t){if(f.isVisiblePoint(e))return e;t=!t}var o=t?f.nextPointUntil(f.nextPoint(e),f.isVisiblePoint):f.prevPointUntil(f.prevPoint(e),f.isVisiblePoint);return o||e},t=e(this.getEndPoint(),!1),n=this.isCollapsed()?t:e(this.getStartPoint(),!0);return new r(n.node,n.offset,t.node,t.offset)},this.nodes=function(e,t){e=e||n.ok;var i=t&&t.includeAncestor,r=t&&t.fullyContains,a=this.getStartPoint(),s=this.getEndPoint(),l=[],c=[];return f.walkPoint(a,s,function(t){if(!f.isEditable(t.node)){var n;r?(f.isLeftEdgePoint(t)&&c.push(t.node),f.isRightEdgePoint(t)&&o.contains(c,t.node)&&(n=t.node)):n=i?f.ancestor(t.node,e):t.node,n&&e(n)&&l.push(n)}},!0),o.unique(l)},this.commonAncestor=function(){return f.commonAncestor(t,s)},this.expand=function(e){var n=f.ancestor(t,e),o=f.ancestor(s,e);if(!n&&!o)return new r(t,a,s,l);var i=this.getPoints();return n&&(i.sc=n,i.so=0),o&&(i.ec=o,i.eo=f.nodeLength(o)),new r(i.sc,i.so,i.ec,i.eo)},this.collapse=function(e){return e?new r(t,a,t,a):new r(s,l,s,l)},this.splitText=function(){var e=t===s,n=this.getPoints();return f.isText(s)&&!f.isEdgePoint(this.getEndPoint())&&s.splitText(l),f.isText(t)&&!f.isEdgePoint(this.getStartPoint())&&(n.sc=t.splitText(a),n.so=0,e&&(n.ec=n.sc,n.eo=l-a)),new r(n.sc,n.so,n.ec,n.eo)},this.deleteContents=function(){if(this.isCollapsed())return this;var t=this.splitText(),n=t.nodes(null,{fullyContains:!0}),i=f.prevPointUntil(t.getStartPoint(),function(e){return!o.contains(n,e.node)}),a=[];return e.each(n,function(e,t){var n=t.parentNode;i.node!==n&&1===f.nodeLength(n)&&a.push(n),f.remove(t,!1)}),e.each(a,function(e,t){f.remove(t,!1)}),new r(i.node,i.offset,i.node,i.offset).normalize()};var u=function(e){return function(){var n=f.ancestor(t,e);return!!n&&n===f.ancestor(s,e)}};this.isOnEditable=u(f.isEditable),this.isOnList=u(f.isList),this.isOnAnchor=u(f.isAnchor),this.isOnCell=u(f.isCell),this.isLeftEdgeOf=function(e){if(!f.isLeftEdgePoint(this.getStartPoint()))return!1;var t=f.ancestor(this.sc,e);return t&&f.isLeftEdgeOf(this.sc,t)},this.isCollapsed=function(){return t===s&&a===l},this.wrapBodyInlineWithPara=function(){if(f.isBodyContainer(t)&&f.isEmpty(t))return t.innerHTML=f.emptyPara,new r(t.firstChild,0,t.firstChild,0);var e=this.normalize();if(f.isParaInline(t)||f.isPara(t))return e;var i;if(f.isInline(e.sc)){var a=f.listAncestor(e.sc,n.not(f.isInline));i=o.last(a),f.isInline(i)||(i=a[a.length-2]||e.sc.childNodes[e.so])}else i=e.sc.childNodes[e.so>0?e.so-1:0];var s=f.listPrev(i,f.isParaInline).reverse();if(s=s.concat(f.listNext(i.nextSibling,f.isParaInline)),s.length){var l=f.wrap(o.head(s),"p");f.appendChildNodes(l,o.tail(s))}return this.normalize()},this.insertNode=function(e){var t=this.wrapBodyInlineWithPara().deleteContents(),n=f.splitPoint(t.getStartPoint(),f.isInline(e));return n.rightNode?n.rightNode.parentNode.insertBefore(e,n.rightNode):n.container.appendChild(e),e},this.pasteHTML=function(t){var n=e("<div></div>").html(t)[0],i=o.from(n.childNodes),r=this.wrapBodyInlineWithPara().deleteContents();return i.reverse().map(function(e){return r.insertNode(e)}).reverse()},this.toString=function(){var e=d();return c.isW3CRangeSupport?e.toString():e.text},this.getWordRange=function(e){var t=this.getEndPoint();if(!f.isCharPoint(t))return this;var n=f.prevPointUntil(t,function(e){return!f.isCharPoint(e)});return e&&(t=f.nextPointUntil(t,function(e){return!f.isCharPoint(e)})),new r(n.node,n.offset,t.node,t.offset)},this.bookmark=function(e){return{s:{path:f.makeOffsetPath(e,t),offset:a},e:{path:f.makeOffsetPath(e,s),offset:l}}},this.paraBookmark=function(e){return{s:{path:o.tail(f.makeOffsetPath(o.head(e),t)),offset:a},e:{path:o.tail(f.makeOffsetPath(o.last(e),s)),offset:l}}},this.getClientRects=function(){var e=d();return e.getClientRects()}};return{create:function(e,n,o,i){if(arguments.length)2===arguments.length&&(o=e,i=n);else if(c.isW3CRangeSupport){var a=document.getSelection();if(!a||0===a.rangeCount)return null;if(f.isBody(a.anchorNode))return null;var s=a.getRangeAt(0);e=s.startContainer,n=s.startOffset,o=s.endContainer,i=s.endOffset}else{var l=document.selection.createRange(),d=l.duplicate();d.collapse(!1);var u=l;u.collapse(!0);var h=t(u,!0),m=t(d,!1);f.isText(h.node)&&f.isLeftEdgePoint(h)&&f.isTextNode(m.node)&&f.isRightEdgePoint(m)&&m.node.nextSibling===h.node&&(h=m),e=h.cont,n=h.offset,o=m.cont,i=m.offset}return new r(e,n,o,i)},createFromNode:function(e){var t=e,n=0,o=e,i=f.nodeLength(o);return f.isVoid(t)&&(n=f.listPrev(t).length-1,t=t.parentNode),f.isBR(o)?(i=f.listPrev(o).length-1,o=o.parentNode):f.isVoid(o)&&(i=f.listPrev(o).length,o=o.parentNode),this.create(t,n,o,i)},createFromNodeBefore:function(e){return this.createFromNode(e).collapse(!0)},createFromNodeAfter:function(e){return this.createFromNode(e).collapse()},createFromBookmark:function(e,t){var n=f.fromOffsetPath(e,t.s.path),o=t.s.offset,i=f.fromOffsetPath(e,t.e.path),a=t.e.offset;return new r(n,o,i,a)},createFromParaBookmark:function(e,t){var n=e.s.offset,i=e.e.offset,a=f.fromOffsetPath(o.head(t),e.s.path),s=f.fromOffsetPath(o.last(t),e.e.path);return new r(a,n,s,i)}}}(),M=function(){var t=function(t){return e.Deferred(function(n){e.extend(new FileReader,{onload:function(e){var t=e.target.result;n.resolve(t)},onerror:function(){n.reject(this)}}).readAsDataURL(t)}).promise()},n=function(t){return e.Deferred(function(n){var o=e("<img>");o.one("load",function(){o.off("error abort"),n.resolve(o)}).one("error abort",function(){o.off("load").detach(),n.reject(o)}).css({display:"none"}).appendTo(document.body).attr("src",t)}).promise()};return{readFileAsDataURL:t,createImage:n}}(),z=function(e){var t=[],n=-1,o=e[0],i=function(){var t=D.create(),n={s:{path:[],offset:0},e:{path:[],offset:0}};return{contents:e.html(),bookmark:t?t.bookmark(o):n}},r=function(t){null!==t.contents&&e.html(t.contents),null!==t.bookmark&&D.createFromBookmark(o,t.bookmark).select()};this.rewind=function(){e.html()!==t[n].contents&&this.recordUndo(),n=0,r(t[n])},this.reset=function(){t=[],n=-1,e.html(""),this.recordUndo()},this.undo=function(){e.html()!==t[n].contents&&this.recordUndo(),n>0&&(n--,r(t[n]))},this.redo=function(){t.length-1>n&&(n++,r(t[n]))},this.recordUndo=function(){n++,t.length>n&&(t=t.slice(0,n)),t.push(i())}},B=function(){var t=function(t,n){if(c.jqueryVersion<1.9){var o={};return e.each(n,function(e,n){o[n]=t.css(n)}),o}return t.css.call(t,n)};this.fromNode=function(e){var n=["font-family","font-size","text-align","list-style-type","line-height"],o=t(e,n)||{};return o["font-size"]=parseInt(o["font-size"],10),o},this.stylePara=function(t,n){e.each(t.nodes(f.isPara,{includeAncestor:!0}),function(t,o){e(o).css(n)})},this.styleNodes=function(t,i){t=t.splitText();var r=i&&i.nodeName||"SPAN",a=!(!i||!i.expandClosestSibling),s=!(!i||!i.onlyPartialContains);if(t.isCollapsed())return[t.insertNode(f.create(r))];var l=f.makePredByNodeName(r),c=t.nodes(f.isText,{fullyContains:!0}).map(function(e){return f.singleChildAncestor(e,l)||f.wrap(e,r)});if(a){if(s){var d=t.nodes();l=n.and(l,function(e){return o.contains(d,e)})}return c.map(function(t){var n=f.withClosestSiblings(t,l),i=o.head(n),r=o.tail(n);return e.each(r,function(e,t){f.appendChildNodes(i,t.childNodes),f.remove(t)}),o.head(n)})}return c},this.current=function(t){var n=e(f.isElement(t.sc)?t.sc:t.sc.parentNode),o=this.fromNode(n);try{o=e.extend(o,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikeThrough")?"strikethrough":"normal"})}catch(i){}if(t.isOnList()){var r=["circle","disc","disc-leading-zero","square"],a=e.inArray(o["list-style-type"],r)>-1;o["list-style"]=a?"unordered":"ordered"}else o["list-style"]="none";var s=f.ancestor(t.sc,f.isPara);if(s&&s.style["line-height"])o["line-height"]=s.style.lineHeight;else{var l=parseInt(o["line-height"],10)/parseInt(o["font-size"],10);
o["line-height"]=l.toFixed(1)}return o.anchor=t.isOnAnchor()&&f.ancestor(t.sc,f.isAnchor),o.ancestors=f.listAncestor(t.sc,f.isEditable),o.range=t,o}},U=function(){this.insertOrderedList=function(){this.toggleList("OL")},this.insertUnorderedList=function(){this.toggleList("UL")},this.indent=function(){var t=this,i=D.create().wrapBodyInlineWithPara(),r=i.nodes(f.isPara,{includeAncestor:!0}),a=o.clusterBy(r,n.peq2("parentNode"));e.each(a,function(n,i){var r=o.head(i);f.isLi(r)?t.wrapList(i,r.parentNode.nodeName):e.each(i,function(t,n){e(n).css("marginLeft",function(e,t){return(parseInt(t,10)||0)+25})})}),i.select()},this.outdent=function(){var t=this,i=D.create().wrapBodyInlineWithPara(),r=i.nodes(f.isPara,{includeAncestor:!0}),a=o.clusterBy(r,n.peq2("parentNode"));e.each(a,function(n,i){var r=o.head(i);f.isLi(r)?t.releaseList([i]):e.each(i,function(t,n){e(n).css("marginLeft",function(e,t){return t=parseInt(t,10)||0,t>25?t-25:""})})}),i.select()},this.toggleList=function(t){var i=this,r=D.create().wrapBodyInlineWithPara(),a=r.nodes(f.isPara,{includeAncestor:!0}),s=r.paraBookmark(a),l=o.clusterBy(a,n.peq2("parentNode"));if(o.find(a,f.isPurePara)){var c=[];e.each(l,function(e,n){c=c.concat(i.wrapList(n,t))}),a=c}else{var d=r.nodes(f.isList,{includeAncestor:!0}).filter(function(n){return!e.nodeName(n,t)});d.length?e.each(d,function(e,n){f.replace(n,t)}):a=this.releaseList(l,!0)}D.createFromParaBookmark(s,a).select()},this.wrapList=function(e,t){var n=o.head(e),i=o.last(e),r=f.isList(n.previousSibling)&&n.previousSibling,a=f.isList(i.nextSibling)&&i.nextSibling,s=r||f.insertAfter(f.create(t||"UL"),i);return e=e.map(function(e){return f.isPurePara(e)?f.replace(e,"LI"):e}),f.appendChildNodes(s,e),a&&(f.appendChildNodes(s,o.from(a.childNodes)),f.remove(a)),e},this.releaseList=function(t,n){var i=[];return e.each(t,function(t,r){var a=o.head(r),s=o.last(r),l=n?f.lastAncestor(a,f.isList):a.parentNode,c=l.childNodes.length>1?f.splitTree(l,{node:s.parentNode,offset:f.position(s)+1},{isSkipPaddingBlankHTML:!0}):null,d=f.splitTree(l,{node:a.parentNode,offset:f.position(a)},{isSkipPaddingBlankHTML:!0});r=n?f.listDescendant(d,f.isLi):o.from(d.childNodes).filter(f.isLi),(n||!f.isList(l.parentNode))&&(r=r.map(function(e){return f.replace(e,"P")})),e.each(o.from(r).reverse(),function(e,t){f.insertAfter(t,l)});var u=o.compact([l,d,c]);e.each(u,function(t,n){var o=[n].concat(f.listDescendant(n,f.isList));e.each(o.reverse(),function(e,t){f.nodeLength(t)||f.remove(t,!0)})}),i=i.concat(r)}),i}},$=function(){var t=new U;this.insertTab=function(e,t,n){var o=f.createText(new Array(n+1).join(f.NBSP_CHAR));t=t.deleteContents(),t.insertNode(o,!0),t=D.create(o,n),t.select()},this.insertParagraph=function(n){var o=D.create();o=o.deleteContents(),o=o.wrapBodyInlineWithPara();var i,r=f.ancestor(o.sc,f.isPara);if(r){if(f.isEmpty(r)&&f.isLi(r))return void t.toggleList(r.parentNode.nodeName);if(f.isEmpty(r)&&f.isPara(r)&&f.isBlockquote(r.parentNode))f.insertAfter(r,r.parentNode),i=r;else{i=f.splitTree(r,o.getStartPoint());var a=f.listDescendant(r,f.isEmptyAnchor);a=a.concat(f.listDescendant(i,f.isEmptyAnchor)),e.each(a,function(e,t){f.remove(t)}),(f.isHeading(i)||f.isPre(i))&&f.isEmpty(i)&&(i=f.replace(i,"p"))}}else{var s=o.sc.childNodes[o.so];i=e(f.emptyPara)[0],s?o.sc.insertBefore(i,s):o.sc.appendChild(i)}D.create(i,0).normalize().select().scrollIntoView(n)}},O=function(){this.tab=function(e,t){var n=f.ancestor(e.commonAncestor(),f.isCell),i=f.ancestor(n,f.isTable),r=f.listDescendant(i,f.isCell),a=o[t?"prev":"next"](r,n);a&&D.create(a,0).select()},this.createTable=function(t,n,o){for(var i,r=[],a=0;t>a;a++)r.push("<td>"+f.blank+"</td>");i=r.join("");for(var s,l=[],c=0;n>c;c++)l.push("<tr>"+i+"</tr>");s=l.join("");var d=e("<table>"+s+"</table>");return o&&o.tableClassName&&d.addClass(o.tableClassName),d[0]}},j="bogus",K=function(t){var n=this,i=t.layoutInfo.note,r=t.layoutInfo.editor,a=t.layoutInfo.editable,s=t.options,l=s.langInfo,d=new B,u=new O,h=new $,m=new U,p=new z(a);this.initialize=function(){a.on("keydown",function(e){e.keyCode===A.code.ENTER&&t.triggerEvent("enter",e),t.triggerEvent("keydown",e),s.shortcuts&&!e.isDefaultPrevented()&&n.handleKeyMap(e)}).on("keyup",function(e){t.triggerEvent("keyup",e)}).on("focus",function(e){t.triggerEvent("focus",e)}).on("blur",function(e){t.triggerEvent("blur",e)}).on("mousedown",function(e){t.triggerEvent("mousedown",e)}).on("mouseup",function(e){t.triggerEvent("mouseup",e)}).on("scroll",function(e){t.triggerEvent("scroll",e)}).on("paste",function(e){t.triggerEvent("paste",e)});var e=c.isMSIE?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input";a.on(e,function(){t.triggerEvent("change",a.html())}),r.on("focusin",function(e){t.triggerEvent("focusin",e)}).on("focusout",function(e){t.triggerEvent("focusout",e)}),!s.airMode&&s.height&&a.outerHeight(s.height),!s.airMode&&s.maxHeight&&a.css("max-height",s.maxHeight),!s.airMode&&s.minHeight&&a.css("min-height",s.minHeight),a.html(f.html(i)||f.emptyPara),p.recordUndo()},this.destroy=function(){a.off()},this.handleKeyMap=function(e){var n=s.keyMap[c.isMac?"mac":"pc"],o=[];e.metaKey&&o.push("CMD"),e.ctrlKey&&!e.altKey&&o.push("CTRL"),e.shiftKey&&o.push("SHIFT");var i=A.nameFromCode[e.keyCode];i&&o.push(i);var r=n[o.join("+")];r?(e.preventDefault(),t.invoke(r)):A.isEdit(e.keyCode)&&this.afterCommand()},this.createRange=function(){return this.focus(),D.create()},this.saveRange=function(e){this.focus(),a.data("range",D.create()),e&&D.create().collapse().select()},this.restoreRange=function(){var e=a.data("range");e&&(e.select(),this.focus())},this.saveTarget=function(e){a.data("target",e)},this.clearTarget=function(){a.removeData("target")},this.restoreTarget=function(){return a.data("target")},this.currentStyle=function(){var e=D.create();return e&&(e=e.normalize()),e?d.current(e):d.fromNode(a)},this.styleFromNode=function(e){return d.fromNode(e)},this.undo=function(){t.triggerEvent("before.command",a.html()),p.undo(),t.triggerEvent("change",a.html())},t.memo("help.undo",l.help.undo),this.redo=function(){t.triggerEvent("before.command",a.html()),p.redo(),t.triggerEvent("change",a.html())},t.memo("help.redo",l.help.redo);for(var g=this.beforeCommand=function(){t.triggerEvent("before.command",a.html()),n.focus()},v=this.afterCommand=function(e){p.recordUndo(),e||t.triggerEvent("change",a.html())},b=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor","foreColor","fontName"],k=0,y=b.length;y>k;k++)this[b[k]]=function(e){return function(t){g(),document.execCommand(e,!1,t),v(!0)}}(b[k]),t.memo("help."+b[k],l.help[b[k]]);this.tab=function(){var e=this.createRange();e.isCollapsed()&&e.isOnCell()?u.tab(e):(g(),h.insertTab(a,e,s.tabSize),v())},t.memo("help.tab",l.help.tab),this.untab=function(){var e=this.createRange();e.isCollapsed()&&e.isOnCell()&&u.tab(e,!0)},t.memo("help.untab",l.help.untab),this.wrapCommand=function(e){return function(){g(),e.apply(n,arguments),v()}},this.insertParagraph=this.wrapCommand(function(){h.insertParagraph(a)}),t.memo("help.insertParagraph",l.help.insertParagraph),this.insertOrderedList=this.wrapCommand(function(){m.insertOrderedList(a)}),t.memo("help.insertOrderedList",l.help.insertOrderedList),this.insertUnorderedList=this.wrapCommand(function(){m.insertUnorderedList(a)}),t.memo("help.insertUnorderedList",l.help.insertUnorderedList),this.indent=this.wrapCommand(function(){m.indent(a)}),t.memo("help.indent",l.help.indent),this.outdent=this.wrapCommand(function(){m.outdent(a)}),t.memo("help.outdent",l.help.outdent),this.insertImage=function(e,n){return M.createImage(e,n).then(function(e){g(),"function"==typeof n?n(e):("string"==typeof n&&e.attr("data-filename",n),e.css("width",Math.min(a.width(),e.width()))),e.show(),D.create().insertNode(e[0]),D.createFromNodeAfter(e[0]).select(),v()}).fail(function(){t.triggerEvent("image.upload.error")})},this.insertImages=function(o){e.each(o,function(e,o){var i=o.name;s.maximumImageFileSize&&s.maximumImageFileSize<o.size?t.triggerEvent("image.upload.error",l.image.maximumFileSizeError):M.readFileAsDataURL(o).then(function(e){return n.insertImage(e,i)}).fail(function(){t.triggerEvent("image.upload.error")})})},this.insertImagesOrCallback=function(e){var n=s.callbacks;n.onImageUpload?t.triggerEvent("image.upload",e):this.insertImages(e)},this.insertNode=this.wrapCommand(function(e){D.create().insertNode(e),D.createFromNodeAfter(e).select()}),this.insertText=this.wrapCommand(function(e){var t=D.create().insertNode(f.createText(e));D.create(t,f.nodeLength(t)).select()}),this.getSelectedText=function(){var e=this.createRange();return e.isOnAnchor()&&(e=D.createFromNode(f.ancestor(e.sc,f.isAnchor))),e.toString()},this.pasteHTML=this.wrapCommand(function(e){var t=D.create().pasteHTML(e);D.createFromNodeAfter(o.last(t)).select()}),this.formatBlock=this.wrapCommand(function(e){e=c.isMSIE?"<"+e+">":e,document.execCommand("FormatBlock",!1,e)}),this.formatPara=function(){this.formatBlock("P")},t.memo("help.formatPara",l.help.formatPara);for(var k=1;6>=k;k++)this["formatH"+k]=function(e){return function(){this.formatBlock("H"+e)}}(k),t.memo("help.formatH"+k,l.help["formatH"+k]);this.fontSize=function(t){this.focus();var n=D.create();if(n&&n.isCollapsed()){var i=d.styleNodes(n),r=o.head(i);e(i).css({"font-size":t+"px"}),r&&!f.nodeLength(r)&&(r.innerHTML=f.ZERO_WIDTH_NBSP_CHAR,D.createFromNodeAfter(r.firstChild).select(),a.data(j,r))}else g(),e(d.styleNodes(n)).css({"font-size":t+"px"}),v()},this.insertHorizontalRule=this.wrapCommand(function(){var t=D.create(),n=t.insertNode(e("<HR/>")[0]);n.nextSibling&&D.create(n.nextSibling,0).normalize().select()}),t.memo("help.insertHorizontalRule",l.help.insertHorizontalRule),this.removeBogus=function(){var e=a.data(j);if(e){var t=o.find(o.from(e.childNodes),f.isText),n=t.nodeValue.indexOf(f.ZERO_WIDTH_NBSP_CHAR);-1!==n&&t.deleteData(n,1),f.isEmpty(e)&&f.remove(e),a.removeData(j)}},this.lineHeight=this.wrapCommand(function(e){d.stylePara(D.create(),{lineHeight:e})}),this.unlink=function(){var e=this.createRange();if(e.isOnAnchor()){var t=f.ancestor(e.sc,f.isAnchor);e=D.createFromNode(t),e.select(),g(),document.execCommand("unlink"),v()}},this.createLink=this.wrapCommand(function(t){var n=t.url,i=t.text,r=t.isNewWindow,a=t.range||this.createRange(),l=a.toString()!==i;s.onCreateLink&&(n=s.onCreateLink(n));var c=[];if(l){var u=a.insertNode(e("<A>"+i+"</A>")[0]);c.push(u)}else c=d.styleNodes(a,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});e.each(c,function(t,o){e(o).attr("href",n),r?e(o).attr("target","_blank"):e(o).removeAttr("target")});var f=D.createFromNodeBefore(o.head(c)),h=f.getStartPoint(),m=D.createFromNodeAfter(o.last(c)),p=m.getEndPoint();D.create(h.node,h.offset,p.node,p.offset).select()}),this.getLinkInfo=function(){this.focus();var t=D.create().expand(f.isAnchor),n=e(o.head(t.nodes(f.isAnchor)));return{range:t,text:t.toString(),isNewWindow:n.length?"_blank"===n.attr("target"):!1,url:n.length?n.attr("href"):""}},this.color=this.wrapCommand(function(e){var t=e.foreColor,n=e.backColor;t&&document.execCommand("foreColor",!1,t),n&&document.execCommand("backColor",!1,n)}),this.insertTable=this.wrapCommand(function(e){var t=e.split("x"),n=D.create().deleteContents();n.insertNode(u.createTable(t[0],t[1],s))}),this.floatMe=this.wrapCommand(function(t){var n=e(this.restoreTarget());n.css("float",t)}),this.resize=this.wrapCommand(function(t){var n=e(this.restoreTarget());n.css({width:100*t+"%",height:""})}),this.resizeTo=function(e,t,n){var o;if(n){var i=e.y/e.x,r=t.data("ratio");o={width:r>i?e.x:e.y/r,height:r>i?e.x*r:e.y}}else o={width:e.x,height:e.y};t.css(o)},this.removeMedia=this.wrapCommand(function(){var n=e(this.restoreTarget()).detach();t.triggerEvent("media.delete",n,a)}),this.focus=function(){a.is(":focus")||(a.focus(),!a.is(":focus")&&c.isFF&&D.createFromNode(a[0]).normalize().collapse().select())},this.isEmpty=function(){return f.isEmpty(a[0])||f.emptyPara===a.html()}},V=function(t){var n=this,i=t.layoutInfo.editable;this.events={"summernote.keydown":function(e,o){n.needKeydownHook()&&(o.ctrlKey||o.metaKey)&&o.keyCode===A.code.V&&(t.invoke("editor.saveRange"),n.$paste.focus(),setTimeout(function(){n.pasteByHook()},0))}},this.needKeydownHook=function(){return c.isMSIE&&c.browserVersion>10||c.isFF},this.initialize=function(){this.needKeydownHook()?(this.$paste=e("<div />").attr("contenteditable",!0).css({position:"absolute",left:-1e5,opacity:0}),i.before(this.$paste),this.$paste.on("paste",function(e){t.triggerEvent("paste",e)})):i.on("paste",this.pasteByEvent)},this.destroy=function(){this.needKeydownHook()&&(this.$paste.remove(),this.$paste=null)},this.pasteByHook=function(){var n=this.$paste[0].firstChild;if(f.isImg(n)){for(var o=n.src,i=atob(o.split(",")[1]),r=new Uint8Array(i.length),a=0;a<i.length;a++)r[a]=i.charCodeAt(a);var s=new Blob([r],{type:"image/png"});s.name="clipboard.png",t.invoke("editor.restoreRange"),t.invoke("editor.focus"),t.invoke("editor.insertImagesOrCallback",[s])}else{var l=e("<div />").html(this.$paste.html()).html();t.invoke("editor.restoreRange"),t.invoke("editor.focus"),l&&t.invoke("editor.pasteHTML",l)}this.$paste.empty()},this.pasteByEvent=function(e){var n=e.originalEvent.clipboardData;if(n&&n.items&&n.items.length){var i=o.head(n.items);"file"===i.kind&&-1!==i.type.indexOf("image/")&&t.invoke("editor.insertImagesOrCallback",[i.getAsFile()]),t.invoke("editor.afterCommand")}}},W=function(t){var n=e(document),o=t.layoutInfo.editor,i=t.layoutInfo.editable,r=t.options,a=r.langInfo,s=e(['<div class="note-dropzone">','  <div class="note-dropzone-message"/>',"</div>"].join("")).prependTo(o);this.initialize=function(){r.disableDragAndDrop?n.on("drop",function(e){e.preventDefault()}):this.attachDragAndDropEvent()},this.attachDragAndDropEvent=function(){var r=e(),l=s.find(".note-dropzone-message");n.on("dragenter",function(e){var n=t.invoke("codeview.isActivated"),i=o.width()>0&&o.height()>0;n||r.length||!i||(o.addClass("dragover"),s.width(o.width()),s.height(o.height()),l.text(a.image.dragImageHere)),r=r.add(e.target)}).on("dragleave",function(e){r=r.not(e.target),r.length||o.removeClass("dragover")}).on("drop",function(){r=e(),o.removeClass("dragover")}),s.on("dragenter",function(){s.addClass("hover"),l.text(a.image.dropImage)}).on("dragleave",function(){s.removeClass("hover"),l.text(a.image.dragImageHere)}),s.on("drop",function(n){var o=n.originalEvent.dataTransfer;o&&o.files&&o.files.length?(n.preventDefault(),i.focus(),t.invoke("editor.insertImagesOrCallback",o.files)):e.each(o.types,function(n,i){var r=o.getData(i);i.toLowerCase().indexOf("text")>-1?t.invoke("editor.pasteHTML",r):e(r).each(function(){t.invoke("editor.insertNode",this)})})}).on("dragover",!1)}};c.hasCodeMirror&&(c.isSupportAmd?require(["codemirror"],function(e){F=e}):F=window.CodeMirror);var q=function(e){var t=e.layoutInfo.editor,n=e.layoutInfo.editable,o=e.layoutInfo.codable,i=e.options;this.sync=function(){var e=this.isActivated();e&&c.hasCodeMirror&&o.data("cmEditor").save()},this.isActivated=function(){return t.hasClass("codeview")},this.toggle=function(){this.isActivated()?this.deactivate():this.activate(),e.triggerEvent("codeview.toggled")},this.activate=function(){if(o.val(f.html(n,i.prettifyHtml)),o.height(n.height()),e.invoke("toolbar.updateCodeview",!0),t.addClass("codeview"),o.focus(),c.hasCodeMirror){var r=F.fromTextArea(o[0],i.codemirror);if("undefined"!=typeof i.codemirror.callbacks)for(var a in i.codemirror.callbacks)if(i.codemirror.callbacks.hasOwnProperty(a)){if("onBlur"==a)var s="blur";else if("onFocus"==a)var s="focus";else if("onChange"==a)var s="change";r.on(s,i.codemirror.callbacks[a],r)}if(i.codemirror.tern){var l=new F.TernServer(i.codemirror.tern);r.ternServer=l,r.on("cursorActivity",function(e){l.updateArgHints(e)})}r.setSize(null,n.outerHeight()),o.data("cmEditor",r)}},this.deactivate=function(){if(c.hasCodeMirror){var r=o.data("cmEditor");o.val(r.getValue()),r.toTextArea()}var a=f.value(o,i.prettifyHtml)||f.emptyPara,s=n.html()!==a;n.html(a),n.height(i.height?o.height():"auto"),t.removeClass("codeview"),s&&e.triggerEvent("change",n.html(),n),n.focus(),e.invoke("toolbar.updateCodeview",!1)},this.destroy=function(){this.isActivated()&&this.deactivate()}},_=24,G=function(t){var n=e(document),o=t.layoutInfo.statusbar,i=t.layoutInfo.editable,r=t.options;this.initialize=function(){r.airMode||r.disableResizeEditor||o.on("mousedown",function(e){e.preventDefault(),e.stopPropagation();var t=i.offset().top-n.scrollTop();n.on("mousemove",function(e){var n=e.clientY-(t+_);n=r.minheight>0?Math.max(n,r.minheight):n,n=r.maxHeight>0?Math.min(n,r.maxHeight):n,i.height(n)}).one("mouseup",function(){n.off("mousemove")})})},this.destroy=function(){o.off()}},Y=function(t){var n=t.layoutInfo.editor,o=t.layoutInfo.toolbar,i=t.layoutInfo.editable,r=t.layoutInfo.codable,a=e(window),s=e("html, body");this.toggle=function(){var e=function(e){i.css("height",e.h),r.css("height",e.h),r.data("cmeditor")&&r.data("cmeditor").setsize(null,e.h)};n.toggleClass("fullscreen");var l=n.hasClass("fullscreen");l?(i.data("orgHeight",i.css("height")),a.on("resize",function(){e({h:a.height()-o.outerHeight()})}).trigger("resize"),s.css("overflow","hidden")):(a.off("resize"),e({h:i.data("orgHeight")}),s.css("overflow","visible")),t.invoke("toolbar.updateFullscreen",l)}},Z=function(t){var n=this,o=e(document),i=t.layoutInfo.editingArea,r=t.options;this.events={"summernote.mousedown":function(e,t){n.update(t.target)&&t.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){n.update()}},this.initialize=function(){this.$handle=e(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',r.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"></div>',r.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(i),this.$handle.on("mousedown",function(e){if(f.isControlSizing(e.target)){e.preventDefault(),e.stopPropagation();var i=n.$handle.find(".note-control-selection").data("target"),r=i.offset(),a=o.scrollTop();o.on("mousemove",function(e){t.invoke("editor.resizeTo",{x:e.clientX-r.left,y:e.clientY-(r.top-a)},i,!e.shiftKey),n.update(i[0])}).one("mouseup",function(e){e.preventDefault(),o.off("mousemove"),t.invoke("editor.afterCommand")}),i.data("ratio")||i.data("ratio",i.height()/i.width())}})},this.destroy=function(){this.$handle.remove()},this.update=function(n){var o=f.isImg(n),i=this.$handle.find(".note-control-selection");if(t.invoke("imagePopover.update",n),o){var r=e(n),a=r.position(),s={w:r.outerWidth(!0),h:r.outerHeight(!0)};i.css({display:"block",left:a.left,top:a.top,width:s.w,height:s.h}).data("target",r);var l=s.w+"x"+s.h;i.find(".note-control-selection-info").text(l),t.invoke("editor.saveTarget",n)}else this.hide();return o},this.hide=function(){t.invoke("editor.clearTarget"),this.$handle.children().hide()}},J=function(t){var n=this,i=/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i;this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)}},this.initialize=function(){this.lastWordRange=null},this.destroy=function(){this.lastWordRange=null},this.replace=function(){if(this.lastWordRange){var e=this.lastWordRange.toString();if(i.test(e)){var n=this.nodeFromKeyword(e);this.lastWordRange.insertNode(n),this.lastWordRange=null,t.invoke("editor.focus")}}},this.nodeFromKeyword=function(t){return e("<a />").html(t).attr("href",t)[0]},this.handleKeydown=function(e){if(o.contains([A.code.ENTER,A.code.SPACE],e.keyCode)){var n=t.invoke("editor.createRange").getWordRange();this.lastWordRange=n}},this.handleKeyup=function(e){o.contains([A.code.ENTER,A.code.SPACE],e.keyCode)&&this.replace()}},Q=function(e){var t=e.layoutInfo.note;this.events={"summernote.change":function(){t.val(e.invoke("code"))}},this.shouldInitialize=function(){return f.isTextarea(t[0])}},X=function(t){var n=this,o=t.layoutInfo.editingArea,i=t.options;this.events={"summernote.init summernote.change":function(){n.update()},"summernote.codeview.toggled":function(){n.update()}},this.shouldInitialize=function(){return!!i.placeholder},this.initialize=function(){this.$placeholder=e('<div class="note-placeholder">'),this.$placeholder.on("click",function(){t.invoke("focus")}).text(i.placeholder).prependTo(o)},this.destroy=function(){this.$placeholder.remove()},this.update=function(){var e=!t.invoke("codeview.isActivated")&&t.invoke("editor.isEmpty");this.$placeholder.toggle(e)}},ee=function(t){var i=this,r=e.summernote.ui,a=t.layoutInfo.toolbar,s=t.options,l=s.langInfo,d=n.invertObject(s.keyMap[c.isMac?"mac":"pc"]),u=this.representShortcut=function(e){var t=d[e];return c.isMac&&(t=t.replace("CMD","⌘").replace("SHIFT","⇧")),t=t.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]")," ("+t+")"};this.initialize=function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons()},this.addToolbarButtons=function(){t.memo("button.style",function(){return r.buttonGroup([r.button({className:"dropdown-toggle",contents:r.icon(s.icons.magic)+" "+r.icon(s.icons.caret,"span"),tooltip:l.style.style,data:{toggle:"dropdown"}}),r.dropdown({className:"dropdown-style",items:t.options.styleTags,click:t.createInvokeHandler("editor.formatBlock")})]).render()}),t.memo("button.bold",function(){return r.button({className:"note-btn-bold",contents:r.icon(s.icons.bold),tooltip:l.font.bold+u("bold"),click:t.createInvokeHandler("editor.bold")}).render()}),t.memo("button.italic",function(){return r.button({className:"note-btn-italic",contents:r.icon(s.icons.italic),tooltip:l.font.italic+u("italic"),click:t.createInvokeHandler("editor.italic")}).render()}),t.memo("button.underline",function(){return r.button({className:"note-btn-underline",contents:r.icon(s.icons.underline),tooltip:l.font.underline+u("underline"),click:t.createInvokeHandler("editor.underline")}).render()}),t.memo("button.clear",function(){return r.button({contents:r.icon(s.icons.eraser),tooltip:l.font.clear+u("removeFormat"),click:t.createInvokeHandler("editor.removeFormat")}).render()}),t.memo("button.strikethrough",function(){return r.button({contents:r.icon(s.icons.strikethrough),tooltip:l.font.strikethrough+u("strikethrough"),click:t.createInvokeHandler("editor.strikethrough")}).render()}),t.memo("button.superscript",function(){return r.button({contents:r.icon(s.icons.superscript),tooltip:l.font.superscript,click:t.createInvokeHandler("editor.superscript")}).render()}),t.memo("button.subscript",function(){return r.button({contents:r.icon(s.icons.subscript),tooltip:l.font.subscript,click:t.createInvokeHandler("editor.subscript")}).render()}),t.memo("button.fontname",function(){return r.buttonGroup([r.button({className:"dropdown-toggle",contents:'<span class="note-current-fontname"/> '+r.icon(s.icons.caret,"span"),tooltip:l.font.name,data:{toggle:"dropdown"}}),r.dropdownCheck({className:"dropdown-fontname",checkClassName:s.icons.menuCheck,items:s.fontNames.filter(function(e){return c.isFontInstalled(e)||o.contains(s.fontNamesIgnoreCheck,e)}),click:t.createInvokeHandler("editor.fontName")})]).render()}),t.memo("button.fontsize",function(){return r.buttonGroup([r.button({className:"dropdown-toggle",contents:'<span class="note-current-fontsize"/>'+r.icon(s.icons.caret,"span"),tooltip:l.font.size,data:{toggle:"dropdown"}}),r.dropdownCheck({className:"dropdown-fontsize",checkClassName:s.icons.menuCheck,items:s.fontSizes,click:t.createInvokeHandler("editor.fontSize")})]).render()}),t.memo("button.color",function(){return r.buttonGroup({className:"note-color",children:[r.button({className:"note-current-color-button",contents:r.icon(s.icons.font+" note-recent-color"),tooltip:l.color.recent,click:t.createInvokeHandler("editor.color"),callback:function(e){var t=e.find(".note-recent-color");t.css({"background-color":"yellow"}),e.data("value",{backColor:"yellow"})}}),r.button({className:"dropdown-toggle",contents:r.icon(s.icons.caret,"span"),tooltip:l.color.more,data:{toggle:"dropdown"}}),r.dropdown({items:["<li>",'<div class="btn-group">','  <div class="note-palette-title">'+l.color.background+"</div>","  <div>",'    <button class="note-color-reset btn btn-default" data-event="backColor" data-value="inherit">',l.color.transparent,"    </button>","  </div>",'  <div class="note-holder" data-event="backColor"/>',"</div>",'<div class="btn-group">','  <div class="note-palette-title">'+l.color.foreground+"</div>","  <div>",'    <button class="note-color-reset btn btn-default" data-event="removeFormat" data-value="foreColor">',l.color.resetToDefault,"    </button>","  </div>",'  <div class="note-holder" data-event="foreColor"/>',"</div>","</li>"].join(""),callback:function(t){t.find(".note-holder").each(function(){var t=e(this);t.append(r.palette({colors:s.colors,eventName:t.data("event")}).render())})},click:function(n){var o=e(n.target),i=o.data("event"),r=o.data("value");if(i&&r){var a="backColor"===i?"background-color":"color",s=o.closest(".note-color").find(".note-recent-color"),l=o.closest(".note-color").find(".note-current-color-button"),c=l.data("value");c[i]=r,s.css(a,r),l.data("value",c),t.invoke("editor."+i,r)}}})]}).render()}),t.memo("button.ol",function(){return r.button({contents:r.icon(s.icons.unorderedlist),tooltip:l.lists.unordered+u("insertUnorderedList"),click:t.createInvokeHandler("editor.insertUnorderedList")}).render()}),t.memo("button.ul",function(){return r.button({contents:r.icon(s.icons.orderedlist),tooltip:l.lists.ordered+u("insertOrderedList"),click:t.createInvokeHandler("editor.insertOrderedList")}).render()}),t.memo("button.paragraph",function(){return r.buttonGroup([r.button({className:"dropdown-toggle",contents:r.icon(s.icons.align)+" "+r.icon(s.icons.caret,"span"),tooltip:l.paragraph.paragraph,data:{toggle:"dropdown"}}),r.dropdown([r.buttonGroup({className:"note-align",children:[r.button({contents:r.icon(s.icons.alignLeft),tooltip:l.paragraph.left+u("justifyLeft"),click:t.createInvokeHandler("editor.justifyLeft")}),r.button({contents:r.icon(s.icons.alignCenter),tooltip:l.paragraph.center+u("justifyCenter"),click:t.createInvokeHandler("editor.justifyCenter")}),r.button({contents:r.icon(s.icons.alignRight),tooltip:l.paragraph.right+u("justifyRight"),click:t.createInvokeHandler("editor.justifyRight")}),r.button({contents:r.icon(s.icons.alignJustify),tooltip:l.paragraph.justify+u("justifyFull"),click:t.createInvokeHandler("editor.justifyFull")})]}),r.buttonGroup({className:"note-list",children:[r.button({contents:r.icon(s.icons.outdent),tooltip:l.paragraph.outdent+u("outdent"),click:t.createInvokeHandler("editor.outdent")}),r.button({contents:r.icon(s.icons.indent),tooltip:l.paragraph.indent+u("indent"),click:t.createInvokeHandler("editor.indent")})]})])]).render()}),t.memo("button.height",function(){return r.buttonGroup([r.button({className:"dropdown-toggle",contents:r.icon(s.icons.textHeight)+" "+r.icon(s.icons.caret,"span"),tooltip:l.font.height,data:{toggle:"dropdown"}}),r.dropdownCheck({items:s.lineHeights,checkClassName:s.icons.menuCheck,className:"dropdown-line-height",click:t.createInvokeHandler("editor.lineHeight")})]).render()}),t.memo("button.table",function(){return r.buttonGroup([r.button({className:"dropdown-toggle",contents:r.icon(s.icons.table)+" "+r.icon(s.icons.caret,"span"),tooltip:l.table.table,data:{toggle:"dropdown"}}),r.dropdown({className:"note-table",items:['<div class="note-dimension-picker">','  <div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"/>','  <div class="note-dimension-picker-highlighted"/>','  <div class="note-dimension-picker-unhighlighted"/>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(e){var n=e.find(".note-dimension-picker-mousecatcher");n.css({width:s.insertTableMaxSize.col+"em",height:s.insertTableMaxSize.row+"em"}).mousedown(t.createInvokeHandler("editor.insertTable")).on("mousemove",i.tableMoveHandler)}}).render()}),t.memo("button.link",function(){return r.button({contents:r.icon(s.icons.link),tooltip:l.link.link,click:t.createInvokeHandler("linkDialog.show")}).render()}),t.memo("button.picture",function(){return r.button({contents:r.icon(s.icons.picture),tooltip:l.image.image,click:t.createInvokeHandler("imageDialog.show")}).render()}),t.memo("button.video",function(){return r.button({contents:r.icon(s.icons.video),tooltip:l.video.video,click:t.createInvokeHandler("videoDialog.show")}).render()}),t.memo("button.hr",function(){return r.button({contents:r.icon(s.icons.minus),tooltip:l.hr.insert+u("insertHorizontalRule"),click:t.createInvokeHandler("editor.insertHorizontalRule")}).render()}),t.memo("button.fullscreen",function(){return r.button({className:"btn-fullscreen",contents:r.icon(s.icons.arrowsAlt),tooltip:l.options.fullscreen,click:t.createInvokeHandler("fullscreen.toggle")}).render()}),t.memo("button.codeview",function(){return r.button({className:"btn-codeview",contents:r.icon(s.icons.code),tooltip:l.options.codeview,click:t.createInvokeHandler("codeview.toggle")}).render()}),t.memo("button.redo",function(){return r.button({contents:r.icon(s.icons.redo),tooltip:l.history.redo+u("redo"),click:t.createInvokeHandler("editor.redo")}).render()}),t.memo("button.undo",function(){return r.button({contents:r.icon(s.icons.undo),tooltip:l.history.undo+u("undo"),click:t.createInvokeHandler("editor.undo")}).render()}),t.memo("button.help",function(){return r.button({contents:r.icon(s.icons.question),tooltip:l.options.help,click:t.createInvokeHandler("helpDialog.show")}).render()})},this.addImagePopoverButtons=function(){t.memo("button.imageSize100",function(){return r.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:l.image.resizeFull,click:t.createInvokeHandler("editor.resize","1")}).render()}),t.memo("button.imageSize50",function(){return r.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:l.image.resizeHalf,click:t.createInvokeHandler("editor.resize","0.5")}).render()}),t.memo("button.imageSize25",function(){return r.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:l.image.resizeQuarter,click:t.createInvokeHandler("editor.resize","0.25")}).render()}),t.memo("button.floatLeft",function(){return r.button({contents:r.icon(s.icons.alignLeft),tooltip:l.image.floatLeft,click:t.createInvokeHandler("editor.floatMe","left")}).render()}),t.memo("button.floatRight",function(){return r.button({contents:r.icon(s.icons.alignRight),tooltip:l.image.floatRight,click:t.createInvokeHandler("editor.floatMe","right")}).render()}),t.memo("button.floatNone",function(){return r.button({contents:r.icon(s.icons.alignJustify),tooltip:l.image.floatNone,click:t.createInvokeHandler("editor.floatMe","none")}).render()}),t.memo("button.removeMedia",function(){return r.button({contents:r.icon(s.icons.trash),tooltip:l.image.remove,click:t.createInvokeHandler("editor.removeMedia")}).render()})},this.addLinkPopoverButtons=function(){t.memo("button.linkDialogShow",function(){return r.button({contents:r.icon(s.icons.link),tooltip:l.link.edit,click:t.createInvokeHandler("linkDialog.show")}).render()}),t.memo("button.unlink",function(){return r.button({contents:r.icon(s.icons.unlink),tooltip:l.link.unlink,click:t.createInvokeHandler("editor.unlink")}).render()})},this.build=function(e,n){for(var o=0,i=n.length;i>o;o++){for(var a=n[o],s=a[0],l=a[1],c=r.buttonGroup({className:"note-"+s}).render(),d=0,u=l.length;u>d;d++){
var f=t.memo("button."+l[d]);f&&c.append("function"==typeof f?f(t):f)}c.appendTo(e)}},this.updateCurrentStyle=function(){var n=t.invoke("editor.currentStyle");if(this.updateBtnStates({".note-btn-bold":function(){return"bold"===n["font-bold"]},".note-btn-italic":function(){return"italic"===n["font-italic"]},".note-btn-underline":function(){return"underline"===n["font-underline"]}}),n["font-family"]){var i=n["font-family"].split(",").map(function(e){return e.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}),r=o.find(i,function(e){return c.isFontInstalled(e)||o.contains(s.fontNamesIgnoreCheck,e)});a.find(".dropdown-fontname li a").each(function(){var t=e(this).data("value")+""==r+"";this.className=t?"checked":""}),a.find(".note-current-fontname").text(r)}if(n["font-size"]){var l=n["font-size"];a.find(".dropdown-fontsize li a").each(function(){var t=e(this).data("value")+""==l+"";this.className=t?"checked":""}),a.find(".note-current-fontsize").text(l)}if(n["line-height"]){var d=n["line-height"];a.find(".dropdown-line-height li a").each(function(){var t=e(this).data("value")+""==d+"";this.className=t?"checked":""})}},this.updateBtnStates=function(t){e.each(t,function(e,t){r.toggleBtnActive(a.find(e),t())})},this.tableMoveHandler=function(t){var n,o=18,i=e(t.target.parentNode),r=i.next(),a=i.find(".note-dimension-picker-mousecatcher"),l=i.find(".note-dimension-picker-highlighted"),c=i.find(".note-dimension-picker-unhighlighted");if(void 0===t.offsetX){var d=e(t.target).offset();n={x:t.pageX-d.left,y:t.pageY-d.top}}else n={x:t.offsetX,y:t.offsetY};var u={c:Math.ceil(n.x/o)||1,r:Math.ceil(n.y/o)||1};l.css({width:u.c+"em",height:u.r+"em"}),a.data("value",u.c+"x"+u.r),3<u.c&&u.c<s.insertTableMaxSize.col&&c.css({width:u.c+1+"em"}),3<u.r&&u.r<s.insertTableMaxSize.row&&c.css({height:u.r+1+"em"}),r.html(u.c+" x "+u.r)}},te=function(t){var n=e.summernote.ui,o=t.layoutInfo.note,i=t.layoutInfo.toolbar,r=t.options;this.shouldInitialize=function(){return!r.airMode},this.initialize=function(){r.toolbar=r.toolbar||[],r.toolbar.length?t.invoke("buttons.build",i,r.toolbar):i.hide(),o.on("summernote.keyup summernote.mouseup summernote.change",function(){t.invoke("buttons.updateCurrentStyle")}),t.invoke("buttons.updateCurrentStyle")},this.destroy=function(){i.children().remove()},this.updateFullscreen=function(e){n.toggleBtnActive(i.find(".btn-fullscreen"),e)},this.updateCodeview=function(e){n.toggleBtnActive(i.find(".btn-codeview"),e),e?this.deactivate():this.activate()},this.activate=function(e){var t=i.find("button");e||(t=t.not(".btn-codeview")),n.toggleBtn(t,!0)},this.deactivate=function(e){var t=i.find("button");e||(t=t.not(".btn-codeview")),n.toggleBtn(t,!1)}},ne=function(t){var n=this,o=e.summernote.ui,i=t.layoutInfo.editor,r=t.options,a=r.langInfo;this.initialize=function(){var t=r.dialogsInBody?e(document.body):i,n='<div class="form-group"><label>'+a.link.textToDisplay+'</label><input class="note-link-text form-control" type="text" /></div><div class="form-group"><label>'+a.link.url+'</label><input class="note-link-url form-control" type="text" value="http://" /></div>'+(r.disableLinkTarget?"":'<div class="checkbox"><label><input type="checkbox" checked> '+a.link.openInNewWindow+"</label></div>"),s='<button href="#" class="btn btn-primary note-link-btn disabled" disabled>'+a.link.insert+"</button>";this.$dialog=o.dialog({className:"link-dialog",title:a.link.insert,body:n,footer:s}).render().appendTo(t)},this.destroy=function(){o.hideDialog(this.$dialog),this.$dialog.remove()},this.bindEnterKey=function(e,t){e.on("keypress",function(e){e.keyCode===A.code.ENTER&&t.trigger("click")})},this.showLinkDialog=function(i){return e.Deferred(function(e){var r=n.$dialog.find(".note-link-text"),a=n.$dialog.find(".note-link-url"),s=n.$dialog.find(".note-link-btn"),l=n.$dialog.find("input[type=checkbox]");o.onDialogShown(n.$dialog,function(){t.triggerEvent("dialog.shown"),r.val(i.text),r.on("input",function(){o.toggleBtn(s,r.val()&&a.val()),i.text=r.val()}),i.url||(i.url=i.text||"http://",o.toggleBtn(s,i.text)),a.on("input",function(){o.toggleBtn(s,r.val()&&a.val()),i.text||r.val(a.val())}).val(i.url).trigger("focus"),n.bindEnterKey(a,s),n.bindEnterKey(r,s),l.prop("checked",i.isNewWindow),s.one("click",function(t){t.preventDefault(),e.resolve({range:i.range,url:a.val(),text:r.val(),isNewWindow:l.is(":checked")}),n.$dialog.modal("hide")})}),o.onDialogHidden(n.$dialog,function(){r.off("input keypress"),a.off("input keypress"),s.off("click"),"pending"===e.state()&&e.reject()}),o.showDialog(n.$dialog)}).promise()},this.show=function(){var e=t.invoke("editor.getLinkInfo");t.invoke("editor.saveRange"),this.showLinkDialog(e).then(function(e){t.invoke("editor.restoreRange"),t.invoke("editor.createLink",e)}).fail(function(){t.invoke("editor.restoreRange")})},t.memo("help.linkDialog.show",r.langInfo.help["linkDialog.show"])},oe=function(t){var n=this,i=e.summernote.ui,r=t.options;this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){n.update()},"summernote.dialog.shown":function(){n.hide()}},this.shouldInitialize=function(){return!o.isEmpty(r.popover.link)},this.initialize=function(){this.$popover=i.popover({className:"note-link-popover",callback:function(e){var t=e.find(".popover-content");t.prepend('<span><a target="_blank"></a>&nbsp;</span>')}}).render().appendTo("body");var e=this.$popover.find(".popover-content");t.invoke("buttons.build",e,r.popover.link)},this.destroy=function(){this.$popover.remove()},this.update=function(){var n=t.invoke("editor.createRange");if(n.isCollapsed()&&n.isOnAnchor()){var o=f.ancestor(n.sc,f.isAnchor),i=e(o).attr("href");this.$popover.find("a").attr("href",i).html(i);var r=f.posFromPlaceholder(o);this.$popover.css({display:"block",left:r.left,top:r.top})}else this.hide()},this.hide=function(){this.$popover.hide()}},ie=function(t){var n=this,o=e.summernote.ui,i=t.layoutInfo.editor,r=t.options,a=r.langInfo;this.initialize=function(){var t=r.dialogsInBody?e(document.body):i,n="";if(r.maximumImageFileSize){var s=Math.floor(Math.log(r.maximumImageFileSize)/Math.log(1024)),l=1*(r.maximumImageFileSize/Math.pow(1024,s)).toFixed(2)+" "+" KMGTP"[s]+"B";n="<small>"+a.image.maximumFileSize+" : "+l+"</small>"}var c='<div class="form-group note-group-select-from-files"><label>'+a.image.selectFromFiles+'</label><input class="note-image-input form-control" type="file" name="files" accept="image/*" multiple="multiple" />'+n+'</div><div class="form-group" style="overflow:auto;"><label>'+a.image.url+'</label><input class="note-image-url form-control col-md-12" type="text" /></div>',d='<button href="#" class="btn btn-primary note-image-btn disabled" disabled>'+a.image.insert+"</button>";this.$dialog=o.dialog({title:a.image.insert,body:c,footer:d}).render().appendTo(t)},this.destroy=function(){o.hideDialog(this.$dialog),this.$dialog.remove()},this.bindEnterKey=function(e,t){e.on("keypress",function(e){e.keyCode===A.code.ENTER&&t.trigger("click")})},this.show=function(){t.invoke("editor.saveRange"),this.showImageDialog().then(function(e){o.hideDialog(n.$dialog),t.invoke("editor.restoreRange"),"string"==typeof e?t.invoke("editor.insertImage",e):t.invoke("editor.insertImagesOrCallback",e)}).fail(function(){t.invoke("editor.restoreRange")})},this.showImageDialog=function(){return e.Deferred(function(e){var i=n.$dialog.find(".note-image-input"),r=n.$dialog.find(".note-image-url"),a=n.$dialog.find(".note-image-btn");o.onDialogShown(n.$dialog,function(){t.triggerEvent("dialog.shown"),i.replaceWith(i.clone().on("change",function(){e.resolve(this.files||this.value)}).val("")),a.click(function(t){t.preventDefault(),e.resolve(r.val())}),r.on("keyup paste",function(){var e=r.val();o.toggleBtn(a,e)}).val("").trigger("focus"),n.bindEnterKey(r,a)}),o.onDialogHidden(n.$dialog,function(){i.off("change"),r.off("keyup paste keypress"),a.off("click"),"pending"===e.state()&&e.reject()}),o.showDialog(n.$dialog)})}},re=function(t){var n=e.summernote.ui,i=t.options;this.shouldInitialize=function(){return!o.isEmpty(i.popover.image)},this.initialize=function(){this.$popover=n.popover({className:"note-image-popover"}).render().appendTo("body");var e=this.$popover.find(".popover-content");t.invoke("buttons.build",e,i.popover.image)},this.destroy=function(){this.$popover.remove()},this.update=function(e){if(f.isImg(e)){var t=f.posFromPlaceholder(e);this.$popover.css({display:"block",left:t.left,top:t.top})}else this.hide()},this.hide=function(){this.$popover.hide()}},ae=function(t){var n=this,o=e.summernote.ui,i=t.layoutInfo.editor,r=t.options,a=r.langInfo;this.initialize=function(){var t=r.dialogsInBody?e(document.body):i,n='<div class="form-group row-fluid"><label>'+a.video.url+' <small class="text-muted">'+a.video.providers+'</small></label><input class="note-video-url form-control span12" type="text" /></div>',s='<button href="#" class="btn btn-primary note-video-btn disabled" disabled>'+a.video.insert+"</button>";this.$dialog=o.dialog({title:a.video.insert,body:n,footer:s}).render().appendTo(t)},this.destroy=function(){o.hideDialog(this.$dialog),this.$dialog.remove()},this.bindEnterKey=function(e,t){e.on("keypress",function(e){e.keyCode===A.code.ENTER&&t.trigger("click")})},this.createVideoNode=function(t){var n,o=/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,i=t.match(o),r=/\/\/instagram.com\/p\/(.[a-zA-Z0-9_-]*)/,a=t.match(r),s=/\/\/vine.co\/v\/(.[a-zA-Z0-9]*)/,l=t.match(s),c=/\/\/(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/,d=t.match(c),u=/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/,f=t.match(u),h=/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/,m=t.match(h),p=/^.+.(mp4|m4v)$/,g=t.match(p),v=/^.+.(ogg|ogv)$/,b=t.match(v),k=/^.+.(webm)$/,y=t.match(k);if(i&&11===i[1].length){var C=i[1];n=e("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+C).attr("width","640").attr("height","360")}else if(a&&a[0].length)n=e("<iframe>").attr("frameborder",0).attr("src",a[0]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(l&&l[0].length)n=e("<iframe>").attr("frameborder",0).attr("src",l[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(d&&d[3].length)n=e("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+d[3]).attr("width","640").attr("height","360");else if(f&&f[2].length)n=e("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+f[2]).attr("width","640").attr("height","360");else if(m&&m[1].length)n=e("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+m[1]);else{if(!(g||b||y))return!1;n=e("<video controls>").attr("src",t).attr("width","640").attr("height","360")}return n.addClass("note-video-clip"),n[0]},this.show=function(){var e=t.invoke("editor.getSelectedText");t.invoke("editor.saveRange"),this.showVideoDialog(e).then(function(e){o.hideDialog(n.$dialog),t.invoke("editor.restoreRange");var i=n.createVideoNode(e);i&&t.invoke("editor.insertNode",i)}).fail(function(){t.invoke("editor.restoreRange")})},this.showVideoDialog=function(i){return e.Deferred(function(e){var r=n.$dialog.find(".note-video-url"),a=n.$dialog.find(".note-video-btn");o.onDialogShown(n.$dialog,function(){t.triggerEvent("dialog.shown"),r.val(i).on("input",function(){o.toggleBtn(a,r.val())}).trigger("focus"),a.click(function(t){t.preventDefault(),e.resolve(r.val())}),n.bindEnterKey(r,a)}),o.onDialogHidden(n.$dialog,function(){r.off("input"),a.off("click"),"pending"===e.state()&&e.reject()}),o.showDialog(n.$dialog)})}},se=function(t){var n=this,o=e.summernote.ui,i=t.layoutInfo.editor,r=t.options,a=r.langInfo;this.createShortCutList=function(){var n=r.keyMap[c.isMac?"mac":"pc"],o=e("<div />");return Object.keys(n).forEach(function(i){var r=e('<div class="help-list-item"/>'),a=n[i],s=t.memo("help."+a)?t.memo("help."+a):a,l=e("<label />").css({width:180,"max-width":200,"margin-right":10}).html(i),c=e("<span />").html(s);r.html(l).append(c),o.append(r)}),o.html()},this.initialize=function(){var t=r.dialogsInBody?e(document.body):i,n=['<p class="text-center">','<a href="//summernote.org/" target="_blank">Summernote 0.7.1</a> · ','<a href="//github.com/summernote/summernote" target="_blank">Project</a> · ','<a href="//github.com/summernote/summernote/issues" target="_blank">Issues</a>',"</p>"].join("");this.$dialog=o.dialog({title:a.options.help,body:this.createShortCutList(),footer:n,callback:function(e){e.find(".modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(t)},this.destroy=function(){o.hideDialog(this.$dialog),this.$dialog.remove()},this.showHelpDialog=function(){return e.Deferred(function(e){o.onDialogHidden(n.$dialog,function(){t.triggerEvent("dialog.shown"),e.resolve()}),o.showDialog(n.$dialog)}).promise()},this.show=function(){t.invoke("editor.saveRange"),this.showHelpDialog().then(function(){t.invoke("editor.restoreRange")})}},le=function(t){var i=this,r=e.summernote.ui,a=t.options,s=20;this.events={"summernote.keyup summernote.mouseup summernote.scroll":function(){i.update()},"summernote.change summernote.dialog.shown":function(){i.hide()},"summernote.focusout":function(e,t){c.isFF||t.relatedTarget&&f.ancestor(t.relatedTarget,n.eq(i.$popover[0]))||i.hide()}},this.shouldInitialize=function(){return a.airMode&&!o.isEmpty(a.popover.air)},this.initialize=function(){this.$popover=r.popover({className:"note-air-popover"}).render().appendTo("body");var e=this.$popover.find(".popover-content");t.invoke("buttons.build",e,a.popover.air)},this.destroy=function(){this.$popover.remove()},this.update=function(){var e=t.invoke("editor.currentStyle");if(e.range&&!e.range.isCollapsed()){var i=o.last(e.range.getClientRects());if(i){var r=n.rect2bnd(i);this.$popover.css({display:"block",left:Math.max(r.left+r.width/2,0)-s,top:r.top+r.height})}}else this.hide()},this.hide=function(){this.$popover.hide()}},ce=function(t){var i=this,r=e.summernote.ui,a=t.options.hint||[],s=e.isArray(a)?a:[a];this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||i.handleKeyup(t)},"summernote.keydown":function(e,t){i.handleKeydown(t)},"summernote.dialog.shown":function(){i.hide()}},this.shouldInitialize=function(){return s.length>0},this.initialize=function(){this.lastWordRange=null,this.$popover=r.popover({className:"note-hint-popover"}).render().appendTo("body"),this.$content=this.$popover.find(".popover-content"),this.$content.on("click",".note-hint-item",function(){i.$content.find(".active").removeClass("active"),e(this).addClass("active"),i.replace()})},this.destroy=function(){this.$popover.remove()},this.selectItem=function(e){this.$content.find(".active").removeClass("active"),e.addClass("active"),this.$content[0].scrollTop=e[0].offsetTop-this.$content.innerHeight()/2},this.moveDown=function(){var e=this.$content.find(".note-hint-item.active"),t=e.next();if(t.length)this.selectItem(t);else{var n=e.parent().next();n.length||(n=this.$content.find(".note-hint-group").first()),this.selectItem(n.find(".note-hint-item").first())}},this.moveUp=function(){var e=this.$content.find(".note-hint-item.active"),t=e.prev();if(t.length)this.selectItem(t);else{var n=e.parent().prev();n.length||(n=this.$content.find(".note-hint-group").last()),this.selectItem(n.find(".note-hint-item").last())}},this.replace=function(){var e=this.$content.find(".note-hint-item.active"),n=this.nodeFromItem(e);this.lastWordRange.insertNode(n),D.createFromNode(n).collapse().select(),this.lastWordRange=null,this.hide(),t.invoke("editor.focus")},this.nodeFromItem=function(e){var t=s[e.data("index")],n=e.data("item"),o=t.content?t.content(n):n;return"string"==typeof o&&(o=f.createText(o)),o},this.createItemTemplates=function(t,n){var o=s[t];return n.map(function(n,i){var r=e('<div class="note-hint-item"/>');return r.append(o.template?o.template(n):n+""),r.data({index:t,item:n}),0===t&&0===i&&r.addClass("active"),r})},this.handleKeydown=function(e){this.$popover.is(":visible")&&(e.keyCode===A.code.ENTER?(e.preventDefault(),this.replace()):e.keyCode===A.code.UP?(e.preventDefault(),this.moveUp()):e.keyCode===A.code.DOWN&&(e.preventDefault(),this.moveDown()))},this.searchKeyword=function(e,t,n){var o=s[e];if(o&&o.match.test(t)&&o.search){var i=o.match.exec(t);o.search(i[1],n)}else n()},this.createGroup=function(t,n){var o=e('<div class="note-hint-group note-hint-group-'+t+'"/>');return this.searchKeyword(t,n,function(e){e=e||[],e.length&&(o.html(i.createItemTemplates(t,e)),i.show())}),o},this.handleKeyup=function(e){if(o.contains([A.code.ENTER,A.code.UP,A.code.DOWN],e.keyCode)){if(e.keyCode===A.code.ENTER&&this.$popover.is(":visible"))return}else{var r=t.invoke("editor.createRange").getWordRange(),a=r.toString();if(s.length&&a){this.$content.empty();var l=n.rect2bnd(o.last(r.getClientRects()));l&&(this.$popover.css({left:l.left,top:l.top+l.height}).hide(),this.lastWordRange=r,s.forEach(function(e,t){e.match.test(a)&&i.createGroup(t,a).appendTo(i.$content)}))}else this.hide()}},this.show=function(){this.$popover.show()},this.hide=function(){this.$popover.hide()}};e.summernote=e.extend(e.summernote,{version:"0.7.1",ui:L,plugins:{},options:{modules:{editor:K,clipboard:V,dropzone:W,codeview:q,statusbar:G,fullscreen:Y,handle:Z,hintPopover:ce,autoLink:J,autoSync:Q,placeholder:X,buttons:ee,toolbar:te,linkDialog:ne,linkPopover:oe,imageDialog:ie,imagePopover:re,videoDialog:ae,helpDialog:se,airPopover:le},buttons:{},lang:"en-US",toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popover:{image:[["imagesize",["imageSize100","imageSize50","imageSize25"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]]]},airMode:!1,width:null,height:null,focus:!1,tabSize:4,styleWithSpan:!0,shortcuts:!0,textareaAutoSync:!0,direction:null,styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontSizes:["8","9","10","11","12","14","18","24","36"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,maximumImageFileSize:null,callbacks:{onInit:null,onFocus:null,onBlur:null,onEnter:null,onKeyup:null,onKeydown:null,onSubmit:null,onImageUpload:null,onImageUploadError:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},keyMap:{pc:{ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"fa fa-align-left",alignCenter:"fa fa-align-center",alignJustify:"fa fa-align-justify",alignLeft:"fa fa-align-left",alignRight:"fa fa-align-right",indent:"fa fa-indent",outdent:"fa fa-outdent",arrowsAlt:"fa fa-arrows-alt",bold:"fa fa-bold",caret:"caret",circle:"fa fa-circle",close:"fa fa-close",code:"fa fa-code",eraser:"fa fa-eraser",font:"fa fa-font",frame:"fa fa-frame",italic:"fa fa-italic",link:"fa fa-link",unlink:"fa fa-chain-broken",magic:"fa fa-magic",menuCheck:"fa fa-check",minus:"fa fa-minus",orderedlist:"fa fa-list-ol",pencil:"fa fa-pencil",picture:"fa fa-picture-o",question:"fa fa-question",redo:"fa fa-repeat",square:"fa fa-square",strikethrough:"fa fa-strikethrough",subscript:"fa fa-subscript",superscript:"fa fa-superscript",table:"fa fa-table",textHeight:"fa fa-text-height",trash:"fa fa-trash",underline:"fa fa-underline",undo:"fa fa-undo",unorderedlist:"fa fa-list-ul",video:"fa fa-youtube-play"}}})});
صوت الليل لا ينام… حتى في عصر Gamini – tahkoom.com
تفاعل

صوت الليل لا ينام… حتى في عصر Gamini

كتبت : فرح سمير                                                                                                                                                              بين دفء الصوت وبرود التقنية… أسامة منير يتحدث

“حين يُستنسخ الصوت.. هل تُستنسخ الروح؟”

“أسامة منير: الروح لا تسجل ب mp3 ولا ذكاء يعوّض دفء الصوت الإنساني

عندما يُذكر اسم الإذاعة في العالم العربى ، يتردد في الأذهان فورًا صوت الإعلامي القدير أسامة منير، صاحب المدرسة الخاصة في فن التقديم الإذاعي، والبصمة الإنسانية الواضحة في برامجه، وعلى رأسها البرنامج الأشهر “أنا والنجوم وهواك”. بصوته العذب وحضوره الإنساني، أصبح “ الغائب الحاضر ” في ذاكرة مستمعين تربّوا على نبرة صدقه ودفء كلماته.

وفي الوقت الذي تواصل فيه التكنولوجيا اقتحام ميادين الإعلام، أعلنت شركة Google في مايو 2025 عن ميزة “البودكاست الذكي” ضمن تطبيق Gemini، والتي تتيح للمستخدمين تحويل مستنداتهم إلى حلقات صوتية تفاعلية، تديرها شخصيتان ذكيتان تعملان بالذكاء الاصطناعي.

في هذا السياق، نتحاور اليوم مع الإعلامي أسامة منير حول هذه النقلة النوعية، ونبحث معه في سؤال جوهري: هل ما زال الصوت البشري الدافئ قادرًا على الصمود أمام زحف الذكاء الاصطناعي؟ كيف يمكن للإعلامي أن يتكيّف مع هذه الأدوات الجديدة، دون أن يفقد إنسانيته، أو يفرّط في جوهر الرسالة الإعلامية؟

في رأيك، هل البودكاست بصوت الذكاء الاصطناعي يمكن أن ينافس صوت وتجربة المذيع البشري في المستقبل؟

أعتقد أن البودكاست “لحم ودم”، لا يصح أن يكون بصوت الذكاء الاصطناعي أبدًا. لأنك إن قمتِ بتحضير الأسئلة وطرحتها بصوت الذكاء الاصطناعي، ثم جاءت الإجابات أيضًا من الذكاءالاصطناعي، فكأنك فقط تبحثين عن وسيلة لقراءة نص مكتوب. لكن الحوار الحقيقي يكون حيًا، عبارة عن تلاقٍ بين فكر وفكر، وعقل وعقل. يكون فيه أخذ وردّ، ولا يمكن أن يُدار بأي شكل من الأشكال عن طريق الذكاء الاصطناعي، لأنه ببساطة سيفقد “الروح”،وسيفقد “الطعم”، وحتى “ذكاء الحوار” نفسه.

لديك تاريخ طويل في البرامج الإذاعية المؤثرة.. هل تعتقد أن الذكاء الاصطناعي يمكن أن ينقل نفس المشاعر والدفء الذي يقدمه المذيع الحقيقي؟

أعتقد أن البرامج الإذاعية لا يمكن أن تُدار على الإطلاق بتقنيات الذكاء الاصطناعي، فهذا شيء بعيد تمامًا. لأن المذيع الذي يجلس أمام الميكروفون — والذي نسميه “الحديدة” —تنقل “الحديدة” هذه ليس فقط صوته، وإنما أيضًا إحساسه وأفكاره، ومشاعره من فرح أو غضب أو حماس هناك دفء وخصوصية في العلاقة الحوارية بين المذيع والمستمع، ولا أعتقد أن هذا يمكن أن نحصل عليه بأي حال من الأحوال من الذكاء الاصطناعي.

هل سبق أن جربت أي أدوات ذكاء اصطناعي في إعداد أو إنتاج محتوى صوتي أو بودكاست؟ وإن لم تفعل، هل تفكر باستخدامها مستقبلا ً ؟

نعم، بالفعل جربت، كنت أستطلع كيف يمكن إنتاج محتوى بالذكاء الاصطناعي، أو كيف يمكن أن يساعدني في إعداد أفكار إذاعية أو وضع محاور.وجدت أنه ببساطة يجمع كل ما هو موجود على الإنترنت، لكنه لا يبتكر. يعرض المتاح فقط، ولا يضيف عليه.

ونعم، قد نستخدمه أحيانًا في أعمال “الفويس أوفر”، لكن في البرامج الإذاعية، لا.. لم أستخدمه من قبل ولا أرى أنه يمكن أن يُستخدم.

فيه بودكاستات حاليًا تُنتَج بالكامل باستخدام الذكاء الاصطناعي.. من كتابة النص إلى صوت المذيع، وحتى تحرير الحلقات. هل ترى في ذلك فرصة لتطور الإعلام أم خطرًا على المهنة؟

كون أن هناك الآن بودكاست يُنتَج بالكامل بالذكاء الاصطناعي، لا أعتقد أنه يُعتبر بودكاست حقيقي. لأنه سيفتقد للروح. ما الفائدة أن أطلب من الذكاء الاصطناعي كتابة سكريبت، ثم يقرأه بصوت مذيع اصطناعي، ويضيف له موسيقى، وأرفعه على المنصة؟ لم أفعل شيئًا.

لو قلت له مثلا ً : “اعمل لي محاضرة أو بودكاست عن التعايش السلمي”، سيضع لي نقاطًا وشرحًا. ثم أطلب منه قراءتها، فيقرأها جميعًا بإضافة موسيقى خلفية، فأقوم بنشرها على الإنترنت. هل فعلت شيئًا؟ لا. هذا يمكن لأي شخص أن يقرؤه على الإنترنت. البودكاست في جوهره إنساني. الإنسان هو من يناقش، وله فكر وتصور ورؤية، وهذا لن تجده أبدًا عند الذكاء الاصطناعي. الذكاء الاصطناعي يجمع لك بيانات واقعية من الإنترنت، لكنه لا يخلق. سأضرب لكِ مثلا ً : هناك أجهزة حديثة الآن تنتج موسيقى كاملة من توزيع وتركيب إيقاعات وآلات. لكن هناك آلات موسيقية، لا يمكن أن تُعزف إلا “لايف” لأن عزفها الحقيقي يحمل طعمًا خاصًا.مثل الكمان، والتشيلو، والأكورديون. لا يمكن أن تُعزف من “كيبورد”، لأن الصوت يختلف تمامًا.

هل سبق أن تم استخدام نبرة صوتك المميزة في تقنيات الذكاء الاصطناعي؟ وإن حدث، فكيف كان شعورك عندما استمعت إليه؟

نعم، سمعت صوتي بالذكاء الاصطناعي. فى مرة أحد الموزعين الموسيقيين أرسل لي مقطعًا ساخرًا استخدم فيه صوتي في“فويس أوفر”، وقال لي ممازحًا: “أنا ممكن أستغل صوتك!” ضحكت، لم أزعل، لكن لاحظت أنه ربما أخذ نبرة صوتي، “التون” والموجة الصوتية كانت صحيحة، لكن مخارج الحروف كانت مختلفة، والأسلوب كان مختلفًا. لأن من قرأ هو المتحدث الحقيقي، لكنه فقط غيّر صوته ليصبح صوتي. أي أن الذكاء الاصطناعي أخرج صوتي، لكن بأسلوبه هو. فلم يكن “الفويس أوفر” حتى بأسلوبي أنا. فما بالك لو استُخدم هذا في الرد على الناس في حوارات وأسئلة؟ هناك شيئًا “بلاستيكيًا”، شيئًا غير حقيقي. ستشعرين أن مع أنه لم يكن سكريبتًا مكتوبًا، بل مجرد تعديل صوت. فلم يوصل لا المعنى، ولا الإحساس، ولا حتى التحفيز.وهنا نقطة مهمة أود أن أذكرها: “الفويس أوفر” في الإعلان، هو البائع، هو من يقدّم المنتج للمستهلك، هو من يقنعه به بأسلوب معين. والإقناع هذا موهبة من عند الله سبحانه وتعالى، والصوت المقبول كذلك نعمة من الله.لا يمكن لشيء صُنع بأيادٍ بشرية أن يضاهي ما خلقه الله.

ما رأيك في تأثير الذكاء الاصطناعي على فرص الشباب في دخول مجال البودكاست؟ هل يمكن أن يسهل الطريق، أم يقلل من قيمة التجربة والخبرة؟الذكاء الاصطناعي؟

أعتقد أنه سيؤثر على دخول الشباب لمجال الإعلام والبودكاست. وهناك خطورة أخرى أود أن أذكرها، لا أعلم إن كنتِ ستسألين عنها أم لا،لكن أي شخص يمكنه الآن إنشاء بودكاست أو حوار باستخدام الذكاء الاصطناعي، ويمكن أن يستخدم أصوات شخصيات عالمية، أو أصوات لمسؤولين، وقد يؤدي ذلك إلى كارثة سياسية. تخيلوا أحدهم يستخدم صوت مسؤول ويضعه في إجابات معينة بطريقة مزيفة، هذا قد يسبب أزمة سياسية خطيرة، حتى على المستوى المحلي.

اذا طلبت من حضرتك نصيحة لطلاب الإعلام الذين يرغبون في دخول مجال البودكاست، خاصة في ظل وجود الذكاء الاصطناعي، ماذا تقول لهم؟

أقول للشباب الذين يريدون دخول مجال البودكاست والعمل في الإعلام: الميديا تحتاج إلى الإنسان الذي يمتلك “ذكاء اجتماعي”، ويجيد فن الحوار، ويعرف كيف يأخذ ويعطي. لأن الكلام يجب أن يكون تبادليًا، لا مجرد “أنا أتكلم وأتكلم” دون أن أترك مجالا ً للرد. ويجب أن يكون لديه ثقافة، ليس بالضرورة تخصصًا، لكن يعرف بعض الأمور الطبية، بعض الأمور التاريخية، الاجتماعية، الفنية،حتى عندما يتحدث، يكون لديه خلفية، ويكون مدركًا لما يتحدث عنه، لا يبدو كمن يكتشف الكلام لأول مرة أما عن استغلال الذكاء الاصطناعي في البودكاست، فيمكن استخدامه في تأليف موسيقى تتر أو خلفيات صوتية. لكن بودكاست كامل بأفكاره وبنائه بالذكاء الاصطناعي؟ لا أعتقد أنه سيكون مبدعًا أبدًا. يجب أن يجتهد الإنسان قليلا ً ليخرج بشيء مميز. المذيع الذي يريد أن يتعلم الإذاعة، عليه أن يتعلمها. الإذاعة بسيطة وسهلة، لكنها تتطلب شيئين: الحرفية والموهبة. يجب تعلم الحرفة: طريقة الكلام، النقاش، تقسيم المحاور، احترام الرأي الآخر.. إلخ. لكن الموهبة هي التي تطغى على الحرفة، وهي من عند الله. الله يعطيها لإنسان معين، لا تُمنح لأي أحد.

هل ترى أن مستقبل الإعلام الصوتي سيبقى قائمًا على العنصر البشري، أم أن الذكاء الاصطناعي قد يستحوذ عليه؟

الإعلام الصوتي سيظل كما هو، إعلامًا صوتيًا. ما الفائدة من أن أستمع إلى الراديو وتكون كل برامجه مصنوعة بالذكاء الاصطناعي؟ الذكاء الاصطناعي قد يكون مناسبًا في تطبيقات قراءة الكتب، لكنها ستكون مملة، بدون روح، بدون إحساس. الإحساس الذي يصل إلى الإنسان لا يمكن أن ينقله الذكاء الاصطناعي. فأنا شخصيًا جربت كثيرًا، مثلا ً كنا نسجل مواد وثائقية “دوكيومنتريز”، وحاولت بعد تسجيلها أن أستخدم صوتي مع الذكاء الاصطناعي، لكن النتيجة كانت سيئة جدًا جدًا.

بين أصالة الصوت الإذاعي وذكاء الآلة، يبقى الإنسان هو العنصر الحاسم في صناعة المحتوى. الإعلامي القدير أسامة منير ذكّرنا أن التكنولوجيا أداة، وليست بديلا ً ، وأن الرسالة الصادقة لا تولد من الخوارزميات، بل من الإحساس بالناسوفي النهاية، قد تتغير الأدوات وتتطور الوسائل، لكن جوهر الإعلام الحقيقي يظل مرتبطًا بالصدق، والإحساس، والرسالة التي تمس ّ وجدان المتلقي. وبين الذكاء الاصطناعي وذكاء المشاعر، يبقى الخيار أمام الإعلامي: هل يكون مكمّلا ً للتكنولوجيا… أم تابعًا لها

اظهر المزيد

مقالات ذات صلة

زر الذهاب إلى الأعلى