tinymce-rails 4.5.7 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/source/tinymce/tinymce.js +51593 -46263
  3. data/lib/tinymce/rails/helper.rb +1 -0
  4. data/lib/tinymce/rails/version.rb +2 -2
  5. data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +1 -1
  6. data/vendor/assets/javascripts/tinymce/license.txt +6 -6
  7. data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -1
  8. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -1
  9. data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -1
  10. data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -1
  11. data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -1
  12. data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -1
  13. data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -1
  14. data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
  15. data/vendor/assets/javascripts/tinymce/plugins/codesample/css/prism.css +46 -46
  16. data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
  17. data/vendor/assets/javascripts/tinymce/plugins/colorpicker/plugin.js +1 -1
  18. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -1
  19. data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -1
  20. data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -1
  21. data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -1
  22. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -1
  23. data/vendor/assets/javascripts/tinymce/plugins/help/img/logo.png +0 -0
  24. data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +1 -0
  25. data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -1
  26. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -1
  27. data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +2 -1
  28. data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +1 -1
  29. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -1
  30. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -1
  31. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -1
  32. data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -1
  33. data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -1
  34. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -1
  35. data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -1
  36. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -1
  37. data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -1
  38. data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -1
  39. data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -1
  40. data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -1
  41. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -1
  42. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -1
  43. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +1 -1
  44. data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +2 -2
  45. data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -1
  46. data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -1
  47. data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +1 -1
  48. data/vendor/assets/javascripts/tinymce/plugins/toc/plugin.js +1 -1
  49. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/css/visualblocks.css +76 -76
  50. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -1
  51. data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -1
  52. data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -1
  53. data/vendor/assets/javascripts/tinymce/skins/lightgray/content.inline.min.css +1 -1
  54. data/vendor/assets/javascripts/tinymce/skins/lightgray/content.min.css +1 -1
  55. data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.min.css +1 -1
  56. data/vendor/assets/javascripts/tinymce/themes/inlite/theme.js +1 -1
  57. data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +1 -1
  58. data/vendor/assets/javascripts/tinymce/tinymce.js +15 -14
  59. metadata +5 -7
  60. data/vendor/assets/javascripts/tinymce/plugins/example/dialog.html +0 -8
  61. data/vendor/assets/javascripts/tinymce/plugins/example/plugin.js +0 -1
  62. data/vendor/assets/javascripts/tinymce/plugins/example_dependency/plugin.js +0 -1
  63. data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.ie7.min.css +0 -1
@@ -59,5 +59,6 @@ module TinyMCE::Rails
59
59
  # Allow methods to be called as module functions:
60
60
  # e.g. TinyMCE::Rails.tinymce_javascript
61
61
  module_function :tinymce, :tinymce_javascript, :tinymce_configuration
62
+ public :tinymce, :tinymce_javascript, :tinymce_configuration
62
63
  end
63
64
  end
@@ -1,6 +1,6 @@
1
1
  module TinyMCE
2
2
  module Rails
3
- VERSION = "4.5.7"
4
- TINYMCE_VERSION = "4.5.7"
3
+ VERSION = "4.6.0"
4
+ TINYMCE_VERSION = "4.6.0"
5
5
  end
6
6
  end
@@ -1 +1 @@
1
- !function(e){function t(){function t(e){"remove"===e&&this.each(function(e,t){var n=i(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=tinymce.get(t.id.replace(/_parent$/,""));n&&n.remove()})}function r(e){var n,r=this;if(null!=e)t.call(r),r.each(function(t,n){var r;(r=tinymce.get(n.id))&&r.setContent(e)});else if(r.length>0&&(n=tinymce.get(r[0].id)))return n.getContent()}function i(e){var t=null;return e&&e.id&&a.tinymce&&(t=tinymce.get(e.id)),t}function o(e){return!!(e&&e.length&&a.tinymce&&e.is(":tinymce"))}var s={};e.each(["text","html","val"],function(t,a){var l=s[a]=e.fn[a],c="text"===a;e.fn[a]=function(t){var a=this;if(!o(a))return l.apply(a,arguments);if(t!==n)return r.call(a.filter(":tinymce"),t),l.apply(a.not(":tinymce"),arguments),a;var s="",u=arguments;return(c?a:a.eq(0)).each(function(t,n){var r=i(n);s+=r?c?r.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):r.getContent({save:!0}):l.apply(e(n),u)}),s}}),e.each(["append","prepend"],function(t,r){var a=s[r]=e.fn[r],l="prepend"===r;e.fn[r]=function(e){var t=this;return o(t)?e!==n?("string"==typeof e&&t.filter(":tinymce").each(function(t,n){var r=i(n);r&&r.setContent(l?e+r.getContent():r.getContent()+e)}),a.apply(t.not(":tinymce"),arguments),t):void 0:a.apply(t,arguments)}}),e.each(["remove","replaceWith","replaceAll","empty"],function(n,r){var i=s[r]=e.fn[r];e.fn[r]=function(){return t.call(this,r),i.apply(this,arguments)}}),s.attr=e.fn.attr,e.fn.attr=function(t,a){var l=this,c=arguments;if(!t||"value"!==t||!o(l))return a!==n?s.attr.apply(l,c):s.attr.apply(l,c);if(a!==n)return r.call(l.filter(":tinymce"),a),s.attr.apply(l.not(":tinymce"),c),l;var u=l[0],d=i(u);return d?d.getContent({save:!0}):s.attr.apply(e(u),c)}}var n,r,i,o=[],a=window;e.fn.tinymce=function(n){function s(){var r=[],o=0;i||(t(),i=!0),d.each(function(e,t){var i,a=t.id,s=n.oninit;a||(t.id=a=tinymce.DOM.uniqueId()),tinymce.get(a)||(i=new tinymce.Editor(a,n,tinymce.EditorManager),r.push(i),i.on("init",function(){var e,t=s;d.css("visibility",""),s&&++o==r.length&&("string"==typeof t&&(e=t.indexOf(".")===-1?null:tinymce.resolve(t.replace(/\.\w+$/,"")),t=tinymce.resolve(t)),t.apply(e||tinymce,r))}))}),e.each(r,function(e,t){t.render()})}var l,c,u,d=this,f="";if(!d.length)return d;if(!n)return window.tinymce?tinymce.get(d[0].id):null;if(d.css("visibility","hidden"),a.tinymce||r||!(l=n.script_url))1===r?o.push(s):s();else{r=1,c=l.substring(0,l.lastIndexOf("/")),l.indexOf(".min")!=-1&&(f=".min"),a.tinymce=a.tinyMCEPreInit||{base:c,suffix:f},l.indexOf("gzip")!=-1&&(u=n.language||"en",l=l+(/\?/.test(l)?"&":"?")+"js=true&core=true&suffix="+escape(f)+"&themes="+escape(n.theme||"modern")+"&plugins="+escape(n.plugins||"")+"&languages="+(u||""),a.tinyMCE_GZ||(a.tinyMCE_GZ={start:function(){function t(e){tinymce.ScriptLoader.markDone(tinymce.baseURI.toAbsolute(e))}t("langs/"+u+".js"),t("themes/"+n.theme+"/theme"+f+".js"),t("themes/"+n.theme+"/langs/"+u+".js"),e.each(n.plugins.split(","),function(e,n){n&&(t("plugins/"+n+"/plugin"+f+".js"),t("plugins/"+n+"/langs/"+u+".js"))})},end:function(){}}));var p=document.createElement("script");p.type="text/javascript",p.onload=p.onreadystatechange=function(t){t=t||window.event,2===r||"load"!=t.type&&!/complete|loaded/.test(p.readyState)||(tinymce.dom.Event.domLoaded=1,r=2,n.script_loaded&&n.script_loaded(),s(),e.each(o,function(e,t){t()}))},p.src=l,document.body.appendChild(p)}return d},e.extend(e.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in window&&(t=tinymce.get(e.id),t&&t.editorManager===tinymce))}})}(jQuery);
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c;g("0",[],function(){return function(a){function b(){function a(a){"remove"===a&&this.each(function(a,b){var c=d(b);c&&c.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(a,b){var c=h.get(b.id.replace(/_parent$/,""));c&&c.remove()})}function b(b){var c,d=this;if(null!=b)a.call(d),d.each(function(a,c){var d;(d=h.get(c.id))&&d.setContent(b)});else if(d.length>0&&(c=h.get(d[0].id)))return c.getContent()}function d(a){var b=null;return a&&a.id&&g.tinymce&&(b=h.get(a.id)),b}function e(a){return!!(a&&a.length&&g.tinymce&&a.is(":tinymce"))}var i={};f.each(["text","html","val"],function(a,g){var h=i[g]=f.fn[g],j="text"===g;f.fn[g]=function(a){var g=this;if(!e(g))return h.apply(g,arguments);if(a!==c)return b.call(g.filter(":tinymce"),a),h.apply(g.not(":tinymce"),arguments),g;var i="",k=arguments;return(j?g:g.eq(0)).each(function(a,b){var c=d(b);i+=c?j?c.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):c.getContent({save:!0}):h.apply(f(b),k)}),i}}),f.each(["append","prepend"],function(a,b){var g=i[b]=f.fn[b],h="prepend"===b;f.fn[b]=function(a){var b=this;return e(b)?a!==c?("string"==typeof a&&b.filter(":tinymce").each(function(b,c){var e=d(c);e&&e.setContent(h?a+e.getContent():e.getContent()+a)}),g.apply(b.not(":tinymce"),arguments),b):void 0:g.apply(b,arguments)}}),f.each(["remove","replaceWith","replaceAll","empty"],function(b,c){var d=i[c]=f.fn[c];f.fn[c]=function(){return a.call(this,c),d.apply(this,arguments)}}),i.attr=f.fn.attr,f.fn.attr=function(a,g){var h=this,j=arguments;if(!a||"value"!==a||!e(h))return g!==c?i.attr.apply(h,j):i.attr.apply(h,j);if(g!==c)return b.call(h.filter(":tinymce"),g),i.attr.apply(h.not(":tinymce"),j),h;var k=h[0],l=d(k);return l?l.getContent({save:!0}):i.attr.apply(f(k),j)}}var c,d,e,f,g,h,i=[];g=a?a:window,h=g.tinymce,f=g.jQuery,f.fn.tinymce=function(a){function c(){var c=[],d=0;e||(b(),e=!0),m.each(function(b,e){var f,g=e.id,i=a.oninit;g||(e.id=g=h.DOM.uniqueId()),h.get(g)||(f=h.createEditor(g,a),c.push(f),f.on("init",function(){var a,b=i;m.css("visibility",""),i&&++d==c.length&&("string"==typeof b&&(a=b.indexOf(".")===-1?null:h.resolve(b.replace(/\.\w+$/,"")),b=h.resolve(b)),b.apply(a||h,c))}))}),f.each(c,function(a,b){b.render()})}var j,k,l,m=this,n="";if(!m.length)return m;if(!a)return g.tinymce?h.get(m[0].id):null;if(m.css("visibility","hidden"),g.tinymce||d||!(j=a.script_url))1===d?i.push(c):c();else{d=1,k=j.substring(0,j.lastIndexOf("/")),j.indexOf(".min")!=-1&&(n=".min"),g.tinymce=g.tinyMCEPreInit||{base:k,suffix:n},j.indexOf("gzip")!=-1&&(l=a.language||"en",j=j+(/\?/.test(j)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(a.theme||"modern")+"&plugins="+escape(a.plugins||"")+"&languages="+(l||""),g.tinyMCE_GZ||(g.tinyMCE_GZ={start:function(){function b(a){h.ScriptLoader.markDone(h.baseURI.toAbsolute(a))}b("langs/"+l+".js"),b("themes/"+a.theme+"/theme"+n+".js"),b("themes/"+a.theme+"/langs/"+l+".js"),f.each(a.plugins.split(","),function(a,c){c&&(b("plugins/"+c+"/plugin"+n+".js"),b("plugins/"+c+"/langs/"+l+".js"))})},end:function(){}}));var o=document.createElement("script");o.type="text/javascript",o.onload=o.onreadystatechange=function(b){b=b||window.event,2===d||"load"!=b.type&&!/complete|loaded/.test(o.readyState)||(h.dom.Event.domLoaded=1,d=2,a.script_loaded&&a.script_loaded(),c(),f.each(i,function(a,b){b()}))},o.src=j,document.body.appendChild(o)}return m},f.extend(f.expr[":"],{tinymce:function(a){var b;return!!(a.id&&"tinymce"in g&&(b=h.get(a.id),b&&b.editorManager===h))}})}}),d("0")()}();
@@ -1,5 +1,5 @@
1
- GNU LESSER GENERAL PUBLIC LICENSE
2
- Version 2.1, February 1999
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 2.1, February 1999
3
3
 
4
4
  Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5
5
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@@ -10,7 +10,7 @@
10
10
  as the successor of the GNU Library Public License, version 2, hence
11
11
  the version number 2.1.]
12
12
 
13
- Preamble
13
+ Preamble
14
14
 
15
15
  The licenses for most software are designed to take away your
16
16
  freedom to share and change it. By contrast, the GNU General Public
@@ -112,7 +112,7 @@ modification follow. Pay close attention to the difference between a
112
112
  former contains code derived from the library, whereas the latter must
113
113
  be combined with the library in order to run.
114
114
 
115
- GNU LESSER GENERAL PUBLIC LICENSE
115
+ GNU LESSER GENERAL PUBLIC LICENSE
116
116
  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
117
117
 
118
118
  0. This License Agreement applies to any software library or other
@@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
432
432
  of all derivatives of our free software and of promoting the sharing
433
433
  and reuse of software generally.
434
434
 
435
- NO WARRANTY
435
+ NO WARRANTY
436
436
 
437
437
  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
438
438
  WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -455,7 +455,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
455
455
  SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
456
456
  DAMAGES.
457
457
 
458
- END OF TERMS AND CONDITIONS
458
+ END OF TERMS AND CONDITIONS
459
459
 
460
460
  How to Apply These Terms to Your New Libraries
461
461
 
@@ -1 +1 @@
1
- tinymce.PluginManager.add("advlist",function(e){function t(t){return e.$.contains(e.getBody(),t)}function n(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)&&t(e)}function r(e,t){var n=[];return t&&tinymce.each(t.split(/[ ,]/),function(e){n.push({text:e.replace(/\-/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),data:"default"==e?"":e})}),n}function i(t,n){e.undoManager.transact(function(){var r,i=e.dom,o=e.selection;if(r=i.getParent(o.getNode(),"ol,ul"),!r||r.nodeName!=t||n===!1){var a={"list-style-type":n?n:""};e.execCommand("UL"==t?"InsertUnorderedList":"InsertOrderedList",!1,a)}r=i.getParent(o.getNode(),"ol,ul"),r&&tinymce.util.Tools.each(i.select("ol,ul",r).concat([r]),function(e){e.nodeName!==t&&n!==!1&&(e=i.rename(e,t)),i.setStyle(e,"listStyleType",n?n:null),e.removeAttribute("data-mce-style")}),e.focus()})}function o(t){var n=e.dom.getStyle(e.dom.getParent(e.selection.getNode(),"ol,ul"),"listStyleType")||"";t.control.items().each(function(e){e.active(e.settings.data===n)})}var a,s,l=function(e,t){var n=e.settings.plugins?e.settings.plugins:"";return tinymce.util.Tools.inArray(n.split(/[ ,]/),t)!==-1};a=r("OL",e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),s=r("UL",e.getParam("advlist_bullet_styles","default,circle,disc,square"));var c=function(t){return function(){var r=this;e.on("NodeChange",function(e){var i=tinymce.util.Tools.grep(e.parents,n);r.active(i.length>0&&i[0].nodeName===t)})}};l(e,"lists")&&(e.addCommand("ApplyUnorderedListStyle",function(e,t){i("UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(e,t){i("OL",t["list-style-type"])}),e.addButton("numlist",{type:a.length>0?"splitbutton":"button",tooltip:"Numbered list",menu:a,onPostRender:c("OL"),onshow:o,onselect:function(e){i("OL",e.control.settings.data)},onclick:function(){i("OL",!1)}}),e.addButton("bullist",{type:s.length>0?"splitbutton":"button",tooltip:"Bullet list",onPostRender:c("UL"),menu:s,onshow:o,onselect:function(e){i("UL",e.control.settings.data)},onclick:function(){i("UL",!1)}}))});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("advlist",function(a){function c(b){return a.$.contains(a.getBody(),b)}function d(a){return a&&/^(OL|UL|DL)$/.test(a.nodeName)&&c(a)}function e(a,c){var d=[];return c&&b.each(c.split(/[ ,]/),function(a){d.push({text:a.replace(/\-/g," ").replace(/\b\w/g,function(a){return a.toUpperCase()}),data:"default"==a?"":a})}),d}function f(c,d){a.undoManager.transact(function(){var e,f=a.dom,g=a.selection;if(e=f.getParent(g.getNode(),"ol,ul"),!e||e.nodeName!=c||d===!1){var h={"list-style-type":d?d:""};a.execCommand("UL"==c?"InsertUnorderedList":"InsertOrderedList",!1,h)}e=f.getParent(g.getNode(),"ol,ul"),e&&b.each(f.select("ol,ul",e).concat([e]),function(a){a.nodeName!==c&&d!==!1&&(a=f.rename(a,c)),f.setStyle(a,"listStyleType",d?d:null),a.removeAttribute("data-mce-style")}),a.focus()})}function g(b){var c=a.dom.getStyle(a.dom.getParent(a.selection.getNode(),"ol,ul"),"listStyleType")||"";b.control.items().each(function(a){a.active(a.settings.data===c)})}var h,i,j=function(a,c){var d=a.settings.plugins?a.settings.plugins:"";return b.inArray(d.split(/[ ,]/),c)!==-1};h=e("OL",a.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),i=e("UL",a.getParam("advlist_bullet_styles","default,circle,disc,square"));var k=function(c){return function(){var e=this;a.on("NodeChange",function(a){var f=b.grep(a.parents,d);e.active(f.length>0&&f[0].nodeName===c)})}};j(a,"lists")&&(a.addCommand("ApplyUnorderedListStyle",function(a,b){f("UL",b["list-style-type"])}),a.addCommand("ApplyOrderedListStyle",function(a,b){f("OL",b["list-style-type"])}),a.addButton("numlist",{type:h.length>0?"splitbutton":"button",tooltip:"Numbered list",menu:h,onPostRender:k("OL"),onshow:g,onselect:function(a){f("OL",a.control.settings.data)},onclick:function(){f("OL",!1)}}),a.addButton("bullist",{type:i.length>0?"splitbutton":"button",tooltip:"Bullet list",onPostRender:k("UL"),menu:i,onshow:g,onselect:function(a){f("UL",a.control.settings.data)},onclick:function(){f("UL",!1)}}))}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("anchor",function(e){var t=function(e){return!e.attr("href")&&(e.attr("id")||e.attr("name"))&&!e.firstChild},n=function(e){return function(n){for(var r=0;r<n.length;r++)t(n[r])&&n[r].attr("contenteditable",e)}},r=function(e){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(e)},i=function(){var t=e.selection.getNode(),n="A"==t.tagName&&""===e.dom.getAttrib(t,"href"),i="";n&&(i=t.id||t.name||""),e.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:i},onsubmit:function(i){var o=i.data.id;return r(o)?void(n?(t.removeAttribute("name"),t.id=o):(e.selection.collapse(!0),e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{id:o})))):(i.preventDefault(),void e.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."))}})};tinymce.Env.ceFalse&&e.on("PreInit",function(){e.parser.addNodeFilter("a",n("false")),e.serializer.addNodeFilter("a",n(null))}),e.addCommand("mceAnchor",i),e.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:i,stateSelector:"a:not([href])"}),e.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:i})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.Env")}),g("2",["3"],function(a){return a("tinymce.PluginManager")}),g("0",["1","2"],function(a,b){return b.add("anchor",function(b){var c=function(a){return!a.attr("href")&&(a.attr("id")||a.attr("name"))&&!a.firstChild},d=function(a){return function(b){for(var d=0;d<b.length;d++)c(b[d])&&b[d].attr("contenteditable",a)}},e=function(a){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(a)},f=function(){var a=b.selection.getNode(),c="A"==a.tagName&&""===b.dom.getAttrib(a,"href"),d="";c&&(d=a.id||a.name||""),b.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:d},onsubmit:function(d){var f=d.data.id;return e(f)?void(c?(a.removeAttribute("name"),a.id=f):(b.selection.collapse(!0),b.execCommand("mceInsertContent",!1,b.dom.createHTML("a",{id:f})))):(d.preventDefault(),void b.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."))}})};a.ceFalse&&b.on("PreInit",function(){b.parser.addNodeFilter("a",d("false")),b.serializer.addNodeFilter("a",d(null))}),b.addCommand("mceAnchor",f),b.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:f,stateSelector:"a:not([href])"}),b.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:f})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("autolink",function(e){function t(e){i(e,-1,"(",!0)}function n(e){i(e,0,"",!0)}function r(e){i(e,-1,"",!1)}function i(e,t,n){function r(e,t){if(t<0&&(t=0),3==e.nodeType){var n=e.data.length;t>n&&(t=n)}return t}function i(e,t){1!=e.nodeType||e.hasChildNodes()?s.setStart(e,r(e,t)):s.setStartBefore(e)}function o(e,t){1!=e.nodeType||e.hasChildNodes()?s.setEnd(e,r(e,t)):s.setEndAfter(e)}var s,l,c,u,d,f,p,m,g,h;if("A"!=e.selection.getNode().tagName){if(s=e.selection.getRng(!0).cloneRange(),s.startOffset<5){if(m=s.endContainer.previousSibling,!m){if(!s.endContainer.firstChild||!s.endContainer.firstChild.nextSibling)return;m=s.endContainer.firstChild.nextSibling}if(g=m.length,i(m,g),o(m,g),s.endOffset<5)return;l=s.endOffset,u=m}else{if(u=s.endContainer,3!=u.nodeType&&u.firstChild){for(;3!=u.nodeType&&u.firstChild;)u=u.firstChild;3==u.nodeType&&(i(u,0),o(u,u.nodeValue.length))}l=1==s.endOffset?2:s.endOffset-1-t}c=l;do i(u,l>=2?l-2:0),o(u,l>=1?l-1:0),l-=1,h=s.toString();while(" "!=h&&""!==h&&160!=h.charCodeAt(0)&&l-2>=0&&h!=n);s.toString()==n||160==s.toString().charCodeAt(0)?(i(u,l),o(u,c),l+=1):0===s.startOffset?(i(u,0),o(u,c)):(i(u,l),o(u,c)),f=s.toString(),"."==f.charAt(f.length-1)&&o(u,c-1),f=s.toString(),p=f.match(a),p&&("www."==p[1]?p[1]="http://www.":/@$/.test(p[1])&&!/^mailto:/.test(p[1])&&(p[1]="mailto:"+p[1]),d=e.selection.getBookmark(),e.selection.setRng(s),e.execCommand("createlink",!1,p[1]+p[2]),e.settings.default_link_target&&e.dom.setAttrib(e.selection.getNode(),"target",e.settings.default_link_target),e.selection.moveToBookmark(d),e.nodeChanged())}}var o,a=/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;return e.settings.autolink_pattern&&(a=e.settings.autolink_pattern),e.on("keydown",function(t){if(13==t.keyCode)return r(e)}),tinymce.Env.ie?void e.on("focus",function(){if(!o){o=!0;try{e.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(e.on("keypress",function(n){if(41==n.keyCode)return t(e)}),void e.on("keyup",function(t){if(32==t.keyCode)return n(e)}))});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.Env")}),g("2",["3"],function(a){return a("tinymce.PluginManager")}),g("0",["1","2"],function(a,b){return b.add("autolink",function(b){function c(a){f(a,-1,"(",!0)}function d(a){f(a,0,"",!0)}function e(a){f(a,-1,"",!1)}function f(a,b,c){function d(a,b){if(b<0&&(b=0),3==a.nodeType){var c=a.data.length;b>c&&(b=c)}return b}function e(a,b){1!=a.nodeType||a.hasChildNodes()?g.setStart(a,d(a,b)):g.setStartBefore(a)}function f(a,b){1!=a.nodeType||a.hasChildNodes()?g.setEnd(a,d(a,b)):g.setEndAfter(a)}var g,i,j,k,l,m,n,o,p,q;if("A"!=a.selection.getNode().tagName){if(g=a.selection.getRng(!0).cloneRange(),g.startOffset<5){if(o=g.endContainer.previousSibling,!o){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;o=g.endContainer.firstChild.nextSibling}if(p=o.length,e(o,p),f(o,p),g.endOffset<5)return;i=g.endOffset,k=o}else{if(k=g.endContainer,3!=k.nodeType&&k.firstChild){for(;3!=k.nodeType&&k.firstChild;)k=k.firstChild;3==k.nodeType&&(e(k,0),f(k,k.nodeValue.length))}i=1==g.endOffset?2:g.endOffset-1-b}j=i;do e(k,i>=2?i-2:0),f(k,i>=1?i-1:0),i-=1,q=g.toString();while(" "!=q&&""!==q&&160!=q.charCodeAt(0)&&i-2>=0&&q!=c);g.toString()==c||160==g.toString().charCodeAt(0)?(e(k,i),f(k,j),i+=1):0===g.startOffset?(e(k,0),f(k,j)):(e(k,i),f(k,j)),m=g.toString(),"."==m.charAt(m.length-1)&&f(k,j-1),m=g.toString(),n=m.match(h),n&&("www."==n[1]?n[1]="http://www.":/@$/.test(n[1])&&!/^mailto:/.test(n[1])&&(n[1]="mailto:"+n[1]),l=a.selection.getBookmark(),a.selection.setRng(g),a.execCommand("createlink",!1,n[1]+n[2]),a.settings.default_link_target&&a.dom.setAttrib(a.selection.getNode(),"target",a.settings.default_link_target),a.selection.moveToBookmark(l),a.nodeChanged())}}var g,h=/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;return b.settings.autolink_pattern&&(h=b.settings.autolink_pattern),b.on("keydown",function(a){if(13==a.keyCode)return e(b)}),a.ie?void b.on("focus",function(){if(!g){g=!0;try{b.execCommand("AutoUrlDetect",!1,!0)}catch(a){}}}):(b.on("keypress",function(a){if(41==a.keyCode)return c(b)}),void b.on("keyup",function(a){if(32==a.keyCode)return d(b)}))}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("autoresize",function(e){function t(){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}function n(r){var a,s,l,c,u,d,f,p,m,g,h,v,b=tinymce.DOM;if(s=e.getDoc()){if(l=s.body,c=s.documentElement,u=i.autoresize_min_height,!l||r&&"setcontent"===r.type&&r.initial||t())return void(l&&c&&(l.style.overflowY="auto",c.style.overflowY="auto"));f=e.dom.getStyle(l,"margin-top",!0),p=e.dom.getStyle(l,"margin-bottom",!0),m=e.dom.getStyle(l,"padding-top",!0),g=e.dom.getStyle(l,"padding-bottom",!0),h=e.dom.getStyle(l,"border-top-width",!0),v=e.dom.getStyle(l,"border-bottom-width",!0),d=l.offsetHeight+parseInt(f,10)+parseInt(p,10)+parseInt(m,10)+parseInt(g,10)+parseInt(h,10)+parseInt(v,10),(isNaN(d)||d<=0)&&(d=tinymce.Env.ie?l.scrollHeight:tinymce.Env.webkit&&0===l.clientHeight?0:l.offsetHeight),d>i.autoresize_min_height&&(u=d),i.autoresize_max_height&&d>i.autoresize_max_height?(u=i.autoresize_max_height,l.style.overflowY="auto",c.style.overflowY="auto"):(l.style.overflowY="hidden",c.style.overflowY="hidden",l.scrollTop=0),u!==o&&(a=u-o,b.setStyle(e.iframeElement,"height",u+"px"),o=u,tinymce.isWebKit&&a<0&&n(r))}}function r(t,i,o){tinymce.util.Delay.setEditorTimeout(e,function(){n({}),t--?r(t,i,o):o&&o()},i)}var i=e.settings,o=0;e.settings.inline||(i.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),i.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){var t,n;t=e.getParam("autoresize_overflow_padding",1),n=e.getParam("autoresize_bottom_margin",50),t!==!1&&e.dom.setStyles(e.getBody(),{paddingLeft:t,paddingRight:t}),n!==!1&&e.dom.setStyles(e.getBody(),{paddingBottom:n})}),e.on("nodechange setcontent keyup FullscreenStateChanged",n),e.getParam("autoresize_on_init",!0)&&e.on("init",function(){r(20,100,function(){r(5,1e3)})}),e.addCommand("mceAutoResize",n))});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("5",tinymce.util.Tools.resolve),g("1",["5"],function(a){return a("tinymce.dom.DOMUtils")}),g("2",["5"],function(a){return a("tinymce.Env")}),g("3",["5"],function(a){return a("tinymce.PluginManager")}),g("4",["5"],function(a){return a("tinymce.util.Delay")}),g("0",["1","2","3","4"],function(a,b,c,d){var e=a.DOM;return c.add("autoresize",function(a){function c(){return a.plugins.fullscreen&&a.plugins.fullscreen.isFullscreen()}function f(d){var g,j,k,l,m,n,o,p,q,r,s,t;if(j=a.getDoc()){if(k=j.body,l=j.documentElement,m=h.autoresize_min_height,!k||d&&"setcontent"===d.type&&d.initial||c())return void(k&&l&&(k.style.overflowY="auto",l.style.overflowY="auto"));o=a.dom.getStyle(k,"margin-top",!0),p=a.dom.getStyle(k,"margin-bottom",!0),q=a.dom.getStyle(k,"padding-top",!0),r=a.dom.getStyle(k,"padding-bottom",!0),s=a.dom.getStyle(k,"border-top-width",!0),t=a.dom.getStyle(k,"border-bottom-width",!0),n=k.offsetHeight+parseInt(o,10)+parseInt(p,10)+parseInt(q,10)+parseInt(r,10)+parseInt(s,10)+parseInt(t,10),(isNaN(n)||n<=0)&&(n=b.ie?k.scrollHeight:b.webkit&&0===k.clientHeight?0:k.offsetHeight),n>h.autoresize_min_height&&(m=n),h.autoresize_max_height&&n>h.autoresize_max_height?(m=h.autoresize_max_height,k.style.overflowY="auto",l.style.overflowY="auto"):(k.style.overflowY="hidden",l.style.overflowY="hidden",k.scrollTop=0),m!==i&&(g=m-i,e.setStyle(a.iframeElement,"height",m+"px"),i=m,b.webKit&&g<0&&f(d))}}function g(b,c,e){d.setEditorTimeout(a,function(){f({}),b--?g(b,c,e):e&&e()},c)}var h=a.settings,i=0;a.settings.inline||(h.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),h.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),a.on("init",function(){var b,c;b=a.getParam("autoresize_overflow_padding",1),c=a.getParam("autoresize_bottom_margin",50),b!==!1&&a.dom.setStyles(a.getBody(),{paddingLeft:b,paddingRight:b}),c!==!1&&a.dom.setStyles(a.getBody(),{paddingBottom:c})}),a.on("nodechange setcontent keyup FullscreenStateChanged",f),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){g(20,100,function(){g(5,1e3)})}),a.addCommand("mceAutoResize",f))}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce._beforeUnloadHandler=function(){var e;return tinymce.each(tinymce.editors,function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e},tinymce.PluginManager.add("autosave",function(e){function t(e,t){var n={s:1e3,m:6e4};return e=/^(\d+)([ms]?)$/.exec(""+(e||t)),(e[2]?n[e[2]]:1)*parseInt(e,10)}function n(){var e=parseInt(p.getItem(u+"time"),10)||0;return!((new Date).getTime()-e>f.autosave_retention)||(r(!1),!1)}function r(t){p.removeItem(u+"draft"),p.removeItem(u+"time"),t!==!1&&e.fire("RemoveDraft")}function i(){!c()&&e.isDirty()&&(p.setItem(u+"draft",e.getContent({format:"raw",no_events:!0})),p.setItem(u+"time",(new Date).getTime()),e.fire("StoreDraft"))}function o(){n()&&(e.setContent(p.getItem(u+"draft"),{format:"raw"}),e.fire("RestoreDraft"))}function a(){d||(setInterval(function(){e.removed||i()},f.autosave_interval),d=!0)}function s(){var t=this;t.disabled(!n()),e.on("StoreDraft RestoreDraft RemoveDraft",function(){t.disabled(!n())}),a()}function l(){e.undoManager.beforeChange(),o(),r(),e.undoManager.add()}function c(t){var n=e.settings.forced_root_block;return t=tinymce.trim("undefined"==typeof t?e.getBody().innerHTML:t),""===t||new RegExp("^<"+n+"[^>]*>((\xa0|&nbsp;|[ \t]|<br[^>]*>)+?|)</"+n+">|<br>$","i").test(t)}var u,d,f=e.settings,p=tinymce.util.LocalStorage;u=f.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",u=u.replace(/\{path\}/g,document.location.pathname),u=u.replace(/\{query\}/g,document.location.search),u=u.replace(/\{id\}/g,e.id),f.autosave_interval=t(f.autosave_interval,"30s"),f.autosave_retention=t(f.autosave_retention,"20m"),e.addButton("restoredraft",{title:"Restore last draft",onclick:l,onPostRender:s}),e.addMenuItem("restoredraft",{text:"Restore last draft",onclick:l,onPostRender:s,context:"file"}),e.settings.autosave_restore_when_empty!==!1&&(e.on("init",function(){n()&&c()&&o()}),e.on("saveContent",function(){r()})),window.onbeforeunload=tinymce._beforeUnloadHandler,this.hasDraft=n,this.storeDraft=i,this.restoreDraft=o,this.removeDraft=r,this.isEmpty=c});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){return a("tinymce.EditorManager")}),g("2",["6"],function(a){return a("tinymce.PluginManager")}),g("3",["6"],function(a){return a("tinymce.util.LocalStorage")}),g("4",["6"],function(a){return a("tinymce.util.Tools")}),h("5",window),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return a._beforeUnloadHandler=function(){var b;return d.each(a.editors,function(a){a.plugins.autosave&&a.plugins.autosave.storeDraft(),!b&&a.isDirty()&&a.getParam("autosave_ask_before_unload",!0)&&(b=a.translate("You have unsaved changes are you sure you want to navigate away?"))}),b},b.add("autosave",function(b){function f(a,b){var c={s:1e3,m:6e4};return a=/^(\d+)([ms]?)$/.exec(""+(a||b)),(a[2]?c[a[2]]:1)*parseInt(a,10)}function g(){var a=parseInt(c.getItem(o+"time"),10)||0;return!((new Date).getTime()-a>q.autosave_retention)||(h(!1),!1)}function h(a){c.removeItem(o+"draft"),c.removeItem(o+"time"),a!==!1&&b.fire("RemoveDraft")}function i(){!n()&&b.isDirty()&&(c.setItem(o+"draft",b.getContent({format:"raw",no_events:!0})),c.setItem(o+"time",(new Date).getTime()),b.fire("StoreDraft"))}function j(){g()&&(b.setContent(c.getItem(o+"draft"),{format:"raw"}),b.fire("RestoreDraft"))}function k(){p||(setInterval(function(){b.removed||i()},q.autosave_interval),p=!0)}function l(){var a=this;a.disabled(!g()),b.on("StoreDraft RestoreDraft RemoveDraft",function(){a.disabled(!g())}),k()}function m(){b.undoManager.beforeChange(),j(),h(),b.undoManager.add()}function n(a){var c=b.settings.forced_root_block;return a=d.trim("undefined"==typeof a?b.getBody().innerHTML:a),""===a||new RegExp("^<"+c+"[^>]*>((\xa0|&nbsp;|[ \t]|<br[^>]*>)+?|)</"+c+">|<br>$","i").test(a)}var o,p,q=b.settings;o=q.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",o=o.replace(/\{path\}/g,document.location.pathname),o=o.replace(/\{query\}/g,document.location.search),o=o.replace(/\{id\}/g,b.id),q.autosave_interval=f(q.autosave_interval,"30s"),q.autosave_retention=f(q.autosave_retention,"20m"),b.addButton("restoredraft",{title:"Restore last draft",onclick:m,onPostRender:l}),b.addMenuItem("restoredraft",{text:"Restore last draft",onclick:m,onPostRender:l,context:"file"}),b.settings.autosave_restore_when_empty!==!1&&(b.on("init",function(){g()&&n()&&j()}),b.on("saveContent",function(){h()})),e.onbeforeunload=a._beforeUnloadHandler,this.hasDraft=g,this.storeDraft=i,this.restoreDraft=j,this.removeDraft=h,this.isEmpty=n}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- !function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(e){var t=this,n=e.getParam("bbcode_dialect","punbb").toLowerCase();e.on("beforeSetContent",function(e){e.content=t["_"+n+"_bbcode2html"](e.content)}),e.on("postProcess",function(e){e.set&&(e.content=t["_"+n+"_bbcode2html"](e.content)),e.get&&(e.content=t["_"+n+"_html2bbcode"](e.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Ephox Corp",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(e){function t(t,n){e=e.replace(t,n)}return e=tinymce.trim(e),t(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),t(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),t(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),t(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),t(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),t(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),t(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),t(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),t(/<font>(.*?)<\/font>/gi,"$1"),t(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),t(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),t(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),t(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),t(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),t(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),t(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),t(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),t(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),t(/<\/(strong|b)>/gi,"[/b]"),t(/<(strong|b)>/gi,"[b]"),t(/<\/(em|i)>/gi,"[/i]"),t(/<(em|i)>/gi,"[i]"),t(/<\/u>/gi,"[/u]"),t(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),t(/<u>/gi,"[u]"),t(/<blockquote[^>]*>/gi,"[quote]"),t(/<\/blockquote>/gi,"[/quote]"),t(/<br \/>/gi,"\n"),t(/<br\/>/gi,"\n"),t(/<br>/gi,"\n"),t(/<p>/gi,""),t(/<\/p>/gi,"\n"),t(/&nbsp;|\u00a0/gi," "),t(/&quot;/gi,'"'),t(/&lt;/gi,"<"),t(/&gt;/gi,">"),t(/&amp;/gi,"&"),e},_punbb_bbcode2html:function(e){function t(t,n){e=e.replace(t,n)}return e=tinymce.trim(e),t(/\n/gi,"<br />"),t(/\[b\]/gi,"<strong>"),t(/\[\/b\]/gi,"</strong>"),t(/\[i\]/gi,"<em>"),t(/\[\/i\]/gi,"</em>"),t(/\[u\]/gi,"<u>"),t(/\[\/u\]/gi,"</u>"),t(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),t(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),t(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),t(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),t(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;'),t(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;'),e}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}();
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("bbcode",function(){return{init:function(a){var b=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.on("beforeSetContent",function(a){a.content=b["_"+c+"_bbcode2html"](a.content)}),a.on("postProcess",function(a){a.set&&(a.content=b["_"+c+"_bbcode2html"](a.content)),a.get&&(a.content=b["_"+c+"_html2bbcode"](a.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Ephox Corp",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(a){function c(b,c){a=a.replace(b,c)}return a=b.trim(a),c(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),c(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),c(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),c(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),c(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),c(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),c(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),c(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),c(/<font>(.*?)<\/font>/gi,"$1"),c(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),c(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),c(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),c(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),c(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),c(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),c(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),c(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),c(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),c(/<\/(strong|b)>/gi,"[/b]"),c(/<(strong|b)>/gi,"[b]"),c(/<\/(em|i)>/gi,"[/i]"),c(/<(em|i)>/gi,"[i]"),c(/<\/u>/gi,"[/u]"),c(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),c(/<u>/gi,"[u]"),c(/<blockquote[^>]*>/gi,"[quote]"),c(/<\/blockquote>/gi,"[/quote]"),c(/<br \/>/gi,"\n"),c(/<br\/>/gi,"\n"),c(/<br>/gi,"\n"),c(/<p>/gi,""),c(/<\/p>/gi,"\n"),c(/&nbsp;|\u00a0/gi," "),c(/&quot;/gi,'"'),c(/&lt;/gi,"<"),c(/&gt;/gi,">"),c(/&amp;/gi,"&"),a},_punbb_bbcode2html:function(a){function c(b,c){a=a.replace(b,c)}return a=b.trim(a),c(/\n/gi,"<br />"),c(/\[b\]/gi,"<strong>"),c(/\[\/b\]/gi,"</strong>"),c(/\[i\]/gi,"<em>"),c(/\[\/i\]/gi,"</em>"),c(/\[u\]/gi,"<u>"),c(/\[\/u\]/gi,"</u>"),c(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),c(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),c(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),c(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),c(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;'),c(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;'),a}}}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("charmap",function(e){function t(){return[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]]}function n(e){return tinymce.util.Tools.grep(e,function(e){return l(e)&&2==e.length})}function r(e){return l(e)?[].concat(n(e)):"function"==typeof e?e():[]}function i(t){var n=e.settings;return n.charmap&&(t=r(n.charmap)),n.charmap_append?[].concat(t).concat(r(n.charmap_append)):t}function o(){return i(t())}function a(t){e.fire("insertCustomChar",{chr:t}).chr,e.execCommand("mceInsertContent",!1,t)}function s(){function t(e){for(;e;){if("TD"==e.nodeName)return e;e=e.parentNode}}var n,r,i,s;n='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';var l=o(),c=Math.min(l.length,25),u=Math.ceil(l.length/c);for(i=0;i<u;i++){for(n+="<tr>",r=0;r<c;r++){var d=i*c+r;if(d<l.length){var f=l[d],p=f?String.fromCharCode(parseInt(f[0],10)):"&nbsp;";n+='<td title="'+f[1]+'"><div tabindex="-1" title="'+f[1]+'" role="button" data-chr="'+p+'">'+p+"</div></td>"}else n+="<td />"}n+="</tr>"}n+="</tbody></table>";var m={type:"container",html:n,onclick:function(e){var n=e.target;/^(TD|DIV)$/.test(n.nodeName)&&t(n).firstChild&&(a(n.getAttribute("data-chr")),e.ctrlKey||s.close())},onmouseover:function(e){var n=t(e.target);n&&n.firstChild?(s.find("#preview").text(n.firstChild.firstChild.data),s.find("#previewTitle").text(n.title)):(s.find("#preview").text(" "),s.find("#previewTitle").text(" "))}};s=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[m,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"label",name:"previewTitle",text:" ",style:"text-align: center",border:1,minWidth:140,minHeight:80}]}],buttons:[{text:"Close",onclick:function(){s.close()}}]})}var l=tinymce.util.Tools.isArray;return e.addCommand("mceShowCharmap",s),e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"}),{getCharMap:o,insertChar:a}});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("charmap",function(a){function c(){return[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]]}function d(a){return b.grep(a,function(a){return j(a)&&2==a.length})}function e(a){return j(a)?[].concat(d(a)):"function"==typeof a?a():[]}function f(b){var c=a.settings;return c.charmap&&(b=e(c.charmap)),c.charmap_append?[].concat(b).concat(e(c.charmap_append)):b}function g(){return f(c())}function h(b){a.fire("insertCustomChar",{chr:b}).chr,a.execCommand("mceInsertContent",!1,b)}function i(){function b(a){for(;a;){if("TD"==a.nodeName)return a;a=a.parentNode}}var c,d,e,f;c='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';var i=g(),j=Math.min(i.length,25),k=Math.ceil(i.length/j);for(e=0;e<k;e++){for(c+="<tr>",d=0;d<j;d++){var l=e*j+d;if(l<i.length){var m=i[l],n=m?String.fromCharCode(parseInt(m[0],10)):"&nbsp;";c+='<td title="'+m[1]+'"><div tabindex="-1" title="'+m[1]+'" role="button" data-chr="'+n+'">'+n+"</div></td>"}else c+="<td />"}c+="</tr>"}c+="</tbody></table>";var o={type:"container",html:c,onclick:function(a){var c=a.target;if(/^(TD|DIV)$/.test(c.nodeName)){var d=b(c).firstChild;d&&d.hasAttribute("data-chr")&&(h(d.getAttribute("data-chr")),a.ctrlKey||f.close())}},onmouseover:function(a){var c=b(a.target);c&&c.firstChild?(f.find("#preview").text(c.firstChild.firstChild.data),f.find("#previewTitle").text(c.title)):(f.find("#preview").text(" "),f.find("#previewTitle").text(" "))}};f=a.windowManager.open({title:"Special character",spacing:10,padding:10,items:[o,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"label",name:"previewTitle",text:" ",style:"text-align: center",border:1,minWidth:140,minHeight:80}]}],buttons:[{text:"Close",onclick:function(){f.close()}}]})}var j=b.isArray;return a.addCommand("mceShowCharmap",i),a.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),a.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"}),{getCharMap:g,insertChar:h}}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("code",function(e){function t(){var t=e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(t){e.focus(),e.undoManager.transact(function(){e.setContent(t.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}});t.find("#code").value(e.getContent({source_view:!0}))}e.addCommand("mceCodeEditor",t),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:t}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:t})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.dom.DOMUtils")}),g("2",["3"],function(a){return a("tinymce.PluginManager")}),g("0",["1","2"],function(a,b){return b.add("code",function(b){function c(){var c=b.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:b.getParam("code_dialog_width",600),minHeight:b.getParam("code_dialog_height",Math.min(a.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(a){b.focus(),b.undoManager.transact(function(){b.setContent(a.data.code)}),b.selection.setCursorLocation(),b.nodeChanged()}});c.find("#code").value(b.getContent({source_view:!0}))}b.addCommand("mceCodeEditor",c),b.addButton("code",{icon:"code",tooltip:"Source code",onclick:c}),b.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:c})}),function(){}}),d("0")()}();
@@ -7,77 +7,77 @@
7
7
 
8
8
  code[class*="language-"],
9
9
  pre[class*="language-"] {
10
- color: black;
11
- text-shadow: 0 1px white;
12
- font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
13
- direction: ltr;
14
- text-align: left;
15
- white-space: pre;
16
- word-spacing: normal;
17
- word-break: normal;
18
- word-wrap: normal;
19
- line-height: 1.5;
20
-
21
- -moz-tab-size: 4;
22
- -o-tab-size: 4;
23
- tab-size: 4;
24
-
25
- -webkit-hyphens: none;
26
- -moz-hyphens: none;
27
- -ms-hyphens: none;
28
- hyphens: none;
10
+ color: black;
11
+ text-shadow: 0 1px white;
12
+ font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
13
+ direction: ltr;
14
+ text-align: left;
15
+ white-space: pre;
16
+ word-spacing: normal;
17
+ word-break: normal;
18
+ word-wrap: normal;
19
+ line-height: 1.5;
20
+
21
+ -moz-tab-size: 4;
22
+ -o-tab-size: 4;
23
+ tab-size: 4;
24
+
25
+ -webkit-hyphens: none;
26
+ -moz-hyphens: none;
27
+ -ms-hyphens: none;
28
+ hyphens: none;
29
29
  }
30
30
 
31
31
  pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
32
32
  code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
33
- text-shadow: none;
34
- background: #b3d4fc;
33
+ text-shadow: none;
34
+ background: #b3d4fc;
35
35
  }
36
36
 
37
37
  pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
38
38
  code[class*="language-"]::selection, code[class*="language-"] ::selection {
39
- text-shadow: none;
40
- background: #b3d4fc;
39
+ text-shadow: none;
40
+ background: #b3d4fc;
41
41
  }
42
42
 
43
43
  @media print {
44
- code[class*="language-"],
45
- pre[class*="language-"] {
46
- text-shadow: none;
47
- }
44
+ code[class*="language-"],
45
+ pre[class*="language-"] {
46
+ text-shadow: none;
47
+ }
48
48
  }
49
49
 
50
50
  /* Code blocks */
51
51
  pre[class*="language-"] {
52
- padding: 1em;
53
- margin: .5em 0;
54
- overflow: auto;
52
+ padding: 1em;
53
+ margin: .5em 0;
54
+ overflow: auto;
55
55
  }
56
56
 
57
57
  :not(pre) > code[class*="language-"],
58
58
  pre[class*="language-"] {
59
- background: #f5f2f0;
59
+ background: #f5f2f0;
60
60
  }
61
61
 
62
62
  /* Inline code */
63
63
  :not(pre) > code[class*="language-"] {
64
- padding: .1em;
65
- border-radius: .3em;
64
+ padding: .1em;
65
+ border-radius: .3em;
66
66
  }
67
67
 
68
68
  .token.comment,
69
69
  .token.prolog,
70
70
  .token.doctype,
71
71
  .token.cdata {
72
- color: slategray;
72
+ color: slategray;
73
73
  }
74
74
 
75
75
  .token.punctuation {
76
- color: #999;
76
+ color: #999;
77
77
  }
78
78
 
79
79
  .namespace {
80
- opacity: .7;
80
+ opacity: .7;
81
81
  }
82
82
 
83
83
  .token.property,
@@ -87,7 +87,7 @@ pre[class*="language-"] {
87
87
  .token.constant,
88
88
  .token.symbol,
89
89
  .token.deleted {
90
- color: #905;
90
+ color: #905;
91
91
  }
92
92
 
93
93
  .token.selector,
@@ -96,7 +96,7 @@ pre[class*="language-"] {
96
96
  .token.char,
97
97
  .token.builtin,
98
98
  .token.inserted {
99
- color: #690;
99
+ color: #690;
100
100
  }
101
101
 
102
102
  .token.operator,
@@ -104,35 +104,35 @@ pre[class*="language-"] {
104
104
  .token.url,
105
105
  .language-css .token.string,
106
106
  .style .token.string {
107
- color: #a67f59;
108
- background: hsla(0, 0%, 100%, .5);
107
+ color: #a67f59;
108
+ background: hsla(0, 0%, 100%, .5);
109
109
  }
110
110
 
111
111
  .token.atrule,
112
112
  .token.attr-value,
113
113
  .token.keyword {
114
- color: #07a;
114
+ color: #07a;
115
115
  }
116
116
 
117
117
  .token.function {
118
- color: #DD4A68;
118
+ color: #DD4A68;
119
119
  }
120
120
 
121
121
  .token.regex,
122
122
  .token.important,
123
123
  .token.variable {
124
- color: #e90;
124
+ color: #e90;
125
125
  }
126
126
 
127
127
  .token.important,
128
128
  .token.bold {
129
- font-weight: bold;
129
+ font-weight: bold;
130
130
  }
131
131
  .token.italic {
132
- font-style: italic;
132
+ font-style: italic;
133
133
  }
134
134
 
135
135
  .token.entity {
136
- cursor: help;
136
+ cursor: help;
137
137
  }
138
138
 
@@ -1 +1 @@
1
- !function(e,t){"use strict";function n(e,t){for(var n,r=[],o=0;o<e.length;++o){if(n=a[e[o]]||i(e[o]),!n)throw"module definition dependecy not found: "+e[o];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){a[e]=i.apply(null,arguments)})}function i(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function o(n){var r,i,o,s,l;for(r=0;r<n.length;r++){i=e,o=n[r],s=o.split(/[.\/]/);for(var c=0;c<s.length-1;++c)i[s[c]]===t&&(i[s[c]]={}),i=i[s[c]];i[s[s.length-1]]=a[o]}if(e.AMDLC_TESTS){l=e.privateModules||{};for(o in a)l[o]=a[o];for(r=0;r<n.length;r++)delete l[n[r]];e.privateModules=l}}var a={};r("tinymce/codesampleplugin/Prism",[],function(){var e={},t="undefined"!=typeof e?e:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},n=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,n=t.Prism={util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var t=n.util.type(e);switch(t){case"Object":var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=n.util.clone(e[i]));return r;case"Array":return e.map&&e.map(function(e){return n.util.clone(e)})}return e}},languages:{extend:function(e,t){var r=n.util.clone(n.languages[e]);for(var i in t)r[i]=t[i];return r},insertBefore:function(e,t,r,i){i=i||n.languages;var o=i[e];if(2==arguments.length){r=arguments[1];for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o}var s={};for(var l in o)if(o.hasOwnProperty(l)){if(l==t)for(var a in r)r.hasOwnProperty(a)&&(s[a]=r[a]);s[l]=o[l]}return n.languages.DFS(n.languages,function(t,n){n===i[e]&&t!=e&&(this[t]=s)}),i[e]=s},DFS:function(e,t,r){for(var i in e)e.hasOwnProperty(i)&&(t.call(e,i,e[i],r||i),"Object"===n.util.type(e[i])?n.languages.DFS(e[i],t):"Array"===n.util.type(e[i])&&n.languages.DFS(e[i],t,i))}},plugins:{},highlightAll:function(e,t){for(var r,i=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),o=0;r=i[o++];)n.highlightElement(r,e===!0,t)},highlightElement:function(r,i,o){for(var a,s,l=r;l&&!e.test(l.className);)l=l.parentNode;l&&(a=(l.className.match(e)||[,""])[1],s=n.languages[a]),r.className=r.className.replace(e,"").replace(/\s+/g," ")+" language-"+a,l=r.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(e,"").replace(/\s+/g," ")+" language-"+a);var c=r.textContent,u={element:r,language:a,grammar:s,code:c};if(!c||!s)return void n.hooks.run("complete",u);if(n.hooks.run("before-highlight",u),i&&t.Worker){var d=new Worker(n.filename);d.onmessage=function(e){u.highlightedCode=e.data,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,o&&o.call(u.element),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},d.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else u.highlightedCode=n.highlight(u.code,u.grammar,u.language),n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,o&&o.call(r),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},highlight:function(e,t,i){var o=n.tokenize(e,t);return r.stringify(n.util.encode(o),i)},tokenize:function(e,t,r){var i=n.Token,o=[e],a=t.rest;if(a){for(var s in a)t[s]=a[s];delete t.rest}e:for(var s in t)if(t.hasOwnProperty(s)&&t[s]){var l=t[s];l="Array"===n.util.type(l)?l:[l];for(var c=0;c<l.length;++c){var u=l[c],d=u.inside,f=!!u.lookbehind,p=0,m=u.alias;u=u.pattern||u;for(var g=0;g<o.length;g++){var h=o[g];if(o.length>e.length)break e;if(!(h instanceof i)){u.lastIndex=0;var v=u.exec(h);if(v){f&&(p=v[1].length);var b=v.index-1+p,v=v[0].slice(p),y=v.length,x=b+y,C=h.slice(0,b+1),w=h.slice(x+1),N=[g,1];C&&N.push(C);var k=new i(s,d?n.tokenize(v,d):v,m);N.push(k),w&&N.push(w),Array.prototype.splice.apply(o,N)}}}}}return o},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var i,o=0;i=r[o++];)i(t)}}},r=n.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(r.stringify=function(e,t,i){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var o={type:e.type,content:r.stringify(e.content,t,i),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:i};if("comment"==o.type&&(o.attributes.spellcheck="true"),e.alias){var a="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(o.classes,a)}n.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=(s?" ":"")+l+'="'+(o.attributes[l]||"")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'" '+s+">"+o.content+"</"+o.tag+">"},!t.document)return t.addEventListener?(t.addEventListener("message",function(e){var r=JSON.parse(e.data),i=r.language,o=r.code,a=r.immediateClose;t.postMessage(n.highlight(o,n.languages[i],i)),a&&t.close()},!1),t.Prism):t.Prism}();return"undefined"!=typeof module&&module.exports&&(module.exports=n),"undefined"!=typeof global&&(global.Prism=n),n.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},n.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),n.languages.xml=n.languages.markup,n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},n.languages.css.atrule.inside.rest=n.util.clone(n.languages.css),n.languages.markup&&(n.languages.insertBefore("markup","tag",{style:{pattern:/<style[\w\W]*?>[\w\W]*?<\/style>/i,inside:{tag:{pattern:/<style[\w\W]*?>|<\/style>/i,inside:n.languages.markup.tag.inside},rest:n.languages.css},alias:"language-css"}}),n.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:n.languages.css}},alias:"language-css"}},n.languages.markup.tag)),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),n.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),n.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}}}),n.languages.markup&&n.languages.insertBefore("markup","tag",{script:{pattern:/<script[\w\W]*?>[\w\W]*?<\/script>/i,inside:{tag:{pattern:/<script[\w\W]*?>|<\/script>/i,inside:n.languages.markup.tag.inside},rest:n.languages.javascript},alias:"language-javascript"}}),n.languages.js=n.languages.javascript,n.languages.c=n.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),n.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0}}}}),delete n.languages.c["class-name"],delete n.languages.c["boolean"],n.languages.csharp=n.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+)\b/i}),n.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0}}),n.languages.cpp=n.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),n.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}),n.languages.java=n.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),n.languages.php=n.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),n.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),n.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),n.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),n.languages.markup&&(n.hooks.add("before-highlight",function(e){"php"===e.language&&(e.tokenStack=[],e.backupCode=e.code,e.code=e.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(t){return e.tokenStack.push(t),"{{{PHP"+e.tokenStack.length+"}}}"}))}),n.hooks.add("before-insert",function(e){"php"===e.language&&(e.code=e.backupCode,delete e.backupCode)}),n.hooks.add("after-highlight",function(e){if("php"===e.language){for(var t,r=0;t=e.tokenStack[r];r++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(r+1)+"}}}",n.highlight(t,e.grammar,"php").replace(/\$/g,"$$$$"));e.element.innerHTML=e.highlightedCode}}),n.hooks.add("wrap",function(e){"php"===e.language&&"markup"===e.type&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'<span class="token php">$1</span>'))}),n.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:n.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})),n.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/},function(e){e.languages.ruby=e.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var t={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.util.clone(e.languages.ruby)}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:t}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:t}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:t}}]}(n),n}),r("tinymce/codesampleplugin/Utils",[],function(){function e(e){return e&&"PRE"==e.nodeName&&e.className.indexOf("language-")!==-1}function t(e){return function(t,n){return e(n)}}return{isCodeSample:e,trimArg:t}}),r("tinymce/codesampleplugin/Dialog",["tinymce/dom/DOMUtils","tinymce/codesampleplugin/Utils","tinymce/codesampleplugin/Prism"],function(e,t,n){function r(e){var t=[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}],n=e.settings.codesample_languages;return n?n:t}function i(e,t,r){e.undoManager.transact(function(){var i=o(e);r=l.encode(r),i?(e.dom.setAttrib(i,"class","language-"+t),i.innerHTML=r,n.highlightElement(i),e.selection.select(i)):(e.insertContent('<pre id="__new" class="language-'+t+'">'+r+"</pre>"),e.selection.select(e.$("#__new").removeAttr("id")[0]))})}function o(e){var n=e.selection.getNode();return t.isCodeSample(n)?n:null}function a(e){var t=o(e);return t?t.textContent:""}function s(e){var t,n=o(e);return n?(t=n.className.match(/language-(\w+)/),t?t[1]:""):""}var l=e.DOM;return{open:function(e){e.windowManager.open({title:"Insert/Edit code sample",minWidth:Math.min(l.getViewPort().w,e.getParam("codesample_dialog_width",800)),minHeight:Math.min(l.getViewPort().h,e.getParam("codesample_dialog_height",650)),layout:"flex",direction:"column",align:"stretch",body:[{type:"listbox",name:"language",label:"Language",maxWidth:200,value:s(e),values:r(e)},{type:"textbox",name:"code",multiline:!0,spellcheck:!1,ariaLabel:"Code view",flex:1,style:"direction: ltr; text-align: left",classes:"monospace",value:a(e),autofocus:!0}],onSubmit:function(t){i(e,t.data.language,t.data.code)}})}}}),r("tinymce/codesampleplugin/Plugin",["tinymce/Env","tinymce/PluginManager","tinymce/codesampleplugin/Prism","tinymce/codesampleplugin/Dialog","tinymce/codesampleplugin/Utils"],function(e,t,n,r,i){var o,a=i.trimArg;t.add("codesample",function(t,s){function l(){var e,n=t.settings.codesample_content_css;t.inline&&o||!t.inline&&c||(t.inline?o=!0:c=!0,n!==!1&&(e=t.dom.create("link",{rel:"stylesheet",href:n?n:s+"/css/prism.css"}),t.getDoc().getElementsByTagName("head")[0].appendChild(e)))}var c,u=t.$;e.ceFalse&&(t.on("PreProcess",function(e){u("pre[contenteditable=false]",e.node).filter(a(i.isCodeSample)).each(function(e,t){var n=u(t),r=t.textContent;n.attr("class",u.trim(n.attr("class"))),n.removeAttr("contentEditable"),n.empty().append(u("<code></code>").each(function(){this.textContent=r}))})}),t.on("SetContent",function(){var e=u("pre").filter(a(i.isCodeSample)).filter(function(e,t){return"false"!==t.contentEditable});e.length&&t.undoManager.transact(function(){e.each(function(e,r){u(r).find("br").each(function(e,n){n.parentNode.replaceChild(t.getDoc().createTextNode("\n"),n)}),r.contentEditable=!1,r.innerHTML=t.dom.encode(r.textContent),n.highlightElement(r),r.className=u.trim(r.className)})})}),t.addCommand("codesample",function(){var e=t.selection.getNode();t.selection.isCollapsed()||i.isCodeSample(e)?r.open(t):t.formatter.toggle("code")}),t.addButton("codesample",{cmd:"codesample",title:"Insert/Edit code sample"}),t.on("init",l))})}),o(["tinymce/codesampleplugin/Prism","tinymce/codesampleplugin/Utils","tinymce/codesampleplugin/Dialog","tinymce/codesampleplugin/Plugin"])}(window);
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){return a("tinymce.Env")}),g("2",["6"],function(a){return a("tinymce.PluginManager")}),g("3",[],function(){var a={},b="undefined"!=typeof a?a:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},c=function(){var a=/\blang(?:uage)?-(?!\*)(\w+)\b/i,c=b.Prism={util:{encode:function(a){return a instanceof d?new d(a.type,c.util.encode(a.content),a.alias):"Array"===c.util.type(a)?a.map(c.util.encode):a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(a){return Object.prototype.toString.call(a).match(/\[object (\w+)\]/)[1]},clone:function(a){var b=c.util.type(a);switch(b){case"Object":var d={};for(var e in a)a.hasOwnProperty(e)&&(d[e]=c.util.clone(a[e]));return d;case"Array":return a.map&&a.map(function(a){return c.util.clone(a)})}return a}},languages:{extend:function(a,b){var d=c.util.clone(c.languages[a]);for(var e in b)d[e]=b[e];return d},insertBefore:function(a,b,d,e){e=e||c.languages;var f=e[a];if(2==arguments.length){d=arguments[1];for(var g in d)d.hasOwnProperty(g)&&(f[g]=d[g]);return f}var h={};for(var i in f)if(f.hasOwnProperty(i)){if(i==b)for(var g in d)d.hasOwnProperty(g)&&(h[g]=d[g]);h[i]=f[i]}return c.languages.DFS(c.languages,function(b,c){c===e[a]&&b!=a&&(this[b]=h)}),e[a]=h},DFS:function(a,b,d){for(var e in a)a.hasOwnProperty(e)&&(b.call(a,e,a[e],d||e),"Object"===c.util.type(a[e])?c.languages.DFS(a[e],b):"Array"===c.util.type(a[e])&&c.languages.DFS(a[e],b,e))}},plugins:{},highlightAll:function(a,b){for(var d,e=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),f=0;d=e[f++];)c.highlightElement(d,a===!0,b)},highlightElement:function(d,e,f){for(var g,h,i=d;i&&!a.test(i.className);)i=i.parentNode;i&&(g=(i.className.match(a)||[,""])[1],h=c.languages[g]),d.className=d.className.replace(a,"").replace(/\s+/g," ")+" language-"+g,i=d.parentNode,/pre/i.test(i.nodeName)&&(i.className=i.className.replace(a,"").replace(/\s+/g," ")+" language-"+g);var j=d.textContent,k={element:d,language:g,grammar:h,code:j};if(!j||!h)return void c.hooks.run("complete",k);if(c.hooks.run("before-highlight",k),e&&b.Worker){var l=new Worker(c.filename);l.onmessage=function(a){k.highlightedCode=a.data,c.hooks.run("before-insert",k),k.element.innerHTML=k.highlightedCode,f&&f.call(k.element),c.hooks.run("after-highlight",k),c.hooks.run("complete",k)},l.postMessage(JSON.stringify({language:k.language,code:k.code,immediateClose:!0}))}else k.highlightedCode=c.highlight(k.code,k.grammar,k.language),c.hooks.run("before-insert",k),k.element.innerHTML=k.highlightedCode,f&&f.call(d),c.hooks.run("after-highlight",k),c.hooks.run("complete",k)},highlight:function(a,b,e){var f=c.tokenize(a,b);return d.stringify(c.util.encode(f),e)},tokenize:function(a,b,d){var e=c.Token,f=[a],g=b.rest;if(g){for(var h in g)b[h]=g[h];delete b.rest}a:for(var h in b)if(b.hasOwnProperty(h)&&b[h]){var i=b[h];i="Array"===c.util.type(i)?i:[i];for(var j=0;j<i.length;++j){var k=i[j],l=k.inside,m=!!k.lookbehind,n=0,o=k.alias;k=k.pattern||k;for(var p=0;p<f.length;p++){var q=f[p];if(f.length>a.length)break a;if(!(q instanceof e)){k.lastIndex=0;var r=k.exec(q);if(r){m&&(n=r[1].length);var s=r.index-1+n,r=r[0].slice(n),t=r.length,u=s+t,v=q.slice(0,s+1),w=q.slice(u+1),x=[p,1];v&&x.push(v);var y=new e(h,l?c.tokenize(r,l):r,o);x.push(y),w&&x.push(w),Array.prototype.splice.apply(f,x)}}}}}return f},hooks:{all:{},add:function(a,b){var d=c.hooks.all;d[a]=d[a]||[],d[a].push(b)},run:function(a,b){var d=c.hooks.all[a];if(d&&d.length)for(var e,f=0;e=d[f++];)e(b)}}},d=c.Token=function(a,b,c){this.type=a,this.content=b,this.alias=c};if(d.stringify=function(a,b,e){if("string"==typeof a)return a;if("Array"===c.util.type(a))return a.map(function(c){return d.stringify(c,b,a)}).join("");var f={type:a.type,content:d.stringify(a.content,b,e),tag:"span",classes:["token",a.type],attributes:{},language:b,parent:e};if("comment"==f.type&&(f.attributes.spellcheck="true"),a.alias){var g="Array"===c.util.type(a.alias)?a.alias:[a.alias];Array.prototype.push.apply(f.classes,g)}c.hooks.run("wrap",f);var h="";for(var i in f.attributes)h+=(h?" ":"")+i+'="'+(f.attributes[i]||"")+'"';return"<"+f.tag+' class="'+f.classes.join(" ")+'" '+h+">"+f.content+"</"+f.tag+">"},!b.document)return b.addEventListener?(b.addEventListener("message",function(a){var d=JSON.parse(a.data),e=d.language,f=d.code,g=d.immediateClose;b.postMessage(c.highlight(f,c.languages[e],e)),g&&b.close()},!1),b.Prism):b.Prism}();return"undefined"!=typeof module&&module.exports&&(module.exports=c),"undefined"!=typeof global&&(global.Prism=c),c.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},c.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),c.languages.xml=c.languages.markup,c.languages.html=c.languages.markup,c.languages.mathml=c.languages.markup,c.languages.svg=c.languages.markup,c.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},c.languages.css.atrule.inside.rest=c.util.clone(c.languages.css),c.languages.markup&&(c.languages.insertBefore("markup","tag",{style:{pattern:/<style[\w\W]*?>[\w\W]*?<\/style>/i,inside:{tag:{pattern:/<style[\w\W]*?>|<\/style>/i,inside:c.languages.markup.tag.inside},rest:c.languages.css},alias:"language-css"}}),c.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:c.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:c.languages.css}},alias:"language-css"}},c.languages.markup.tag)),c.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},c.languages.javascript=c.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),c.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),c.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:c.languages.javascript}},string:/[\s\S]+/}}}),c.languages.markup&&c.languages.insertBefore("markup","tag",{script:{pattern:/<script[\w\W]*?>[\w\W]*?<\/script>/i,inside:{tag:{pattern:/<script[\w\W]*?>|<\/script>/i,inside:c.languages.markup.tag.inside},rest:c.languages.javascript},alias:"language-javascript"}}),c.languages.js=c.languages.javascript,c.languages.c=c.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),c.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0}}}}),delete c.languages.c["class-name"],delete c.languages.c["boolean"],c.languages.csharp=c.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+)\b/i}),c.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0}}),c.languages.cpp=c.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),c.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}),c.languages.java=c.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),c.languages.php=c.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),c.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),c.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),c.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),c.languages.markup&&(c.hooks.add("before-highlight",function(a){"php"===a.language&&(a.tokenStack=[],a.backupCode=a.code,a.code=a.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(b){return a.tokenStack.push(b),"{{{PHP"+a.tokenStack.length+"}}}"}))}),c.hooks.add("before-insert",function(a){"php"===a.language&&(a.code=a.backupCode,delete a.backupCode)}),c.hooks.add("after-highlight",function(a){if("php"===a.language){for(var b,d=0;b=a.tokenStack[d];d++)a.highlightedCode=a.highlightedCode.replace("{{{PHP"+(d+1)+"}}}",c.highlight(b,a.grammar,"php").replace(/\$/g,"$$$$"));a.element.innerHTML=a.highlightedCode}}),c.hooks.add("wrap",function(a){"php"===a.language&&"markup"===a.type&&(a.content=a.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'<span class="token php">$1</span>'))}),c.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:c.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})),c.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/},function(a){a.languages.ruby=a.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var b={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:a.util.clone(a.languages.ruby)}};a.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:b}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),a.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),a.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:b}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:b}}]}(c),c}),g("7",["6"],function(a){return a("tinymce.dom.DOMUtils")}),g("5",[],function(){function a(a){return a&&"PRE"==a.nodeName&&a.className.indexOf("language-")!==-1}function b(a){return function(b,c){return a(c)}}return{isCodeSample:a,trimArg:b}}),g("4",["7","3","5"],function(a,b,c){function d(a){var b=[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}],c=a.settings.codesample_languages;return c?c:b}function e(a,c,d){a.undoManager.transact(function(){var e=f(a);d=i.encode(d),e?(a.dom.setAttrib(e,"class","language-"+c),e.innerHTML=d,b.highlightElement(e),a.selection.select(e)):(a.insertContent('<pre id="__new" class="language-'+c+'">'+d+"</pre>"),a.selection.select(a.$("#__new").removeAttr("id")[0]))})}function f(a){var b=a.selection.getNode();return c.isCodeSample(b)?b:null}function g(a){var b=f(a);return b?b.textContent:""}function h(a){var b,c=f(a);return c?(b=c.className.match(/language-(\w+)/),b?b[1]:""):""}var i=a.DOM;return{open:function(a){a.windowManager.open({title:"Insert/Edit code sample",minWidth:Math.min(i.getViewPort().w,a.getParam("codesample_dialog_width",800)),minHeight:Math.min(i.getViewPort().h,a.getParam("codesample_dialog_height",650)),layout:"flex",direction:"column",align:"stretch",body:[{type:"listbox",name:"language",label:"Language",maxWidth:200,value:h(a),values:d(a)},{type:"textbox",name:"code",multiline:!0,spellcheck:!1,ariaLabel:"Code view",flex:1,style:"direction: ltr; text-align: left",classes:"monospace",value:g(a),autofocus:!0}],onSubmit:function(b){e(a,b.data.language,b.data.code)}})}}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){var f,g=e.trimArg;return b.add("codesample",function(b,h){function i(){var a,c=b.settings.codesample_content_css;b.inline&&f||!b.inline&&j||(b.inline?f=!0:j=!0,c!==!1&&(a=b.dom.create("link",{rel:"stylesheet",href:c?c:h+"/css/prism.css"}),b.getDoc().getElementsByTagName("head")[0].appendChild(a)))}var j,k=b.$;a.ceFalse&&(b.on("PreProcess",function(a){k("pre[contenteditable=false]",a.node).filter(g(e.isCodeSample)).each(function(a,b){var c=k(b),d=b.textContent;c.attr("class",k.trim(c.attr("class"))),c.removeAttr("contentEditable"),c.empty().append(k("<code></code>").each(function(){this.textContent=d}))})}),b.on("SetContent",function(){var a=k("pre").filter(g(e.isCodeSample)).filter(function(a,b){return"false"!==b.contentEditable});a.length&&b.undoManager.transact(function(){a.each(function(a,d){k(d).find("br").each(function(a,c){c.parentNode.replaceChild(b.getDoc().createTextNode("\n"),c)}),d.contentEditable=!1,d.innerHTML=b.dom.encode(d.textContent),c.highlightElement(d),d.className=k.trim(d.className)})})}),b.addCommand("codesample",function(){var a=b.selection.getNode();b.selection.isCollapsed()||e.isCodeSample(a)?d.open(b):b.formatter.toggle("code")}),b.addButton("codesample",{cmd:"codesample",title:"Insert/Edit code sample"}),b.on("init",i))}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("colorpicker",function(e){function t(t,n){function r(e){var t=new tinymce.util.Color(e),n=t.toRgb();o.fromJSON({r:n.r,g:n.g,b:n.b,hex:t.toHex().substr(1)}),i(t.toHex())}function i(e){o.find("#preview")[0].getEl().style.background=e}var o=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:n,onchange:function(){var e=this.rgb();o&&(o.find("#r").value(e.r),o.find("#g").value(e.g),o.find("#b").value(e.b),o.find("#hex").value(this.value().substr(1)),i(this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,t,n=o.find("colorpicker")[0];return e=this.name(),t=this.value(),"hex"==e?(t="#"+t,r(t),void n.value(t)):(t={r:o.find("#r").value(),g:o.find("#g").value(),b:o.find("#b").value()},n.value(t),void r(t))}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){t("#"+this.toJSON().hex)}});r(n)}e.settings.color_picker_callback||(e.settings.color_picker_callback=t)});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Color")}),g("0",["1","2"],function(a,b){return a.add("colorpicker",function(a){function c(c,d){function e(a){var c=new b(a),d=c.toRgb();g.fromJSON({r:d.r,g:d.g,b:d.b,hex:c.toHex().substr(1)}),f(c.toHex())}function f(a){g.find("#preview")[0].getEl().style.background=a}var g=a.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:d,onchange:function(){var a=this.rgb();g&&(g.find("#r").value(a.r),g.find("#g").value(a.g),g.find("#b").value(a.b),g.find("#hex").value(this.value().substr(1)),f(this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var a,b,c=g.find("colorpicker")[0];return a=this.name(),b=this.value(),"hex"==a?(b="#"+b,e(b),void c.value(b)):(b={r:g.find("#r").value(),g:g.find("#g").value(),b:g.find("#b").value()},c.value(b),void e(b))}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){c("#"+this.toJSON().hex)}});e(d)}a.settings.color_picker_callback||(a.settings.color_picker_callback=c)}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("contextmenu",function(e){var t,n,r=e.settings.contextmenu_never_use_native,i=function(e){return e.ctrlKey&&!r},o=function(){return tinymce.Env.mac&&tinymce.Env.webkit},a=function(){return n===!0};return e.on("mousedown",function(t){o()&&2===t.button&&!i(t)&&e.selection.isCollapsed()&&e.once("contextmenu",function(t){e.selection.placeCaretAt(t.clientX,t.clientY)})}),e.on("contextmenu",function(r){var o;if(!i(r)){if(r.preventDefault(),o=e.settings.contextmenu||"link openlink image inserttable | cell row column deletetable",t)t.show();else{var a=[];tinymce.each(o.split(/[ ,]/),function(t){var n=e.menuItems[t];"|"==t&&(n={text:t}),n&&(n.shortcut="",a.push(n))});for(var s=0;s<a.length;s++)"|"==a[s].text&&(0!==s&&s!=a.length-1||a.splice(s,1));t=new tinymce.ui.Menu({items:a,context:"contextmenu",classes:"contextmenu"}).renderTo(),t.on("hide",function(e){e.control===this&&(n=!1)}),e.on("remove",function(){t.remove(),t=null})}var l={x:r.pageX,y:r.pageY};e.inline||(l=tinymce.DOM.getPos(e.getContentAreaContainer()),l.x+=r.clientX,l.y+=r.clientY),t.moveTo(l.x,l.y),n=!0}}),{isContextMenuVisible:a}});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){return a("tinymce.dom.DOMUtils")}),g("2",["6"],function(a){return a("tinymce.Env")}),g("3",["6"],function(a){return a("tinymce.PluginManager")}),g("4",["6"],function(a){return a("tinymce.ui.Menu")}),g("5",["6"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){var f=a.DOM;return c.add("contextmenu",function(a){var c,g,h=a.settings.contextmenu_never_use_native,i=function(a){return a.ctrlKey&&!h},j=function(){return b.mac&&b.webkit},k=function(){return g===!0};return a.on("mousedown",function(b){j()&&2===b.button&&!i(b)&&a.selection.isCollapsed()&&a.once("contextmenu",function(b){a.selection.placeCaretAt(b.clientX,b.clientY)})}),a.on("contextmenu",function(b){var h;if(!i(b)){if(b.preventDefault(),h=a.settings.contextmenu||"link openlink image inserttable | cell row column deletetable",c)c.show();else{var j=[];e.each(h.split(/[ ,]/),function(b){var c=a.menuItems[b];"|"==b&&(c={text:b}),c&&(c.shortcut="",j.push(c))});for(var k=0;k<j.length;k++)"|"==j[k].text&&(0!==k&&k!=j.length-1||j.splice(k,1));c=new d({items:j,context:"contextmenu",classes:"contextmenu"}).renderTo(),c.on("hide",function(a){a.control===this&&(g=!1)}),a.on("remove",function(){c.remove(),c=null})}var l={x:b.pageX,y:b.pageY};a.inline||(l=f.getPos(a.getContentAreaContainer()),l.x+=b.clientX,l.y+=b.clientY),c.moveTo(l.x,l.y),g=!0}}),{isContextMenuVisible:k}}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("directionality",function(e){function t(t){var n,r=e.dom,i=e.selection.getSelectedBlocks();i.length&&(n=r.getAttrib(i[0],"dir"),tinymce.each(i,function(e){r.getParent(e.parentNode,"*[dir='"+t+"']",r.getRoot())||(n!=t?r.setAttrib(e,"dir",t):r.setAttrib(e,"dir",null))}),e.nodeChanged())}function n(e){var t=[];return tinymce.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(n){t.push(n+"[dir="+e+"]")}),t.join(",")}e.addCommand("mceDirectionLTR",function(){t("ltr")}),e.addCommand("mceDirectionRTL",function(){t("rtl")}),e.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:n("ltr")}),e.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:n("rtl")})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("directionality",function(a){function c(c){var d,e=a.dom,f=a.selection.getSelectedBlocks();f.length&&(d=e.getAttrib(f[0],"dir"),b.each(f,function(a){e.getParent(a.parentNode,"*[dir='"+c+"']",e.getRoot())||(d!=c?e.setAttrib(a,"dir",c):e.setAttrib(a,"dir",null))}),a.nodeChanged())}function d(a){var c=[];return b.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(b){c.push(b+"[dir="+a+"]")}),c.join(",")}a.addCommand("mceDirectionLTR",function(){c("ltr")}),a.addCommand("mceDirectionRTL",function(){c("rtl")}),a.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:d("ltr")}),a.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:d("rtl")})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("emoticons",function(e,t){function n(){var e;return e='<table role="list" class="mce-grid">',tinymce.each(r,function(n){e+="<tr>",tinymce.each(n,function(n){var r=t+"/img/smiley-"+n+".gif";e+='<td><a href="#" data-mce-url="'+r+'" data-mce-alt="'+n+'" tabindex="-1" role="option" aria-label="'+n+'"><img src="'+r+'" style="width: 18px; height: 18px" role="presentation" /></a></td>'}),e+="</tr>"}),e+="</table>"}var r=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];e.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:n,onclick:function(t){var n=e.dom.getParent(t.target,"a");n&&(e.insertContent('<img src="'+n.getAttribute("data-mce-url")+'" alt="'+n.getAttribute("data-mce-alt")+'" />'),this.hide())}},tooltip:"Emoticons"})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("emoticons",function(a,c){function d(){var a;return a='<table role="list" class="mce-grid">',b.each(e,function(d){a+="<tr>",b.each(d,function(b){var d=c+"/img/smiley-"+b+".gif";a+='<td><a href="#" data-mce-url="'+d+'" data-mce-alt="'+b+'" tabindex="-1" role="option" aria-label="'+b+'"><img src="'+d+'" style="width: 18px; height: 18px" role="presentation" /></a></td>'}),a+="</tr>"}),a+="</table>"}var e=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:d,onclick:function(b){var c=a.dom.getParent(b.target,"a");c&&(a.insertContent('<img src="'+c.getAttribute("data-mce-url")+'" alt="'+c.getAttribute("data-mce-alt")+'" />'),this.hide())}},tooltip:"Emoticons"})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("fullpage",function(e){function t(){var t=n();e.windowManager.open({title:"Document properties",data:t,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(e){r(tinymce.extend(t,e.data))}})}function n(){function t(e,t){var n=e.attr(t);return n||""}var n,r,o=i(),a={};return a.fontface=e.getParam("fullpage_default_fontface",""),a.fontsize=e.getParam("fullpage_default_fontsize",""),n=o.firstChild,7==n.type&&(a.xml_pi=!0,r=/encoding="([^"]+)"/.exec(n.value),r&&(a.docencoding=r[1])),n=o.getAll("#doctype")[0],n&&(a.doctype="<!DOCTYPE"+n.value+">"),n=o.getAll("title")[0],n&&n.firstChild&&(a.title=n.firstChild.value),u(o.getAll("meta"),function(e){var t,n=e.attr("name"),r=e.attr("http-equiv");n?a[n.toLowerCase()]=e.attr("content"):"Content-Type"==r&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")),t&&(a.docencoding=t[1]))}),n=o.getAll("html")[0],n&&(a.langcode=t(n,"lang")||t(n,"xml:lang")),a.stylesheets=[],tinymce.each(o.getAll("link"),function(e){"stylesheet"==e.attr("rel")&&a.stylesheets.push(e.attr("href"))}),n=o.getAll("body")[0],n&&(a.langdir=t(n,"dir"),a.style=t(n,"style"),a.visited_color=t(n,"vlink"),a.link_color=t(n,"link"),a.active_color=t(n,"alink")),a}function r(t){function n(e,t,n){e.attr(t,n?n:void 0)}function r(e){a.firstChild?a.insert(e,a.firstChild):a.append(e)}var o,a,s,c,f,p=e.dom;o=i(),a=o.getAll("head")[0],a||(c=o.getAll("html")[0],a=new d("head",1),c.firstChild?c.insert(a,c.firstChild,!0):c.append(a)),c=o.firstChild,t.xml_pi?(f='version="1.0"',t.docencoding&&(f+=' encoding="'+t.docencoding+'"'),7!=c.type&&(c=new d("xml",7),o.insert(c,o.firstChild,!0)),c.value=f):c&&7==c.type&&c.remove(),c=o.getAll("#doctype")[0],t.doctype?(c||(c=new d("#doctype",10),t.xml_pi?o.insert(c,o.firstChild):r(c)),c.value=t.doctype.substring(9,t.doctype.length-1)):c&&c.remove(),c=null,u(o.getAll("meta"),function(e){"Content-Type"==e.attr("http-equiv")&&(c=e)}),t.docencoding?(c||(c=new d("meta",1),c.attr("http-equiv","Content-Type"),c.shortEnded=!0,r(c)),c.attr("content","text/html; charset="+t.docencoding)):c&&c.remove(),c=o.getAll("title")[0],t.title?(c?c.empty():(c=new d("title",1),r(c)),c.append(new d("#text",3)).value=t.title):c&&c.remove(),u("keywords,description,author,copyright,robots".split(","),function(e){var n,i,a=o.getAll("meta"),s=t[e];for(n=0;n<a.length;n++)if(i=a[n],i.attr("name")==e)return void(s?i.attr("content",s):i.remove());s&&(c=new d("meta",1),c.attr("name",e),c.attr("content",s),c.shortEnded=!0,r(c))});var m={};tinymce.each(o.getAll("link"),function(e){"stylesheet"==e.attr("rel")&&(m[e.attr("href")]=e)}),tinymce.each(t.stylesheets,function(e){m[e]||(c=new d("link",1),c.attr({rel:"stylesheet",text:"text/css",href:e}),c.shortEnded=!0,r(c)),delete m[e]}),tinymce.each(m,function(e){e.remove()}),c=o.getAll("body")[0],c&&(n(c,"dir",t.langdir),n(c,"style",t.style),n(c,"vlink",t.visited_color),n(c,"link",t.link_color),n(c,"alink",t.active_color),p.setAttribs(e.getBody(),{style:t.style,dir:t.dir,vLink:t.visited_color,link:t.link_color,aLink:t.active_color})),c=o.getAll("html")[0],c&&(n(c,"lang",t.langcode),n(c,"xml:lang",t.langcode)),a.firstChild||a.remove(),s=new tinymce.html.Serializer({validate:!1,indent:!0,apply_source_formatting:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(o),l=s.substring(0,s.indexOf("</body>"))}function i(){return new tinymce.html.DomParser({validate:!1,root_name:"#document"}).parse(l)}function o(t){function n(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})}var r,o,s,d,f=t.content,p="",m=e.dom;if(!t.selection&&!("raw"==t.format&&l||t.source_view&&e.getParam("fullpage_hide_in_source_view"))){0!==f.length||t.source_view||(f=tinymce.trim(l)+"\n"+tinymce.trim(f)+"\n"+tinymce.trim(c)),f=f.replace(/<(\/?)BODY/gi,"<$1body"),r=f.indexOf("<body"),r!=-1?(r=f.indexOf(">",r),l=n(f.substring(0,r+1)),o=f.indexOf("</body",r),o==-1&&(o=f.length),t.content=f.substring(r+1,o),c=n(f.substring(o))):(l=a(),c="\n</body>\n</html>"),s=i(),u(s.getAll("style"),function(e){e.firstChild&&(p+=e.firstChild.value)}),d=s.getAll("body")[0],d&&m.setAttribs(e.getBody(),{style:d.attr("style")||"",dir:d.attr("dir")||"",vLink:d.attr("vlink")||"",link:d.attr("link")||"",aLink:d.attr("alink")||""}),m.remove("fullpage_styles");var g=e.getDoc().getElementsByTagName("head")[0];p&&(m.add(g,"style",{id:"fullpage_styles"},p),d=m.get("fullpage_styles"),d.styleSheet&&(d.styleSheet.cssText=p));var h={};tinymce.each(g.getElementsByTagName("link"),function(e){"stylesheet"==e.rel&&e.getAttribute("data-mce-fullpage")&&(h[e.href]=e)}),tinymce.each(s.getAll("link"),function(e){var t=e.attr("href");return!t||(h[t]||"stylesheet"!=e.attr("rel")||m.add(g,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),void delete h[t])}),tinymce.each(h,function(e){e.parentNode.removeChild(e)})}}function a(){var t,n="",r="";return e.getParam("fullpage_default_xml_pi")&&(n+='<?xml version="1.0" encoding="'+e.getParam("fullpage_default_encoding","ISO-8859-1")+'" ?>\n'),n+=e.getParam("fullpage_default_doctype","<!DOCTYPE html>"),n+="\n<html>\n<head>\n",(t=e.getParam("fullpage_default_title"))&&(n+="<title>"+t+"</title>\n"),(t=e.getParam("fullpage_default_encoding"))&&(n+='<meta http-equiv="Content-Type" content="text/html; charset='+t+'" />\n'),(t=e.getParam("fullpage_default_font_family"))&&(r+="font-family: "+t+";"),(t=e.getParam("fullpage_default_font_size"))&&(r+="font-size: "+t+";"),(t=e.getParam("fullpage_default_text_color"))&&(r+="color: "+t+";"),n+="</head>\n<body"+(r?' style="'+r+'"':"")+">\n"}function s(t){t.selection||t.source_view&&e.getParam("fullpage_hide_in_source_view")||(t.content=tinymce.trim(l)+"\n"+tinymce.trim(t.content)+"\n"+tinymce.trim(c))}var l,c,u=tinymce.each,d=tinymce.html.Node;e.addCommand("mceFullPageProperties",t),e.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),e.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),e.on("BeforeSetContent",o),e.on("GetContent",s)});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("7",tinymce.util.Tools.resolve),g("1",["7"],function(a){return a("tinymce.html.DomParser")}),g("2",["7"],function(a){return a("tinymce.html.Node")}),g("3",["7"],function(a){return a("tinymce.html.Serializer")}),g("4",["7"],function(a){return a("tinymce.PluginManager")}),g("5",["7"],function(a){return a("tinymce.util.Tools")}),g("6",["5"],function(a){var b=function(b,c){return a.each(b,function(a){c=c.replace(a,function(a){return"<!--mce:protected "+escape(a)+"-->"})}),c},c=function(a){return a.replace(/<!--mce:protected ([\s\S]*?)-->/g,function(a,b){return unescape(b)})};return{protectHtml:b,unprotectHtml:c}}),g("0",["1","2","3","4","5","6"],function(a,b,c,d,e,f){return d.add("fullpage",function(d){function g(){var a=h();d.windowManager.open({title:"Document properties",data:a,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(b){i(e.extend(a,b.data))}})}function h(){function a(a,b){var c=a.attr(b);return c||""}var b,c,f=j(),g={};return g.fontface=d.getParam("fullpage_default_fontface",""),g.fontsize=d.getParam("fullpage_default_fontsize",""),b=f.firstChild,7==b.type&&(g.xml_pi=!0,c=/encoding="([^"]+)"/.exec(b.value),c&&(g.docencoding=c[1])),b=f.getAll("#doctype")[0],b&&(g.doctype="<!DOCTYPE"+b.value+">"),b=f.getAll("title")[0],b&&b.firstChild&&(g.title=b.firstChild.value),p(f.getAll("meta"),function(a){var b,c=a.attr("name"),d=a.attr("http-equiv");c?g[c.toLowerCase()]=a.attr("content"):"Content-Type"==d&&(b=/charset\s*=\s*(.*)\s*/gi.exec(a.attr("content")),b&&(g.docencoding=b[1]))}),b=f.getAll("html")[0],b&&(g.langcode=a(b,"lang")||a(b,"xml:lang")),g.stylesheets=[],e.each(f.getAll("link"),function(a){"stylesheet"==a.attr("rel")&&g.stylesheets.push(a.attr("href"))}),b=f.getAll("body")[0],b&&(g.langdir=a(b,"dir"),g.style=a(b,"style"),g.visited_color=a(b,"vlink"),g.link_color=a(b,"link"),g.active_color=a(b,"alink")),g}function i(a){function f(a,b,c){a.attr(b,c?c:void 0)}function g(a){i.firstChild?i.insert(a,i.firstChild):i.append(a)}var h,i,k,l,m,o=d.dom;h=j(),i=h.getAll("head")[0],i||(l=h.getAll("html")[0],i=new b("head",1),l.firstChild?l.insert(i,l.firstChild,!0):l.append(i)),l=h.firstChild,a.xml_pi?(m='version="1.0"',a.docencoding&&(m+=' encoding="'+a.docencoding+'"'),7!=l.type&&(l=new b("xml",7),h.insert(l,h.firstChild,!0)),l.value=m):l&&7==l.type&&l.remove(),l=h.getAll("#doctype")[0],a.doctype?(l||(l=new b("#doctype",10),a.xml_pi?h.insert(l,h.firstChild):g(l)),l.value=a.doctype.substring(9,a.doctype.length-1)):l&&l.remove(),l=null,p(h.getAll("meta"),function(a){"Content-Type"==a.attr("http-equiv")&&(l=a)}),a.docencoding?(l||(l=new b("meta",1),l.attr("http-equiv","Content-Type"),l.shortEnded=!0,g(l)),l.attr("content","text/html; charset="+a.docencoding)):l&&l.remove(),l=h.getAll("title")[0],a.title?(l?l.empty():(l=new b("title",1),g(l)),l.append(new b("#text",3)).value=a.title):l&&l.remove(),p("keywords,description,author,copyright,robots".split(","),function(c){var d,e,f=h.getAll("meta"),i=a[c];for(d=0;d<f.length;d++)if(e=f[d],e.attr("name")==c)return void(i?e.attr("content",i):e.remove());i&&(l=new b("meta",1),l.attr("name",c),l.attr("content",i),l.shortEnded=!0,g(l))});var q={};e.each(h.getAll("link"),function(a){"stylesheet"==a.attr("rel")&&(q[a.attr("href")]=a)}),e.each(a.stylesheets,function(a){q[a]||(l=new b("link",1),l.attr({rel:"stylesheet",text:"text/css",href:a}),l.shortEnded=!0,g(l)),delete q[a]}),e.each(q,function(a){a.remove()}),l=h.getAll("body")[0],l&&(f(l,"dir",a.langdir),f(l,"style",a.style),f(l,"vlink",a.visited_color),f(l,"link",a.link_color),f(l,"alink",a.active_color),o.setAttribs(d.getBody(),{style:a.style,dir:a.dir,vLink:a.visited_color,link:a.link_color,aLink:a.active_color})),l=h.getAll("html")[0],l&&(f(l,"lang",a.langcode),f(l,"xml:lang",a.langcode)),i.firstChild||i.remove(),k=new c({validate:!1,indent:!0,apply_source_formatting:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(h),n=k.substring(0,k.indexOf("</body>"))}function j(){return new a({validate:!1,root_name:"#document"}).parse(n)}function k(a){function b(a){return a.replace(/<\/?[A-Z]+/g,function(a){return a.toLowerCase()})}var c,g,h,i,k,m="",q=d.dom;if(!(a.selection||(h=f.protectHtml(d.settings.protect,a.content),"raw"==a.format&&n||a.source_view&&d.getParam("fullpage_hide_in_source_view")))){0!==h.length||a.source_view||(h=e.trim(n)+"\n"+e.trim(h)+"\n"+e.trim(o)),h=h.replace(/<(\/?)BODY/gi,"<$1body"),c=h.indexOf("<body"),c!=-1?(c=h.indexOf(">",c),n=b(h.substring(0,c+1)),g=h.indexOf("</body",c),g==-1&&(g=h.length),a.content=e.trim(h.substring(c+1,g)),o=b(h.substring(g))):(n=l(),o="\n</body>\n</html>"),i=j(),p(i.getAll("style"),function(a){a.firstChild&&(m+=a.firstChild.value)}),k=i.getAll("body")[0],k&&q.setAttribs(d.getBody(),{style:k.attr("style")||"",dir:k.attr("dir")||"",vLink:k.attr("vlink")||"",link:k.attr("link")||"",aLink:k.attr("alink")||""}),q.remove("fullpage_styles");var r=d.getDoc().getElementsByTagName("head")[0];m&&(q.add(r,"style",{id:"fullpage_styles"},m),k=q.get("fullpage_styles"),k.styleSheet&&(k.styleSheet.cssText=m));var s={};e.each(r.getElementsByTagName("link"),function(a){"stylesheet"==a.rel&&a.getAttribute("data-mce-fullpage")&&(s[a.href]=a)}),e.each(i.getAll("link"),function(a){var b=a.attr("href");return!b||(s[b]||"stylesheet"!=a.attr("rel")||q.add(r,"link",{rel:"stylesheet",text:"text/css",href:b,"data-mce-fullpage":"1"}),void delete s[b])}),e.each(s,function(a){a.parentNode.removeChild(a)})}}function l(){var a,b="",c="";return d.getParam("fullpage_default_xml_pi")&&(b+='<?xml version="1.0" encoding="'+d.getParam("fullpage_default_encoding","ISO-8859-1")+'" ?>\n'),b+=d.getParam("fullpage_default_doctype","<!DOCTYPE html>"),b+="\n<html>\n<head>\n",(a=d.getParam("fullpage_default_title"))&&(b+="<title>"+a+"</title>\n"),(a=d.getParam("fullpage_default_encoding"))&&(b+='<meta http-equiv="Content-Type" content="text/html; charset='+a+'" />\n'),(a=d.getParam("fullpage_default_font_family"))&&(c+="font-family: "+a+";"),(a=d.getParam("fullpage_default_font_size"))&&(c+="font-size: "+a+";"),(a=d.getParam("fullpage_default_text_color"))&&(c+="color: "+a+";"),b+="</head>\n<body"+(c?' style="'+c+'"':"")+">\n"}function m(a){a.selection||a.source_view&&d.getParam("fullpage_hide_in_source_view")||(a.content=f.unprotectHtml(e.trim(n)+"\n"+e.trim(a.content)+"\n"+e.trim(o)))}var n,o,p=e.each;d.addCommand("mceFullPageProperties",g),d.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),d.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),d.on("BeforeSetContent",k),d.on("GetContent",m)}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,r=document,i=r.body;return i.offsetWidth&&(e=i.offsetWidth,t=i.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){var e=tinymce.DOM.getViewPort();return{x:e.x,y:e.y}}function r(e){scrollTo(e.x,e.y)}function i(){function i(){f.setStyle(g,"height",t().h-(m.clientHeight-g.clientHeight))}var p,m,g,h,v=document.body,b=document.documentElement;d=!d,m=e.getContainer(),p=m.style,g=e.getContentAreaContainer().firstChild,h=g.style,d?(u=n(),o=h.width,a=h.height,h.width=h.height="100%",l=p.width,c=p.height,p.width=p.height="",f.addClass(v,"mce-fullscreen"),f.addClass(b,"mce-fullscreen"),f.addClass(m,"mce-fullscreen"),f.bind(window,"resize",i),i(),s=i):(h.width=o,h.height=a,l&&(p.width=l),c&&(p.height=c),f.removeClass(v,"mce-fullscreen"),f.removeClass(b,"mce-fullscreen"),f.removeClass(m,"mce-fullscreen"),f.unbind(window,"resize",s),r(u)),e.fire("FullscreenStateChanged",{state:d})}var o,a,s,l,c,u,d=!1,f=tinymce.DOM;if(!e.settings.inline)return e.on("init",function(){e.addShortcut("Ctrl+Shift+F","",i)}),e.on("remove",function(){s&&f.unbind(window,"resize",s)}),e.addCommand("mceFullScreen",i),e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,onClick:function(){i(),e.focus()},onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Shift+F",onClick:i,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}}),{isFullscreen:function(){return d}}});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.dom.DOMUtils")}),g("2",["3"],function(a){return a("tinymce.PluginManager")}),g("0",["1","2"],function(a,b){var c=a.DOM;return b.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function d(){var a=c.getViewPort();return{x:a.x,y:a.y}}function e(a){window.scrollTo(a.x,a.y)}function f(){function f(){c.setStyle(p,"height",b().h-(o.clientHeight-p.clientHeight))}var n,o,p,q,r=document.body,s=document.documentElement;m=!m,o=a.getContainer(),n=o.style,p=a.getContentAreaContainer().firstChild,q=p.style,m?(l=d(),g=q.width,h=q.height,q.width=q.height="100%",j=n.width,k=n.height,n.width=n.height="",c.addClass(r,"mce-fullscreen"),c.addClass(s,"mce-fullscreen"),c.addClass(o,"mce-fullscreen"),c.bind(window,"resize",f),f(),i=f):(q.width=g,q.height=h,j&&(n.width=j),k&&(n.height=k),c.removeClass(r,"mce-fullscreen"),c.removeClass(s,"mce-fullscreen"),c.removeClass(o,"mce-fullscreen"),c.unbind(window,"resize",i),e(l)),a.fire("FullscreenStateChanged",{state:m})}var g,h,i,j,k,l,m=!1;if(!a.settings.inline)return a.on("init",function(){a.addShortcut("Ctrl+Shift+F","",f)}),a.on("remove",function(){i&&c.unbind(window,"resize",i)}),a.addCommand("mceFullScreen",f),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,onClick:function(){f(),a.focus()},onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Shift+F",onClick:f,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return m}}}),function(){}}),d("0")()}();
@@ -0,0 +1 @@
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("4",["3"],function(a){return a("tinymce.EditorManager")}),h("f",Array),h("g",Error),g("b",["f","g"],function(a,b){var c=function(){},d=function(a,b){return function(){return a(b.apply(null,arguments))}},e=function(a){return function(){return a}},f=function(a){return a},g=function(a,b){return a===b},h=function(b){for(var c=new a(arguments.length-1),d=1;d<arguments.length;d++)c[d-1]=arguments[d];return function(){for(var d=new a(arguments.length),e=0;e<d.length;e++)d[e]=arguments[e];var f=c.concat(d);return b.apply(null,f)}},i=function(a){return function(){return!a.apply(null,arguments)}},j=function(a){return function(){throw new b(a)}},k=function(a){return a()},l=function(a){a()},m=e(!1),n=e(!0);return{noop:c,compose:d,constant:e,identity:f,tripleEquals:g,curry:h,not:i,die:j,apply:k,call:l,never:m,always:n}}),h("j",Object),g("e",["b","j"],function(a,b){var c=a.never,d=a.always,e=function(){return f},f=function(){var f=function(a){return a.isNone()},g=function(a){return a()},h=function(a){return a},i=function(){},j={fold:function(a,b){return a()},is:c,isSome:c,isNone:d,getOr:h,getOrThunk:g,getOrDie:function(a){throw new Error(a||"error: getOrDie called on none.")},or:h,orThunk:g,map:e,ap:e,each:i,bind:e,flatten:e,exists:c,forall:d,filter:e,equals:f,equals_:f,toArray:function(){return[]},toString:a.constant("none()")};return b.freeze&&b.freeze(j),j}(),g=function(a){var b=function(){return a},h=function(){return k},i=function(b){return g(b(a))},j=function(b){return b(a)},k={fold:function(b,c){return c(a)},is:function(b){return a===b},isSome:d,isNone:c,getOr:b,getOrThunk:b,getOrDie:b,or:h,orThunk:h,map:i,ap:function(b){return b.fold(e,function(b){return g(b(a))})},each:function(b){b(a)},bind:j,flatten:b,exists:j,forall:j,filter:function(b){return b(a)?k:f},equals:function(b){return b.is(a)},equals_:function(b,d){return b.fold(c,function(b){return d(a,b)})},toArray:function(){return[a]},toString:function(){return"some("+a+")"}};return k},h=function(a){return null===a||void 0===a?f:g(a)};return{some:g,none:e,from:h}}),h("h",String),g("8",["e","f","g","h"],function(a,b,c,d){var e=function(){var a=b.prototype.indexOf,c=function(b,c){return a.call(b,c)},d=function(a,b){return u(a,b)};return void 0===a?d:c}(),f=function(b,c){var d=e(b,c);return d===-1?a.none():a.some(d)},g=function(a,b){return e(a,b)>-1},h=function(a,b){return t(a,b).isSome()},i=function(a,b){for(var c=[],d=0;d<a;d++)c.push(b(d));return c},j=function(a,b){for(var c=[],d=0;d<a.length;d+=b){var e=a.slice(d,d+b);c.push(e)}return c},k=function(a,c){for(var d=a.length,e=new b(d),f=0;f<d;f++){var g=a[f];e[f]=c(g,f,a)}return e},l=function(a,b){for(var c=0,d=a.length;c<d;c++){var e=a[c];b(e,c,a)}},m=function(a,b){for(var c=a.length-1;c>=0;c--){var d=a[c];b(d,c,a)}},n=function(a,b){for(var c=[],d=[],e=0,f=a.length;e<f;e++){var g=a[e],h=b(g,e,a)?c:d;h.push(g)}return{pass:c,fail:d}},o=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++){var f=a[d];b(f,d,a)&&c.push(f)}return c},p=function(a,b){if(0===a.length)return[];for(var c=b(a[0]),d=[],e=[],f=0,g=a.length;f<g;f++){var h=a[f],i=b(h);i!==c&&(d.push(e),e=[]),c=i,e.push(h)}return 0!==e.length&&d.push(e),d},q=function(a,b,c){return m(a,function(a){c=b(c,a)}),c},r=function(a,b,c){return l(a,function(a){c=b(c,a)}),c},s=function(b,c){for(var d=0,e=b.length;d<e;d++){var f=b[d];if(c(f,d,b))return a.some(f)}return a.none()},t=function(b,c){for(var d=0,e=b.length;d<e;d++){var f=b[d];if(c(f,d,b))return a.some(d)}return a.none()},u=function(a,b){for(var c=0,d=a.length;c<d;++c)if(a[c]===b)return c;return-1},v=b.prototype.push,w=function(a){for(var d=[],e=0,f=a.length;e<f;++e){if(!b.prototype.isPrototypeOf(a[e]))throw new c("Arr.flatten item "+e+" was not an array, input: "+a);v.apply(d,a[e])}return d},x=function(a,b){var c=k(a,b);return w(c)},y=function(a,b){for(var c=0,d=a.length;c<d;++c){var e=a[c];if(b(e,c,a)!==!0)return!1}return!0},z=function(a,b){return a.length===b.length&&y(a,function(a,c){return a===b[c]})},A=b.prototype.slice,B=function(a){var b=A.call(a,0);return b.reverse(),b},C=function(a,b){return o(a,function(a){return!g(b,a)})},D=function(a,b){for(var c={},e=0,f=a.length;e<f;e++){var g=a[e];c[d(g)]=b(g,e)}return c},E=function(a){return[a]},F=function(a,b){var c=A.call(a,0);return c.sort(b),c};return{map:k,each:l,eachr:m,partition:n,filter:o,groupBy:p,indexOf:f,foldr:q,foldl:r,find:s,findIndex:t,flatten:w,bind:x,forall:y,exists:h,contains:g,equal:z,reverse:B,chunk:j,difference:C,mapToObject:D,pure:E,sort:F,range:i}}),g("i",["3"],function(a){return a("tinymce.Env")}),g("9",["i"],function(a){var b=a.mac?"\u2318":"Ctrl",c=a.mac?"Ctrl + Alt":"Shift + Alt",d=[{shortcut:b+" + B",action:"Bold"},{shortcut:b+" + I",action:"Italic"},{shortcut:b+" + U",action:"Underline"},{shortcut:b+" + A",action:"Select All"},{shortcut:b+" + Y or "+b+" + Shift + Z",action:"Redo"},{shortcut:b+" + Z",action:"Undo"},{shortcut:c+" + 1",action:"Header 1"},{shortcut:c+" + 2",action:"Header 2"},{shortcut:c+" + 3",action:"Header 3"},{shortcut:c+" + 4",action:"Header 4"},{shortcut:c+" + 5",action:"Header 5"},{shortcut:c+" + 6",action:"Header 6"},{shortcut:c+" + 7",action:"Paragraph"},{shortcut:c+" + 8",action:"Div"},{shortcut:c+" + 9",action:"Address"},{shortcut:"Alt + F9",action:"Focus to menubar"},{shortcut:"Alt + F10",action:"Focus to toolbar"},{shortcut:"Alt + F11",action:"Focus to element path"},{shortcut:"Ctrl + Shift + P > Ctrl + Shift + P",action:"Focus to contextual toolbar"},{shortcut:b+" + K",action:"Insert link (if link plugin activated)"},{shortcut:b+" + S",action:"Save (if save plugin activated)"},{shortcut:b+" + F",action:"Find (if searchreplace plugin activated)"}];return{shortcuts:d}}),g("5",["8","9"],function(a,b){var c=function(){var c=function(a){return'aria-label="Action: '+a.action+", Shortcut: "+a.shortcut.replace(/Ctrl/g,"Control")+'"'},d=a.map(b.shortcuts,function(a){return'<tr data-mce-tabstop="1" tabindex="-1" '+c(a)+"><td>"+a.action+"</td><td>"+a.shortcut+"</td></tr>"}).join("");return{title:"Handy Shortcuts",type:"container",style:"overflow-y: auto; overflow-x: hidden; max-height: 250px",items:[{type:"container",html:'<div><table class="mce-table-striped"><thead><th>Action</th><th>Shortcut</th></thead>'+d+"</table></div>"}]}};return{makeTab:c}}),g("a",["e","j"],function(a,b){var c=function(){var a=b.keys,c=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b};return void 0===a?c:a}(),d=function(a,b){for(var d=c(a),e=0,f=d.length;e<f;e++){var g=d[e],h=a[g];b(h,g,a)}},e=function(a,b){return f(a,function(a,c,d){return{k:c,v:b(a,c,d)}})},f=function(a,b){var c={};return d(a,function(d,e){var f=b(d,e,a);c[f.k]=f.v}),c},g=function(a,b){var c={},e={};return d(a,function(a,d){var f=b(a,d)?c:e;f[d]=a}),{t:c,f:e}},h=function(a,b){var c=[];return d(a,function(a,d){c.push(b(a,d))}),c},i=function(b,d){for(var e=c(b),f=0,g=e.length;f<g;f++){var h=e[f],i=b[h];if(d(i,h,b))return a.some(i)}return a.none()},j=function(a){return h(a,function(a){return a})},k=function(a){return j(a).length};return{bifilter:g,each:d,map:e,mapToArray:h,tupleMap:f,find:i,keys:c,values:j,size:k}}),g("k",[],function(){var a=function(a,b){return b+a},b=function(a,b){return a+b},c=function(a,b){return a.substring(b)},d=function(a,b){return a.substring(0,a.length-b)};return{addToStart:a,addToEnd:b,removeFromStart:c,removeFromEnd:d}}),g("l",["e","g"],function(a,b){var c=function(a,b){return a.substr(0,b)},d=function(a,b){return a.substr(a.length-b,a.length)},e=function(b){return""===b?a.none():a.some(b.substr(0,1))},f=function(b){return""===b?a.none():a.some(b.substring(1))};return{first:c,last:d,head:e,tail:f}}),g("c",["k","l","g"],function(a,b,c){var d=function(a,b,c){if(""===b)return!0;if(a.length<b.length)return!1;var d=a.substr(c,c+b.length);return d===b},e=function(a,b){var c=function(a){var b=typeof a;return"string"===b||"number"===b};return a.replace(/\${([^{}]*)}/g,function(a,d){var e=b[d];return c(e)?e:a})},f=function(b,c){return l(b,c)?a.removeFromStart(b,c.length):b},g=function(b,c){return m(b,c)?a.removeFromEnd(b,c.length):b},h=function(b,c){return l(b,c)?b:a.addToStart(b,c)},i=function(b,c){return m(b,c)?b:a.addToEnd(b,c)},j=function(a,b){return a.indexOf(b)!==-1},k=function(a){return b.head(a).bind(function(c){return b.tail(a).map(function(a){return c.toUpperCase()+a})}).getOr(a)},l=function(a,b){return d(a,b,0)},m=function(a,b){return d(a,b,a.length-b.length)},n=function(a){return a.replace(/^\s+|\s+$/g,"")},o=function(a){return a.replace(/^\s+/g,"")},p=function(a){return a.replace(/\s+$/g,"")};return{supplant:e,startsWith:l,removeLeading:f,removeTrailing:g,ensureLeading:h,ensureTrailing:i,endsWith:m,contains:j,trim:n,lTrim:o,rTrim:p,capitalize:k}}),g("d",[],function(){var a=["advlist","anchor","autolink","autoresize","autosave","bbcode","charmap","code","codesample","colorpicker","compat3x","contextmenu","directionality","emoticons","fullpage","fullscreen","hr","image","imagetools","importcss","insertdatetime","legacyoutput","link","lists","media","nonbreaking","noneditable","pagebreak","paste","preview","print","save","searchreplace","spellchecker","tabfocus","table","template","textcolor","textpattern","toc","visualblocks","visualchars","wordcount"];return{urls:a}}),g("6",["4","a","8","b","c","d"],function(a,b,c,d,e,f){var g=function(a){return c.find(f.urls,function(b){return b===a}).fold(d.constant(a),function(a){return e.supplant('<a href="${url}" target="_blank">${name}</a>',{name:a,url:"https://www.tinymce.com/docs/plugins/"+a})})},h=function(a){var c=b.mapToArray(a.plugins,function(a,b){return"<li>"+g(b)+"</li>"}),d=c.length,e=c.join("");return"<p><b>Plugins installed ("+d+"):</b></p><ul>"+e+"</ul>"},i=function(a){return{type:"container",html:'<div style="overflow-y: auto; overflow-x: hidden; max-height: 230px; height: 230px;" data-mce-tabstop="1" tabindex="-1">'+h(a)+"</div>",flex:1}},j=function(){return{type:"container",html:'<div style="padding: 10px; background: #e3e7f4; height: 100%;" data-mce-tabstop="1" tabindex="-1"><p><b>Premium plugins:</b></p><ul><li>PowerPaste</li><li>Spell Checker Pro</li><li>Accessibility Checker</li><li>Advanced Code Editor</li><li>Enhanced Media Embed</li><li>Link Checker</li></ul><br /><p style="float: right;"><a href="https://www.tinymce.com/pricing/" target="_blank">Learn more...</a></p></div>',flex:1}},k=function(a){return{title:"Plugins",type:"container",style:"overflow-y: auto; overflow-x: hidden;",layout:"flex",padding:10,spacing:10,items:[i(a),j()]}};return{makeTab:k}}),g("7",["4"],function(a){var b=function(a,b){return 0===a.indexOf("@")?"X.X.X":a+"."+b},c=function(){var c=b(a.majorVersion,a.minorVersion),d='<a href="https://www.tinymce.com/docs/changelog/" target="_blank">TinyMCE '+c+"</a>";return[{type:"label",html:"You are using "+d},{type:"spacer",flex:1},{text:"Close",onclick:function(){this.parent().parent().close()}}]};return{makeRow:c}}),g("2",["4","5","6","7"],function(a,b,c,d){var e=function(a,e){return function(){a.windowManager.open({title:"Help",bodyType:"tabpanel",layout:"flex",body:[b.makeTab(),c.makeTab(a,e)],buttons:d.makeRow(),onPostRender:function(){var a=this.getEl("title");a.innerHTML='<img src="'+e+'/img/logo.png" alt="TinyMCE Logo" style="width: 200px">'}})}};return{openDialog:e}}),g("0",["1","2"],function(a,b){var c=function(a,c){a.addButton("help",{icon:"help",onclick:b.openDialog(a,c)}),a.addMenuItem("Help",{text:"Help",icon:"help",context:"view",onclick:b.openDialog(a,c)}),a.addCommand("mceHelp",b.openDialog(a,c)),a.shortcuts.add("Alt+0","Open help dialog",b.openDialog(a,c))};return a.add("help",c),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("hr",function(e){e.addCommand("InsertHorizontalRule",function(){e.execCommand("mceInsertContent",!1,"<hr />")}),e.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),e.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("2",tinymce.util.Tools.resolve),g("1",["2"],function(a){return a("tinymce.PluginManager")}),g("0",["1"],function(a){return a.add("hr",function(a){a.addCommand("InsertHorizontalRule",function(){a.execCommand("mceInsertContent",!1,"<hr />")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("image",function(e){function t(e,t){function n(e,n){r.parentNode&&r.parentNode.removeChild(r),t({width:e,height:n})}var r=document.createElement("img");r.onload=function(){n(Math.max(r.width,r.clientWidth),Math.max(r.height,r.clientHeight))},r.onerror=function(){n()};var i=r.style;i.visibility="hidden",i.position="fixed",i.bottom=i.left=0,i.width=i.height="auto",document.body.appendChild(r),r.src=e}function n(e,t,n){function r(e,n){return n=n||[],tinymce.each(e,function(e){var i={text:e.text||e.title};e.menu?i.menu=r(e.menu):(i.value=e.value,t(i)),n.push(i)}),n}return r(e,n||[])}function r(t){return function(){var n=e.settings.image_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):"function"==typeof n?n(t):t(n)}}function i(r){function i(){var e,t,n,r;e=f.find("#width")[0],t=f.find("#height")[0],e&&t&&(n=e.value(),r=t.value(),f.find("#constrain")[0].checked()&&g&&h&&n&&r&&(g!=n?(r=Math.round(n/g*r),isNaN(r)||t.value(r)):(n=Math.round(r/h*n),isNaN(n)||e.value(n))),g=n,h=r)}function o(){function t(t){function n(){t.onload=t.onerror=null,e.selection&&(e.selection.select(t),e.nodeChanged())}t.onload=function(){y.width||y.height||!C||x.setAttribs(t,{width:t.clientWidth,height:t.clientHeight}),n()},t.onerror=n}var n,r;u(),i(),y=tinymce.extend(y,f.toJSON()),y.alt||(y.alt=""),y.title||(y.title=""),""===y.width&&(y.width=null),""===y.height&&(y.height=null),y.style||(y.style=null),y={src:y.src,alt:y.alt,title:y.title,width:y.width,height:y.height,style:y.style,caption:y.caption,"class":y["class"]},e.undoManager.transact(function(){function i(t){return e.schema.getTextBlockElements()[t.nodeName]}if(!y.src)return void(p&&(x.remove(p),e.focus(),e.nodeChanged()));if(""===y.title&&(y.title=null),p?x.setAttribs(p,y):(y.id="__mcenew",e.focus(),e.selection.setContent(x.createHTML("img",y)),p=x.get("__mcenew"),x.setAttrib(p,"id",null)),e.editorUpload.uploadImagesAuto(),y.caption===!1&&x.is(p.parentNode,"figure.image")&&(n=p.parentNode,x.insertAfter(p,n),x.remove(n)),y.caption!==!0)t(p);else if(!x.is(p.parentNode,"figure.image")){r=p,p=p.cloneNode(!0),n=x.create("figure",{"class":"image"}),n.appendChild(p),n.appendChild(x.create("figcaption",{contentEditable:!0},"Caption")),n.contentEditable=!1;var o=x.getParent(r,i);o?x.split(o,r,n):x.replace(n,r),e.selection.select(n)}})}function a(e){return e&&(e=e.replace(/px$/,"")),e}function s(n){var r,i,o,a=n.meta||{};v&&v.value(e.convertURL(this.value(),"src")),tinymce.each(a,function(e,t){f.find("#"+t).value(e)}),a.width||a.height||(r=e.convertURL(this.value(),"src"),i=e.settings.image_prepend_url,o=new RegExp("^(?:[a-z]+:)?//","i"),i&&!o.test(r)&&r.substring(0,i.length)!==i&&(r=i+r),this.value(r),t(e.documentBaseURI.toAbsolute(this.value()),function(e){e.width&&e.height&&C&&(g=e.width,h=e.height,f.find("#width").value(g),f.find("#height").value(h))}))}function l(e){e.meta=f.toJSON()}function c(e){if(e.margin){var t=e.margin.split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e}function u(){function t(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e}if(e.settings.image_advtab){var n=f.toJSON(),r=x.parseStyle(n.style);r=c(r),n.vspace&&(r["margin-top"]=r["margin-bottom"]=t(n.vspace)),n.hspace&&(r["margin-left"]=r["margin-right"]=t(n.hspace)),n.border&&(r["border-width"]=t(n.border)),f.find("#style").value(x.serializeStyle(x.parseStyle(x.serializeStyle(r))))}}function d(){if(e.settings.image_advtab){var t=f.toJSON(),n=x.parseStyle(t.style);f.find("#vspace").value(""),f.find("#hspace").value(""),n=c(n),(n["margin-top"]&&n["margin-bottom"]||n["margin-right"]&&n["margin-left"])&&(n["margin-top"]===n["margin-bottom"]?f.find("#vspace").value(a(n["margin-top"])):f.find("#vspace").value(""),n["margin-right"]===n["margin-left"]?f.find("#hspace").value(a(n["margin-right"])):f.find("#hspace").value("")),n["border-width"]&&f.find("#border").value(a(n["border-width"])),f.find("#style").value(x.serializeStyle(x.parseStyle(x.serializeStyle(n))))}}var f,p,m,g,h,v,b,y={},x=e.dom,C=e.settings.image_dimensions!==!1;p=e.selection.getNode(),m=x.getParent(p,"figure.image"),m&&(p=x.select("img",m)[0]),p&&("IMG"!=p.nodeName||p.getAttribute("data-mce-object")||p.getAttribute("data-mce-placeholder"))&&(p=null),p&&(g=x.getAttrib(p,"width"),h=x.getAttrib(p,"height"),y={src:x.getAttrib(p,"src"),alt:x.getAttrib(p,"alt"),title:x.getAttrib(p,"title"),"class":x.getAttrib(p,"class"),width:g,height:h,caption:!!m}),r&&(v={type:"listbox",label:"Image list",values:n(r,function(t){t.value=e.convertURL(t.value||t.url,"src")},[{text:"None",value:""}]),value:y.src&&e.convertURL(y.src,"src"),onselect:function(e){var t=f.find("#alt");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),f.find("#src").value(e.control.value()).fire("change")},onPostRender:function(){v=this}}),e.settings.image_class_list&&(b={name:"class",type:"listbox",label:"Class",values:n(e.settings.image_class_list,function(t){t.value&&(t.textStyle=function(){return e.formatter.getCssText({inline:"img",classes:[t.value]})})})});var w=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:s,onbeforecall:l},v];e.settings.image_description!==!1&&w.push({name:"alt",type:"textbox",label:"Image description"}),e.settings.image_title&&w.push({name:"title",type:"textbox",label:"Image Title"}),C&&w.push({type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:i,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:i,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),w.push(b),e.settings.image_caption&&tinymce.Env.ceFalse&&w.push({name:"caption",type:"checkbox",label:"Caption"}),e.settings.image_advtab?(p&&(p.style.marginLeft&&p.style.marginRight&&p.style.marginLeft===p.style.marginRight&&(y.hspace=a(p.style.marginLeft)),p.style.marginTop&&p.style.marginBottom&&p.style.marginTop===p.style.marginBottom&&(y.vspace=a(p.style.marginTop)),p.style.borderWidth&&(y.border=a(p.style.borderWidth)),y.style=e.dom.serializeStyle(e.dom.parseStyle(e.dom.getAttrib(p,"style")))),f=e.windowManager.open({title:"Insert/edit image",data:y,bodyType:"tabpanel",body:[{title:"General",type:"form",items:w},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:d},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:u},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:o})):f=e.windowManager.open({title:"Insert/edit image",data:y,body:w,onSubmit:o})}e.on("preInit",function(){function t(e){var t=e.attr("class");return t&&/\bimage\b/.test(t)}function n(e){return function(n){function r(t){t.attr("contenteditable",e?"true":null)}for(var i,o=n.length;o--;)i=n[o],t(i)&&(i.attr("contenteditable",e?"false":null),tinymce.each(i.getAll("figcaption"),r))}}e.parser.addNodeFilter("figure",n(!0)),e.serializer.addNodeFilter("figure",n(!1))}),e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:r(i),stateSelector:"img:not([data-mce-object],[data-mce-placeholder]),figure.image"}),e.addMenuItem("image",{icon:"image",text:"Image",onclick:r(i),context:"insert",prependToContext:!0}),e.addCommand("mceImage",r(i))});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){return a("tinymce.Env")}),g("2",["6"],function(a){return a("tinymce.PluginManager")}),g("3",["6"],function(a){return a("tinymce.util.JSON")}),g("4",["6"],function(a){return a("tinymce.util.Tools")}),g("5",["6"],function(a){return a("tinymce.util.XHR")}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return b.add("image",function(b){function f(a,b){function c(a,c){d.parentNode&&d.parentNode.removeChild(d),b({width:a,height:c})}var d=document.createElement("img");d.onload=function(){c(Math.max(d.width,d.clientWidth),Math.max(d.height,d.clientHeight))},d.onerror=function(){c()};var e=d.style;e.visibility="hidden",e.position="fixed",e.bottom=e.left=0,e.width=e.height="auto",document.body.appendChild(d),d.src=a}function g(a,b,c){function e(a,c){return c=c||[],d.each(a,function(a){var d={text:a.text||a.title};a.menu?d.menu=e(a.menu):(d.value=a.value,b(d)),c.push(d)}),c}return e(a,c||[])}function h(a){return function(){var d=b.settings.image_list;"string"==typeof d?e.send({url:d,success:function(b){a(c.parse(b))}}):"function"==typeof d?d(a):a(d)}}function i(c){function e(){var a,b,c,d;a=o.find("#width")[0],b=o.find("#height")[0],a&&b&&(c=a.value(),d=b.value(),o.find("#constrain")[0].checked()&&r&&s&&c&&d&&(r!=c?(d=Math.round(c/r*d),isNaN(d)||b.value(d)):(c=Math.round(d/s*c),isNaN(c)||a.value(c))),r=c,s=d)}function h(){function a(a){function c(){a.onload=a.onerror=null,b.selection&&(b.selection.select(a),b.nodeChanged())}a.onload=function(){v.width||v.height||!x||w.setAttribs(a,{width:a.clientWidth,height:a.clientHeight}),c()},a.onerror=c}var c,f;m(),e(),v=d.extend(v,o.toJSON()),v.alt||(v.alt=""),v.title||(v.title=""),""===v.width&&(v.width=null),""===v.height&&(v.height=null),v.style||(v.style=null),v={src:v.src,alt:v.alt,title:v.title,width:v.width,height:v.height,style:v.style,caption:v.caption,"class":v["class"]},b.undoManager.transact(function(){function d(a){return b.schema.getTextBlockElements()[a.nodeName]}if(!v.src)return void(p&&(w.remove(p),b.focus(),b.nodeChanged()));if(""===v.title&&(v.title=null),p?w.setAttribs(p,v):(v.id="__mcenew",b.focus(),b.selection.setContent(w.createHTML("img",v)),p=w.get("__mcenew"),w.setAttrib(p,"id",null)),b.editorUpload.uploadImagesAuto(),v.caption===!1&&w.is(p.parentNode,"figure.image")&&(c=p.parentNode,w.insertAfter(p,c),w.remove(c)),v.caption!==!0)a(p);else if(!w.is(p.parentNode,"figure.image")){f=p,p=p.cloneNode(!0),c=w.create("figure",{"class":"image"}),c.appendChild(p),c.appendChild(w.create("figcaption",{contentEditable:!0},"Caption")),c.contentEditable=!1;var e=w.getParent(f,d);e?w.split(e,f,c):w.replace(c,f),b.selection.select(c)}})}function i(a){return a&&(a=a.replace(/px$/,"")),a}function j(a){var c,e,g,h=a.meta||{};t&&t.value(b.convertURL(this.value(),"src")),d.each(h,function(a,b){o.find("#"+b).value(a)}),h.width||h.height||(c=b.convertURL(this.value(),"src"),e=b.settings.image_prepend_url,g=new RegExp("^(?:[a-z]+:)?//","i"),e&&!g.test(c)&&c.substring(0,e.length)!==e&&(c=e+c),this.value(c),f(b.documentBaseURI.toAbsolute(this.value()),function(a){a.width&&a.height&&x&&(r=a.width,s=a.height,o.find("#width").value(r),o.find("#height").value(s))}))}function k(a){a.meta=o.toJSON()}function l(a){if(a.margin){var b=a.margin.split(" ");switch(b.length){case 1:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[0],a["margin-bottom"]=a["margin-bottom"]||b[0],a["margin-left"]=a["margin-left"]||b[0];break;case 2:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[0],a["margin-left"]=a["margin-left"]||b[1];break;case 3:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[2],a["margin-left"]=a["margin-left"]||b[1];break;case 4:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[2],a["margin-left"]=a["margin-left"]||b[3]}delete a.margin}return a}function m(){function a(a){return a.length>0&&/^[0-9]+$/.test(a)&&(a+="px"),a}if(b.settings.image_advtab){var c=o.toJSON(),d=w.parseStyle(c.style);d=l(d),c.vspace&&(d["margin-top"]=d["margin-bottom"]=a(c.vspace)),c.hspace&&(d["margin-left"]=d["margin-right"]=a(c.hspace)),c.border&&(d["border-width"]=a(c.border)),o.find("#style").value(w.serializeStyle(w.parseStyle(w.serializeStyle(d))))}}function n(){if(b.settings.image_advtab){var a=o.toJSON(),c=w.parseStyle(a.style);o.find("#vspace").value(""),o.find("#hspace").value(""),c=l(c),(c["margin-top"]&&c["margin-bottom"]||c["margin-right"]&&c["margin-left"])&&(c["margin-top"]===c["margin-bottom"]?o.find("#vspace").value(i(c["margin-top"])):o.find("#vspace").value(""),c["margin-right"]===c["margin-left"]?o.find("#hspace").value(i(c["margin-right"])):o.find("#hspace").value("")),c["border-width"]&&o.find("#border").value(i(c["border-width"])),o.find("#style").value(w.serializeStyle(w.parseStyle(w.serializeStyle(c))))}}var o,p,q,r,s,t,u,v={},w=b.dom,x=b.settings.image_dimensions!==!1;p=b.selection.getNode(),q=w.getParent(p,"figure.image"),q&&(p=w.select("img",q)[0]),p&&("IMG"!=p.nodeName||p.getAttribute("data-mce-object")||p.getAttribute("data-mce-placeholder"))&&(p=null),p&&(r=w.getAttrib(p,"width"),s=w.getAttrib(p,"height"),v={src:w.getAttrib(p,"src"),alt:w.getAttrib(p,"alt"),title:w.getAttrib(p,"title"),"class":w.getAttrib(p,"class"),width:r,height:s,caption:!!q}),c&&(t={type:"listbox",label:"Image list",values:g(c,function(a){a.value=b.convertURL(a.value||a.url,"src")},[{text:"None",value:""}]),value:v.src&&b.convertURL(v.src,"src"),onselect:function(a){var b=o.find("#alt");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),o.find("#src").value(a.control.value()).fire("change")},onPostRender:function(){t=this}}),b.settings.image_class_list&&(u={name:"class",type:"listbox",label:"Class",values:g(b.settings.image_class_list,function(a){a.value&&(a.textStyle=function(){return b.formatter.getCssText({inline:"img",classes:[a.value]})})})});var y=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:j,onbeforecall:k},t];b.settings.image_description!==!1&&y.push({name:"alt",type:"textbox",label:"Image description"}),b.settings.image_title&&y.push({name:"title",type:"textbox",label:"Image Title"}),x&&y.push({type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:e,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),y.push(u),b.settings.image_caption&&a.ceFalse&&y.push({name:"caption",type:"checkbox",label:"Caption"}),b.settings.image_advtab?(p&&(p.style.marginLeft&&p.style.marginRight&&p.style.marginLeft===p.style.marginRight&&(v.hspace=i(p.style.marginLeft)),p.style.marginTop&&p.style.marginBottom&&p.style.marginTop===p.style.marginBottom&&(v.vspace=i(p.style.marginTop)),p.style.borderWidth&&(v.border=i(p.style.borderWidth)),v.style=b.dom.serializeStyle(b.dom.parseStyle(b.dom.getAttrib(p,"style")))),o=b.windowManager.open({title:"Insert/edit image",data:v,bodyType:"tabpanel",body:[{title:"General",type:"form",items:y},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:n},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:m},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:h})):o=b.windowManager.open({title:"Insert/edit image",data:v,body:y,onSubmit:h})}b.on("preInit",function(){function a(a){var b=a.attr("class");return b&&/\bimage\b/.test(b)}function c(b){return function(c){function e(a){a.attr("contenteditable",b?"true":null)}for(var f,g=c.length;g--;)f=c[g],a(f)&&(f.attr("contenteditable",b?"false":null),d.each(f.getAll("figcaption"),e))}}b.parser.addNodeFilter("figure",c(!0)),b.serializer.addNodeFilter("figure",c(!1))}),b.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:h(i),stateSelector:"img:not([data-mce-object],[data-mce-placeholder]),figure.image"}),b.addMenuItem("image",{icon:"image",text:"Image",onclick:h(i),context:"insert",prependToContext:!0}),b.addCommand("mceImage",h(i))}),function(){}}),d("0")()}();
@@ -1 +1,2 @@
1
- !function(){var e={},t=function(t){for(var n=e[t],i=n.deps,o=n.defn,a=i.length,s=new Array(a),l=0;l<a;++l)s[l]=r(i[l]);var c=o.apply(null,s);if(void 0===c)throw"module ["+t+"] returned undefined";n.instance=c},n=function(t,n,r){if("string"!=typeof t)throw"module id must be a string";if(void 0===n)throw"no dependencies for "+t;if(void 0===r)throw"no definition function for "+t;e[t]={deps:n,defn:r,instance:void 0}},r=function(n){var r=e[n];if(void 0===r)throw"module ["+n+"] was undefined";return void 0===r.instance&&t(n),r.instance},i=function(e,t){for(var n=e.length,i=new Array(n),o=0;o<n;++o)i.push(r(e[o]));t.apply(null,t)},o={};o.bolt={module:{api:{define:n,require:i,demand:r}}};var a=n,s=function(e,t){a(e,[],function(){return t})};s("1",tinymce.PluginManager),s("2",tinymce.Env),s("3",tinymce.util.Promise),s("4",tinymce.util.URI),s("5",tinymce.util.Tools),s("6",tinymce.util.Delay),a("m",[],function(){function e(e,t){return r(document.createElement("canvas"),e,t)}function t(e){return e.getContext("2d")}function n(e){var t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(e){}return t||(t=null),t}function r(e,t,n){return e.width=t,e.height=n,e}return{create:e,resize:r,get2dContext:t,get3dContext:n}}),a("n",[],function(){function e(e){return e.naturalWidth||e.width}function t(e){return e.naturalHeight||e.height}return{getWidth:e,getHeight:t}}),a("o",[],function(){function e(e,t){return function(){e.apply(t,arguments)}}function t(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],s(t,e(r,this),e(i,this))}function n(e){var t=this;return null===this._state?void this._deferreds.push(e):void l(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(t){return void e.reject(t)}e.resolve(r)})}function r(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void s(e(n,t),e(r,this),e(i,this))}this._state=!0,this._value=t,o.call(this)}catch(e){i.call(this,e)}}function i(e){this._state=!1,this._value=e,o.call(this)}function o(){for(var e=0,t=this._deferreds.length;e<t;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function a(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function s(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(e){if(r)return;r=!0,n(e)}}if(window.Promise)return window.Promise;var l=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,r){var i=this;return new t(function(t,o){n.call(i,new a(e,r,t,o))})},t.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&c(arguments[0])?arguments[0]:arguments);return new t(function(t,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(o,e)},n)}e[o]=a,0===--i&&t(e)}catch(e){n(e)}}if(0===e.length)return t([]);for(var i=e.length,o=0;o<e.length;o++)r(o,e[o])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)})},t}),a("p",[],function(){function e(e){var t=document.createElement("a");return t.href=e,t.pathname}function t(t){var n=e(t).split("."),r=n[n.length-1],i={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png"};return r&&(r=r.toLowerCase()),i[r]}return{guessMimeType:t}}),a("e",["o","m","p","n"],function(e,t,n,r){function i(t){return new e(function(e){function n(){t.removeEventListener("load",n),e(t)}t.complete?e(t):t.addEventListener("load",n)})}function o(e){return i(e).then(function(e){var n,i;return i=t.create(r.getWidth(e),r.getHeight(e)),n=t.get2dContext(i),n.drawImage(e,0,0),i})}function a(e){return i(e).then(function(e){var t=e.src;return 0===t.indexOf("blob:")?l(t):0===t.indexOf("data:")?c(t):o(e).then(function(e){return c(e.toDataURL(n.guessMimeType(t)))})})}function s(t){return new e(function(e){function n(){r.removeEventListener("load",n),e(r)}var r=new Image;r.addEventListener("load",n),r.src=URL.createObjectURL(t),r.complete&&n()})}function l(t){return new e(function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}function c(t){return new e(function(e){var n,r,i,o,a,s;if(t=t.split(","),o=/data:([^;]+)/.exec(t[0]),o&&(a=o[1]),n=atob(t[1]),window.WebKitBlobBuilder){for(s=new WebKitBlobBuilder,r=new ArrayBuffer(n.length),i=0;i<r.length;i++)r[i]=n.charCodeAt(i);return s.append(r),void e(s.getBlob(a))}for(r=new Uint8Array(n.length),i=0;i<r.length;i++)r[i]=n.charCodeAt(i);e(new Blob([r],{type:a}))})}function u(e){return 0===e.indexOf("blob:")?l(e):0===e.indexOf("data:")?c(e):null}function d(e,t){return c(e.toDataURL(t))}function f(t){return new e(function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)})}function p(e){return f(e).then(function(e){return e.split(",")[1]})}function m(e){URL.revokeObjectURL(e.src)}return{blobToImage:s,imageToBlob:a,blobToDataUri:f,blobToBase64:p,imageToCanvas:o,canvasToBlob:d,revokeImageUrl:m,uriToBlob:u}}),a("q",[],function(){function e(e,t,n){return e=parseFloat(e),e>n?e=n:e<t&&(e=t),e}function t(){return[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]}function n(e,t){var n,r,i,o,a=[],s=new Array(10);for(n=0;n<5;n++){for(r=0;r<5;r++)a[r]=t[r+5*n];for(r=0;r<5;r++){for(o=0,i=0;i<5;i++)o+=e[r+5*i]*a[i];s[r+5*n]=o}}return s}function r(t,n){return n=e(n,0,1),t.map(function(t,r){return r%6===0?t=1-(1-t)*n:t*=n,e(t,0,1)})}function i(t,r){var i;return r=e(r,-1,1),r*=100,r<0?i=127+r/100*127:(i=r%1,i=0===i?d[r]:d[Math.floor(r)]*(1-i)+d[Math.floor(r)+1]*i,i=127*i+127),n(t,[i/127,0,0,0,.5*(127-i),0,i/127,0,0,.5*(127-i),0,0,i/127,0,.5*(127-i),0,0,0,1,0,0,0,0,0,1])}function o(t,r){var i,o,a,s;return r=e(r,-1,1),i=1+(r>0?3*r:r),o=.3086,a=.6094,s=.082,n(t,[o*(1-i)+i,a*(1-i),s*(1-i),0,0,o*(1-i),a*(1-i)+i,s*(1-i),0,0,o*(1-i),a*(1-i),s*(1-i)+i,0,0,0,0,0,1,0,0,0,0,0,1])}function a(t,r){var i,o,a,s,l;return r=e(r,-180,180)/180*Math.PI,i=Math.cos(r),o=Math.sin(r),a=.213,s=.715,l=.072,n(t,[a+i*(1-a)+o*-a,s+i*-s+o*-s,l+i*-l+o*(1-l),0,0,a+i*-a+.143*o,s+i*(1-s)+.14*o,l+i*-l+o*-.283,0,0,a+i*-a+o*-(1-a),s+i*-s+o*s,l+i*(1-l)+o*l,0,0,0,0,0,1,0,0,0,0,0,1])}function s(t,r){return r=e(255*r,-255,255),n(t,[1,0,0,0,r,0,1,0,0,r,0,0,1,0,r,0,0,0,1,0,0,0,0,0,1])}function l(t,r,i,o){return r=e(r,0,2),i=e(i,0,2),o=e(o,0,2),n(t,[r,0,0,0,0,0,i,0,0,0,0,0,o,0,0,0,0,0,1,0,0,0,0,0,1])}function c(t,i){return i=e(i,0,1),n(t,r([.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0,0,0,0,0,1],i))}function u(t,i){return i=e(i,0,1),n(t,r([.33,.34,.33,0,0,.33,.34,.33,0,0,.33,.34,.33,0,0,0,0,0,1,0,0,0,0,0,1],i))}var d=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10];return{identity:t,adjust:r,multiply:n,adjustContrast:i,adjustBrightness:s,adjustSaturation:o,adjustHue:a,adjustColors:l,adjustSepia:c,adjustGrayscale:u}}),a("c",["m","n","e","q"],function(e,t,n,r){function i(r,i){return n.blobToImage(r).then(function(r){function o(e,t){var n,r,i,o,a,s=e.data,l=t[0],c=t[1],u=t[2],d=t[3],f=t[4],p=t[5],m=t[6],g=t[7],h=t[8],v=t[9],b=t[10],y=t[11],x=t[12],C=t[13],w=t[14],N=t[15],k=t[16],S=t[17],_=t[18],E=t[19];for(a=0;a<s.length;a+=4)n=s[a],r=s[a+1],i=s[a+2],o=s[a+3],s[a]=n*l+r*c+i*u+o*d+f,s[a+1]=n*p+r*m+i*g+o*h+v,s[a+2]=n*b+r*y+i*x+o*C+w,s[a+3]=n*N+r*k+i*S+o*_+E;return e}var a,s=e.create(t.getWidth(r),t.getHeight(r)),l=e.get2dContext(s);return l.drawImage(r,0,0),u(r),a=o(l.getImageData(0,0,s.width,s.height),i),l.putImageData(a,0,0),n.canvasToBlob(s)})}function o(r,i){return n.blobToImage(r).then(function(r){function o(e,t,n){function r(e,t,n){return e>n?e=n:e<t&&(e=t),e}var i,o,a,s,l,c,u,d,f,p,m,g,h,v,b,y,x;for(a=Math.round(Math.sqrt(n.length)),s=Math.floor(a/2),i=e.data,o=t.data,y=e.width,x=e.height,c=0;c<x;c++)for(l=0;l<y;l++){for(u=d=f=0,m=0;m<a;m++)for(p=0;p<a;p++)g=r(l+p-s,0,y-1),h=r(c+m-s,0,x-1),v=4*(h*y+g),b=n[m*a+p],u+=i[v]*b,d+=i[v+1]*b,f+=i[v+2]*b;v=4*(c*y+l),o[v]=r(u,0,255),o[v+1]=r(d,0,255),o[v+2]=r(f,0,255)}return t}var a,s,l=e.create(t.getWidth(r),t.getHeight(r)),c=e.get2dContext(l);return c.drawImage(r,0,0),u(r),a=c.getImageData(0,0,l.width,l.height),s=c.getImageData(0,0,l.width,l.height),s=o(a,s,i),c.putImageData(s,0,0),n.canvasToBlob(l)})}function a(r){return function(i,o){return n.blobToImage(i).then(function(i){function a(e,t){var n,r=e.data;for(n=0;n<r.length;n+=4)r[n]=t[r[n]],r[n+1]=t[r[n+1]],r[n+2]=t[r[n+2]];return e}var s,l,c=e.create(t.getWidth(i),t.getHeight(i)),d=e.get2dContext(c),f=new Array(256);for(l=0;l<f.length;l++)f[l]=r(l,o);return d.drawImage(i,0,0),u(i),s=a(d.getImageData(0,0,c.width,c.height),f),d.putImageData(s,0,0),n.canvasToBlob(c)})}}function s(e){return function(t,n){return i(t,e(r.identity(),n))}}function l(e){return function(t){return i(t,e)}}function c(e){return function(t){return o(t,e)}}var u=n.revokeImageUrl;return{invert:l([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0]),brightness:s(r.adjustBrightness),hue:s(r.adjustHue),saturate:s(r.adjustSaturation),contrast:s(r.adjustContrast),grayscale:s(r.adjustGrayscale),sepia:s(r.adjustSepia),colorize:function(e,t,n,o){return i(e,r.adjustColors(r.identity(),t,n,o))},sharpen:c([0,-1,0,-1,5,-1,0,-1,0]),emboss:c([-2,-1,0,-1,1,1,0,1,2]),gamma:a(function(e,t){return 255*Math.pow(e/255,1-t)}),exposure:a(function(e,t){return 255*(1-Math.exp(-(e/255)*t))}),colorFilter:i,convoluteFilter:o}}),a("r",["o","e","m","n"],function(e,t,n,r){function i(e,t,n){var a=r.getWidth(e),s=r.getHeight(e),l=t/a,c=n/s,u=!1;(l<.5||l>2)&&(l=l<.5?.5:2,u=!0),(c<.5||c>2)&&(c=c<.5?.5:2,u=!0);var d=o(e,l,c);return u?d.then(function(e){return i(e,t,n)}):d}function o(t,i,o){return new e(function(e){var a=r.getWidth(t),s=r.getHeight(t),l=Math.floor(a*i),c=Math.floor(s*o),u=n.create(l,c),d=n.get2dContext(u);d.drawImage(t,0,0,a,s,0,0,l,c),e(u)})}return{scale:i}}),a("d",["e","m","n","r"],function(e,t,n,r){function i(r,i){return e.blobToImage(r).then(function(o){var a=t.create(n.getWidth(o),n.getHeight(o)),s=t.get2dContext(a),c=0,u=0;return i=i<0?360+i:i,90!=i&&270!=i||t.resize(a,a.height,a.width),90!=i&&180!=i||(c=a.width),270!=i&&180!=i||(u=a.height),s.translate(c,u),s.rotate(i*Math.PI/180),s.drawImage(o,0,0),l(o),e.canvasToBlob(a,r.type)})}function o(r,i){return e.blobToImage(r).then(function(r){var o=t.create(n.getWidth(r),n.getHeight(r)),a=t.get2dContext(o);return"v"==i?(a.scale(1,-1),a.drawImage(r,0,-o.height)):(a.scale(-1,1),a.drawImage(r,-o.width,0)),l(r),e.canvasToBlob(o)})}function a(n,r,i,o,a){return e.blobToImage(n).then(function(n){var s=t.create(o,a),c=t.get2dContext(s);return c.drawImage(n,-r,-i),l(n),e.canvasToBlob(s)})}function s(t,n,i){return e.blobToImage(t).then(function(o){var a;return a=r.scale(o,n,i).then(function(n){return e.canvasToBlob(n,t.type)}).then(c(o))["catch"](c(o))})}var l=e.revokeImageUrl,c=function(e){return function(t){return l(e),t}};return{rotate:i,flip:o,crop:a,resize:s}}),a("7",["c","d"],function(e,t){var n=function(t){return e.invert(t)},r=function(t){return e.sharpen(t)},i=function(t){return e.emboss(t)},o=function(t,n){return e.gamma(t,n)},a=function(t,n){return e.exposure(t,n)},s=function(t,n,r,i){return e.colorize(t,n,r,i)},l=function(t,n){return e.brightness(t,n)},c=function(t,n){return e.hue(t,n)},u=function(t,n){return e.saturate(t,n)},d=function(t,n){return e.contrast(t,n)},f=function(t,n){return e.grayscale(t,n)},p=function(t,n){return e.sepia(t,n)},m=function(e,n){return t.flip(e,n)},g=function(e,n,r,i,o){return t.crop(e,n,r,i,o)},h=function(e,n,r){return t.resize(e,n,r)},v=function(e,n){return t.rotate(e,n)};return{invert:n,sharpen:r,emboss:i,brightness:l,hue:c,saturate:u,contrast:d,grayscale:f,sepia:p,colorize:s,gamma:o,exposure:a,flip:m,crop:g,resize:h,rotate:v}}),a("8",["e"],function(e){var t=function(t){return e.blobToImage(t)},n=function(t){return e.imageToBlob(t)},r=function(t){return e.blobToDataUri(t)},i=function(t){return e.blobToBase64(t)};return{blobToImage:t,imageToBlob:n,blobToDataUri:r,blobToBase64:i}}),s("f",tinymce.dom.DOMUtils),s("g",tinymce.ui.Factory),s("h",tinymce.ui.Form),s("i",tinymce.ui.Container),s("s",tinymce.ui.Control),s("t",tinymce.ui.DragHelper),s("u",tinymce.geom.Rect),s("w",tinymce.dom.DomQuery),s("x",tinymce.util.Observable),s("y",tinymce.util.VK),a("v",["w","t","u","5","x","y"],function(e,t,n,r,i,o){var a=0;return function(s,l,c,u,d){function f(e,t){return{x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}}function p(e,t){return{x:t.x-e.x,y:t.y-e.y,w:t.w,h:t.h}}function m(){return p(c,s)}function g(e,t,r,i){var o,a,l,u,d;o=t.x,a=t.y,l=t.w,u=t.h,o+=r*e.deltaX,a+=i*e.deltaY,l+=r*e.deltaW,u+=i*e.deltaH,l<20&&(l=20),u<20&&(u=20),d=s=n.clamp({x:o,y:a,w:l,h:u},c,"move"==e.name),d=p(c,d),k.fire("updateRect",{rect:d}),C(d)}function h(){function n(e){var n;return new t(R,{document:u.ownerDocument,handle:R+"-"+e.name,start:function(){n=s},drag:function(t){g(e,n,t.deltaX,t.deltaY)}})}e('<div id="'+R+'" class="'+T+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(u),r.each(E,function(t){e("#"+R,u).append('<div id="'+R+"-"+t+'"class="'+T+'croprect-block" style="display: none" data-mce-bogus="all">')}),r.each(S,function(t){e("#"+R,u).append('<div id="'+R+"-"+t.name+'" class="'+T+"croprect-handle "+T+"croprect-handle-"+t.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+t.label+'" aria-grabbed="false">')}),_=r.map(S,n),b(s),e(u).on("focusin focusout",function(t){e(t.target).attr("aria-grabbed","focus"===t.type)}),e(u).on("keydown",function(e){function t(e,t,r,i,o){e.stopPropagation(),e.preventDefault(),g(n,r,i,o)}var n;switch(r.each(S,function(t){if(e.target.id==R+"-"+t.name)return n=t,!1}),e.keyCode){case o.LEFT:t(e,n,s,-10,0);break;case o.RIGHT:t(e,n,s,10,0);break;case o.UP:t(e,n,s,0,-10);break;case o.DOWN:t(e,n,s,0,10);break;case o.ENTER:case o.SPACEBAR:e.preventDefault(),d()}})}function v(t){var n;n=r.map(S,function(e){return"#"+R+"-"+e.name}).concat(r.map(E,function(e){return"#"+R+"-"+e})).join(","),t?e(n,u).show():e(n,u).hide()}function b(t){function n(t,n){n.h<0&&(n.h=0),n.w<0&&(n.w=0),e("#"+R+"-"+t,u).css({left:n.x,top:n.y,width:n.w,height:n.h})}r.each(S,function(n){e("#"+R+"-"+n.name,u).css({left:t.w*n.xMul+t.x,top:t.h*n.yMul+t.y})}),n("top",{x:l.x,y:l.y,w:l.w,h:t.y-l.y}),n("right",{x:t.x+t.w,y:t.y,w:l.w-t.x-t.w+l.x,h:t.h}),n("bottom",{x:l.x,y:t.y+t.h,w:l.w,h:l.h-t.y-t.h+l.y}),n("left",{x:l.x,y:t.y,w:t.x-l.x,h:t.h}),n("move",t)}function y(e){s=e,b(s)}function x(e){l=e,b(s)}function C(e){y(f(c,e))}function w(e){c=e,b(s)}function N(){r.each(_,function(e){e.destroy()}),_=[]}var k,S,_,E,T="mce-",R=T+"crid-"+a++;return S=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],E=["top","right","bottom","left"],h(u),k=r.extend({toggleVisibility:v,setClampRect:w,setRect:y,getInnerRect:m,setInnerRect:C,setViewPortRect:x,destroy:N},i)}}),a("j",["s","t","u","5","3","v"],function(e,t,n,r,i,o){function a(e){return new i(function(t){function n(){e.removeEventListener("load",n),t(e)}e.complete?t(e):e.addEventListener("load",n)})}return e.extend({Defaults:{classes:"imagepanel"},selection:function(e){return arguments.length?(this.state.set("rect",e),this):this.state.get("rect")},imageSize:function(){var e=this.state.get("viewRect");return{w:e.w,h:e.h}},toggleCropRect:function(e){this.state.set("cropEnabled",e)},imageSrc:function(e){var t=this,r=new Image;r.src=e,a(r).then(function(){var e,i,o=t.state.get("viewRect");if(i=t.$el.find("img"),i[0])i.replaceWith(r);else{var a=document.createElement("div");a.className="mce-imagepanel-bg",t.getEl().appendChild(a),t.getEl().appendChild(r)}e={x:0,y:0,w:r.naturalWidth,h:r.naturalHeight},t.state.set("viewRect",e),t.state.set("rect",n.inflate(e,-20,-20)),o&&o.w==e.w&&o.h==e.h||t.zoomFit(),t.repaintImage(),t.fire("load")})},zoom:function(e){return arguments.length?(this.state.set("zoom",e),this):this.state.get("zoom")},postRender:function(){return this.imageSrc(this.settings.imageSrc),this._super()},zoomFit:function(){var e,t,n,r,i,o,a,s=this;a=10,e=s.$el.find("img"),t=s.getEl().clientWidth,n=s.getEl().clientHeight,r=e[0].naturalWidth,i=e[0].naturalHeight,o=Math.min((t-a)/r,(n-a)/i),o>=1&&(o=1),s.zoom(o)},repaintImage:function(){var e,t,n,r,i,o,a,s,l,c,u;u=this.getEl(),l=this.zoom(),c=this.state.get("rect"),a=this.$el.find("img"),s=this.$el.find(".mce-imagepanel-bg"),i=u.offsetWidth,o=u.offsetHeight,n=a[0].naturalWidth*l,r=a[0].naturalHeight*l,e=Math.max(0,i/2-n/2),t=Math.max(0,o/2-r/2),a.css({left:e,top:t,width:n,height:r}),s.css({left:e,top:t,width:n,height:r}),this.cropRect&&(this.cropRect.setRect({x:c.x*l+e,y:c.y*l+t,w:c.w*l,h:c.h*l}),this.cropRect.setClampRect({x:e,y:t,w:n,h:r}),this.cropRect.setViewPortRect({x:0,y:0,w:i,h:o}))},bindStates:function(){function e(e){t.cropRect=new o(e,t.state.get("viewRect"),t.state.get("viewRect"),t.getEl(),function(){t.fire("crop")}),t.cropRect.on("updateRect",function(e){var n=e.rect,r=t.zoom();n={x:Math.round(n.x/r),y:Math.round(n.y/r),w:Math.round(n.w/r),h:Math.round(n.h/r)},t.state.set("rect",n)}),t.on("remove",t.cropRect.destroy)}var t=this;t.state.on("change:cropEnabled",function(e){t.cropRect.toggleVisibility(e.value),t.repaintImage()}),t.state.on("change:zoom",function(){t.repaintImage()}),t.state.on("change:rect",function(n){var r=n.value;t.cropRect||e(r),t.cropRect.setRect(r)})}})}),a("k",[],function(){return function(){function e(e){var t;return t=o.splice(++a),o.push(e),{state:e,removed:t}}function t(){if(r())return o[--a]}function n(){if(i())return o[++a]}function r(){return a>0}function i(){return a!=-1&&a<o.length-1}var o=[],a=-1;return{data:o,add:e,undo:t,redo:n,canUndo:r,canRedo:i}}}),a("9",["f","5","3","g","h","i","j","7","8","k"],function(e,t,n,r,i,o,a,s,l,c){function u(e){return{blob:e,url:URL.createObjectURL(e)}}function d(e){e&&URL.revokeObjectURL(e.url)}function f(e){t.each(e,d)}function p(n,l,p){function m(e){var t,n,r,i;t=O.find("#w")[0],n=O.find("#h")[0],r=parseInt(t.value(),10),i=parseInt(n.value(),10),O.find("#constrain")[0].checked()&&ae&&se&&r&&i&&("w"==e.control.settings.name?(i=Math.round(r*le),n.value(i)):(r=Math.round(i*ce),t.value(r))),ae=r,se=i}function g(e){return Math.round(100*e)+"%"}function h(){O.find("#undo").disabled(!ue.canUndo()),O.find("#redo").disabled(!ue.canRedo()),O.statusbar.find("#save").disabled(!ue.canUndo())}function v(){O.find("#undo").disabled(!0),O.find("#redo").disabled(!0)}function b(e){e&&$.imageSrc(e.url)}function y(e){return function(){var n=t.grep(oe,function(t){return t.settings.name!=e});t.each(n,function(e){e.hide()}),e.show(),e.focus()}}function x(e){z=u(e),b(z)}function C(e){n=u(e),b(n),f(ue.add(n).removed),h()}function w(){var e=$.selection();s.crop(n.blob,e.x,e.y,e.w,e.h).then(function(e){C(e),S()})}function N(e){var t=[].slice.call(arguments,1);return function(){var r=z||n;e.apply(this,[r.blob].concat(t)).then(x)}}function k(e){var t=[].slice.call(arguments,1);return function(){e.apply(this,[n.blob].concat(t)).then(C)}}function S(){b(n),d(z),y(H)(),h()}function _(){z&&(C(z.blob),S())}function E(){var e=$.zoom();e<2&&(e+=.1),$.zoom(e)}function T(){var e=$.zoom();e>.1&&(e-=.1),$.zoom(e)}function R(){n=ue.undo(),b(n),h()}function A(){n=ue.redo(),b(n),h()}function B(){l(n.blob),O.close()}function P(e){return new i({layout:"flex",direction:"row",labelGap:5,border:"0 0 1 0",align:"center",pack:"center",padding:"0 10 0 10",spacing:5,flex:0,minHeight:60,defaults:{classes:"imagetool",type:"button"},items:e})}function D(e,t){return P([{text:"Back",onclick:S},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:_}]).hide().on("show",function(){v(),t(n.blob).then(function(e){var t=u(e);b(t),d(z),z=t})})}function M(e,t,r,i,o){function a(e){t(n.blob,e).then(function(e){var t=u(e);b(t),d(z),z=t})}return P([{text:"Back",onclick:S},{type:"spacer",flex:1},{type:"slider",flex:1,ondragend:function(e){a(e.value)},minValue:i,maxValue:o,value:r,previewFilter:g},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:_}]).hide().on("show",function(){this.find("slider").value(r),v()})}function L(e,t){function r(){var e,r,i;e=O.find("#r")[0].value(),r=O.find("#g")[0].value(),i=O.find("#b")[0].value(),t(n.blob,e,r,i).then(function(e){var t=u(e);b(t),d(z),z=t})}return P([{text:"Back",onclick:S},{type:"spacer",flex:1},{type:"slider",label:"R",name:"r",minValue:0,value:1,maxValue:2,ondragend:r,previewFilter:g},{type:"slider",label:"G",name:"g",minValue:0,value:1,maxValue:2,ondragend:r,previewFilter:g},{type:"slider",label:"B",name:"b",minValue:0,value:1,maxValue:2,ondragend:r,previewFilter:g},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:_}]).hide().on("show",function(){O.find("#r,#g,#b").value(1),v()})}function I(e){e.control.value()===!0&&(le=se/ae,ce=ae/se)}var O,H,F,z,W,U,V,$,j,q,Y,X,K,G,J,Z,Q,ee,te,ne,re,ie,oe,ae,se,le,ce,ue=new c;W=P([{text:"Back",onclick:S},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:w}]).hide().on("show hide",function(e){$.toggleCropRect("show"==e.type)}).on("show",v),U=P([{text:"Back",onclick:S},{type:"spacer",flex:1},{type:"textbox",name:"w",label:"Width",size:4,onkeyup:m},{type:"textbox",name:"h",label:"Height",size:4,onkeyup:m},{type:"checkbox",name:"constrain",text:"Constrain proportions",checked:!0,onchange:I},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:"submit"}]).hide().on("submit",function(e){var t=parseInt(O.find("#w").value(),10),n=parseInt(O.find("#h").value(),10);e.preventDefault(),k(s.resize,t,n)(),S()}).on("show",v),V=P([{text:"Back",onclick:S},{type:"spacer",flex:1},{icon:"fliph",tooltip:"Flip horizontally",onclick:N(s.flip,"h")},{icon:"flipv",tooltip:"Flip vertically",onclick:N(s.flip,"v")},{icon:"rotateleft",tooltip:"Rotate counterclockwise",onclick:N(s.rotate,-90)},{icon:"rotateright",tooltip:"Rotate clockwise",onclick:N(s.rotate,90)},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:_}]).hide().on("show",v),Y=D("Invert",s.invert),te=D("Sharpen",s.sharpen),ne=D("Emboss",s.emboss),X=M("Brightness",s.brightness,0,-1,1),K=M("Hue",s.hue,180,0,360),G=M("Saturate",s.saturate,0,-1,1),J=M("Contrast",s.contrast,0,-1,1),Z=M("Grayscale",s.grayscale,0,0,1),Q=M("Sepia",s.sepia,0,0,1),ee=L("Colorize",s.colorize),re=M("Gamma",s.gamma,0,-1,1),ie=M("Exposure",s.exposure,1,0,2),F=P([{text:"Back",onclick:S},{type:"spacer",flex:1},{text:"hue",icon:"hue",onclick:y(K)},{text:"saturate",icon:"saturate",onclick:y(G)},{text:"sepia",icon:"sepia",onclick:y(Q)},{text:"emboss",icon:"emboss",onclick:y(ne)},{text:"exposure",icon:"exposure",onclick:y(ie)},{type:"spacer",flex:1}]).hide(),H=P([{tooltip:"Crop",icon:"crop",onclick:y(W)},{tooltip:"Resize",icon:"resize2",onclick:y(U)},{tooltip:"Orientation",icon:"orientation",onclick:y(V)},{tooltip:"Brightness",icon:"sun",onclick:y(X)},{tooltip:"Sharpen",icon:"sharpen",onclick:y(te)},{tooltip:"Contrast",icon:"contrast",onclick:y(J)},{tooltip:"Color levels",icon:"drop",onclick:y(ee)},{tooltip:"Gamma",icon:"gamma",onclick:y(re)},{tooltip:"Invert",icon:"invert",onclick:y(Y)}]),$=new a({flex:1,imageSrc:n.url}),j=new o({layout:"flex",direction:"column",border:"0 1 0 0",padding:5,spacing:5,items:[{type:"button",icon:"undo",tooltip:"Undo",name:"undo",onclick:R},{type:"button",icon:"redo",tooltip:"Redo",name:"redo",onclick:A},{type:"button",icon:"zoomin",tooltip:"Zoom in",onclick:E},{type:"button",icon:"zoomout",tooltip:"Zoom out",onclick:T}]}),q=new o({type:"container",layout:"flex",direction:"row",align:"stretch",flex:1,items:[j,$]}),oe=[H,W,U,V,F,Y,X,K,G,J,Z,Q,ee,te,ne,re,ie],O=r.create("window",{layout:"flex",direction:"column",align:"stretch",minWidth:Math.min(e.DOM.getViewPort().w,800),minHeight:Math.min(e.DOM.getViewPort().h,650),title:"Edit image",items:oe.concat([q]),buttons:[{text:"Save",name:"save",subtype:"primary",onclick:B},{text:"Cancel",onclick:"close"}]}),O.renderTo(document.body).reflow(),O.on("close",function(){p(),f(ue.data),ue=null,z=null}),ue.add(n),h(),$.on("load",function(){ae=$.imageSize().w,se=$.imageSize().h,le=se/ae,ce=ae/se,O.find("#w").value(ae),O.find("#h").value(se)}),$.on("crop",w)}function m(e){return new n(function(t,n){p(u(e),t,n)})}return{edit:m}}),a("a",[],function(){function e(e){function t(e){return/^[0-9\.]+px$/.test(e)}var n,r;return n=e.style.width,r=e.style.height,n||r?t(n)&&t(r)?{w:parseInt(n,10),h:parseInt(r,10)}:null:(n=e.width,r=e.height,n&&r?{w:parseInt(n,10),h:parseInt(r,10)}:null)}function t(e,t){var n,r;t&&(n=e.style.width,r=e.style.height,(n||r)&&(e.style.width=t.w+"px",e.style.height=t.h+"px",e.removeAttribute("data-mce-style")),n=e.width,r=e.height,(n||r)&&(e.setAttribute("width",t.w),e.setAttribute("height",t.h)))}function n(e){return{w:e.naturalWidth,h:e.naturalHeight}}return{getImageSize:e,setImageSize:t,getNaturalImageSize:n}}),a("l",["3","5"],function(e,t){var n=function(e){return null!==e&&void 0!==e},r=function(e,t){var r;return r=t.reduce(function(e,t){return n(e)?e[t]:void 0},e),n(r)?r:null},i=function(n,r){return new e(function(e){var i;i=new XMLHttpRequest,i.onreadystatechange=function(){4===i.readyState&&e({status:i.status,blob:this.response})},i.open("GET",n,!0),t.each(r,function(e,t){i.setRequestHeader(t,e)}),i.responseType="blob",i.send()})},o=function(t){return new e(function(e){var n=new FileReader;n.onload=function(t){var n=t.target;e(n.result)},n.readAsText(t)})},a=function(e){var t;try{t=JSON.parse(e)}catch(e){}return t};return{traverse:r,readBlob:o,requestUrlAsBlob:i,parseJson:a}}),a("b",["3","5","l"],function(e,t,n){function r(t){return n.requestUrlAsBlob(t,{}).then(function(t){return t.status>=400?o(t.status):e.resolve(t.blob)})}var i=function(e){return 400===e||403===e||500===e},o=function(t){return e.reject("ImageProxy HTTP error: "+t)},a=function(t){e.reject("ImageProxy Service error: "+t)},s=function(e,t){return n.readBlob(t).then(function(e){var t=n.parseJson(e),r=n.traverse(t,["error","type"]);return a(r?r:"Invalid JSON")})},l=function(e,t){return i(e)?s(e,t):o(e)},c=function(t,r){return n.requestUrlAsBlob(t,{"Content-Type":"application/json;charset=UTF-8","tiny-api-key":r}).then(function(t){return t.status>=400?l(t.status,t.blob):e.resolve(t.blob)})},u=function(e,t){return t?c(e,t):r(e)};return{getUrl:u}}),a("0",["1","2","3","4","5","6","7","8","9","a","b"],function(e,t,n,r,i,o,a,s,l,c,u){var d=function(e){function d(t){e.notificationManager.open({text:t,type:"error"})}function f(){return e.selection.getNode()}function p(t){var n=t.match(/\/([^\/\?]+)?\.(?:jpeg|jpg|png|gif)(?:\?|$)/i);return n?e.dom.encode(n[1]):null}function m(){return"imagetools"+D++}function g(t){var n=t.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new r(n).host===e.documentBaseURI.host}function h(t){return i.inArray(e.settings.imagetools_cors_hosts,new r(t.src).host)!==-1}function v(){return e.settings.api_key||e.settings.imagetools_api_key}function b(t){var n,r=t.src;return h(t)?u.getUrl(t.src,null):g(t)?s.imageToBlob(t):(r=e.settings.imagetools_proxy,r+=(r.indexOf("?")===-1?"?":"&")+"url="+encodeURIComponent(t.src),n=v(),u.getUrl(r,n))}function y(){var t;return t=e.editorUpload.blobCache.getByUri(f().src),t?t.blob():b(f())}function x(){B=o.setEditorTimeout(e,function(){e.editorUpload.uploadImagesAuto()},e.settings.images_upload_timeout||3e4)}function C(){clearTimeout(B)}function w(t,n){return s.blobToDataUri(t).then(function(i){var o,a,s,l,c,u;return u=f(),l=e.editorUpload.blobCache,c=l.getByUri(u.src),s=r.parseDataUri(i).data,o=m(),e.settings.images_reuse_filename&&(a=c?c.filename():p(u.src)),c=l.create(o,t,s,a),l.add(c),e.undoManager.transact(function(){function t(){e.$(u).off("load",t),e.nodeChanged(),n?e.editorUpload.uploadImagesAuto():(C(),x())}e.$(u).on("load",t),e.$(u).attr({src:c.blobUri()}).removeAttr("data-mce-src")}),c})}function N(t){return function(){return e._scanForImages().then(y).then(t).then(w,d)}}function k(e){return function(){return N(function(t){var n=c.getImageSize(f());return n&&c.setImageSize(f(),{w:n.h,h:n.w}),a.rotate(t,e)})()}}function S(e){return function(){return N(function(t){return a.flip(t,e)})()}}function _(){var e=f(),t=c.getNaturalImageSize(e),r=function(r){return new n(function(n){s.blobToImage(r).then(function(i){var o=c.getNaturalImageSize(i);t.w==o.w&&t.h==o.h||c.getImageSize(e)&&c.setImageSize(e,o),URL.revokeObjectURL(i.src),n(r)})})},i=function(e){return l.edit(e).then(r).then(function(e){w(e,!0)},function(){})};e&&b(e).then(i,d)}function E(){e.addButton("rotateleft",{title:"Rotate counterclockwise",cmd:"mceImageRotateLeft"}),e.addButton("rotateright",{title:"Rotate clockwise",cmd:"mceImageRotateRight"}),e.addButton("flipv",{title:"Flip vertically",cmd:"mceImageFlipVertical"}),e.addButton("fliph",{title:"Flip horizontally",cmd:"mceImageFlipHorizontal"}),e.addButton("editimage",{title:"Edit image",cmd:"mceEditImage"}),e.addButton("imageoptions",{title:"Image options",icon:"options",cmd:"mceImage"})}function T(){e.on("NodeChange",function(t){P&&P.src!=t.element.src&&(C(),e.editorUpload.uploadImagesAuto(),P=void 0),R(t.element)&&(P=t.element)})}function R(t){var n=e.dom.is(t,"img:not([data-mce-object],[data-mce-placeholder])");return n&&(g(t)||h(t)||e.settings.imagetools_proxy)}function A(){var t=e.settings.imagetools_toolbar;t||(t="rotateleft rotateright | flipv fliph | crop editimage imageoptions"),e.addContextToolbar(R,t)}var B,P,D=0;t.fileApi&&(i.each({mceImageRotateLeft:k(-90),mceImageRotateRight:k(90),mceImageFlipVertical:S("v"),mceImageFlipHorizontal:S("h"),mceEditImage:_},function(t,n){e.addCommand(n,t)}),E(),A(),T())};return e.add("imagetools",d),function(){}}),r("0")()}();
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};g("o",[],function(){function a(a,b){return function(){a.apply(b,arguments)}}function b(b){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof b)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],h(b,a(d,this),a(e,this))}function c(a){var b=this;return null===this._state?void this._deferreds.push(a):void i(function(){var c=b._state?a.onFulfilled:a.onRejected;if(null===c)return void(b._state?a.resolve:a.reject)(b._value);var d;try{d=c(b._value)}catch(b){return void a.reject(b)}a.resolve(d)})}function d(b){try{if(b===this)throw new TypeError("A promise cannot be resolved with itself.");if(b&&("object"==typeof b||"function"==typeof b)){var c=b.then;if("function"==typeof c)return void h(a(c,b),a(d,this),a(e,this))}this._state=!0,this._value=b,f.call(this)}catch(a){e.call(this,a)}}function e(a){this._state=!1,this._value=a,f.call(this)}function f(){for(var a=0,b=this._deferreds.length;a<b;a++)c.call(this,this._deferreds[a]);this._deferreds=null}function g(a,b,c,d){this.onFulfilled="function"==typeof a?a:null,this.onRejected="function"==typeof b?b:null,this.resolve=c,this.reject=d}function h(a,b,c){var d=!1;try{a(function(a){d||(d=!0,b(a))},function(a){d||(d=!0,c(a))})}catch(a){if(d)return;d=!0,c(a)}}if(window.Promise)return window.Promise;var i=b.immediateFn||"function"==typeof setImmediate&&setImmediate||function(a){setTimeout(a,1)},j=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};return b.prototype["catch"]=function(a){return this.then(null,a)},b.prototype.then=function(a,d){var e=this;return new b(function(b,f){c.call(e,new g(a,d,b,f))})},b.all=function(){var a=Array.prototype.slice.call(1===arguments.length&&j(arguments[0])?arguments[0]:arguments);return new b(function(b,c){function d(f,g){try{if(g&&("object"==typeof g||"function"==typeof g)){var h=g.then;if("function"==typeof h)return void h.call(g,function(a){d(f,a)},c)}a[f]=g,0===--e&&b(a)}catch(a){c(a)}}if(0===a.length)return b([]);for(var e=a.length,f=0;f<a.length;f++)d(f,a[f])})},b.resolve=function(a){return a&&"object"==typeof a&&a.constructor===b?a:new b(function(b){b(a)})},b.reject=function(a){return new b(function(b,c){c(a)})},b.race=function(a){return new b(function(b,c){for(var d=0,e=a.length;d<e;d++)a[d].then(b,c)})},b}),g("p",[],function(){function a(a,b){return e(document.createElement("canvas"),a,b)}function b(b){var d,e;return d=a(b.width,b.height),e=c(d),e.drawImage(b,0,0),d}function c(a){return a.getContext("2d")}function d(a){var b=null;try{b=a.getContext("webgl")||a.getContext("experimental-webgl")}catch(a){}return b||(b=null),b}function e(a,b,c){return a.width=b,a.height=c,a}return{create:a,clone:b,resize:e,get2dContext:c,get3dContext:d}}),g("q",[],function(){function a(a){var b=document.createElement("a");return b.href=a,b.pathname}function b(b){var c,d,e,f;return 0===b.indexOf("data:")?(b=b.split(","),f=/data:([^;]+)/.exec(b[0]),f?f[1]:""):(e={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png"},c=a(b).split("."),d=c[c.length-1],d&&(d=d.toLowerCase()),e[d])}return{guessMimeType:b}}),g("r",[],function(){function a(a){return a.naturalWidth||a.width}function b(a){return a.naturalHeight||a.height}return{getWidth:a,getHeight:b}}),g("c",["o","p","q","r"],function(a,b,c,d){function e(b){return new a(function(a){function c(){b.removeEventListener("load",c),a(b)}b.complete?a(b):b.addEventListener("load",c)})}function f(a){return e(a).then(function(a){var c,e;return e=b.create(d.getWidth(a),d.getHeight(a)),c=b.get2dContext(e),c.drawImage(a,0,0),e})}function g(a){return e(a).then(function(a){var b=a.src;return 0===b.indexOf("blob:")?i(b):0===b.indexOf("data:")?k(b):f(a).then(function(a){return k(a.toDataURL(c.guessMimeType(b)))})})}function h(b){return new a(function(a){function c(){d.removeEventListener("load",c),a(d)}var d=new Image;d.addEventListener("load",c),d.src=URL.createObjectURL(b),d.complete&&c()})}function i(b){return new a(function(a){var c=new XMLHttpRequest;c.open("GET",b,!0),c.responseType="blob",c.onload=function(){200==this.status&&a(this.response)},c.send()})}function j(a){var b,c,d,e,f,g;if(a=a.split(","),e=/data:([^;]+)/.exec(a[0]),e&&(f=e[1]),b=atob(a[1]),window.WebKitBlobBuilder){for(g=new WebKitBlobBuilder,c=new ArrayBuffer(b.length),d=0;d<c.length;d++)c[d]=b.charCodeAt(d);return g.append(c),g.getBlob(f)}for(c=new Uint8Array(b.length),d=0;d<c.length;d++)c[d]=b.charCodeAt(d);return new Blob([c],{type:f})}function k(b){return new a(function(a){a(j(b))})}function l(a){return 0===a.indexOf("blob:")?i(a):0===a.indexOf("data:")?k(a):null}function m(b,c,d){return c=c||"image/png",HTMLCanvasElement.prototype.toBlob?new a(function(a){b.toBlob(function(b){a(b)},c,d)}):k(b.toDataURL(c,d))}function n(b){return new a(function(a){var c=new FileReader;c.onloadend=function(){a(c.result)},c.readAsDataURL(b)})}function o(a){return n(a).then(function(a){return a.split(",")[1]})}function p(a){URL.revokeObjectURL(a.src)}return{blobToImage:h,imageToBlob:g,blobToDataUri:n,blobToBase64:o,imageToCanvas:f,canvasToBlob:m,revokeImageUrl:p,uriToBlob:l,dataUriToBlobSync:j}}),g("d",["o","c","q","p"],function(a,b,c,d){function e(a,c){function e(){return c}function f(d,e){return b.canvasToBlob(a,d||c,e)}function g(b,d){return a.toDataURL(b||c,d)}function h(a,b){return g(a,b).split(",")[1]}function i(){return d.clone(a)}return{getType:e,toBlob:f,toDataURL:g,toBase64:h,toCanvas:i}}function f(a){return b.blobToImage(a).then(function(a){var c=b.imageToCanvas(a);return b.revokeImageUrl(a),c}).then(function(b){return e(b,a.type)})}function g(b,c){return new a(function(a){a(e(b,c))})}function h(a){var d=c.guessMimeType(a.src);return b.imageToCanvas(a).then(function(a){return e(a,d)})}return{fromBlob:f,fromCanvas:g,fromImage:h}}),g("1",["c","d"],function(a,b){var c=function(b){return a.blobToImage(b)},d=function(b){return a.imageToBlob(b)},e=function(b){return a.blobToDataUri(b)},f=function(b){return a.blobToBase64(b)},g=function(a){return b.fromBlob(a)},h=function(c){return a.uriToBlob(c).then(b.fromBlob)},i=function(a){return b.fromImage(a)},j=function(a,b,c){return a.toBlob(b,c)},k=function(b,c,d){return a.dataUriToBlobSync(b.toDataURL(c,d))};return{blobToImage:c,imageToBlob:d,blobToDataUri:e,blobToBase64:f,blobToImageResult:g,dataUriToImageResult:h,imageToImageResult:i,imageResultToBlob:j,imageResultToBlobSync:k}}),g("s",[],function(){function a(a,b,c){return a=parseFloat(a),a>c?a=c:a<b&&(a=b),a}function b(){return[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]}function c(a,b){var c,d,e,f,g=[],h=new Array(10);for(c=0;c<5;c++){for(d=0;d<5;d++)g[d]=b[d+5*c];for(d=0;d<5;d++){for(f=0,e=0;e<5;e++)f+=a[d+5*e]*g[e];h[d+5*c]=f}}return h}function d(b,c){return c=a(c,0,1),b.map(function(b,d){return d%6===0?b=1-(1-b)*c:b*=c,a(b,0,1)})}function e(b,d){var e;return d=a(d,-1,1),d*=100,d<0?e=127+d/100*127:(e=d%1,e=0===e?l[d]:l[Math.floor(d)]*(1-e)+l[Math.floor(d)+1]*e,e=127*e+127),c(b,[e/127,0,0,0,.5*(127-e),0,e/127,0,0,.5*(127-e),0,0,e/127,0,.5*(127-e),0,0,0,1,0,0,0,0,0,1])}function f(b,d){var e,f,g,h;return d=a(d,-1,1),e=1+(d>0?3*d:d),f=.3086,g=.6094,h=.082,c(b,[f*(1-e)+e,g*(1-e),h*(1-e),0,0,f*(1-e),g*(1-e)+e,h*(1-e),0,0,f*(1-e),g*(1-e),h*(1-e)+e,0,0,0,0,0,1,0,0,0,0,0,1])}function g(b,d){var e,f,g,h,i;return d=a(d,-180,180)/180*Math.PI,e=Math.cos(d),f=Math.sin(d),g=.213,h=.715,i=.072,c(b,[g+e*(1-g)+f*-g,h+e*-h+f*-h,i+e*-i+f*(1-i),0,0,g+e*-g+.143*f,h+e*(1-h)+.14*f,i+e*-i+f*-.283,0,0,g+e*-g+f*-(1-g),h+e*-h+f*h,i+e*(1-i)+f*i,0,0,0,0,0,1,0,0,0,0,0,1])}function h(b,d){return d=a(255*d,-255,255),c(b,[1,0,0,0,d,0,1,0,0,d,0,0,1,0,d,0,0,0,1,0,0,0,0,0,1])}function i(b,d,e,f){return d=a(d,0,2),e=a(e,0,2),f=a(f,0,2),c(b,[d,0,0,0,0,0,e,0,0,0,0,0,f,0,0,0,0,0,1,0,0,0,0,0,1])}function j(b,e){return e=a(e,0,1),c(b,d([.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0,0,0,0,0,1],e))}function k(b,e){return e=a(e,0,1),c(b,d([.33,.34,.33,0,0,.33,.34,.33,0,0,.33,.34,.33,0,0,0,0,0,1,0,0,0,0,0,1],e))}var l=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10];return{identity:b,adjust:d,multiply:c,adjustContrast:e,adjustBrightness:h,adjustSaturation:f,adjustHue:g,adjustColors:i,adjustSepia:j,adjustGrayscale:k}}),g("e",["p","d","s"],function(a,b,c){function d(c,d){function e(a,b){var c,d,e,f,g,h=a.data,i=b[0],j=b[1],k=b[2],l=b[3],m=b[4],n=b[5],o=b[6],p=b[7],q=b[8],r=b[9],s=b[10],t=b[11],u=b[12],v=b[13],w=b[14],x=b[15],y=b[16],z=b[17],A=b[18],B=b[19];for(g=0;g<h.length;g+=4)c=h[g],d=h[g+1],e=h[g+2],f=h[g+3],h[g]=c*i+d*j+e*k+f*l+m,h[g+1]=c*n+d*o+e*p+f*q+r,h[g+2]=c*s+d*t+e*u+f*v+w,h[g+3]=c*x+d*y+e*z+f*A+B;return a}var f,g=c.toCanvas(),h=a.get2dContext(g);return f=e(h.getImageData(0,0,g.width,g.height),d),h.putImageData(f,0,0),b.fromCanvas(g,c.getType())}function e(c,d){function e(a,b,c){function d(a,b,c){return a>c?a=c:a<b&&(a=b),a}var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;for(g=Math.round(Math.sqrt(c.length)),h=Math.floor(g/2),e=a.data,f=b.data,t=a.width,u=a.height,j=0;j<u;j++)for(i=0;i<t;i++){for(k=l=m=0,o=0;o<g;o++)for(n=0;n<g;n++)p=d(i+n-h,0,t-1),q=d(j+o-h,0,u-1),r=4*(q*t+p),s=c[o*g+n],k+=e[r]*s,l+=e[r+1]*s,m+=e[r+2]*s;r=4*(j*t+i),f[r]=d(k,0,255),f[r+1]=d(l,0,255),f[r+2]=d(m,0,255)}return b}var f,g,h=c.toCanvas(),i=a.get2dContext(h);return f=i.getImageData(0,0,h.width,h.height),g=i.getImageData(0,0,h.width,h.height),g=e(f,g,d),i.putImageData(g,0,0),b.fromCanvas(h,c.getType())}function f(c){return function(d,e){function f(a,b){var c,d=a.data;for(c=0;c<d.length;c+=4)d[c]=b[d[c]],d[c+1]=b[d[c+1]],d[c+2]=b[d[c+2]];return a}var g,h,i=d.toCanvas(),j=a.get2dContext(i),k=new Array(256);for(h=0;h<k.length;h++)k[h]=c(h,e);return g=f(j.getImageData(0,0,i.width,i.height),k),j.putImageData(g,0,0),b.fromCanvas(i,d.getType())}}function g(a){return function(b,e){return d(b,a(c.identity(),e))}}function h(a){return function(b){return d(b,a)}}function i(a){return function(b){return e(b,a)}}return{invert:h([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0]),brightness:g(c.adjustBrightness),hue:g(c.adjustHue),saturate:g(c.adjustSaturation),contrast:g(c.adjustContrast),grayscale:g(c.adjustGrayscale),sepia:g(c.adjustSepia),colorize:function(a,b,e,f){return d(a,c.adjustColors(c.identity(),b,e,f))},sharpen:i([0,-1,0,-1,5,-1,0,-1,0]),emboss:i([-2,-1,0,-1,1,1,0,1,2]),gamma:f(function(a,b){return 255*Math.pow(a/255,1-b)}),exposure:f(function(a,b){return 255*(1-Math.exp(-(a/255)*b))}),colorFilter:d,convoluteFilter:e}}),g("t",["o","c","p","r"],function(a,b,c,d){function e(a,b,c){var g=d.getWidth(a),h=d.getHeight(a),i=b/g,j=c/h,k=!1;(i<.5||i>2)&&(i=i<.5?.5:2,k=!0),(j<.5||j>2)&&(j=j<.5?.5:2,k=!0);var l=f(a,i,j);return k?l.then(function(a){return e(a,b,c)}):l}function f(b,e,f){return new a(function(a){var g=d.getWidth(b),h=d.getHeight(b),i=Math.floor(g*e),j=Math.floor(h*f),k=c.create(i,j),l=c.get2dContext(k);l.drawImage(b,0,0,g,h,0,0,i,j),a(k)})}return{scale:e}}),g("f",["p","d","t"],function(a,b,c){function d(c,d){var e=c.toCanvas(),f=a.create(e.width,e.height),g=a.get2dContext(f),h=0,i=0;return d=d<0?360+d:d,90!=d&&270!=d||a.resize(f,f.height,f.width),90!=d&&180!=d||(h=f.width),270!=d&&180!=d||(i=f.height),g.translate(h,i),g.rotate(d*Math.PI/180),g.drawImage(e,0,0),b.fromCanvas(f,c.getType())}function e(c,d){var e=c.toCanvas(),f=a.create(e.width,e.height),g=a.get2dContext(f);return"v"==d?(g.scale(1,-1),g.drawImage(e,0,-f.height)):(g.scale(-1,1),g.drawImage(e,-f.width,0)),b.fromCanvas(f,c.getType())}function f(c,d,e,f,g){var h=c.toCanvas(),i=a.create(f,g),j=a.get2dContext(i);return j.drawImage(h,-d,-e),b.fromCanvas(i,c.getType())}function g(a,d,e){return c.scale(a.toCanvas(),d,e).then(function(c){return b.fromCanvas(c,a.getType())})}return{rotate:d,flip:e,crop:f,resize:g}}),g("2",["e","f"],function(a,b){var c=function(b){return a.invert(b)},d=function(b){return a.sharpen(b)},e=function(b){return a.emboss(b)},f=function(b,c){return a.gamma(b,c)},g=function(b,c){return a.exposure(b,c)},h=function(b,c,d,e){return a.colorize(b,c,d,e)},i=function(b,c){return a.brightness(b,c)},j=function(b,c){return a.hue(b,c)},k=function(b,c){return a.saturate(b,c)},l=function(b,c){return a.contrast(b,c)},m=function(b,c){return a.grayscale(b,c)},n=function(b,c){return a.sepia(b,c)},o=function(a,c){return b.flip(a,c)},p=function(a,c,d,e,f){return b.crop(a,c,d,e,f)},q=function(a,c,d){return b.resize(a,c,d)},r=function(a,c){return b.rotate(a,c)};return{invert:c,sharpen:d,emboss:e,brightness:i,hue:j,saturate:k,contrast:l,grayscale:m,sepia:n,colorize:h,gamma:f,exposure:g,flip:o,crop:p,resize:q,rotate:r}}),h("g",tinymce.util.Tools.resolve),g("3",["g"],function(a){return a("tinymce.Env")}),g("4",["g"],function(a){return a("tinymce.PluginManager")}),g("5",["g"],function(a){return a("tinymce.util.Delay")}),g("6",["g"],function(a){return a("tinymce.util.Promise")}),g("7",["g"],function(a){return a("tinymce.util.Tools")}),g("8",["g"],function(a){return a("tinymce.util.URI")}),g("9",[],function(){function a(a){function b(a){return/^[0-9\.]+px$/.test(a)}var c,d;return c=a.style.width,d=a.style.height,c||d?b(c)&&b(d)?{w:parseInt(c,10),h:parseInt(d,10)}:null:(c=a.width,d=a.height,c&&d?{w:parseInt(c,10),h:parseInt(d,10)}:null)}function b(a,b){var c,d;b&&(c=a.style.width,d=a.style.height,(c||d)&&(a.style.width=b.w+"px",a.style.height=b.h+"px",a.removeAttribute("data-mce-style")),c=a.width,d=a.height,(c||d)&&(a.setAttribute("width",b.w),a.setAttribute("height",b.h)))}function c(a){return{w:a.naturalWidth,h:a.naturalHeight}}return{getImageSize:a,setImageSize:b,getNaturalImageSize:c}}),g("h",["6","7"],function(a,b){var c=function(a){return null!==a&&void 0!==a},d=function(a,b){var d;return d=b.reduce(function(a,b){return c(a)?a[b]:void 0},a),c(d)?d:null},e=function(c,d){return new a(function(a){var e;e=new XMLHttpRequest,e.onreadystatechange=function(){4===e.readyState&&a({status:e.status,blob:this.response})},e.open("GET",c,!0),b.each(d,function(a,b){e.setRequestHeader(b,a)}),e.responseType="blob",e.send()})},f=function(b){return new a(function(a){var c=new FileReader;c.onload=function(b){var c=b.target;a(c.result)},c.readAsText(b)})},g=function(a){var b;try{b=JSON.parse(a)}catch(a){}return b};return{traverse:d,readBlob:f,requestUrlAsBlob:e,parseJson:g}}),g("a",["6","7","h"],function(a,b,c){function d(b){return c.requestUrlAsBlob(b,{}).then(function(b){return b.status>=400?g(b.status):a.resolve(b.blob)})}var e=function(a,b){var c=a.indexOf("?")===-1?"?":"&";return/[?&]apiKey=/.test(a)||!b?a:a+c+"apiKey="+encodeURIComponent(b)},f=function(a){return 400===a||403===a||500===a},g=function(b){return a.reject("ImageProxy HTTP error: "+b)},h=function(b){a.reject("ImageProxy Service error: "+b)},i=function(a,b){return c.readBlob(b).then(function(a){var b=c.parseJson(a),d=c.traverse(b,["error","type"]);return h(d?d:"Invalid JSON")})},j=function(a,b){return f(a)?i(a,b):g(a)},k=function(b,d){return c.requestUrlAsBlob(e(b,d),{"Content-Type":"application/json;charset=UTF-8","tiny-api-key":d}).then(function(b){return b.status>=400?j(b.status,b.blob):a.resolve(b.blob)})},l=function(a,b){return b?k(a,b):d(a)};return{getUrl:l}}),g("i",["g"],function(a){return a("tinymce.dom.DOMUtils")}),g("j",["g"],function(a){return a("tinymce.ui.Container")}),g("k",["g"],function(a){return a("tinymce.ui.Factory")}),g("l",["g"],function(a){return a("tinymce.ui.Form")}),g("u",["g"],function(a){return a("tinymce.geom.Rect")}),g("v",["g"],function(a){return a("tinymce.ui.Control")}),g("w",["g"],function(a){return a("tinymce.ui.DragHelper")}),g("y",["g"],function(a){return a("tinymce.dom.DomQuery")}),g("z",["g"],function(a){return a("tinymce.util.Observable")}),g("10",["g"],function(a){return a("tinymce.util.VK")}),g("x",["y","w","u","7","z","10"],function(a,b,c,d,e,f){var g=0;return function(h,i,j,k,l){function m(a,b){return{x:b.x+a.x,y:b.y+a.y,w:b.w,h:b.h}}function n(a,b){return{x:b.x-a.x,y:b.y-a.y,w:b.w,h:b.h}}function o(){return n(j,h)}function p(a,b,d,e){var f,g,i,k,l;f=b.x,g=b.y,i=b.w,k=b.h,f+=d*a.deltaX,g+=e*a.deltaY,i+=d*a.deltaW,k+=e*a.deltaH,i<20&&(i=20),k<20&&(k=20),l=h=c.clamp({x:f,y:g,w:i,h:k},j,"move"==a.name),l=n(j,l),y.fire("updateRect",{rect:l}),v(l)}function q(){function c(a){var c;return new b(D,{document:k.ownerDocument,handle:D+"-"+a.name,start:function(){c=h},drag:function(b){p(a,c,b.deltaX,b.deltaY)}})}a('<div id="'+D+'" class="'+C+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(k),d.each(B,function(b){a("#"+D,k).append('<div id="'+D+"-"+b+'"class="'+C+'croprect-block" style="display: none" data-mce-bogus="all">')}),d.each(z,function(b){a("#"+D,k).append('<div id="'+D+"-"+b.name+'" class="'+C+"croprect-handle "+C+"croprect-handle-"+b.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+b.label+'" aria-grabbed="false">')}),A=d.map(z,c),s(h),a(k).on("focusin focusout",function(b){a(b.target).attr("aria-grabbed","focus"===b.type)}),a(k).on("keydown",function(a){function b(a,b,d,e,f){a.stopPropagation(),a.preventDefault(),p(c,d,e,f)}var c;switch(d.each(z,function(b){if(a.target.id==D+"-"+b.name)return c=b,!1}),a.keyCode){case f.LEFT:b(a,c,h,-10,0);break;case f.RIGHT:b(a,c,h,10,0);break;case f.UP:b(a,c,h,0,-10);break;case f.DOWN:b(a,c,h,0,10);break;case f.ENTER:case f.SPACEBAR:a.preventDefault(),l()}})}function r(b){var c;c=d.map(z,function(a){return"#"+D+"-"+a.name}).concat(d.map(B,function(a){return"#"+D+"-"+a})).join(","),b?a(c,k).show():a(c,k).hide()}function s(b){function c(b,c){c.h<0&&(c.h=0),c.w<0&&(c.w=0),a("#"+D+"-"+b,k).css({left:c.x,top:c.y,width:c.w,height:c.h})}d.each(z,function(c){a("#"+D+"-"+c.name,k).css({left:b.w*c.xMul+b.x,top:b.h*c.yMul+b.y})}),c("top",{x:i.x,y:i.y,w:i.w,h:b.y-i.y}),c("right",{x:b.x+b.w,y:b.y,w:i.w-b.x-b.w+i.x,h:b.h}),c("bottom",{x:i.x,y:b.y+b.h,w:i.w,h:i.h-b.y-b.h+i.y}),c("left",{x:i.x,y:b.y,w:b.x-i.x,h:b.h}),c("move",b)}function t(a){h=a,s(h)}function u(a){i=a,s(h)}function v(a){t(m(j,a))}function w(a){j=a,s(h)}function x(){d.each(A,function(a){a.destroy()}),A=[]}var y,z,A,B,C="mce-",D=C+"crid-"+g++;return z=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],B=["top","right","bottom","left"],q(k),y=d.extend({toggleVisibility:r,setClampRect:w,setRect:t,getInnerRect:o,setInnerRect:v,setViewPortRect:u,destroy:x},e)}}),g("m",["u","v","w","6","7","x"],function(a,b,c,d,e,f){function g(a){return new d(function(b){function c(){a.removeEventListener("load",c),b(a)}a.complete?b(a):a.addEventListener("load",c)})}return b.extend({Defaults:{classes:"imagepanel"},selection:function(a){return arguments.length?(this.state.set("rect",a),this):this.state.get("rect")},imageSize:function(){var a=this.state.get("viewRect");return{w:a.w,h:a.h}},toggleCropRect:function(a){this.state.set("cropEnabled",a)},imageSrc:function(b){var c=this,d=new Image;d.src=b,g(d).then(function(){var b,e,f=c.state.get("viewRect");if(e=c.$el.find("img"),e[0])e.replaceWith(d);else{var g=document.createElement("div");g.className="mce-imagepanel-bg",c.getEl().appendChild(g),c.getEl().appendChild(d)}b={x:0,y:0,w:d.naturalWidth,h:d.naturalHeight},c.state.set("viewRect",b),c.state.set("rect",a.inflate(b,-20,-20)),f&&f.w==b.w&&f.h==b.h||c.zoomFit(),c.repaintImage(),c.fire("load")})},zoom:function(a){return arguments.length?(this.state.set("zoom",a),this):this.state.get("zoom")},postRender:function(){return this.imageSrc(this.settings.imageSrc),this._super()},zoomFit:function(){var a,b,c,d,e,f,g,h=this;g=10,a=h.$el.find("img"),b=h.getEl().clientWidth,c=h.getEl().clientHeight,d=a[0].naturalWidth,e=a[0].naturalHeight,f=Math.min((b-g)/d,(c-g)/e),f>=1&&(f=1),h.zoom(f)},repaintImage:function(){var a,b,c,d,e,f,g,h,i,j,k;k=this.getEl(),i=this.zoom(),j=this.state.get("rect"),g=this.$el.find("img"),h=this.$el.find(".mce-imagepanel-bg"),e=k.offsetWidth,f=k.offsetHeight,c=g[0].naturalWidth*i,d=g[0].naturalHeight*i,a=Math.max(0,e/2-c/2),b=Math.max(0,f/2-d/2),g.css({left:a,top:b,width:c,height:d}),h.css({left:a,top:b,width:c,height:d}),this.cropRect&&(this.cropRect.setRect({x:j.x*i+a,y:j.y*i+b,w:j.w*i,h:j.h*i}),this.cropRect.setClampRect({x:a,y:b,w:c,h:d}),this.cropRect.setViewPortRect({x:0,y:0,w:e,h:f}))},bindStates:function(){function a(a){b.cropRect=new f(a,b.state.get("viewRect"),b.state.get("viewRect"),b.getEl(),function(){b.fire("crop")}),b.cropRect.on("updateRect",function(a){var c=a.rect,d=b.zoom();c={x:Math.round(c.x/d),y:Math.round(c.y/d),w:Math.round(c.w/d),h:Math.round(c.h/d)},b.state.set("rect",c)}),b.on("remove",b.cropRect.destroy)}var b=this;b.state.on("change:cropEnabled",function(a){b.cropRect.toggleVisibility(a.value),b.repaintImage()}),b.state.on("change:zoom",function(){b.repaintImage()}),b.state.on("change:rect",function(c){var d=c.value;b.cropRect||a(d),b.cropRect.setRect(d)})}})}),g("n",[],function(){return function(){function a(a){var b;return b=f.splice(++g),f.push(a),{state:a,removed:b}}function b(){if(d())return f[--g]}function c(){if(e())return f[++g]}function d(){return g>0}function e(){return g!=-1&&g<f.length-1}var f=[],g=-1;return{data:f,add:a,undo:b,redo:c,canUndo:d,canRedo:e}}}),g("b",["1","2","i","j","k","l","6","7","m","n"],function(a,b,c,d,e,f,g,h,i,j){function k(a){return{blob:a,url:URL.createObjectURL(a)}}function l(a){a&&URL.revokeObjectURL(a.url)}function m(a){h.each(a,l)}function n(g,n,o){function p(a){var b,c,d,e;b=M.find("#w")[0],c=M.find("#h")[0],d=parseInt(b.value(),10),e=parseInt(c.value(),10),M.find("#constrain")[0].checked()&&ha&&ia&&d&&e&&("w"==a.control.settings.name?(e=Math.round(d*ja),c.value(e)):(d=Math.round(e*ka),b.value(d))),ha=d,ia=e}function q(a){return Math.round(100*a)+"%"}function r(){M.find("#undo").disabled(!la.canUndo()),M.find("#redo").disabled(!la.canRedo()),M.statusbar.find("#save").disabled(!la.canUndo())}function s(){M.find("#undo").disabled(!0),M.find("#redo").disabled(!0)}function t(a){a&&T.imageSrc(a.url)}function u(a){return function(){var b=h.grep(ga,function(b){return b.settings.name!=a});h.each(b,function(a){a.hide()}),a.show(),a.focus()}}function v(a){P=k(a),t(P)}function w(a){g=k(a),t(g),m(la.add(g).removed),r()}function x(){var c=T.selection();a.blobToImageResult(g.blob).then(function(a){b.crop(a,c.x,c.y,c.w,c.h).then(ma).then(function(a){w(a),A()})})}function y(b){var c=[].slice.call(arguments,1);return function(){var d=P||g;a.blobToImageResult(d.blob).then(function(a){b.apply(this,[a].concat(c)).then(ma).then(v)})}}function z(b){var c=[].slice.call(arguments,1);return function(){a.blobToImageResult(g.blob).then(function(a){b.apply(this,[a].concat(c)).then(ma).then(w)})}}function A(){t(g),l(P),u(N)(),r()}function B(){P&&(w(P.blob),A())}function C(){var a=T.zoom();a<2&&(a+=.1),T.zoom(a)}function D(){var a=T.zoom();a>.1&&(a-=.1),T.zoom(a)}function E(){g=la.undo(),t(g),r()}function F(){g=la.redo(),t(g),r()}function G(){n(g.blob),M.close()}function H(a){return new f({layout:"flex",direction:"row",labelGap:5,border:"0 0 1 0",align:"center",pack:"center",padding:"0 10 0 10",spacing:5,flex:0,minHeight:60,defaults:{classes:"imagetool",type:"button"},items:a})}function I(b,c){return H([{text:"Back",onclick:A},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:B}]).hide().on("show",function(){s(),a.blobToImageResult(g.blob).then(function(a){return c(a)}).then(ma).then(function(a){var b=k(a);t(b),l(P),P=b})})}function J(b,c,d,e,f){function h(b){a.blobToImageResult(g.blob).then(function(a){return c(a,b)}).then(ma).then(function(a){var b=k(a);t(b),l(P),P=b})}return H([{text:"Back",onclick:A},{type:"spacer",flex:1},{type:"slider",flex:1,ondragend:function(a){h(a.value)},minValue:e,maxValue:f,value:d,previewFilter:q},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:B}]).hide().on("show",function(){this.find("slider").value(d),s()})}function K(a,b){function c(){var a,c,d;a=M.find("#r")[0].value(),c=M.find("#g")[0].value(),d=M.find("#b")[0].value(),b(g.blob,a,c,d).then(function(a){var b=k(a);t(b),l(P),P=b})}return H([{text:"Back",onclick:A},{type:"spacer",flex:1},{type:"slider",label:"R",name:"r",minValue:0,value:1,maxValue:2,ondragend:c,previewFilter:q},{type:"slider",label:"G",name:"g",minValue:0,value:1,maxValue:2,ondragend:c,previewFilter:q},{type:"slider",label:"B",name:"b",minValue:0,value:1,maxValue:2,ondragend:c,previewFilter:q},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:B}]).hide().on("show",function(){M.find("#r,#g,#b").value(1),s()})}function L(a){a.control.value()===!0&&(ja=ia/ha,ka=ha/ia)}var M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la=new j,ma=function(a){return a.toBlob()};Q=H([{text:"Back",onclick:A},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:x}]).hide().on("show hide",function(a){T.toggleCropRect("show"==a.type)}).on("show",s),R=H([{text:"Back",onclick:A},{type:"spacer",flex:1},{type:"textbox",name:"w",label:"Width",size:4,onkeyup:p},{type:"textbox",name:"h",label:"Height",size:4,onkeyup:p},{type:"checkbox",name:"constrain",text:"Constrain proportions",checked:!0,onchange:L},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:"submit"}]).hide().on("submit",function(a){var c=parseInt(M.find("#w").value(),10),d=parseInt(M.find("#h").value(),10);a.preventDefault(),z(b.resize,c,d)(),A()}).on("show",s),S=H([{text:"Back",onclick:A},{type:"spacer",flex:1},{icon:"fliph",tooltip:"Flip horizontally",onclick:y(b.flip,"h")},{icon:"flipv",tooltip:"Flip vertically",onclick:y(b.flip,"v")},{icon:"rotateleft",tooltip:"Rotate counterclockwise",onclick:y(b.rotate,-90)},{icon:"rotateright",tooltip:"Rotate clockwise",onclick:y(b.rotate,90)},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:B}]).hide().on("show",s),W=I("Invert",b.invert),ca=I("Sharpen",b.sharpen),da=I("Emboss",b.emboss),X=J("Brightness",b.brightness,0,-1,1),Y=J("Hue",b.hue,180,0,360),Z=J("Saturate",b.saturate,0,-1,1),$=J("Contrast",b.contrast,0,-1,1),_=J("Grayscale",b.grayscale,0,0,1),aa=J("Sepia",b.sepia,0,0,1),ba=K("Colorize",b.colorize),ea=J("Gamma",b.gamma,0,-1,1),fa=J("Exposure",b.exposure,1,0,2),O=H([{text:"Back",onclick:A},{type:"spacer",flex:1},{text:"hue",icon:"hue",onclick:u(Y)},{text:"saturate",icon:"saturate",onclick:u(Z)},{text:"sepia",icon:"sepia",onclick:u(aa)},{text:"emboss",icon:"emboss",onclick:u(da)},{text:"exposure",icon:"exposure",onclick:u(fa)},{type:"spacer",flex:1}]).hide(),N=H([{tooltip:"Crop",icon:"crop",onclick:u(Q)},{tooltip:"Resize",icon:"resize2",onclick:u(R)},{tooltip:"Orientation",icon:"orientation",onclick:u(S)},{tooltip:"Brightness",icon:"sun",onclick:u(X)},{tooltip:"Sharpen",icon:"sharpen",onclick:u(ca)},{tooltip:"Contrast",icon:"contrast",onclick:u($)},{tooltip:"Color levels",icon:"drop",onclick:u(ba)},{tooltip:"Gamma",icon:"gamma",onclick:u(ea)},{tooltip:"Invert",icon:"invert",onclick:u(W)}]),T=new i({flex:1,imageSrc:g.url}),U=new d({layout:"flex",direction:"column",border:"0 1 0 0",padding:5,spacing:5,items:[{type:"button",icon:"undo",tooltip:"Undo",name:"undo",onclick:E},{type:"button",icon:"redo",tooltip:"Redo",name:"redo",onclick:F},{type:"button",icon:"zoomin",tooltip:"Zoom in",onclick:C},{type:"button",icon:"zoomout",tooltip:"Zoom out",onclick:D}]}),V=new d({type:"container",layout:"flex",direction:"row",align:"stretch",flex:1,items:[U,T]}),ga=[N,Q,R,S,O,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa],M=e.create("window",{layout:"flex",direction:"column",align:"stretch",minWidth:Math.min(c.DOM.getViewPort().w,800),minHeight:Math.min(c.DOM.getViewPort().h,650),title:"Edit image",items:ga.concat([V]),buttons:[{text:"Save",name:"save",subtype:"primary",onclick:G},{text:"Cancel",onclick:"close"}]}),M.renderTo(document.body).reflow(),M.on("close",function(){o(),m(la.data),la=null,P=null}),la.add(g),r(),T.on("load",function(){ha=T.imageSize().w,ia=T.imageSize().h,ja=ia/ha,ka=ha/ia,M.find("#w").value(ha),M.find("#h").value(ia)}),T.on("crop",x)}function o(a){return new g(function(b,c){return a.toBlob().then(function(a){n(k(a),b,c)})})}return{edit:o}}),g("0",["1","2","3","4","5","6","7","8","9","a","b"],function(a,b,c,d,e,f,g,h,i,j,k){var l=function(d){function l(a){d.notificationManager.open({text:a,type:"error"})}function m(){return d.selection.getNode()}function n(a){var b=a.match(/\/([^\/\?]+)?\.(?:jpeg|jpg|png|gif)(?:\?|$)/i);return b?d.dom.encode(b[1]):null}function o(){return"imagetools"+H++}function p(a){var b=a.src;return 0===b.indexOf("data:")||0===b.indexOf("blob:")||new h(b).host===d.documentBaseURI.host}function q(a){return g.inArray(d.settings.imagetools_cors_hosts,new h(a.src).host)!==-1}function r(){return d.settings.api_key||d.settings.imagetools_api_key}function s(b){var c,e=b.src;return q(b)?j.getUrl(b.src,null):p(b)?a.imageToBlob(b):(e=d.settings.imagetools_proxy,e+=(e.indexOf("?")===-1?"?":"&")+"url="+encodeURIComponent(b.src),c=r(),j.getUrl(e,c))}function t(){var a;return a=d.editorUpload.blobCache.getByUri(m().src),a?a.blob():s(m())}function u(){F=e.setEditorTimeout(d,function(){d.editorUpload.uploadImagesAuto()},d.settings.images_upload_timeout||3e4)}function v(){clearTimeout(F)}function w(a,b){return a.toBlob().then(function(c){var e,f,g,h,i;return g=d.editorUpload.blobCache,i=m(),e=i.src,d.settings.images_reuse_filename&&(h=g.getByUri(e),h?(e=h.uri(),f=h.name()):f=n(e)),h=g.create({id:o(),blob:c,base64:a.toBase64(),uri:e,name:f}),g.add(h),d.undoManager.transact(function(){function a(){d.$(i).off("load",a),d.nodeChanged(),b?d.editorUpload.uploadImagesAuto():(v(),u())}d.$(i).on("load",a),d.$(i).attr({src:h.blobUri()}).removeAttr("data-mce-src")}),h})}function x(b){return function(){return d._scanForImages().then(t).then(a.blobToImageResult).then(b).then(w,l)}}function y(a){return function(){return x(function(c){var d=i.getImageSize(m());return d&&i.setImageSize(m(),{w:d.h,h:d.w}),b.rotate(c,a)})()}}function z(a){return function(){return x(function(c){return b.flip(c,a)})()}}function A(){var b=m(),c=i.getNaturalImageSize(b),d=function(d){return new f(function(e){a.blobToImage(d).then(function(a){var f=i.getNaturalImageSize(a);c.w==f.w&&c.h==f.h||i.getImageSize(b)&&i.setImageSize(b,f),URL.revokeObjectURL(a.src),e(d)})})},e=function(b){return k.edit(b).then(d).then(a.blobToImageResult).then(function(a){w(a,!0)},function(){})};b&&a.imageToImageResult(b).then(e,l)}function B(){d.addButton("rotateleft",{title:"Rotate counterclockwise",cmd:"mceImageRotateLeft"}),d.addButton("rotateright",{title:"Rotate clockwise",cmd:"mceImageRotateRight"}),d.addButton("flipv",{title:"Flip vertically",cmd:"mceImageFlipVertical"}),d.addButton("fliph",{title:"Flip horizontally",cmd:"mceImageFlipHorizontal"}),d.addButton("editimage",{title:"Edit image",cmd:"mceEditImage"
2
+ }),d.addButton("imageoptions",{title:"Image options",icon:"options",cmd:"mceImage"})}function C(){d.on("NodeChange",function(a){G&&G.src!=a.element.src&&(v(),d.editorUpload.uploadImagesAuto(),G=void 0),D(a.element)&&(G=a.element)})}function D(a){var b=d.dom.is(a,"img:not([data-mce-object],[data-mce-placeholder])");return b&&(p(a)||q(a)||d.settings.imagetools_proxy)}function E(){var a=d.settings.imagetools_toolbar;a||(a="rotateleft rotateright | flipv fliph | crop editimage imageoptions"),d.addContextToolbar(D,a)}var F,G,H=0;c.fileApi&&(g.each({mceImageRotateLeft:y(-90),mceImageRotateRight:y(90),mceImageFlipVertical:z("v"),mceImageFlipHorizontal:z("h"),mceEditImage:A},function(a,b){d.addCommand(b,a)}),B(),E(),C())};return d.add("imagetools",l),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("importcss",function(e){function t(e){var t=tinymce.Env.cacheSuffix;return"string"==typeof e&&(e=e.replace("?"+t,"").replace("&"+t,"")),e}function n(t){var n=e.settings,r=n.skin!==!1&&(n.skin||"lightgray");if(r){var i=n.skin_url;return i=i?e.documentBaseURI.toAbsolute(i):tinymce.baseURL+"/skins/"+r,t===i+"/content"+(e.inline?".inline":"")+".min.css"}return!1}function r(e){return"string"==typeof e?function(t){return t.indexOf(e)!==-1}:e instanceof RegExp?function(t){return e.test(t)}:e}function i(r,i){function o(e,r){var s,l=e.href;if(l=t(l),l&&i(l,r)&&!n(l)){p(e.imports,function(e){o(e,!0)});try{s=e.cssRules||e.rules}catch(e){}p(s,function(e){e.styleSheet?o(e.styleSheet,!0):e.selectorText&&p(e.selectorText.split(","),function(e){a.push(tinymce.trim(e))})})}}var a=[],s={};p(e.contentCSS,function(e){s[e]=!0}),i||(i=function(e,t){return t||s[e]});try{p(r.styleSheets,function(e){o(e)})}finally{}return a}function o(t){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(r){var i=r[1],o=r[2].substr(1).split(".").join(" "),a=tinymce.makeMap("a,img");return r[1]?(n={title:t},e.schema.getTextBlockElements()[i]?n.block=i:e.schema.getBlockElements()[i]||a[i.toLowerCase()]?n.selector=i:n.inline=i):r[2]&&(n={inline:"span",title:t.substr(1),classes:o}),e.settings.importcss_merge_classes!==!1?n.classes=o:n.attributes={"class":o},n}}function a(e,t){return tinymce.util.Tools.grep(e,function(e){return!e.filter||e.filter(t)})}function s(e){return tinymce.util.Tools.map(e,function(e){return tinymce.util.Tools.extend({},e,{original:e,selectors:{},filter:r(e.filter),item:{text:e.title,menu:[]}})})}function l(e,t){return null===t||e.settings.importcss_exclusive!==!1}function c(t,n,r){return!(l(e,n)?t in r:t in n.selectors)}function u(t,n,r){l(e,n)?r[t]=!0:n.selectors[t]=!0}function d(t,n,r){var i,a=e.settings;return i=r&&r.selector_converter?r.selector_converter:a.importcss_selector_converter?a.importcss_selector_converter:o,i.call(t,n,r)}var f=this,p=tinymce.each;e.on("renderFormatsMenu",function(t){var n=e.settings,o={},l=r(n.importcss_selector_filter),m=t.control,g=s(n.importcss_groups),h=function(t,n){if(c(t,n,o)){u(t,n,o);var r=d(f,t,n);if(r){var i=r.name||tinymce.DOM.uniqueId();return e.formatter.register(i,r),tinymce.extend({},m.settings.itemDefaults,{text:r.title,format:i})}}return null};e.settings.importcss_append||m.items().remove(),p(i(t.doc||e.getDoc(),r(n.importcss_file_filter)),function(e){if(e.indexOf(".mce-")===-1&&(!l||l(e))){var t=a(g,e);if(t.length>0)tinymce.util.Tools.each(t,function(t){var n=h(e,t);n&&t.item.menu.push(n)});else{var n=h(e,null);n&&m.add(n)}}}),p(g,function(e){e.item.menu.length>0&&m.add(e.item)}),t.control.renderNew()}),f.convertSelectorToFormat=o});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){return a("tinymce.EditorManager")}),g("2",["6"],function(a){return a("tinymce.dom.DOMUtils")}),g("3",["6"],function(a){return a("tinymce.Env")}),g("4",["6"],function(a){return a("tinymce.PluginManager")}),g("5",["6"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return d.add("importcss",function(d){function f(a){var b=c.cacheSuffix;return"string"==typeof a&&(a=a.replace("?"+b,"").replace("&"+b,"")),a}function g(b){var c=d.settings,e=c.skin!==!1&&(c.skin||"lightgray");if(e){var f=c.skin_url;return f=f?d.documentBaseURI.toAbsolute(f):a.baseURL+"/skins/"+e,b===f+"/content"+(d.inline?".inline":"")+".min.css"}return!1}function h(a){return"string"==typeof a?function(b){return b.indexOf(a)!==-1}:a instanceof RegExp?function(b){return a.test(b)}:a}function i(a,b){function c(a,d){var i,j=a.href;if(j=f(j),j&&b(j,d)&&!g(j)){r(a.imports,function(a){c(a,!0)});try{i=a.cssRules||a.rules}catch(a){}r(i,function(a){a.styleSheet?c(a.styleSheet,!0):a.selectorText&&r(a.selectorText.split(","),function(a){h.push(e.trim(a))})})}}var h=[],i={};r(d.contentCSS,function(a){i[a]=!0}),b||(b=function(a,b){return b||i[a]});try{r(a.styleSheets,function(a){c(a)})}catch(a){}return h}function j(a){var b,c=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(a);if(c){var f=c[1],g=c[2].substr(1).split(".").join(" "),h=e.makeMap("a,img");return c[1]?(b={title:a},d.schema.getTextBlockElements()[f]?b.block=f:d.schema.getBlockElements()[f]||h[f.toLowerCase()]?b.selector=f:b.inline=f):c[2]&&(b={inline:"span",title:a.substr(1),classes:g}),d.settings.importcss_merge_classes!==!1?b.classes=g:b.attributes={"class":g},b}}function k(a,b){return e.grep(a,function(a){return!a.filter||a.filter(b)})}function l(a){return e.map(a,function(a){return e.extend({},a,{original:a,selectors:{},filter:h(a.filter),item:{text:a.title,menu:[]}})})}function m(a,b){return null===b||a.settings.importcss_exclusive!==!1}function n(a,b,c){return!(m(d,b)?a in c:a in b.selectors)}function o(a,b,c){m(d,b)?c[a]=!0:b.selectors[a]=!0}function p(a,b,c){var e,f=d.settings;return e=c&&c.selector_converter?c.selector_converter:f.importcss_selector_converter?f.importcss_selector_converter:j,e.call(a,b,c)}var q=this,r=e.each;d.on("renderFormatsMenu",function(a){var c=d.settings,f={},g=h(c.importcss_selector_filter),j=a.control,m=l(c.importcss_groups),s=function(a,c){if(n(a,c,f)){o(a,c,f);var g=p(q,a,c);if(g){var h=g.name||b.DOM.uniqueId();return d.formatter.register(h,g),e.extend({},j.settings.itemDefaults,{text:g.title,format:h})}}return null};d.settings.importcss_append||j.items().remove(),r(i(a.doc||d.getDoc(),h(c.importcss_file_filter)),function(a){if(a.indexOf(".mce-")===-1&&(!g||g(a))){var b=k(m,a);if(b.length>0)e.each(b,function(b){var c=s(a,b);c&&b.item.menu.push(c)});else{var c=s(a,null);c&&j.add(c)}}}),r(m,function(a){a.item.menu.length>0&&j.add(a.item)}),a.control.renderNew()}),q.convertSelectorToFormat=j}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("insertdatetime",function(e){function t(t,n){function r(e,t){if(e=""+e,e.length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}return n=n||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",r(n.getMonth()+1,2)),t=t.replace("%d",r(n.getDate(),2)),t=t.replace("%H",""+r(n.getHours(),2)),t=t.replace("%M",""+r(n.getMinutes(),2)),t=t.replace("%S",""+r(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",""+(n.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(l[n.getMonth()])),t=t.replace("%b",""+e.translate(s[n.getMonth()])),t=t.replace("%A",""+e.translate(a[n.getDay()])),t=t.replace("%a",""+e.translate(o[n.getDay()])),t=t.replace("%%","%")}function n(n){var r=t(n);if(e.settings.insertdatetime_element){var i;i=t(/%[HMSIp]/.test(n)?"%Y-%m-%dT%H:%M":"%Y-%m-%d"),r='<time datetime="'+i+'">'+r+"</time>";var o=e.dom.getParent(e.selection.getStart(),"time");if(o)return void e.dom.setOuterHTML(o,r)}e.insertContent(r)}var r,i,o="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),l="January February March April May June July August September October November December".split(" "),c=[];e.addCommand("mceInsertDate",function(){n(e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),e.addCommand("mceInsertTime",function(){n(e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S")))}),e.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){n(r||i)},menu:c}),tinymce.each(e.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(e){i||(i=e),c.push({text:t(e),onclick:function(){r=e,n(e)}})}),e.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:c,context:"insert"})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("insertdatetime",function(a){function c(b,c){function d(a,b){if(a=""+a,a.length<b)for(var c=0;c<b-a.length;c++)a="0"+a;return a}return c=c||new Date,b=b.replace("%D","%m/%d/%Y"),b=b.replace("%r","%I:%M:%S %p"),b=b.replace("%Y",""+c.getFullYear()),b=b.replace("%y",""+c.getYear()),b=b.replace("%m",d(c.getMonth()+1,2)),b=b.replace("%d",d(c.getDate(),2)),b=b.replace("%H",""+d(c.getHours(),2)),b=b.replace("%M",""+d(c.getMinutes(),2)),b=b.replace("%S",""+d(c.getSeconds(),2)),b=b.replace("%I",""+((c.getHours()+11)%12+1)),b=b.replace("%p",""+(c.getHours()<12?"AM":"PM")),b=b.replace("%B",""+a.translate(j[c.getMonth()])),b=b.replace("%b",""+a.translate(i[c.getMonth()])),b=b.replace("%A",""+a.translate(h[c.getDay()])),b=b.replace("%a",""+a.translate(g[c.getDay()])),b=b.replace("%%","%")}function d(b){var d=c(b);if(a.settings.insertdatetime_element){var e;e=c(/%[HMSIp]/.test(b)?"%Y-%m-%dT%H:%M":"%Y-%m-%d"),d='<time datetime="'+e+'">'+d+"</time>";var f=a.dom.getParent(a.selection.getStart(),"time");if(f)return void a.dom.setOuterHTML(f,d)}a.insertContent(d)}var e,f,g="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),h="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),i="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),j="January February March April May June July August September October November December".split(" "),k=[];a.addCommand("mceInsertDate",function(){d(a.getParam("insertdatetime_dateformat",a.translate("%Y-%m-%d")))}),a.addCommand("mceInsertTime",function(){d(a.getParam("insertdatetime_timeformat",a.translate("%H:%M:%S")))}),a.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){d(e||f)},menu:k}),b.each(a.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(a){f||(f=a),k.push({text:c(a),onclick:function(){e=a,d(a)}})}),a.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:k,context:"insert"})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- !function(e){e.PluginManager.add("legacyoutput",function(t,n,r){t.settings.inline_styles=!1,t.on("init",function(){var n="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",r=e.explode(t.settings.font_size_style_values),i=t.schema;t.formatter.register({alignleft:{selector:n,attributes:{align:"left"}},aligncenter:{selector:n,attributes:{align:"center"}},alignright:{selector:n,attributes:{align:"right"}},alignjustify:{selector:n,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(t){return e.inArray(r,t.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),e.each("b,i,u,strike".split(","),function(e){i.addValidElements(e+"[*]")}),i.getElementRule("font")||i.addValidElements("font[face|size|color|style]"),e.each(n.split(","),function(e){var t=i.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})}),t.addButton("fontsizeselect",function(){var e=[],n="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",r=t.settings.fontsize_formats||n;return t.$.each(r.split(" "),function(t,n){var r=n,i=n,o=n.split("=");o.length>1&&(r=o[0],i=o[1]),e.push({text:r,value:i})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:e,fixedWidth:!0,onPostRender:function(){var e=this;t.on("NodeChange",function(){var n;n=t.dom.getParent(t.selection.getNode(),"font"),n?e.value(n.size):e.value("")})},onclick:function(e){e.control.settings.value&&t.execCommand("FontSize",!1,e.control.settings.value)}}}),t.addButton("fontselect",function(){function e(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}var n="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",i=[],o=e(t.settings.font_formats||n);return r.each(o,function(e,t){i.push({text:{raw:t[0]},value:t[1],textStyle:t[1].indexOf("dings")==-1?"font-family:"+t[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:function(){var e=this;t.on("NodeChange",function(){var n;n=t.dom.getParent(t.selection.getNode(),"font"),n?e.value(n.face):e.value("")})},onselect:function(e){e.control.settings.value&&t.execCommand("FontName",!1,e.control.settings.value)}}})})}(tinymce);
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("legacyoutput",function(a,c,d){a.settings.inline_styles=!1,a.on("init",function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",d=b.explode(a.settings.font_size_style_values),e=a.schema;a.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignjustify:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(a){return b.inArray(d,a.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),b.each("b,i,u,strike".split(","),function(a){e.addValidElements(a+"[*]")}),e.getElementRule("font")||e.addValidElements("font[face|size|color|style]"),b.each(c.split(","),function(a){var b=e.getElementRule(a);b&&(b.attributes.align||(b.attributes.align={},b.attributesOrder.push("align")))})}),a.addButton("fontsizeselect",function(){var b=[],c="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",d=a.settings.fontsizeFormats||c;return a.$.each(d.split(" "),function(a,c){var d=c,e=c,f=c.split("=");f.length>1&&(d=f[0],e=f[1]),b.push({text:d,value:e})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:b,fixedWidth:!0,onPostRender:function(){var b=this;a.on("NodeChange",function(){var c;c=a.dom.getParent(a.selection.getNode(),"font"),c?b.value(c.size):b.value("")})},onclick:function(b){b.control.settings.value&&a.execCommand("FontSize",!1,b.control.settings.value)}}}),a.addButton("fontselect",function(){function b(a){a=a.replace(/;$/,"").split(";");for(var b=a.length;b--;)a[b]=a[b].split("=");return a}var c="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",e=[],f=b(a.settings.font_formats||c);return d.each(f,function(a,b){e.push({text:{raw:b[0]},value:b[1],textStyle:b[1].indexOf("dings")==-1?"font-family:"+b[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:e,fixedWidth:!0,onPostRender:function(){var b=this;a.on("NodeChange",function(){var c;c=a.dom.getParent(a.selection.getNode(),"font"),c?b.value(c.face):b.value("")})},onselect:function(b){b.control.settings.value&&a.execCommand("FontName",!1,b.control.settings.value)}}})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("link",function(e){function t(e){return e&&"A"===e.nodeName&&e.href}function n(e){return tinymce.util.Tools.grep(e,t).length>0}function r(t){return e.dom.getParent(t,"a[href]")}function i(){return r(e.selection.getStart())}function o(e){var t=e.getAttribute("data-mce-href");return t?t:e.getAttribute("href")}function a(){var t=e.plugins.contextmenu;return!!t&&t.isContextMenuVisible()}function s(n){var r,i,o;return!!(e.settings.link_context_toolbar&&!a()&&t(n)&&(r=e.selection,i=r.getRng(),o=i.startContainer,3==o.nodeType&&r.isCollapsed()&&i.startOffset>0&&i.startOffset<o.data.length))}function l(e,t){document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)}function c(e){if(!tinymce.Env.ie||tinymce.Env.ie>10){var t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),l(t,n)}else{var r=window.open("","_blank");if(r){r.opener=null;var i=r.document;i.open(),i.write('<meta http-equiv="refresh" content="0; url='+tinymce.DOM.encode(e)+'">'),i.close()}}}function u(t){if(t){var n=o(t);if(/^#/.test(n)){var r=e.$(n);r.length&&e.selection.scrollIntoView(r[0],!0)}else c(t.href)}}function d(){u(i())}function f(){var t=this,r=function(e){n(e.parents)?t.show():t.hide()};n(e.dom.getParents(e.selection.getStart()))||t.hide(),e.on("nodechange",r),t.on("remove",function(){e.off("nodechange",r)})}function p(t){return function(){var n=e.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):"function"==typeof n?n(t):t(n)}}function m(e,t,n){function r(e,n){return n=n||[],tinymce.each(e,function(e){var i={text:e.text||e.title};e.menu?i.menu=r(e.menu):(i.value=e.value,t&&t(i)),n.push(i)}),n}return r(e,n||[])}function g(t){function n(e){var t=d.find("#text");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),d.find("#href").value(e.control.value())}function r(t){var r=[];if(tinymce.each(e.dom.select("a:not([href])"),function(e){var n=e.name||e.id;n&&r.push({text:n,value:"#"+n,selected:t.indexOf("#"+n)!=-1})}),r.length)return r.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:r,onselect:n}}function i(){!u&&0===w.text.length&&f&&this.parent().parent().find("#text")[0].value(this.value())}function o(t){var n=t.meta||{};g&&g.value(e.convertURL(this.value(),"href")),tinymce.each(t.meta,function(e,t){var n=d.find("#"+t);"text"===t?0===u.length&&(n.value(e),w.text=e):n.value(e)}),n.attach&&(h={href:this.value(),attach:n.attach}),n.text||i.call(this)}function a(e){var t=N.getContent();if(/</.test(t)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(t)||t.indexOf("href=")==-1))return!1;if(e){var n,r=e.childNodes;if(0===r.length)return!1;for(n=r.length-1;n>=0;n--)if(3!=r[n].nodeType)return!1}return!0}function s(e){e.meta=d.toJSON()}var l,c,u,d,f,p,g,v,b,y,x,C,w={},N=e.selection,k=e.dom;l=N.getNode(),c=k.getParent(l,"a[href]"),f=a(),w.text=u=c?c.innerText||c.textContent:N.getContent({format:"text"}),w.href=c?k.getAttrib(c,"href"):"",c?w.target=k.getAttrib(c,"target"):e.settings.default_link_target&&(w.target=e.settings.default_link_target),(C=k.getAttrib(c,"rel"))&&(w.rel=C),(C=k.getAttrib(c,"class"))&&(w["class"]=C),(C=k.getAttrib(c,"title"))&&(w.title=C),f&&(p={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){w.text=this.value()}}),t&&(g={type:"listbox",label:"Link list",values:m(t,function(t){t.value=e.convertURL(t.value||t.url,"href")},[{text:"None",value:""}]),onselect:n,value:e.convertURL(w.href,"href"),onPostRender:function(){g=this}}),e.settings.target_list!==!1&&(e.settings.target_list||(e.settings.target_list=[{text:"None",value:""},{text:"New window",value:"_blank"}]),b={name:"target",type:"listbox",label:"Target",values:m(e.settings.target_list)}),e.settings.rel_list&&(v={name:"rel",type:"listbox",label:"Rel",values:m(e.settings.rel_list)}),e.settings.link_class_list&&(y={name:"class",type:"listbox",label:"Class",values:m(e.settings.link_class_list,function(t){t.value&&(t.textStyle=function(){return e.formatter.getCssText({inline:"a",classes:[t.value]})})})}),e.settings.link_title!==!1&&(x={name:"title",type:"textbox",label:"Title",value:w.title}),d=e.windowManager.open({title:"Insert link",data:w,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:o,onkeyup:i,onbeforecall:s},p,x,r(w.href),g,v,b,y],onSubmit:function(t){function n(t,n){var r=e.selection.getRng();tinymce.util.Delay.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(r),n(t)})})}function r(e,t){function n(e){return e=r(e),e?[e,i].join(" "):i}function r(e){var t=new RegExp("("+i.replace(" ","|")+")","g");return e&&(e=tinymce.trim(e.replace(t,""))),e?e:null}var i="noopener noreferrer";return t?n(e):r(e)}function i(){var t={href:a,target:w.target?w.target:null,rel:w.rel?w.rel:null,"class":w["class"]?w["class"]:null,title:w.title?w.title:null};e.settings.allow_unsafe_link_target||(t.rel=r(t.rel,"_blank"==t.target)),a===h.href&&(h.attach(),h={}),c?(e.focus(),f&&w.text!=u&&("innerText"in c?c.innerText=w.text:c.textContent=w.text),k.setAttribs(c,t),N.select(c),e.undoManager.add()):f?e.insertContent(k.createHTML("a",t,k.encode(w.text))):e.execCommand("mceInsertLink",!1,t)}function o(){e.undoManager.transact(i)}var a;return w=tinymce.extend(w,t.data),(a=w.href)?a.indexOf("@")>0&&a.indexOf("//")==-1&&a.indexOf("mailto:")==-1?void n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(a="mailto:"+a),o()}):e.settings.link_assume_external_targets&&!/^\w+:/i.test(a)||!e.settings.link_assume_external_targets&&/^\s*www[\.|\d\.]/i.test(a)?void n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(a="http://"+a),o()}):void o():void e.execCommand("unlink")}})}var h={},v=function(e){return e.altKey===!0&&e.shiftKey===!1&&e.ctrlKey===!1&&e.metaKey===!1};e.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onclick:p(g),stateSelector:"a[href]"}),e.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),e.addContextToolbar&&(e.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:d}),e.addContextToolbar(s,"openlink | link unlink")),e.addShortcut("Meta+K","",p(g)),e.addCommand("mceLink",p(g)),e.on("click",function(e){var t=r(e.target);t&&tinymce.util.VK.metaKeyPressed(e)&&(e.preventDefault(),u(t))}),e.on("keydown",function(e){var t=i();t&&13===e.keyCode&&v(e)&&(e.preventDefault(),u(t))}),this.showDialog=g,e.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:d,onPostRender:f,prependToContext:!0}),e.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:p(g),stateSelector:"a[href]",context:"insert",prependToContext:!0})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("4",tinymce.util.Tools.resolve),g("1",["4"],function(a){return a("tinymce.PluginManager")}),g("5",["4"],function(a){return a("tinymce.util.VK")}),g("a",["4"],function(a){return a("tinymce.util.Delay")}),g("b",["4"],function(a){return a("tinymce.util.Tools")}),g("c",["4"],function(a){return a("tinymce.util.XHR")}),g("9",[],function(){var a=function(a){return"boolean"==typeof a.link_assume_external_targets&&a.link_assume_external_targets},b=function(a){return"boolean"==typeof a.link_context_toolbar&&a.link_context_toolbar},c=function(a){return a.link_list},d=function(a){return"string"==typeof a.default_link_target},e=function(a){return a.default_link_target},f=function(a){return a.target_list},g=function(a,b){a.settings.target_list=b},h=function(a){return f(a)!==!1},i=function(a){return a.rel_list},j=function(a){return void 0!==i(a)},k=function(a){return a.link_class_list},l=function(a){return void 0!==k(a)},m=function(a){return a.link_title!==!1},n=function(a){return"boolean"==typeof a.allow_unsafe_link_target&&a.allow_unsafe_link_target};return{assumeExternalTargets:a,hasContextToolbar:b,getLinkList:c,hasDefaultLinkTarget:d,getDefaultLinkTarget:e,getTargetList:f,setTargetList:g,shouldShowTargetList:h,getRelList:i,hasRelList:j,getLinkClassList:k,hasLinkClassList:l,shouldShowLinkTitle:m,allowUnsafeLinkTarget:n}}),h("d",RegExp),g("8",["b","9","d"],function(a,b,c){var d=function(b,d){var e="noopener noreferrer",f=function(a){return a=g(a),a?[a,e].join(" "):e},g=function(b){var d=new c("("+e.replace(" ","|")+")","g");return b&&(b=a.trim(b.replace(d,""))),b?b:null};return d?f(b):g(b)},e=function(a){return a.replace(/\uFEFF/g,"")},f=function(a,b){return b=b||a.selection.getStart(),k(b)?a.dom.select("a[href]",b)[0]:a.dom.getParent(b,"a[href]")},g=function(a,b){var c=b?b.innerText||b.textContent:a.getContent({format:"text"});return e(c)},h=function(a){return a&&"A"===a.nodeName&&a.href},i=function(b){return a.grep(b,h).length>0},j=function(a){return!(/</.test(a)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(a)||a.indexOf("href=")==-1))},k=function(a){return a&&"FIGURE"===a.nodeName&&/\bimage\b/i.test(a.className)},l=function(a,c){return function(e){a.undoManager.transact(function(){var g=a.selection.getNode(),h=f(a,g),i={href:e.href,target:e.target?e.target:null,rel:e.rel?e.rel:null,"class":e["class"]?e["class"]:null,title:e.title?e.title:null};b.allowUnsafeLinkTarget(a.settings)===!1&&(i.rel=d(i.rel,"_blank"==i.target)),e.href===c.href&&(c.attach(),c={}),h?(a.focus(),e.hasOwnProperty("text")&&("innerText"in h?h.innerText=e.text:h.textContent=e.text),a.dom.setAttribs(h,i),a.selection.select(h),a.undoManager.add()):k(g)?o(a,g,i):e.hasOwnProperty("text")?a.insertContent(a.dom.createHTML("a",i,a.dom.encode(e.text))):a.execCommand("mceInsertLink",!1,i)})}},m=function(a){return function(){a.undoManager.transact(function(){var b=a.selection.getNode();k(b)?n(a,b):a.execCommand("unlink")})}},n=function(a,b){var c,d;d=a.dom.select("img",b)[0],d&&(c=a.dom.getParents(d,"a[href]",b)[0],c&&(c.parentNode.insertBefore(d,c),a.dom.remove(c)))},o=function(a,b,c){var d,e;e=a.dom.select("img",b)[0],e&&(d=a.dom.create("a",c),e.parentNode.insertBefore(d,e),d.appendChild(e))};return{link:l,unlink:m,isLink:h,hasLinks:i,isOnlyTextSelected:j,getAnchorElement:f,getAnchorText:g}}),g("6",["a","b","c","8","9"],function(a,b,c,d,e){var f={},g=function(a,b){var d=e.getLinkList(a.settings);"string"==typeof d?c.send({url:d,success:function(c){b(a,JSON.parse(c))}}):"function"==typeof d?d(function(c){b(a,c)}):b(a,d)},h=function(a,c,d){var e=function(a,d){return d=d||[],b.each(a,function(a){var b={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c&&c(b)),d.push(b)}),d};return e(a,d||[])},i=function(b,c,d){var e=b.selection.getRng();a.setEditorTimeout(b,function(){b.windowManager.confirm(c,function(a){b.selection.setRng(e),d(a)})})},j=function(a,c){var g,j,k,l,m,n,o,p,q,r,s,t={},u=a.selection,v=a.dom,w=function(a){var b=k.find("#text");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),k.find("#href").value(a.control.value())},x=function(c){var d=[];if(b.each(a.dom.select("a:not([href])"),function(a){var b=a.name||a.id;b&&d.push({text:b,value:"#"+b,selected:c.indexOf("#"+b)!=-1})}),d.length)return d.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:d,onselect:w}},y=function(){j||!l||t.text||this.parent().parent().find("#text")[0].value(this.value())},z=function(c){var d=c.meta||{};n&&n.value(a.convertURL(this.value(),"href")),b.each(c.meta,function(a,b){var c=k.find("#"+b);"text"===b?0===j.length&&(c.value(a),t.text=a):c.value(a)}),d.attach&&(f={href:this.value(),attach:d.attach}),d.text||y.call(this)},A=function(a){a.meta=k.toJSON()};l=d.isOnlyTextSelected(u.getContent()),g=d.getAnchorElement(a),t.text=j=d.getAnchorText(a.selection,g),t.href=g?v.getAttrib(g,"href"):"",g?t.target=v.getAttrib(g,"target"):e.hasDefaultLinkTarget(a.settings)&&(t.target=e.getDefaultLinkTarget(a.settings)),(s=v.getAttrib(g,"rel"))&&(t.rel=s),(s=v.getAttrib(g,"class"))&&(t["class"]=s),(s=v.getAttrib(g,"title"))&&(t.title=s),l&&(m={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){t.text=this.value()}}),c&&(n={type:"listbox",label:"Link list",values:h(c,function(b){b.value=a.convertURL(b.value||b.url,"href")},[{text:"None",value:""}]),onselect:w,value:a.convertURL(t.href,"href"),onPostRender:function(){n=this}}),e.shouldShowTargetList(a.settings)&&(void 0===e.getTargetList(a.settings)&&e.setTargetList(a,[{text:"None",value:""},{text:"New window",value:"_blank"}]),p={name:"target",type:"listbox",label:"Target",values:h(e.getTargetList(a.settings))}),e.hasRelList(a.settings)&&(o={name:"rel",type:"listbox",label:"Rel",values:h(e.getRelList(a.settings))}),e.hasLinkClassList(a.settings)&&(q={name:"class",type:"listbox",label:"Class",values:h(e.getLinkClassList(a.settings),function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[b.value]})})})}),e.shouldShowLinkTitle(a.settings)&&(r={name:"title",type:"textbox",label:"Title",value:t.title}),k=a.windowManager.open({title:"Insert link",data:t,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:z,onkeyup:y,onbeforecall:A},m,r,x(t.href),n,o,p,q],onSubmit:function(c){var g=e.assumeExternalTargets(a.settings),h=d.link(a,f),k=d.unlink(a),m=b.extend({},t,c.data),n=m.href;return n?(l&&m.text!==j||delete m.text,n.indexOf("@")>0&&n.indexOf("//")==-1&&n.indexOf("mailto:")==-1?void i(a,"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(a){a&&(m.href="mailto:"+n),h(m)}):g===!0&&!/^\w+:/i.test(n)||g===!1&&/^\s*www[\.|\d\.]/i.test(n)?void i(a,"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){a&&(m.href="http://"+n),h(m)}):void h(m)):void k()}})},k=function(a){g(a,j)};return{open:k}}),g("e",["4"],function(a){return a("tinymce.dom.DOMUtils")}),g("f",["4"],function(a){return a("tinymce.Env")}),g("7",["e","f"],function(a,b){var c=function(a,b){document.body.appendChild(a),a.dispatchEvent(b),document.body.removeChild(a)},d=function(d){if(!b.ie||b.ie>10){var e=document.createElement("a");e.target="_blank",e.href=d,e.rel="noreferrer noopener";var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),c(e,f)}else{var g=window.open("","_blank");if(g){g.opener=null;var h=g.document;h.open(),h.write('<meta http-equiv="refresh" content="0; url='+a.DOM.encode(d)+'">'),h.close()}}};return{open:d}}),g("2",["5","6","7","8","9"],function(a,b,c,d,e){var f=function(a,b){return a.dom.getParent(b,"a[href]")},g=function(a){return f(a,a.selection.getStart())},h=function(a){var b=a.getAttribute("data-mce-href");return b?b:a.getAttribute("href")},i=function(a){var b=a.plugins.contextmenu;return!!b&&b.isContextMenuVisible()},j=function(a){return a.altKey===!0&&a.shiftKey===!1&&a.ctrlKey===!1&&a.metaKey===!1},k=function(a,b){if(b){var d=h(b);if(/^#/.test(d)){var e=a.$(d);e.length&&a.selection.scrollIntoView(e[0],!0)}else c.open(b.href)}},l=function(a){return function(){b.open(a)}},m=function(a){return function(){k(a,g(a))}},n=function(a){return function(b){var c,f,g;return!!(e.hasContextToolbar(a.settings)&&!i(a)&&d.isLink(b)&&(c=a.selection,f=c.getRng(),g=f.startContainer,3==g.nodeType&&c.isCollapsed()&&f.startOffset>0&&f.startOffset<g.data.length))}},o=function(b){b.on("click",function(c){var d=f(b,c.target);d&&a.metaKeyPressed(c)&&(c.preventDefault(),k(b,d))}),b.on("keydown",function(a){var c=g(b);c&&13===a.keyCode&&j(a)&&(a.preventDefault(),k(b,c))})},p=function(a){return function(){var b=this;a.on("nodechange",function(c){b.active(!a.readonly&&!!d.getAnchorElement(a,c.element))})}},q=function(a){return function(){var b=this,c=function(a){d.hasLinks(a.parents)?b.show():b.hide()};d.hasLinks(a.dom.getParents(a.selection.getStart()))||b.hide(),a.on("nodechange",c),b.on("remove",function(){a.off("nodechange",c)})}};return{openDialog:l,gotoSelectedLink:m,leftClickedOnAHref:n,setupGotoLinks:o,toggleActiveState:p,toggleViewLinkState:q}}),g("3",["2","8"],function(a,b){var c=function(c){c.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onclick:a.openDialog(c),onpostrender:a.toggleActiveState(c)}),c.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onclick:b.unlink(c),onpostrender:a.toggleActiveState(c)}),c.addContextToolbar&&c.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:a.gotoSelectedLink(c)})},d=function(b){b.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:a.gotoSelectedLink(b),onPostRender:a.toggleViewLinkState(b),prependToContext:!0}),b.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:a.openDialog(b),stateSelector:"a[href]",context:"insert",prependToContext:!0})},e=function(b){b.addContextToolbar&&b.addContextToolbar(a.leftClickedOnAHref(b),"openlink | link unlink")};return{setupButtons:c,setupMenuItems:d,setupContextToolbars:e}}),g("0",["1","2","3"],function(a,b,c){return a.add("link",function(a){c.setupButtons(a),c.setupMenuItems(a),c.setupContextToolbars(a),b.setupGotoLinks(a),a.addShortcut("Meta+K","",b.openDialog(a)),a.addCommand("mceLink",b.openDialog(a))}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- !function(){var e={},t=function(t){for(var n=e[t],i=n.deps,o=n.defn,a=i.length,s=new Array(a),l=0;l<a;++l)s[l]=r(i[l]);var c=o.apply(null,s);if(void 0===c)throw"module ["+t+"] returned undefined";n.instance=c},n=function(t,n,r){if("string"!=typeof t)throw"module id must be a string";if(void 0===n)throw"no dependencies for "+t;if(void 0===r)throw"no definition function for "+t;e[t]={deps:n,defn:r,instance:void 0}},r=function(n){var r=e[n];if(void 0===r)throw"module ["+n+"] was undefined";return void 0===r.instance&&t(n),r.instance},i=function(e,t){for(var n=e.length,i=new Array(n),o=0;o<n;++o)i.push(r(e[o]));t.apply(null,t)},o={};o.bolt={module:{api:{define:n,require:i,demand:r}}};var a=n,s=function(e,t){a(e,[],function(){return t})};s("1",tinymce.PluginManager),s("2",tinymce.util.Tools),s("3",tinymce.util.VK),a("4",[],function(){var e=function(e){return e&&3===e.nodeType},t=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},n=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},r=function(e){return e&&"BR"===e.nodeName},i=function(e){return e.parentNode.firstChild===e},o=function(e){return e.parentNode.lastChild===e},a=function(e,t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]},s=function(e,t){return!!r(t)&&!(!e.isBlock(t.nextSibling)||r(t.previousSibling))},l=function(e,t,n){var r=e.isEmpty(t);return!(n&&e.select("span[data-mce-type=bookmark]",t).length>0)&&r},c=function(e,t){return e.isChildOf(t,e.getRoot())};return{isTextNode:e,isListNode:t,isListItemNode:n,isBr:r,isFirstChild:i,isLastChild:o,isTextBlock:a,isBogusBr:s,isEmpty:l,isChildOfBody:c}}),s("9",tinymce.dom.TreeWalker),s("a",tinymce.dom.RangeUtils),a("b",["2","4"],function(e,t){var n=function(n){return e.grep(n.selection.getSelectedBlocks(),function(e){return t.isListItemNode(e)})};return{getSelectedListItems:n}}),s("h",tinymce.dom.DOMUtils.DOM),a("d",["a","4"],function(e,t){var n=function(n,r){var i=e.getNode(n,r);if(t.isListItemNode(n)&&t.isTextNode(i)){var o=r>=n.childNodes.length?i.data.length:0;return{container:i,offset:o}}return{container:n,offset:r}},r=function(e){var t=e.cloneRange(),r=n(e.startContainer,e.startOffset);t.setStart(r.container,r.offset);var i=n(e.endContainer,e.endOffset);return t.setEnd(i.container,i.offset),t};return{getNormalizedEndPoint:n,normalizeRange:r}}),a("c",["h","4","d"],function(e,t,n){var r=function(t){var n={},r=function(r){var i,o,a;o=t[r?"startContainer":"endContainer"],a=t[r?"startOffset":"endOffset"],1===o.nodeType&&(i=e.create("span",{"data-mce-type":"bookmark"}),o.hasChildNodes()?(a=Math.min(a,o.childNodes.length-1),r?o.insertBefore(i,o.childNodes[a]):e.insertAfter(i,o.childNodes[a])):o.appendChild(i),o=i,a=0),n[r?"startContainer":"endContainer"]=o,n[r?"startOffset":"endOffset"]=a};return r(!0),t.collapsed||r(),n},i=function(t){function r(n){var r,i,o,a=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1};r=o=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"],r&&(1===r.nodeType&&(i=a(r),r=r.parentNode,e.remove(o)),t[n?"startContainer":"endContainer"]=r,t[n?"startOffset":"endOffset"]=i)}r(!0),r();var i=e.createRng();return i.setStart(t.startContainer,t.startOffset),t.endContainer&&i.setEnd(t.endContainer,t.endOffset),n.normalizeRange(i)};return{createBookmark:r,resolveBookmark:i}}),a("e",["h","2","4"],function(e,t,n){var r=function(t,r){var i,o=r.parentNode;"LI"===o.nodeName&&o.firstChild===r&&(i=o.previousSibling,i&&"LI"===i.nodeName?(i.appendChild(r),n.isEmpty(t,o)&&e.remove(o)):e.setStyle(o,"listStyleType","none")),n.isListNode(o)&&(i=o.previousSibling,i&&"LI"===i.nodeName&&i.appendChild(r))},i=function(e,n){t.each(t.grep(e.select("ol,ul",n)),function(t){r(e,t)})};return{normalizeList:r,normalizeLists:i}}),s("f",tinymce.dom.BookmarkManager),s("j",tinymce.Env),a("i",["h","j"],function(e,t){var n=function(n,r,i){var o,a,s,l=e.createFragment(),c=n.schema.getBlockElements();if(n.settings.forced_root_block&&(i=i||n.settings.forced_root_block),i&&(a=e.create(i),a.tagName===n.settings.forced_root_block&&e.setAttribs(a,n.settings.forced_root_block_attrs),l.appendChild(a)),r)for(;o=r.firstChild;){var u=o.nodeName;s||"SPAN"===u&&"bookmark"===o.getAttribute("data-mce-type")||(s=!0),c[u]?(l.appendChild(o),a=null):i?(a||(a=e.create(i),l.appendChild(a)),a.appendChild(o)):l.appendChild(o)}return n.settings.forced_root_block?s||t.ie&&!(t.ie>10)||a.appendChild(e.create("br",{"data-mce-bogus":"1"})):l.appendChild(e.create("br")),l};return{createNewTextBlock:n}}),a("g",["h","2","i","4"],function(e,t,n,r){var i=function(i,o,a,s){var l,c,u,d,f=function(n){t.each(u,function(e){n.parentNode.insertBefore(e,a.parentNode)}),e.remove(n)};for(u=e.select('span[data-mce-type="bookmark"]',o),s=s||n.createNewTextBlock(i,a),l=e.createRng(),l.setStartAfter(a),l.setEndAfter(o),c=l.extractContents(),d=c.firstChild;d;d=d.firstChild)if("LI"===d.nodeName&&i.dom.isEmpty(d)){e.remove(d);break}i.dom.isEmpty(c)||e.insertAfter(c,o),e.insertAfter(s,o),r.isEmpty(i.dom,a.parentNode)&&f(a.parentNode),e.remove(a),r.isEmpty(i.dom,o)&&e.remove(o)};return{splitList:i}}),a("7",["h","4","c","b","g","e","i"],function(e,t,n,r,i,o,a){var s=function(n,r){t.isEmpty(n,r)&&e.remove(r)},l=function(n,r){var l,c=r.parentNode,u=c.parentNode;return c===n.getBody()||("DD"===r.nodeName?(e.rename(r,"DT"),!0):t.isFirstChild(r)&&t.isLastChild(r)?("LI"===u.nodeName?(e.insertAfter(r,u),s(n.dom,u),e.remove(c)):t.isListNode(u)?e.remove(c,!0):(u.insertBefore(a.createNewTextBlock(n,r),c),e.remove(c)),!0):t.isFirstChild(r)?("LI"===u.nodeName?(e.insertAfter(r,u),r.appendChild(c),s(n.dom,u)):t.isListNode(u)?u.insertBefore(r,c):(u.insertBefore(a.createNewTextBlock(n,r),c),e.remove(r)),!0):t.isLastChild(r)?("LI"===u.nodeName?e.insertAfter(r,u):t.isListNode(u)?e.insertAfter(r,c):(e.insertAfter(a.createNewTextBlock(n,r),c),e.remove(r)),!0):("LI"===u.nodeName?(c=u,l=a.createNewTextBlock(n,r,"LI")):l=t.isListNode(u)?a.createNewTextBlock(n,r,"LI"):a.createNewTextBlock(n,r),i.splitList(n,c,r,l),o.normalizeLists(n.dom,c.parentNode),!0))},c=function(e){var t=r.getSelectedListItems(e);if(t.length){var i,o,a=n.createBookmark(e.selection.getRng(!0)),s=e.getBody();for(i=t.length;i--;)for(var c=t[i].parentNode;c&&c!==s;){for(o=t.length;o--;)if(t[o]===c){t.splice(i,1);break}c=c.parentNode}for(i=0;i<t.length&&(l(e,t[i])||0!==i);i++);return e.selection.setRng(n.resolveBookmark(a)),e.nodeChanged(),!0}};return{outdent:l,outdentSelection:c}}),a("8",["2","f","b","4","c","g","e","7"],function(e,t,n,r,i,o,a,s){var l=function(e,t,n){var r=n["list-style-type"]?n["list-style-type"]:null;e.setStyle(t,"list-style-type",r)},c=function(t,n){e.each(n,function(e,n){t.setAttribute(n,e)})},u=function(t,n,r){c(n,r["list-attributes"]),e.each(t.select("li",n),function(e){c(e,r["list-item-attributes"])})},d=function(e,t,n){l(e,t,n),u(e,t,n)},f=function(e,t,n){var i,o,a=e.getBody();for(i=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],1===i.nodeType&&(i=i.childNodes[Math.min(o,i.childNodes.length-1)]||i);i.parentNode!==a;){if(r.isTextBlock(e,i))return i;if(/^(TD|TH)$/.test(i.parentNode.nodeName))return i;i=i.parentNode}return i},p=function(n,i){for(var o,a=[],s=n.getBody(),l=n.dom,c=f(n,i,!0),u=f(n,i,!1),d=[],p=c;p&&(d.push(p),p!==u);p=p.nextSibling);return e.each(d,function(e){if(r.isTextBlock(n,e))return a.push(e),void(o=null);if(l.isBlock(e)||r.isBr(e))return r.isBr(e)&&l.remove(e),void(o=null);var i=e.nextSibling;return t.isBookmarkNode(e)&&(r.isTextBlock(n,i)||!i&&e.parentNode===s)?void(o=null):(o||(o=l.create("p"),e.parentNode.insertBefore(o,e),a.push(o)),void o.appendChild(e))}),a},m=function(t,n,o){var a,s=t.selection.getRng(!0),l="LI",c=t.dom;o=o?o:{},"false"!==c.getContentEditable(t.selection.getNode())&&(n=n.toUpperCase(),"DL"===n&&(l="DT"),a=i.createBookmark(s),e.each(p(t,s),function(e){var i,a,s=function(e){var t=c.getStyle(e,"list-style-type"),n=o?o["list-style-type"]:"";return n=null===n?"":n,t===n};a=e.previousSibling,a&&r.isListNode(a)&&a.nodeName===n&&s(a)?(i=a,e=c.rename(e,l),a.appendChild(e)):(i=c.create(n),e.parentNode.insertBefore(i,e),i.appendChild(e),e=c.rename(e,l)),d(c,i,o),x(t.dom,i)}),t.selection.setRng(i.resolveBookmark(a)))},g=function(t){var l=i.createBookmark(t.selection.getRng(!0)),c=t.getBody(),u=n.getSelectedListItems(t),d=e.grep(u,function(e){return t.dom.isEmpty(e)});u=e.grep(u,function(e){return!t.dom.isEmpty(e)}),e.each(d,function(e){if(r.isEmpty(t.dom,e))return void s.outdent(t,e)}),e.each(u,function(e){var n,i;if(e.parentNode!==t.getBody()){for(n=e;n&&n!==c;n=n.parentNode)r.isListNode(n)&&(i=n);o.splitList(t,i,e),a.normalizeLists(t.dom,i.parentNode)}}),t.selection.setRng(i.resolveBookmark(l))},h=function(e,t){return e&&t&&r.isListNode(e)&&e.nodeName===t.nodeName},v=function(e,t,n){var r=e.getStyle(t,"list-style-type",!0),i=e.getStyle(n,"list-style-type",!0);return r===i},b=function(e,t){return e.className===t.className},y=function(e,t,n){return h(t,n)&&v(e,t,n)&&b(t,n)},x=function(e,t){var n,r;if(n=t.nextSibling,y(e,t,n)){for(;r=n.firstChild;)t.appendChild(r);e.remove(n)}if(n=t.previousSibling,y(e,t,n)){for(;r=n.lastChild;)t.insertBefore(r,t.firstChild);e.remove(n)}},C=function(e,t,n){var r=e.dom.getParent(e.selection.getStart(),"OL,UL,DL");if(n=n?n:{},r!==e.getBody())if(r)if(r.nodeName===t)g(e,t);else{var o=i.createBookmark(e.selection.getRng(!0));d(e.dom,r,n),x(e.dom,e.dom.rename(r,t)),e.selection.setRng(i.resolveBookmark(o))}else m(e,t,n)};return{toggleList:C,removeList:g,mergeWithAdjacentLists:x}}),a("5",["9","a","3","b","4","c","d","e","8"],function(e,t,n,r,i,o,a,s,l){var c=function(n,r,o){var a,s,l=r.startContainer,c=r.startOffset;if(3===l.nodeType&&(o?c<l.data.length:c>0))return l;for(a=n.schema.getNonEmptyElements(),1===l.nodeType&&(l=t.getNode(l,c)),s=new e(l,n.getBody()),o&&i.isBogusBr(n.dom,l)&&s.next();l=s[o?"next":"prev2"]();){if("LI"===l.nodeName&&!l.hasChildNodes())return l;if(a[l.nodeName])return l;if(3===l.nodeType&&l.data.length>0)return l}},u=function(e,t,n){var r,o,a=t.parentNode;if(i.isChildOfBody(e,t)&&i.isChildOfBody(e,n)){if(i.isListNode(n.lastChild)&&(o=n.lastChild),a===n.lastChild&&i.isBr(a.previousSibling)&&e.remove(a.previousSibling),r=n.lastChild,r&&i.isBr(r)&&t.hasChildNodes()&&e.remove(r),i.isEmpty(e,n,!0)&&e.$(n).empty(),!i.isEmpty(e,t,!0))for(;r=t.firstChild;)n.appendChild(r);o&&n.appendChild(o),e.remove(t),i.isEmpty(e,a)&&a!==e.getRoot()&&e.remove(a)}},d=function(e,t){var n,r,s,d=e.dom,f=e.selection,p=d.getParent(f.getStart(),"LI");if(p){if(n=p.parentNode,n===e.getBody()&&i.isEmpty(d,n))return!0;if(r=a.normalizeRange(f.getRng(!0)),s=d.getParent(c(e,r,t),"LI"),s&&s!==p){var m=o.createBookmark(r);return t?u(d,s,p):u(d,p,s),e.selection.setRng(o.resolveBookmark(m)),!0}if(!s&&!t&&l.removeList(e,n.nodeName))return!0}return!1},f=function(e,t){var n=e.dom,r=n.getParent(e.selection.getStart(),n.isBlock);if(r&&n.isEmpty(r)){var i=a.normalizeRange(e.selection.getRng(!0)),o=n.getParent(c(e,i,t),"LI");if(o)return e.undoManager.transact(function(){n.remove(r),l.mergeWithAdjacentLists(n,o.parentNode),e.selection.select(o,!0),e.selection.collapse(t)}),!0}return!1},p=function(e,t){return d(e,t)||f(e,t)},m=function(e){var t=e.dom.getParent(e.selection.getStart(),"LI,DT,DD");return!!(t||r.getSelectedListItems(e).length>0)&&(e.undoManager.transact(function(){e.execCommand("Delete"),s.normalizeLists(e.dom,e.getBody())}),!0)},g=function(e,t){return e.selection.isCollapsed()?p(e,t):m(e)},h=function(e){e.on("keydown",function(t){t.keyCode===n.BACKSPACE?g(e,!1)&&t.preventDefault():t.keyCode===n.DELETE&&g(e,!0)&&t.preventDefault()})};return{setup:h,backspaceDelete:g}}),a("6",["h","4","c","b"],function(e,t,n,r){var i=function(n,r){var i;if(t.isListNode(n)){for(;i=n.firstChild;)r.appendChild(i);e.remove(n)}},o=function(n){var r,o,a;return"DT"===n.nodeName?(e.rename(n,"DD"),!0):(r=n.previousSibling,r&&t.isListNode(r)?(r.appendChild(n),!0):r&&"LI"===r.nodeName&&t.isListNode(r.lastChild)?(r.lastChild.appendChild(n),i(n.lastChild,r.lastChild),!0):(r=n.nextSibling,r&&t.isListNode(r)?(r.insertBefore(n,r.firstChild),!0):(r=n.previousSibling,!(!r||"LI"!==r.nodeName)&&(o=e.create(n.parentNode.nodeName),a=e.getStyle(n.parentNode,"listStyleType"),a&&e.setStyle(o,"listStyleType",a),r.appendChild(o),o.appendChild(n),i(n.lastChild,o),!0))))},a=function(e){var t=r.getSelectedListItems(e);if(t.length){for(var i=n.createBookmark(e.selection.getRng(!0)),a=0;a<t.length&&(o(t[a])||0!==a);a++);return e.selection.setRng(n.resolveBookmark(i)),e.nodeChanged(),!0}};return{indentSelection:a}}),a("0",["1","2","3","4","5","6","7","8"],function(e,t,n,r,i,o,a,s){var l=function(e,t){return function(){var n=e.dom.getParent(e.selection.getStart(),"UL,OL,DL");return n&&n.nodeName===t}},c=function(e){e.on("BeforeExecCommand",function(t){var n,r=t.command.toLowerCase();if("indent"===r?o.indentSelection(e)&&(n=!0):"outdent"===r&&a.outdentSelection(e)&&(n=!0),n)return e.fire("ExecCommand",{command:t.command}),t.preventDefault(),!0}),e.addCommand("InsertUnorderedList",function(t,n){s.toggleList(e,"UL",n)}),e.addCommand("InsertOrderedList",function(t,n){s.toggleList(e,"OL",n)}),e.addCommand("InsertDefinitionList",function(t,n){s.toggleList(e,"DL",n)})},u=function(e){e.addQueryStateHandler("InsertUnorderedList",l(e,"UL")),e.addQueryStateHandler("InsertOrderedList",l(e,"OL")),e.addQueryStateHandler("InsertDefinitionList",l(e,"DL"))},d=function(e){e.on("keydown",function(t){9!==t.keyCode||n.metaKeyPressed(t)||e.dom.getParent(e.selection.getStart(),"LI,DT,DD")&&(t.preventDefault(),t.shiftKey?a.outdentSelection(e):o.indentSelection(e))})},f=function(e){var n=function(n){return function(){var i=this;e.on("NodeChange",function(e){var o=t.grep(e.parents,r.isListNode);i.active(o.length>0&&o[0].nodeName===n)})}},i=function(e,n){var r=e.settings.plugins?e.settings.plugins:"";return t.inArray(r.split(/[ ,]/),n)!==-1};i(e,"advlist")||(e.addButton("numlist",{title:"Numbered list",cmd:"InsertOrderedList",onPostRender:n("OL")}),e.addButton("bullist",{title:"Bullet list",cmd:"InsertUnorderedList",onPostRender:n("UL")})),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(t){var n=t.control;e.on("nodechange",function(){for(var t=e.selection.getSelectedBlocks(),i=!1,o=0,a=t.length;!i&&o<a;o++){var s=t[o].nodeName;i="LI"===s&&r.isFirstChild(t[o])||"UL"===s||"OL"===s||"DD"===s}n.disabled(i)})}})};return e.add("lists",function(e){return f(e),i.setup(e),e.on("init",function(){c(e),u(e),d(e)}),{backspaceDelete:function(t){i.backspaceDelete(e,t)}}}),function(){}}),r("0")()}();
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("9",tinymce.util.Tools.resolve),g("1",["9"],function(a){return a("tinymce.PluginManager")}),g("2",["9"],function(a){return a("tinymce.util.Tools")}),g("3",["9"],function(a){return a("tinymce.util.VK")}),g("a",["9"],function(a){return a("tinymce.dom.DOMUtils")}),g("8",[],function(){var a=function(a){return a&&3===a.nodeType},b=function(a){return a&&/^(OL|UL|DL)$/.test(a.nodeName)},c=function(a){return a&&/^(LI|DT|DD)$/.test(a.nodeName)},d=function(a){return a&&"BR"===a.nodeName},e=function(a){return a.parentNode.firstChild===a},f=function(a){return a.parentNode.lastChild===a},g=function(a,b){return b&&!!a.schema.getTextBlockElements()[b.nodeName]},h=function(a,b){return!!d(b)&&!(!a.isBlock(b.nextSibling)||d(b.previousSibling))},i=function(a,b,c){var d=a.isEmpty(b);return!(c&&a.select("span[data-mce-type=bookmark]",b).length>0)&&d},j=function(a,b){return a.isChildOf(b,a.getRoot())};return{isTextNode:a,isListNode:b,isListItemNode:c,isBr:d,isFirstChild:e,isLastChild:f,isTextBlock:g,isBogusBr:h,isEmpty:i,isChildOfBody:j}}),g("h",["9"],function(a){return a("tinymce.dom.RangeUtils")}),g("j",["h","8"],function(a,b){var c=function(c,d){var e=a.getNode(c,d);if(b.isListItemNode(c)&&b.isTextNode(e)){var f=d>=c.childNodes.length?e.data.length:0;return{container:e,offset:f}}return{container:c,offset:d}},d=function(a){var b=a.cloneRange(),d=c(a.startContainer,a.startOffset);b.setStart(d.container,d.offset);var e=c(a.endContainer,a.endOffset);return b.setEnd(e.container,e.offset),b};return{getNormalizedEndPoint:c,normalizeRange:d}}),g("b",["a","8","j"],function(a,b,c){var d=a.DOM,e=function(a){var b={},c=function(c){var e,f,g;f=a[c?"startContainer":"endContainer"],g=a[c?"startOffset":"endOffset"],1===f.nodeType&&(e=d.create("span",{"data-mce-type":"bookmark"}),f.hasChildNodes()?(g=Math.min(g,f.childNodes.length-1),c?f.insertBefore(e,f.childNodes[g]):d.insertAfter(e,f.childNodes[g])):f.appendChild(e),f=e,g=0),b[c?"startContainer":"endContainer"]=f,b[c?"startOffset":"endOffset"]=g};return c(!0),a.collapsed||c(),b},f=function(a){function b(b){var c,e,f,g=function(a){for(var b=a.parentNode.firstChild,c=0;b;){if(b===a)return c;1===b.nodeType&&"bookmark"===b.getAttribute("data-mce-type")||c++,b=b.nextSibling}return-1};c=f=a[b?"startContainer":"endContainer"],e=a[b?"startOffset":"endOffset"],c&&(1===c.nodeType&&(e=g(c),c=c.parentNode,d.remove(f)),a[b?"startContainer":"endContainer"]=c,a[b?"startOffset":"endOffset"]=e)}b(!0),b();var e=d.createRng();return e.setStart(a.startContainer,a.startOffset),a.endContainer&&e.setEnd(a.endContainer,a.endOffset),c.normalizeRange(e)};return{createBookmark:e,resolveBookmark:f}}),g("c",["2","8"],function(a,b){var c=function(c){return a.grep(c.selection.getSelectedBlocks(),function(a){return b.isListItemNode(a)})};return{getSelectedListItems:c}}),g("4",["a","b","8","c"],function(a,b,c,d){var e=a.DOM,f=function(a,b){var d;if(c.isListNode(a)){for(;d=a.firstChild;)b.appendChild(d);e.remove(a)}},g=function(a){var b,d,g;return"DT"===a.nodeName?(e.rename(a,"DD"),!0):(b=a.previousSibling,b&&c.isListNode(b)?(b.appendChild(a),!0):b&&"LI"===b.nodeName&&c.isListNode(b.lastChild)?(b.lastChild.appendChild(a),f(a.lastChild,b.lastChild),!0):(b=a.nextSibling,b&&c.isListNode(b)?(b.insertBefore(a,b.firstChild),!0):(b=a.previousSibling,!(!b||"LI"!==b.nodeName)&&(d=e.create(a.parentNode.nodeName),g=e.getStyle(a.parentNode,"listStyleType"),g&&e.setStyle(d,"listStyleType",g),b.appendChild(d),d.appendChild(a),f(a.lastChild,d),!0))))},h=function(a){var c=d.getSelectedListItems(a);if(c.length){for(var e=b.createBookmark(a.selection.getRng(!0)),f=0;f<c.length&&(g(c[f])||0!==f);f++);return a.selection.setRng(b.resolveBookmark(e)),a.nodeChanged(),!0}};return{indentSelection:h}}),g("d",["a","2","8"],function(a,b,c){var d=a.DOM,e=function(a,b){var e,f=b.parentNode;"LI"===f.nodeName&&f.firstChild===b&&(e=f.previousSibling,e&&"LI"===e.nodeName?(e.appendChild(b),c.isEmpty(a,f)&&d.remove(f)):d.setStyle(f,"listStyleType","none")),c.isListNode(f)&&(e=f.previousSibling,e&&"LI"===e.nodeName&&e.appendChild(b))},f=function(a,c){b.each(b.grep(a.select("ol,ul",c)),function(b){e(a,b)})};return{normalizeList:e,normalizeLists:f}}),g("k",["9"],function(a){return a("tinymce.Env")}),g("f",["a","k"],function(a,b){var c=a.DOM,d=function(a,d,e){var f,g,h,i=c.createFragment(),j=a.schema.getBlockElements();if(a.settings.forced_root_block&&(e=e||a.settings.forced_root_block),e&&(g=c.create(e),g.tagName===a.settings.forced_root_block&&c.setAttribs(g,a.settings.forced_root_block_attrs),i.appendChild(g)),d)for(;f=d.firstChild;){var k=f.nodeName;h||"SPAN"===k&&"bookmark"===f.getAttribute("data-mce-type")||(h=!0),j[k]?(i.appendChild(f),g=null):e?(g||(g=c.create(e),i.appendChild(g)),g.appendChild(f)):i.appendChild(f)}return a.settings.forced_root_block?h||b.ie&&!(b.ie>10)||g.appendChild(c.create("br",{"data-mce-bogus":"1"})):i.appendChild(c.create("br")),i};return{createNewTextBlock:d}}),g("e",["a","8","f","2"],function(a,b,c,d){var e=a.DOM,f=function(a,f,g,h){var i,j,k,l,m=function(a){d.each(k,function(b){a.parentNode.insertBefore(b,g.parentNode)}),e.remove(a)};for(k=e.select('span[data-mce-type="bookmark"]',f),h=h||c.createNewTextBlock(a,g),i=e.createRng(),i.setStartAfter(g),i.setEndAfter(f),j=i.extractContents(),l=j.firstChild;l;l=l.firstChild)if("LI"===l.nodeName&&a.dom.isEmpty(l)){e.remove(l);break}a.dom.isEmpty(j)||e.insertAfter(j,f),e.insertAfter(h,f),b.isEmpty(a.dom,g.parentNode)&&m(g.parentNode),e.remove(g),b.isEmpty(a.dom,f)&&e.remove(f)};return{splitList:f}}),g("5",["a","b","8","d","c","e","f"],function(a,b,c,d,e,f,g){var h=a.DOM,i=function(a,b){c.isEmpty(a,b)&&h.remove(b)},j=function(a,b){var e,j=b.parentNode,k=j.parentNode;return j===a.getBody()||("DD"===b.nodeName?(h.rename(b,"DT"),!0):c.isFirstChild(b)&&c.isLastChild(b)?("LI"===k.nodeName?(h.insertAfter(b,k),i(a.dom,k),h.remove(j)):c.isListNode(k)?h.remove(j,!0):(k.insertBefore(g.createNewTextBlock(a,b),j),h.remove(j)),!0):c.isFirstChild(b)?("LI"===k.nodeName?(h.insertAfter(b,k),b.appendChild(j),i(a.dom,k)):c.isListNode(k)?k.insertBefore(b,j):(k.insertBefore(g.createNewTextBlock(a,b),j),h.remove(b)),!0):c.isLastChild(b)?("LI"===k.nodeName?h.insertAfter(b,k):c.isListNode(k)?h.insertAfter(b,j):(h.insertAfter(g.createNewTextBlock(a,b),j),h.remove(b)),!0):("LI"===k.nodeName?(j=k,e=g.createNewTextBlock(a,b,"LI")):e=c.isListNode(k)?g.createNewTextBlock(a,b,"LI"):g.createNewTextBlock(a,b),f.splitList(a,j,b,e),d.normalizeLists(a.dom,j.parentNode),!0))},k=function(a){var c=e.getSelectedListItems(a);if(c.length){var d,f,g=b.createBookmark(a.selection.getRng(!0)),h=a.getBody();for(d=c.length;d--;)for(var i=c[d].parentNode;i&&i!==h;){for(f=c.length;f--;)if(c[f]===i){c.splice(d,1);break}i=i.parentNode}for(d=0;d<c.length&&(j(a,c[d])||0!==d);d++);return a.selection.setRng(b.resolveBookmark(g)),a.nodeChanged(),!0}};return{outdent:j,outdentSelection:k}}),g("g",["9"],function(a){return a("tinymce.dom.BookmarkManager")}),g("6",["g","2","5","b","8","d","c","e"],function(a,b,c,d,e,f,g,h){var i=function(a,b,c){var d=c["list-style-type"]?c["list-style-type"]:null;a.setStyle(b,"list-style-type",d)},j=function(a,c){b.each(c,function(b,c){a.setAttribute(c,b)})},k=function(a,c,d){j(c,d["list-attributes"]),b.each(a.select("li",c),function(a){j(a,d["list-item-attributes"])})},l=function(a,b,c){i(a,b,c),k(a,b,c)},m=function(a,b,c){var d,f,g=a.getBody();for(d=b[c?"startContainer":"endContainer"],f=b[c?"startOffset":"endOffset"],1===d.nodeType&&(d=d.childNodes[Math.min(f,d.childNodes.length-1)]||d);d.parentNode!==g;){if(e.isTextBlock(a,d))return d;if(/^(TD|TH)$/.test(d.parentNode.nodeName))return d;d=d.parentNode}return d},n=function(c,d){for(var f,g=[],h=c.getBody(),i=c.dom,j=m(c,d,!0),k=m(c,d,!1),l=[],n=j;n&&(l.push(n),n!==k);n=n.nextSibling);return b.each(l,function(b){if(e.isTextBlock(c,b))return g.push(b),void(f=null);if(i.isBlock(b)||e.isBr(b))return e.isBr(b)&&i.remove(b),void(f=null);var d=b.nextSibling;return a.isBookmarkNode(b)&&(e.isTextBlock(c,d)||!d&&b.parentNode===h)?void(f=null):(f||(f=i.create("p"),b.parentNode.insertBefore(f,b),g.push(f)),void f.appendChild(b))}),g},o=function(a,c,f){var g,h=a.selection.getRng(!0),i="LI",j=a.dom;f=f?f:{},"false"!==j.getContentEditable(a.selection.getNode())&&(c=c.toUpperCase(),"DL"===c&&(i="DT"),g=d.createBookmark(h),b.each(n(a,h),function(b){var d,g,h=function(a){var b=j.getStyle(a,"list-style-type"),c=f?f["list-style-type"]:"";return c=null===c?"":c,b===c};g=b.previousSibling,g&&e.isListNode(g)&&g.nodeName===c&&h(g)?(d=g,b=j.rename(b,i),g.appendChild(b)):(d=j.create(c),b.parentNode.insertBefore(d,b),d.appendChild(b),b=j.rename(b,i)),l(j,d,f),u(a.dom,d)}),a.selection.setRng(d.resolveBookmark(g)))},p=function(a){var i=d.createBookmark(a.selection.getRng(!0)),j=a.getBody(),k=g.getSelectedListItems(a),l=b.grep(k,function(b){return a.dom.isEmpty(b)});k=b.grep(k,function(b){return!a.dom.isEmpty(b)}),b.each(l,function(b){if(e.isEmpty(a.dom,b))return void c.outdent(a,b)}),b.each(k,function(b){var c,d;if(b.parentNode!==a.getBody()){for(c=b;c&&c!==j;c=c.parentNode)e.isListNode(c)&&(d=c);h.splitList(a,d,b),f.normalizeLists(a.dom,d.parentNode)}}),a.selection.setRng(d.resolveBookmark(i))},q=function(a,b){return a&&b&&e.isListNode(a)&&a.nodeName===b.nodeName},r=function(a,b,c){var d=a.getStyle(b,"list-style-type",!0),e=a.getStyle(c,"list-style-type",!0);return d===e},s=function(a,b){return a.className===b.className},t=function(a,b,c){return q(b,c)&&r(a,b,c)&&s(b,c)},u=function(a,b){var c,d;if(c=b.nextSibling,t(a,b,c)){for(;d=c.firstChild;)b.appendChild(d);a.remove(c)}if(c=b.previousSibling,t(a,b,c)){for(;d=c.lastChild;)b.insertBefore(d,b.firstChild);a.remove(c)}},v=function(a,b,c){var e=a.dom.getParent(a.selection.getStart(),"OL,UL,DL");if(c=c?c:{},e!==a.getBody())if(e)if(e.nodeName===b)p(a,b);else{var f=d.createBookmark(a.selection.getRng(!0));l(a.dom,e,c),u(a.dom,a.dom.rename(e,b)),a.selection.setRng(d.resolveBookmark(f))}else o(a,b,c)};return{toggleList:v,removeList:p,mergeWithAdjacentLists:u}}),g("i",["9"],function(a){return a("tinymce.dom.TreeWalker")}),g("7",["h","i","3","6","b","8","d","j","c"],function(a,b,c,d,e,f,g,h,i){var j=function(c,d,e){var g,h,i=d.startContainer,j=d.startOffset;if(3===i.nodeType&&(e?j<i.data.length:j>0))return i;for(g=c.schema.getNonEmptyElements(),1===i.nodeType&&(i=a.getNode(i,j)),h=new b(i,c.getBody()),e&&f.isBogusBr(c.dom,i)&&h.next();i=h[e?"next":"prev2"]();){if("LI"===i.nodeName&&!i.hasChildNodes())return i;if(g[i.nodeName])return i;if(3===i.nodeType&&i.data.length>0)return i}},k=function(a,b,c){var d,e,g=b.parentNode;if(f.isChildOfBody(a,b)&&f.isChildOfBody(a,c)){if(f.isListNode(c.lastChild)&&(e=c.lastChild),g===c.lastChild&&f.isBr(g.previousSibling)&&a.remove(g.previousSibling),d=c.lastChild,d&&f.isBr(d)&&b.hasChildNodes()&&a.remove(d),f.isEmpty(a,c,!0)&&a.$(c).empty(),!f.isEmpty(a,b,!0))for(;d=b.firstChild;)c.appendChild(d);e&&c.appendChild(e),a.remove(b),f.isEmpty(a,g)&&g!==a.getRoot()&&a.remove(g)}},l=function(a,b){var c,g,i,l=a.dom,m=a.selection,n=l.getParent(m.getStart(),"LI");if(n){if(c=n.parentNode,c===a.getBody()&&f.isEmpty(l,c))return!0;if(g=h.normalizeRange(m.getRng(!0)),i=l.getParent(j(a,g,b),"LI"),i&&i!==n){var o=e.createBookmark(g);return b?k(l,i,n):k(l,n,i),a.selection.setRng(e.resolveBookmark(o)),!0}if(!i&&!b&&d.removeList(a,c.nodeName))return!0}return!1},m=function(a,b){var c=a.dom,e=c.getParent(a.selection.getStart(),c.isBlock);if(e&&c.isEmpty(e)){var f=h.normalizeRange(a.selection.getRng(!0)),g=c.getParent(j(a,f,b),"LI");if(g)return a.undoManager.transact(function(){c.remove(e),d.mergeWithAdjacentLists(c,g.parentNode),a.selection.select(g,!0),a.selection.collapse(b)}),!0}return!1},n=function(a,b){return l(a,b)||m(a,b)},o=function(a){var b=a.dom.getParent(a.selection.getStart(),"LI,DT,DD");return!!(b||i.getSelectedListItems(a).length>0)&&(a.undoManager.transact(function(){a.execCommand("Delete"),g.normalizeLists(a.dom,a.getBody())}),!0)},p=function(a,b){return a.selection.isCollapsed()?n(a,b):o(a)},q=function(a){a.on("keydown",function(b){b.keyCode===c.BACKSPACE?p(a,!1)&&b.preventDefault():b.keyCode===c.DELETE&&p(a,!0)&&b.preventDefault()})};return{setup:q,backspaceDelete:p}}),g("0",["1","2","3","4","5","6","7","8"],function(a,b,c,d,e,f,g,h){var i=function(a,b){return function(){var c=a.dom.getParent(a.selection.getStart(),"UL,OL,DL");return c&&c.nodeName===b}},j=function(a){a.on("BeforeExecCommand",function(b){var c,f=b.command.toLowerCase();if("indent"===f?d.indentSelection(a)&&(c=!0):"outdent"===f&&e.outdentSelection(a)&&(c=!0),c)return a.fire("ExecCommand",{command:b.command}),b.preventDefault(),!0}),a.addCommand("InsertUnorderedList",function(b,c){f.toggleList(a,"UL",c)}),a.addCommand("InsertOrderedList",function(b,c){f.toggleList(a,"OL",c)}),a.addCommand("InsertDefinitionList",function(b,c){f.toggleList(a,"DL",c)})},k=function(a){a.addQueryStateHandler("InsertUnorderedList",i(a,"UL")),a.addQueryStateHandler("InsertOrderedList",i(a,"OL")),a.addQueryStateHandler("InsertDefinitionList",i(a,"DL"))},l=function(a){a.on("keydown",function(b){9!==b.keyCode||c.metaKeyPressed(b)||a.dom.getParent(a.selection.getStart(),"LI,DT,DD")&&(b.preventDefault(),b.shiftKey?e.outdentSelection(a):d.indentSelection(a))})},m=function(a){var c=function(c){return function(){var d=this;a.on("NodeChange",function(a){var e=b.grep(a.parents,h.isListNode);d.active(e.length>0&&e[0].nodeName===c)})}},d=function(a,c){var d=a.settings.plugins?a.settings.plugins:"";return b.inArray(d.split(/[ ,]/),c)!==-1};d(a,"advlist")||(a.addButton("numlist",{title:"Numbered list",cmd:"InsertOrderedList",onPostRender:c("OL")}),a.addButton("bullist",{title:"Bullet list",cmd:"InsertUnorderedList",onPostRender:c("UL")})),a.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(b){var c=b.control;a.on("nodechange",function(){for(var b=a.selection.getSelectedBlocks(),d=!1,e=0,f=b.length;!d&&e<f;e++){var g=b[e].nodeName;d="LI"===g&&h.isFirstChild(b[e])||"UL"===g||"OL"===g||"DD"===g}c.disabled(d)})}})};return a.add("lists",function(a){return m(a),g.setup(a),a.on("init",function(){j(a),k(a),l(a)}),{backspaceDelete:function(b){g.backspaceDelete(a,b)}}}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- !function(){var e={},t=function(t){for(var n=e[t],i=n.deps,o=n.defn,a=i.length,s=new Array(a),l=0;l<a;++l)s[l]=r(i[l]);var c=o.apply(null,s);if(void 0===c)throw"module ["+t+"] returned undefined";n.instance=c},n=function(t,n,r){if("string"!=typeof t)throw"module id must be a string";if(void 0===n)throw"no dependencies for "+t;if(void 0===r)throw"no definition function for "+t;e[t]={deps:n,defn:r,instance:void 0}},r=function(n){var r=e[n];if(void 0===r)throw"module ["+n+"] was undefined";return void 0===r.instance&&t(n),r.instance},i=function(e,t){for(var n=e.length,i=new Array(n),o=0;o<n;++o)i.push(r(e[o]));t.apply(null,t)},o={};o.bolt={module:{api:{define:n,require:i,demand:r}}};var a=n,s=function(e,t){a(e,[],function(){return t})};s("1",tinymce.PluginManager),s("6",tinymce.util.Delay),s("e",tinymce.util.Tools),s("9",tinymce.html.SaxParser),s("a",tinymce.html.Schema),s("b",tinymce.dom.DOMUtils.DOM),a("h",[],function(){var e=function(e,t){if(e)for(var n=0;n<e.length;n++)if(t.indexOf(e[n].filter)!==-1)return e[n]};return{getVideoScriptMatch:e}}),a("c",[],function(){var e=function(e){return e.replace(/px$/,"")},t=function(e){return/^[0-9.]+$/.test(e)?e+"px":e},n=function(t){return function(n){return n?e(n.style[t]):""}},r=function(e){return function(n,r){n&&(n.style[e]=t(r))}};return{getMaxWidth:n("maxWidth"),getMaxHeight:n("maxHeight"),setMaxWidth:r("maxWidth"),setMaxHeight:r("maxHeight")}}),a("7",["e","9","a","b","h","c"],function(e,t,n,r,i,o){var a=function(e){return r.getAttrib(e,"data-ephox-embed-iri")},s=function(e){var t=r.createFragment(e);return""!==a(t.firstChild)},l=function(n,r){var o={};return new t({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(t,r){if(o.source1||"param"!==t||(o.source1=r.map.movie),"iframe"!==t&&"object"!==t&&"embed"!==t&&"video"!==t&&"audio"!==t||(o.type||(o.type=t),o=e.extend(r.map,o)),"script"===t){var a=i.getVideoScriptMatch(n,r.map.src);if(!a)return;o={type:"script",source1:r.map.src,width:a.width,height:a.height}}"source"===t&&(o.source1?o.source2||(o.source2=r.map.src):o.source1=r.map.src),"img"!==t||o.poster||(o.poster=r.map.src)}}).parse(r),o.source1=o.source1||o.src||o.data,o.source2=o.source2||"",o.poster=o.poster||"",o},c=function(e){var t=r.createFragment(e),n=t.firstChild;return{type:"ephox-embed-iri",source1:a(n),source2:"",poster:"",width:o.getMaxWidth(n),height:o.getMaxHeight(n)}},u=function(e,t){return s(t)?c(t):l(e,t)};return{htmlToData:u}}),s("8",tinymce.html.Writer),a("4",["8","9","a","b","c"],function(e,t,n,r,i){var o=function(e,t){var n,r,i,o;for(n in t)if(i=""+t[n],e.map[n])for(r=e.length;r--;)o=e[r],o.name===n&&(i?(e.map[n]=i,o.value=i):(delete e.map[n],e.splice(r,1)));else i&&(e.push({name:n,value:i}),e.map[n]=i)},a=function(n){var r=new e,i=new t(r);return i.parse(n),r.getContent()},s=function(r,i,a){var s,l=new e,c=0;return new t({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(e){l.comment(e)},cdata:function(e){l.cdata(e)},text:function(e,t){l.text(e,t)},start:function(e,t,n){switch(e){case"video":case"object":case"embed":case"img":case"iframe":o(t,{width:i.width,height:i.height})}if(a)switch(e){case"video":o(t,{poster:i.poster,src:""}),i.source2&&o(t,{src:""});break;case"iframe":o(t,{src:i.source1});break;case"source":if(c++,c<=2&&(o(t,{src:i["source"+c],type:i["source"+c+"mime"]}),!i["source"+c]))return;break;case"img":if(!i.poster)return;s=!0}l.start(e,t,n)},end:function(e){if("video"===e&&a)for(var t=1;t<=2;t++)if(i["source"+t]){var n=[];n.map={},c<t&&(o(n,{src:i["source"+t],type:i["source"+t+"mime"]}),l.start("source",n,!0))}if(i.poster&&"object"===e&&a&&!s){var r=[];r.map={},o(r,{src:i.poster,width:i.width,height:i.height}),l.start("img",r,!0)}l.end(e)}},new n({})).parse(r),l.getContent()},l=function(e){var t=r.createFragment(e);return""!==r.getAttrib(t.firstChild,"data-ephox-embed-iri")},c=function(e,t){var n=r.createFragment(e),o=n.firstChild;return i.setMaxWidth(o,t.width),i.setMaxHeight(o,t.height),a(o.outerHTML)},u=function(e,t,n){return l(e)?c(e,t):s(e,t,n)};return{updateHtml:u}}),a("l",[],function(){var e=function(e){var t={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"},n=e.toLowerCase().split(".").pop(),r=t[n];return r?r:""};return{guess:e}}),a("m",[],function(){var e=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\-_]+(?:\?.+)?)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowfullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&amp;byline=0",allowfullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}];return{urlPatterns:e}}),a("j",["l","7","m","h","4","e"],function(e,t,n,r,i,o){var a=function(a,s){var l="",c=o.extend({},s);if(!c.source1&&(o.extend(c,t.htmlToData(a.settings.media_scripts,c.embed)),!c.source1))return"";if(c.source2||(c.source2=""),c.poster||(c.poster=""),c.source1=a.convertURL(c.source1,"source"),c.source2=a.convertURL(c.source2,"source"),c.source1mime=e.guess(c.source1),c.source2mime=e.guess(c.source2),c.poster=a.convertURL(c.poster,"poster"),o.each(n.urlPatterns,function(e){var t,n,r=e.regex.exec(c.source1);if(r){for(n=e.url,t=0;r[t];t++)n=n.replace("$"+t,function(){return r[t]});c.source1=n,c.type=e.type,c.allowFullscreen=e.allowFullscreen,c.width=c.width||e.w,c.height=c.height||e.h}}),c.embed)l=i.updateHtml(c.embed,c,!0);else{var u=r.getVideoScriptMatch(a.settings.media_scripts,c.source1);if(u&&(c.type="script",c.width=u.width,c.height=u.height),c.width=c.width||300,c.height=c.height||150,o.each(c,function(e,t){c[t]=a.dom.encode(e)}),"iframe"===c.type){var d=c.allowFullscreen?' allowFullscreen="1"':"";l+='<iframe src="'+c.source1+'" width="'+c.width+'" height="'+c.height+'"'+d+"></iframe>"}else"application/x-shockwave-flash"===c.source1mime?(l+='<object data="'+c.source1+'" width="'+c.width+'" height="'+c.height+'" type="application/x-shockwave-flash">',c.poster&&(l+='<img src="'+c.poster+'" width="'+c.width+'" height="'+c.height+'" />'),l+="</object>"):c.source1mime.indexOf("audio")!==-1?a.settings.audio_template_callback?l=a.settings.audio_template_callback(c):l+='<audio controls="controls" src="'+c.source1+'">'+(c.source2?'\n<source src="'+c.source2+'"'+(c.source2mime?' type="'+c.source2mime+'"':"")+" />\n":"")+"</audio>":"script"===c.type?l+='<script src="'+c.source1+'"></script>':l=a.settings.video_template_callback?a.settings.video_template_callback(c):'<video width="'+c.width+'" height="'+c.height+'"'+(c.poster?' poster="'+c.poster+'"':"")+' controls="controls">\n<source src="'+c.source1+'"'+(c.source1mime?' type="'+c.source1mime+'"':"")+" />\n"+(c.source2?'<source src="'+c.source2+'"'+(c.source2mime?' type="'+c.source2mime+'"':"")+" />\n":"")+"</video>"}return l};return{dataToHtml:a}}),s("k",tinymce.util.Promise),a("d",["j","k"],function(e,t){var n=function(e,n,r){var i={};return new t(function(t,o){var a=function(r){return r.html&&(i[e.source1]=r),t({url:e.source1,html:r.html?r.html:n(e)})};i[e.source1]?a(i[e.source1]):r({url:e.source1},a,o)})},r=function(e,n){return new t(function(t){t({html:n(e),url:e.source1})})},i=function(t){return function(n){return e.dataToHtml(t,n)}},o=function(e,t){var o=e.settings.media_url_resolver;return o?n(t,i(e),o):r(t,i(e))};return{getEmbedHtml:o}}),s("f",tinymce.Env),a("g",[],function(){var e=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},t=function(e,t){var n=e.find("#width")[0],r=e.find("#height")[0],i=e.find("#constrain")[0];n&&r&&i&&t(n,r,i.checked())},n=function(t,n,r){var i=t.state.get("oldVal"),o=n.state.get("oldVal"),a=t.value(),s=n.value();r&&i&&o&&a&&s&&(a!==i?(s=Math.round(a/i*s),isNaN(s)||n.value(s)):(a=Math.round(s/o*a),isNaN(a)||t.value(a))),e(t,n)},r=function(n){t(n,e)},i=function(e){t(e,n)},o=function(e){var t=function(){e(function(e){i(e)})};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}};return{createUi:o,syncSize:r,updateSize:i}}),a("2",["6","7","4","d","c","e","f","g"],function(e,t,n,r,i,o,a,s){var l=a.ie&&a.ie<=8?"onChange":"onInput",c=function(e){return function(t){var n=t&&t.msg?"Media embed handler error: "+t.msg:"Media embed handler threw unknown error.";e.notificationManager.open({type:"error",text:n})}},u=function(e){var n=e.selection.getNode(),r=n.getAttribute("data-ephox-embed-iri");return r?{source1:r,"data-ephox-embed-iri":r,width:i.getMaxWidth(n),height:i.getMaxHeight(n)}:n.getAttribute("data-mce-object")?t.htmlToData(e.settings.media_scripts,e.serializer.serialize(n,{selection:!0})):{}},d=function(e){var t=e.selection.getNode();if(t.getAttribute("data-mce-object")||t.getAttribute("data-ephox-embed-iri"))return e.selection.getContent()},f=function(e,n){return function(r){var i=r.html,a=e.find("#embed")[0],l=o.extend(t.htmlToData(n.settings.media_scripts,i),{source1:r.url});e.fromJSON(l),a&&(a.value(i),s.updateSize(e))}},p=function(e,t){var n,r,i=e.dom.select("img[data-mce-object]");for(n=0;n<t.length;n++)for(r=i.length-1;r>=0;r--)t[n]===i[r]&&i.splice(r,1);e.selection.select(i[0])},m=function(e,t){var n=e.dom.select("img[data-mce-object]");e.insertContent(t),p(e,n),e.nodeChanged()},g=function(e,t){var i=e.toJSON();i.embed=n.updateHtml(i.embed,i),i.embed?m(t,i.embed):r.getEmbedHtml(t,i).then(function(e){m(t,e.html)})["catch"](c(t))},h=function(e,t){o.each(t,function(t,n){e.find("#"+n).value(t)})},v=function(e){var i,a,p=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){r.getEmbedHtml(e,i.toJSON()).then(f(i,e))["catch"](c(e))},1)},onchange:function(t){r.getEmbedHtml(e,i.toJSON()).then(f(i,e))["catch"](c(e)),h(i,t.meta)},onbeforecall:function(e){e.meta=i.toJSON()}}],m=[],v=function(e){e(i),a=i.toJSON(),i.find("#embed").value(n.updateHtml(a.embed,a))};if(e.settings.media_alt_source!==!1&&m.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),e.settings.media_poster!==!1&&m.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),e.settings.media_dimensions!==!1){var b=s.createUi(v);p.push(b)}a=u(e);var y={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:d(e),multiline:!0,rows:5,label:"Source"},x=function(){a=o.extend({},t.htmlToData(e.settings.media_scripts,this.value())),this.parent().parent().fromJSON(a)};y[l]=x,i=e.windowManager.open({title:"Insert/edit media",data:a,bodyType:"tabpanel",body:[{title:"General",type:"form",items:p},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},y]},{title:"Advanced",type:"form",items:m}],onSubmit:function(){s.updateSize(i),g(i,e)}}),s.syncSize(i)};return{showDialog:v}}),a("3",["e","8","9","a"],function(e,t,n,r){var i=function(e,i){if(e.settings.media_filter_html===!1)return i;var o,a=new t;return new n({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(e){a.comment(e)},cdata:function(e){a.cdata(e)},text:function(e,t){a.text(e,t)},start:function(t,n,r){if(o=!0,"script"!==t&&"noscript"!==t){for(var i=0;i<n.length;i++){if(0===n[i].name.indexOf("on"))return;"style"===n[i].name&&(n[i].value=e.dom.serializeStyle(e.dom.parseStyle(n[i].value),t))}a.start(t,n,r),o=!1}},end:function(e){o||a.end(e)}},new r({})).parse(i),a.getContent()};return{sanitize:i}}),s("i",tinymce.html.Node),a("5",["3","h","i","f"],function(e,t,n,r){var i=function(e,t){var i,o=t.name;return i=new n("img",1),i.shortEnded=!0,a(e,t,i),i.attr({width:t.attr("width")||"300",height:t.attr("height")||("audio"===o?"30":"150"),style:t.attr("style"),src:r.transparentSrc,"data-mce-object":o,"class":"mce-object mce-object-"+o}),i},o=function(e,t){var r,i,o,s=t.name;return r=new n("span",1),r.attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":s,"class":"mce-preview-object mce-object-"+s}),a(e,t,r),i=new n(s,1),i.attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),width:t.attr("width")||"300",height:t.attr("height")||("audio"===s?"30":"150"),frameborder:"0"}),o=new n("span",1),o.attr("class","mce-shim"),r.append(i),r.append(o),r},a=function(t,n,r){var i,o,a,s,l;for(a=n.attributes,s=a.length;s--;)i=a[s].name,o=a[s].value,"width"!==i&&"height"!==i&&"style"!==i&&("data"!==i&&"src"!==i||(o=t.convertURL(o,i)),r.attr("data-mce-p-"+i,o));l=n.firstChild&&n.firstChild.value,l&&(r.attr("data-mce-html",escape(e.sanitize(t,l))),r.firstChild=null)},s=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri"))return!0;return!1},l=function(e){return function(n){for(var a,l,c=n.length;c--;)a=n[c],a.parent&&(a.parent.attr("data-mce-object")||("script"!==a.name||(l=t.getVideoScriptMatch(e.settings.media_scripts,a.attr("src"))))&&(l&&(l.width&&a.attr("width",l.width.toString()),l.height&&a.attr("height",l.height.toString())),"iframe"===a.name&&e.settings.media_live_embeds!==!1&&r.ceFalse?s(a)||a.replace(o(e,a)):s(a)||a.replace(i(e,a))))}};return{createPreviewIframeNode:o,createPlaceholderNode:i,placeHolderConverter:l}}),a("0",["1","2","3","4","5"],function(e,t,n,r,i){var o=function(e){e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}),e.on("preInit",function(){var t=e.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=e.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),e.parser.addNodeFilter("iframe,video,audio,object,embed,script",i.placeHolderConverter(e)),e.serializer.addAttributeFilter("data-mce-object",function(t,r){for(var i,o,a,s,l,c,u,d,f=t.length;f--;)if(i=t[f],i.parent){for(u=i.attr(r),o=new tinymce.html.Node(u,1),"audio"!==u&&"script"!==u&&(d=i.attr("class"),d&&d.indexOf("mce-preview-object")!==-1?o.attr({width:i.firstChild.attr("width"),height:i.firstChild.attr("height")}):o.attr({width:i.attr("width"),height:i.attr("height")})),o.attr({style:i.attr("style")}),s=i.attributes,a=s.length;a--;){var p=s[a].name;0===p.indexOf("data-mce-p-")&&o.attr(p.substr(11),s[a].value)}"script"===u&&o.attr("type","text/javascript"),l=i.attr("data-mce-html"),l&&(c=new tinymce.html.Node("#text",3),c.raw=!0,c.value=n.sanitize(e,unescape(l)),o.append(c)),i.replace(o)}})}),e.on("click keyup",function(){var t=e.selection.getNode();t&&e.dom.hasClass(t,"mce-preview-object")&&e.dom.getAttrib(t,"data-mce-selected")&&t.setAttribute("data-mce-selected","2")}),e.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),e.on("objectResized",function(e){var t,n=e.target;n.getAttribute("data-mce-object")&&(t=n.getAttribute("data-mce-html"),t&&(t=unescape(t),n.setAttribute("data-mce-html",escape(r.updateHtml(t,{width:e.width,height:e.height})))))}),this.showDialog=function(){t.showDialog(e)},e.addButton("media",{tooltip:"Insert/edit media",onclick:this.showDialog,stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),e.addMenuItem("media",{icon:"media",text:"Media",onclick:this.showDialog,context:"insert",prependToContext:!0}),e.on("setContent",function(){e.$("span.mce-preview-object").each(function(t,n){var r=e.$(n);0===r.find("span.mce-shim",n).length&&r.append('<span class="mce-shim"></span>')})}),e.addCommand("mceMedia",this.showDialog)};return e.add("media",o),function(){}}),r("0")()}();
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("8",tinymce.util.Tools.resolve),g("1",["8"],function(a){return a("tinymce.html.Node")}),g("2",["8"],function(a){return a("tinymce.PluginManager")}),g("3",["8"],function(a){return a("tinymce.util.Tools")}),g("9",["8"],function(a){return a("tinymce.html.Writer")}),g("a",["8"],function(a){return a("tinymce.html.SaxParser")}),g("b",["8"],function(a){return a("tinymce.html.Schema")}),g("5",["3","9","a","b"],function(a,b,c,d){var e=function(a,e){if(a.settings.media_filter_html===!1)return e;var f,g=new b;return new c({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){g.comment(a)},cdata:function(a){g.cdata(a)},text:function(a,b){g.text(a,b)},start:function(b,c,d){if(f=!0,"script"!==b&&"noscript"!==b){for(var e=0;e<c.length;e++){if(0===c[e].name.indexOf("on"))return;"style"===c[e].name&&(c[e].value=a.dom.serializeStyle(a.dom.parseStyle(c[e].value),b))}g.start(b,c,d),f=!1}},end:function(a){f||g.end(a)}},new d({})).parse(e),g.getContent()};return{sanitize:e}}),g("c",[],function(){var a=function(a,b){if(a)for(var c=0;c<a.length;c++)if(b.indexOf(a[c].filter)!==-1)return a[c]};return{getVideoScriptMatch:a}}),g("d",["8"],function(a){return a("tinymce.Env")}),g("4",["5","c","1","d"],function(a,b,c,d){var e=function(a,b){var e,f=b.name;return e=new c("img",1),e.shortEnded=!0,g(a,b,e),e.attr({width:b.attr("width")||"300",height:b.attr("height")||("audio"===f?"30":"150"),style:b.attr("style"),src:d.transparentSrc,"data-mce-object":f,"class":"mce-object mce-object-"+f}),e},f=function(a,b){var d,e,f,h=b.name;return d=new c("span",1),d.attr({contentEditable:"false",style:b.attr("style"),"data-mce-object":h,"class":"mce-preview-object mce-object-"+h}),g(a,b,d),e=new c(h,1),e.attr({src:b.attr("src"),allowfullscreen:b.attr("allowfullscreen"),width:b.attr("width")||"300",height:b.attr("height")||("audio"===h?"30":"150"),frameborder:"0"}),f=new c("span",1),f.attr("class","mce-shim"),d.append(e),d.append(f),d},g=function(b,c,d){var e,f,g,h,i;for(g=c.attributes,h=g.length;h--;)e=g[h].name,f=g[h].value,"width"!==e&&"height"!==e&&"style"!==e&&("data"!==e&&"src"!==e||(f=b.convertURL(f,e)),d.attr("data-mce-p-"+e,f));i=c.firstChild&&c.firstChild.value,i&&(d.attr("data-mce-html",escape(a.sanitize(b,i))),d.firstChild=null)},h=function(a){for(;a=a.parent;)if(a.attr("data-ephox-embed-iri"))return!0;return!1},i=function(a){return function(c){for(var g,i,j=c.length;j--;)g=c[j],g.parent&&(g.parent.attr("data-mce-object")||("script"!==g.name||(i=b.getVideoScriptMatch(a.settings.media_scripts,g.attr("src"))))&&(i&&(i.width&&g.attr("width",i.width.toString()),i.height&&g.attr("height",i.height.toString())),"iframe"===g.name&&a.settings.media_live_embeds!==!1&&d.ceFalse?h(g)||g.replace(f(a,g)):h(g)||g.replace(e(a,g))))}};return{createPreviewIframeNode:f,createPlaceholderNode:e,placeHolderConverter:i}}),g("e",["8"],function(a){return a("tinymce.dom.DOMUtils")}),g("f",[],function(){var a=function(a){return a.replace(/px$/,"")},b=function(a){return/^[0-9.]+$/.test(a)?a+"px":a},c=function(b){return function(c){return c?a(c.style[b]):""}},d=function(a){return function(c,d){c&&(c.style[a]=b(d))}};return{getMaxWidth:c("maxWidth"),getMaxHeight:c("maxHeight"),setMaxWidth:d("maxWidth"),setMaxHeight:d("maxHeight")}}),g("6",["9","a","b","e","f"],function(a,b,c,d,e){var f=d.DOM,g=function(a,b){var c,d,e,f;for(c in b)if(e=""+b[c],a.map[c])for(d=a.length;d--;)f=a[d],f.name===c&&(e?(a.map[c]=e,f.value=e):(delete a.map[c],a.splice(d,1)));else e&&(a.push({name:c,value:e}),a.map[c]=e)},h=function(c){var d=new a,e=new b(d);return e.parse(c),d.getContent()},i=function(d,e,f){var h,i=new a,j=0;return new b({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(a){i.comment(a)},cdata:function(a){i.cdata(a)},text:function(a,b){i.text(a,b)},start:function(a,b,c){switch(a){case"video":case"object":case"embed":case"img":case"iframe":void 0!==e.height&&void 0!==e.width&&g(b,{width:e.width,height:e.height})}if(f)switch(a){case"video":g(b,{poster:e.poster,src:""}),e.source2&&g(b,{src:""});break;case"iframe":g(b,{src:e.source1});break;case"source":if(j++,j<=2&&(g(b,{src:e["source"+j],type:e["source"+j+"mime"]}),!e["source"+j]))return;break;case"img":if(!e.poster)return;h=!0}i.start(a,b,c)},end:function(a){if("video"===a&&f)for(var b=1;b<=2;b++)if(e["source"+b]){var c=[];c.map={},j<b&&(g(c,{src:e["source"+b],type:e["source"+b+"mime"]}),i.start("source",c,!0))}if(e.poster&&"object"===a&&f&&!h){var d=[];d.map={},g(d,{src:e.poster,width:e.width,height:e.height}),i.start("img",d,!0)}i.end(a)}},new c({})).parse(d),i.getContent()},j=function(a){var b=f.createFragment(a);return""!==f.getAttrib(b.firstChild,"data-ephox-embed-iri")},k=function(a,b){var c=f.createFragment(a),d=c.firstChild;return e.setMaxWidth(d,b.width),e.setMaxHeight(d,b.height),h(d.outerHTML)},l=function(a,b,c){return j(a)?k(a,b):i(a,b,c)};return{updateHtml:l}}),g("g",["8"],function(a){return a("tinymce.util.Delay")}),g("h",["3","a","b","e","c","f"],function(a,b,c,d,e,f){var g=d.DOM,h=function(a){return g.getAttrib(a,"data-ephox-embed-iri")},i=function(a){var b=g.createFragment(a);return""!==h(b.firstChild)},j=function(c,d){var f={};return new b({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(b,d){if(f.source1||"param"!==b||(f.source1=d.map.movie),"iframe"!==b&&"object"!==b&&"embed"!==b&&"video"!==b&&"audio"!==b||(f.type||(f.type=b),f=a.extend(d.map,f)),"script"===b){var g=e.getVideoScriptMatch(c,d.map.src);if(!g)return;f={type:"script",source1:d.map.src,width:g.width,height:g.height}}"source"===b&&(f.source1?f.source2||(f.source2=d.map.src):f.source1=d.map.src),"img"!==b||f.poster||(f.poster=d.map.src)}}).parse(d),f.source1=f.source1||f.src||f.data,f.source2=f.source2||"",f.poster=f.poster||"",f},k=function(a){var b=g.createFragment(a),c=b.firstChild;return{type:"ephox-embed-iri",source1:h(c),source2:"",poster:"",width:f.getMaxWidth(c),height:f.getMaxHeight(c)}},l=function(a,b){return i(b)?k(b):j(a,b)};return{htmlToData:l}}),g("m",[],function(){var a=function(a){var b={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"},c=a.toLowerCase().split(".").pop(),d=b[c];return d?d:""};return{guess:a}}),g("n",[],function(){var a=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\-_]+(?:\?.+)?)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowfullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&amp;byline=0",allowfullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}];return{urlPatterns:a}}),g("k",["m","h","n","c","6","3"],function(a,b,c,d,e,f){var g=function(g,h){var i="",j=f.extend({},h);if(!j.source1&&(f.extend(j,b.htmlToData(g.settings.media_scripts,j.embed)),!j.source1))return"";if(j.source2||(j.source2=""),j.poster||(j.poster=""),j.source1=g.convertURL(j.source1,"source"),j.source2=g.convertURL(j.source2,"source"),j.source1mime=a.guess(j.source1),j.source2mime=a.guess(j.source2),j.poster=g.convertURL(j.poster,"poster"),f.each(c.urlPatterns,function(a){var b,c,d=a.regex.exec(j.source1);if(d){for(c=a.url,b=0;d[b];b++)c=c.replace("$"+b,function(){return d[b]});j.source1=c,j.type=a.type,j.allowFullscreen=a.allowFullscreen,j.width=j.width||a.w,j.height=j.height||a.h}}),j.embed)i=e.updateHtml(j.embed,j,!0);else{var k=d.getVideoScriptMatch(g.settings.media_scripts,j.source1);if(k&&(j.type="script",j.width=k.width,j.height=k.height),j.width=j.width||300,j.height=j.height||150,f.each(j,function(a,b){j[b]=g.dom.encode(a)}),"iframe"===j.type){var l=j.allowFullscreen?' allowFullscreen="1"':"";i+='<iframe src="'+j.source1+'" width="'+j.width+'" height="'+j.height+'"'+l+"></iframe>"}else"application/x-shockwave-flash"===j.source1mime?(i+='<object data="'+j.source1+'" width="'+j.width+'" height="'+j.height+'" type="application/x-shockwave-flash">',j.poster&&(i+='<img src="'+j.poster+'" width="'+j.width+'" height="'+j.height+'" />'),i+="</object>"):j.source1mime.indexOf("audio")!==-1?g.settings.audio_template_callback?i=g.settings.audio_template_callback(j):i+='<audio controls="controls" src="'+j.source1+'">'+(j.source2?'\n<source src="'+j.source2+'"'+(j.source2mime?' type="'+j.source2mime+'"':"")+" />\n":"")+"</audio>":"script"===j.type?i+='<script src="'+j.source1+'"></script>':i=g.settings.video_template_callback?g.settings.video_template_callback(j):'<video width="'+j.width+'" height="'+j.height+'"'+(j.poster?' poster="'+j.poster+'"':"")+' controls="controls">\n<source src="'+j.source1+'"'+(j.source1mime?' type="'+j.source1mime+'"':"")+" />\n"+(j.source2?'<source src="'+j.source2+'"'+(j.source2mime?' type="'+j.source2mime+'"':"")+" />\n":"")+"</video>"}return i};return{dataToHtml:g}}),g("l",["8"],function(a){return a("tinymce.util.Promise")}),g("i",["k","l"],function(a,b){var c=function(a,c,d){var e={};return new b(function(b,f){var g=function(d){return d.html&&(e[a.source1]=d),b({url:a.source1,html:d.html?d.html:c(a)})};e[a.source1]?g(e[a.source1]):d({url:a.source1},g,f)})},d=function(a,c){return new b(function(b){b({html:c(a),url:a.source1})})},e=function(b){return function(c){return a.dataToHtml(b,c)}},f=function(a,b){var f=a.settings.media_url_resolver;return f?c(b,e(a),f):d(b,e(a))};return{getEmbedHtml:f}}),g("j",[],function(){var a=function(a,b){a.state.set("oldVal",a.value()),b.state.set("oldVal",b.value())},b=function(a,b){var c=a.find("#width")[0],d=a.find("#height")[0],e=a.find("#constrain")[0];c&&d&&e&&b(c,d,e.checked())},c=function(b,c,d){var e=b.state.get("oldVal"),f=c.state.get("oldVal"),g=b.value(),h=c.value();d&&e&&f&&g&&h&&(g!==e?(h=Math.round(g/e*h),isNaN(h)||c.value(h)):(g=Math.round(h/f*g),isNaN(g)||b.value(g))),a(b,c)},d=function(c){b(c,a)},e=function(a){b(a,c)},f=function(a){var b=function(){a(function(a){e(a)})};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:b,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:b,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}};return{createUi:f,syncSize:d,updateSize:e}}),g("7",["g","h","6","i","f","3","d","j"],function(a,b,c,d,e,f,g,h){var i=g.ie&&g.ie<=8?"onChange":"onInput",j=function(a){return function(b){var c=b&&b.msg?"Media embed handler error: "+b.msg:"Media embed handler threw unknown error.";a.notificationManager.open({type:"error",text:c})}},k=function(a){var c=a.selection.getNode(),d=c.getAttribute("data-ephox-embed-iri");return d?{source1:d,"data-ephox-embed-iri":d,width:e.getMaxWidth(c),height:e.getMaxHeight(c)}:c.getAttribute("data-mce-object")?b.htmlToData(a.settings.media_scripts,a.serializer.serialize(c,{selection:!0})):{}},l=function(a){var b=a.selection.getNode();if(b.getAttribute("data-mce-object")||b.getAttribute("data-ephox-embed-iri"))return a.selection.getContent()},m=function(a,c){return function(d){var e=d.html,g=a.find("#embed")[0],i=f.extend(b.htmlToData(c.settings.media_scripts,e),{source1:d.url});a.fromJSON(i),g&&(g.value(e),h.updateSize(a))}},n=function(a,b){var c,d,e=a.dom.select("img[data-mce-object]");for(c=0;c<b.length;c++)for(d=e.length-1;d>=0;d--)b[c]===e[d]&&e.splice(d,1);a.selection.select(e[0])},o=function(a,b){var c=a.dom.select("img[data-mce-object]");a.insertContent(b),n(a,c),a.nodeChanged()},p=function(a,b){var e=a.toJSON();e.embed=c.updateHtml(e.embed,e),e.embed?o(b,e.embed):d.getEmbedHtml(b,e).then(function(a){o(b,a.html)})["catch"](j(b))},q=function(a,b){f.each(b,function(b,c){a.find("#"+c).value(b)})},r=function(a){var e,g,n=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){d.getEmbedHtml(a,e.toJSON()).then(m(e,a))["catch"](j(a))},1)},onchange:function(b){d.getEmbedHtml(a,e.toJSON()).then(m(e,a))["catch"](j(a)),q(e,b.meta)},onbeforecall:function(a){a.meta=e.toJSON()}}],o=[],r=function(a){a(e),g=e.toJSON(),e.find("#embed").value(c.updateHtml(g.embed,g))};if(a.settings.media_alt_source!==!1&&o.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),a.settings.media_poster!==!1&&o.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),a.settings.media_dimensions!==!1){var s=h.createUi(r);n.push(s)}g=k(a);var t={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:l(a),multiline:!0,rows:5,label:"Source"},u=function(){g=f.extend({},b.htmlToData(a.settings.media_scripts,this.value())),this.parent().parent().fromJSON(g)};t[i]=u,e=a.windowManager.open({title:"Insert/edit media",data:g,bodyType:"tabpanel",body:[{title:"General",type:"form",items:n},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},t]},{title:"Advanced",type:"form",items:o}],onSubmit:function(){h.updateSize(e),p(e,a)}}),h.syncSize(e)};return{showDialog:r}}),g("0",["1","2","3","4","5","6","7"],function(a,b,c,d,e,f,g){var h=function(b){b.on("ResolveName",function(a){var b;1===a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),b.on("preInit",function(){var f=b.schema.getSpecialElements();c.each("video audio iframe object".split(" "),function(a){f[a]=new RegExp("</"+a+"[^>]*>","gi")});var g=b.schema.getBoolAttrs();c.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){g[a]={}}),b.parser.addNodeFilter("iframe,video,audio,object,embed,script",d.placeHolderConverter(b)),b.serializer.addAttributeFilter("data-mce-object",function(c,d){for(var f,g,h,i,j,k,l,m,n=c.length;n--;)if(f=c[n],f.parent){for(l=f.attr(d),g=new a(l,1),"audio"!==l&&"script"!==l&&(m=f.attr("class"),m&&m.indexOf("mce-preview-object")!==-1?g.attr({width:f.firstChild.attr("width"),height:f.firstChild.attr("height")}):g.attr({width:f.attr("width"),height:f.attr("height")})),g.attr({style:f.attr("style")}),i=f.attributes,h=i.length;h--;){var o=i[h].name;0===o.indexOf("data-mce-p-")&&g.attr(o.substr(11),i[h].value)}"script"===l&&g.attr("type","text/javascript"),j=f.attr("data-mce-html"),j&&(k=new a("#text",3),k.raw=!0,k.value=e.sanitize(b,unescape(j)),g.append(k)),f.replace(g)}})}),b.on("click keyup",function(){var a=b.selection.getNode();a&&b.dom.hasClass(a,"mce-preview-object")&&b.dom.getAttrib(a,"data-mce-selected")&&a.setAttribute("data-mce-selected","2")}),b.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");"audio"!==b&&"script"!==b||a.preventDefault()}),b.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(f.updateHtml(b,{width:a.width,height:a.height})))))}),this.showDialog=function(){g.showDialog(b)},b.addButton("media",{tooltip:"Insert/edit media",onclick:this.showDialog,stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),b.addMenuItem("media",{icon:"media",text:"Media",onclick:this.showDialog,context:"insert",prependToContext:!0}),b.on("setContent",function(){b.$("span.mce-preview-object").each(function(a,c){var d=b.$(c);0===d.find("span.mce-shim",c).length&&d.append('<span class="mce-shim"></span>')})}),b.addCommand("mceMedia",this.showDialog)};return b.add("media",h),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("nonbreaking",function(e){var t=e.getParam("nonbreaking_force_tab");if(e.addCommand("mceNonBreaking",function(){e.insertContent(e.plugins.visualchars&&e.plugins.visualchars.state?'<span class="mce-nbsp">&nbsp;</span>':"&nbsp;"),e.dom.setAttrib(e.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),e.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),e.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),t){var n=+t>1?+t:3;e.on("keydown",function(t){if(9==t.keyCode){if(t.shiftKey)return;t.preventDefault();for(var r=0;r<n;r++)e.execCommand("mceNonBreaking")}})}});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("2",tinymce.util.Tools.resolve),g("1",["2"],function(a){return a("tinymce.PluginManager")}),g("0",["1"],function(a){return a.add("nonbreaking",function(a){var b=a.getParam("nonbreaking_force_tab");if(a.addCommand("mceNonBreaking",function(){a.insertContent(a.plugins.visualchars&&a.plugins.visualchars.state?'<span class="mce-nbsp">&nbsp;</span>':"&nbsp;"),a.dom.setAttrib(a.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),a.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),a.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),b){var c=+b>1?+b:3;a.on("keydown",function(b){if(9==b.keyCode){if(b.shiftKey)return;b.preventDefault();for(var d=0;d<c;d++)a.execCommand("mceNonBreaking")}})}}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("noneditable",function(e){function t(e){return function(t){return(" "+t.attr("class")+" ").indexOf(e)!==-1}}function n(t){function n(t){var n=arguments,r=n[n.length-2],i=r>0?a.charAt(r-1):"";if('"'===i)return t;if(">"===i){var o=a.lastIndexOf("<",r);if(o!==-1){var l=a.substring(o,r);if(l.indexOf('contenteditable="false"')!==-1)return t}}return'<span class="'+s+'" data-mce-content="'+e.dom.encode(n[0])+'">'+e.dom.encode("string"==typeof n[1]?n[1]:n[0])+"</span>"}var r=o.length,a=t.content,s=tinymce.trim(i);if("raw"!=t.format){for(;r--;)a=a.replace(o[r],n);t.content=a}}var r,i,o,a="contenteditable";r=" "+tinymce.trim(e.getParam("noneditable_editable_class","mceEditable"))+" ",i=" "+tinymce.trim(e.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";var s=t(r),l=t(i);o=e.getParam("noneditable_regexp"),o&&!o.length&&(o=[o]),e.on("PreInit",function(){o&&e.on("BeforeSetContent",n),e.parser.addAttributeFilter("class",function(e){for(var t,n=e.length;n--;)t=e[n],s(t)?t.attr(a,"true"):l(t)&&t.attr(a,"false")}),e.serializer.addAttributeFilter(a,function(e){for(var t,n=e.length;n--;)t=e[n],(s(t)||l(t))&&(o&&t.attr("data-mce-content")?(t.name="#text",t.type=3,t.raw=!0,t.value=t.attr("data-mce-content")):t.attr(a,null))})})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2"],function(a,b){return a.add("noneditable",function(a){function c(a){return function(b){return(" "+b.attr("class")+" ").indexOf(a)!==-1}}function d(c){function d(b){var c=arguments,d=c[c.length-2],e=d>0?h.charAt(d-1):"";if('"'===e)return b;if(">"===e){var f=h.lastIndexOf("<",d);if(f!==-1){var g=h.substring(f,d);if(g.indexOf('contenteditable="false"')!==-1)return b}}return'<span class="'+i+'" data-mce-content="'+a.dom.encode(c[0])+'">'+a.dom.encode("string"==typeof c[1]?c[1]:c[0])+"</span>"}var e=g.length,h=c.content,i=b.trim(f);if("raw"!=c.format){for(;e--;)h=h.replace(g[e],d);c.content=h}}var e,f,g,h="contenteditable";e=" "+b.trim(a.getParam("noneditable_editable_class","mceEditable"))+" ",f=" "+b.trim(a.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";var i=c(e),j=c(f);g=a.getParam("noneditable_regexp"),g&&!g.length&&(g=[g]),a.on("PreInit",function(){g&&a.on("BeforeSetContent",d),a.parser.addAttributeFilter("class",function(a){for(var b,c=a.length;c--;)b=a[c],i(b)?b.attr(h,"true"):j(b)&&b.attr(h,"false")}),a.serializer.addAttributeFilter(h,function(a){for(var b,c=a.length;c--;)b=a[c],(i(b)||j(b))&&(g&&b.attr("data-mce-content")?(b.name="#text",b.type=3,b.raw=!0,b.value=b.attr("data-mce-content")):b.attr(h,null))})})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("pagebreak",function(e){var t="mce-pagebreak",n=e.getParam("pagebreak_separator","<!-- pagebreak -->"),r=new RegExp(n.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),i='<img src="'+tinymce.Env.transparentSrc+'" class="'+t+'" data-mce-resize="false" data-mce-placeholder />';e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+i+"</p>"):e.insertContent(i)}),e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),e.on("ResolveName",function(n){"IMG"==n.target.nodeName&&e.dom.hasClass(n.target,t)&&(n.name="pagebreak")}),e.on("click",function(n){n=n.target,"IMG"===n.nodeName&&e.dom.hasClass(n,t)&&e.selection.select(n)}),e.on("BeforeSetContent",function(e){e.content=e.content.replace(r,i)}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(t){for(var r,i,o=t.length;o--;)if(r=t[o],i=r.attr("class"),i&&i.indexOf("mce-pagebreak")!==-1){var a=r.parent;if(e.schema.getBlockElements()[a.name]&&e.settings.pagebreak_split_block){a.type=3,a.value=n,a.raw=!0,r.remove();continue}r.type=3,r.value=n,r.raw=!0}})})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("2",["3"],function(a){return a("tinymce.Env")}),g("0",["1","2"],function(a,b){return a.add("pagebreak",function(a){var c="mce-pagebreak",d=a.getParam("pagebreak_separator","<!-- pagebreak -->"),e=new RegExp(d.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return"\\"+a}),"gi"),f='<img src="'+b.transparentSrc+'" class="'+c+'" data-mce-resize="false" data-mce-placeholder />';a.addCommand("mcePageBreak",function(){a.settings.pagebreak_split_block?a.insertContent("<p>"+f+"</p>"):a.insertContent(f)}),a.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),a.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),a.on("ResolveName",function(b){"IMG"==b.target.nodeName&&a.dom.hasClass(b.target,c)&&(b.name="pagebreak")}),a.on("click",function(b){b=b.target,"IMG"===b.nodeName&&a.dom.hasClass(b,c)&&a.selection.select(b)}),a.on("BeforeSetContent",function(a){a.content=a.content.replace(e,f)}),a.on("PreInit",function(){a.serializer.addNodeFilter("img",function(b){for(var c,e,f=b.length;f--;)if(c=b[f],e=c.attr("class"),e&&e.indexOf("mce-pagebreak")!==-1){var g=c.parent;if(a.schema.getBlockElements()[g.name]&&a.settings.pagebreak_split_block){g.type=3,g.value=d,g.raw=!0,c.remove();continue}c.type=3,c.value=d,c.raw=!0}})})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- !function(e,t){"use strict";function n(e,t){for(var n,r=[],o=0;o<e.length;++o){if(n=a[e[o]]||i(e[o]),!n)throw"module definition dependecy not found: "+e[o];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){a[e]=i.apply(null,arguments)})}function i(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function o(n){var r,i,o,s,l;for(r=0;r<n.length;r++){i=e,o=n[r],s=o.split(/[.\/]/);for(var c=0;c<s.length-1;++c)i[s[c]]===t&&(i[s[c]]={}),i=i[s[c]];i[s[s.length-1]]=a[o]}if(e.AMDLC_TESTS){l=e.privateModules||{};for(o in a)l[o]=a[o];for(r=0;r<n.length;r++)delete l[n[r]];e.privateModules=l}}var a={};r("tinymce/pasteplugin/Utils",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema"],function(e,t,n){function r(t,n){return e.each(n,function(e){t=e.constructor==RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function i(i){function o(e){var t=e.name,n=e;if("br"===t)return void(l+="\n");if(c[t]&&(l+=" "),u[t])return void(l+=" ");if(3==e.type&&(l+=e.value),!e.shortEnded&&(e=e.firstChild))do o(e);while(e=e.next);d[t]&&n.next&&(l+="\n","p"==t&&(l+="\n"))}var a=new n,s=new t({},a),l="",c=a.getShortEndedElements(),u=e.makeMap("script noscript style textarea video audio iframe object"," "),d=a.getBlockElements();return i=r(i,[/<!\[[^\]]+\]>/g]),o(s.parse(i)),l}function o(e){function t(e,t,n){return t||n?"\xa0":" "}return e=r(s(e),[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,t],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function a(e){var t=0;return function(){return e+t++}}var s=function(e){var t="<!--StartFragment-->",n="<!--EndFragment-->",r=e.indexOf(t);if(r!==-1){var i=e.substr(r+t.length),o=i.indexOf(n);if(o!==-1&&/^<\/(p|h[1-6]|li)>/i.test(i.substr(o+n.length,5)))return i.substr(0,o)}return e};return{filter:r,innerText:i,trimHtml:o,createIdGenerator:a}}),r("tinymce/pasteplugin/SmartPaste",["tinymce/util/Tools"],function(e){var t=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},n=function(e){return t(e)&&/.(gif|jpe?g|png)$/.test(e)},r=function(e,t,n){return e.undoManager.extra(function(){n(e,t)},function(){e.insertContent('<img src="'+t+'">')}),!0},i=function(e,t,n){return e.undoManager.extra(function(){n(e,t)},function(){e.execCommand("mceInsertLink",!1,t)}),!0},o=function(e,n,r){return!(e.selection.isCollapsed()!==!1||!t(n))&&i(e,n,r)},a=function(e,t,i){return!!n(t)&&r(e,t,i)},s=function(e,t){return e.insertContent(t,{merge:e.settings.paste_merge_formats!==!1,paste:!0}),!0},l=function(t,n){e.each([o,a,s],function(e){return e(t,n,s)!==!0})},c=function(e,t){e.settings.smart_paste===!1?s(e,t):l(e,t)};return{isImageUrl:n,isAbsoluteUrl:t,insertContent:c}}),r("tinymce/pasteplugin/Clipboard",["tinymce/Env","tinymce/dom/RangeUtils","tinymce/util/VK","tinymce/pasteplugin/Utils","tinymce/pasteplugin/SmartPaste","tinymce/util/Delay"],function(e,t,n,r,i,o){return function(a){function s(e){var t,n=a.dom;if(t=a.fire("BeforePastePreProcess",{content:e}),t=a.fire("PastePreProcess",t),e=t.content,!t.isDefaultPrevented()){if(a.hasEventListeners("PastePostProcess")&&!t.isDefaultPrevented()){var r=n.add(a.getBody(),"div",{style:"display:none"},e);t=a.fire("PastePostProcess",{node:r}),n.remove(r),e=t.node.innerHTML}t.isDefaultPrevented()||i.insertContent(a,e)}}function l(e){e=a.dom.encode(e).replace(/\r\n/g,"\n");var t,n=a.dom.getParent(a.selection.getStart(),a.dom.isBlock),i=a.settings.forced_root_block;i&&(t=a.dom.createHTML(i,a.settings.forced_root_block_attrs),t=t.substr(0,t.length-3)+">"),n&&/^(PRE|DIV)$/.test(n.nodeName)||!i?e=r.filter(e,[[/\n/g,"<br>"]]):(e=r.filter(e,[[/\n\n/g,"</p>"+t],[/^(.*<\/p>)(<p>)$/,t+"$1"],[/\n/g,"<br />"]]),e.indexOf("<p>")!=-1&&(e=t+e)),s(e)}function c(){function t(e){var t,n,i,o=e.startContainer;if(t=e.getClientRects(),t.length)return t[0];if(e.collapsed&&1==o.nodeType){for(i=o.childNodes[S.startOffset];i&&3==i.nodeType&&!i.data.length;)i=i.nextSibling;if(i)return"BR"==i.tagName&&(n=r.doc.createTextNode("\ufeff"),i.parentNode.insertBefore(n,i),e=r.createRng(),e.setStartBefore(n),e.setEndAfter(n),t=e.getClientRects(),r.remove(n)),t.length?t[0]:void 0}}var n,r=a.dom,i=a.getBody(),o=a.dom.getViewPort(a.getWin()),s=o.y,l=20;if(S=a.selection.getRng(),a.inline&&(n=a.selection.getScrollContainer(),n&&n.scrollTop>0&&(s=n.scrollTop)),S.getClientRects){var c=t(S);if(c)l=s+(c.top-r.getPos(i).y);else{l=s;var u=S.startContainer;u&&(3==u.nodeType&&u.parentNode!=i&&(u=u.parentNode),1==u.nodeType&&(l=r.getPos(u,n||i).y))}}k=r.add(a.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+l+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},A),(e.ie||e.gecko)&&r.setStyle(k,"left","rtl"==r.getStyle(i,"direction",!0)?65535:-65535),r.bind(k,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),k.focus(),a.selection.select(k,!0)}function u(){if(k){for(var e;e=a.dom.get("mcepastebin");)a.dom.remove(e),a.dom.unbind(e);S&&a.selection.setRng(S)}k=S=null}function d(){var e,t,n,r,i="";for(e=a.dom.select("div[id=mcepastebin]"),t=0;t<e.length;t++)n=e[t],n.firstChild&&"mcepastebin"==n.firstChild.id&&(n=n.firstChild),r=n.innerHTML,i!=A&&(i+=r);return i}function f(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&n.length>0&&n.indexOf(B)==-1&&(t["text/plain"]=n)}if(e.types)for(var r=0;r<e.types.length;r++){var i=e.types[r];t[i]=e.getData(i)}}return t}function p(e){return f(e.clipboardData||a.getDoc().dataTransfer)}function m(e){return C(e,"text/html")||C(e,"text/plain")}function g(e){var t;return t=e.indexOf(","),t!==-1?e.substr(t+1):null}function h(e,t){return!e.images_dataimg_filter||e.images_dataimg_filter(t)}function v(e,t,n){e&&(a.selection.setRng(e),e=null);var r=t.result,i=g(r),o=new Image;if(o.src=r,h(a.settings,o)){var l,c,u=a.editorUpload.blobCache;c=u.findFirst(function(e){return e.base64()===i}),c?l=c:(l=u.create(P(),n,i),u.add(l)),s('<img src="'+l.blobUri()+'">')}else s('<img src="'+r+'">')}function b(e,t){function n(n){var r,i,o,a=!1;if(n)for(r=0;r<n.length;r++)if(i=n[r],/^image\/(jpeg|png|gif|bmp)$/.test(i.type)){var s=i.getAsFile?i.getAsFile():i;o=new FileReader,o.onload=v.bind(null,t,o,s),o.readAsDataURL(s),e.preventDefault(),a=!0}return a}var r=e.clipboardData||e.dataTransfer;if(a.settings.paste_data_images&&r)return n(r.items)||n(r.files)}function y(e){var t=e.clipboardData;return navigator.userAgent.indexOf("Android")!=-1&&t&&t.items&&0===t.items.length}function x(e){return t.getCaretRangeFromPoint(e.clientX,e.clientY,a.getDoc())}function C(e,t){return t in e&&e[t].length>0}function w(e){return n.metaKeyPressed(e)&&86==e.keyCode||e.shiftKey&&45==e.keyCode}function N(){function t(e,t,n){var i;return C(e,"text/html")?i=e["text/html"]:(i=d(),i==A&&(n=!0)),i=r.trimHtml(i),k&&k.firstChild&&"mcepastebin"===k.firstChild.id&&(n=!0),u(),i.length||(n=!0),n&&(i=C(e,"text/plain")&&i.indexOf("</p>")==-1?e["text/plain"]:r.innerText(i)),i==A?void(t||a.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(n?l(i):s(i))}function n(e){var t=e["text/plain"];return!!t&&0===t.indexOf("file://")}a.on("keydown",function(t){function n(e){w(e)&&!e.isDefaultPrevented()&&u()}if(w(t)&&!t.isDefaultPrevented()){if(_=t.shiftKey&&86==t.keyCode,_&&e.webkit&&navigator.userAgent.indexOf("Version/")!=-1)return;if(t.stopImmediatePropagation(),T=(new Date).getTime(),e.ie&&_)return t.preventDefault(),void a.fire("paste",{ieFake:!0});u(),c(),a.once("keyup",n),a.once("paste",function(){a.off("keyup",n)})}});var i=function(){return S||a.selection.getRng()};a.on("paste",function(n){var r=(new Date).getTime(),s=p(n),l=(new Date).getTime()-r,f=(new Date).getTime()-T-l<1e3,g="text"==E.pasteFormat||_;return _=!1,n.isDefaultPrevented()||y(n)?void u():!m(s)&&b(n,i())?void u():(f||n.preventDefault(),!e.ie||f&&!n.ieFake||(c(),a.dom.bind(k,"paste",function(e){e.stopPropagation()}),a.getDoc().execCommand("Paste",!1,null),s["text/html"]=d()),void(C(s,"text/html")?(n.preventDefault(),t(s,f,g)):o.setEditorTimeout(a,function(){t(s,f,g)},0)))}),a.on("dragstart dragend",function(e){R="dragstart"==e.type}),a.on("drop",function(e){var t,i;if(i=x(e),!e.isDefaultPrevented()&&!R&&(t=f(e.dataTransfer),(m(t)&&!n(t)||!b(e,i))&&i&&a.settings.paste_filter_drop!==!1)){var c=t["mce-internal"]||t["text/html"]||t["text/plain"];c&&(e.preventDefault(),o.setEditorTimeout(a,function(){a.undoManager.transact(function(){t["mce-internal"]&&a.execCommand("Delete"),a.selection.setRng(i),c=r.trimHtml(c),t["text/html"]?s(c):l(c)})}))}}),a.on("dragover dragend",function(e){a.settings.paste_data_images&&e.preventDefault()})}var k,S,_,E=this,T=0,R=!1,A="%MCEPASTEBIN%",B="data:text/mce-internal,",P=r.createIdGenerator("mceclip");E.pasteHtml=s,E.pasteText=l,E.pasteImageData=b,a.on("preInit",function(){N(),a.parser.addNodeFilter("img",function(t,n,r){function i(e){return e.data&&e.data.paste===!0}function o(t){t.attr("data-mce-object")||u===e.transparentSrc||t.remove()}function s(e){return 0===e.indexOf("webkit-fake-url")}function l(e){return 0===e.indexOf("data:")}if(!a.settings.paste_data_images&&i(r))for(var c=t.length;c--;){var u=t[c].attributes.map.src;u&&(s(u)?o(t[c]):!a.settings.allow_html_data_urls&&l(u)&&o(t[c]))}})})}}),r("tinymce/pasteplugin/WordFilter",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema","tinymce/html/Serializer","tinymce/html/Node","tinymce/pasteplugin/Utils"],function(e,t,n,r,i,o){function a(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function s(t){var n,r;return r=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],t=t.replace(/^[\u00a0 ]+/,""),e.each(r,function(e){if(e.test(t))return n=!0,!1}),n}function l(e){return/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(e)}function c(c){var u=c.settings;c.on("BeforePastePreProcess",function(d){function f(e){function t(e){var n="";if(3===e.type)return e.value;if(e=e.firstChild)do n+=t(e);while(e=e.next);return n}function n(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do if(!n(e,t))return!1;while(e=e.next);return!0}function r(e){if(e._listIgnore)return void e.remove();if(e=e.firstChild)do r(e);while(e=e.next)}function o(e,t,o){var s=e._listLevel||u;s!=u&&(s<u?a&&(a=a.parent.parent):(c=a,a=null)),a&&a.name==t?a.append(e):(c=c||a,a=new i(t,1),o>1&&a.attr("start",""+o),e.wrap(a)),e.name="li",s>u&&c&&c.lastChild.append(a),u=s,r(e),n(e,/^\u00a0+/),n(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),n(e,/^\u00a0+/)}for(var a,c,u=1,d=[],f=e.firstChild;"undefined"!=typeof f&&null!==f;)if(d.push(f),f=f.walk(),null!==f)for(;"undefined"!=typeof f&&f.parent!==e;)f=f.walk();for(var p=0;p<d.length;p++)if(e=d[p],"p"==e.name&&e.firstChild){var m=t(e);if(l(m)){o(e,"ul");continue}if(s(m)){var g=/([0-9]+)\./.exec(m),h=1;g&&(h=parseInt(g[1],10)),o(e,"ol",h);continue}if(e._listLevel){o(e,"ul",1);continue}a=null}else c=a,a=null}function p(t,n){var r,o={},a=c.dom.parseStyle(n);return e.each(a,function(e,i){switch(i){case"mso-list":r=/\w+ \w+([0-9]+)/i.exec(n),r&&(t._listLevel=parseInt(r[1],10)),/Ignore/i.test(e)&&t.firstChild&&(t._listIgnore=!0,t.firstChild._listIgnore=!0);break;case"horiz-align":i="text-align";break;case"vert-align":i="vertical-align";break;case"font-color":case"mso-foreground":i="color";break;case"mso-background":case"mso-highlight":i="background";break;case"font-weight":case"font-style":return void("normal"!=e&&(o[i]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void t.remove()}return 0===i.indexOf("mso-comment")?void t.remove():void(0!==i.indexOf("mso-")&&("all"==m||g&&g[i])&&(o[i]=e))}),/(bold)/i.test(o["font-weight"])&&(delete o["font-weight"],t.wrap(new i("b",1))),/(italic)/i.test(o["font-style"])&&(delete o["font-style"],t.wrap(new i("i",1))),o=c.dom.serializeStyle(o,t.name),o?o:null}var m,g,h=d.content;if(h=h.replace(/<b[^>]+id="?docs-internal-[^>]*>/gi,""),h=h.replace(/<br class="?Apple-interchange-newline"?>/gi,""),m=u.paste_retain_style_properties,m&&(g=e.makeMap(m.split(/[, ]/))),u.paste_enable_default_filters!==!1&&a(d.content)){d.wordContent=!0,h=o.filter(h,[/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var v=u.paste_word_valid_elements;v||(v="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody");var b=new n({valid_elements:v,valid_children:"-li[p]"});e.each(b.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var y=new t({},b);y.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)t=e[n],t.attr("style",p(t,t.attr("style"))),"span"==t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),y.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)t=e[r],n=t.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),y.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),y.addNodeFilter("a",function(e){for(var t,n,r,i=e.length;i--;)if(t=e[i],n=t.attr("href"),r=t.attr("name"),n&&n.indexOf("#_msocom_")!=-1)t.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1],n&&(n="#"+n)),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){t.unwrap();continue}t.attr({href:n,name:r})}else t.unwrap()});var x=y.parse(h);u.paste_convert_word_fake_lists!==!1&&f(x),d.content=new r({validate:u.validate},b).serialize(x)}})}return c.isWordContent=a,c}),r("tinymce/pasteplugin/Quirks",["tinymce/Env","tinymce/util/Tools","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Utils"],function(e,t,n,r){return function(i){function o(e){i.on("BeforePastePreProcess",function(t){t.content=e(t.content)})}function a(e){i.on("PastePostProcess",function(t){e(t.node)})}function s(e){if(!n.isWordContent(e))return e;var o=[];t.each(i.schema.getBlockElements(),function(e,t){o.push(t)});var a=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+o.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return e=r.filter(e,[[a,"$1"]]),e=r.filter(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function l(e){if(n.isWordContent(e))return e;var t=i.settings.paste_webkit_styles;if(i.settings.paste_remove_styles_if_webkit===!1||"all"==t)return e;if(t&&(t=t.split(/[, ]/)),t){var r=i.dom,o=i.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,n,i,a){var s=r.parseStyle(i,"span"),l={};if("none"===t)return n+a;for(var c=0;c<t.length;c++){var u=s[t[c]],d=r.getStyle(o,t[c],!0);/color/.test(t[c])&&(u=r.toHex(u),d=r.toHex(d)),d!=u&&(l[t[c]]=u)}return l=r.serializeStyle(l,"span"),l?n+' style="'+l+'"'+a:n+a})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r})}function c(e){i.$("a",e).find("font,u").each(function(e,t){i.dom.remove(t,!0)})}e.webkit&&o(l),e.ie&&(o(s),a(c))}}),r("tinymce/pasteplugin/Plugin",["tinymce/PluginManager","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks"],function(e,t,n,r){var i;e.add("paste",function(o){function a(){return i||o.settings.paste_plaintext_inform===!1}function s(){if("text"==c.pasteFormat)c.pasteFormat="html",o.fire("PastePlainTextToggle",{state:!1});else if(c.pasteFormat="text",o.fire("PastePlainTextToggle",{state:!0}),!a()){var e=o.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");o.notificationManager.open({text:e,type:"info"}),i=!0}o.focus()}function l(){var e=this;e.active("text"===c.pasteFormat),o.on("PastePlainTextToggle",function(t){e.active(t.state)})}var c,u=this,d=o.settings;return/(^|[ ,])powerpaste([, ]|$)/.test(d.plugins)&&e.get("powerpaste")?void("undefined"!=typeof console&&console.log&&console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option.")):(u.clipboard=c=new t(o),u.quirks=new r(o),u.wordFilter=new n(o),o.settings.paste_as_text&&(u.clipboard.pasteFormat="text"),d.paste_preprocess&&o.on("PastePreProcess",function(e){d.paste_preprocess.call(u,u,e)}),d.paste_postprocess&&o.on("PastePostProcess",function(e){d.paste_postprocess.call(u,u,e)}),o.addCommand("mceInsertClipboardContent",function(e,t){t.content&&u.clipboard.pasteHtml(t.content),t.text&&u.clipboard.pasteText(t.text)}),o.settings.paste_block_drop&&o.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),o.settings.paste_data_images||o.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()}),o.addCommand("mceTogglePlainTextPaste",s),o.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:s,onPostRender:l}),void o.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:c.pasteFormat,onclick:s,onPostRender:l}))})}),o(["tinymce/pasteplugin/Utils"])}(window);
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){return a("tinymce.PluginManager")}),g("7",["6"],function(a){return a("tinymce.dom.RangeUtils")}),g("8",["6"],function(a){return a("tinymce.Env")}),g("9",["6"],function(a){return a("tinymce.util.Delay")}),g("a",["6"],function(a){return a("tinymce.util.Tools")}),g("b",["6"],function(a){return a("tinymce.util.VK")}),g("c",[],function(){var a="x-tinymce/html",b="<!-- "+a+" -->",c=function(a){return b+a},d=function(a){return a.replace(b,"")},e=function(a){return a.indexOf(b)!==-1};return{mark:c,unmark:d,isMarked:e,internalHtmlMime:function(){return a}}}),g("g",["6"],function(a){return a("tinymce.html.DomParser")}),g("h",["6"],function(a){return a("tinymce.html.Schema")}),g("d",["a","g","h"],function(a,b,c){function d(b,c){return a.each(c,function(a){b=a.constructor==RegExp?b.replace(a,""):b.replace(a[0],a[1])}),b}function e(e){function f(a){var b=a.name,c=a;if("br"===b)return void(i+="\n");if(j[b]&&(i+=" "),k[b])return void(i+=" ");if(3==a.type&&(i+=a.value),!a.shortEnded&&(a=a.firstChild))do f(a);while(a=a.next);l[b]&&c.next&&(i+="\n","p"==b&&(i+="\n"))}var g=new c,h=new b({},g),i="",j=g.getShortEndedElements(),k=a.makeMap("script noscript style textarea video audio iframe object"," "),l=g.getBlockElements();return e=d(e,[/<!\[[^\]]+\]>/g]),f(h.parse(e)),i}function f(a){function b(a,b,c){return b||c?"\xa0":" "}return a=d(a,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,b],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function g(a){var b=0;return function(){return a+b++}}var h=function(){return navigator.userAgent.indexOf(" Edge/")!==-1};return{filter:d,innerText:e,trimHtml:f,createIdGenerator:g,isMsEdge:h}}),g("3",["8","c","d"],function(a,b,c){var d=function(){},e=function(b){return a.iOS===!1&&void 0!==b&&"function"==typeof b.setData&&c.isMsEdge()!==!0},f=function(a,c,d){if(!e(a))return!1;try{return a.clearData(),a.setData("text/html",c),a.setData("text/plain",d),a.setData(b.internalHtmlMime(),c),!0}catch(a){return!1}},g=function(a,b,c,d){f(a.clipboardData,b.html,b.text)?(a.preventDefault(),d()):c(b.html,d)},h=function(a){return function(c,d){var e=b.mark(c),f=a.dom.create("div",{contenteditable:"false"}),g=a.dom.create("div",{contenteditable:"true"},e);a.dom.setStyles(f,{position:"fixed",left:"-3000px",width:"1000px",overflow:"hidden"}),f.appendChild(g),a.dom.add(a.getBody(),f);var h=a.selection.getRng();g.focus();var i=a.dom.createRng();i.selectNodeContents(g),a.selection.setRng(i),setTimeout(function(){f.parentNode.removeChild(f),a.selection.setRng(h),d()},0)}},i=function(a){return{html:a.selection.getContent(),text:a.selection.getContent({format:"text"})}},j=function(a){return function(b){a.selection.isCollapsed()===!1&&g(b,i(a),h(a),function(){a.execCommand("Delete")})}},k=function(a){return function(b){a.selection.isCollapsed()===!1&&g(b,i(a),h(a),d)}},l=function(a){a.on("cut",j(a)),a.on("copy",k(a))};return{register:l}}),g("k",["6"],function(a){return a("tinymce.html.Entities")}),g("e",["k"],function(a){var b=function(a){return!/<(?:(?!\/?(?:div|p|br))[^>]*|(?:div|p|br)\s+\w[^>]+)>/.test(a)},c=function(a){return a.replace(/\r?\n/g,"<br>")},d=function(b,c){var d,e=[],f="<"+b;if("object"==typeof c){for(d in c)c.hasOwnProperty(d)&&e.push(d+'="'+a.encodeAllRaw(c[d])+'"');e.length&&(f+=" "+e.join(" "))}return f+">"},e=function(a,b,c){var e,f,g,h=a.split(/\r?\n/),i=0,j=h.length,k=[],l=[],m=d(b,c),n="</"+b+">";if(1===h.length)return a;for(;i<j;i++)e=i===j-1,f=!e&&!h[i+1],g=!h[i]&&!k.length,k.push(h[i]?h[i]:"&nbsp;"),(e||f||g)&&(l.push(k.join("<br>")),k=[]),f&&i++;return 1===l.length?l[0]:m+l.join(n+m)+n},f=function(a,b,d){return b?e(a,b,d):c(a)};return{isPlainText:b,convert:f,toBRs:c,toBlockElements:e}}),g("f",["a"],function(a){var b=function(a){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(a)},c=function(a){return b(a)&&/.(gif|jpe?g|png)$/.test(a)},d=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.insertContent('<img src="'+b+'">')}),!0},e=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.execCommand("mceInsertLink",!1,b)}),!0},f=function(a,c,d){return!(a.selection.isCollapsed()!==!1||!b(c))&&e(a,c,d)},g=function(a,b,e){return!!c(b)&&d(a,b,e)},h=function(a,b){return a.insertContent(b,{merge:a.settings.paste_merge_formats!==!1,paste:!0}),!0},i=function(b,c){a.each([f,g,h],function(a){return a(b,c,h)!==!0})},j=function(a,b){a.settings.smart_paste===!1?h(a,b):i(a,b)};return{isImageUrl:c,isAbsoluteUrl:b,insertContent:j}}),g("2",["7","8","9","a","b","3","c","e","f","d"],function(a,b,c,d,e,f,g,h,i,j){return function(f){function k(a,b){var c,d,e=f.dom;if(d=b||g.isMarked(a),a=g.unmark(a),c=f.fire("BeforePastePreProcess",{content:a,internal:d}),c=f.fire("PastePreProcess",c),a=c.content,!c.isDefaultPrevented()){if(f.hasEventListeners("PastePostProcess")&&!c.isDefaultPrevented()){var h=e.add(f.getBody(),"div",{style:"display:none"},a);c=f.fire("PastePostProcess",{node:h,internal:d}),e.remove(h),a=c.node.innerHTML}c.isDefaultPrevented()||i.insertContent(f,a)}}function l(a){a=f.dom.encode(a).replace(/\r\n/g,"\n"),a=h.convert(a,f.settings.forced_root_block,f.settings.forced_root_block_attrs),k(a,!1)}function m(){function a(a){var b,c,e,f=a.startContainer;if(b=a.getClientRects(),b.length)return b[0];if(a.collapsed&&1==f.nodeType){for(e=f.childNodes[C.startOffset];e&&3==e.nodeType&&!e.data.length;)e=e.nextSibling;if(e)return"BR"==e.tagName&&(c=d.doc.createTextNode("\ufeff"),e.parentNode.insertBefore(c,e),a=d.createRng(),a.setStartBefore(c),a.setEndAfter(c),b=a.getClientRects(),d.remove(c)),b.length?b[0]:void 0}}var c,d=f.dom,e=f.getBody(),g=f.dom.getViewPort(f.getWin()),h=g.y,i=20;if(C=f.selection.getRng(),f.inline&&(c=f.selection.getScrollContainer(),c&&c.scrollTop>0&&(h=c.scrollTop)),C.getClientRects){var j=a(C);if(j)i=h+(j.top-d.getPos(e).y);else{i=h;var k=C.startContainer;k&&(3==k.nodeType&&k.parentNode!=e&&(k=k.parentNode),1==k.nodeType&&(i=d.getPos(k,c||e).y))}}B=d.add(f.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+i+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},H),(b.ie||b.gecko)&&d.setStyle(B,"left","rtl"==d.getStyle(e,"direction",!0)?65535:-65535),d.bind(B,"beforedeactivate focusin focusout",function(a){a.stopPropagation()}),B.focus(),f.selection.select(B,!0)}function n(){if(B){for(var a;a=f.dom.get("mcepastebin");)f.dom.remove(a),f.dom.unbind(a);C&&f.selection.setRng(C)}B=C=null}function o(){var a,b,c,d,e="";for(a=f.dom.select("div[id=mcepastebin]"),b=0;b<a.length;b++)c=a[b],c.firstChild&&"mcepastebin"==c.firstChild.id&&(c=c.firstChild),d=c.innerHTML,e!=H&&(e+=d);return e}function p(a){var b={};if(a){if(a.getData){var c=a.getData("Text");c&&c.length>0&&c.indexOf(I)==-1&&(b["text/plain"]=c)}if(a.types)for(var d=0;d<a.types.length;d++){var e=a.types[d];b[e]=a.getData(e)}}return b}function q(a){var b=p(a.clipboardData||f.getDoc().dataTransfer);return j.isMsEdge()?d.extend(b,{"text/html":""}):b}function r(a){return y(a,"text/html")||y(a,"text/plain")}function s(a){var b;return b=a.indexOf(","),b!==-1?a.substr(b+1):null}function t(a,b){return!a.images_dataimg_filter||a.images_dataimg_filter(b)}function u(a,b,c){a&&(f.selection.setRng(a),a=null);var d=b.result,e=s(d),g=new Image;if(g.src=d,t(f.settings,g)){var h,i,j=f.editorUpload.blobCache;i=j.findFirst(function(a){return a.base64()===e}),i?h=i:(h=j.create(J(),c,e),j.add(h)),k('<img src="'+h.blobUri()+'">',!1)}else k('<img src="'+d+'">',!1)}function v(a,b){function c(c){var d,e,f,g=!1;if(c)for(d=0;d<c.length;d++)if(e=c[d],/^image\/(jpeg|png|gif|bmp)$/.test(e.type)){var h=e.getAsFile?e.getAsFile():e;f=new FileReader,f.onload=u.bind(null,b,f,h),f.readAsDataURL(h),a.preventDefault(),g=!0}return g}var d=a.clipboardData||a.dataTransfer;if(f.settings.paste_data_images&&d)return c(d.items)||c(d.files)}function w(a){var b=a.clipboardData;return navigator.userAgent.indexOf("Android")!=-1&&b&&b.items&&0===b.items.length}function x(b){return a.getCaretRangeFromPoint(b.clientX,b.clientY,f.getDoc())}function y(a,b){return b in a&&a[b].length>0}function z(a){return e.metaKeyPressed(a)&&86==a.keyCode||a.shiftKey&&45==a.keyCode}function A(){function a(a,b,c,d){var e,g;return y(a,"text/html")?e=a["text/html"]:(e=o(),e==H&&(c=!0)),e=j.trimHtml(e),B&&B.firstChild&&"mcepastebin"===B.firstChild.id&&(c=!0),n(),g=d===!1&&h.isPlainText(e),e.length&&!g||(c=!0),c&&(e=y(a,"text/plain")&&g?a["text/plain"]:j.innerText(e)),e==H?void(b||f.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(c?l(e):k(e,d))}function d(a){var b=a["text/plain"];return!!b&&0===b.indexOf("file://")}f.on("keydown",function(a){function c(a){z(a)&&!a.isDefaultPrevented()&&n()}if(z(a)&&!a.isDefaultPrevented()){if(D=a.shiftKey&&86==a.keyCode,D&&b.webkit&&navigator.userAgent.indexOf("Version/")!=-1)return;if(a.stopImmediatePropagation(),F=(new Date).getTime(),b.ie&&D)return a.preventDefault(),void f.fire("paste",{ieFake:!0});n(),m(),f.once("keyup",c),f.once("paste",function(){f.off("keyup",c)})}});var e=function(){return C||f.selection.getRng()};f.on("paste",function(d){var h=(new Date).getTime(),i=q(d),j=(new Date).getTime()-h,k=(new Date).getTime()-F-j<1e3,l="text"==E.pasteFormat||D,p=y(i,g.internalHtmlMime());return D=!1,d.isDefaultPrevented()||w(d)?void n():!r(i)&&v(d,e())?void n():(k||d.preventDefault(),!b.ie||k&&!d.ieFake||y(i,"text/html")||(m(),f.dom.bind(B,"paste",function(a){a.stopPropagation()}),f.getDoc().execCommand("Paste",!1,null),i["text/html"]=o()),void(y(i,"text/html")?(d.preventDefault(),a(i,k,l,p)):c.setEditorTimeout(f,function(){a(i,k,l,p)},0)))}),f.on("dragstart dragend",function(a){G="dragstart"==a.type}),f.on("drop",function(a){var b,e;if(e=x(a),!a.isDefaultPrevented()&&!G){b=p(a.dataTransfer);var h=y(b,g.internalHtmlMime());if((r(b)&&!d(b)||!v(a,e))&&e&&f.settings.paste_filter_drop!==!1){var i=b["mce-internal"]||b["text/html"]||b["text/plain"];i&&(a.preventDefault(),c.setEditorTimeout(f,function(){f.undoManager.transact(function(){b["mce-internal"]&&f.execCommand("Delete"),f.selection.setRng(e),i=j.trimHtml(i),b["text/html"]?k(i,h):l(i)})}))}}}),f.on("dragover dragend",function(a){f.settings.paste_data_images&&a.preventDefault()})}var B,C,D,E=this,F=0,G=!1,H="%MCEPASTEBIN%",I="data:text/mce-internal,",J=j.createIdGenerator("mceclip");E.pasteHtml=k,E.pasteText=l,E.pasteImageData=v,f.on("preInit",function(){A(),f.parser.addNodeFilter("img",function(a,c,d){function e(a){return a.data&&a.data.paste===!0}function g(a){a.attr("data-mce-object")||k===b.transparentSrc||a.remove()}function h(a){return 0===a.indexOf("webkit-fake-url")}function i(a){return 0===a.indexOf("data:")}if(!f.settings.paste_data_images&&e(d))for(var j=a.length;j--;){var k=a[j].attributes.map.src;k&&(h(k)?g(a[j]):!f.settings.allow_html_data_urls&&i(k)&&g(a[j]))}})})}}),g("i",["6"],function(a){return a("tinymce.html.Serializer")}),g("j",["6"],function(a){return a("tinymce.html.Node")}),g("5",["a","g","h","i","j","d"],function(a,b,c,d,e,f){function g(a){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(a)||/class="OutlineElement/.test(a)||/id="?docs\-internal\-guid\-/.test(a)}function h(b){var c,d;return d=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],b=b.replace(/^[\u00a0 ]+/,""),a.each(d,function(a){if(a.test(b))return c=!0,!1}),c}function i(a){return/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(a)}function j(j){var k=j.settings;j.on("BeforePastePreProcess",function(l){function m(a){function b(a){var c="";if(3===a.type)return a.value;if(a=a.firstChild)do c+=b(a);while(a=a.next);return c}function c(a,b){if(3===a.type&&b.test(a.value))return a.value=a.value.replace(b,""),!1;if(a=a.firstChild)do if(!c(a,b))return!1;while(a=a.next);return!0}function d(a){if(a._listIgnore)return void a.remove();if(a=a.firstChild)do d(a);while(a=a.next)}function f(a,b,f){var h=a._listLevel||k;h!=k&&(h<k?g&&(g=g.parent.parent):(j=g,g=null)),g&&g.name==b?g.append(a):(j=j||g,g=new e(b,1),f>1&&g.attr("start",""+f),a.wrap(g)),a.name="li",h>k&&j&&j.lastChild.append(g),k=h,d(a),c(a,/^\u00a0+/),c(a,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),c(a,/^\u00a0+/)}for(var g,j,k=1,l=[],m=a.firstChild;"undefined"!=typeof m&&null!==m;)if(l.push(m),m=m.walk(),null!==m)for(;"undefined"!=typeof m&&m.parent!==a;)m=m.walk();for(var n=0;n<l.length;n++)if(a=l[n],"p"==a.name&&a.firstChild){var o=b(a);if(i(o)){f(a,"ul");continue}if(h(o)){var p=/([0-9]+)\./.exec(o),q=1;p&&(q=parseInt(p[1],10)),f(a,"ol",q);continue}if(a._listLevel){f(a,"ul",1);continue}g=null}else j=g,g=null}function n(b,c){var d,f={},g=j.dom.parseStyle(c);return a.each(g,function(a,e){switch(e){case"mso-list":d=/\w+ \w+([0-9]+)/i.exec(c),d&&(b._listLevel=parseInt(d[1],10)),/Ignore/i.test(a)&&b.firstChild&&(b._listIgnore=!0,b.firstChild._listIgnore=!0);break;case"horiz-align":e="text-align";break;case"vert-align":e="vertical-align";break;case"font-color":case"mso-foreground":e="color";break;case"mso-background":case"mso-highlight":e="background";break;case"font-weight":case"font-style":return void("normal"!=a&&(f[e]=a));case"mso-element":if(/^(comment|comment-list)$/i.test(a))return void b.remove()}return 0===e.indexOf("mso-comment")?void b.remove():void(0!==e.indexOf("mso-")&&("all"==o||p&&p[e])&&(f[e]=a))}),/(bold)/i.test(f["font-weight"])&&(delete f["font-weight"],b.wrap(new e("b",1))),/(italic)/i.test(f["font-style"])&&(delete f["font-style"],b.wrap(new e("i",1))),f=j.dom.serializeStyle(f,b.name),f?f:null}var o,p,q=l.content;if(q=q.replace(/<b[^>]+id="?docs-internal-[^>]*>/gi,""),q=q.replace(/<br class="?Apple-interchange-newline"?>/gi,""),o=k.paste_retain_style_properties,o&&(p=a.makeMap(o.split(/[, ]/))),k.paste_enable_default_filters!==!1&&g(l.content)){l.wordContent=!0,q=f.filter(q,[/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(a,b){return b.length>0?b.replace(/./," ").slice(Math.floor(b.length/2)).split("").join("\xa0"):""}]]);var r=k.paste_word_valid_elements;r||(r="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody");var s=new c({valid_elements:r,valid_children:"-li[p]"});a.each(s.elements,function(a){a.attributes["class"]||(a.attributes["class"]={},a.attributesOrder.push("class")),a.attributes.style||(a.attributes.style={},a.attributesOrder.push("style"))});var t=new b({},s);t.addAttributeFilter("style",function(a){for(var b,c=a.length;c--;)b=a[c],b.attr("style",n(b,b.attr("style"))),"span"==b.name&&b.parent&&!b.attributes.length&&b.unwrap()}),t.addAttributeFilter("class",function(a){for(var b,c,d=a.length;d--;)b=a[d],c=b.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(c)&&b.remove(),b.attr("class",null)}),t.addNodeFilter("del",function(a){for(var b=a.length;b--;)a[b].remove()}),t.addNodeFilter("a",function(a){for(var b,c,d,e=a.length;e--;)if(b=a[e],c=b.attr("href"),d=b.attr("name"),c&&c.indexOf("#_msocom_")!=-1)b.remove();else if(c&&0===c.indexOf("file://")&&(c=c.split("#")[1],c&&(c="#"+c)),c||d){if(d&&!/^_?(?:toc|edn|ftn)/i.test(d)){b.unwrap();continue}b.attr({href:c,name:d})}else b.unwrap()});var u=t.parse(q);k.paste_convert_word_fake_lists!==!1&&m(u),l.content=new d({validate:k.validate},s).serialize(u)}})}return j.isWordContent=g,j}),g("4",["8","a","5","d"],function(a,b,c,d){"use strict";return function(e){function f(a){e.on("BeforePastePreProcess",function(b){b.content=a(b.content)})}function g(a){e.on("PastePostProcess",function(b){a(b.node)})}function h(a){if(!c.isWordContent(a))return a;var f=[];b.each(e.schema.getBlockElements(),function(a,b){f.push(b)});var g=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+f.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return a=d.filter(a,[[g,"$1"]]),a=d.filter(a,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function i(a){if(c.isWordContent(a))return a;var b=e.settings.paste_webkit_styles;if(e.settings.paste_remove_styles_if_webkit===!1||"all"==b)return a;if(b&&(b=b.split(/[, ]/)),b){var d=e.dom,f=e.selection.getNode();a=a.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(a,c,e,g){var h=d.parseStyle(e,"span"),i={};if("none"===b)return c+g;for(var j=0;j<b.length;j++){var k=h[b[j]],l=d.getStyle(f,b[j],!0);/color/.test(b[j])&&(k=d.toHex(k),l=d.toHex(l)),l!=k&&(i[b[j]]=k)}return i=d.serializeStyle(i,"span"),i?c+' style="'+i+'"'+g:c+g})}else a=a.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return a=a.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(a,b,c,d){return b+' style="'+c+'"'+d})}function j(a){e.$("a",a).find("font,u").each(function(a,b){e.dom.remove(b,!0)})}a.webkit&&f(i),a.ie&&(f(h),g(j))}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){var f;return a.add("paste",function(g){function h(){return f||g.settings.paste_plaintext_inform===!1}function i(){if("text"==k.pasteFormat)k.pasteFormat="html",g.fire("PastePlainTextToggle",{state:!1});else if(k.pasteFormat="text",g.fire("PastePlainTextToggle",{state:!0}),!h()){var a=g.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");g.notificationManager.open({text:a,type:"info"}),f=!0}g.focus()}function j(){var a=this;a.active("text"===k.pasteFormat),g.on("PastePlainTextToggle",function(b){a.active(b.state)})}var k,l=this,m=g.settings;return/(^|[ ,])powerpaste([, ]|$)/.test(m.plugins)&&a.get("powerpaste")?void("undefined"!=typeof console&&console.log&&console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option.")):(l.clipboard=k=new b(g),l.quirks=new d(g),l.wordFilter=new e(g),g.settings.paste_as_text&&(l.clipboard.pasteFormat="text"),m.paste_preprocess&&g.on("PastePreProcess",function(a){m.paste_preprocess.call(l,l,a)}),m.paste_postprocess&&g.on("PastePostProcess",function(a){m.paste_postprocess.call(l,l,a)}),g.addCommand("mceInsertClipboardContent",function(a,b){b.content&&l.clipboard.pasteHtml(b.content,b.internal),b.text&&l.clipboard.pasteText(b.text)}),g.settings.paste_block_drop&&g.on("dragend dragover draggesture dragdrop drop drag",function(a){a.preventDefault(),a.stopPropagation()}),g.settings.paste_data_images||g.on("drop",function(a){var b=a.dataTransfer;b&&b.files&&b.files.length>0&&a.preventDefault()}),g.addCommand("mceTogglePlainTextPaste",i),g.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:i,onPostRender:j}),g.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:k.pasteFormat,onclick:i,onPostRender:j}),void c.register(g))}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("preview",function(e){var t=e.settings,n=!tinymce.Env.ie;e.addCommand("mcePreview",function(){e.windowManager.open({title:"Preview",width:parseInt(e.getParam("plugin_preview_width","650"),10),height:parseInt(e.getParam("plugin_preview_height","500"),10),html:'<iframe src="javascript:\'\'" frameborder="0"'+(n?' sandbox="allow-scripts"':"")+"></iframe>",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var r,i="";i+='<base href="'+e.documentBaseURI.getURI()+'">',tinymce.each(e.contentCSS,function(t){i+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'">'});var o=t.body_id||"tinymce";o.indexOf("=")!=-1&&(o=e.getParam("body_id","","hash"),o=o[e.id]||o);var a=t.body_class||"";a.indexOf("=")!=-1&&(a=e.getParam("body_class","","hash"),a=a[e.id]||"");var s='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A") {e.preventDefault();}}}, false);</script> ',l=e.settings.directionality?' dir="'+e.settings.directionality+'"':"";if(r="<!DOCTYPE html><html><head>"+i+'</head><body id="'+o+'" class="mce-content-body '+a+'"'+l+">"+e.getContent()+s+"</body></html>",n)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(r);else{var c=this.getEl("body").firstChild.contentWindow.document;c.open(),c.write(r),c.close()}}})}),e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("4",tinymce.util.Tools.resolve),g("1",["4"],function(a){return a("tinymce.PluginManager")}),g("2",["4"],function(a){return a("tinymce.Env")}),g("3",["4"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2","3"],function(a,b,c){return a.add("preview",function(a){var d=a.settings,e=!b.ie;a.addCommand("mcePreview",function(){a.windowManager.open({title:"Preview",width:parseInt(a.getParam("plugin_preview_width","650"),10),height:parseInt(a.getParam("plugin_preview_height","500"),10),html:'<iframe src="javascript:\'\'" frameborder="0"'+(e?' sandbox="allow-scripts"':"")+"></iframe>",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var b,f="";f+='<base href="'+a.documentBaseURI.getURI()+'">',c.each(a.contentCSS,function(b){f+='<link type="text/css" rel="stylesheet" href="'+a.documentBaseURI.toAbsolute(b)+'">'});var g=d.body_id||"tinymce";g.indexOf("=")!=-1&&(g=a.getParam("body_id","","hash"),g=g[a.id]||g);var h=d.body_class||"";h.indexOf("=")!=-1&&(h=a.getParam("body_class","","hash"),h=h[a.id]||"");var i='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A") {e.preventDefault();}}}, false);</script> ',j=a.settings.directionality?' dir="'+a.settings.directionality+'"':"";if(b="<!DOCTYPE html><html><head>"+f+'</head><body id="'+g+'" class="mce-content-body '+h+'"'+j+">"+a.getContent()+i+"</body></html>",e)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(b);else{var k=this.getEl("body").firstChild.contentWindow.document;k.open(),k.write(b),k.close()}}})}),a.addButton("preview",{title:"Preview",cmd:"mcePreview"}),a.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("print",function(e){e.addCommand("mcePrint",function(){e.getWin().print()}),e.addButton("print",{title:"Print",cmd:"mcePrint"}),e.addShortcut("Meta+P","","mcePrint"),e.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Meta+P",context:"file"})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("2",tinymce.util.Tools.resolve),g("1",["2"],function(a){return a("tinymce.PluginManager")}),g("0",["1"],function(a){return a.add("print",function(a){a.addCommand("mcePrint",function(){a.getWin().print()}),a.addButton("print",{title:"Print",cmd:"mcePrint"}),a.addShortcut("Meta+P","","mcePrint"),a.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Meta+P",context:"file"})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("save",function(e){function t(){var t;if(t=tinymce.DOM.getParent(e.id,"form"),!e.getParam("save_enablewhendirty",!0)||e.isDirty())return tinymce.triggerSave(),e.getParam("save_onsavecallback")?(e.execCallback("save_onsavecallback",e),void e.nodeChanged()):void(t?(e.setDirty(!1),t.onsubmit&&!t.onsubmit()||("function"==typeof t.submit?t.submit():n(e.translate("Error: Form submit field collision."))),e.nodeChanged()):n(e.translate("Error: No form element found.")))}function n(t){e.notificationManager.open({text:t,type:"error"})}function r(){var t=tinymce.trim(e.startContent);return e.getParam("save_oncancelcallback")?void e.execCallback("save_oncancelcallback",e):(e.setContent(t),e.undoManager.clear(),void e.nodeChanged())}function i(){var t=this;e.on("nodeChange dirty",function(){t.disabled(e.getParam("save_enablewhendirty",!0)&&!e.isDirty())})}e.addCommand("mceSave",t),e.addCommand("mceCancel",r),e.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:i}),e.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:i}),e.addShortcut("Meta+S","","mceSave")});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("5",tinymce.util.Tools.resolve),g("1",["5"],function(a){return a("tinymce.PluginManager")}),g("2",["5"],function(a){return a("tinymce.dom.DOMUtils")}),g("3",["5"],function(a){return a("tinymce.EditorManager")}),g("4",["5"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2","3","4"],function(a,b,c,d){return a.add("save",function(a){function e(){var d;if(d=b.DOM.getParent(a.id,"form"),!a.getParam("save_enablewhendirty",!0)||a.isDirty())return c.triggerSave(),a.getParam("save_onsavecallback")?(a.execCallback("save_onsavecallback",a),void a.nodeChanged()):void(d?(a.setDirty(!1),d.onsubmit&&!d.onsubmit()||("function"==typeof d.submit?d.submit():f(a.translate("Error: Form submit field collision."))),a.nodeChanged()):f(a.translate("Error: No form element found.")))}function f(b){a.notificationManager.open({text:b,type:"error"})}function g(){var b=d.trim(a.startContent);return a.getParam("save_oncancelcallback")?void a.execCallback("save_oncancelcallback",a):(a.setContent(b),a.undoManager.clear(),void a.nodeChanged())}function h(){var b=this;a.on("nodeChange dirty",function(){b.disabled(a.getParam("save_enablewhendirty",!0)&&!a.isDirty())})}a.addCommand("mceSave",e),a.addCommand("mceCancel",g),a.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:h}),a.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:h}),a.addShortcut("Meta+S","","mceSave")}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- !function(){function e(e){return e&&1==e.nodeType&&"false"===e.contentEditable}function t(t,n,r,i,o){function a(e,t){if(t=t||0,!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var n=e.index;if(t>0){var r=e[t];if(!r)throw"Invalid capture group";n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}function s(t){var n;if(3===t.nodeType)return t.data;if(m[t.nodeName]&&!p[t.nodeName])return"";if(n="",e(t))return"\n";if((p[t.nodeName]||g[t.nodeName])&&(n+="\n"),t=t.firstChild)do n+=s(t);while(t=t.nextSibling);return n}function l(t,n,r){var i,o,a,s,l=[],c=0,u=t,d=n.shift(),f=0;e:for(;;){if((p[u.nodeName]||g[u.nodeName]||e(u))&&c++,3===u.nodeType&&(!o&&u.length+c>=d[1]?(o=u,s=d[1]-c):i&&l.push(u),!i&&u.length+c>d[0]&&(i=u,a=d[0]-c),c+=u.length),i&&o){if(u=r({startNode:i,startNodeIndex:a,endNode:o,endNodeIndex:s,innerNodes:l,match:d[2],matchIndex:f}),c-=o.length-s,i=null,o=null,l=[],d=n.shift(),f++,!d)break}else if(m[u.nodeName]&&!p[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!e(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===t)break e;u=u.parentNode}}}function c(e){var t;if("function"!=typeof e){var n=e.nodeType?e:f.createElement(e);t=function(e,t){var r=n.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(f.createTextNode(e)),r}}else t=e;return function(e){var n,r,i,o=e.startNode,a=e.endNode,s=e.matchIndex;if(o===a){var l=o;i=l.parentNode,e.startNodeIndex>0&&(n=f.createTextNode(l.data.substring(0,e.startNodeIndex)),i.insertBefore(n,l));var c=t(e.match[0],s);return i.insertBefore(c,l),e.endNodeIndex<l.length&&(r=f.createTextNode(l.data.substring(e.endNodeIndex)),i.insertBefore(r,l)),l.parentNode.removeChild(l),c}n=f.createTextNode(o.data.substring(0,e.startNodeIndex)),r=f.createTextNode(a.data.substring(e.endNodeIndex));for(var u=t(o.data.substring(e.startNodeIndex),s),d=[],p=0,m=e.innerNodes.length;p<m;++p){var g=e.innerNodes[p],h=t(g.data,s);g.parentNode.replaceChild(h,g),d.push(h)}var v=t(a.data.substring(0,e.endNodeIndex),s);return i=o.parentNode,i.insertBefore(n,o),i.insertBefore(u,o),i.removeChild(o),i=a.parentNode,i.insertBefore(v,a),i.insertBefore(r,a),i.removeChild(a),v}}var u,d,f,p,m,g,h=[],v=0;if(f=n.ownerDocument,p=o.getBlockElements(),m=o.getWhiteSpaceElements(),g=o.getShortEndedElements(),d=s(n)){if(t.global)for(;u=t.exec(d);)h.push(a(u,i));else u=d.match(t),h.push(a(u,i));return h.length&&(v=h.length,l(n,h,c(r))),v}}function n(e){function n(){function t(){o.statusbar.find("#next").disabled(!a(d+1).length),o.statusbar.find("#prev").disabled(!a(d-1).length)}function n(){e.windowManager.alert("Could not find the specified string.",function(){o.find("#find")[0].focus()})}var r,i={};r=tinymce.trim(e.selection.getContent({format:"text"}));var o=e.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){e.focus(),u.done()},onSubmit:function(e){var r,s,l,c;return e.preventDefault(),s=o.find("#case").checked(),c=o.find("#words").checked(),l=o.find("#find").value(),l.length?i.text==l&&i.caseState==s&&i.wholeWord==c?0===a(d+1).length?void n():(u.next(),void t()):(r=u.find(l,s,c),r||n(),o.statusbar.items().slice(1).disabled(0===r),t(),void(i={text:l,caseState:s,wholeWord:c})):(u.done(!1),void o.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){o.submit()}},{text:"Replace",disabled:!0,onclick:function(){u.replace(o.find("#replace").value())||(o.statusbar.items().slice(1).disabled(!0),d=-1,i={})}},{text:"Replace all",disabled:!0,onclick:function(){u.replace(o.find("#replace").value(),!0,!0),o.statusbar.items().slice(1).disabled(!0),i={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){u.prev(),t()}},{text:"Next",name:"next",disabled:!0,onclick:function(){u.next(),t()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:r},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})}function r(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function i(n){var r,i;return i=e.dom.create("span",{"data-mce-bogus":1}),i.className="mce-match-marker",r=e.getBody(),u.done(!1),t(n,r,i,!1,e.schema)}function o(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function a(t){var n,i=[];if(n=tinymce.toArray(e.getBody().getElementsByTagName("span")),n.length)for(var o=0;o<n.length;o++){var a=r(n[o]);null!==a&&a.length&&a===t.toString()&&i.push(n[o])}return i}function s(t){var n=d,r=e.dom;t=t!==!1,t?n++:n--,r.removeClass(a(d),"mce-match-marker-selected");var i=a(n);return i.length?(r.addClass(a(n),"mce-match-marker-selected"),e.selection.scrollIntoView(i[0]),n):-1}function l(t){var n=e.dom,r=t.parentNode;n.remove(t),n.isEmpty(r)&&n.remove(r)}function c(e){var t=r(e);return null!==t&&t.length>0}var u=this,d=-1;u.init=function(e){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:n,separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Meta+F",onclick:n}),e.addCommand("SearchReplace",n),e.shortcuts.add("Meta+F","",n)},u.find=function(e,t,n){e=e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),e=n?"\\b"+e+"\\b":e;var r=i(new RegExp(e,t?"g":"gi"));return r&&(d=-1,d=s(!0)),r},u.next=function(){var e=s(!0);e!==-1&&(d=e)},u.prev=function(){var e=s(!1);e!==-1&&(d=e)},u.replace=function(t,n,i){var s,f,p,m,g,h,v=d;for(n=n!==!1,p=e.getBody(),f=tinymce.grep(tinymce.toArray(p.getElementsByTagName("span")),c),s=0;s<f.length;s++){var b=r(f[s]);if(m=g=parseInt(b,10),i||m===d){for(t.length?(f[s].firstChild.nodeValue=t,o(f[s])):l(f[s]);f[++s];){if(m=parseInt(r(f[s]),10),m!==g){s--;break}l(f[s])}n&&v--}else g>d&&f[s].setAttribute("data-mce-index",g-1)}return e.undoManager.add(),d=v,n?(h=a(v+1).length>0,u.next()):(h=a(v-1).length>0,u.prev()),!i&&h},u.done=function(t){var n,i,a,s;for(i=tinymce.toArray(e.getBody().getElementsByTagName("span")),n=0;n<i.length;n++){var l=r(i[n]);null!==l&&l.length&&(l===d.toString()&&(a||(a=i[n].firstChild),s=i[n].firstChild),o(i[n]))}if(a&&s){var c=e.dom.createRng();return c.setStart(a,0),c.setEnd(s,s.data.length),t!==!1&&e.selection.setRng(c),c}}}tinymce.PluginManager.add("searchreplace",n)}();
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("4",tinymce.util.Tools.resolve),g("1",["4"],function(a){return a("tinymce.PluginManager")}),g("2",["4"],function(a){return a("tinymce.util.Tools")}),g("3",[],function(){function a(a){return a&&1==a.nodeType&&"false"===a.contentEditable}function b(b,c,d,e,f){function g(a,b){if(b=b||0,!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var c=a.index;if(b>0){var d=a[b];if(!d)throw"Invalid capture group";c+=a[0].indexOf(d),a[0]=d}return[c,c+a[0].length,[a[0]]]}function h(b){var c;if(3===b.nodeType)return b.data;if(o[b.nodeName]&&!n[b.nodeName])return"";if(c="",a(b))return"\n";if((n[b.nodeName]||p[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=h(b);while(b=b.nextSibling);return c}function i(b,c,d){var e,f,g,h,i=[],j=0,k=b,l=c.shift(),m=0;a:for(;;){if((n[k.nodeName]||p[k.nodeName]||a(k))&&j++,3===k.nodeType&&(!f&&k.length+j>=l[1]?(f=k,h=l[1]-j):e&&i.push(k),!e&&k.length+j>l[0]&&(e=k,g=l[0]-j),j+=k.length),e&&f){if(k=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:i,match:l[2],matchIndex:m}),j-=f.length-h,e=null,f=null,i=[],l=c.shift(),m++,!l)break}else if(o[k.nodeName]&&!n[k.nodeName]||!k.firstChild){if(k.nextSibling){k=k.nextSibling;continue}}else if(!a(k)){k=k.firstChild;continue}for(;;){if(k.nextSibling){k=k.nextSibling;break}if(k.parentNode===b)break a;k=k.parentNode}}}function j(a){var b;if("function"!=typeof a){var c=a.nodeType?a:m.createElement(a);b=function(a,b){var d=c.cloneNode(!1);return d.setAttribute("data-mce-index",b),a&&d.appendChild(m.createTextNode(a)),d}}else b=a;return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex;if(f===g){var i=f;e=i.parentNode,a.startNodeIndex>0&&(c=m.createTextNode(i.data.substring(0,a.startNodeIndex)),e.insertBefore(c,i));var j=b(a.match[0],h);return e.insertBefore(j,i),a.endNodeIndex<i.length&&(d=m.createTextNode(i.data.substring(a.endNodeIndex)),e.insertBefore(d,i)),i.parentNode.removeChild(i),j}c=m.createTextNode(f.data.substring(0,a.startNodeIndex)),d=m.createTextNode(g.data.substring(a.endNodeIndex));for(var k=b(f.data.substring(a.startNodeIndex),h),l=[],n=0,o=a.innerNodes.length;n<o;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),l.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(k,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}var k,l,m,n,o,p,q=[],r=0;if(m=c.ownerDocument,n=f.getBlockElements(),o=f.getWhiteSpaceElements(),p=f.getShortEndedElements(),l=h(c)){if(b.global)for(;k=b.exec(l);)q.push(g(k,e));else k=l.match(b),q.push(g(k,e));return q.length&&(r=q.length,i(c,q,j(d))),r}}return{findAndReplaceDOMText:b}}),g("0",["1","2","3"],function(a,b,c){function d(a){function d(){function c(){g.statusbar.find("#next").disabled(!h(m+1).length),g.statusbar.find("#prev").disabled(!h(m-1).length)}function d(){a.windowManager.alert("Could not find the specified string.",function(){g.find("#find")[0].focus()})}var e,f={};e=b.trim(a.selection.getContent({format:"text"}));var g=a.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){a.focus(),l.done()},onSubmit:function(a){var b,e,i,j;return a.preventDefault(),e=g.find("#case").checked(),j=g.find("#words").checked(),i=g.find("#find").value(),i.length?f.text==i&&f.caseState==e&&f.wholeWord==j?0===h(m+1).length?void d():(l.next(),void c()):(b=l.find(i,e,j),b||d(),g.statusbar.items().slice(1).disabled(0===b),c(),void(f={text:i,caseState:e,wholeWord:j})):(l.done(!1),void g.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){g.submit()}},{text:"Replace",disabled:!0,onclick:function(){l.replace(g.find("#replace").value())||(g.statusbar.items().slice(1).disabled(!0),m=-1,f={})}},{text:"Replace all",disabled:!0,onclick:function(){l.replace(g.find("#replace").value(),!0,!0),g.statusbar.items().slice(1).disabled(!0),f={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){l.prev(),c()}},{text:"Next",name:"next",disabled:!0,onclick:function(){l.next(),c()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:e},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})}function e(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function f(b){var d,e;return e=a.dom.create("span",{"data-mce-bogus":1}),e.className="mce-match-marker",d=a.getBody(),l.done(!1),c.findAndReplaceDOMText(b,d,e,!1,a.schema)}function g(a){var b=a.parentNode;a.firstChild&&b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function h(c){var d,f=[];if(d=b.toArray(a.getBody().getElementsByTagName("span")),d.length)for(var g=0;g<d.length;g++){var h=e(d[g]);null!==h&&h.length&&h===c.toString()&&f.push(d[g])}return f}function i(b){var c=m,d=a.dom;b=b!==!1,b?c++:c--,d.removeClass(h(m),"mce-match-marker-selected");var e=h(c);return e.length?(d.addClass(h(c),"mce-match-marker-selected"),a.selection.scrollIntoView(e[0]),c):-1}function j(b){var c=a.dom,d=b.parentNode;c.remove(b),c.isEmpty(d)&&c.remove(d)}function k(a){var b=e(a);return null!==b&&b.length>0}var l=this,m=-1;l.init=function(a){a.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:d,separator:"before",context:"edit"}),a.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Meta+F",onclick:d}),a.addCommand("SearchReplace",d),a.shortcuts.add("Meta+F","",d)},l.find=function(a,b,c){a=a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),a=c?"\\b"+a+"\\b":a;var d=f(new RegExp(a,b?"g":"gi"));return d&&(m=-1,m=i(!0)),d},l.next=function(){var a=i(!0);a!==-1&&(m=a)},l.prev=function(){var a=i(!1);a!==-1&&(m=a)},l.replace=function(c,d,f){var i,n,o,p,q,r,s=m;for(d=d!==!1,o=a.getBody(),n=b.grep(b.toArray(o.getElementsByTagName("span")),k),i=0;i<n.length;i++){var t=e(n[i]);if(p=q=parseInt(t,10),f||p===m){for(c.length?(n[i].firstChild.nodeValue=c,g(n[i])):j(n[i]);n[++i];){if(p=parseInt(e(n[i]),10),p!==q){i--;break}j(n[i])}d&&s--}else q>m&&n[i].setAttribute("data-mce-index",q-1)}return a.undoManager.add(),m=s,d?(r=h(s+1).length>0,l.next()):(r=h(s-1).length>0,l.prev()),!f&&r},l.done=function(c){var d,f,h,i;for(f=b.toArray(a.getBody().getElementsByTagName("span")),d=0;d<f.length;d++){var j=e(f[d]);null!==j&&j.length&&(j===m.toString()&&(h||(h=f[d].firstChild),i=f[d].firstChild),g(f[d]))}if(h&&i){var k=a.dom.createRng();return k.setStart(h,0),k.setEnd(i,i.data.length),c!==!1&&a.selection.setRng(k),k}}}return a.add("searchreplace",d),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- !function(e,t){"use strict";function n(e,t){for(var n,r=[],o=0;o<e.length;++o){if(n=a[e[o]]||i(e[o]),!n)throw"module definition dependecy not found: "+e[o];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){a[e]=i.apply(null,arguments)})}function i(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function o(n){var r,i,o,s,l;for(r=0;r<n.length;r++){i=e,o=n[r],s=o.split(/[.\/]/);for(var c=0;c<s.length-1;++c)i[s[c]]===t&&(i[s[c]]={}),i=i[s[c]];i[s[s.length-1]]=a[o]}if(e.AMDLC_TESTS){l=e.privateModules||{};for(o in a)l[o]=a[o];for(r=0;r<n.length;r++)delete l[n[r]];e.privateModules=l}}var a={};r("tinymce/spellcheckerplugin/DomTextMatcher",[],function(){function e(e){return e&&1==e.nodeType&&"false"===e.contentEditable}return function(t,n){function r(e,t){if(!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}function i(t){var n;if(3===t.nodeType)return t.data;if(k[t.nodeName]&&!N[t.nodeName])return"";if(e(t))return"\n";if(n="",(N[t.nodeName]||S[t.nodeName])&&(n+="\n"),t=t.firstChild)do n+=i(t);while(t=t.nextSibling);return n}function o(t,n,r){var i,o,a,s,l,c=[],u=0,d=t,f=0;n=n.slice(0),n.sort(function(e,t){return e.start-t.start}),l=n.shift();e:for(;;){if((N[d.nodeName]||S[d.nodeName]||e(d))&&u++,3===d.nodeType&&(!o&&d.length+u>=l.end?(o=d,s=l.end-u):i&&c.push(d),!i&&d.length+u>l.start&&(i=d,a=l.start-u),u+=d.length),i&&o){if(d=r({startNode:i,startNodeIndex:a,endNode:o,endNodeIndex:s,innerNodes:c,match:l.text,matchIndex:f}),u-=o.length-s,i=null,o=null,c=[],l=n.shift(),f++,!l)break}else if(k[d.nodeName]&&!N[d.nodeName]||!d.firstChild){if(d.nextSibling){d=d.nextSibling;continue}}else if(!e(d)){d=d.firstChild;continue}for(;;){if(d.nextSibling){d=d.nextSibling;break}if(d.parentNode===t)break e;d=d.parentNode}}}function a(e){function t(t,n){var r=_[n];r.stencil||(r.stencil=e(r));var i=r.stencil.cloneNode(!1);return i.setAttribute("data-mce-index",n),t&&i.appendChild(E.doc.createTextNode(t)),i}return function(e){var n,r,i,o=e.startNode,a=e.endNode,s=e.matchIndex,l=E.doc;if(o===a){var c=o;i=c.parentNode,e.startNodeIndex>0&&(n=l.createTextNode(c.data.substring(0,e.startNodeIndex)),i.insertBefore(n,c));var u=t(e.match,s);return i.insertBefore(u,c),e.endNodeIndex<c.length&&(r=l.createTextNode(c.data.substring(e.endNodeIndex)),i.insertBefore(r,c)),c.parentNode.removeChild(c),u}n=l.createTextNode(o.data.substring(0,e.startNodeIndex)),r=l.createTextNode(a.data.substring(e.endNodeIndex));for(var d=t(o.data.substring(e.startNodeIndex),s),f=[],p=0,m=e.innerNodes.length;p<m;++p){var g=e.innerNodes[p],h=t(g.data,s);g.parentNode.replaceChild(h,g),f.push(h)}var v=t(a.data.substring(0,e.endNodeIndex),s);return i=o.parentNode,i.insertBefore(n,o),i.insertBefore(d,o),i.removeChild(o),i=a.parentNode,i.insertBefore(v,a),i.insertBefore(r,a),i.removeChild(a),v}}function s(e){var t=e.parentNode;t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function l(e){var n=t.getElementsByTagName("*"),r=[];e="number"==typeof e?""+e:null;for(var i=0;i<n.length;i++){var o=n[i],a=o.getAttribute("data-mce-index");null!==a&&a.length&&(a!==e&&null!==e||r.push(o))}return r}function c(e){for(var t=_.length;t--;)if(_[t]===e)return t;return-1}function u(e){var t=[];return d(function(n,r){e(n,r)&&t.push(n)}),_=t,this}function d(e){for(var t=0,n=_.length;t<n&&e(_[t],t)!==!1;t++);return this}function f(e){return _.length&&o(t,_,a(e)),this}function p(e,t){if(w&&e.global)for(;C=e.exec(w);)_.push(r(C,t));return this}function m(e){var t,n=l(e?c(e):null);for(t=n.length;t--;)s(n[t]);return this}function g(e){return _[e.getAttribute("data-mce-index")]}function h(e){return l(c(e))[0]}function v(e,t,n){return _.push({start:e,end:e+t,text:w.substr(e,t),data:n}),this}function b(e){var t=l(c(e)),r=n.dom.createRng();return r.setStartBefore(t[0]),r.setEndAfter(t[t.length-1]),r}function y(e,t){var r=b(e);return r.deleteContents(),t.length>0&&r.insertNode(n.dom.doc.createTextNode(t)),r}function x(){return _.splice(0,_.length),m(),this}var C,w,N,k,S,_=[],E=n.dom;return N=n.schema.getBlockElements(),k=n.schema.getWhiteSpaceElements(),S=n.schema.getShortEndedElements(),w=i(t),{text:w,matches:_,each:d,filter:u,reset:x,matchFromElement:g,elementFromMatch:h,find:p,add:v,wrap:f,unwrap:m,replace:y,rangeFromMatch:b,indexOf:c}}}),r("tinymce/spellcheckerplugin/Plugin",["tinymce/spellcheckerplugin/DomTextMatcher","tinymce/PluginManager","tinymce/util/Tools","tinymce/ui/Menu","tinymce/dom/DOMUtils","tinymce/util/XHR","tinymce/util/URI","tinymce/util/JSON"],function(e,t,n,r,i,o,a,s){t.add("spellchecker",function(l,c){function u(){return B.textMatcher||(B.textMatcher=new e(l.getBody(),l)),B.textMatcher}function d(e,t){var r=[];return n.each(t,function(e){r.push({selectable:!0,text:e.name,data:e.value})}),r}function f(e){for(var t in e)return!1;return!0}function p(e,t){var o=[],a=E[e];n.each(a,function(e){o.push({text:e,onclick:function(){l.insertContent(l.dom.encode(e)),l.dom.remove(t),b()}})}),o.push({text:"-"}),A&&o.push({text:"Add to Dictionary",onclick:function(){y(e,t)}}),o.push.apply(o,[{text:"Ignore",onclick:function(){x(e,t)}},{text:"Ignore all",onclick:function(){x(e,t,!0)}}]),R=new r({items:o,context:"contextmenu",onautohide:function(e){e.target.className.indexOf("spellchecker")!=-1&&e.preventDefault()},onhide:function(){R.remove(),R=null}}),R.renderTo(document.body);var s=i.DOM.getPos(l.getContentAreaContainer()),c=l.dom.getPos(t[0]),u=l.dom.getRoot();"BODY"==u.nodeName?(c.x-=u.ownerDocument.documentElement.scrollLeft||u.scrollLeft,c.y-=u.ownerDocument.documentElement.scrollTop||u.scrollTop):(c.x-=u.scrollLeft,c.y-=u.scrollTop),s.x+=c.x,s.y+=c.y,R.moveTo(s.x,s.y+t[0].offsetHeight)}function m(){return l.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g")}function g(e,t,r,i){var u={method:e,lang:P.spellchecker_language},d="";u["addToDictionary"==e?"word":"text"]=t,n.each(u,function(e,t){d&&(d+="&"),d+=t+"="+encodeURIComponent(e)}),o.send({url:new a(c).toAbsolute(P.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:d,success:function(e){if(e=s.parse(e))e.error?i(e.error):r(e);else{var t=l.translate("Server response wasn't proper JSON.");i(t)}},error:function(){var e=l.translate("The spelling service was not found: (")+P.spellchecker_rpc_url+l.translate(")");i(e)}})}function h(e,t,n,r){var i=P.spellchecker_callback||g;i.call(B,e,t,n,r)}function v(){function e(e){l.notificationManager.open({text:e,type:"error"}),l.setProgressState(!1),C()}C()||(l.setProgressState(!0),h("spellcheck",u().text,S,e),l.focus())}function b(){l.dom.select("span.mce-spellchecker-word").length||C()}function y(e,t){l.setProgressState(!0),h("addToDictionary",e,function(){l.setProgressState(!1),l.dom.remove(t,!0),b()},function(e){l.notificationManager.open({text:e,type:"error"}),l.setProgressState(!1)})}function x(e,t,r){l.selection.collapse(),r?n.each(l.dom.select("span.mce-spellchecker-word"),function(t){t.getAttribute("data-mce-word")==e&&l.dom.remove(t,!0)}):l.dom.remove(t,!0),b()}function C(){if(u().reset(),B.textMatcher=null,T)return T=!1,l.fire("SpellcheckEnd"),!0}function w(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function N(e){var t,r=[];if(t=n.toArray(l.getBody().getElementsByTagName("span")),t.length)for(var i=0;i<t.length;i++){var o=w(t[i]);null!==o&&o.length&&o===e.toString()&&r.push(t[i])}return r}function k(e){var t=P.spellchecker_language;e.control.items().each(function(e){e.active(e.settings.data===t)})}function S(e){var t;if(e.words?(A=!!e.dictionary,t=e.words):t=e,l.setProgressState(!1),f(t)){var n=l.translate("No misspellings found.");return l.notificationManager.open({text:n,type:"info"}),void(T=!1)}E=t,u().find(m()).filter(function(e){return!!t[e.text]}).wrap(function(e){return l.dom.create("span",{"class":"mce-spellchecker-word","data-mce-bogus":1,"data-mce-word":e.text})}),T=!0,l.fire("SpellcheckStart")}var _,E,T,R,A,B=this,P=l.settings;if(/(^|[ ,])tinymcespellchecker([, ]|$)/.test(P.plugins)&&t.get("tinymcespellchecker"))return void("undefined"!=typeof console&&console.log&&console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."));var D=P.spellchecker_languages||"English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv";_=d("Language",n.map(D.split(","),function(e){return e=e.split("="),{name:e[0],value:e[1]}})),l.on("click",function(e){var t=e.target;if("mce-spellchecker-word"==t.className){e.preventDefault();var n=N(w(t));if(n.length>0){var r=l.dom.createRng();r.setStartBefore(n[0]),r.setEndAfter(n[n.length-1]),l.selection.setRng(r),p(t.getAttribute("data-mce-word"),n)}}}),l.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:v,selectable:!0,onPostRender:function(){var e=this;e.active(T),l.on("SpellcheckStart SpellcheckEnd",function(){e.active(T)})}});var M={tooltip:"Spellcheck",onclick:v,onPostRender:function(){var e=this;l.on("SpellcheckStart SpellcheckEnd",function(){e.active(T)})}};_.length>1&&(M.type="splitbutton",M.menu=_,M.onshow=k,M.onselect=function(e){P.spellchecker_language=e.control.settings.data}),l.addButton("spellchecker",M),l.addCommand("mceSpellCheck",v),l.on("remove",function(){R&&(R.remove(),R=null)}),l.on("change",b),this.getTextMatcher=u,this.getWordCharPattern=m,this.markErrors=S,this.getLanguage=function(){return P.spellchecker_language},P.spellchecker_language=P.spellchecker_language||P.language||"en"})}),o(["tinymce/spellcheckerplugin/DomTextMatcher"])}(window);
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};g("1",[],function(){function a(a){return a&&1==a.nodeType&&"false"===a.contentEditable}return function(b,c){function d(a,b){if(!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";return{start:a.index,end:a.index+a[0].length,text:a[0],data:b}}function e(b){var c;if(3===b.nodeType)return b.data;if(y[b.nodeName]&&!x[b.nodeName])return"";if(a(b))return"\n";if(c="",(x[b.nodeName]||z[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=e(b);while(b=b.nextSibling);return c}function f(b,c,d){var e,f,g,h,i,j=[],k=0,l=b,m=0;c=c.slice(0),c.sort(function(a,b){return a.start-b.start}),i=c.shift();a:for(;;){if((x[l.nodeName]||z[l.nodeName]||a(l))&&k++,3===l.nodeType&&(!f&&l.length+k>=i.end?(f=l,h=i.end-k):e&&j.push(l),!e&&l.length+k>i.start&&(e=l,g=i.start-k),k+=l.length),e&&f){if(l=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:j,match:i.text,matchIndex:m}),k-=f.length-h,e=null,f=null,j=[],i=c.shift(),m++,!i)break}else if(y[l.nodeName]&&!x[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!a(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===b)break a;l=l.parentNode}}}function g(a){function b(b,c){var d=A[c];d.stencil||(d.stencil=a(d));var e=d.stencil.cloneNode(!1);return e.setAttribute("data-mce-index",c),b&&e.appendChild(B.doc.createTextNode(b)),e}return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex,i=B.doc;if(f===g){var j=f;e=j.parentNode,a.startNodeIndex>0&&(c=i.createTextNode(j.data.substring(0,a.startNodeIndex)),e.insertBefore(c,j));var k=b(a.match,h);return e.insertBefore(k,j),a.endNodeIndex<j.length&&(d=i.createTextNode(j.data.substring(a.endNodeIndex)),e.insertBefore(d,j)),j.parentNode.removeChild(j),k}c=i.createTextNode(f.data.substring(0,a.startNodeIndex)),d=i.createTextNode(g.data.substring(a.endNodeIndex));for(var l=b(f.data.substring(a.startNodeIndex),h),m=[],n=0,o=a.innerNodes.length;n<o;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(l,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}function h(a){var b=a.parentNode;b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function i(a){var c=b.getElementsByTagName("*"),d=[];a="number"==typeof a?""+a:null;for(var e=0;e<c.length;e++){var f=c[e],g=f.getAttribute("data-mce-index");null!==g&&g.length&&(g!==a&&null!==a||d.push(f))}return d}function j(a){for(var b=A.length;b--;)if(A[b]===a)return b;return-1}function k(a){var b=[];return l(function(c,d){a(c,d)&&b.push(c)}),A=b,this}function l(a){for(var b=0,c=A.length;b<c&&a(A[b],b)!==!1;b++);return this}function m(a){return A.length&&f(b,A,g(a)),this}function n(a,b){if(w&&a.global)for(;v=a.exec(w);)A.push(d(v,b));return this}function o(a){var b,c=i(a?j(a):null);for(b=c.length;b--;)h(c[b]);return this}function p(a){return A[a.getAttribute("data-mce-index")]}function q(a){return i(j(a))[0]}function r(a,b,c){return A.push({start:a,end:a+b,text:w.substr(a,b),data:c}),this}function s(a){var b=i(j(a)),d=c.dom.createRng();return d.setStartBefore(b[0]),d.setEndAfter(b[b.length-1]),d}function t(a,b){var d=s(a);return d.deleteContents(),b.length>0&&d.insertNode(c.dom.doc.createTextNode(b)),d}function u(){return A.splice(0,A.length),o(),this}var v,w,x,y,z,A=[],B=c.dom;return x=c.schema.getBlockElements(),y=c.schema.getWhiteSpaceElements(),z=c.schema.getShortEndedElements(),w=e(b),{text:w,matches:A,each:l,filter:k,reset:u,matchFromElement:p,elementFromMatch:q,find:n,add:r,wrap:m,unwrap:o,replace:t,rangeFromMatch:s,indexOf:j}}}),h("9",tinymce.util.Tools.resolve),g("2",["9"],function(a){return a("tinymce.PluginManager")}),g("3",["9"],function(a){return a("tinymce.util.Tools")}),g("4",["9"],function(a){return a("tinymce.ui.Menu")}),g("5",["9"],function(a){return a("tinymce.dom.DOMUtils")}),g("6",["9"],function(a){return a("tinymce.util.XHR")}),g("7",["9"],function(a){return a("tinymce.util.URI")}),g("8",["9"],function(a){return a("tinymce.util.JSON")}),g("0",["1","2","3","4","5","6","7","8"],function(a,b,c,d,e,f,g,h){return b.add("spellchecker",function(i,j){function k(){return F.textMatcher||(F.textMatcher=new a(i.getBody(),i)),F.textMatcher}function l(a,b){var d=[];return c.each(b,function(a){d.push({selectable:!0,text:a.name,data:a.value})}),d}function m(a){for(var b in a)return!1;return!0}function n(a,b){var f=[],g=B[a];c.each(g,function(a){f.push({text:a,onclick:function(){i.insertContent(i.dom.encode(a)),i.dom.remove(b),s()}})}),f.push({text:"-"}),E&&f.push({text:"Add to Dictionary",onclick:function(){t(a,b)}}),f.push.apply(f,[{text:"Ignore",onclick:function(){u(a,b)}},{text:"Ignore all",onclick:function(){u(a,b,!0)}}]),D=new d({items:f,context:"contextmenu",onautohide:function(a){a.target.className.indexOf("spellchecker")!=-1&&a.preventDefault()},onhide:function(){D.remove(),D=null}}),D.renderTo(document.body);var h=e.DOM.getPos(i.getContentAreaContainer()),j=i.dom.getPos(b[0]),k=i.dom.getRoot();"BODY"==k.nodeName?(j.x-=k.ownerDocument.documentElement.scrollLeft||k.scrollLeft,j.y-=k.ownerDocument.documentElement.scrollTop||k.scrollTop):(j.x-=k.scrollLeft,j.y-=k.scrollTop),h.x+=j.x,h.y+=j.y,D.moveTo(h.x,h.y+b[0].offsetHeight)}function o(){return i.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g")}function p(a,b,d,e){var k={method:a,lang:G.spellchecker_language},l="";k["addToDictionary"==a?"word":"text"]=b,c.each(k,function(a,b){l&&(l+="&"),l+=b+"="+encodeURIComponent(a)}),f.send({url:new g(j).toAbsolute(G.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:l,success:function(a){if(a=h.parse(a))a.error?e(a.error):d(a);else{var b=i.translate("Server response wasn't proper JSON.");e(b)}},error:function(){var a=i.translate("The spelling service was not found: (")+G.spellchecker_rpc_url+i.translate(")");e(a)}})}function q(a,b,c,d){var e=G.spellchecker_callback||p;e.call(F,a,b,c,d)}function r(){function a(a){i.notificationManager.open({text:a,type:"error"}),i.setProgressState(!1),v()}v()||(i.setProgressState(!0),q("spellcheck",k().text,z,a),i.focus())}function s(){i.dom.select("span.mce-spellchecker-word").length||v()}function t(a,b){i.setProgressState(!0),q("addToDictionary",a,function(){i.setProgressState(!1),i.dom.remove(b,!0),s()},function(a){i.notificationManager.open({text:a,type:"error"}),i.setProgressState(!1)})}function u(a,b,d){i.selection.collapse(),d?c.each(i.dom.select("span.mce-spellchecker-word"),function(b){b.getAttribute("data-mce-word")==a&&i.dom.remove(b,!0)}):i.dom.remove(b,!0),s()}function v(){if(k().reset(),F.textMatcher=null,C)return C=!1,i.fire("SpellcheckEnd"),!0}function w(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function x(a){var b,d=[];if(b=c.toArray(i.getBody().getElementsByTagName("span")),b.length)for(var e=0;e<b.length;e++){var f=w(b[e]);null!==f&&f.length&&f===a.toString()&&d.push(b[e])}return d}function y(a){var b=G.spellchecker_language;a.control.items().each(function(a){a.active(a.settings.data===b)})}function z(a){var b;if(a.words?(E=!!a.dictionary,b=a.words):b=a,i.setProgressState(!1),m(b)){var c=i.translate("No misspellings found.");return i.notificationManager.open({text:c,type:"info"}),void(C=!1)}B=b,k().find(o()).filter(function(a){return!!b[a.text]}).wrap(function(a){return i.dom.create("span",{"class":"mce-spellchecker-word","data-mce-bogus":1,"data-mce-word":a.text})}),C=!0,i.fire("SpellcheckStart")}var A,B,C,D,E,F=this,G=i.settings;if(/(^|[ ,])tinymcespellchecker([, ]|$)/.test(G.plugins)&&b.get("tinymcespellchecker"))return void("undefined"!=typeof console&&console.log&&console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."));var H=G.spellchecker_languages||"English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv";A=l("Language",c.map(H.split(","),function(a){return a=a.split("="),{name:a[0],value:a[1]}})),i.on("click",function(a){var b=a.target;if("mce-spellchecker-word"==b.className){a.preventDefault();var c=x(w(b));if(c.length>0){var d=i.dom.createRng();d.setStartBefore(c[0]),d.setEndAfter(c[c.length-1]),i.selection.setRng(d),n(b.getAttribute("data-mce-word"),c)}}}),i.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:r,selectable:!0,onPostRender:function(){var a=this;a.active(C),i.on("SpellcheckStart SpellcheckEnd",function(){a.active(C)})}});var I={tooltip:"Spellcheck",onclick:r,onPostRender:function(){var a=this;i.on("SpellcheckStart SpellcheckEnd",function(){a.active(C)})}};A.length>1&&(I.type="splitbutton",I.menu=A,I.onshow=y,I.onselect=function(a){G.spellchecker_language=a.control.settings.data}),i.addButton("spellchecker",I),i.addCommand("mceSpellCheck",r),i.on("remove",function(){D&&(D.remove(),D=null)}),i.on("change",s),this.getTextMatcher=k,this.getWordCharPattern=o,this.markErrors=z,this.getLanguage=function(){return G.spellchecker_language},G.spellchecker_language=G.spellchecker_language||G.language||"en"}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("tabfocus",function(e){function t(e){9!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()}function n(t){function n(n){function o(e){return"BODY"===e.nodeName||"hidden"!=e.type&&"none"!=e.style.display&&"hidden"!=e.style.visibility&&o(e.parentNode)}function l(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&tinymce.get(t.id)&&e.tabIndex!=-1&&o(e)}if(s=r.select(":input:enabled,*[tabindex]:not(iframe)"),i(s,function(t,n){if(t.id==e.id)return a=n,!1}),n>0){for(c=a+1;c<s.length;c++)if(l(s[c]))return s[c]}else for(c=a-1;c>=0;c--)if(l(s[c]))return s[c];return null}var a,s,l,c;if(!(9!==t.keyCode||t.ctrlKey||t.altKey||t.metaKey||t.isDefaultPrevented())&&(l=o(e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))),1==l.length&&(l[1]=l[0],l[0]=":prev"),s=t.shiftKey?":prev"==l[0]?n(-1):r.get(l[0]):":next"==l[1]?n(1):r.get(l[1]))){var u=tinymce.get(s.id||s.name);s.id&&u?u.focus():tinymce.util.Delay.setTimeout(function(){tinymce.Env.webkit||window.focus(),s.focus()},10),t.preventDefault()}}var r=tinymce.DOM,i=tinymce.each,o=tinymce.explode;e.on("init",function(){e.inline&&tinymce.DOM.setAttrib(e.getBody(),"tabIndex",null),e.on("keyup",t),tinymce.Env.gecko?e.on("keypress keydown",n):e.on("keydown",n)})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("7",tinymce.util.Tools.resolve),g("1",["7"],function(a){return a("tinymce.PluginManager")}),g("2",["7"],function(a){return a("tinymce.dom.DOMUtils")}),g("3",["7"],function(a){return a("tinymce.util.Tools")}),g("4",["7"],function(a){return a("tinymce.EditorManager")}),g("5",["7"],function(a){return a("tinymce.util.Delay")}),g("6",["7"],function(a){return a("tinymce.Env")}),g("0",["1","2","3","4","5","6"],function(a,b,c,d,e,f){return a.add("tabfocus",function(a){function g(a){9!==a.keyCode||a.ctrlKey||a.altKey||a.metaKey||a.preventDefault()}function h(b){function g(e){function f(a){return"BODY"===a.nodeName||"hidden"!=a.type&&"none"!=a.style.display&&"hidden"!=a.style.visibility&&f(a.parentNode)}function g(a){return/INPUT|TEXTAREA|BUTTON/.test(a.tagName)&&d.get(b.id)&&a.tabIndex!=-1&&f(a)}if(j=i.select(":input:enabled,*[tabindex]:not(iframe)"),c.each(j,function(b,c){if(b.id==a.id)return h=c,!1}),e>0){for(l=h+1;l<j.length;l++)if(g(j[l]))return j[l]}else for(l=h-1;l>=0;l--)if(g(j[l]))return j[l];return null}var h,j,k,l;if(!(9!==b.keyCode||b.ctrlKey||b.altKey||b.metaKey||b.isDefaultPrevented())&&(k=c.explode(a.getParam("tab_focus",a.getParam("tabfocus_elements",":prev,:next"))),1==k.length&&(k[1]=k[0],k[0]=":prev"),j=b.shiftKey?":prev"==k[0]?g(-1):i.get(k[0]):":next"==k[1]?g(1):i.get(k[1]))){var m=d.get(j.id||j.name);j.id&&m?m.focus():e.setTimeout(function(){f.webkit||window.focus(),j.focus()},10),b.preventDefault()}}var i=b.DOM;a.on("init",function(){a.inline&&i.setAttrib(a.getBody(),"tabIndex",null),a.on("keyup",g),f.gecko?a.on("keypress keydown",h):a.on("keydown",h)})}),function(){}}),d("0")()}();
@@ -1,2 +1,2 @@
1
- !function(e,t){"use strict";function n(e,t){for(var n,r=[],a=0;a<e.length;++a){if(n=o[e[a]]||i(e[a]),!n)throw"module definition dependecy not found: "+e[a];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){o[e]=i.apply(null,arguments)})}function i(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}var o={};r("tinymce/tableplugin/Utils",["tinymce/Env"],function(e){function t(t){(!e.ie||e.ie>9)&&(t.hasChildNodes()||(t.innerHTML='<br data-mce-bogus="1" />'))}var n=function(e){return function(t,n){t&&(n=parseInt(n,10),1===n||0===n?t.removeAttribute(e,1):t.setAttribute(e,n,1))}},r=function(e){return function(t){return parseInt(t.getAttribute(e)||1,10)}};return{setColSpan:n("colSpan"),setRowSpan:n("rowspan"),getColSpan:r("colSpan"),getRowSpan:r("rowSpan"),setSpanVal:function(e,t,r){n(t)(e,r)},getSpanVal:function(e,t){return r(t)(e)},paddCell:t}}),r("tinymce/tableplugin/SplitCols",["tinymce/util/Tools","tinymce/tableplugin/Utils"],function(e,t){var n=function(e,t,n){return e[n]?e[n][t]:null},r=function(e,t,r){var i=n(e,t,r);return i?i.elm:null},i=function(e,t,i,o){var a,s,l=0,c=r(e,t,i);for(a=i;(o>0?a<e.length:a>=0)&&(s=n(e,t,a),c===s.elm);a+=o)l++;return l},o=function(e,t,n){for(var r,i=e[n],o=t;o<i.length;o++)if(r=i[o],r.real)return r.elm;return null},a=function(e,n){for(var r,o=[],a=e[n],s=0;s<a.length;s++)r=a[s],o.push({elm:r.elm,above:i(e,s,n,-1)-1,below:i(e,s,n,1)-1}),s+=t.getColSpan(r.elm)-1;return o},s=function(e,n){var r=e.elm.ownerDocument,i=r.createElement("td");return t.setColSpan(i,t.getColSpan(e.elm)),t.setRowSpan(i,n),t.paddCell(i),i},l=function(e,t,n,r){var i=o(e,n+1,r);i?i.parentNode.insertBefore(t,i):(i=o(e,0,r),i.parentNode.appendChild(t))},c=function(e,n,r,i){if(0!==n.above){t.setRowSpan(n.elm,n.above);var o=s(n,n.below+1);return l(e,o,r,i),o}return null},u=function(e,n,r,i){if(0!==n.below){t.setRowSpan(n.elm,n.above+1);var o=s(n,n.below);return l(e,o,r,i+1),o}return null},d=function(t,n,i,o){var s=a(t,i),l=r(t,n,i).parentNode,d=[];return e.each(s,function(e,n){var r=o?c(t,e,n,i):u(t,e,n,i);null!==r&&d.push(d)}),{cells:d,row:l}};return{splitAt:d}}),r("tinymce/tableplugin/TableGrid",["tinymce/util/Tools","tinymce/Env","tinymce/tableplugin/Utils","tinymce/tableplugin/SplitCols"],function(e,n,r,i){var o=e.each,a=r.getSpanVal,s=r.setSpanVal;return function(l,c,u){function d(){l.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected")}function f(e){return e===l.getBody()}function p(t,n){return t?(n=e.map(n.split(","),function(e){return e.toLowerCase()}),e.grep(t.childNodes,function(t){return e.inArray(n,t.nodeName.toLowerCase())!==-1})):[]}function m(){var e=0;Z=[],Q=0,o(["thead","tbody","tfoot"],function(t){var n=p(c,t)[0],r=p(n,"tr");o(r,function(n,r){r+=e,o(p(n,"td,th"),function(e,n){var i,o,s,l;if(Z[r])for(;Z[r][n];)n++;for(s=a(e,"rowspan"),l=a(e,"colspan"),o=r;o<r+s;o++)for(Z[o]||(Z[o]=[]),i=n;i<n+l;i++)Z[o][i]={part:t,real:o==r&&i==n,elm:e,rowspan:s,colspan:l};Q=Math.max(Q,n+1)})}),e+=r.length})}function g(e){return l.fire("newrow",{node:e}),e}function h(e){return l.fire("newcell",{node:e}),e}function v(e,t){return e=e.cloneNode(t),e.removeAttribute("id"),e}function b(e,t){var n;if(n=Z[t])return n[e]}function y(e,t){return e[t]?e[t]:null}function x(e,t){for(var n=[],r=0;r<e.length;r++)n.push(b(t,r));return n}function C(e){return e&&(!!re.getAttrib(e.elm,"data-mce-selected")||e==u)}function w(){var e=[];return o(c.rows,function(t){o(t.cells,function(n){if(re.getAttrib(n,"data-mce-selected")||u&&n==u.elm)return e.push(t),!1})}),e}function N(){var e=0;return o(Z,function(t){if(o(t,function(t){C(t)&&e++}),e)return!1}),e}function k(){var e=re.createRng();f(c)||(e.setStartAfter(c),e.setEndAfter(c),ne.setRng(e),re.remove(c))}function S(t){var i,a={};return l.settings.table_clone_elements!==!1&&(a=e.makeMap((l.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),e.walk(t,function(e){var r;if(3==e.nodeType)return o(re.getParents(e.parentNode,null,t).reverse(),function(e){a[e.nodeName]&&(e=v(e,!1),i?r&&r.appendChild(e):i=r=e,r=e)}),r&&(r.innerHTML=n.ie&&n.ie<10?"&nbsp;":'<br data-mce-bogus="1" />'),!1},"childNodes"),t=v(t,!1),h(t),s(t,"rowSpan",1),s(t,"colSpan",1),i?t.appendChild(i):r.paddCell(t),t}function _(){var e,t=re.createRng();return o(re.select("tr",c),function(e){0===e.cells.length&&re.remove(e)}),0===re.select("tr",c).length?(t.setStartBefore(c),t.setEndBefore(c),ne.setRng(t),void re.remove(c)):(o(re.select("thead,tbody,tfoot",c),function(e){0===e.rows.length&&re.remove(e)}),m(),void(ee&&(e=Z[Math.min(Z.length-1,ee.y)],e&&(ne.select(e[Math.min(e.length-1,ee.x)].elm,!0),ne.collapse(!0)))))}function E(e,t,n,r){var i,o,a,s,l;for(i=Z[t][e].elm.parentNode,a=1;a<=n;a++)if(i=re.getNext(i,"tr")){for(o=e;o>=0;o--)if(l=Z[t+a][o].elm,l.parentNode==i){for(s=1;s<=r;s++)re.insertAfter(S(l),l);break}if(o==-1)for(s=1;s<=r;s++)i.insertBefore(S(i.cells[0]),i.cells[0])}}function T(){o(Z,function(e,t){o(e,function(e,n){var r,i,o;if(C(e)&&(e=e.elm,r=a(e,"colspan"),i=a(e,"rowspan"),r>1||i>1)){for(s(e,"rowSpan",1),s(e,"colSpan",1),o=0;o<r-1;o++)re.insertAfter(S(e),e);E(n,t,i-1,r)}})})}function R(e,t,n){for(var r=[],i=0;i<e.length;i++)(i<t||i>n)&&r.push(e[i]);return r}function A(t){return e.grep(t,function(e){return e.real===!1})}function B(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].elm;t[t.length-1]!==r&&t.push(r)}return t}function P(t,n,i,o,a){var s=0;if(a-i<1)return 0;for(var l=i+1;l<=a;l++){var c=R(y(t,l),n,o),u=A(c);c.length===u.length&&(e.each(B(u),function(e){r.setRowSpan(e,r.getRowSpan(e)-1)}),s++)}return s}function D(t,n,i,o,a){var s=0;if(o-n<1)return 0;for(var l=n+1;l<=o;l++){var c=R(x(t,l),i,a),u=A(c);c.length===u.length&&(e.each(B(u),function(e){r.setColSpan(e,r.getColSpan(e)-1)}),s++)}return s}function M(t,n,r){var i,a,l,c,u,d,f,p,g,h,v,y,x;if(t?(i=q(t),a=i.x,l=i.y,c=a+(n-1),u=l+(r-1)):(ee=te=null,o(Z,function(e,t){o(e,function(e,n){C(e)&&(ee||(ee={x:n,y:t}),te={x:n,y:t})})}),ee&&(a=ee.x,l=ee.y,c=te.x,u=te.y)),p=b(a,l),g=b(c,u),p&&g&&p.part==g.part){T(),m(),y=P(Z,a,l,c,u),x=D(Z,a,l,c,u),p=b(a,l).elm;var w=c-a-x+1,N=u-l-y+1;for(w===Q&&N===Z.length&&(w=1,N=1),w===Q&&N>1&&(N=1),s(p,"colSpan",w),s(p,"rowSpan",N),f=l;f<=u;f++)for(d=a;d<=c;d++)Z[f]&&Z[f][d]&&(t=Z[f][d].elm,t!=p&&(h=e.grep(t.childNodes),o(h,function(e){p.appendChild(e)}),h.length&&(h=e.grep(p.childNodes),v=0,o(h,function(e){"BR"==e.nodeName&&v++<h.length-1&&p.removeChild(e)})),re.remove(t)));_()}}function L(e){var n,r,i,l,c,u,d,f,p,m;if(o(Z,function(r,i){if(o(r,function(t){if(C(t)&&(t=t.elm,c=t.parentNode,u=g(v(c,!1)),n=i,e))return!1}),e)return n===t}),n!==t){for(l=0,m=0;l<Z[0].length;l+=m)if(Z[n][l]&&(r=Z[n][l].elm,m=a(r,"colspan"),r!=i)){if(e){if(n>0&&Z[n-1][l]&&(f=Z[n-1][l].elm,p=a(f,"rowSpan"),p>1)){s(f,"rowSpan",p+1);continue}}else if(p=a(r,"rowspan"),p>1){s(r,"rowSpan",p+1);continue}d=S(r),s(d,"colSpan",r.colSpan),u.appendChild(d),i=r}u.hasChildNodes()&&(e?c.parentNode.insertBefore(u,c):re.insertAfter(u,c))}}function I(e,t){t=t||w().length||1;for(var n=0;n<t;n++)L(e)}function O(e){var n,r;o(Z,function(r){if(o(r,function(t,r){if(C(t)&&(n=r,e))return!1}),e)return n===t}),o(Z,function(t,i){var o,l,c;t[n]&&(o=t[n].elm,o!=r&&(c=a(o,"colspan"),l=a(o,"rowspan"),1==c?e?(o.parentNode.insertBefore(S(o),o),E(n,i,l-1,c)):(re.insertAfter(S(o),o),E(n,i,l-1,c)):s(o,"colSpan",o.colSpan+1),r=o))})}function H(e,t){t=t||N()||1;for(var n=0;n<t;n++)O(e)}function F(t){return e.grep(z(t),C)}function z(e){var t=[];return o(e,function(e){o(e,function(e){t.push(e)})}),t}function W(){var t=[];if(f(c)){if(1==Z[0].length)return;if(F(Z).length==z(Z).length)return}o(Z,function(n){o(n,function(n,r){C(n)&&e.inArray(t,r)===-1&&(o(Z,function(e){var t,n=e[r].elm;t=a(n,"colSpan"),t>1?s(n,"colSpan",t-1):re.remove(n)}),t.push(r))})}),_()}function U(){function e(e){var t,n;o(e.cells,function(e){var n=a(e,"rowSpan");n>1&&(s(e,"rowSpan",n-1),t=q(e),E(t.x,t.y,1,1))}),t=q(e.cells[0]),o(Z[t.y],function(e){var t;e=e.elm,e!=n&&(t=a(e,"rowSpan"),t<=1?re.remove(e):s(e,"rowSpan",t-1),n=e)})}var t;t=w(),f(c)&&t.length==c.rows.length||(o(t.reverse(),function(t){e(t)}),_())}function V(){var e=w();if(!f(c)||e.length!=c.rows.length)return re.remove(e),_(),e}function $(){var e=w();return o(e,function(t,n){e[n]=v(t,!0)}),e}function j(t,n){var r,a,l;t&&(r=i.splitAt(Z,ee.x,ee.y,n),a=r.row,e.each(r.cells,h),l=e.map(t,function(e){return e.cloneNode(!0)}),n||l.reverse(),o(l,function(e){var t,r,i=e.cells.length;for(g(e),t=0;t<i;t++)r=e.cells[t],h(r),s(r,"colSpan",1),s(r,"rowSpan",1);for(t=i;t<Q;t++)e.appendChild(h(S(e.cells[i-1])));for(t=Q;t<i;t++)re.remove(e.cells[t]);n?a.parentNode.insertBefore(e,a):re.insertAfter(e,a)}),d())}function q(e){var t;return o(Z,function(n,r){return o(n,function(n,i){if(n.elm==e)return t={x:i,y:r},!1}),!t}),t}function Y(e){ee=q(e)}function X(){var e,t;return e=t=0,o(Z,function(n,r){o(n,function(n,i){var o,a;C(n)&&(n=Z[r][i],i>e&&(e=i),r>t&&(t=r),n.real&&(o=n.colspan-1,a=n.rowspan-1,o&&i+o>e&&(e=i+o),a&&r+a>t&&(t=r+a)))})}),{x:e,y:t}}function K(e){var t,n,r,i,o,a,s,l,c,u;if(te=q(e),ee&&te){for(t=Math.min(ee.x,te.x),n=Math.min(ee.y,te.y),r=Math.max(ee.x,te.x),i=Math.max(ee.y,te.y),o=r,a=i,u=n;u<=i;u++)for(c=t;c<=r;c++)e=Z[u][c],e.real&&(s=e.colspan-1,l=e.rowspan-1,s&&c+s>o&&(o=c+s),l&&u+l>a&&(a=u+l));for(d(),u=n;u<=a;u++)for(c=t;c<=o;c++)Z[u][c]&&re.setAttrib(Z[u][c].elm,"data-mce-selected","1")}}function G(e,t){var n,r,i;n=q(e),r=n.y*Q+n.x;do{if(r+=t,i=b(r%Q,Math.floor(r/Q)),!i)break;if(i.elm!=e)return ne.select(i.elm,!0),re.isEmpty(i.elm)&&ne.collapse(!0),!0}while(i.elm==e);return!1}function J(t){if(ee){var n=i.splitAt(Z,ee.x,ee.y,t);e.each(n.cells,h)}}var Z,Q,ee,te,ne=l.selection,re=ne.dom;c=c||re.getParent(ne.getStart(!0),"table"),m(),u=u||re.getParent(ne.getStart(!0),"th,td"),u&&(ee=q(u),te=X(),u=b(ee.x,ee.y)),e.extend(this,{deleteTable:k,split:T,merge:M,insertRow:L,insertRows:I,insertCol:O,insertCols:H,splitCols:J,deleteCols:W,deleteRows:U,cutRows:V,copyRows:$,pasteRows:j,getPos:q,setStartCell:Y,setEndCell:K,moveRelIdx:G,refresh:m})}}),r("tinymce/tableplugin/Quirks",["tinymce/util/VK","tinymce/util/Delay","tinymce/Env","tinymce/util/Tools","tinymce/tableplugin/Utils"],function(e,t,n,r,i){var o=r.each,a=i.getSpanVal;return function(s){function l(){function n(n){function r(e,t){var r=e?"previousSibling":"nextSibling",o=s.dom.getParent(t,"tr"),a=o[r];if(a)return v(s,t,a,e),n.preventDefault(),!0;var l=s.dom.getParent(o,"table"),d=o.parentNode,f=d.nodeName.toLowerCase();if("tbody"===f||f===(e?"tfoot":"thead")){var p=i(e,l,d,"tbody");if(null!==p)return c(e,p,t)}return u(e,o,r,l)}function i(e,t,n,r){var i=s.dom.select(">"+r,t),o=i.indexOf(n);if(e&&0===o||!e&&o===i.length-1)return l(e,t);if(o===-1){var a="thead"===n.tagName.toLowerCase()?0:i.length-1;return i[a]}return i[o+(e?-1:1)]}function l(e,t){var n=e?"thead":"tfoot",r=s.dom.select(">"+n,t);return 0!==r.length?r[0]:null}function c(e,t,r){var i=d(t,e);return i&&v(s,r,i,e),n.preventDefault(),!0}function u(e,t,i,o){var a=o[i];if(a)return f(a),!0;var l=s.dom.getParent(o,"td,th");if(l)return r(e,l,n);var c=d(t,!e);return f(c),n.preventDefault(),!1}function d(e,t){var n=e&&e[t?"lastChild":"firstChild"];return n&&"BR"===n.nodeName?s.dom.getParent(n,"td,th"):n}function f(e){s.selection.setCursorLocation(e,0)}function p(){return x==e.UP||x==e.DOWN}function m(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"tr");return null!==n}function g(e){for(var t=0,n=e;n.previousSibling;)n=n.previousSibling,t+=a(n,"colspan");return t}function h(e,t){var n=0,r=0;return o(e.children,function(e,i){if(n+=a(e,"colspan"),r=i,n>t)return!1}),r}function v(e,t,n,r){var i=g(s.dom.getParent(t,"td,th")),o=h(n,i),a=n.childNodes[o],l=d(a,r);f(l||a)}function b(e){var t=s.selection.getNode(),n=s.dom.getParent(t,"td,th"),r=s.dom.getParent(e,"td,th");return n&&n!==r&&y(n,r)}function y(e,t){return s.dom.getParent(e,"TABLE")===s.dom.getParent(t,"TABLE")}var x=n.keyCode;if(p()&&m(s)){var C=s.selection.getNode();t.setEditorTimeout(s,function(){b(C)&&r(!n.shiftKey&&x===e.UP,C,n)},0)}}s.on("KeyDown",function(e){n(e)})}function c(){function e(e,t){var n,r=t.ownerDocument,i=r.createRange();return i.setStartBefore(t),i.setEnd(e.endContainer,e.endOffset),n=r.createElement("body"),n.appendChild(i.cloneContents()),0===n.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}s.on("KeyDown",function(t){var n,r,i=s.dom;37!=t.keyCode&&38!=t.keyCode||(n=s.selection.getRng(),r=i.getParent(n.startContainer,"table"),r&&s.getBody().firstChild==r&&e(n,r)&&(n=i.createRng(),n.setStartBefore(r),n.setEndBefore(r),s.selection.setRng(n),t.preventDefault()))})}function u(){s.on("KeyDown SetContent VisualAid",function(){var e;for(e=s.getBody().lastChild;e;e=e.previousSibling)if(3==e.nodeType){if(e.nodeValue.length>0)break}else if(1==e.nodeType&&("BR"==e.tagName||!e.getAttribute("data-mce-bogus")))break;e&&"TABLE"==e.nodeName&&(s.settings.forced_root_block?s.dom.add(s.getBody(),s.settings.forced_root_block,s.settings.forced_root_block_attrs,n.ie&&n.ie<10?"&nbsp;":'<br data-mce-bogus="1" />'):s.dom.add(s.getBody(),"br",{"data-mce-bogus":"1"}))}),s.on("PreProcess",function(e){var t=e.node.lastChild;t&&("BR"==t.nodeName||1==t.childNodes.length&&("BR"==t.firstChild.nodeName||"\xa0"==t.firstChild.nodeValue))&&t.previousSibling&&"TABLE"==t.previousSibling.nodeName&&s.dom.remove(t)})}function d(){function e(e,t,n,r){var i,o,a,s=3,l=e.dom.getParent(t.startContainer,"TABLE");return l&&(i=l.parentNode),o=t.startContainer.nodeType==s&&0===t.startOffset&&0===t.endOffset&&r&&("TR"==n.nodeName||n==i),a=("TD"==n.nodeName||"TH"==n.nodeName)&&!r,o||a}function t(){var t=s.selection.getRng(),n=s.selection.getNode(),r=s.dom.getParent(t.startContainer,"TD,TH");if(e(s,t,n,r)){r||(r=n);for(var i=r.lastChild;i.lastChild;)i=i.lastChild;3==i.nodeType&&(t.setEnd(i,i.data.length),s.selection.setRng(t))}}s.on("KeyDown",function(){t()}),s.on("MouseDown",function(e){2!=e.button&&t()})}function f(){function t(e){s.selection.select(e,!0),s.selection.collapse(!0)}function n(e){s.$(e).empty(),i.paddCell(e)}s.on("keydown",function(i){if((i.keyCode==e.DELETE||i.keyCode==e.BACKSPACE)&&!i.isDefaultPrevented()){var o,a,l,c;if(o=s.dom.getParent(s.selection.getStart(),"table")){if(a=s.dom.select("td,th",o),l=r.grep(a,function(e){return!!s.dom.getAttrib(e,"data-mce-selected")}),0===l.length)return c=s.dom.getParent(s.selection.getStart(),"td,th"),void(s.selection.isCollapsed()&&c&&s.dom.isEmpty(c)&&(i.preventDefault(),n(c),t(c)));i.preventDefault(),s.undoManager.transact(function(){a.length==l.length?s.execCommand("mceTableDelete"):(r.each(l,n),t(l[0]))})}}})}function p(){var t=function(e){return e&&"CAPTION"==e.nodeName&&"TABLE"==e.parentNode.nodeName},r=function(e,t){var n=s.selection.getRng(),r=e.ownerDocument.createTextNode("\xa0");n.startOffset?e.insertBefore(r,e.firstChild):e.appendChild(r),t&&(s.selection.select(r,!0),s.selection.collapse(!0))},i=function(t){return(t.keyCode==e.DELETE||t.keyCode==e.BACKSPACE)&&!t.isDefaultPrevented()},o=function(e){return e.firstChild===e.lastChild&&e.firstChild},a=function(e){return e&&3===e.nodeType},l=function(e){var t=o(e);return a(t)&&1===t.data.length?t.data:null},c=function(e){var t=o(e),n=l(e);return t&&!a(t)||n&&!d(n)},u=function(e){return s.dom.isEmpty(e)||d(l(e))},d=function(e){return"\xa0"===e};s.on("keydown",function(e){if(i(e)){var o=s.dom.getParent(s.selection.getStart(),"caption");t(o)&&(n.ie&&(s.selection.isCollapsed()?c(o)&&r(o):(s.undoManager.transact(function(){s.execCommand("Delete"),u(o)&&r(o,!0)}),e.preventDefault())),u(o)&&e.preventDefault())}})}f(),p(),n.webkit&&(l(),d()),n.gecko&&(c(),u()),n.ie>9&&(c(),u())}}),r("tinymce/tableplugin/CellSelection",["tinymce/tableplugin/TableGrid","tinymce/dom/TreeWalker","tinymce/util/Tools"],function(e,t,n){return function(r,i){function o(e){r.getBody().style.webkitUserSelect="",(e||g)&&(r.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected"),g=!1)}function a(e,t){return!(!e||!t)&&e===m.getParent(t,"table")}function s(t){var n,o,s=t.target;if(!f&&!p&&s!==d&&(d=s,u&&c)){if(o=m.getParent(s,"td,th"),a(u,o)||(o=m.getParent(u,"td,th")),c===o&&!g)return;if(i(!0),a(u,o)){t.preventDefault(),l||(l=new e(r,u,c),r.getBody().style.webkitUserSelect="none"),l.setEndCell(o),g=!0,n=r.selection.getSel();try{n.removeAllRanges?n.removeAllRanges():n.empty()}catch(e){}}}}var l,c,u,d,f,p,m=r.dom,g=!0,h=function(){c=l=u=d=null,i(!1)};return r.on("SelectionChange",function(e){g&&e.stopImmediatePropagation()},!0),r.on("MouseDown",function(e){2==e.button||f||p||(o(),c=m.getParent(e.target,"td,th"),u=m.getParent(c,"table"))}),r.on("mouseover",s),r.on("remove",function(){m.unbind(r.getDoc(),"mouseover",s),o()}),r.on("MouseUp",function(){function e(e,r){var o=new t(e,e);do{if(3==e.nodeType&&0!==n.trim(e.nodeValue).length)return void(r?i.setStart(e,0):i.setEnd(e,e.nodeValue.length));if("BR"==e.nodeName)return void(r?i.setStartBefore(e):i.setEndBefore(e))}while(e=r?o.next():o.prev())}var i,o,a,s,u,d=r.selection;if(c){if(l&&(r.getBody().style.webkitUserSelect=""),o=m.select("td[data-mce-selected],th[data-mce-selected]"),o.length>0){i=m.createRng(),s=o[0],i.setStartBefore(s),i.setEndAfter(s),e(s,1),a=new t(s,m.getParent(o[0],"table"));do if("TD"==s.nodeName||"TH"==s.nodeName){if(!m.getAttrib(s,"data-mce-selected"))break;u=s}while(s=a.next());e(u),d.setRng(i)}r.nodeChanged(),h()}}),r.on("KeyUp Drop SetContent",function(e){o("setcontent"==e.type),h(),f=!1}),r.on("ObjectResizeStart ObjectResized",function(e){f="objectresized"!=e.type}),r.on("dragstart",function(){p=!0}),r.on("drop dragend",function(){p=!1}),{clear:o}}}),r("tinymce/tableplugin/Dialogs",["tinymce/util/Tools","tinymce/Env"],function(e,t){var n=e.each;return function(r){function i(){var e=r.settings.color_picker_callback;if(e)return function(){var t=this;e.call(r,function(e){t.value(e).fire("change")},t.value())}}function o(e){return{title:"Advanced",type:"form",defaults:{onchange:function(){d(e,this.parents().reverse()[0],"style"==this.name())}},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border color",type:"colorbox",name:"borderColor",onaction:i()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:i()}]}]}}function a(e){return e?e.replace(/px$/,""):""}function s(e){return/^[0-9]+$/.test(e)&&(e+="px"),e}function l(e){n("left center right".split(" "),function(t){r.formatter.remove("align"+t,{},e)})}function c(e){n("top middle bottom".split(" "),function(t){r.formatter.remove("valign"+t,{},e)})}function u(t,n,r){function i(t,r){return r=r||[],e.each(t,function(e){var t={text:e.text||e.title};e.menu?t.menu=i(e.menu):(t.value=e.value,n&&n(t)),r.push(t)}),r}return i(t,r||[])}function d(e,t,n){var r=t.toJSON(),i=e.parseStyle(r.style);n?(t.find("#borderColor").value(i["border-color"]||"")[0].fire("change"),t.find("#backgroundColor").value(i["background-color"]||"")[0].fire("change")):(i["border-color"]=r.borderColor,i["background-color"]=r.backgroundColor),t.find("#style").value(e.serializeStyle(e.parseStyle(e.serializeStyle(i))))}function f(e,t,n){var r=e.parseStyle(e.getAttrib(n,"style"));r["border-color"]&&(t.borderColor=r["border-color"]),r["background-color"]&&(t.backgroundColor=r["background-color"]),t.style=e.serializeStyle(r)}function p(e,t,r){var i=e.parseStyle(e.getAttrib(t,"style"));n(r,function(e){i[e.name]=e.value}),e.setAttrib(t,"style",e.serializeStyle(e.parseStyle(e.serializeStyle(i))))}var m=this;m.tableProps=function(){m.table(!0)},m.table=function(i){function c(){function n(e,t,r){if("TD"===e.tagName||"TH"===e.tagName)C.setStyle(e,t,r);else if(e.children)for(var i=0;i<e.children.length;i++)n(e.children[i],t,r)}var i;d(C,this),w=e.extend(w,this.toJSON()),w["class"]===!1&&delete w["class"],r.undoManager.transact(function(){if(g||(g=r.plugins.table.insertTable(w.cols||1,w.rows||1)),r.dom.setAttribs(g,{style:w.style,"class":w["class"]}),r.settings.table_style_by_css){if(x=[],x.push({name:"border",value:w.border}),x.push({name:"border-spacing",value:s(w.cellspacing)}),p(C,g,x),C.setAttribs(g,{"data-mce-border-color":w.borderColor,"data-mce-cell-padding":w.cellpadding,"data-mce-border":w.border}),g.children)for(var e=0;e<g.children.length;e++)n(g.children[e],"border",w.border),n(g.children[e],"padding",s(w.cellpadding))}else r.dom.setAttribs(g,{border:w.border,cellpadding:w.cellpadding,cellspacing:w.cellspacing});C.getAttrib(g,"width")&&!r.settings.table_style_by_css?C.setAttrib(g,"width",a(w.width)):C.setStyle(g,"width",s(w.width)),C.setStyle(g,"height",s(w.height)),i=C.select("caption",g)[0],i&&!w.caption&&C.remove(i),!i&&w.caption&&(i=C.create("caption"),i.innerHTML=t.ie?"\xa0":'<br data-mce-bogus="1"/>',g.insertBefore(i,g.firstChild)),l(g),w.align&&r.formatter.apply("align"+w.align,{},g),r.focus(),r.addVisual()})}function m(e,t){function n(e,n){for(var r=0;r<n.length;r++){var i=C.getStyle(n[r],t);if("undefined"==typeof e&&(e=i),e!=i)return""}return e}var i,o=r.dom.select("td,th",e);return i=n(i,o)}var g,h,v,b,y,x,C=r.dom,w={};i===!0?(g=C.getParent(r.selection.getStart(),"table"),g&&(w={width:a(C.getStyle(g,"width")||C.getAttrib(g,"width")),height:a(C.getStyle(g,"height")||C.getAttrib(g,"height")),cellspacing:a(C.getStyle(g,"border-spacing")||C.getAttrib(g,"cellspacing")),cellpadding:C.getAttrib(g,"data-mce-cell-padding")||C.getAttrib(g,"cellpadding")||m(g,"padding"),border:C.getAttrib(g,"data-mce-border")||C.getAttrib(g,"border")||m(g,"border"),borderColor:C.getAttrib(g,"data-mce-border-color"),caption:!!C.select("caption",g)[0],"class":C.getAttrib(g,"class")},n("left center right".split(" "),function(e){r.formatter.matchNode(g,"align"+e)&&(w.align=e)}))):(h={label:"Cols",name:"cols"},v={label:"Rows",name:"rows"}),r.settings.table_class_list&&(w["class"]&&(w["class"]=w["class"].replace(/\s*mce\-item\-table\s*/g,"")),b={name:"class",type:"listbox",label:"Class",values:u(r.settings.table_class_list,function(e){e.value&&(e.textStyle=function(){return r.formatter.getCssText({block:"table",classes:[e.value]})})})}),y={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:r.settings.table_appearance_options!==!1?[h,v,{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[h,v,{label:"Width",name:"width"},{label:"Height",name:"height"}]},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},b]},r.settings.table_advtab!==!1?(f(C,w,g),r.windowManager.open({title:"Table properties",data:w,bodyType:"tabpanel",body:[{title:"General",type:"form",items:y},o(C)],onsubmit:c})):r.windowManager.open({title:"Table properties",data:w,body:y,onsubmit:c})},m.merge=function(e,t){r.windowManager.open({title:"Merge cells",body:[{label:"Cols",name:"cols",type:"textbox",value:"1",size:10},{label:"Rows",name:"rows",type:"textbox",value:"1",size:10}],onsubmit:function(){var n=this.toJSON();r.undoManager.transact(function(){e.merge(t,n.cols,n.rows)})}})},m.cell=function(){function t(e,t,n){(1===b.length||n)&&v.setAttrib(e,t,n)}function i(e,t,n){(1===b.length||n)&&v.setStyle(e,t,n)}function p(){d(v,this),g=e.extend(g,this.toJSON()),r.undoManager.transact(function(){n(b,function(e){t(e,"scope",g.scope),t(e,"style",g.style),t(e,"class",g["class"]),i(e,"width",s(g.width)),i(e,"height",s(g.height)),g.type&&e.nodeName.toLowerCase()!==g.type&&(e=v.rename(e,g.type)),1===b.length&&(l(e),c(e)),g.align&&r.formatter.apply("align"+g.align,{},e),g.valign&&r.formatter.apply("valign"+g.valign,{},e)}),r.focus()})}var m,g,h,v=r.dom,b=[];if(b=r.dom.select("td[data-mce-selected],th[data-mce-selected]"),m=r.dom.getParent(r.selection.getStart(),"td,th"),!b.length&&m&&b.push(m),m=m||b[0]){b.length>1?g={width:"",height:"",scope:"","class":"",align:"",style:"",type:m.nodeName.toLowerCase()}:(g={width:a(v.getStyle(m,"width")||v.getAttrib(m,"width")),height:a(v.getStyle(m,"height")||v.getAttrib(m,"height")),scope:v.getAttrib(m,"scope"),"class":v.getAttrib(m,"class")},g.type=m.nodeName.toLowerCase(),n("left center right".split(" "),function(e){r.formatter.matchNode(m,"align"+e)&&(g.align=e)}),n("top middle bottom".split(" "),function(e){r.formatter.matchNode(m,"valign"+e)&&(g.valign=e)}),f(v,g,m)),r.settings.table_cell_class_list&&(h={name:"class",type:"listbox",label:"Class",values:u(r.settings.table_cell_class_list,function(e){e.value&&(e.textStyle=function(){return r.formatter.getCssText({block:"td",classes:[e.value]})})})});var y={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},h]};r.settings.table_cell_advtab!==!1?r.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:g,body:[{title:"General",type:"form",items:y},o(v)],onsubmit:p}):r.windowManager.open({title:"Cell properties",data:g,body:y,onsubmit:p})}},m.row=function(){function t(e,t,n){(1===x.length||n)&&y.setAttrib(e,t,n)}function i(e,t,n){(1===x.length||n)&&y.setStyle(e,t,n)}function c(){var o,a,c;d(y,this),v=e.extend(v,this.toJSON()),r.undoManager.transact(function(){var e=v.type;n(x,function(n){t(n,"scope",v.scope),t(n,"style",v.style),t(n,"class",v["class"]),i(n,"height",s(v.height)),e!==n.parentNode.nodeName.toLowerCase()&&(o=y.getParent(n,"table"),a=n.parentNode,c=y.select(e,o)[0],c||(c=y.create(e),o.firstChild?o.insertBefore(c,o.firstChild):o.appendChild(c)),c.appendChild(n),a.hasChildNodes()||y.remove(a)),1===x.length&&l(n),v.align&&r.formatter.apply("align"+v.align,{},n)}),r.focus()})}var p,m,g,h,v,b,y=r.dom,x=[];p=r.dom.getParent(r.selection.getStart(),"table"),m=r.dom.getParent(r.selection.getStart(),"td,th"),n(p.rows,function(e){n(e.cells,function(t){if(y.getAttrib(t,"data-mce-selected")||t==m)return x.push(e),!1})}),g=x[0],g&&(x.length>1?v={height:"",scope:"","class":"",align:"",type:g.parentNode.nodeName.toLowerCase()}:(v={height:a(y.getStyle(g,"height")||y.getAttrib(g,"height")),scope:y.getAttrib(g,"scope"),"class":y.getAttrib(g,"class")},v.type=g.parentNode.nodeName.toLowerCase(),n("left center right".split(" "),function(e){r.formatter.matchNode(g,"align"+e)&&(v.align=e)}),f(y,v,g)),r.settings.table_row_class_list&&(h={name:"class",type:"listbox",label:"Class",values:u(r.settings.table_row_class_list,function(e){e.value&&(e.textStyle=function(){return r.formatter.getCssText({block:"tr",classes:[e.value]})})})}),b={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"Header",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},h]},r.settings.table_row_advtab!==!1?r.windowManager.open({title:"Row properties",data:v,bodyType:"tabpanel",body:[{title:"General",type:"form",items:b},o(y)],onsubmit:c}):r.windowManager.open({title:"Row properties",data:v,body:b,onsubmit:c}))}}}),r("tinymce/tableplugin/ResizeBars",["tinymce/util/Tools","tinymce/util/VK"],function(e,n){var r;return function(i){function o(e,t){return{index:e,y:i.dom.getPos(t).y}}function a(e,t){return{index:e,y:i.dom.getPos(t).y+t.offsetHeight}}function s(e,t){return{index:e,x:i.dom.getPos(t).x}}function l(e,t){return{index:e,x:i.dom.getPos(t).x+t.offsetWidth}}function c(){var e=i.getBody().dir;return"rtl"===e}function u(){return i.inline}function d(){return u?i.getBody().ownerDocument.body:i.getBody()}function f(e,t){return c()?l(e,t):s(e,t)}function p(e,t){return c()?s(e,t):l(e,t)}function m(e,t){return g(e,"width")/g(t,"width")*100}function g(e,t){var n=i.dom.getStyle(e,t,!0),r=parseInt(n,10);return r}function h(e){var t=g(e,"width"),n=g(e.parentElement,"width");return t/n*100}function v(e,t){var n=g(e,"width");return t/n*100}function b(e,t){var n=g(e.parentElement,"width");return t/n*100}function y(e,t,n){for(var r=[],i=1;i<n.length;i++){var o=n[i].element;r.push(e(i-1,o))}var a=n[n.length-1];return r.push(t(n.length-1,a.element)),r}function x(){var t=i.dom.select("."+fe,d());e.each(t,function(e){i.dom.remove(e)})}function C(e){x(),B(e)}function w(e,t,n,r,i,o,a,s){var l={"data-mce-bogus":"all","class":fe+" "+e,unselectable:"on","data-mce-resize":!1,style:"cursor: "+t+"; margin: 0; padding: 0; position: absolute; left: "+n+"px; top: "+r+"px; height: "+i+"px; width: "+o+"px; "};return l[a]=s,l}function N(t,n,r){e.each(t,function(e){var t=r.x,o=e.y-Ce/2,a=Ce,s=n;i.dom.add(d(),"div",w(pe,me,t,o,a,s,ge,e.index))})}function k(t,n,r){e.each(t,function(e){var t=e.x-Ce/2,o=r.y,a=n,s=Ce;i.dom.add(d(),"div",w(ve,be,t,o,a,s,ye,e.index))})}function S(t){return e.map(t.rows,function(t){var n=e.map(t.cells,function(e){var t=e.hasAttribute("rowspan")?parseInt(e.getAttribute("rowspan"),10):1,n=e.hasAttribute("colspan")?parseInt(e.getAttribute("colspan"),10):1;return{element:e,rowspan:t,colspan:n}});return{element:t,cells:n}})}function _(n){function r(e,t){return e+","+t}function i(e,t){return s[r(e,t)]}function o(){var t=[];return e.each(l,function(e){t=t.concat(e.cells)}),t}function a(){return l}var s={},l=[],c=0,u=0;return e.each(n,function(n,i){var o=[];e.each(n.cells,function(e){for(var n=0;s[r(i,n)]!==t;)n++;for(var a={element:e.element,colspan:e.colspan,rowspan:e.rowspan,rowIndex:i,colIndex:n},l=0;l<e.colspan;l++)for(var d=0;d<e.rowspan;d++){var f=i+d,p=n+l;s[r(f,p)]=a,c=Math.max(c,f+1),u=Math.max(u,p+1)}o.push(a)}),l.push({element:n.element,cells:o})}),{grid:{maxRows:c,maxCols:u},getAt:i,getAllCells:o,getAllRows:a}}function E(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}function T(e,t,n){for(var r,i=e(),o=0;o<i.length;o++)t(i[o])&&(r=i[o]);return r?r:n()}function R(t){var n=E(0,t.grid.maxCols),r=E(0,t.grid.maxRows);return e.map(n,function(e){function n(){for(var n=[],i=0;i<r.length;i++){var o=t.getAt(i,e);o&&o.colIndex===e&&n.push(o)}return n}function i(e){return 1===e.colspan}function o(){for(var n,i=0;i<r.length;i++)if(n=t.getAt(i,e))return n;return null}return T(n,i,o)})}function A(t){var n=E(0,t.grid.maxCols),r=E(0,t.grid.maxRows);return e.map(r,function(e){function r(){for(var r=[],i=0;i<n.length;i++){var o=t.getAt(e,i);o&&o.rowIndex===e&&r.push(o)}return r}function i(e){return 1===e.rowspan}function o(){return t.getAt(e,0)}return T(r,i,o);
2
- })}function B(e){var t=S(e),n=_(t),r=A(n),s=R(n),l=i.dom.getPos(e),c=r.length>0?y(o,a,r):[],u=s.length>0?y(f,p,s):[];N(c,e.offsetWidth,l),k(u,e.offsetHeight,l)}function P(e,t,n,r){if(t<0||t>=e.length-1)return"";var i=e[t];if(i)i={value:i,delta:0};else for(var o=e.slice(0,t).reverse(),a=0;a<o.length;a++)o[a]&&(i={value:o[a],delta:a+1});var s=e[t+1];if(s)s={value:s,delta:1};else for(var l=e.slice(t+1),c=0;c<l.length;c++)l[c]&&(s={value:l[c],delta:c+1});var u=s.delta-i.delta,d=Math.abs(s.value-i.value)/u;return n?d/g(r,"width")*100:d}function D(e,t){var n=i.dom.getStyle(e,t);return n||(n=i.dom.getAttrib(e,t)),n||(n=i.dom.getStyle(e,t,!0)),n}function M(e,t,n){var r=D(e,"width"),i=parseInt(r,10),o=t?m(e,n):g(e,"width");return(t&&!V(r)||!t&&!$(r))&&(i=0),!isNaN(i)&&i>0?i:o}function L(t,n,r){for(var i=R(t),o=e.map(i,function(e){return f(e.colIndex,e.element).x}),a=[],s=0;s<i.length;s++){var l=i[s].element.hasAttribute("colspan")?parseInt(i[s].element.getAttribute("colspan"),10):1,c=l>1?P(o,s):M(i[s].element,n,r);c=c?c:we,a.push(c)}return a}function I(e){var t=D(e,"height"),n=parseInt(t,10);return V(t)&&(n=0),!isNaN(n)&&n>0?n:g(e,"height")}function O(t){for(var n=A(t),r=e.map(n,function(e){return o(e.rowIndex,e.element).y}),i=[],a=0;a<n.length;a++){var s=n[a].element.hasAttribute("rowspan")?parseInt(n[a].element.getAttribute("rowspan"),10):1,l=s>1?P(r,a):I(n[a].element);l=l?l:Ne,i.push(l)}return i}function H(t,n,r,i,o){function a(t){return e.map(t,function(){return 0})}function s(){var e;if(o)e=[100-d[0]];else{var t=Math.max(i,d[0]+r);e=[t-d[0]]}return e}function l(e,t){var n,o=a(d.slice(0,e)),s=a(d.slice(t+1));if(r>=0){var l=Math.max(i,d[t]-r);n=o.concat([r,l-d[t]]).concat(s)}else{var c=Math.max(i,d[e]+r),u=d[e]-c;n=o.concat([c-d[e],u]).concat(s)}return n}function c(e,t){var n,o=a(d.slice(0,t));if(r>=0)n=o.concat([r]);else{var s=Math.max(i,d[t]+r);n=o.concat([s-d[t]])}return n}var u,d=t.slice(0);return u=0===t.length?[]:1===t.length?s():0===n?l(0,1):n>0&&n<t.length-1?l(n,n+1):n===t.length-1?c(n-1,n):[]}function F(e,t,n){for(var r=0,i=e;i<t;i++)r+=n[i];return r}function z(t,n){var r=t.getAllCells();return e.map(r,function(e){var t=F(e.colIndex,e.colIndex+e.colspan,n);return{element:e.element,width:t,colspan:e.colspan}})}function W(t,n){var r=t.getAllCells();return e.map(r,function(e){var t=F(e.rowIndex,e.rowIndex+e.rowspan,n);return{element:e.element,height:t,rowspan:e.rowspan}})}function U(t,n){var r=t.getAllRows();return e.map(r,function(e,t){return{element:e.element,height:n[t]}})}function V(e){return Se.test(e)}function $(e){return _e.test(e)}function j(t,n,r){function o(t,n){e.each(t,function(e){i.dom.setStyle(e.element,"width",e.width+n),i.dom.setAttrib(e.element,"width",null)})}function a(){return r<u.grid.maxCols-1?h(t):h(t)+b(t,n)}function s(){return r<u.grid.maxCols-1?g(t,"width"):g(t,"width")+n}function l(e,n,o){r!=u.grid.maxCols-1&&o||(i.dom.setStyle(t,"width",e+n),i.dom.setAttrib(t,"width",null))}for(var c=S(t),u=_(c),d=V(t.width)||V(t.style.width),f=L(u,d,t),p=d?v(t,n):n,m=H(f,r,p,we,d,t),y=[],x=0;x<m.length;x++)y.push(m[x]+f[x]);var C=z(u,y),w=d?"%":"px",N=d?a():s();i.undoManager.transact(function(){o(C,w),l(N,w,d)})}function q(t,n,r){for(var o=S(t),a=_(o),s=O(a),l=[],c=0,u=0;u<s.length;u++)l.push(u===r?n+s[u]:s[u]),c+=c[u];var d=W(a,l),f=U(a,l);i.undoManager.transact(function(){e.each(f,function(e){i.dom.setStyle(e.element,"height",e.height+"px"),i.dom.setAttrib(e.element,"height",null)}),e.each(d,function(e){i.dom.setStyle(e.element,"height",e.height+"px"),i.dom.setAttrib(e.element,"height",null)}),i.dom.setStyle(t,"height",c+"px"),i.dom.setAttrib(t,"height",null)})}function Y(){ae=setTimeout(function(){J()},200)}function X(){clearTimeout(ae)}function K(){var e=document.createElement("div");return e.setAttribute("style","margin: 0; padding: 0; position: fixed; left: 0px; top: 0px; height: 100%; width: 100%;"),e.setAttribute("data-mce-bogus","all"),e}function G(e,t){i.dom.bind(e,"mouseup",function(){J()}),i.dom.bind(e,"mousemove",function(e){X(),se&&t(e)}),i.dom.bind(e,"mouseout",function(){Y()})}function J(){if(i.dom.remove(le),se){i.dom.removeClass(ce,ke),se=!1;var e,t;if(Q(ce)){var n=parseInt(i.dom.getAttrib(ce,xe),10),o=i.dom.getPos(ce).x;e=parseInt(i.dom.getAttrib(ce,ye),10),t=c()?n-o:o-n,Math.abs(t)>=1&&j(r,t,e)}else if(ee(ce)){var a=parseInt(i.dom.getAttrib(ce,he),10),s=i.dom.getPos(ce).y;e=parseInt(i.dom.getAttrib(ce,ge),10),t=s-a,Math.abs(t)>=1&&q(r,t,e)}C(r),i.nodeChanged()}}function Z(e,t){le=le?le:K(),se=!0,i.dom.addClass(e,ke),ce=e,G(le,t),i.dom.add(d(),le)}function Q(e){return i.dom.hasClass(e,ve)}function ee(e){return i.dom.hasClass(e,pe)}function te(e){ue=ue!==t?ue:e.clientX;var n=e.clientX-ue;ue=e.clientX;var r=i.dom.getPos(ce).x;i.dom.setStyle(ce,"left",r+n+"px")}function ne(e){de=de!==t?de:e.clientY;var n=e.clientY-de;de=e.clientY;var r=i.dom.getPos(ce).y;i.dom.setStyle(ce,"top",r+n+"px")}function re(e){ue=t,Z(e,te)}function ie(e){de=t,Z(e,ne)}function oe(e){var t=e.target,n=i.getBody();if(i.$.contains(n,r)||r===n)if(Q(t)){e.preventDefault();var o=i.dom.getPos(t).x;i.dom.setAttrib(t,xe,o),re(t)}else if(ee(t)){e.preventDefault();var a=i.dom.getPos(t).y;i.dom.setAttrib(t,he,a),ie(t)}else x()}var ae,se,le,ce,ue,de,fe="mce-resize-bar",pe="mce-resize-bar-row",me="row-resize",ge="data-row",he="data-initial-top",ve="mce-resize-bar-col",be="col-resize",ye="data-col",xe="data-initial-left",Ce=4,we=10,Ne=10,ke="mce-resize-bar-dragging",Se=new RegExp(/(\d+(\.\d+)?%)/),_e=new RegExp(/px|em/);return i.on("init",function(){i.dom.bind(d(),"mousedown",oe)}),i.on("ObjectResized",function(t){var n=t.target;if("TABLE"===n.nodeName){var r=[];e.each(n.rows,function(t){e.each(t.cells,function(e){var t=i.dom.getStyle(e,"width",!0);r.push({cell:e,width:t})})}),e.each(r,function(e){i.dom.setStyle(e.cell,"width",e.width),i.dom.setAttrib(e.cell,"width",null)})}}),i.on("mouseover",function(e){if(!se){var t=i.dom.getParent(e.target,"table");("TABLE"===e.target.nodeName||t)&&(r=t,C(t))}}),i.on("keydown",function(e){switch(e.keyCode){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:x()}}),i.on("remove",function(){x(),i.dom.unbind(d(),"mousedown",oe)}),{adjustWidth:j,adjustHeight:q,clearBars:x,drawBars:B,determineDeltas:H,getTableGrid:_,getTableDetails:S,getWidths:L,getPixelHeights:O,isPercentageBasedSize:V,isPixelBasedSize:$,recalculateWidths:z,recalculateCellHeights:W,recalculateRowHeights:U}}}),r("tinymce/tableplugin/Plugin",["tinymce/tableplugin/TableGrid","tinymce/tableplugin/Quirks","tinymce/tableplugin/CellSelection","tinymce/tableplugin/Dialogs","tinymce/tableplugin/ResizeBars","tinymce/util/Tools","tinymce/dom/TreeWalker","tinymce/Env","tinymce/PluginManager"],function(e,t,n,r,i,o,a,s,l){function c(o){function a(e){return function(){o.execCommand(e)}}function l(e,t){var n,r,i,a;for(i='<table id="__mce"><tbody>',n=0;n<t;n++){for(i+="<tr>",r=0;r<e;r++)i+="<td>"+(s.ie&&s.ie<10?"&nbsp;":"<br>")+"</td>";i+="</tr>"}return i+="</tbody></table>",o.undoManager.transact(function(){o.insertContent(i),a=o.dom.get("__mce"),o.dom.setAttrib(a,"id",null),o.$("tr",a).each(function(e,t){o.fire("newrow",{node:t}),o.$("th,td",t).each(function(e,t){o.fire("newcell",{node:t})})}),o.dom.setAttribs(a,o.settings.table_default_attributes||{}),o.dom.setStyles(a,o.settings.table_default_styles||{})}),a}function c(e,t,n){function r(){var r,i,a,s={},l=0;i=o.dom.select("td[data-mce-selected],th[data-mce-selected]"),r=i[0],r||(r=o.selection.getStart()),n&&i.length>0?(u(i,function(e){return s[e.parentNode.parentNode.nodeName]=1}),u(s,function(e){l+=e}),a=1!==l):a=!o.dom.getParent(r,t),e.disabled(a),o.selection.selectorChanged(t,function(t){e.disabled(!t)})}o.initialized?r():o.on("init",r)}function d(){c(this,"table")}function f(){c(this,"td,th")}function p(){c(this,"td,th",!0)}function m(){var e="";e='<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';for(var t=0;t<10;t++){e+="<tr>";for(var n=0;n<10;n++)e+='<td role="gridcell" tabindex="-1"><a id="mcegrid'+(10*t+n)+'" href="#" data-mce-x="'+n+'" data-mce-y="'+t+'"></a></td>';e+="</tr>"}return e+="</table>",e+='<div class="mce-text-center" role="presentation">1 x 1</div>'}function g(e,t,n){var r,i,a,s,l,c=n.getEl().getElementsByTagName("table")[0],u=n.isRtl()||"tl-tr"==n.parent().rel;for(c.nextSibling.innerHTML=e+1+" x "+(t+1),u&&(e=9-e),i=0;i<10;i++)for(r=0;r<10;r++)s=c.rows[i].childNodes[r].firstChild,l=(u?r>=e:r<=e)&&i<=t,o.dom.toggleClass(s,"mce-active",l),l&&(a=s);return a.parentNode}function h(){o.addButton("tableprops",{title:"Table properties",onclick:k.tableProps,icon:"table"}),o.addButton("tabledelete",{title:"Delete table",onclick:a("mceTableDelete")}),o.addButton("tablecellprops",{title:"Cell properties",onclick:a("mceTableCellProps")}),o.addButton("tablemergecells",{title:"Merge cells",onclick:a("mceTableMergeCells")}),o.addButton("tablesplitcells",{title:"Split cell",onclick:a("mceTableSplitCells")}),o.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:a("mceTableInsertRowBefore")}),o.addButton("tableinsertrowafter",{title:"Insert row after",onclick:a("mceTableInsertRowAfter")}),o.addButton("tabledeleterow",{title:"Delete row",onclick:a("mceTableDeleteRow")}),o.addButton("tablerowprops",{title:"Row properties",onclick:a("mceTableRowProps")}),o.addButton("tablecutrow",{title:"Cut row",onclick:a("mceTableCutRow")}),o.addButton("tablecopyrow",{title:"Copy row",onclick:a("mceTableCopyRow")}),o.addButton("tablepasterowbefore",{title:"Paste row before",onclick:a("mceTablePasteRowBefore")}),o.addButton("tablepasterowafter",{title:"Paste row after",onclick:a("mceTablePasteRowAfter")}),o.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:a("mceTableInsertColBefore")}),o.addButton("tableinsertcolafter",{title:"Insert column after",onclick:a("mceTableInsertColAfter")}),o.addButton("tabledeletecol",{title:"Delete column",onclick:a("mceTableDeleteCol")})}function v(e){var t=o.dom.is(e,"table")&&o.getBody().contains(e);return t}function b(){var e=o.settings.table_toolbar;""!==e&&e!==!1&&(e||(e="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),o.addContextToolbar(v,e))}function y(){return C}function x(e){C=e}var C,w,N=this,k=new r(o);!o.settings.object_resizing||o.settings.table_resize_bars===!1||o.settings.object_resizing!==!0&&"table"!==o.settings.object_resizing||(w=i(o)),o.settings.table_grid===!1?o.addMenuItem("inserttable",{text:"Table",icon:"table",context:"table",onclick:k.table}):o.addMenuItem("inserttable",{text:"Table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(e){e.aria&&(this.parent().hideAll(),e.stopImmediatePropagation(),k.table())},onshow:function(){g(0,0,this.menu.items()[0])},onhide:function(){var e=this.menu.items()[0].getEl().getElementsByTagName("a");o.dom.removeClass(e,"mce-active"),o.dom.addClass(e[0],"mce-active")},menu:[{type:"container",html:m(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(e){var t,n,r=e.target;"A"==r.tagName.toUpperCase()&&(t=parseInt(r.getAttribute("data-mce-x"),10),n=parseInt(r.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(t=9-t),t===this.lastX&&n===this.lastY||(g(t,n,e.control),this.lastX=t,this.lastY=n))},onclick:function(e){var t=this;"A"==e.target.tagName.toUpperCase()&&(e.preventDefault(),e.stopPropagation(),t.parent().cancel(),o.undoManager.transact(function(){l(t.lastX+1,t.lastY+1)}),o.addVisual())}}]}),o.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:d,onclick:k.tableProps}),o.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:d,cmd:"mceTableDelete"}),o.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:a("mceTableCellProps"),onPostRender:f},{text:"Merge cells",onclick:a("mceTableMergeCells"),onPostRender:p},{text:"Split cell",onclick:a("mceTableSplitCells"),onPostRender:f}]}),o.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:a("mceTableInsertRowBefore"),onPostRender:f},{text:"Insert row after",onclick:a("mceTableInsertRowAfter"),onPostRender:f},{text:"Delete row",onclick:a("mceTableDeleteRow"),onPostRender:f},{text:"Row properties",onclick:a("mceTableRowProps"),onPostRender:f},{text:"-"},{text:"Cut row",onclick:a("mceTableCutRow"),onPostRender:f},{text:"Copy row",onclick:a("mceTableCopyRow"),onPostRender:f},{text:"Paste row before",onclick:a("mceTablePasteRowBefore"),onPostRender:f},{text:"Paste row after",onclick:a("mceTablePasteRowAfter"),onPostRender:f}]}),o.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:a("mceTableInsertColBefore"),onPostRender:f},{text:"Insert column after",onclick:a("mceTableInsertColAfter"),onPostRender:f},{text:"Delete column",onclick:a("mceTableDeleteCol"),onPostRender:f}]});var S=[];u("inserttable tableprops deletetable | cell row column".split(" "),function(e){"|"==e?S.push({text:"-"}):S.push(o.menuItems[e])}),o.addButton("table",{type:"menubutton",title:"Table",menu:S}),s.isIE||o.on("click",function(e){e=e.target,"TABLE"===e.nodeName&&(o.selection.select(e),o.nodeChanged())}),N.quirks=new t(o),o.on("Init",function(){N.cellSelection=new n(o,function(e){e&&w&&w.clearBars()}),N.resizeBars=w}),o.on("PreInit",function(){o.serializer.addAttributeFilter("data-mce-cell-padding,data-mce-border,data-mce-border-color",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})}),u({mceTableSplitCells:function(e){e.split()},mceTableMergeCells:function(e){var t;t=o.dom.getParent(o.selection.getStart(),"th,td"),o.dom.select("td[data-mce-selected],th[data-mce-selected]").length?e.merge():k.merge(e,t)},mceTableInsertRowBefore:function(e){e.insertRows(!0)},mceTableInsertRowAfter:function(e){e.insertRows()},mceTableInsertColBefore:function(e){e.insertCols(!0)},mceTableInsertColAfter:function(e){e.insertCols()},mceTableDeleteCol:function(e){e.deleteCols()},mceTableDeleteRow:function(e){e.deleteRows()},mceTableCutRow:function(e){C=e.cutRows()},mceTableCopyRow:function(e){C=e.copyRows()},mceTablePasteRowBefore:function(e){e.pasteRows(C,!0)},mceTablePasteRowAfter:function(e){e.pasteRows(C)},mceSplitColsBefore:function(e){e.splitCols(!0)},mceSplitColsAfter:function(e){e.splitCols(!1)},mceTableDelete:function(e){w&&w.clearBars(),e.deleteTable()}},function(t,n){o.addCommand(n,function(){var n=new e(o);n&&(t(n),o.execCommand("mceRepaint"),N.cellSelection.clear())})}),u({mceInsertTable:k.table,mceTableProps:function(){k.table(!0)},mceTableRowProps:k.row,mceTableCellProps:k.cell},function(e,t){o.addCommand(t,function(t,n){e(n)})}),h(),b(),o.settings.table_tab_navigation!==!1&&o.on("keydown",function(t){var n,r,i;9==t.keyCode&&(n=o.dom.getParent(o.selection.getStart(),"th,td"),n&&(t.preventDefault(),r=new e(o),i=t.shiftKey?-1:1,o.undoManager.transact(function(){!r.moveRelIdx(n,i)&&i>0&&(r.insertRow(),r.refresh(),r.moveRelIdx(n,i))})))}),N.insertTable=l,N.setClipboardRows=x,N.getClipboardRows=y}var u=o.each;l.add("table",c)})}(window);
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("a",tinymce.util.Tools.resolve),g("6",["a"],function(a){return a("tinymce.util.Tools")}),g("8",["a"],function(a){return a("tinymce.Env")}),g("b",["8"],function(a){function b(b){(!a.ie||a.ie>9)&&(b.hasChildNodes()||(b.innerHTML='<br data-mce-bogus="1" />'))}var c=function(a){return function(b,c){b&&(c=parseInt(c,10),1===c||0===c?b.removeAttribute(a,1):b.setAttribute(a,c,1))}},d=function(a){return function(b){return parseInt(b.getAttribute(a)||1,10)}};return{setColSpan:c("colSpan"),setRowSpan:c("rowspan"),getColSpan:d("colSpan"),getRowSpan:d("rowSpan"),setSpanVal:function(a,b,d){c(b)(a,d)},getSpanVal:function(a,b){return d(b)(a)},paddCell:b}}),g("c",["6","b"],function(a,b){var c=function(a,b,c){return a[c]?a[c][b]:null},d=function(a,b,d){var e=c(a,b,d);return e?e.elm:null},e=function(a,b,e,f){var g,h,i=0,j=d(a,b,e);for(g=e;(f>0?g<a.length:g>=0)&&(h=c(a,b,g),j===h.elm);g+=f)i++;return i},f=function(a,b,c){for(var d,e=a[c],f=b;f<e.length;f++)if(d=e[f],d.real)return d.elm;return null},g=function(a,c){for(var d,f=[],g=a[c],h=0;h<g.length;h++)d=g[h],f.push({elm:d.elm,above:e(a,h,c,-1)-1,below:e(a,h,c,1)-1}),h+=b.getColSpan(d.elm)-1;return f},h=function(a,c){var d=a.elm.ownerDocument,e=d.createElement("td");return b.setColSpan(e,b.getColSpan(a.elm)),b.setRowSpan(e,c),b.paddCell(e),e},i=function(a,b,c,d){var e=f(a,c+1,d);e?e.parentNode.insertBefore(b,e):(e=f(a,0,d),e.parentNode.appendChild(b))},j=function(a,c,d,e){if(0!==c.above){b.setRowSpan(c.elm,c.above);var f=h(c,c.below+1);return i(a,f,d,e),f}return null},k=function(a,c,d,e){if(0!==c.below){b.setRowSpan(c.elm,c.above+1);var f=h(c,c.below);return i(a,f,d,e+1),f}return null},l=function(b,c,e,f){var h=g(b,e),i=d(b,c,e).parentNode,l=[];return a.each(h,function(a,c){var d=f?j(b,a,c,e):k(b,a,c,e);null!==d&&l.push(l)}),{cells:l,row:i}};return{splitAt:l}}),g("1",["6","8","b","c"],function(a,b,c,d){var e=a.each,f=c.getSpanVal,g=c.setSpanVal;return function(h,i,j){function k(){h.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected")}function l(a){return a===h.getBody()}function m(b,c){return b?(c=a.map(c.split(","),function(a){return a.toLowerCase()}),a.grep(b.childNodes,function(b){return a.inArray(c,b.nodeName.toLowerCase())!==-1})):[]}function n(){var a=0;Z=[],$=0,e(["thead","tbody","tfoot"],function(b){var c=m(i,b)[0],d=m(c,"tr");e(d,function(c,d){d+=a,e(m(c,"td,th"),function(a,c){var e,g,h,i;if(Z[d])for(;Z[d][c];)c++;for(h=f(a,"rowspan"),i=f(a,"colspan"),g=d;g<d+h;g++)for(Z[g]||(Z[g]=[]),e=c;e<c+i;e++)Z[g][e]={part:b,real:g==d&&e==c,elm:a,rowspan:h,colspan:i};$=Math.max($,c+1)})}),a+=d.length})}function o(a){return h.fire("newrow",{node:a}),a}function p(a){return h.fire("newcell",{node:a}),a}function q(a,b){return a=a.cloneNode(b),a.removeAttribute("id"),a}function r(a,b){var c;if(c=Z[b])return c[a]}function s(a,b){return a[b]?a[b]:null}function t(a,b){for(var c=[],d=0;d<a.length;d++)c.push(r(b,d));return c}function u(a){return a&&(!!ca.getAttrib(a.elm,"data-mce-selected")||a==j)}function v(){var a=[];return e(i.rows,function(b){e(b.cells,function(c){if(ca.getAttrib(c,"data-mce-selected")||j&&c==j.elm)return a.push(b),!1})}),a}function w(){var a=0;return e(Z,function(b){if(e(b,function(b){u(b)&&a++}),a)return!1}),a}function x(){var a=ca.createRng();l(i)||(a.setStartAfter(i),a.setEndAfter(i),ba.setRng(a),ca.remove(i))}function y(d){var f,i={};return h.settings.table_clone_elements!==!1&&(i=a.makeMap((h.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),a.walk(d,function(a){var c;if(3==a.nodeType)return e(ca.getParents(a.parentNode,null,d).reverse(),function(a){i[a.nodeName]&&(a=q(a,!1),f?c&&c.appendChild(a):f=c=a,c=a)}),c&&(c.innerHTML=b.ie&&b.ie<10?"&nbsp;":'<br data-mce-bogus="1" />'),!1},"childNodes"),d=q(d,!1),p(d),g(d,"rowSpan",1),g(d,"colSpan",1),f?d.appendChild(f):c.paddCell(d),d}function z(){var a,b=ca.createRng();return e(ca.select("tr",i),function(a){0===a.cells.length&&ca.remove(a)}),0===ca.select("tr",i).length?(b.setStartBefore(i),b.setEndBefore(i),ba.setRng(b),void ca.remove(i)):(e(ca.select("thead,tbody,tfoot",i),function(a){0===a.rows.length&&ca.remove(a)}),n(),void(_&&(a=Z[Math.min(Z.length-1,_.y)],a&&(ba.select(a[Math.min(a.length-1,_.x)].elm,!0),ba.collapse(!0)))))}function A(a,b,c,d){var e,f,g,h,i;for(e=Z[b][a].elm.parentNode,g=1;g<=c;g++)if(e=ca.getNext(e,"tr")){for(f=a;f>=0;f--)if(i=Z[b+g][f].elm,i.parentNode==e){for(h=1;h<=d;h++)ca.insertAfter(y(i),i);break}if(f==-1)for(h=1;h<=d;h++)e.insertBefore(y(e.cells[0]),e.cells[0])}}function B(){e(Z,function(a,b){e(a,function(a,c){var d,e,h;if(u(a)&&(a=a.elm,d=f(a,"colspan"),e=f(a,"rowspan"),d>1||e>1)){for(g(a,"rowSpan",1),g(a,"colSpan",1),h=0;h<d-1;h++)ca.insertAfter(y(a),a);A(c,b,e-1,d)}})})}function C(a,b,c){for(var d=[],e=0;e<a.length;e++)(e<b||e>c)&&d.push(a[e]);return d}function D(b){return a.grep(b,function(a){return a.real===!1})}function E(a){for(var b=[],c=0;c<a.length;c++){var d=a[c].elm;b[b.length-1]!==d&&b.push(d)}return b}function F(b,d,e,f,g){var h=0;if(g-e<1)return 0;for(var i=e+1;i<=g;i++){var j=C(s(b,i),d,f),k=D(j);j.length===k.length&&(a.each(E(k),function(a){c.setRowSpan(a,c.getRowSpan(a)-1)}),h++)}return h}function G(b,d,e,f,g){var h=0;if(f-d<1)return 0;for(var i=d+1;i<=f;i++){var j=C(t(b,i),e,g),k=D(j);j.length===k.length&&(a.each(E(k),function(a){c.setColSpan(a,c.getColSpan(a)-1)}),h++)}return h}function H(b,c,d){var f,h,i,j,k,l,m,o,p,q,s,t,v;if(b?(f=T(b),h=f.x,i=f.y,j=h+(c-1),k=i+(d-1)):(_=aa=null,e(Z,function(a,b){e(a,function(a,c){u(a)&&(_||(_={x:c,y:b}),aa={x:c,y:b})})}),_&&(h=_.x,i=_.y,j=aa.x,k=aa.y)),o=r(h,i),p=r(j,k),o&&p&&o.part==p.part){B(),n(),t=F(Z,h,i,j,k),v=G(Z,h,i,j,k),o=r(h,i).elm;var w=j-h-v+1,x=k-i-t+1;for(w===$&&x===Z.length&&(w=1,x=1),w===$&&x>1&&(x=1),g(o,"colSpan",w),g(o,"rowSpan",x),m=i;m<=k;m++)for(l=h;l<=j;l++)Z[m]&&Z[m][l]&&(b=Z[m][l].elm,b!=o&&(q=a.grep(b.childNodes),e(q,function(a){o.appendChild(a)}),q.length&&(q=a.grep(o.childNodes),s=0,e(q,function(a){"BR"==a.nodeName&&s++<q.length-1&&o.removeChild(a)})),ca.remove(b)));z()}}function I(a){var b,c,d,h,i,j,k,l,m,n;if(e(Z,function(c,d){if(e(c,function(c){if(u(c)&&(c=c.elm,i=c.parentNode,j=o(q(i,!1)),b=d,a))return!1}),a)return void 0===b}),void 0!==b){for(h=0,n=0;h<Z[0].length;h+=n)if(Z[b][h]&&(c=Z[b][h].elm,n=f(c,"colspan"),c!=d)){if(a){if(b>0&&Z[b-1][h]&&(l=Z[b-1][h].elm,m=f(l,"rowSpan"),m>1)){g(l,"rowSpan",m+1);continue}}else if(m=f(c,"rowspan"),m>1){g(c,"rowSpan",m+1);continue}k=y(c),g(k,"colSpan",c.colSpan),j.appendChild(k),d=c}j.hasChildNodes()&&(a?i.parentNode.insertBefore(j,i):ca.insertAfter(j,i))}}function J(a,b){b=b||v().length||1;for(var c=0;c<b;c++)I(a)}function K(a){var b,c;e(Z,function(c){if(e(c,function(c,d){if(u(c)&&(b=d,a))return!1}),a)return void 0===b}),e(Z,function(d,e){var h,i,j;d[b]&&(h=d[b].elm,h!=c&&(j=f(h,"colspan"),i=f(h,"rowspan"),1==j?a?(h.parentNode.insertBefore(y(h),h),A(b,e,i-1,j)):(ca.insertAfter(y(h),h),A(b,e,i-1,j)):g(h,"colSpan",h.colSpan+1),c=h))})}function L(a,b){b=b||w()||1;for(var c=0;c<b;c++)K(a)}function M(b){return a.grep(N(b),u)}function N(a){var b=[];return e(a,function(a){e(a,function(a){b.push(a)})}),b}function O(){var b=[];if(l(i)){if(1==Z[0].length)return;if(M(Z).length==N(Z).length)return}e(Z,function(c){e(c,function(c,d){u(c)&&a.inArray(b,d)===-1&&(e(Z,function(a){var b,c=a[d].elm;b=f(c,"colSpan"),b>1?g(c,"colSpan",b-1):ca.remove(c)}),b.push(d))})}),z()}function P(){function a(a){var b,c;e(a.cells,function(a){var c=f(a,"rowSpan");c>1&&(g(a,"rowSpan",c-1),b=T(a),A(b.x,b.y,1,1))}),b=T(a.cells[0]),e(Z[b.y],function(a){var b;a=a.elm,a!=c&&(b=f(a,"rowSpan"),b<=1?ca.remove(a):g(a,"rowSpan",b-1),c=a)})}var b;b=v(),l(i)&&b.length==i.rows.length||(e(b.reverse(),function(b){a(b)}),z())}function Q(){var a=v();if(!l(i)||a.length!=i.rows.length)return ca.remove(a),z(),a}function R(){var a=v();return e(a,function(b,c){a[c]=q(b,!0)}),a}function S(b,c){var h,i,j,l=[];b&&(h=d.splitAt(Z,_.x,_.y,c),i=h.row,a.each(h.cells,p),j=a.map(b,function(a){return a.cloneNode(!0)}),e(j,function(a,b,d){var h,j,k,m,n=a.cells.length,q=0;for(o(a),h=0;h<n;h++)j=a.cells[h],m=f(j,"colspan"),k=f(j,"rowspan"),q+=m,k>1&&(q--,b+k>d.length?(k=d.length-b,g(j,"rowSpan",k),l.push(d.length-1)):l.push(b+k-1)),p(j);for(e(l,function(a){b<=a&&q++}),h=q;h<$;h++)a.appendChild(y(a.cells[n-1]));for(h=$;h<q;h++)j=a.cells[a.cells.length-1],m=f(j,"colspan"),m>1?g(j,"colSpan",m-1):ca.remove(j);c?i.parentNode.insertBefore(a,i):i=ca.insertAfter(a,i)}),k())}function T(a){var b;return e(Z,function(c,d){return e(c,function(c,e){if(c.elm==a)return b={x:e,y:d},!1}),!b}),b}function U(a){_=T(a)}function V(){var a,b;return a=b=0,e(Z,function(c,d){e(c,function(c,e){var f,g;u(c)&&(c=Z[d][e],e>a&&(a=e),d>b&&(b=d),c.real&&(f=c.colspan-1,g=c.rowspan-1,f&&e+f>a&&(a=e+f),g&&d+g>b&&(b=d+g)))})}),{x:a,y:b}}function W(a){var b,c,d,e,f,g,h,i,j,l;if(aa=T(a),_&&aa){for(b=Math.min(_.x,aa.x),c=Math.min(_.y,aa.y),d=Math.max(_.x,aa.x),e=Math.max(_.y,aa.y),f=d,g=e,l=c;l<=e;l++)for(j=b;j<=d;j++)a=Z[l][j],a.real&&(h=a.colspan-1,i=a.rowspan-1,h&&j+h>f&&(f=j+h),i&&l+i>g&&(g=l+i));for(k(),l=c;l<=g;l++)for(j=b;j<=f;j++)Z[l][j]&&ca.setAttrib(Z[l][j].elm,"data-mce-selected","1")}}function X(a,b){var c,d,e;c=T(a),d=c.y*$+c.x;do{if(d+=b,e=r(d%$,Math.floor(d/$)),!e)break;if(e.elm!=a)return ba.select(e.elm,!0),ca.isEmpty(e.elm)&&ba.collapse(!0),!0}while(e.elm==a);return!1}function Y(b){if(_){var c=d.splitAt(Z,_.x,_.y,b);a.each(c.cells,p)}}var Z,$,_,aa,ba=h.selection,ca=ba.dom;i=i||ca.getParent(ba.getStart(!0),"table"),n(),j=j||ca.getParent(ba.getStart(!0),"th,td"),j&&(_=T(j),aa=V(),j=r(_.x,_.y)),a.extend(this,{deleteTable:x,split:B,merge:H,insertRow:I,insertRows:J,insertCol:K,insertCols:L,splitCols:Y,deleteCols:O,deleteRows:P,cutRows:Q,copyRows:R,pasteRows:S,getPos:T,setStartCell:U,setEndCell:W,moveRelIdx:X,refresh:n})}}),g("d",["a"],function(a){return a("tinymce.util.VK")}),g("e",["a"],function(a){return a("tinymce.util.Delay")}),g("2",["d","e","8","6","b"],function(a,b,c,d,e){var f=d.each,g=e.getSpanVal;return function(h){function i(){function c(c){function d(a,b){var d=a?"previousSibling":"nextSibling",f=h.dom.getParent(b,"tr"),g=f[d];if(g)return r(h,b,g,a),c.preventDefault(),!0;var i=h.dom.getParent(f,"table"),l=f.parentNode,m=l.nodeName.toLowerCase();if("tbody"===m||m===(a?"tfoot":"thead")){var n=e(a,i,l,"tbody");if(null!==n)return j(a,n,b)}return k(a,f,d,i)}function e(a,b,c,d){var e=h.dom.select(">"+d,b),f=e.indexOf(c);if(a&&0===f||!a&&f===e.length-1)return i(a,b);if(f===-1){var g="thead"===c.tagName.toLowerCase()?0:e.length-1;return e[g]}return e[f+(a?-1:1)]}function i(a,b){var c=a?"thead":"tfoot",d=h.dom.select(">"+c,b);return 0!==d.length?d[0]:null}function j(a,b,d){var e=l(b,a);return e&&r(h,d,e,a),c.preventDefault(),!0}function k(a,b,e,f){var g=f[e];if(g)return m(g),!0;var i=h.dom.getParent(f,"td,th");if(i)return d(a,i,c);var j=l(b,!a);return m(j),c.preventDefault(),!1}function l(a,b){var c=a&&a[b?"lastChild":"firstChild"];return c&&"BR"===c.nodeName?h.dom.getParent(c,"td,th"):c}function m(a){h.selection.setCursorLocation(a,0)}function n(){return u==a.UP||u==a.DOWN}function o(a){var b=a.selection.getNode(),c=a.dom.getParent(b,"tr");return null!==c}function p(a){for(var b=0,c=a;c.previousSibling;)c=c.previousSibling,b+=g(c,"colspan");return b}function q(a,b){var c=0,d=0;return f(a.children,function(a,e){if(c+=g(a,"colspan"),d=e,c>b)return!1}),d}function r(a,b,c,d){var e=p(h.dom.getParent(b,"td,th")),f=q(c,e),g=c.childNodes[f],i=l(g,d);m(i||g)}function s(a){var b=h.selection.getNode(),c=h.dom.getParent(b,"td,th"),d=h.dom.getParent(a,"td,th");return c&&c!==d&&t(c,d)}function t(a,b){return h.dom.getParent(a,"TABLE")===h.dom.getParent(b,"TABLE")}var u=c.keyCode;if(n()&&o(h)){var v=h.selection.getNode();b.setEditorTimeout(h,function(){s(v)&&d(!c.shiftKey&&u===a.UP,v,c)},0)}}h.on("KeyDown",function(a){c(a)})}function j(){function a(a,b){var c,d=b.ownerDocument,e=d.createRange();return e.setStartBefore(b),e.setEnd(a.endContainer,a.endOffset),c=d.createElement("body"),c.appendChild(e.cloneContents()),0===c.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}h.on("KeyDown",function(b){var c,d,e=h.dom;37!=b.keyCode&&38!=b.keyCode||(c=h.selection.getRng(),d=e.getParent(c.startContainer,"table"),d&&h.getBody().firstChild==d&&a(c,d)&&(c=e.createRng(),c.setStartBefore(d),c.setEndBefore(d),h.selection.setRng(c),b.preventDefault()))})}function k(){h.on("KeyDown SetContent VisualAid",function(){var a;for(a=h.getBody().lastChild;a;a=a.previousSibling)if(3==a.nodeType){if(a.nodeValue.length>0)break}else if(1==a.nodeType&&("BR"==a.tagName||!a.getAttribute("data-mce-bogus")))break;a&&"TABLE"==a.nodeName&&(h.settings.forced_root_block?h.dom.add(h.getBody(),h.settings.forced_root_block,h.settings.forced_root_block_attrs,c.ie&&c.ie<10?"&nbsp;":'<br data-mce-bogus="1" />'):h.dom.add(h.getBody(),"br",{"data-mce-bogus":"1"}))}),h.on("PreProcess",function(a){var b=a.node.lastChild;b&&("BR"==b.nodeName||1==b.childNodes.length&&("BR"==b.firstChild.nodeName||"\xa0"==b.firstChild.nodeValue))&&b.previousSibling&&"TABLE"==b.previousSibling.nodeName&&h.dom.remove(b)})}function l(){function a(a,b,c,d){var e,f,g,h=3,i=a.dom.getParent(b.startContainer,"TABLE");return i&&(e=i.parentNode),f=b.startContainer.nodeType==h&&0===b.startOffset&&0===b.endOffset&&d&&("TR"==c.nodeName||c==e),g=("TD"==c.nodeName||"TH"==c.nodeName)&&!d,f||g}function b(){var b=h.selection.getRng(),c=h.selection.getNode(),d=h.dom.getParent(b.startContainer,"TD,TH");if(a(h,b,c,d)){d||(d=c);for(var e=d.lastChild;e.lastChild;)e=e.lastChild;3==e.nodeType&&(b.setEnd(e,e.data.length),h.selection.setRng(b))}}h.on("KeyDown",function(){b()}),h.on("MouseDown",function(a){2!=a.button&&b()})}function m(){function b(a){h.selection.select(a,!0),h.selection.collapse(!0)}function c(a){h.$(a).empty(),e.paddCell(a)}h.on("keydown",function(e){if((e.keyCode==a.DELETE||e.keyCode==a.BACKSPACE)&&!e.isDefaultPrevented()){var f,g,i,j;if(f=h.dom.getParent(h.selection.getStart(),"table")){if(g=h.dom.select("td,th",f),i=d.grep(g,function(a){return!!h.dom.getAttrib(a,"data-mce-selected")}),0===i.length)return j=h.dom.getParent(h.selection.getStart(),"td,th"),void(h.selection.isCollapsed()&&j&&h.dom.isEmpty(j)&&(e.preventDefault(),c(j),b(j)));e.preventDefault(),h.undoManager.transact(function(){g.length==i.length?h.execCommand("mceTableDelete"):(d.each(i,c),b(i[0]))})}}})}function n(){var b="\ufeff",c=function(a){return h.dom.isEmpty(a)||a.firstChild===a.lastChild&&f(a.firstChild)},d=function(a){return a&&"CAPTION"==a.nodeName&&"TABLE"==a.parentNode.nodeName},e=function(a,b){var c=b.firstChild;do if(c===a)return!0;while(c=c.firstChild);return!1},f=function(a){if(3===a.nodeType){if(a.data===b)return!0;a=a.parentNode}return 1===a.nodeType&&a.hasAttribute("data-mce-caret")},g=function(a){var b=h.selection.getRng();return!b.startOffset&&!b.startContainer.previousSibling&&e(b.startContainer,a)},i=function(a,c){var d;d=c?h.dom.create("p",{"data-mce-caret":"after","data-mce-bogus":"all"},'<br data-mce-bogus="1">'):a.ownerDocument.createTextNode(b),a.appendChild(d)},j=function(a,d){var e=a.lastChild,g=h.selection.getRng(),j=g.startContainer,k=g.startOffset;c(a)?(a.innerHTML=b,j=a.lastChild,k=0):f(e)||i(a,h.dom.isBlock(e)),h.selection.setCursorLocation(j,k)},k=function(a){var b=h.selection.getRng(),c=h.dom.createRng(),d=a.firstChild;b.commonAncestorContainer===a.parentNode&&e(b.startContainer,a)&&(c.setStart(a,0),1===d.nodeType?c.setEnd(a,a.childNodes.length):c.setEnd(d,d.nodeValue.length),h.selection.setRng(c))};h.on("keydown",function(b){if(!(b.keyCode!==a.DELETE&&b.keyCode!==a.BACKSPACE||b.isDefaultPrevented())){var e=h.dom.getParent(h.selection.getStart(),"caption");d(e)&&(h.selection.isCollapsed()?(j(e),(c(e)||b.keyCode===a.BACKSPACE&&g(e))&&b.preventDefault()):(k(e),h.undoManager.transact(function(){h.execCommand("Delete"),j(e)}),b.preventDefault()))}})}n(),m(),c.webkit&&(i(),l()),c.gecko&&(j(),k()),c.ie>9&&(j(),k())}}),g("7",["a"],function(a){return a("tinymce.dom.TreeWalker")}),g("3",["1","7","6"],function(a,b,c){return function(d,e){function f(a){d.getBody().style.webkitUserSelect="",(a||p)&&(d.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected"),p=!1)}function g(a,b){return!(!a||!b)&&a===o.getParent(b,"table")}function h(b){var c,f,h=b.target;if(!m&&!n&&h!==l&&(l=h,k&&j)){if(f=o.getParent(h,"td,th"),g(k,f)||(f=o.getParent(k,"td,th")),j===f&&!p)return;if(e(!0),g(k,f)){b.preventDefault(),i||(i=new a(d,k,j),d.getBody().style.webkitUserSelect="none"),i.setEndCell(f),p=!0,c=d.selection.getSel();try{c.removeAllRanges?c.removeAllRanges():c.empty()}catch(a){}}}}var i,j,k,l,m,n,o=d.dom,p=!0,q=function(){j=i=k=l=null,e(!1)};return d.on("SelectionChange",function(a){p&&a.stopImmediatePropagation()},!0),d.on("MouseDown",function(a){2==a.button||m||n||(f(),j=o.getParent(a.target,"td,th"),k=o.getParent(j,"table"))}),d.on("mouseover",h),d.on("remove",function(){o.unbind(d.getDoc(),"mouseover",h),f()}),d.on("MouseUp",function(){function a(a,d){var f=new b(a,a);do{if(3==a.nodeType&&0!==c.trim(a.nodeValue).length)return void(d?e.setStart(a,0):e.setEnd(a,a.nodeValue.length));if("BR"==a.nodeName)return void(d?e.setStartBefore(a):e.setEndBefore(a))}while(a=d?f.next():f.prev())}var e,f,g,h,k,l=d.selection;if(j){if(i&&(d.getBody().style.webkitUserSelect=""),f=o.select("td[data-mce-selected],th[data-mce-selected]"),f.length>0){e=o.createRng(),h=f[0],e.setStartBefore(h),e.setEndAfter(h),a(h,1),g=new b(h,o.getParent(f[0],"table"));do if("TD"==h.nodeName||"TH"==h.nodeName){if(!o.getAttrib(h,"data-mce-selected"))break;k=h}while(h=g.next());a(k),l.setRng(e)}d.nodeChanged(),q()}}),d.on("KeyUp Drop SetContent",function(a){f("setcontent"==a.type),q(),m=!1}),d.on("ObjectResizeStart ObjectResized",function(a){m="objectresized"!=a.type}),d.on("dragstart",function(){n=!0}),d.on("drop dragend",function(){n=!1}),{clear:f}}}),g("4",["6","8"],function(a,b){var c=a.each;return function(d){function e(){var a=d.settings.color_picker_callback;if(a)return function(){var b=this;a.call(d,function(a){b.value(a).fire("change")},b.value())}}function f(a){return{title:"Advanced",type:"form",defaults:{onchange:function(){l(a,this.parents().reverse()[0],"style"==this.name())}},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border color",type:"colorbox",name:"borderColor",onaction:e()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:e()}]}]}}function g(a){return a?a.replace(/px$/,""):""}function h(a){return/^[0-9]+$/.test(a)&&(a+="px"),a}function i(a){c("left center right".split(" "),function(b){d.formatter.remove("align"+b,{},a)})}function j(a){c("top middle bottom".split(" "),function(b){d.formatter.remove("valign"+b,{},a)})}function k(b,c,d){function e(b,d){return d=d||[],a.each(b,function(a){var b={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c&&c(b)),d.push(b)}),d}return e(b,d||[])}function l(a,b,c){var d=b.toJSON(),e=a.parseStyle(d.style);c?(b.find("#borderColor").value(e["border-color"]||"")[0].fire("change"),b.find("#backgroundColor").value(e["background-color"]||"")[0].fire("change")):(e["border-color"]=d.borderColor,e["background-color"]=d.backgroundColor),b.find("#style").value(a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}function m(a,b,c){var d=a.parseStyle(a.getAttrib(c,"style"));d["border-color"]&&(b.borderColor=d["border-color"]),d["background-color"]&&(b.backgroundColor=d["background-color"]),b.style=a.serializeStyle(d)}function n(a,b,d){var e=a.parseStyle(a.getAttrib(b,"style"));c(d,function(a){e[a.name]=a.value}),a.setAttrib(b,"style",a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}var o=this;o.tableProps=function(){o.table(!0)},o.table=function(e){function j(){function c(a,b,d){if("TD"===a.tagName||"TH"===a.tagName)v.setStyle(a,b,d);else if(a.children)for(var e=0;e<a.children.length;e++)c(a.children[e],b,d)}var e;l(v,this),w=a.extend(w,this.toJSON()),w["class"]===!1&&delete w["class"],d.undoManager.transact(function(){if(p||(p=d.plugins.table.insertTable(w.cols||1,w.rows||1)),d.dom.setAttribs(p,{style:w.style,"class":w["class"]}),d.settings.table_style_by_css){if(u=[],u.push({name:"border",value:w.border}),u.push({name:"border-spacing",value:h(w.cellspacing)}),n(v,p,u),v.setAttribs(p,{"data-mce-border-color":w.borderColor,"data-mce-cell-padding":w.cellpadding,"data-mce-border":w.border}),p.children)for(var a=0;a<p.children.length;a++)c(p.children[a],"border",w.border),c(p.children[a],"padding",h(w.cellpadding))}else d.dom.setAttribs(p,{border:w.border,cellpadding:w.cellpadding,cellspacing:w.cellspacing});v.getAttrib(p,"width")&&!d.settings.table_style_by_css?v.setAttrib(p,"width",g(w.width)):v.setStyle(p,"width",h(w.width)),v.setStyle(p,"height",h(w.height)),e=v.select("caption",p)[0],e&&!w.caption&&v.remove(e),!e&&w.caption&&(e=v.create("caption"),e.innerHTML=b.ie?"\xa0":'<br data-mce-bogus="1"/>',p.insertBefore(e,p.firstChild)),i(p),w.align&&d.formatter.apply("align"+w.align,{},p),d.focus(),d.addVisual()})}function o(a,b){function c(a,c){for(var d=0;d<c.length;d++){var e=v.getStyle(c[d],b);if("undefined"==typeof a&&(a=e),a!=e)return""}return a}var e,f=d.dom.select("td,th",a);return e=c(e,f)}var p,q,r,s,t,u,v=d.dom,w={};e===!0?(p=v.getParent(d.selection.getStart(),"table"),p&&(w={width:g(v.getStyle(p,"width")||v.getAttrib(p,"width")),height:g(v.getStyle(p,"height")||v.getAttrib(p,"height")),cellspacing:g(v.getStyle(p,"border-spacing")||v.getAttrib(p,"cellspacing")),cellpadding:v.getAttrib(p,"data-mce-cell-padding")||v.getAttrib(p,"cellpadding")||o(p,"padding"),border:v.getAttrib(p,"data-mce-border")||v.getAttrib(p,"border")||o(p,"border"),borderColor:v.getAttrib(p,"data-mce-border-color"),caption:!!v.select("caption",p)[0],"class":v.getAttrib(p,"class")},c("left center right".split(" "),function(a){d.formatter.matchNode(p,"align"+a)&&(w.align=a)}))):(q={label:"Cols",name:"cols"},r={label:"Rows",name:"rows"}),d.settings.table_class_list&&(w["class"]&&(w["class"]=w["class"].replace(/\s*mce\-item\-table\s*/g,"")),s={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"table",classes:[a.value]})})})}),t={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:d.settings.table_appearance_options!==!1?[q,r,{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[q,r,{label:"Width",name:"width"},{label:"Height",name:"height"}]},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},s]},d.settings.table_advtab!==!1?(m(v,w,p),d.windowManager.open({title:"Table properties",data:w,bodyType:"tabpanel",body:[{title:"General",type:"form",items:t},f(v)],onsubmit:j})):d.windowManager.open({title:"Table properties",data:w,body:t,onsubmit:j})},o.merge=function(a,b){d.windowManager.open({title:"Merge cells",body:[{label:"Cols",name:"cols",type:"textbox",value:"1",size:10},{label:"Rows",name:"rows",type:"textbox",value:"1",size:10}],onsubmit:function(){var c=this.toJSON();d.undoManager.transact(function(){a.merge(b,c.cols,c.rows)})}})},o.cell=function(){function b(a,b,c){(1===s.length||c)&&r.setAttrib(a,b,c)}function e(a,b,c){(1===s.length||c)&&r.setStyle(a,b,c)}function n(){l(r,this),p=a.extend(p,this.toJSON()),d.undoManager.transact(function(){c(s,function(a){b(a,"scope",p.scope),b(a,"style",p.style),b(a,"class",p["class"]),e(a,"width",h(p.width)),e(a,"height",h(p.height)),p.type&&a.nodeName.toLowerCase()!==p.type&&(a=r.rename(a,p.type)),1===s.length&&(i(a),j(a)),p.align&&d.formatter.apply("align"+p.align,{},a),p.valign&&d.formatter.apply("valign"+p.valign,{},a)}),d.focus()})}var o,p,q,r=d.dom,s=[];if(s=d.dom.select("td[data-mce-selected],th[data-mce-selected]"),o=d.dom.getParent(d.selection.getStart(),"td,th"),!s.length&&o&&s.push(o),o=o||s[0]){s.length>1?p={width:"",height:"",scope:"","class":"",align:"",style:"",type:o.nodeName.toLowerCase()}:(p={width:g(r.getStyle(o,"width")||r.getAttrib(o,"width")),height:g(r.getStyle(o,"height")||r.getAttrib(o,"height")),scope:r.getAttrib(o,"scope"),"class":r.getAttrib(o,"class")},p.type=o.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(o,"align"+a)&&(p.align=a)}),c("top middle bottom".split(" "),function(a){d.formatter.matchNode(o,"valign"+a)&&(p.valign=a)}),m(r,p,o)),d.settings.table_cell_class_list&&(q={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_cell_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"td",classes:[a.value]})})})});var t={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},q]};d.settings.table_cell_advtab!==!1?d.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:p,body:[{title:"General",type:"form",items:t},f(r)],onsubmit:n}):d.windowManager.open({title:"Cell properties",data:p,body:t,onsubmit:n})}},o.row=function(){function b(a,b,c){(1===u.length||c)&&t.setAttrib(a,b,c)}function e(a,b,c){(1===u.length||c)&&t.setStyle(a,b,c)}function j(){var f,g,j;l(t,this),r=a.extend(r,this.toJSON()),d.undoManager.transact(function(){var a=r.type;c(u,function(c){b(c,"scope",r.scope),b(c,"style",r.style),b(c,"class",r["class"]),e(c,"height",h(r.height)),a!==c.parentNode.nodeName.toLowerCase()&&(f=t.getParent(c,"table"),g=c.parentNode,j=t.select(a,f)[0],j||(j=t.create(a),f.firstChild?f.insertBefore(j,f.firstChild):f.appendChild(j)),j.appendChild(c),g.hasChildNodes()||t.remove(g)),1===u.length&&i(c),r.align&&d.formatter.apply("align"+r.align,{},c)}),d.focus()})}var n,o,p,q,r,s,t=d.dom,u=[];n=d.dom.getParent(d.selection.getStart(),"table"),o=d.dom.getParent(d.selection.getStart(),"td,th"),c(n.rows,function(a){c(a.cells,function(b){if(t.getAttrib(b,"data-mce-selected")||b==o)return u.push(a),!1})}),p=u[0],p&&(u.length>1?r={height:"",scope:"","class":"",align:"",type:p.parentNode.nodeName.toLowerCase()}:(r={height:g(t.getStyle(p,"height")||t.getAttrib(p,"height")),scope:t.getAttrib(p,"scope"),"class":t.getAttrib(p,"class")},r.type=p.parentNode.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(p,"align"+a)&&(r.align=a)}),m(t,r,p)),d.settings.table_row_class_list&&(q={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_row_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"tr",classes:[a.value]})})})}),s={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"Header",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},q]},d.settings.table_row_advtab!==!1?d.windowManager.open({title:"Row properties",data:r,bodyType:"tabpanel",body:[{title:"General",type:"form",items:s},f(t)],onsubmit:j}):d.windowManager.open({title:"Row properties",data:r,body:s,onsubmit:j}))}}}),g("5",["6","d"],function(a,b){var c;return function(d){function e(a,b){return{index:a,y:d.dom.getPos(b).y}}function f(a,b){return{index:a,y:d.dom.getPos(b).y+b.offsetHeight}}function g(a,b){return{index:a,x:d.dom.getPos(b).x}}function h(a,b){return{index:a,x:d.dom.getPos(b).x+b.offsetWidth}}function i(){var a=d.getBody().dir;return"rtl"===a}function j(){return d.inline}function k(){return j?d.getBody().ownerDocument.body:d.getBody()}function l(a,b){return i()?h(a,b):g(a,b)}function m(a,b){return i()?g(a,b):h(a,b)}function n(a,b){return o(a,"width")/o(b,"width")*100}function o(a,b){var c=d.dom.getStyle(a,b,!0),e=parseInt(c,10);return e}function p(a){var b=o(a,"width"),c=o(a.parentElement,"width");return b/c*100}function q(a,b){var c=o(a,"width");return b/c*100}function r(a,b){var c=o(a.parentElement,"width");return b/c*100}function s(a,b,c){for(var d=[],e=1;e<c.length;e++){var f=c[e].element;d.push(a(e-1,f))}var g=c[c.length-1];return d.push(b(c.length-1,g.element)),d}function t(){var b=d.dom.select("."+la,k());a.each(b,function(a){d.dom.remove(a)})}function u(a){t(),E(a)}function v(a,b,c,d,e,f,g,h){var i={"data-mce-bogus":"all","class":la+" "+a,unselectable:"on","data-mce-resize":!1,style:"cursor: "+b+"; margin: 0; padding: 0; position: absolute; left: "+c+"px; top: "+d+"px; height: "+e+"px; width: "+f+"px; "};return i[g]=h,i}function w(b,c,e){a.each(b,function(a){var b=e.x,f=a.y-ua/2,g=ua,h=c;d.dom.add(k(),"div",v(ma,na,b,f,g,h,oa,a.index))})}function x(b,c,e){a.each(b,function(a){var b=a.x-ua/2,f=e.y,g=c,h=ua;d.dom.add(k(),"div",v(qa,ra,b,f,g,h,sa,a.index))})}function y(b){return a.map(b.rows,function(b){var c=a.map(b.cells,function(a){var b=a.hasAttribute("rowspan")?parseInt(a.getAttribute("rowspan"),10):1,c=a.hasAttribute("colspan")?parseInt(a.getAttribute("colspan"),10):1;return{element:a,rowspan:b,colspan:c}});return{element:b,cells:c}})}function z(b){function c(a,b){return a+","+b}function d(a,b){return g[c(a,b)]}function e(){var b=[];return a.each(h,function(a){b=b.concat(a.cells)}),b}function f(){return h}var g={},h=[],i=0,j=0;return a.each(b,function(b,d){var e=[];a.each(b.cells,function(a){for(var b=0;void 0!==g[c(d,b)];)b++;for(var f={element:a.element,colspan:a.colspan,rowspan:a.rowspan,rowIndex:d,colIndex:b},h=0;h<a.colspan;h++)for(var k=0;k<a.rowspan;k++){var l=d+k,m=b+h;g[c(l,m)]=f,i=Math.max(i,l+1),j=Math.max(j,m+1)}e.push(f)}),h.push({element:b.element,cells:e})}),{grid:{maxRows:i,maxCols:j},getAt:d,getAllCells:e,getAllRows:f}}function A(a,b){for(var c=[],d=a;d<b;d++)c.push(d);return c}function B(a,b,c){for(var d,e=a(),f=0;f<e.length;f++)b(e[f])&&(d=e[f]);
2
+ return d?d:c()}function C(b){var c=A(0,b.grid.maxCols),d=A(0,b.grid.maxRows);return a.map(c,function(a){function c(){for(var c=[],e=0;e<d.length;e++){var f=b.getAt(e,a);f&&f.colIndex===a&&c.push(f)}return c}function e(a){return 1===a.colspan}function f(){for(var c,e=0;e<d.length;e++)if(c=b.getAt(e,a))return c;return null}return B(c,e,f)})}function D(b){var c=A(0,b.grid.maxCols),d=A(0,b.grid.maxRows);return a.map(d,function(a){function d(){for(var d=[],e=0;e<c.length;e++){var f=b.getAt(a,e);f&&f.rowIndex===a&&d.push(f)}return d}function e(a){return 1===a.rowspan}function f(){return b.getAt(a,0)}return B(d,e,f)})}function E(a){var b=y(a),c=z(b),g=D(c),h=C(c),i=d.dom.getPos(a),j=g.length>0?s(e,f,g):[],k=h.length>0?s(l,m,h):[];w(j,a.offsetWidth,i),x(k,a.offsetHeight,i)}function F(a,b,c,d){if(b<0||b>=a.length-1)return"";var e=a[b];if(e)e={value:e,delta:0};else for(var f=a.slice(0,b).reverse(),g=0;g<f.length;g++)f[g]&&(e={value:f[g],delta:g+1});var h=a[b+1];if(h)h={value:h,delta:1};else for(var i=a.slice(b+1),j=0;j<i.length;j++)i[j]&&(h={value:i[j],delta:j+1});var k=h.delta-e.delta,l=Math.abs(h.value-e.value)/k;return c?l/o(d,"width")*100:l}function G(a,b){var c=d.dom.getStyle(a,b);return c||(c=d.dom.getAttrib(a,b)),c||(c=d.dom.getStyle(a,b,!0)),c}function H(a,b,c){var d=G(a,"width"),e=parseInt(d,10),f=b?n(a,c):o(a,"width");return(b&&!Q(d)||!b&&!R(d))&&(e=0),!isNaN(e)&&e>0?e:f}function I(b,c,d){for(var e=C(b),f=a.map(e,function(a){return l(a.colIndex,a.element).x}),g=[],h=0;h<e.length;h++){var i=e[h].element.hasAttribute("colspan")?parseInt(e[h].element.getAttribute("colspan"),10):1,j=i>1?F(f,h):H(e[h].element,c,d);j=j?j:va,g.push(j)}return g}function J(a){var b=G(a,"height"),c=parseInt(b,10);return Q(b)&&(c=0),!isNaN(c)&&c>0?c:o(a,"height")}function K(b){for(var c=D(b),d=a.map(c,function(a){return e(a.rowIndex,a.element).y}),f=[],g=0;g<c.length;g++){var h=c[g].element.hasAttribute("rowspan")?parseInt(c[g].element.getAttribute("rowspan"),10):1,i=h>1?F(d,g):J(c[g].element);i=i?i:wa,f.push(i)}return f}function L(b,c,d,e,f){function g(b){return a.map(b,function(){return 0})}function h(){var a;if(f)a=[100-l[0]];else{var b=Math.max(e,l[0]+d);a=[b-l[0]]}return a}function i(a,b){var c,f=g(l.slice(0,a)),h=g(l.slice(b+1));if(d>=0){var i=Math.max(e,l[b]-d);c=f.concat([d,i-l[b]]).concat(h)}else{var j=Math.max(e,l[a]+d),k=l[a]-j;c=f.concat([j-l[a],k]).concat(h)}return c}function j(a,b){var c,f=g(l.slice(0,b));if(d>=0)c=f.concat([d]);else{var h=Math.max(e,l[b]+d);c=f.concat([h-l[b]])}return c}var k,l=b.slice(0);return k=0===b.length?[]:1===b.length?h():0===c?i(0,1):c>0&&c<b.length-1?i(c,c+1):c===b.length-1?j(c-1,c):[]}function M(a,b,c){for(var d=0,e=a;e<b;e++)d+=c[e];return d}function N(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=M(a.colIndex,a.colIndex+a.colspan,c);return{element:a.element,width:b,colspan:a.colspan}})}function O(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=M(a.rowIndex,a.rowIndex+a.rowspan,c);return{element:a.element,height:b,rowspan:a.rowspan}})}function P(b,c){var d=b.getAllRows();return a.map(d,function(a,b){return{element:a.element,height:c[b]}})}function Q(a){return ya.test(a)}function R(a){return za.test(a)}function S(b,c,e){function f(b,c){a.each(b,function(a){d.dom.setStyle(a.element,"width",a.width+c),d.dom.setAttrib(a.element,"width",null)})}function g(){return e<k.grid.maxCols-1?p(b):p(b)+r(b,c)}function h(){return e<k.grid.maxCols-1?o(b,"width"):o(b,"width")+c}function i(a,c,f){e!=k.grid.maxCols-1&&f||(d.dom.setStyle(b,"width",a+c),d.dom.setAttrib(b,"width",null))}for(var j=y(b),k=z(j),l=Q(b.width)||Q(b.style.width),m=I(k,l,b),n=l?q(b,c):c,s=L(m,e,n,va,l,b),t=[],u=0;u<s.length;u++)t.push(s[u]+m[u]);var v=N(k,t),w=l?"%":"px",x=l?g():h();d.undoManager.transact(function(){f(v,w),i(x,w,l)})}function T(b,c,e){for(var f=y(b),g=z(f),h=K(g),i=[],j=0,k=0;k<h.length;k++)i.push(k===e?c+h[k]:h[k]),j+=j[k];var l=O(g,i),m=P(g,i);d.undoManager.transact(function(){a.each(m,function(a){d.dom.setStyle(a.element,"height",a.height+"px"),d.dom.setAttrib(a.element,"height",null)}),a.each(l,function(a){d.dom.setStyle(a.element,"height",a.height+"px"),d.dom.setAttrib(a.element,"height",null)}),d.dom.setStyle(b,"height",j+"px"),d.dom.setAttrib(b,"height",null)})}function U(){fa=setTimeout(function(){Y()},200)}function V(){clearTimeout(fa)}function W(){var a=document.createElement("div");return a.setAttribute("style","margin: 0; padding: 0; position: fixed; left: 0px; top: 0px; height: 100%; width: 100%;"),a.setAttribute("data-mce-bogus","all"),a}function X(a,b){d.dom.bind(a,"mouseup",function(){Y()}),d.dom.bind(a,"mousemove",function(a){V(),ga&&b(a)}),d.dom.bind(a,"mouseout",function(){U()})}function Y(){if(d.dom.remove(ha),ga){d.dom.removeClass(ia,xa),ga=!1;var a,b;if($(ia)){var e=parseInt(d.dom.getAttrib(ia,ta),10),f=d.dom.getPos(ia).x;a=parseInt(d.dom.getAttrib(ia,sa),10),b=i()?e-f:f-e,Math.abs(b)>=1&&S(c,b,a)}else if(_(ia)){var g=parseInt(d.dom.getAttrib(ia,pa),10),h=d.dom.getPos(ia).y;a=parseInt(d.dom.getAttrib(ia,oa),10),b=h-g,Math.abs(b)>=1&&T(c,b,a)}u(c),d.nodeChanged()}}function Z(a,b){ha=ha?ha:W(),ga=!0,d.dom.addClass(a,xa),ia=a,X(ha,b),d.dom.add(k(),ha)}function $(a){return d.dom.hasClass(a,qa)}function _(a){return d.dom.hasClass(a,ma)}function aa(a){ja=void 0!==ja?ja:a.clientX;var b=a.clientX-ja;ja=a.clientX;var c=d.dom.getPos(ia).x;d.dom.setStyle(ia,"left",c+b+"px")}function ba(a){ka=void 0!==ka?ka:a.clientY;var b=a.clientY-ka;ka=a.clientY;var c=d.dom.getPos(ia).y;d.dom.setStyle(ia,"top",c+b+"px")}function ca(a){ja=void 0,Z(a,aa)}function da(a){ka=void 0,Z(a,ba)}function ea(a){var b=a.target,e=d.getBody();if(d.$.contains(e,c)||c===e)if($(b)){a.preventDefault();var f=d.dom.getPos(b).x;d.dom.setAttrib(b,ta,f),ca(b)}else if(_(b)){a.preventDefault();var g=d.dom.getPos(b).y;d.dom.setAttrib(b,pa,g),da(b)}else t()}var fa,ga,ha,ia,ja,ka,la="mce-resize-bar",ma="mce-resize-bar-row",na="row-resize",oa="data-row",pa="data-initial-top",qa="mce-resize-bar-col",ra="col-resize",sa="data-col",ta="data-initial-left",ua=4,va=10,wa=10,xa="mce-resize-bar-dragging",ya=new RegExp(/(\d+(\.\d+)?%)/),za=new RegExp(/px|em/);return d.on("init",function(){d.dom.bind(k(),"mousedown",ea)}),d.on("ObjectResized",function(b){var c=b.target;if("TABLE"===c.nodeName){var e=[];a.each(c.rows,function(b){a.each(b.cells,function(a){var b=d.dom.getStyle(a,"width",!0);e.push({cell:a,width:b})})}),a.each(e,function(a){d.dom.setStyle(a.cell,"width",a.width),d.dom.setAttrib(a.cell,"width",null)})}}),d.on("mouseover",function(a){if(!ga){var b=d.dom.getParent(a.target,"table");("TABLE"===a.target.nodeName||b)&&(c=b,u(b))}}),d.on("keydown",function(a){switch(a.keyCode){case b.LEFT:case b.RIGHT:case b.UP:case b.DOWN:t()}}),d.on("remove",function(){t(),d.dom.unbind(k(),"mousedown",ea)}),{adjustWidth:S,adjustHeight:T,clearBars:t,drawBars:E,determineDeltas:L,getTableGrid:z,getTableDetails:y,getWidths:I,getPixelHeights:K,isPercentageBasedSize:Q,isPixelBasedSize:R,recalculateWidths:N,recalculateCellHeights:O,recalculateRowHeights:P}}}),g("9",["a"],function(a){return a("tinymce.PluginManager")}),g("0",["1","2","3","4","5","6","7","8","9"],function(a,b,c,d,e,f,g,h,i){function j(f){function g(a){return function(){f.execCommand(a)}}function i(a,b){var c,d,e,g;for(e='<table id="__mce"><tbody>',c=0;c<b;c++){for(e+="<tr>",d=0;d<a;d++)e+="<td>"+(h.ie&&h.ie<10?"&nbsp;":"<br>")+"</td>";e+="</tr>"}return e+="</tbody></table>",f.undoManager.transact(function(){f.insertContent(e),g=f.dom.get("__mce"),f.dom.setAttrib(g,"id",null),f.$("tr",g).each(function(a,b){f.fire("newrow",{node:b}),f.$("th,td",b).each(function(a,b){f.fire("newcell",{node:b})})}),f.dom.setAttribs(g,f.settings.table_default_attributes||{}),f.dom.setStyles(g,f.settings.table_default_styles||{})}),g}function j(a,b,c){function d(){var d,e,g,h={},i=0;e=f.dom.select("td[data-mce-selected],th[data-mce-selected]"),d=e[0],d||(d=f.selection.getStart()),c&&e.length>0?(k(e,function(a){return h[a.parentNode.parentNode.nodeName]=1}),k(h,function(a){i+=a}),g=1!==i):g=!f.dom.getParent(d,b),a.disabled(g),f.selection.selectorChanged(b,function(b){a.disabled(!b)})}f.initialized?d():f.on("init",d)}function l(){j(this,"table")}function m(){j(this,"td,th")}function n(){j(this,"td,th",!0)}function o(){var a="";a='<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';for(var b=0;b<10;b++){a+="<tr>";for(var c=0;c<10;c++)a+='<td role="gridcell" tabindex="-1"><a id="mcegrid'+(10*b+c)+'" href="#" data-mce-x="'+c+'" data-mce-y="'+b+'"></a></td>';a+="</tr>"}return a+="</table>",a+='<div class="mce-text-center" role="presentation">1 x 1</div>'}function p(a,b,c){var d,e,g,h,i,j=c.getEl().getElementsByTagName("table")[0],k=c.isRtl()||"tl-tr"==c.parent().rel;for(j.nextSibling.innerHTML=a+1+" x "+(b+1),k&&(a=9-a),e=0;e<10;e++)for(d=0;d<10;d++)h=j.rows[e].childNodes[d].firstChild,i=(k?d>=a:d<=a)&&e<=b,f.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode}function q(){f.addButton("tableprops",{title:"Table properties",onclick:y.tableProps,icon:"table"}),f.addButton("tabledelete",{title:"Delete table",onclick:g("mceTableDelete")}),f.addButton("tablecellprops",{title:"Cell properties",onclick:g("mceTableCellProps")}),f.addButton("tablemergecells",{title:"Merge cells",onclick:g("mceTableMergeCells")}),f.addButton("tablesplitcells",{title:"Split cell",onclick:g("mceTableSplitCells")}),f.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:g("mceTableInsertRowBefore")}),f.addButton("tableinsertrowafter",{title:"Insert row after",onclick:g("mceTableInsertRowAfter")}),f.addButton("tabledeleterow",{title:"Delete row",onclick:g("mceTableDeleteRow")}),f.addButton("tablerowprops",{title:"Row properties",onclick:g("mceTableRowProps")}),f.addButton("tablecutrow",{title:"Cut row",onclick:g("mceTableCutRow")}),f.addButton("tablecopyrow",{title:"Copy row",onclick:g("mceTableCopyRow")}),f.addButton("tablepasterowbefore",{title:"Paste row before",onclick:g("mceTablePasteRowBefore")}),f.addButton("tablepasterowafter",{title:"Paste row after",onclick:g("mceTablePasteRowAfter")}),f.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:g("mceTableInsertColBefore")}),f.addButton("tableinsertcolafter",{title:"Insert column after",onclick:g("mceTableInsertColAfter")}),f.addButton("tabledeletecol",{title:"Delete column",onclick:g("mceTableDeleteCol")})}function r(a){var b=f.dom.is(a,"table")&&f.getBody().contains(a);return b}function s(){var a=f.settings.table_toolbar;""!==a&&a!==!1&&(a||(a="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),f.addContextToolbar(r,a))}function t(){return v}function u(a){v=a}var v,w,x=this,y=new d(f);!f.settings.object_resizing||f.settings.table_resize_bars===!1||f.settings.object_resizing!==!0&&"table"!==f.settings.object_resizing||(w=e(f)),f.settings.table_grid===!1?f.addMenuItem("inserttable",{text:"Table",icon:"table",context:"table",onclick:y.table}):f.addMenuItem("inserttable",{text:"Table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),y.table())},onshow:function(){p(0,0,this.menu.items()[0])},onhide:function(){var a=this.menu.items()[0].getEl().getElementsByTagName("a");f.dom.removeClass(a,"mce-active"),f.dom.addClass(a[0],"mce-active")},menu:[{type:"container",html:o(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(a){var b,c,d=a.target;"A"==d.tagName.toUpperCase()&&(b=parseInt(d.getAttribute("data-mce-x"),10),c=parseInt(d.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(b=9-b),b===this.lastX&&c===this.lastY||(p(b,c,a.control),this.lastX=b,this.lastY=c))},onclick:function(a){var b=this;"A"==a.target.tagName.toUpperCase()&&(a.preventDefault(),a.stopPropagation(),b.parent().cancel(),f.undoManager.transact(function(){i(b.lastX+1,b.lastY+1)}),f.addVisual())}}]}),f.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:l,onclick:y.tableProps}),f.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:l,cmd:"mceTableDelete"}),f.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:g("mceTableCellProps"),onPostRender:m},{text:"Merge cells",onclick:g("mceTableMergeCells"),onPostRender:n},{text:"Split cell",onclick:g("mceTableSplitCells"),onPostRender:m}]}),f.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:g("mceTableInsertRowBefore"),onPostRender:m},{text:"Insert row after",onclick:g("mceTableInsertRowAfter"),onPostRender:m},{text:"Delete row",onclick:g("mceTableDeleteRow"),onPostRender:m},{text:"Row properties",onclick:g("mceTableRowProps"),onPostRender:m},{text:"-"},{text:"Cut row",onclick:g("mceTableCutRow"),onPostRender:m},{text:"Copy row",onclick:g("mceTableCopyRow"),onPostRender:m},{text:"Paste row before",onclick:g("mceTablePasteRowBefore"),onPostRender:m},{text:"Paste row after",onclick:g("mceTablePasteRowAfter"),onPostRender:m}]}),f.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:g("mceTableInsertColBefore"),onPostRender:m},{text:"Insert column after",onclick:g("mceTableInsertColAfter"),onPostRender:m},{text:"Delete column",onclick:g("mceTableDeleteCol"),onPostRender:m}]});var z=[];k("inserttable tableprops deletetable | cell row column".split(" "),function(a){"|"==a?z.push({text:"-"}):z.push(f.menuItems[a])}),f.addButton("table",{type:"menubutton",title:"Table",menu:z}),h.isIE||f.on("click",function(a){a=a.target,"TABLE"===a.nodeName&&(f.selection.select(a),f.nodeChanged())}),x.quirks=new b(f),f.on("Init",function(){x.cellSelection=new c(f,function(a){a&&w&&w.clearBars()}),x.resizeBars=w}),f.on("PreInit",function(){f.serializer.addAttributeFilter("data-mce-cell-padding,data-mce-border,data-mce-border-color",function(a,b){for(var c=a.length;c--;)a[c].attr(b,null)})}),k({mceTableSplitCells:function(a){a.split()},mceTableMergeCells:function(a){var b;b=f.dom.getParent(f.selection.getStart(),"th,td"),f.dom.select("td[data-mce-selected],th[data-mce-selected]").length?a.merge():y.merge(a,b)},mceTableInsertRowBefore:function(a){a.insertRows(!0)},mceTableInsertRowAfter:function(a){a.insertRows()},mceTableInsertColBefore:function(a){a.insertCols(!0)},mceTableInsertColAfter:function(a){a.insertCols()},mceTableDeleteCol:function(a){a.deleteCols()},mceTableDeleteRow:function(a){a.deleteRows()},mceTableCutRow:function(a){v=a.cutRows()},mceTableCopyRow:function(a){v=a.copyRows()},mceTablePasteRowBefore:function(a){a.pasteRows(v,!0)},mceTablePasteRowAfter:function(a){a.pasteRows(v)},mceSplitColsBefore:function(a){a.splitCols(!0)},mceSplitColsAfter:function(a){a.splitCols(!1)},mceTableDelete:function(a){w&&w.clearBars(),a.deleteTable()}},function(b,c){f.addCommand(c,function(){var c=new a(f);c&&(b(c),f.execCommand("mceRepaint"),x.cellSelection.clear())})}),k({mceInsertTable:y.table,mceTableProps:function(){y.table(!0)},mceTableRowProps:y.row,mceTableCellProps:y.cell},function(a,b){f.addCommand(b,function(b,c){a(c)})}),q(),s(),f.settings.table_tab_navigation!==!1&&f.on("keydown",function(b){var c,d,e;9==b.keyCode&&(c=f.dom.getParent(f.selection.getStart(),"th,td"),c&&(b.preventDefault(),d=new a(f),e=b.shiftKey?-1:1,f.undoManager.transact(function(){!d.moveRelIdx(c,e)&&e>0&&(d.insertRow(),d.refresh(),d.moveRelIdx(c,e))})))}),x.insertTable=i,x.setClipboardRows=u,x.getClipboardRows=t}var k=f.each;return i.add("table",j),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("template",function(e){function t(t){return function(){var n=e.settings.templates;return"function"==typeof n?void n(t):void("string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(n))}}function n(t){function n(t){function n(t){if(t.indexOf("<html>")==-1){var n="";tinymce.each(e.contentCSS,function(t){n+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'">'});var i=e.settings.body_class||"";i.indexOf("=")!=-1&&(i=e.getParam("body_class","","hash"),i=i[e.id]||""),t="<!DOCTYPE html><html><head>"+n+'</head><body class="'+i+'">'+t+"</body></html>"}t=o(t,"template_preview_replace_values");var a=r.find("iframe")[0].getEl().contentWindow.document;a.open(),a.write(t),a.close()}var a=t.control.value();a.url?tinymce.util.XHR.send({url:a.url,success:function(e){i=e,n(i)}}):(i=a.content,n(i)),r.find("#description")[0].text(t.control.value().description)}var r,i,s=[];if(!t||0===t.length){var l=e.translate("No templates defined.");return void e.notificationManager.open({text:l,type:"info"})}tinymce.each(t,function(e){s.push({selected:!s.length,text:e.title,value:{url:e.url,content:e.content,description:e.description}})}),r=e.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:s,onselect:n}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){a(!1,i)},minWidth:Math.min(tinymce.DOM.getViewPort().w,e.getParam("template_popup_width",600)),minHeight:Math.min(tinymce.DOM.getViewPort().h,e.getParam("template_popup_height",500))}),r.find("listbox")[0].fire("select")}function r(t,n){function r(e,t){if(e=""+e,e.length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}var i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),a="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s="January February March April May June July August September October November December".split(" ");return n=n||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",r(n.getMonth()+1,2)),t=t.replace("%d",r(n.getDate(),2)),t=t.replace("%H",""+r(n.getHours(),2)),t=t.replace("%M",""+r(n.getMinutes(),2)),t=t.replace("%S",""+r(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",""+(n.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(s[n.getMonth()])),t=t.replace("%b",""+e.translate(a[n.getMonth()])),t=t.replace("%A",""+e.translate(o[n.getDay()])),t=t.replace("%a",""+e.translate(i[n.getDay()])),t=t.replace("%%","%")}function i(t){var n=e.dom,r=e.getParam("template_replace_values");s(n.select("*",t),function(e){s(r,function(t,i){n.hasClass(e,i)&&"function"==typeof r[i]&&r[i](e)})})}function o(t,n){return s(e.getParam(n),function(e,n){"function"==typeof e&&(e=e(n)),t=t.replace(new RegExp("\\{\\$"+n+"\\}","g"),e)}),t}function a(t,n){function a(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)}var l,c,u=e.dom,d=e.selection.getContent();n=o(n,"template_replace_values"),l=u.create("div",null,n),c=u.select(".mceTmpl",l),c&&c.length>0&&(l=u.create("div",null),l.appendChild(c[0].cloneNode(!0))),s(u.select("*",l),function(t){a(t,e.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(t.innerHTML=r(e.getParam("template_cdate_format",e.getLang("template.cdate_format")))),a(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=r(e.getParam("template_mdate_format",e.getLang("template.mdate_format")))),a(t,e.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(t.innerHTML=d)}),i(l),e.execCommand("mceInsertContent",!1,l.innerHTML),e.addVisual()}var s=tinymce.each;e.addCommand("mceInsertTemplate",a),e.addButton("template",{title:"Insert template",onclick:t(n)}),e.addMenuItem("template",{text:"Template",onclick:t(n),context:"insert"}),e.on("PreProcess",function(t){var n=e.dom;s(n.select("div",t.node),function(t){n.hasClass(t,"mceTmpl")&&(s(n.select("*",t),function(t){n.hasClass(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=r(e.getParam("template_mdate_format",e.getLang("template.mdate_format"))))}),i(t))})})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){return a("tinymce.dom.DOMUtils")}),g("2",["6"],function(a){return a("tinymce.PluginManager")}),g("3",["6"],function(a){return a("tinymce.util.JSON")}),g("4",["6"],function(a){return a("tinymce.util.Tools")}),g("5",["6"],function(a){return a("tinymce.util.XHR")}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return b.add("template",function(b){function f(a){return function(){var d=b.settings.templates;return"function"==typeof d?void d(a):void("string"==typeof d?e.send({url:d,success:function(b){a(c.parse(b))}}):a(d))}}function g(c){function f(a){function c(a){if(a.indexOf("<html>")==-1){var c="";d.each(b.contentCSS,function(a){c+='<link type="text/css" rel="stylesheet" href="'+b.documentBaseURI.toAbsolute(a)+'">'});var e=b.settings.body_class||"";e.indexOf("=")!=-1&&(e=b.getParam("body_class","","hash"),e=e[b.id]||""),a="<!DOCTYPE html><html><head>"+c+'</head><body class="'+e+'">'+a+"</body></html>"}a=j(a,"template_preview_replace_values");var f=g.find("iframe")[0].getEl().contentWindow.document;f.open(),f.write(a),f.close()}var f=a.control.value();f.url?e.send({url:f.url,success:function(a){h=a,c(h)}}):(h=f.content,c(h)),g.find("#description")[0].text(a.control.value().description)}var g,h,i=[];if(!c||0===c.length){var l=b.translate("No templates defined.");return void b.notificationManager.open({text:l,type:"info"})}d.each(c,function(a){i.push({selected:!i.length,text:a.title,value:{url:a.url,content:a.content,description:a.description}})}),g=b.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:i,onselect:f}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){k(!1,h)},minWidth:Math.min(a.DOM.getViewPort().w,b.getParam("template_popup_width",600)),minHeight:Math.min(a.DOM.getViewPort().h,b.getParam("template_popup_height",500))}),g.find("listbox")[0].fire("select")}function h(a,c){function d(a,b){if(a=""+a,a.length<b)for(var c=0;c<b-a.length;c++)a="0"+a;return a}var e="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),f="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),g="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),h="January February March April May June July August September October November December".split(" ");return c=c||new Date,a=a.replace("%D","%m/%d/%Y"),a=a.replace("%r","%I:%M:%S %p"),a=a.replace("%Y",""+c.getFullYear()),a=a.replace("%y",""+c.getYear()),a=a.replace("%m",d(c.getMonth()+1,2)),a=a.replace("%d",d(c.getDate(),2)),a=a.replace("%H",""+d(c.getHours(),2)),a=a.replace("%M",""+d(c.getMinutes(),2)),a=a.replace("%S",""+d(c.getSeconds(),2)),a=a.replace("%I",""+((c.getHours()+11)%12+1)),a=a.replace("%p",""+(c.getHours()<12?"AM":"PM")),a=a.replace("%B",""+b.translate(h[c.getMonth()])),a=a.replace("%b",""+b.translate(g[c.getMonth()])),a=a.replace("%A",""+b.translate(f[c.getDay()])),a=a.replace("%a",""+b.translate(e[c.getDay()])),a=a.replace("%%","%")}function i(a){var c=b.dom,e=b.getParam("template_replace_values");d.each(c.select("*",a),function(a){d.each(e,function(b,d){c.hasClass(a,d)&&"function"==typeof e[d]&&e[d](a)})})}function j(a,c){return d.each(b.getParam(c),function(b,c){"function"==typeof b&&(b=b(c)),a=a.replace(new RegExp("\\{\\$"+c+"\\}","g"),b)}),a}function k(a,c){function e(a,b){return new RegExp("\\b"+b+"\\b","g").test(a.className)}var f,g,k=b.dom,l=b.selection.getContent();c=j(c,"template_replace_values"),f=k.create("div",null,c),g=k.select(".mceTmpl",f),g&&g.length>0&&(f=k.create("div",null),f.appendChild(g[0].cloneNode(!0))),d.each(k.select("*",f),function(a){e(a,b.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(a.innerHTML=h(b.getParam("template_cdate_format",b.getLang("template.cdate_format")))),e(a,b.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(a.innerHTML=h(b.getParam("template_mdate_format",b.getLang("template.mdate_format")))),e(a,b.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(a.innerHTML=l)}),i(f),b.execCommand("mceInsertContent",!1,f.innerHTML),b.addVisual()}b.addCommand("mceInsertTemplate",k),b.addButton("template",{title:"Insert template",onclick:f(g)}),b.addMenuItem("template",{text:"Template",onclick:f(g),context:"insert"}),b.on("PreProcess",function(a){var c=b.dom;d.each(c.select("div",a.node),function(a){c.hasClass(a,"mceTmpl")&&(d.each(c.select("*",a),function(a){c.hasClass(a,b.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(a.innerHTML=h(b.getParam("template_mdate_format",b.getLang("template.mdate_format"))))}),i(a))})})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("textcolor",function(e){function t(t){var n;return e.dom.getParents(e.selection.getStart(),function(e){var r;(r=e.style["forecolor"==t?"color":"background-color"])&&(n=r)}),n}function n(t){var n,r,i=[];for(r=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],r=e.settings.textcolor_map||r,r=e.settings[t+"_map"]||r,n=0;n<r.length;n+=2)i.push({text:r[n+1],color:"#"+r[n]});return i}function r(){function t(e,t){var n="transparent"==e;return'<td class="mce-grid-cell'+(n?" mce-colorbtn-trans":"")+'"><div id="'+m+"-"+g++ +'" data-mce-color="'+(e?e:"")+'" role="option" tabIndex="-1" style="'+(e?"background-color: "+e:"")+'" title="'+tinymce.translate(t)+'">'+(n?"&#215;":"")+"</div></td>"}var r,i,o,a,s,u,d,f,p=this,m=p._id,g=0;for(f=p.settings.origin,r=n(f),r.push({text:tinymce.translate("No color"),color:"transparent"}),o='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',a=r.length-1,u=0;u<c[f];u++){for(o+="<tr>",s=0;s<l[f];s++)d=u*l[f]+s,d>a?o+="<td></td>":(i=r[d],o+=t(i.color,i.text));o+="</tr>"}if(e.settings.color_picker_callback){for(o+='<tr><td colspan="'+l[f]+'" class="mce-custom-color-btn"><div id="'+m+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+m+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+tinymce.translate("Custom...")+"</button></div></td></tr>",o+="<tr>",s=0;s<l[f];s++)o+=t("","Custom color");o+="</tr>"}return o+="</tbody></table>"}function i(t,n){e.undoManager.transact(function(){e.focus(),e.formatter.apply(t,{value:n}),e.nodeChanged()})}function o(t){e.undoManager.transact(function(){e.focus(),e.formatter.remove(t,{value:null},null,!0),e.nodeChanged()})}function a(n){function r(e){d.hidePanel(),d.color(e),i(d.settings.format,e)}function a(){d.hidePanel(),d.resetColor(),o(d.settings.format)}function s(e,t){e.style.background=t,e.setAttribute("data-mce-color",t)}var c,u,d=this.parent();u=d.settings.origin,tinymce.DOM.getParent(n.target,".mce-custom-color-btn")&&(d.hidePanel(),e.settings.color_picker_callback.call(e,function(e){var t,n,i,o=d.panel.getEl().getElementsByTagName("table")[0];for(t=tinymce.map(o.rows[o.rows.length-1].childNodes,function(e){return e.firstChild}),i=0;i<t.length&&(n=t[i],n.getAttribute("data-mce-color"));i++);if(i==l[u])for(i=0;i<l[u]-1;i++)s(t[i],t[i+1].getAttribute("data-mce-color"));s(n,e),r(e)},t(d.settings.format))),c=n.target.getAttribute("data-mce-color"),c?(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),n.target.setAttribute("aria-selected",!0),this.lastId=n.target.id,"transparent"==c?a():r(c)):null!==c&&d.hidePanel()}function s(){var e=this;e._color?i(e.settings.format,e._color):o(e.settings.format)}var l,c;c={forecolor:e.settings.forecolor_rows||e.settings.textcolor_rows||5,backcolor:e.settings.backcolor_rows||e.settings.textcolor_rows||5},l={forecolor:e.settings.forecolor_cols||e.settings.textcolor_cols||8,backcolor:e.settings.backcolor_cols||e.settings.textcolor_cols||8},e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{origin:"forecolor",role:"application",ariaRemember:!0,html:r,onclick:a},onclick:s}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{origin:"backcolor",role:"application",ariaRemember:!0,html:r,onclick:a},onclick:s})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("5",tinymce.util.Tools.resolve),g("1",["5"],function(a){return a("tinymce.dom.DOMUtils")}),g("2",["5"],function(a){return a("tinymce.PluginManager")}),g("3",["5"],function(a){return a("tinymce.util.I18n")}),g("4",["5"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2","3","4"],function(a,b,c,d){var e=c.translate;return b.add("textcolor",function(b){function c(a){var c;return b.dom.getParents(b.selection.getStart(),function(b){var d;(d=b.style["forecolor"==a?"color":"background-color"])&&(c=d)}),c}function f(a){var c,d,e=[];for(d=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],d=b.settings.textcolor_map||d,d=b.settings[a+"_map"]||d,c=0;c<d.length;c+=2)e.push({text:d[c+1],color:"#"+d[c]});return e}function g(){function a(a,b){var c="transparent"==a;return'<td class="mce-grid-cell'+(c?" mce-colorbtn-trans":"")+'"><div id="'+p+"-"+q++ +'" data-mce-color="'+(a?a:"")+'" role="option" tabIndex="-1" style="'+(a?"background-color: "+a:"")+'" title="'+e(b)+'">'+(c?"&#215;":"")+"</div></td>"}var c,d,g,h,i,j,k,n,o=this,p=o._id,q=0;for(n=o.settings.origin,c=f(n),c.push({text:e("No color"),color:"transparent"}),g='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',h=c.length-1,j=0;j<m[n];j++){for(g+="<tr>",i=0;i<l[n];i++)k=j*l[n]+i,k>h?g+="<td></td>":(d=c[k],g+=a(d.color,d.text));g+="</tr>"}if(b.settings.color_picker_callback){for(g+='<tr><td colspan="'+l[n]+'" class="mce-custom-color-btn"><div id="'+p+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+p+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+e("Custom...")+"</button></div></td></tr>",g+="<tr>",i=0;i<l[n];i++)g+=a("","Custom color");g+="</tr>"}return g+="</tbody></table>"}function h(a,c){b.undoManager.transact(function(){b.focus(),b.formatter.apply(a,{value:c}),b.nodeChanged()})}function i(a){b.undoManager.transact(function(){b.focus(),b.formatter.remove(a,{value:null},null,!0),b.nodeChanged()})}function j(e){function f(a){n.hidePanel(),n.color(a),h(n.settings.format,a)}function g(){n.hidePanel(),n.resetColor(),i(n.settings.format)}function j(a,b){a.style.background=b,a.setAttribute("data-mce-color",b)}var k,m,n=this.parent();m=n.settings.origin,a.DOM.getParent(e.target,".mce-custom-color-btn")&&(n.hidePanel(),b.settings.color_picker_callback.call(b,function(a){var b,c,e,g=n.panel.getEl().getElementsByTagName("table")[0];for(b=d.map(g.rows[g.rows.length-1].childNodes,function(a){return a.firstChild}),e=0;e<b.length&&(c=b[e],c.getAttribute("data-mce-color"));e++);if(e==l[m])for(e=0;e<l[m]-1;e++)j(b[e],b[e+1].getAttribute("data-mce-color"));j(c,a),f(a)},c(n.settings.format))),k=e.target.getAttribute("data-mce-color"),k?(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),e.target.setAttribute("aria-selected",!0),this.lastId=e.target.id,"transparent"==k?g():f(k)):null!==k&&n.hidePanel()}function k(){var a=this;a._color?h(a.settings.format,a._color):i(a.settings.format)}var l,m;m={forecolor:b.settings.forecolor_rows||b.settings.textcolor_rows||5,backcolor:b.settings.backcolor_rows||b.settings.textcolor_rows||5},l={forecolor:b.settings.forecolor_cols||b.settings.textcolor_cols||8,backcolor:b.settings.backcolor_cols||b.settings.textcolor_cols||8},b.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{origin:"forecolor",role:"application",ariaRemember:!0,html:g,onclick:j},onclick:k}),b.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{origin:"backcolor",role:"application",ariaRemember:!0,html:g,onclick:j},onclick:k})}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("textpattern",function(e){function t(){return c&&(l.sort(function(e,t){return e.start.length>t.start.length?-1:e.start.length<t.start.length?1:0}),c=!1),l}function n(e){for(var n=t(),r=0;r<n.length;r++)if(0===e.indexOf(n[r].start)&&(!n[r].end||e.lastIndexOf(n[r].end)==e.length-n[r].end.length))return n[r]}function r(e,n,r){var i,o,a;for(i=t(),a=0;a<i.length;a++)if(o=i[a],o.end&&e.substr(n-o.end.length-r,o.end.length)==o.end)return o}function i(t){function i(){l=l.splitText(u),l.splitText(c-u-m),l.deleteData(0,p.start.length),l.deleteData(l.data.length-p.end.length,p.end.length)}var o,a,s,l,c,u,d,f,p,m,g;if(o=e.selection,a=e.dom,o.isCollapsed()&&(s=o.getRng(!0),l=s.startContainer,c=s.startOffset,d=l.data,m=t?1:0,3==l.nodeType&&(p=r(d,c,m),p&&(u=Math.max(0,c-m),u=d.lastIndexOf(p.start,u-p.end.length-1),u!==-1&&(f=a.createRng(),f.setStart(l,u),f.setEnd(l,c-m),p=n(f.toString()),p&&p.end&&!(l.data.length<=p.start.length+p.end.length))))))return g=e.formatter.get(p.format),g&&g[0].inline?(i(),e.formatter.apply(p.format,{},l),l):void 0}function o(){var t,r,i,o,a,s,l,c,u,d,f;if(t=e.selection,r=e.dom,t.isCollapsed()&&(l=r.getParent(t.getStart(),"p"))){for(u=new tinymce.dom.TreeWalker(l,l);a=u.next();)if(3==a.nodeType){o=a;break}if(o){if(c=n(o.data),!c)return;if(d=t.getRng(!0),i=d.startContainer,f=d.startOffset,o==i&&(f=Math.max(0,f-c.start.length)),tinymce.trim(o.data).length==c.start.length)return;c.format&&(s=e.formatter.get(c.format),s&&s[0].block&&(o.deleteData(0,c.start.length),e.formatter.apply(c.format,{},o),d.setStart(i,f),d.collapse(!0),t.setRng(d))),c.cmd&&e.undoManager.transact(function(){o.deleteData(0,c.start.length),e.execCommand(c.cmd)})}}}function a(){var t,n;n=i(),n&&(t=e.dom.createRng(),t.setStart(n,n.data.length),t.setEnd(n,n.data.length),e.selection.setRng(t)),o()}function s(){var t,n,r,o,a;t=i(!0),t&&(a=e.dom,n=t.data.slice(-1),/[\u00a0 ]/.test(n)&&(t.deleteData(t.data.length-1,1),r=a.doc.createTextNode(n),t.nextSibling?a.insertAfter(r,t.nextSibling):t.parentNode.appendChild(r),o=a.createRng(),o.setStart(r,1),o.setEnd(r,1),e.selection.setRng(o)))}var l,c=!0;l=e.settings.textpattern_patterns||[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],e.on("keydown",function(e){13!=e.keyCode||tinymce.util.VK.modifierPressed(e)||a()},!0),e.on("keyup",function(e){32!=e.keyCode||tinymce.util.VK.modifierPressed(e)||s()}),this.getPatterns=t,this.setPatterns=function(e){l=e,c=!0}});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("7",tinymce.util.Tools.resolve),g("1",["7"],function(a){return a("tinymce.PluginManager")}),g("2",["7"],function(a){return a("tinymce.util.Delay")}),g("3",["7"],function(a){return a("tinymce.util.VK")}),g("8",["7"],function(a){return a("tinymce.dom.TreeWalker")}),g("9",["7"],function(a){return a("tinymce.util.Tools")}),g("a",[],function(){var a=function(a){return a.sort(function(a,b){return a.start.length>b.start.length?-1:a.start.length<b.start.length?1:0})},b=function(a,b){for(var c=0;c<a.length;c++)if(0===b.indexOf(a[c].start)&&(!a[c].end||b.lastIndexOf(a[c].end)===b.length-a[c].end.length))return a[c]},c=function(a,b,c,d){var e=b.substr(c-a.end.length-d,a.end.length);return e===a.end},d=function(a,b,c){return a-b-c.end.length-c.start.length>0},e=function(b,e,f,g){var h,i,j=a(b);for(i=0;i<j.length;i++)if(h=j[i],void 0!==h.end&&c(h,e,f,g)&&d(f,g,h))return h};return{findPattern:b,findEndPattern:e}}),g("4",["8","9","a"],function(a,b,c){var d=function(a,b,c,d,e){return a=d>0?a.splitText(d):a,a.splitText(c-d-e),a.deleteData(0,b.start.length),a.deleteData(a.data.length-b.end.length,b.end.length),a},e=function(a,b,e){var f,g,h,i,j,k,l,m,n,o,p;if(f=a.selection,g=a.dom,f.isCollapsed()&&(h=f.getRng(!0),i=h.startContainer,j=h.startOffset,l=i.data,o=e===!0?1:0,3==i.nodeType&&(n=c.findEndPattern(b,l,j,o),void 0!==n&&(k=Math.max(0,j-o),k=l.lastIndexOf(n.start,k-n.end.length-1),k!==-1&&(m=g.createRng(),m.setStart(i,k),m.setEnd(i,j-o),n=c.findPattern(b,m.toString()),n&&n.end&&!(i.data.length<=n.start.length+n.end.length))))))return p=a.formatter.get(n.format),p&&p[0].inline?(a.undoManager.transact(function(){i=d(i,n,j,k,o),a.formatter.apply(n.format,{},i)}),i):void 0},f=function(d,e){var f,g,h,i,j,k,l,m,n,o,p;if(f=d.selection,g=d.dom,f.isCollapsed()&&(l=g.getParent(f.getStart(),"p"))){for(n=new a(l,l);j=n.next();)if(3==j.nodeType){i=j;break}if(i){if(m=c.findPattern(e,i.data),!m)return;if(o=f.getRng(!0),h=o.startContainer,p=o.startOffset,i==h&&(p=Math.max(0,p-m.start.length)),b.trim(i.data).length==m.start.length)return;m.format&&(k=d.formatter.get(m.format),k&&k[0].block&&(i.deleteData(0,m.start.length),d.formatter.apply(m.format,{},i),o.setStart(h,p),o.collapse(!0),f.setRng(o))),m.cmd&&d.undoManager.transact(function(){i.deleteData(0,m.start.length),d.execCommand(m.cmd)})}}};return{applyInlineFormat:e,applyBlockFormat:f}}),g("5",["3","4"],function(a,b){function c(a,c){var d,e;e=b.applyInlineFormat(a,c,!1),e&&(d=a.dom.createRng(),d.setStart(e,e.data.length),d.setEnd(e,e.data.length),a.selection.setRng(d)),b.applyBlockFormat(a,c)}function d(a,c){var d,e,f,g,h;d=b.applyInlineFormat(a,c,!0),d&&(h=a.dom,e=d.data.slice(-1),/[\u00a0 ]/.test(e)&&(d.deleteData(d.data.length-1,1),f=h.doc.createTextNode(e),d.nextSibling?h.insertAfter(f,d.nextSibling):d.parentNode.appendChild(f),g=h.createRng(),g.setStart(f,1),g.setEnd(f,1),a.selection.setRng(g)))}var e=function(a,b,c){for(var d=0;d<a.length;d++)if(c(a[d],b))return!0},f=function(b,c){return e(b,c,function(b,c){return b===c.keyCode&&a.modifierPressed(c)===!1})},g=function(a,b){return e(a,b,function(a,b){return a.charCodeAt(0)===b.charCode})};return{handleEnter:c,handleInlineKey:d,checkCharCode:g,checkKeyCode:f}}),g("6",[],function(){var a=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],b=function(b){return void 0!==b.textpattern_patterns?b.textpattern_patterns:a};return{getPatterns:b}}),g("0",["1","2","3","4","5","6"],function(a,b,c,d,e,f){return a.add("textpattern",function(a){var d=f.getPatterns(a.settings),g=[",",".",";",":","!","?"],h=[32];a.on("keydown",function(b){13!==b.keyCode||c.modifierPressed(b)||e.handleEnter(a,d)},!0),a.on("keyup",function(b){e.checkKeyCode(h,b)&&e.handleInlineKey(a,d)}),a.on("keypress",function(c){e.checkCharCode(g,c)&&b.setEditorTimeout(a,function(){e.handleInlineKey(a,d)})}),this.setPatterns=function(a){d=a},this.getPatterns=function(){return d}}),function(){}}),d("0")()}();
@@ -1 +1 @@
1
- tinymce.PluginManager.add("toc",function(e){function t(t){return e.schema.isValidChild("div",t)}function n(t){return t&&e.dom.is(t,"."+d.className)&&e.getBody().contains(t)}function r(){var t=this;t.disabled(e.readonly||!o()),e.on("LoadContent SetContent change",function(){t.disabled(e.readonly||!o())})}function i(e){var t,n=[];for(t=1;t<=e;t++)n.push("h"+t);return n.join(",")}function o(){return!(!d||!a(d).length)}function a(t){var n=i(t.depth),r=f(n);return r.length&&/^h[1-9]$/i.test(t.headerTag)&&(r=r.filter(function(n,r){return!e.dom.hasClass(r.parentNode,t.className)})),tinymce.map(r,function(e){return e.id||(e.id=g()),{id:e.id,level:parseInt(e.nodeName.replace(/^H/i,""),10),title:f.text(e)}})}function s(e){var t,n=9;for(t=0;t<e.length;t++)if(e[t].level<n&&(n=e[t].level),1==n)return n;return n}function l(t,n){var r="<"+t+' contenteditable="true">',i="</"+t+">";return r+e.dom.encode(n)+i}function c(e){var t=u(e);return'<div class="'+e.className+'" contenteditable="false">'+t+"</div>"}function u(e){var t,n,r,i,o="",c=a(e),u=s(c)-1;if(!c.length)return"";for(o+=l(e.headerTag,tinymce.translate("Table of Contents")),t=0;t<c.length;t++){if(r=c[t],i=c[t+1]&&c[t+1].level,u===r.level)o+="<li>";else for(n=u;n<r.level;n++)o+="<ul><li>";if(o+='<a href="#'+r.id+'">'+r.title+"</a>",i!==r.level&&i)for(n=r.level;n>i;n--)o+="</li></ul><li>";else o+="</li>",i||(o+="</ul>");u=r.level}return o}var d,f=e.$,p={depth:3,headerTag:"h2",className:"mce-toc"},m=function(e){var t=0;return function(){var n=(new Date).getTime().toString(32);return e+n+(t++).toString(32)}},g=m("mcetoc_");e.on("PreInit",function(){var n=e.settings,r=parseInt(n.toc_depth,10)||0;d={depth:r>=1&&r<=9?r:p.depth,headerTag:t(n.toc_header)?n.toc_header:p.headerTag,className:n.toc_class?e.dom.encode(n.toc_class):p.className}}),e.on("PreProcess",function(e){var t=f("."+d.className,e.node);t.length&&(t.removeAttr("contentEditable"),t.find("[contenteditable]").removeAttr("contentEditable"))}),e.on("SetContent",function(){var e=f("."+d.className);e.length&&(e.attr("contentEditable",!1),e.children(":first-child").attr("contentEditable",!0))});var h=function(t){return!t.length||e.dom.getParents(t[0],".mce-offscreen-selection").length>0};e.addCommand("mceInsertToc",function(){var t=f("."+d.className);h(t)?e.insertContent(c(d)):e.execCommand("mceUpdateToc")}),e.addCommand("mceUpdateToc",function(){var t=f("."+d.className);t.length&&e.undoManager.transact(function(){t.html(u(d))})}),e.addButton("toc",{tooltip:"Table of Contents",cmd:"mceInsertToc",icon:"toc",onPostRender:r}),e.addButton("tocupdate",{tooltip:"Update",cmd:"mceUpdateToc",icon:"reload"}),e.addContextToolbar(n,"tocupdate"),e.addMenuItem("toc",{text:"Table of Contents",context:"insert",cmd:"mceInsertToc",onPostRender:r})});
1
+ !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("4",tinymce.util.Tools.resolve),g("1",["4"],function(a){return a("tinymce.PluginManager")}),g("2",["4"],function(a){return a("tinymce.util.I18n")}),g("3",["4"],function(a){return a("tinymce.util.Tools")}),g("0",["1","2","3"],function(a,b,c){return a.add("toc",function(a){function d(b){return!!b&&a.schema.isValidChild("div",b)}function e(b){return b&&a.dom.is(b,"."+n.className)&&a.getBody().contains(b)}function f(){var b=this;b.disabled(a.readonly||!h()),a.on("LoadContent SetContent change",function(){b.disabled(a.readonly||!h())})}function g(a){var b,c=[];for(b=1;b<=a;b++)c.push("h"+b);return c.join(",")}function h(){return!(!n||!i(n).length)}function i(b){var d=g(b.depth),e=o(d);return e.length&&/^h[1-9]$/i.test(b.headerTag)&&(e=e.filter(function(c,d){return!a.dom.hasClass(d.parentNode,b.className)})),c.map(e,function(a){return a.id||(a.id=r()),{id:a.id,level:parseInt(a.nodeName.replace(/^H/i,""),10),title:o.text(a)}})}function j(a){var b,c=9;for(b=0;b<a.length;b++)if(a[b].level<c&&(c=a[b].level),1==c)return c;return c}function k(b,c){var d="<"+b+' contenteditable="true">',e="</"+b+">";return d+a.dom.encode(c)+e}function l(a){var b=m(a);return'<div class="'+a.className+'" contenteditable="false">'+b+"</div>"}function m(a){var c,d,e,f,g="",h=i(a),l=j(h)-1;if(!h.length)return"";for(g+=k(a.headerTag,b.translate("Table of Contents")),c=0;c<h.length;c++){if(e=h[c],f=h[c+1]&&h[c+1].level,l===e.level)g+="<li>";else for(d=l;d<e.level;d++)g+="<ul><li>";if(g+='<a href="#'+e.id+'">'+e.title+"</a>",f!==e.level&&f)for(d=e.level;d>f;d--)g+="</li></ul><li>";else g+="</li>",f||(g+="</ul>");l=e.level}return g}var n,o=a.$,p={depth:3,headerTag:"h2",className:"mce-toc"},q=function(a){var b=0;return function(){var c=(new Date).getTime().toString(32);return a+c+(b++).toString(32)}},r=q("mcetoc_");a.on("PreInit",function(){var b=a.settings,c=parseInt(b.toc_depth,10)||0;n={depth:c>=1&&c<=9?c:p.depth,headerTag:d(b.toc_header)?b.toc_header:p.headerTag,className:b.toc_class?a.dom.encode(b.toc_class):p.className}}),a.on("PreProcess",function(a){var b=o("."+n.className,a.node);b.length&&(b.removeAttr("contentEditable"),b.find("[contenteditable]").removeAttr("contentEditable"))}),a.on("SetContent",function(){var a=o("."+n.className);a.length&&(a.attr("contentEditable",!1),a.children(":first-child").attr("contentEditable",!0))});var s=function(b){return!b.length||a.dom.getParents(b[0],".mce-offscreen-selection").length>0};a.addCommand("mceInsertToc",function(){var b=o("."+n.className);s(b)?a.insertContent(l(n)):a.execCommand("mceUpdateToc")}),a.addCommand("mceUpdateToc",function(){var b=o("."+n.className);b.length&&a.undoManager.transact(function(){b.html(m(n))})}),a.addButton("toc",{tooltip:"Table of Contents",cmd:"mceInsertToc",icon:"toc",onPostRender:f}),a.addButton("tocupdate",{tooltip:"Update",cmd:"mceUpdateToc",icon:"reload"}),a.addContextToolbar(e,"tocupdate"),a.addMenuItem("toc",{text:"Table of Contents",context:"insert",cmd:"mceInsertToc",onPostRender:f})}),function(){}}),d("0")()}();
@@ -1,135 +1,135 @@
1
1
  .mce-visualblocks p {
2
- padding-top: 10px;
3
- border: 1px dashed #BBB;
4
- margin-left: 3px;
5
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
2
+ padding-top: 10px;
3
+ border: 1px dashed #BBB;
4
+ margin-left: 3px;
5
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
6
6
  }
7
7
 
8
8
  .mce-visualblocks h1 {
9
- padding-top: 10px;
10
- border: 1px dashed #BBB;
11
- margin-left: 3px;
12
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
9
+ padding-top: 10px;
10
+ border: 1px dashed #BBB;
11
+ margin-left: 3px;
12
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
13
13
  }
14
14
 
15
15
  .mce-visualblocks h2 {
16
- padding-top: 10px;
17
- border: 1px dashed #BBB;
18
- margin-left: 3px;
19
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
16
+ padding-top: 10px;
17
+ border: 1px dashed #BBB;
18
+ margin-left: 3px;
19
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
20
20
  }
21
21
 
22
22
  .mce-visualblocks h3 {
23
- padding-top: 10px;
24
- border: 1px dashed #BBB;
25
- margin-left: 3px;
26
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
23
+ padding-top: 10px;
24
+ border: 1px dashed #BBB;
25
+ margin-left: 3px;
26
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
27
27
  }
28
28
 
29
29
  .mce-visualblocks h4 {
30
- padding-top: 10px;
31
- border: 1px dashed #BBB;
32
- margin-left: 3px;
33
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
30
+ padding-top: 10px;
31
+ border: 1px dashed #BBB;
32
+ margin-left: 3px;
33
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
34
34
  }
35
35
 
36
36
  .mce-visualblocks h5 {
37
- padding-top: 10px;
38
- border: 1px dashed #BBB;
39
- margin-left: 3px;
40
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
37
+ padding-top: 10px;
38
+ border: 1px dashed #BBB;
39
+ margin-left: 3px;
40
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
41
41
  }
42
42
 
43
43
  .mce-visualblocks h6 {
44
- padding-top: 10px;
45
- border: 1px dashed #BBB;
46
- margin-left: 3px;
47
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
44
+ padding-top: 10px;
45
+ border: 1px dashed #BBB;
46
+ margin-left: 3px;
47
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
48
48
  }
49
49
 
50
50
  .mce-visualblocks div:not([data-mce-bogus]) {
51
- padding-top: 10px;
52
- border: 1px dashed #BBB;
53
- margin-left: 3px;
54
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
51
+ padding-top: 10px;
52
+ border: 1px dashed #BBB;
53
+ margin-left: 3px;
54
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
55
55
  }
56
56
 
57
57
  .mce-visualblocks section {
58
- padding-top: 10px;
59
- border: 1px dashed #BBB;
60
- margin: 0 0 1em 3px;
61
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
58
+ padding-top: 10px;
59
+ border: 1px dashed #BBB;
60
+ margin: 0 0 1em 3px;
61
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
62
62
  }
63
63
 
64
64
  .mce-visualblocks article {
65
- padding-top: 10px;
66
- border: 1px dashed #BBB;
67
- margin: 0 0 1em 3px;
68
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
65
+ padding-top: 10px;
66
+ border: 1px dashed #BBB;
67
+ margin: 0 0 1em 3px;
68
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
69
69
  }
70
70
 
71
71
  .mce-visualblocks blockquote {
72
- padding-top: 10px;
73
- border: 1px dashed #BBB;
74
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
72
+ padding-top: 10px;
73
+ border: 1px dashed #BBB;
74
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
75
75
  }
76
76
 
77
77
  .mce-visualblocks address {
78
- padding-top: 10px;
79
- border: 1px dashed #BBB;
80
- margin: 0 0 1em 3px;
81
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
78
+ padding-top: 10px;
79
+ border: 1px dashed #BBB;
80
+ margin: 0 0 1em 3px;
81
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
82
82
  }
83
83
 
84
84
  .mce-visualblocks pre {
85
- padding-top: 10px;
86
- border: 1px dashed #BBB;
87
- margin-left: 3px;
88
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
85
+ padding-top: 10px;
86
+ border: 1px dashed #BBB;
87
+ margin-left: 3px;
88
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
89
89
  }
90
90
 
91
91
  .mce-visualblocks figure {
92
- padding-top: 10px;
93
- border: 1px dashed #BBB;
94
- margin: 0 0 1em 3px;
95
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
92
+ padding-top: 10px;
93
+ border: 1px dashed #BBB;
94
+ margin: 0 0 1em 3px;
95
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
96
96
  }
97
97
 
98
98
  .mce-visualblocks hgroup {
99
- padding-top: 10px;
100
- border: 1px dashed #BBB;
101
- margin: 0 0 1em 3px;
102
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
99
+ padding-top: 10px;
100
+ border: 1px dashed #BBB;
101
+ margin: 0 0 1em 3px;
102
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
103
103
  }
104
104
 
105
105
  .mce-visualblocks aside {
106
- padding-top: 10px;
107
- border: 1px dashed #BBB;
108
- margin: 0 0 1em 3px;
109
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
106
+ padding-top: 10px;
107
+ border: 1px dashed #BBB;
108
+ margin: 0 0 1em 3px;
109
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
110
110
  }
111
111
 
112
112
  .mce-visualblocks figcaption {
113
- border: 1px dashed #BBB;
113
+ border: 1px dashed #BBB;
114
114
  }
115
115
 
116
116
  .mce-visualblocks ul {
117
- padding-top: 10px;
118
- border: 1px dashed #BBB;
119
- margin: 0 0 1em 3px;
120
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)
117
+ padding-top: 10px;
118
+ border: 1px dashed #BBB;
119
+ margin: 0 0 1em 3px;
120
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)
121
121
  }
122
122
 
123
123
  .mce-visualblocks ol {
124
- padding-top: 10px;
125
- border: 1px dashed #BBB;
126
- margin: 0 0 1em 3px;
127
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
124
+ padding-top: 10px;
125
+ border: 1px dashed #BBB;
126
+ margin: 0 0 1em 3px;
127
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
128
128
  }
129
129
 
130
130
  .mce-visualblocks dl {
131
- padding-top: 10px;
132
- border: 1px dashed #BBB;
133
- margin: 0 0 1em 3px;
134
- background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);
131
+ padding-top: 10px;
132
+ border: 1px dashed #BBB;
133
+ margin: 0 0 1em 3px;
134
+ background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);
135
135
  }