tinymce-rails 5.3.0 → 5.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/source/tinymce/tinymce.js +26 -8
  3. data/lib/tinymce/rails/version.rb +2 -2
  4. data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -1
  5. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -1
  6. data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -1
  7. data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -1
  8. data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -1
  9. data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -1
  10. data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -1
  11. data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
  12. data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
  13. data/vendor/assets/javascripts/tinymce/plugins/colorpicker/plugin.js +1 -1
  14. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -1
  15. data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -1
  16. data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -1
  17. data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -1
  18. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -1
  19. data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +1 -1
  20. data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -1
  21. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +2 -2
  22. data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +1 -1
  23. data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +1 -1
  24. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -1
  25. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -1
  26. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -1
  27. data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -1
  28. data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -1
  29. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -1
  30. data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -1
  31. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -1
  32. data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -1
  33. data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -1
  34. data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -1
  35. data/vendor/assets/javascripts/tinymce/plugins/quickbars/plugin.js +1 -1
  36. data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -1
  37. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -1
  38. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -1
  39. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +1 -1
  40. data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -1
  41. data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -1
  42. data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -1
  43. data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +1 -1
  44. data/vendor/assets/javascripts/tinymce/plugins/toc/plugin.js +1 -1
  45. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -1
  46. data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -1
  47. data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -1
  48. data/vendor/assets/javascripts/tinymce/skins/content/dark/content.css +1 -1
  49. data/vendor/assets/javascripts/tinymce/skins/content/dark/content.min.css +1 -1
  50. data/vendor/assets/javascripts/tinymce/skins/content/default/content.css +1 -1
  51. data/vendor/assets/javascripts/tinymce/skins/content/default/content.min.css +1 -1
  52. data/vendor/assets/javascripts/tinymce/skins/content/document/content.css +1 -1
  53. data/vendor/assets/javascripts/tinymce/skins/content/document/content.min.css +1 -1
  54. data/vendor/assets/javascripts/tinymce/skins/content/writer/content.css +1 -1
  55. data/vendor/assets/javascripts/tinymce/skins/content/writer/content.min.css +1 -1
  56. data/vendor/assets/javascripts/tinymce/themes/mobile/theme.js +2 -2
  57. data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +2 -2
  58. data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
  59. metadata +2 -2
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e,n,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.util.I18n"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(t){return t.getParam("toc_class","mce-toc")},m=function(t){var e=t.getParam("toc_header","h2");return/^h[1-6]$/.test(e)?e:"h2"},a=(e="mcetoc_",n=0,function(){var t=(new Date).getTime().toString(32);return e+t+(n++).toString(32)}),u=function u(t){var e,n=[];for(e=1;e<=t;e++)n.push("h"+e);return n.join(",")},v=function(n){var t,o=l(n),e=m(n),i=u(1<=(t=parseInt(n.getParam("toc_depth","3"),10))&&t<=9?t:3),r=n.$(i);return r.length&&/^h[1-9]$/i.test(e)&&(r=r.filter(function(t,e){return!n.dom.hasClass(e.parentNode,o)})),c.map(r,function(t){return{id:t.id?t.id:a(),level:parseInt(t.nodeName.replace(/^H/i,""),10),title:n.$.text(t),element:t}})},d=function(t){var e,n,o,i,r,c,l,a="",u=v(t),d=function(t){var e,n=9;for(e=0;e<t.length;e++)if(t[e].level<n&&(n=t[e].level),1===n)return n;return n}(u)-1;if(!u.length)return"";for(a+=(r=m(t),c=f.translate("Table of Contents"),l="</"+r+">","<"+r+' contenteditable="true">'+s.DOM.encode(c)+l),e=0;e<u.length;e++){if((o=u[e]).element.id=o.id,i=u[e+1]&&u[e+1].level,d===o.level)a+="<li>";else for(n=d;n<o.level;n++)a+="<ul><li>";if(a+='<a href="#'+o.id+'">'+o.title+"</a>",i!==o.level&&i)for(n=o.level;i<n;n--)a+="</li></ul><li>";else a+="</li>",i||(a+="</ul>");d=o.level}return a},r=function(t){var e,n,o,i,r=l(t),c=t.$("."+r);o=t,!(i=c).length||0<o.dom.getParents(i[0],".mce-offscreen-selection").length?t.insertContent((n=d(e=t),'<div class="'+e.dom.encode(l(e))+'" contenteditable="false">'+n+"</div>")):g(t)},g=function(t){var e=l(t),n=t.$("."+e);n.length&&t.undoManager.transact(function(){n.html(d(t))})},o=function(n){return function(t){var e=function(){return t.setDisabled(n.mode.isReadOnly()||!(0<v(n).length))};return e(),n.on("LoadContent SetContent change",e),function(){return n.on("LoadContent SetContent change",e)}}},h=function(t){var e;t.ui.registry.addButton("toc",{icon:"toc",tooltip:"Table of contents",onAction:function(){return t.execCommand("mceInsertToc")},onSetup:o(t)}),t.ui.registry.addButton("tocupdate",{icon:"reload",tooltip:"Update",onAction:function(){return t.execCommand("mceUpdateToc")}}),t.ui.registry.addMenuItem("toc",{icon:"toc",text:"Table of contents",onAction:function(){return t.execCommand("mceInsertToc")},onSetup:o(t)}),t.ui.registry.addContextToolbar("toc",{items:"tocupdate",predicate:(e=t,function(t){return t&&e.dom.is(t,"."+l(e))&&e.getBody().contains(t)}),scope:"node",position:"node"})};!function i(){t.add("toc",function(t){var e,n,o,i;(e=t).addCommand("mceInsertToc",function(){r(e)}),e.addCommand("mceUpdateToc",function(){g(e)}),h(t),o=(n=t).$,i=l(n),n.on("PreProcess",function(t){var e=o("."+i,t.node);e.length&&(e.removeAttr("contentEditable"),e.find("[contenteditable]").removeAttr("contentEditable"))}),n.on("SetContent",function(){var t=o("."+i);t.length&&(t.attr("contentEditable",!1),t.children(":first-child").attr("contentEditable",!0))})})}()}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(o,t,e){var n,s;o.dom.toggleClass(o.getBody(),"mce-visualblocks"),e.set(!e.get()),n=o,s=e.get(),n.fire("VisualBlocks",{state:s})},m=function(e,n){return function(t){t.setActive(n.get());var o=function(o){return t.setActive(o.state)};return e.on("VisualBlocks",o),function(){return e.off("VisualBlocks",o)}}};!function t(){o.add("visualblocks",function(o,t){var e,n,s,i,c,u,l,a=(e=!1,{get:function(){return e},set:function(o){e=o}});s=a,(n=o).addCommand("mceVisualBlocks",function(){r(n,0,s)}),c=a,(i=o).ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:function(){return i.execCommand("mceVisualBlocks")},onSetup:m(i,c)}),i.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:function(){return i.execCommand("mceVisualBlocks")},onSetup:m(i,c)}),l=a,(u=o).on("PreviewFormats AfterPreviewFormats",function(o){l.get()&&u.dom.toggleClass(u.getBody(),"mce-visualblocks","afterpreviewformats"===o.type)}),u.on("init",function(){u.getParam("visualblocks_default_state",!1,"boolean")&&r(u,0,l)}),u.on("remove",function(){u.dom.removeClass(u.getBody(),"mce-visualblocks")})})}()}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(r){"use strict";var n,t,e,o,u,i,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(n){return function(){return n}},s=a(!1),f=a(!0),l=function(){return d},d=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:s,isSome:s,isNone:f,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:e,orThunk:t,map:l,each:function(){},bind:l,exists:s,forall:f,filter:l,equals:n,equals_:n,toArray:function(){return[]},toString:a("none()")}),m=function(e){var n=a(e),t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:f,isNone:s,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return m(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?o:d},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(s,function(n){return t(e,n)})}};return o},v=function(n){return null===n||n===undefined?d:m(n)},g=function(t){return function(n){return typeof n===t}},h=(o="string",function(n){return e=typeof(t=n),(null===t?"null":"object"==e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e)===o;var t,e}),p=g("boolean"),y=g("number"),w=function(n,t){for(var e=0,r=n.length;e<r;e++){t(n[e],e)}},b=Object.keys,N=function(n,t){for(var e=b(n),r=0,o=e.length;r<o;r++){var u=e[r];t(n[u],u)}},T=("undefined"!=typeof r.window?r.window:Function("return this;")(),function(n){return n.dom().nodeValue}),k=(u=3,function(n){return n.dom().nodeType===u}),A=function(n,t,e){!function(n,t,e){if(!(h(e)||p(e)||y(e)))throw r.console.error("Invalid call to Attr.set. Key ",t,":: Value ",e,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,e+"")}(n.dom(),t,e)},O=function(n,t){n.dom().removeAttribute(t)},C=function(n,t){var e,r,o=(e=t,null===(r=n.dom().getAttribute(e))?undefined:r);return o===undefined||""===o?[]:o.split(" ")},S=function(n){return n.dom().classList!==undefined},D=function(n,t){return o=t,u=C(e=n,r="class").concat([o]),A(e,r,u.join(" ")),!0;var e,r,o,u},E=function(n,t){return o=t,0<(u=function(n,t){for(var e=[],r=0,o=n.length;r<o;r++){var u=n[r];t(u,r)&&e.push(u)}return e}(C(e=n,r="class"),function(n){return n!==o})).length?A(e,r,u.join(" ")):O(e,r),!1;var e,r,o,u},L=function(n){0===(S(n)?n.dom().classList:C(n,"class")).length&&O(n,"class")},x=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:a(n)}},V={fromHtml:function(n,t){var e=(t||r.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw r.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return x(e.childNodes[0])},fromTag:function(n,t){var e=(t||r.document).createElement(n);return x(e)},fromText:function(n,t){var e=(t||r.document).createTextNode(n);return x(e)},fromDom:x,fromPoint:function(n,t,e){var r=n.dom();return v(r.elementFromPoint(t,e)).map(x)}},B={"\xa0":"nbsp","\xad":"shy"},P=function(n,t){var e="";return N(n,function(n,t){e+=t}),new RegExp("["+e+"]",t?"g":"")},_=P(B),j=P(B,!0),M=(i="",N(B,function(n){i&&(i+=","),i+="span.mce-"+n}),i),q="mce-nbsp",H=function(n){return'<span data-mce-bogus="1" class="mce-'+B[n]+'">'+n+"</span>"},F=function(n){var t=T(n);return k(n)&&t!==undefined&&_.test(t)},I=function(n,t){var e=[],r=function(n,t){for(var e=n.length,r=new Array(e),o=0;o<e;o++){var u=n[o];r[o]=t(u,o)}return r}(n.dom().childNodes,V.fromDom);return w(r,function(n){t(n)&&(e=e.concat([n])),e=e.concat(I(n,t))}),e},U=function(n){return"span"===n.nodeName.toLowerCase()&&n.classList.contains("mce-nbsp-wrap")},K=function(c,n){var t=I(V.fromDom(n),F);w(t,function(n){var t,e,r=n.dom().parentNode;if(U(r))t=V.fromDom(r),e=q,S(t)?t.dom().classList.add(e):D(t,e);else{for(var o=c.dom.encode(T(n)).replace(j,H),u=c.dom.create("div",null,o),i=void 0;i=u.lastChild;)c.dom.insertAfter(i,n.dom());c.dom.remove(n.dom())}})},R=function(t,n){var e=t.dom.select(M,n);w(e,function(n){U(n)?function(n,t){S(n)?n.dom().classList.remove(t):E(n,t);L(n)}(V.fromDom(n),q):t.dom.remove(n,!0)})},z=function(n){var t=n.getBody(),e=n.selection.getBookmark(),r=function(n,t){for(;n.parentNode;){if(n.parentNode===t)return n;n=n.parentNode}}(n.selection.getNode(),t);r=r!==undefined?r:t,R(n,r),K(n,r),n.selection.moveToBookmark(e)},G=function(n,t){var e,r,o,u=n.getBody(),i=n.selection;t.set(!t.get()),r=n,o=t.get(),r.fire("VisualChars",{state:o}),e=i.getBookmark(),(!0===t.get()?K:R)(n,u),i.moveToBookmark(e)},J=tinymce.util.Tools.resolve("tinymce.util.Delay"),Q=function(e,r){return function(t){t.setActive(r.get());var n=function(n){return t.setActive(n.state)};return e.on("VisualChars",n),function(){return e.off("VisualChars",n)}}};!function W(){c.add("visualchars",function(n){var t,e,r,o,u,i,c,a,s,f,l,d=(t=!1,{get:function(){return t},set:function(n){t=n}});return r=d,(e=n).addCommand("mceVisualChars",function(){G(e,r)}),u=d,(o=n).ui.registry.addToggleButton("visualchars",{tooltip:"Show invisible characters",icon:"visualchars",onAction:function(){return o.execCommand("mceVisualChars")},onSetup:Q(o,u)}),o.ui.registry.addToggleMenuItem("visualchars",{text:"Show invisible characters",icon:"visualchars",onAction:function(){return o.execCommand("mceVisualChars")},onSetup:Q(o,u)}),i=n,c=d,a=J.debounce(function(){z(i)},300),!1!==i.settings.forced_root_block&&i.on("keydown",function(n){!0===c.get()&&(13===n.keyCode?z(i):a())}),f=d,(s=n).on("init",function(){var n=!s.getParam("visualchars_default_state",!1);f.set(n),G(s,f)}),l=d,{isEnabled:function(){return l.get()}}})}()}(window);
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(t){return t},i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e="[-'\\.\u2018\u2019\u2024\ufe52\uff07\uff0e]",n="[:\xb7\xb7\u05f4\u2027\ufe13\ufe55\uff1a]",o="[\xb1+*/,;;\u0589\u060c\u060d\u066c\u07f8\u2044\ufe10\ufe14\ufe50\ufe54\uff0c\uff1b]",u="[0-9\u0660-\u0669\u066b\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9]",c="\\r",a="\\n",s="[\x0B\f\x85\u2028\u2029]",g="[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b6-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u192b\u1930-\u193b\u19b0-\u19c0\u19c8\u19c9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f\u1b00-\u1b04\u1b34-\u1b44\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1baa\u1be6-\u1bf3\u1c24-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe3-\uabea\uabec\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]",l="[\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200e\u200f\u202a-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb]",p="[\u3031-\u3035\u309b\u309c\u30a0-\u30fa\u30fc-\u30ff\u31f0-\u31ff\u32d0-\u32fe\u3300-\u3357\uff66-\uff9d]",d="[=_\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f\u2200-\u22ff<>]",f="[!-#%-*,-\\/:;?@\\[-\\]_{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]",m=0,E=1,W=2,x=3,R=4,b=5,S=6,F=7,j=8,A=9,D=10,T=11,B=12,h=13,C=[new RegExp("[A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f3\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u10a0-\u10c5\u10d0-\u10fa\u10fc\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bc0-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24b6-\u24e9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2d00-\u2d25\u2d30-\u2d65\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005\u303b\u303c\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790\ua791\ua7a0-\ua7a9\ua7fa-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]"),new RegExp(e),new RegExp(n),new RegExp(o),new RegExp(u),new RegExp(c),new RegExp(a),new RegExp(s),new RegExp(g),new RegExp(l),new RegExp(p),new RegExp(d),new RegExp("@")],y=new RegExp("^"+f+"$"),v=C,w=h,k=function(t){for(var e=w,n=v.length,r=0;r<n;++r){var o=v[r];if(o&&o.test(t)){e=r;break}}return e},P=function(t){var n,r;return function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var u=t[o];r[o]=e(u,o)}return r}(t,(n=k,r={},function(t){if(r[t])return r[t];var e=n(t);return r[t]=e}))},M=/^\s+$/,O=y,U=function(t,e){var n=function(t,e){var n;for(n=e;n<t.length&&!M.test(t[n]);n++);return n}(t,e+1);return"://"===t.slice(e+1,n).join("").substr(0,3)?n:e},_=function(t,e,n){n=i(i({},{includeWhitespace:!1,includePunctuation:!1}),n);for(var r=[],o=[],u=0;u<t.length;u++){var c=e(t[u]);"\ufeff"!==c&&(r.push(t[u]),o.push(c))}return function(t,e,n,r){for(var o,u,c,i,a,s,g,l=[],p=[],d=0;d<n.length;++d)if(p.push(t[d]),a=i=void 0,s=(u=n)[c=d],g=u[c+1],!(c<0||c>u.length-1&&0!==c||s===m&&g===m||(a=u[c+2],s===m&&(g===W||g===E||g===B)&&a===m||(i=u[c-1],(s===W||s===E||g===B)&&g===m&&i===m||!(s!==R&&s!==m||g!==R&&g!==m)||(s===x||s===E)&&g===R&&i===R||s===R&&(g===x||g===E)&&a===R||s===j||s===A||i===j||i===A||g===j||g===A||s===b&&g===S||s!==F&&s!==b&&s!==S&&g!==F&&g!==b&&g!==S&&(s===D&&g===D||g===T&&(s===m||s===R||s===D||s===T)||s===T&&(g===m||g===R||g===D)||s===B))))){var f=e[d];if((r.includeWhitespace||!M.test(f))&&(r.includePunctuation||!O.test(f))){var h=d-p.length+1,C=d+1,y=e.slice(h,C).join("");if("http"===(o=y)||"https"===o){var v=U(e,d),w=t.slice(C,v);Array.prototype.push.apply(p,w),d=v}l.push(p)}p=[]}return l}(r,o,P(o),n)},N=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),$=function(t,e){for(var n,r=e.getBlockElements(),o=e.getShortEndedElements(),u=[],c="",i=new N(t,t);t=i.next();)3===t.nodeType?c+=t.data.replace(/\uFEFF/g,""):(r[(n=t).nodeName]||o[n.nodeName])&&c.length&&(u.push(c),c="");return c.length&&u.push(c),u},z=function(t){return t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length},I=function(t,e){var n=$(t,e).join("\n");return _(n.split(""),r).length},Z=function(t,e){var n=$(t,e).join("");return z(n)},q=function(t,e){var n=$(t,e).join("").replace(/\s/g,"");return z(n)},G=function(t,e){return function(){return e(t.getBody(),t.schema)}},H=function(t,e){return function(){return e(t.selection.getRng().cloneContents(),t.schema)}},J=function(t){return G(t,I)},K=tinymce.util.Tools.resolve("tinymce.util.Delay"),L=function(t,e){var n;n=e,t.fire("wordCountUpdate",{wordCount:{words:n.body.getWordCount(),characters:n.body.getCharacterCount(),charactersWithoutSpaces:n.body.getCharacterCountWithoutSpaces()}})},Q=function(t,e){t.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(e.body.getWordCount()),String(e.selection.getWordCount())],["Characters (no spaces)",String(e.body.getCharacterCountWithoutSpaces()),String(e.selection.getCharacterCountWithoutSpaces())],["Characters",String(e.body.getCharacterCount()),String(e.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})};!function V(s){void 0===s&&(s=300),t.add("wordcount",function(t){var e,n,r,o,u,c,i,a={body:{getWordCount:J(e=t),getCharacterCount:G(e,Z),getCharacterCountWithoutSpaces:G(e,q)},selection:{getWordCount:H(e,I),getCharacterCount:H(e,Z),getCharacterCountWithoutSpaces:H(e,q)},getCount:J(e)};return r=a,(n=t).ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:function(){return Q(n,r)}}),n.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:function(){return Q(n,r)}}),o=t,u=a,c=s,i=K.debounce(function(){return L(o,u)},c),o.on("init",function(){L(o,u),K.setEditorTimeout(o,function(){o.on("SetContent BeforeAddUndo Undo Redo keyup",i)},0)}),a})}()}();
@@ -4,4 +4,4 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  */
7
- html{height:100%}body{background-color:#2f3742;color:#dfe0e4;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;height:calc(100% - 2rem);line-height:1.4;margin:1rem}a{color:#4099ff}table{border-collapse:collapse}table td,table th{border:1px solid #6d737b;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#8a8f97;display:block;margin-top:.25rem;text-align:center}hr{border-color:#6d737b;border-style:solid;border-width:1px 0 0 0}code{background-color:#6d737b;border-radius:3px;padding:.1rem .2rem}td[data-mce-selected],th[data-mce-selected]{color:#333}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #6d737b;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #6d737b;margin-right:1.5rem;padding-right:1rem}
7
+ body{background-color:#2f3742;color:#dfe0e4;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}a{color:#4099ff}table{border-collapse:collapse}table td,table th{border:1px solid #6d737b;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#8a8f97;display:block;margin-top:.25rem;text-align:center}hr{border-color:#6d737b;border-style:solid;border-width:1px 0 0 0}code{background-color:#6d737b;border-radius:3px;padding:.1rem .2rem}td[data-mce-selected],th[data-mce-selected]{color:#333}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #6d737b;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #6d737b;margin-right:1.5rem;padding-right:1rem}
@@ -4,4 +4,4 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  */
7
- html{height:100%}body{background-color:#2f3742;color:#dfe0e4;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;height:calc(100% - 2rem);line-height:1.4;margin:1rem}a{color:#4099ff}table{border-collapse:collapse}table td,table th{border:1px solid #6d737b;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#8a8f97;display:block;margin-top:.25rem;text-align:center}hr{border-color:#6d737b;border-style:solid;border-width:1px 0 0 0}code{background-color:#6d737b;border-radius:3px;padding:.1rem .2rem}td[data-mce-selected],th[data-mce-selected]{color:#333}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #6d737b;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #6d737b;margin-right:1.5rem;padding-right:1rem}
7
+ body{background-color:#2f3742;color:#dfe0e4;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}a{color:#4099ff}table{border-collapse:collapse}table td,table th{border:1px solid #6d737b;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#8a8f97;display:block;margin-top:.25rem;text-align:center}hr{border-color:#6d737b;border-style:solid;border-width:1px 0 0 0}code{background-color:#6d737b;border-radius:3px;padding:.1rem .2rem}td[data-mce-selected],th[data-mce-selected]{color:#333}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #6d737b;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #6d737b;margin-right:1.5rem;padding-right:1rem}
@@ -4,4 +4,4 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  */
7
- html{height:100%}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;height:calc(100% - 2rem);line-height:1.4;margin:1rem}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
7
+ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
@@ -4,4 +4,4 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  */
7
- html{height:100%}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;height:calc(100% - 2rem);line-height:1.4;margin:1rem}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
7
+ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
@@ -4,4 +4,4 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  */
7
- @media screen{html{background:#f4f4f4;height:100%}}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif}@media screen{body{background-color:#fff;box-shadow:0 0 4px rgba(0,0,0,.15);box-sizing:border-box;height:calc(100% - 1rem);margin:1rem auto 0;max-width:820px;padding:4rem 6rem 6rem 6rem}}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure figcaption{color:#999;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
7
+ @media screen{html{background:#f4f4f4;min-height:100%}}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif}@media screen{body{background-color:#fff;box-shadow:0 0 4px rgba(0,0,0,.15);box-sizing:border-box;margin:1rem auto 0;max-width:820px;min-height:calc(100vh - 1rem);padding:4rem 6rem 6rem 6rem}}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure figcaption{color:#999;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
@@ -4,4 +4,4 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  */
7
- @media screen{html{background:#f4f4f4;height:100%}}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif}@media screen{body{background-color:#fff;box-shadow:0 0 4px rgba(0,0,0,.15);box-sizing:border-box;height:calc(100% - 1rem);margin:1rem auto 0;max-width:820px;padding:4rem 6rem 6rem 6rem}}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure figcaption{color:#999;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
7
+ @media screen{html{background:#f4f4f4;min-height:100%}}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif}@media screen{body{background-color:#fff;box-shadow:0 0 4px rgba(0,0,0,.15);box-sizing:border-box;margin:1rem auto 0;max-width:820px;min-height:calc(100vh - 1rem);padding:4rem 6rem 6rem 6rem}}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure figcaption{color:#999;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
@@ -4,4 +4,4 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  */
7
- html{height:100%}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;height:calc(100% - 2rem);line-height:1.4;margin:1rem auto;max-width:900px}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
7
+ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem auto;max-width:900px}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
@@ -4,4 +4,4 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  */
7
- html{height:100%}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;height:calc(100% - 2rem);line-height:1.4;margin:1rem auto;max-width:900px}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
7
+ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem auto;max-width:900px}table{border-collapse:collapse}table td,table th{border:1px solid #ccc;padding:.4rem}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
- !function(v){"use strict";var x=function(){return(x=Object.assign||function(n){for(var e,t=1,r=arguments.length;t "+r.toString()},function(n,e){return"state("+n+")"})}).join("\n")+"}"}}},Xt=function(t,i){var u=function(n,e){return o=$t(t),function(t,r,n){var e=gn(n,function(n,e){return o.extract(t.concat(["["+e+"]"]),r,n)});return jt(e)}(n,b,e);var o};return{extract:function(t,r,o){var n=T(o),e=u(t,n);return xt(e,function(n){var e=gn(n,function(n){return Pt.field(n,n,Et(),i)});return Wt(e).extract(t,r,o)})},toString:function(){return"setOf("+i.toString()+")"}}},qt=y($t(vt)),Yt=Pt.state,Kt=Pt.field,Jt=function(t,e,r,o,i){return I(o,i).fold(function(){return n=o,e=i,Nt(t,function(){return'The chosen schema: "'+e+'" did not exist in branches: '+Ht(n)});var n,e},function(n){return n.extract(t.concat(["branch: "+i]),e,r)})},Qt=function(o,i){return{extract:function(e,t,r){return I(r,o).fold(function(){return n=o,Nt(e,function(){return'Choice schema did not contain choice key: "'+n+'"'});var n},function(n){return Jt(e,t,r,i,n)})},toString:function(){return"chooseOn("+o+"). Possible values: "+T(i)}}},Zt=$t(vt),nr=function(e){return $t(function(n){return e(n).fold(bt,vt)})},er=function(e,n){return Xt(function(n){return pt(e(n))},n)},tr=function(n,e,t){return ht((r=n,o=b,i=t,u=e.extract([r],o,i),Ot(u,function(n){return{input:i,errors:n}})));var r,o,i,u},rr=function(n){return n.fold(function(n){throw new Error(ir(n))},b)},or=function(n,e,t){return rr(tr(n,e,t))},ir=function(n){return"Errors: \n"+(e=n.errors,t=10 ")+")\n"+n.getErrorInfo()}).join("\n"))+"\n\nInput object: "+Ht(n.input);var e,t},ur=function(n,e){return Qt(n,C(e,Wt))},cr=y(Zt),ar=(ft=cn,st="function",$t(function(n){var e=typeof n;return ft(n)?vt(n):bt("Expected type: "+st+" but got: "+e)})),fr=function(n){return Kt(n,n,Et(),qt())},sr=function(n,e){return Kt(n,n,Et(),e)},lr=function(n,e){return Kt(n,n,Et(),Wt(e))},dr=function(n){return Kt(n,n,Ct(),qt())},mr=function(n,e){return Kt(n,n,Ct(),e)},gr=function(n,e){return mr(n,Wt(e))},pr=function(n,e){return mr(n,Ut(e))},hr=function(n,e){return Kt(n,n,kt(e),qt())},vr=function(n,e,t){return Kt(n,n,kt(e),t)},yr=function(n,e){return Yt(n,e)},br=function(n){return cn(n)?n:y(!1)},xr=function(n,e,t){var r=e(n),o=br(t);return r.orThunk(function(){return o(n)?O.none():function(n,e,t){for(var r=n.dom(),o=br(t);r.parentNode;){r=r.parentNode;var i=Te.fromDom(r),u=e(i);if(u.isSome())return u;if(o(i))break}return O.none()}(n,e,o)})},wr=function(n,e){return Ae(n.element(),e.event().target())},Sr=function(n){if(!R(n,"can")&&!R(n,"abort")&&!R(n,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(n,null,2)+" does not have can, abort, or run!");return or("Extracting event.handler",Ut([hr("can",y(!0)),hr("abort",y(!1)),hr("run",w)]),n)},Or=function(t){var e,r,o,i,n=(r=function(n){return n.can},function(){for(var t=[],n=0;n=r.length&&t.substr(o,o+r.length)===r?n.substring(0,n.length-"/*".length):n;var e,t,r,o})},jr=function(n,e){var t=n.toString(),r=t.indexOf(")")+1,o=t.indexOf("("),i=t.substring(o+1,r-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:e,parameters:Ar(i)}},n},Hr=function(n){return{classes:n.classes!==undefined?n.classes:[],attributes:n.attributes!==undefined?n.attributes:{},styles:n.styles!==undefined?n.styles:{}}},Nr=function(t,r,o){return Vr(function(n,e){o(n,t,r)})},Pr=function(o,i,u){var n,e,t,r,c,a;return n=function(t){for(var n=[],e=1;e"}),cr()),Fa=yr("schema",function(){return[dr("preprocess")]}),Ra=hr("defaults",y({})),Va=hr("overrides",y({})),Ba=Wt([Ma,_a,Da,Ia,Ra,Va]),Aa=Wt([Ma,_a,Da,Ra,Va]),ja=Wt([Ma,_a,Da,Ia,Ra,Va]),Ha=Wt([Ma,Fa,Da,fr("unit"),Ia,Ra,Va]),Na=function(n){var e=function(n){return n.name};return n.fold(e,e,e,e)},Pa=function(t,r){return function(n){var e=or("Converting part type",r,n);return t(e)}},za=Pa(Ca.required,Ba),La=(Pa(Ca.external,Aa),Pa(Ca.optional,ja)),Ga=Pa(Ca.group,Ha),$a=y("entirety"),Ua=function(n,e,t,r){return ct(e.defaults(n,t,r),t,{uid:n.partUids[e.name]},e.overrides(n,t,r))},Wa=function(o,n){var e={};return pn(n,function(n){n.fold(O.some,O.none,O.some,O.some).each(function(t){var r=Xa(o,t.pname);e[t.name]=function(n){var e=or("Part: "+t.name+" in "+o,Wt(t.schema),n);return x(x({},r),{config:n,validated:e})}})}),e},Xa=function(n,e){return{uiType:Ta(),owner:n,name:e}},qa=function(n,e,t){return r=e,i={},o={},pn(t,function(n){n.fold(function(r){i[r.pname]=Sa(!0,function(n,e,t){return r.factory.sketch(Ua(n,r,e,t))})},function(n){var e=r.parts[n.name];o[n.name]=y(n.factory.sketch(Ua(r,n,e[$a()]),e))},function(r){i[r.pname]=Sa(!1,function(n,e,t){return r.factory.sketch(Ua(n,r,e,t))})},function(o){i[o.pname]=Oa(!0,function(e,n,t){var r=e[o.name];return gn(r,function(n){return o.factory.sketch(ct(o.defaults(e,n,t),n,o.overrides(e,n)))})})})}),{internals:y(i),externals:y(o)};var r,i,o},Ya=function(n,e,t){return wa(O.some(n),e,e.components,t)},Ka=function(n,e,t){var r=e.partUids[t];return n.getSystem().getByUid(r).toOption()},Ja=function(n,e,t){return Ka(n,e,t).getOrDie("Could not find part: "+t)},Qa=function(e,n){var t=gn(n,Na);return Rt(gn(t,function(n){return{key:n,value:e+"-"+n}}))},Za=function(e){return Kt("partUids","partUids",_t(function(n){return Qa(n.uid,e)}),cr())},nf=Ea("alloy-premade"),ef=function(n){return Ft(nf,n)},tf=function(r){return n=function(n){for(var e=[],t=1;t')},function(n){return Tf(''+n+"")})},_f=function(n,e,t,r){return wf.sketch({dom:Mf(n,r),action:e,buttonBehaviours:ct(Ur([Sf.config({})]),t)})},Df=La({schema:[fr("dom")],name:"label"}),If=function(e){return La({name:e+"-edge",overrides:function(n){return n.model.manager.edgeActions[e].fold(function(){return{}},function(r){return{events:Tr([Cr(Gn(),function(n,e,t){return r(n,t)},[n]),Cr(Wn(),function(n,e,t){return r(n,t)},[n]),Cr(Xn(),function(n,e,t){t.mouseIsDown.get()&&r(n,t)},[n])])}})}})},Ff=If("top-left"),Rf=If("top"),Vf=If("top-right"),Bf=If("right"),Af=If("bottom-right"),jf=If("bottom"),Hf=If("bottom-left"),Nf=[Df,If("left"),Bf,Rf,jf,Ff,Vf,Hf,Af,za({name:"thumb",defaults:y({dom:{styles:{position:"absolute"}}}),overrides:function(n){return{events:Tr([Dr(Gn(),n,"spectrum"),Dr($n(),n,"spectrum"),Dr(Un(),n,"spectrum"),Dr(Wn(),n,"spectrum"),Dr(Xn(),n,"spectrum"),Dr(qn(),n,"spectrum")])}}}),za({schema:[yr("mouseIsDown",function(){return ho(!1)})],name:"spectrum",overrides:function(t){var r=t.model.manager,o=function(e,n){return r.getValueFromEvent(n).map(function(n){return r.setValueFrom(e,t,n)})};return{behaviours:Ur([sa.config({mode:"special",onLeft:function(n){return r.onLeft(n,t)},onRight:function(n){return r.onRight(n,t)},onUp:function(n){return r.onUp(n,t)},onDown:function(n){return r.onDown(n,t)}}),ki.config({})]),events:Tr([Er(Gn(),o),Er($n(),o),Er(Wn(),o),Er(Xn(),function(n,e){t.mouseIsDown.get()&&o(n,e)})])}}})],Pf=function(n,e,t){e.store.manager.onLoad(n,e,t)},zf=function(n,e,t){e.store.manager.onUnload(n,e,t)},Lf=/* */Object.freeze({__proto__:null,onLoad:Pf,onUnload:zf,setValue:function(n,e,t,r){e.store.manager.setValue(n,e,t,r)},getValue:function(n,e,t){return e.store.manager.getValue(n,e,t)},getState:function(n,e,t){return t}}),Gf=/* */Object.freeze({__proto__:null,events:function(t,r){var n=t.resetOnDom?[Fr(function(n,e){Pf(n,t,r)}),Rr(function(n,e){zf(n,t,r)})]:[Nr(t,r,Pf)];return Tr(n)}}),$f=function(){var n=ho(null);return $r({set:n.set,get:n.get,isNotSet:function(){return null===n.get()},clear:function(){n.set(null)},readState:function(){return{mode:"memory",value:n.get()}}})},Uf=function(){var i=ho({}),u=ho({});return $r({readState:function(){return{mode:"dataset",dataByValue:i.get(),dataByText:u.get()}},lookup:function(n){return I(i.get(),n).orThunk(function(){return I(u.get(),n)})},update:function(n){var e=i.get(),t=u.get(),r={},o={};pn(n,function(e){r[e.value]=e,I(e,"meta").each(function(n){I(n,"text").each(function(n){o[n]=e})})}),i.set(x(x({},e),r)),u.set(x(x({},t),o))},clear:function(){i.set({}),u.set({})}})},Wf=/* */Object.freeze({__proto__:null,memory:$f,dataset:Uf,manual:function(){return $r({readState:function(){}})},init:function(n){return n.store.manager.state(n)}}),Xf=function(n,e,t,r){var o=e.store;t.update([r]),o.setValue(n,r),e.onSetValue(n,r)},qf=[dr("initialValue"),fr("getFallbackEntry"),fr("getDataKey"),fr("setValue"),Qo("manager",{setValue:Xf,getValue:function(n,e,t){var r=e.store,o=r.getDataKey(n);return t.lookup(o).fold(function(){return r.getFallbackEntry(o)},function(n){return n})},onLoad:function(e,t,r){t.store.initialValue.each(function(n){Xf(e,t,r,n)})},onUnload:function(n,e,t){t.clear()},state:Uf})],Yf=[fr("getValue"),hr("setValue",w),dr("initialValue"),Qo("manager",{setValue:function(n,e,t,r){e.store.setValue(n,r),e.onSetValue(n,r)},getValue:function(n,e,t){return e.store.getValue(n)},onLoad:function(e,t,n){t.store.initialValue.each(function(n){t.store.setValue(e,n)})},onUnload:w,state:Gr.init})],Kf=[dr("initialValue"),Qo("manager",{setValue:function(n,e,t,r){t.set(r),e.onSetValue(n,r)},getValue:function(n,e,t){return t.get()},onLoad:function(n,e,t){e.store.initialValue.each(function(n){t.isNotSet()&&t.set(n)})},onUnload:function(n,e,t){t.clear()},state:$f})],Jf=[vr("store",{mode:"memory"},ur("mode",{memory:Kf,manual:Yf,dataset:qf})),qo("onSetValue"),hr("resetOnDom",!1)],Qf=Xr({fields:Jf,name:"representing",active:Gf,apis:Lf,extra:{setValueFrom:function(n,e){var t=Qf.getValue(e);Qf.setValue(n,t)}},state:Wf}),Zf=Bi("width",function(n){return n.dom().offsetWidth}),ns=function(n,e){return Zf.set(n,e)},es=function(n){return Zf.get(n)},ts=function(t,r){return{left:y(t),top:y(r),translate:function(n,e){return ts(t+n,r+e)}}},rs=ts,os=y("slider.change.value"),is=function(n){var e=n.event().raw();if(-1!==e.type.indexOf("touch")){return e.touches!==undefined&&1===e.touches.length?O.some(e.touches[0]).map(function(n){return rs(n.clientX,n.clientY)}):O.none()}return e.clientX!==undefined?O.some(e).map(function(n){return rs(n.clientX,n.clientY)}):O.none()},us=function(n){return n.model.minX},cs=function(n){return n.model.minY},as=function(n){return n.model.minX-1},fs=function(n){return n.model.minY-1},ss=function(n){return n.model.maxX},ls=function(n){return n.model.maxY},ds=function(n){return n.model.maxX+1},ms=function(n){return n.model.maxY+1},gs=function(n,e,t){return e(n)-t(n)},ps=function(n){return gs(n,ss,us)},hs=function(n){return gs(n,ls,cs)},vs=function(n){return ps(n)/2},ys=function(n){return hs(n)/2},bs=function(n){return n.stepSize},xs=function(n){return n.snapToGrid},ws=function(n){return n.snapStart},Ss=function(n){return n.rounded},Os=function(n,e){return n[e+"-edge"]!==undefined},Ts=function(n){return Os(n,"left")},ks=function(n){return Os(n,"right")},Es=function(n){return Os(n,"top")},Cs=function(n){return Os(n,"bottom")},Ms=function(n){return n.model.value.get()},_s=function(n){return{x:y(n)}},Ds=function(n){return{y:y(n)}},Is=function(n,e){return{x:y(n),y:y(e)}},Fs=function(n,e){be(n,os(),{value:e})},Rs=function(n,e,t,r){return n
'),components:[_l.parts()["left-edge"](kf('
')),_l.parts().spectrum({dom:Tf('
'),components:[kf('
')],behaviours:Ur([gi.config({toggleClass:bi("thumb-active")})])}),_l.parts()["right-edge"](kf('
')),_l.parts().thumb({dom:Tf('
'),behaviours:Ur([gi.config({toggleClass:bi("thumb-active")})])})],onChange:function(n,e,t){var r=i(t.x());Mi(e.element(),"background-color",r),o.onChange(n,e,r)},onDragStart:function(n,e){gi.on(e)},onDragEnd:function(n,e){gi.off(e)},onInit:function(n,e,t,r){var o=i(r.x());Mi(e.element(),"background-color",o)},stepSize:10,model:{mode:"x",minX:0,maxX:360,getInitialValue:function(){return{x:function(){return o.getInitialValue()}}}},sliderBehaviours:Ur([hi(_l.refresh)])}))];var o,i},Fl=Ut([fr("getInitialValue"),fr("onChange"),fr("category"),fr("sizes")]),Rl=function(n){var i=or("SizeSlider",Fl,n);return _l.sketch({dom:{tag:"div",classes:[bi("slider-"+i.category+"-size-container"),bi("slider"),bi("slider-size-container")]},onChange:function(n,e,t){var r,o=t.x();0<=(r=o)&&r'),components:[kf('
')]}),_l.parts().thumb({dom:Tf('
'),behaviours:Ur([gi.config({toggleClass:bi("thumb-active")})])})]})},Vl=["9px","10px","11px","12px","14px","16px","18px","20px","24px","32px","36px"],Bl=function(e,n){return(Ce(n)?O.some(n):He(n).filter(Ce)).map(function(n){return vo(function(n,e){return e(n)},xo,n,function(n){return Fi(n,"font-size").isSome()},e).bind(function(n){return Fi(n,"font-size")}).getOrThunk(function(){return Di(n,"font-size")})}).getOr("")},Al=function(n){var e=n.selection.getStart(),t=Te.fromDom(e),r=Te.fromDom(n.getBody()),o=Bl(function(n){return Ae(r,n)},t);return bn(Vl,function(n){return o===n}).getOr("medium")},jl=function(n){var e,t=Al(n);return e=t,xn(Vl,function(n){return n===e}).getOr(2)},Hl=function(r,n){var e;e=n,O.from(Vl[e]).each(function(n){var e,t;t=n,Al(e=r)!==t&&e.execCommand("fontSize",!1,t)})},Nl=y(Vl)(),Pl=function(n){return[kf(''),Rl({onChange:(e=n).onChange,sizes:Nl,category:"font",getInitialValue:e.getInitialValue}),kf('')];var e},zl=function(n){var e=function t(n){return n.uid!==undefined}(n)&&R(n,"uid")?n.uid:sf("memento");return{get:function(n){return n.getSystem().getByUid(e).getOrDie()},getOpt:function(n){return n.getSystem().getByUid(e).toOption()},asSpec:function(){return x(x({},n),{uid:e})}}},Ll=window.Promise?window.Promise:(pf=(gf=function(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],Yl(n,Gl(Ul,this),Gl(Wl,this))}).immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(n){v.setTimeout(n,1)},hf=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},gf.prototype["catch"]=function(n){return this.then(null,n)},gf.prototype.then=function(t,r){var o=this;return new gf(function(n,e){$l.call(o,new ql(t,r,n,e))})},gf.all=function(){for(var n=[],e=0;e'),action:function(n){var e=t.get(n);Qf.setValue(e,"")}}));return{name:n,spec:dd.sketch({dom:Tf('
'),components:[t.asSpec(),r.asSpec()],containerBehaviours:Ur([gi.config({toggleClass:bi("input-container-empty")}),ld.config({find:function(n){return O.some(t.get(n))}}),ad("input-clearing",[Er(Qn(),function(n){var e=t.get(n);(0"},Pd=function(o,n){return{uid:o.uid,dom:o.dom,components:n,behaviours:ma(o.formBehaviours,[Qf.config({store:{mode:"manual",getValue:function(n){var e,t,r=(e=o,t=n.getSystem(),C(e.partUids,function(n,e){return y(t.getByUid(n))}));return C(r,function(n,o){return n().bind(function(n){var e,t,r=ld.getCurrent(n);return e=r,t=new Error("Cannot find a current component to extract the value from for form part '"+o+"': "+Vo(n.element())),e.fold(function(){return rt.error(t)},rt.value)}).map(Qf.getValue)})},setValue:function(t,n){E(n,function(e,n){Ka(t,o,n).each(function(n){ld.getCurrent(n).each(function(n){Qf.setValue(n,e)})})})}}})]),apis:{getField:function(n,e){return Ka(n,o,e).bind(ld.getCurrent)}}}},zd=(tf(function(n,e,t){return n.getField(e,t)}),function(n){var i,e=(i=[],{field:function(n,e){return i.push(n),t="form",r=Nd(n),o=e,{uiType:Ta(),owner:t,name:r,config:o,validated:{}};var t,r,o},record:function(){return i}}),t=n(e),r=e.record(),o=gn(r,function(n){return za({name:n,pname:Nd(n)})});return df("form",Hd,o,Pd,t)}),Ld=function(){var e=ho(O.none()),t=function(){e.get().each(function(n){n.destroy()})};return{clear:function(){t(),e.set(O.none())},isSet:function(){return e.get().isSome()},set:function(n){t(),e.set(O.some(n))},run:function(n){e.get().each(n)}}},Gd=function(){var e=ho(O.none());return{clear:function(){e.set(O.none())},set:function(n){e.set(O.some(n))},isSet:function(){return e.get().isSome()},on:function(n){e.get().each(n)}}},$d=function(n){var r="navigateEvent",e=Wt([fr("fields"),hr("maxFieldIndex",n.fields.length-1),fr("onExecute"),fr("getInitialValue"),yr("state",function(){return{dialogSwipeState:Gd(),currentScreen:ho(0)}})]),u=or("SerialisedDialog",e,n),o=function(e,n,t){return wf.sketch({dom:Tf(''),action:function(n){be(n,r,{direction:e})},buttonBehaviours:Ur([jd.config({disableClass:bi("toolbar-navigation-disabled"),disabled:function(){return!t}})])})},i=function(n,o){var i=Li(n.element(),"."+bi("serialised-dialog-screen"));Ui(n.element(),"."+bi("serialised-dialog-chain")).each(function(r){0<=u.state.currentScreen.get()+o&&u.state.currentScreen.get()+o'),components:[dd.sketch({dom:Tf('
'),components:gn(u.fields,function(n,e){return e<=u.maxFieldIndex?dd.sketch({dom:Tf('
'),components:[o(-1,"previous",0'),behaviours:Ur([Ou.config({highlightClass:bi("dot-active"),itemClass:bi("dot-item")})]),components:Sn(u.fields,function(n,e){return e<=u.maxFieldIndex?[kf('
')]:[]})});return{dom:Tf('
'),components:[a.asSpec(),f.asSpec()],behaviours:Ur([sa.config({mode:"special",focusIn:function(n){var e=a.get(n);sa.focusIn(e)}}),ad("serializer-wrapper-events",[Er(Gn(),function(n,e){var t=e.event();u.state.dialogSwipeState.set({xValue:t.raw().touches[0].clientX,points:[]})}),Er($n(),function(n,e){var t=e.event();u.state.dialogSwipeState.on(function(n){e.event().prevent(),u.state.dialogSwipeState.set(function(n,e){if(e===n.xValue)return n;var t=0 "):r[0].name();return Ft(o,{handler:e,purpose:y(t)})})});return Vt(e,{})},am=function(n){return tr("custom.definition",Wt([Kt("dom","dom",Et(),Wt([fr("tag"),hr("styles",{}),hr("classes",[]),hr("attributes",{}),dr("value"),dr("innerHtml")])),fr("components"),fr("uid"),hr("events",{}),hr("apis",{}),Kt("eventOrder","eventOrder",Tt.mergeWithThunk(y({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"],"alloy.receive":["receiving","reflecting"]})),cr()),dr("domModification")]),n)},fm=function(e,n){pn(n,function(n){co(e,n)})},sm=function(e,n){pn(n,function(n){fo(e,n)})},lm=function(n,e){return t=n,o=gn(r=e,function(n){return gr(n.name(),[fr("config"),hr("state",Gr)])}),i=tr("component.behaviours",Wt(o),t.behaviours).fold(function(n){throw new Error(ir(n)+"\nComplete spec:\n"+JSON.stringify(t,null,2))},function(n){return n}),{list:r,data:C(i,function(n){var e=n.map(function(n){return{config:n.config,state:n.state.init(n.config)}});return function(){return e}})};var t,r,o,i},dm=function(n){var e,t,r=(e=I(n,"behaviours").getOr({}),t=hn(T(e),function(n){return e[n]!==undefined}),gn(t,function(n){return e[n].me}));return lm(n,r)},mm=function(n,e,t){var r,o,i,u=x(x({},(r=n).dom),{uid:r.uid,domChildren:gn(r.components,function(n){return n.element()})}),c=n.domModification.fold(function(){return Hr({})},Hr),a={"alloy.base.modification":c},f=0");r[t[0]]=Ft(t[1],n),r[t[1]]=Ft(t[0],n)}),r},createBistate:function(n,e,t){return Rt([{key:n,value:Ft(e,t)},{key:e,value:Ft(n,t)}])},createTristate:function(n,e,t,r){return Rt([{key:n,value:Rt([{key:e,value:r},{key:t,value:r}])},{key:e,value:Rt([{key:n,value:r},{key:t,value:r}])},{key:t,value:Rt([{key:n,value:r},{key:e,value:r}])}])}}}),ig=bi("scrollable"),ug=function(n){co(n,ig)},cg=function(n){fo(n,ig)},ag=ig,fg=function(n){return I(n,"format").getOr(n.title)},sg=function(n,e,t,r,o){return{data:{value:n,text:e},type:"item",dom:{tag:"div",classes:o?[bi("styles-item-is-menu")]:[]},toggling:{toggleOnExecute:!1,toggleClass:bi("format-matches"),selected:t},itemBehaviours:Ur(o?[]:[pi(n,function(n,e){(e?gi.on:gi.off)(n)})]),components:[{dom:{tag:"div",attributes:{style:r},innerHtml:e}}]}},lg=function(n,e,t,r){return{value:n,dom:{tag:"div"},components:[wf.sketch({dom:{tag:"div",classes:[bi("styles-collapser")]},components:r?[{dom:{tag:"span",classes:[bi("styles-collapse-icon")]}},vm(n)]:[vm(n)],action:function(n){if(r){var e=t().get(n);Ym.collapseMenu(e)}}}),{dom:{tag:"div",classes:[bi("styles-menu-items-container")]},components:[jm.parts().items({})],behaviours:Ur([ad("adhoc-scrollable-menu",[Fr(function(n,e){Mi(n.element(),"overflow-y","auto"),Mi(n.element(),"-webkit-overflow-scrolling","touch"),ug(n.element())}),Rr(function(n){Ri(n.element(),"overflow-y"),Ri(n.element(),"-webkit-overflow-scrolling"),cg(n.element())})])])}],items:e,menuBehaviours:Ur([og.config({initialState:"after",routes:og.createTristate("before","current","after",{transition:{property:"transform",transitionClass:"transitioning"}})})])}},dg=function(r){var o,i,n,e,t,u=(o=r.formats,i=function(){return c},n=lg("Styles",[].concat(gn(o.items,function(n){return sg(fg(n),n.title,n.isSelected(),n.getPreview(),R(o.expansions,fg(n)))})),i,!1),e=C(o.menus,function(n,e){var t=gn(n,function(n){return sg(fg(n),n.title,n.isSelected!==undefined&&n.isSelected(),n.getPreview!==undefined?n.getPreview():"",R(o.expansions,fg(n)))});return lg(e,t,i,!0)}),t=ct(e,Ft("styles",n)),{tmenu:Ym.tieredData("styles",t,o.expansions)}),c=zl(Ym.sketch({dom:{tag:"div",classes:[bi("styles-menu")]},components:[],fakeFocus:!0,stayInDom:!0,onExecute:function(n,e){var t=Qf.getValue(e);return r.handle(e,t.value),O.none()},onEscape:function(){return O.none()},onOpenMenu:function(n,e){var t=es(n.element());ns(e.element(),t),og.jumpTo(e,"current")},onOpenSubmenu:function(n,e,t){var r=es(n.element()),o=$i(e.element(),'[role="menu"]').getOrDie("hacky"),i=n.getSystem().getByDom(o).getOrDie();ns(t.element(),r),og.progressTo(i,"before"),og.jumpTo(t,"after"),og.progressTo(t,"current")},onCollapseMenu:function(n,e,t){var r=$i(e.element(),'[role="menu"]').getOrDie("hacky"),o=n.getSystem().getByDom(r).getOrDie();og.progressTo(o,"after"),og.progressTo(t,"current")},navigateOnHover:!1,highlightImmediately:!0,data:u.tmenu,markers:{backgroundMenu:bi("styles-background-menu"),menu:bi("styles-menu"),selectedMenu:bi("styles-selected-menu"),item:bi("styles-item"),selectedItem:bi("styles-selected-item")}}));return c.asSpec()},mg=function(n){return R(n,"items")?(t=ct(It(e=n,["items"]),{menu:!0}),r=gg(e.items),{item:t,menus:ct(r.menus,Ft(e.title,r.items)),expansions:ct(r.expansions,Ft(e.title,e.title))}):{item:n,menus:{},expansions:{}};var e,t,r},gg=function(n){return vn(n,function(n,e){var t=mg(e);return{menus:ct(n.menus,t.menus),items:[t.item].concat(n.items),expansions:ct(n.expansions,t.expansions)}},{menus:{},expansions:{},items:[]})},pg=function(u,n){var c=function(n){return function(){return u.formatter.match(n)}},a=function(n){return function(){return u.formatter.getCssText(n)}},e=I(n,"style_formats").getOr(Xd),f=function(n){return gn(n,function(n){if(R(n,"items")){var e=f(n.items);return ct(ct(n,{isSelected:y(!1),getPreview:y("")}),{items:e})}return R(n,"format")?ct(i=n,{isSelected:c(i.format),getPreview:a(i.format)}):(r=Ea((t=n).title),o=ct(t,{format:r,isSelected:c(r),getPreview:a(r)}),u.formatter.register(r,o),o);var t,r,o,i})};return f(e)},hg=function(t,n,r){var e,o,i,u=(e=t,i=(o=function(n){return Sn(n,function(n){return n.items===undefined?!R(n,"format")||e.formatter.canApply(n.format)?[n]:[]:0e.innerHeight||n.bottom()>e.innerHeight?n.bottom()-e.innerHeight+50:0;0!=t&&e.scrollTo(e.pageXOffset,e.pageYOffset+t)})})].concat(!0==Vg?[]:[Eg(Te.fromDom(r.win()),"blur",function(){t.getByDom(e).each(gi.off)}),Eg(i,"select",n),Eg(r.doc(),"selectionchange",n)]);return{destroy:function(){pn(c,function(n){n.unbind()})}}},Ag=function(n,e){var t=parseInt(Zr(n,e),10);return isNaN(t)?0:t};var jg,Hg,Ng=function _v(t,r){var e=function(n){return t(n)?O.from(n.dom().nodeValue):O.none()};return{get:function(n){if(!t(n))throw new Error("Can only get "+r+" value of a "+r+" node");return e(n).getOr("")},getOption:e,set:function(n,e){if(!t(n))throw new Error("Can only set raw "+r+" value of a "+r+" node");n.dom().nodeValue=e}}}(Me,"text"),Pg=function(n){return"img"===ke(n)?1:(e=n,Ng.getOption(e).fold(function(){return Ne(n).length},function(n){return n.length}));var e},zg=function(n,e,t,r){return{start:y(n),soffset:y(e),finish:y(t),foffset:y(r)}},Lg=ot([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Gg={before:Lg.before,on:Lg.on,after:Lg.after,cata:function(n,e,t,r){return n.fold(e,t,r)},getStart:function(n){return n.fold(b,b,b)}},$g=ot([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Ug={domRange:$g.domRange,relative:$g.relative,exact:$g.exact,exactFromRange:function(n){return $g.exact(n.start(),n.soffset(),n.finish(),n.foffset())},getWin:function(n){var e,t=n.match({domRange:function(n){return Te.fromDom(n.startContainer)},relative:function(n,e){return Gg.getStart(n)},exact:function(n,e,t,r){return n}});return e=t,Te.fromDom(e.dom().ownerDocument.defaultView)},range:zg},Wg=function(n,e,t){var r,o,i=n.document.createRange();return r=i,e.fold(function(n){r.setStartBefore(n.dom())},function(n,e){r.setStart(n.dom(),e)},function(n){r.setStartAfter(n.dom())}),o=i,t.fold(function(n){o.setEndBefore(n.dom())},function(n,e){o.setEnd(n.dom(),e)},function(n){o.setEndAfter(n.dom())}),i},Xg=function(n,e,t,r,o){var i=n.document.createRange();return i.setStart(e.dom(),t),i.setEnd(r.dom(),o),i},qg=function(n){return{left:y(n.left),top:y(n.top),right:y(n.right),bottom:y(n.bottom),width:y(n.width),height:y(n.height)}},Yg=ot([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Kg=function(n,e,t){return e(Te.fromDom(t.startContainer),t.startOffset,Te.fromDom(t.endContainer),t.endOffset)},Jg=function(n,e){var o,t,r,i=(o=n,e.match({domRange:function(n){return{ltr:y(n),rtl:O.none}},relative:function(n,e){return{ltr:V(function(){return Wg(o,n,e)}),rtl:V(function(){return O.some(Wg(o,e,n))})}},exact:function(n,e,t,r){return{ltr:V(function(){return Xg(o,n,e,t,r)}),rtl:V(function(){return O.some(Xg(o,t,r,n,e))})}}}));return(r=(t=i).ltr()).collapsed?t.rtl().filter(function(n){return!1===n.collapsed}).map(function(n){return Yg.rtl(Te.fromDom(n.endContainer),n.endOffset,Te.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return Kg(0,Yg.ltr,r)}):Kg(0,Yg.ltr,r)},Qg=(Yg.ltr,Yg.rtl,function(n,e){var t=ke(n);return"input"===t?Gg.after(n):dn(["br","img"],t)?0===e?Gg.before(n):Gg.after(n):Gg.on(n,e)}),Zg=function(n,e,t,r){var o,i,u,c,a,f=(i=e,u=t,c=r,(a=je(o=n).dom().createRange()).setStart(o.dom(),i),a.setEnd(u.dom(),c),a),s=Ae(n,t)&&e===r;return f.collapsed&&!s},np=function(n,e,t,r,o){var i,u,c=Xg(n,e,t,r,o);i=n,u=c,O.from(i.getSelection()).each(function(n){n.removeAllRanges(),n.addRange(u)})},ep=function(l,n){return Jg(l,n).match({ltr:function(n,e,t,r){np(l,n,e,t,r)},rtl:function(n,e,t,r){var o,i,u,c,a,f=l.getSelection();if(f.setBaseAndExtent)f.setBaseAndExtent(n.dom(),e,t.dom(),r);else if(f.extend)try{i=n,u=e,c=t,a=r,(o=f).collapse(i.dom(),u),o.extend(c.dom(),a)}catch(s){np(l,t,r,n,e)}else np(l,t,r,n,e)}})},tp=function(n,e,t,r,o){var i,u,c,a,f=(i=r,u=o,c=Qg(e,t),a=Qg(i,u),Ug.relative(c,a));ep(n,f)},rp=function(n){var e=Te.fromDom(n.anchorNode),t=Te.fromDom(n.focusNode);return Zg(e,n.anchorOffset,t,n.focusOffset)?O.some(zg(e,n.anchorOffset,t,n.focusOffset)):function(n){if(0e.innerHeight||t.bottom()>e.innerHeight?Math.min(r,t.bottom()-e.innerHeight+50):0);0!==o&&u.scrollTo(u.pageXOffset,u.pageYOffset+o)})}),lp(e,n.innerHeight)});lp(e,n.innerHeight);return{toEditing:function(){fp(u)},destroy:function(){t.unbind()}}},pp=function(n){return O.from(n.dom().contentWindow)},hp=function(n){return pp(n).bind(op)},vp=function(n){return n.getFrame()},yp=function(n,e,t,r){return n[t].getOrThunk(function(){return function(n){return Eg(e,r,n)}})},bp=function(n){return{left:y(n.left),top:y(n.top),right:y(n.right),bottom:y(n.bottom),width:y(n.width),height:y(n.height)}},xp=function(c){var n,a=vp(c);return n=a,O.some(Te.fromDom(n.dom().contentWindow.document.body)).bind(function(u){return n=a,O.some(Te.fromDom(n.dom().contentWindow.document)).bind(function(i){return pp(a).map(function(o){var n=Te.fromDom(i.dom().documentElement),e=c.getCursorBox.getOrThunk(function(){return function(){return op(o).map(function(n){return Ug.exact(n.start(),n.soffset(),n.finish(),n.foffset())}).bind(function(n){return ip(o,n).orThunk(function(){return op(o).filter(function(n){return Ae(n.start(),n.finish())&&n.soffset()===n.foffset()}).bind(function(n){var e=n.start().dom().getBoundingClientRect();return 0
9
+ !function(v){"use strict";var x=function(){return(x=Object.assign||function(n){for(var e,t=1,r=arguments.length;t "+r.toString()},function(n,e){return"state("+n+")"})}).join("\n")+"}"}}},Xt=function(t,i){var u=function(n,e){return o=$t(t),function(t,r,n){var e=gn(n,function(n,e){return o.extract(t.concat(["["+e+"]"]),r,n)});return jt(e)}(n,b,e);var o};return{extract:function(t,r,o){var n=T(o),e=u(t,n);return xt(e,function(n){var e=gn(n,function(n){return Pt.field(n,n,Et(),i)});return Wt(e).extract(t,r,o)})},toString:function(){return"setOf("+i.toString()+")"}}},qt=y($t(vt)),Yt=Pt.state,Kt=Pt.field,Jt=function(t,e,r,o,i){return I(o,i).fold(function(){return n=o,e=i,Nt(t,function(){return'The chosen schema: "'+e+'" did not exist in branches: '+Ht(n)});var n,e},function(n){return n.extract(t.concat(["branch: "+i]),e,r)})},Qt=function(o,i){return{extract:function(e,t,r){return I(r,o).fold(function(){return n=o,Nt(e,function(){return'Choice schema did not contain choice key: "'+n+'"'});var n},function(n){return Jt(e,t,r,i,n)})},toString:function(){return"chooseOn("+o+"). Possible values: "+T(i)}}},Zt=$t(vt),nr=function(e){return $t(function(n){return e(n).fold(bt,vt)})},er=function(e,n){return Xt(function(n){return pt(e(n))},n)},tr=function(n,e,t){return ht((r=n,o=b,i=t,u=e.extract([r],o,i),Ot(u,function(n){return{input:i,errors:n}})));var r,o,i,u},rr=function(n){return n.fold(function(n){throw new Error(ir(n))},b)},or=function(n,e,t){return rr(tr(n,e,t))},ir=function(n){return"Errors: \n"+(e=n.errors,t=10 ")+")\n"+n.getErrorInfo()}).join("\n"))+"\n\nInput object: "+Ht(n.input);var e,t},ur=function(n,e){return Qt(n,C(e,Wt))},cr=y(Zt),ar=(ft=cn,st="function",$t(function(n){var e=typeof n;return ft(n)?vt(n):bt("Expected type: "+st+" but got: "+e)})),fr=function(n){return Kt(n,n,Et(),qt())},sr=function(n,e){return Kt(n,n,Et(),e)},lr=function(n,e){return Kt(n,n,Et(),Wt(e))},dr=function(n){return Kt(n,n,Ct(),qt())},mr=function(n,e){return Kt(n,n,Ct(),e)},gr=function(n,e){return mr(n,Wt(e))},pr=function(n,e){return mr(n,Ut(e))},hr=function(n,e){return Kt(n,n,kt(e),qt())},vr=function(n,e,t){return Kt(n,n,kt(e),t)},yr=function(n,e){return Yt(n,e)},br=function(n){return cn(n)?n:y(!1)},xr=function(n,e,t){var r=e(n),o=br(t);return r.orThunk(function(){return o(n)?O.none():function(n,e,t){for(var r=n.dom(),o=br(t);r.parentNode;){r=r.parentNode;var i=Te.fromDom(r),u=e(i);if(u.isSome())return u;if(o(i))break}return O.none()}(n,e,o)})},wr=function(n,e){return Ae(n.element(),e.event().target())},Sr=function(n){if(!R(n,"can")&&!R(n,"abort")&&!R(n,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(n,null,2)+" does not have can, abort, or run!");return or("Extracting event.handler",Ut([hr("can",y(!0)),hr("abort",y(!1)),hr("run",w)]),n)},Or=function(t){var e,r,o,i,n=(r=function(n){return n.can},function(){for(var t=[],n=0;n=r.length&&t.substr(o,o+r.length)===r?n.substring(0,n.length-"/*".length):n;var e,t,r,o})},jr=function(n,e){var t=n.toString(),r=t.indexOf(")")+1,o=t.indexOf("("),i=t.substring(o+1,r-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:e,parameters:Ar(i)}},n},Hr=function(n){return{classes:n.classes!==undefined?n.classes:[],attributes:n.attributes!==undefined?n.attributes:{},styles:n.styles!==undefined?n.styles:{}}},Nr=function(t,r,o){return Vr(function(n,e){o(n,t,r)})},Pr=function(o,i,u){var n,e,t,r,c,a;return n=function(t){for(var n=[],e=1;e"}),cr()),Fa=yr("schema",function(){return[dr("preprocess")]}),Ra=hr("defaults",y({})),Va=hr("overrides",y({})),Ba=Wt([Ma,_a,Da,Ia,Ra,Va]),Aa=Wt([Ma,_a,Da,Ra,Va]),ja=Wt([Ma,_a,Da,Ia,Ra,Va]),Ha=Wt([Ma,Fa,Da,fr("unit"),Ia,Ra,Va]),Na=function(n){var e=function(n){return n.name};return n.fold(e,e,e,e)},Pa=function(t,r){return function(n){var e=or("Converting part type",r,n);return t(e)}},za=Pa(Ca.required,Ba),La=(Pa(Ca.external,Aa),Pa(Ca.optional,ja)),Ga=Pa(Ca.group,Ha),$a=y("entirety"),Ua=function(n,e,t,r){return ct(e.defaults(n,t,r),t,{uid:n.partUids[e.name]},e.overrides(n,t,r))},Wa=function(o,n){var e={};return pn(n,function(n){n.fold(O.some,O.none,O.some,O.some).each(function(t){var r=Xa(o,t.pname);e[t.name]=function(n){var e=or("Part: "+t.name+" in "+o,Wt(t.schema),n);return x(x({},r),{config:n,validated:e})}})}),e},Xa=function(n,e){return{uiType:Ta(),owner:n,name:e}},qa=function(n,e,t){return r=e,i={},o={},pn(t,function(n){n.fold(function(r){i[r.pname]=Sa(!0,function(n,e,t){return r.factory.sketch(Ua(n,r,e,t))})},function(n){var e=r.parts[n.name];o[n.name]=y(n.factory.sketch(Ua(r,n,e[$a()]),e))},function(r){i[r.pname]=Sa(!1,function(n,e,t){return r.factory.sketch(Ua(n,r,e,t))})},function(o){i[o.pname]=Oa(!0,function(e,n,t){var r=e[o.name];return gn(r,function(n){return o.factory.sketch(ct(o.defaults(e,n,t),n,o.overrides(e,n)))})})})}),{internals:y(i),externals:y(o)};var r,i,o},Ya=function(n,e,t){return wa(O.some(n),e,e.components,t)},Ka=function(n,e,t){var r=e.partUids[t];return n.getSystem().getByUid(r).toOption()},Ja=function(n,e,t){return Ka(n,e,t).getOrDie("Could not find part: "+t)},Qa=function(e,n){var t=gn(n,Na);return Rt(gn(t,function(n){return{key:n,value:e+"-"+n}}))},Za=function(e){return Kt("partUids","partUids",_t(function(n){return Qa(n.uid,e)}),cr())},nf=Ea("alloy-premade"),ef=function(n){return Ft(nf,n)},tf=function(r){return n=function(n){for(var e=[],t=1;t')},function(n){return Tf(''+n+"")})},_f=function(n,e,t,r){return wf.sketch({dom:Mf(n,r),action:e,buttonBehaviours:ct(Ur([Sf.config({})]),t)})},Df=La({schema:[fr("dom")],name:"label"}),If=function(e){return La({name:e+"-edge",overrides:function(n){return n.model.manager.edgeActions[e].fold(function(){return{}},function(r){return{events:Tr([Cr(Gn(),function(n,e,t){return r(n,t)},[n]),Cr(Wn(),function(n,e,t){return r(n,t)},[n]),Cr(Xn(),function(n,e,t){t.mouseIsDown.get()&&r(n,t)},[n])])}})}})},Ff=If("top-left"),Rf=If("top"),Vf=If("top-right"),Bf=If("right"),Af=If("bottom-right"),jf=If("bottom"),Hf=If("bottom-left"),Nf=[Df,If("left"),Bf,Rf,jf,Ff,Vf,Hf,Af,za({name:"thumb",defaults:y({dom:{styles:{position:"absolute"}}}),overrides:function(n){return{events:Tr([Dr(Gn(),n,"spectrum"),Dr($n(),n,"spectrum"),Dr(Un(),n,"spectrum"),Dr(Wn(),n,"spectrum"),Dr(Xn(),n,"spectrum"),Dr(qn(),n,"spectrum")])}}}),za({schema:[yr("mouseIsDown",function(){return ho(!1)})],name:"spectrum",overrides:function(t){var r=t.model.manager,o=function(e,n){return r.getValueFromEvent(n).map(function(n){return r.setValueFrom(e,t,n)})};return{behaviours:Ur([sa.config({mode:"special",onLeft:function(n){return r.onLeft(n,t)},onRight:function(n){return r.onRight(n,t)},onUp:function(n){return r.onUp(n,t)},onDown:function(n){return r.onDown(n,t)}}),ki.config({})]),events:Tr([Er(Gn(),o),Er($n(),o),Er(Wn(),o),Er(Xn(),function(n,e){t.mouseIsDown.get()&&o(n,e)})])}}})],Pf=function(n,e,t){e.store.manager.onLoad(n,e,t)},zf=function(n,e,t){e.store.manager.onUnload(n,e,t)},Lf=/* */Object.freeze({__proto__:null,onLoad:Pf,onUnload:zf,setValue:function(n,e,t,r){e.store.manager.setValue(n,e,t,r)},getValue:function(n,e,t){return e.store.manager.getValue(n,e,t)},getState:function(n,e,t){return t}}),Gf=/* */Object.freeze({__proto__:null,events:function(t,r){var n=t.resetOnDom?[Fr(function(n,e){Pf(n,t,r)}),Rr(function(n,e){zf(n,t,r)})]:[Nr(t,r,Pf)];return Tr(n)}}),$f=function(){var n=ho(null);return $r({set:n.set,get:n.get,isNotSet:function(){return null===n.get()},clear:function(){n.set(null)},readState:function(){return{mode:"memory",value:n.get()}}})},Uf=function(){var i=ho({}),u=ho({});return $r({readState:function(){return{mode:"dataset",dataByValue:i.get(),dataByText:u.get()}},lookup:function(n){return I(i.get(),n).orThunk(function(){return I(u.get(),n)})},update:function(n){var e=i.get(),t=u.get(),r={},o={};pn(n,function(e){r[e.value]=e,I(e,"meta").each(function(n){I(n,"text").each(function(n){o[n]=e})})}),i.set(x(x({},e),r)),u.set(x(x({},t),o))},clear:function(){i.set({}),u.set({})}})},Wf=/* */Object.freeze({__proto__:null,memory:$f,dataset:Uf,manual:function(){return $r({readState:function(){}})},init:function(n){return n.store.manager.state(n)}}),Xf=function(n,e,t,r){var o=e.store;t.update([r]),o.setValue(n,r),e.onSetValue(n,r)},qf=[dr("initialValue"),fr("getFallbackEntry"),fr("getDataKey"),fr("setValue"),Qo("manager",{setValue:Xf,getValue:function(n,e,t){var r=e.store,o=r.getDataKey(n);return t.lookup(o).fold(function(){return r.getFallbackEntry(o)},function(n){return n})},onLoad:function(e,t,r){t.store.initialValue.each(function(n){Xf(e,t,r,n)})},onUnload:function(n,e,t){t.clear()},state:Uf})],Yf=[fr("getValue"),hr("setValue",w),dr("initialValue"),Qo("manager",{setValue:function(n,e,t,r){e.store.setValue(n,r),e.onSetValue(n,r)},getValue:function(n,e,t){return e.store.getValue(n)},onLoad:function(e,t,n){t.store.initialValue.each(function(n){t.store.setValue(e,n)})},onUnload:w,state:Gr.init})],Kf=[dr("initialValue"),Qo("manager",{setValue:function(n,e,t,r){t.set(r),e.onSetValue(n,r)},getValue:function(n,e,t){return t.get()},onLoad:function(n,e,t){e.store.initialValue.each(function(n){t.isNotSet()&&t.set(n)})},onUnload:function(n,e,t){t.clear()},state:$f})],Jf=[vr("store",{mode:"memory"},ur("mode",{memory:Kf,manual:Yf,dataset:qf})),qo("onSetValue"),hr("resetOnDom",!1)],Qf=Xr({fields:Jf,name:"representing",active:Gf,apis:Lf,extra:{setValueFrom:function(n,e){var t=Qf.getValue(e);Qf.setValue(n,t)}},state:Wf}),Zf=Bi("width",function(n){return n.dom().offsetWidth}),ns=function(n,e){return Zf.set(n,e)},es=function(n){return Zf.get(n)},ts=function(t,r){return{left:y(t),top:y(r),translate:function(n,e){return ts(t+n,r+e)}}},rs=ts,os=y("slider.change.value"),is=function(n){var e=n.event().raw();if(-1!==e.type.indexOf("touch")){return e.touches!==undefined&&1===e.touches.length?O.some(e.touches[0]).map(function(n){return rs(n.clientX,n.clientY)}):O.none()}return e.clientX!==undefined?O.some(e).map(function(n){return rs(n.clientX,n.clientY)}):O.none()},us=function(n){return n.model.minX},cs=function(n){return n.model.minY},as=function(n){return n.model.minX-1},fs=function(n){return n.model.minY-1},ss=function(n){return n.model.maxX},ls=function(n){return n.model.maxY},ds=function(n){return n.model.maxX+1},ms=function(n){return n.model.maxY+1},gs=function(n,e,t){return e(n)-t(n)},ps=function(n){return gs(n,ss,us)},hs=function(n){return gs(n,ls,cs)},vs=function(n){return ps(n)/2},ys=function(n){return hs(n)/2},bs=function(n){return n.stepSize},xs=function(n){return n.snapToGrid},ws=function(n){return n.snapStart},Ss=function(n){return n.rounded},Os=function(n,e){return n[e+"-edge"]!==undefined},Ts=function(n){return Os(n,"left")},ks=function(n){return Os(n,"right")},Es=function(n){return Os(n,"top")},Cs=function(n){return Os(n,"bottom")},Ms=function(n){return n.model.value.get()},_s=function(n){return{x:y(n)}},Ds=function(n){return{y:y(n)}},Is=function(n,e){return{x:y(n),y:y(e)}},Fs=function(n,e){be(n,os(),{value:e})},Rs=function(n,e,t,r){return n
'),components:[_l.parts()["left-edge"](kf('
')),_l.parts().spectrum({dom:Tf('
'),components:[kf('
')],behaviours:Ur([gi.config({toggleClass:bi("thumb-active")})])}),_l.parts()["right-edge"](kf('
')),_l.parts().thumb({dom:Tf('
'),behaviours:Ur([gi.config({toggleClass:bi("thumb-active")})])})],onChange:function(n,e,t){var r=i(t.x());Mi(e.element(),"background-color",r),o.onChange(n,e,r)},onDragStart:function(n,e){gi.on(e)},onDragEnd:function(n,e){gi.off(e)},onInit:function(n,e,t,r){var o=i(r.x());Mi(e.element(),"background-color",o)},stepSize:10,model:{mode:"x",minX:0,maxX:360,getInitialValue:function(){return{x:function(){return o.getInitialValue()}}}},sliderBehaviours:Ur([hi(_l.refresh)])}))];var o,i},Fl=Ut([fr("getInitialValue"),fr("onChange"),fr("category"),fr("sizes")]),Rl=function(n){var i=or("SizeSlider",Fl,n);return _l.sketch({dom:{tag:"div",classes:[bi("slider-"+i.category+"-size-container"),bi("slider"),bi("slider-size-container")]},onChange:function(n,e,t){var r,o=t.x();0<=(r=o)&&r'),components:[kf('
')]}),_l.parts().thumb({dom:Tf('
'),behaviours:Ur([gi.config({toggleClass:bi("thumb-active")})])})]})},Vl=["9px","10px","11px","12px","14px","16px","18px","20px","24px","32px","36px"],Bl=function(e,n){return(Ce(n)?O.some(n):He(n).filter(Ce)).map(function(n){return vo(function(n,e){return e(n)},xo,n,function(n){return Fi(n,"font-size").isSome()},e).bind(function(n){return Fi(n,"font-size")}).getOrThunk(function(){return Di(n,"font-size")})}).getOr("")},Al=function(n){var e=n.selection.getStart(),t=Te.fromDom(e),r=Te.fromDom(n.getBody()),o=Bl(function(n){return Ae(r,n)},t);return bn(Vl,function(n){return o===n}).getOr("medium")},jl=function(n){var e,t=Al(n);return e=t,xn(Vl,function(n){return n===e}).getOr(2)},Hl=function(r,n){var e;e=n,O.from(Vl[e]).each(function(n){var e,t;t=n,Al(e=r)!==t&&e.execCommand("fontSize",!1,t)})},Nl=y(Vl)(),Pl=function(n){return[kf(''),Rl({onChange:(e=n).onChange,sizes:Nl,category:"font",getInitialValue:e.getInitialValue}),kf('')];var e},zl=function(n){var e=function t(n){return n.uid!==undefined}(n)&&R(n,"uid")?n.uid:sf("memento");return{get:function(n){return n.getSystem().getByUid(e).getOrDie()},getOpt:function(n){return n.getSystem().getByUid(e).toOption()},asSpec:function(){return x(x({},n),{uid:e})}}},Ll=window.Promise?window.Promise:(pf=(gf=function(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],Yl(n,Gl(Ul,this),Gl(Wl,this))}).immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(n){v.setTimeout(n,1)},hf=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},gf.prototype["catch"]=function(n){return this.then(null,n)},gf.prototype.then=function(t,r){var o=this;return new gf(function(n,e){$l.call(o,new ql(t,r,n,e))})},gf.all=function(){for(var n=[],e=0;e'),action:function(n){var e=t.get(n);Qf.setValue(e,"")}}));return{name:n,spec:dd.sketch({dom:Tf('
'),components:[t.asSpec(),r.asSpec()],containerBehaviours:Ur([gi.config({toggleClass:bi("input-container-empty")}),ld.config({find:function(n){return O.some(t.get(n))}}),ad("input-clearing",[Er(Qn(),function(n){var e=t.get(n);(0"},Pd=function(o,n){return{uid:o.uid,dom:o.dom,components:n,behaviours:ma(o.formBehaviours,[Qf.config({store:{mode:"manual",getValue:function(n){var e,t,r=(e=o,t=n.getSystem(),C(e.partUids,function(n,e){return y(t.getByUid(n))}));return C(r,function(n,o){return n().bind(function(n){var e,t,r=ld.getCurrent(n);return e=r,t=new Error("Cannot find a current component to extract the value from for form part '"+o+"': "+Vo(n.element())),e.fold(function(){return rt.error(t)},rt.value)}).map(Qf.getValue)})},setValue:function(t,n){E(n,function(e,n){Ka(t,o,n).each(function(n){ld.getCurrent(n).each(function(n){Qf.setValue(n,e)})})})}}})]),apis:{getField:function(n,e){return Ka(n,o,e).bind(ld.getCurrent)}}}},zd=(tf(function(n,e,t){return n.getField(e,t)}),function(n){var i,e=(i=[],{field:function(n,e){return i.push(n),t="form",r=Nd(n),o=e,{uiType:Ta(),owner:t,name:r,config:o,validated:{}};var t,r,o},record:function(){return i}}),t=n(e),r=e.record(),o=gn(r,function(n){return za({name:n,pname:Nd(n)})});return df("form",Hd,o,Pd,t)}),Ld=function(){var e=ho(O.none()),t=function(){e.get().each(function(n){n.destroy()})};return{clear:function(){t(),e.set(O.none())},isSet:function(){return e.get().isSome()},set:function(n){t(),e.set(O.some(n))},run:function(n){e.get().each(n)}}},Gd=function(){var e=ho(O.none());return{clear:function(){e.set(O.none())},set:function(n){e.set(O.some(n))},isSet:function(){return e.get().isSome()},on:function(n){e.get().each(n)}}},$d=function(n){var r="navigateEvent",e=Wt([fr("fields"),hr("maxFieldIndex",n.fields.length-1),fr("onExecute"),fr("getInitialValue"),yr("state",function(){return{dialogSwipeState:Gd(),currentScreen:ho(0)}})]),u=or("SerialisedDialog",e,n),o=function(e,n,t){return wf.sketch({dom:Tf(''),action:function(n){be(n,r,{direction:e})},buttonBehaviours:Ur([jd.config({disableClass:bi("toolbar-navigation-disabled"),disabled:function(){return!t}})])})},i=function(n,o){var i=Li(n.element(),"."+bi("serialised-dialog-screen"));Ui(n.element(),"."+bi("serialised-dialog-chain")).each(function(r){0<=u.state.currentScreen.get()+o&&u.state.currentScreen.get()+o'),components:[dd.sketch({dom:Tf('
'),components:gn(u.fields,function(n,e){return e<=u.maxFieldIndex?dd.sketch({dom:Tf('
'),components:[o(-1,"previous",0'),behaviours:Ur([Ou.config({highlightClass:bi("dot-active"),itemClass:bi("dot-item")})]),components:Sn(u.fields,function(n,e){return e<=u.maxFieldIndex?[kf('
')]:[]})});return{dom:Tf('
'),components:[a.asSpec(),f.asSpec()],behaviours:Ur([sa.config({mode:"special",focusIn:function(n){var e=a.get(n);sa.focusIn(e)}}),ad("serializer-wrapper-events",[Er(Gn(),function(n,e){var t=e.event();u.state.dialogSwipeState.set({xValue:t.raw().touches[0].clientX,points:[]})}),Er($n(),function(n,e){var t=e.event();u.state.dialogSwipeState.on(function(n){e.event().prevent(),u.state.dialogSwipeState.set(function(n,e){if(e===n.xValue)return n;var t=0 "):r[0].name();return Ft(o,{handler:e,purpose:y(t)})})});return Vt(e,{})},am=function(n){return tr("custom.definition",Wt([Kt("dom","dom",Et(),Wt([fr("tag"),hr("styles",{}),hr("classes",[]),hr("attributes",{}),dr("value"),dr("innerHtml")])),fr("components"),fr("uid"),hr("events",{}),hr("apis",{}),Kt("eventOrder","eventOrder",Tt.mergeWithThunk(y({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"],"alloy.receive":["receiving","reflecting","tooltipping"]})),cr()),dr("domModification")]),n)},fm=function(e,n){pn(n,function(n){co(e,n)})},sm=function(e,n){pn(n,function(n){fo(e,n)})},lm=function(n,e){return t=n,o=gn(r=e,function(n){return gr(n.name(),[fr("config"),hr("state",Gr)])}),i=tr("component.behaviours",Wt(o),t.behaviours).fold(function(n){throw new Error(ir(n)+"\nComplete spec:\n"+JSON.stringify(t,null,2))},function(n){return n}),{list:r,data:C(i,function(n){var e=n.map(function(n){return{config:n.config,state:n.state.init(n.config)}});return function(){return e}})};var t,r,o,i},dm=function(n){var e,t,r=(e=I(n,"behaviours").getOr({}),t=hn(T(e),function(n){return e[n]!==undefined}),gn(t,function(n){return e[n].me}));return lm(n,r)},mm=function(n,e,t){var r,o,i,u=x(x({},(r=n).dom),{uid:r.uid,domChildren:gn(r.components,function(n){return n.element()})}),c=n.domModification.fold(function(){return Hr({})},Hr),a={"alloy.base.modification":c},f=0");r[t[0]]=Ft(t[1],n),r[t[1]]=Ft(t[0],n)}),r},createBistate:function(n,e,t){return Rt([{key:n,value:Ft(e,t)},{key:e,value:Ft(n,t)}])},createTristate:function(n,e,t,r){return Rt([{key:n,value:Rt([{key:e,value:r},{key:t,value:r}])},{key:e,value:Rt([{key:n,value:r},{key:t,value:r}])},{key:t,value:Rt([{key:n,value:r},{key:e,value:r}])}])}}}),ig=bi("scrollable"),ug=function(n){co(n,ig)},cg=function(n){fo(n,ig)},ag=ig,fg=function(n){return I(n,"format").getOr(n.title)},sg=function(n,e,t,r,o){return{data:{value:n,text:e},type:"item",dom:{tag:"div",classes:o?[bi("styles-item-is-menu")]:[]},toggling:{toggleOnExecute:!1,toggleClass:bi("format-matches"),selected:t},itemBehaviours:Ur(o?[]:[pi(n,function(n,e){(e?gi.on:gi.off)(n)})]),components:[{dom:{tag:"div",attributes:{style:r},innerHtml:e}}]}},lg=function(n,e,t,r){return{value:n,dom:{tag:"div"},components:[wf.sketch({dom:{tag:"div",classes:[bi("styles-collapser")]},components:r?[{dom:{tag:"span",classes:[bi("styles-collapse-icon")]}},vm(n)]:[vm(n)],action:function(n){if(r){var e=t().get(n);Ym.collapseMenu(e)}}}),{dom:{tag:"div",classes:[bi("styles-menu-items-container")]},components:[jm.parts().items({})],behaviours:Ur([ad("adhoc-scrollable-menu",[Fr(function(n,e){Mi(n.element(),"overflow-y","auto"),Mi(n.element(),"-webkit-overflow-scrolling","touch"),ug(n.element())}),Rr(function(n){Ri(n.element(),"overflow-y"),Ri(n.element(),"-webkit-overflow-scrolling"),cg(n.element())})])])}],items:e,menuBehaviours:Ur([og.config({initialState:"after",routes:og.createTristate("before","current","after",{transition:{property:"transform",transitionClass:"transitioning"}})})])}},dg=function(r){var o,i,n,e,t,u=(o=r.formats,i=function(){return c},n=lg("Styles",[].concat(gn(o.items,function(n){return sg(fg(n),n.title,n.isSelected(),n.getPreview(),R(o.expansions,fg(n)))})),i,!1),e=C(o.menus,function(n,e){var t=gn(n,function(n){return sg(fg(n),n.title,n.isSelected!==undefined&&n.isSelected(),n.getPreview!==undefined?n.getPreview():"",R(o.expansions,fg(n)))});return lg(e,t,i,!0)}),t=ct(e,Ft("styles",n)),{tmenu:Ym.tieredData("styles",t,o.expansions)}),c=zl(Ym.sketch({dom:{tag:"div",classes:[bi("styles-menu")]},components:[],fakeFocus:!0,stayInDom:!0,onExecute:function(n,e){var t=Qf.getValue(e);return r.handle(e,t.value),O.none()},onEscape:function(){return O.none()},onOpenMenu:function(n,e){var t=es(n.element());ns(e.element(),t),og.jumpTo(e,"current")},onOpenSubmenu:function(n,e,t){var r=es(n.element()),o=$i(e.element(),'[role="menu"]').getOrDie("hacky"),i=n.getSystem().getByDom(o).getOrDie();ns(t.element(),r),og.progressTo(i,"before"),og.jumpTo(t,"after"),og.progressTo(t,"current")},onCollapseMenu:function(n,e,t){var r=$i(e.element(),'[role="menu"]').getOrDie("hacky"),o=n.getSystem().getByDom(r).getOrDie();og.progressTo(o,"after"),og.progressTo(t,"current")},navigateOnHover:!1,highlightImmediately:!0,data:u.tmenu,markers:{backgroundMenu:bi("styles-background-menu"),menu:bi("styles-menu"),selectedMenu:bi("styles-selected-menu"),item:bi("styles-item"),selectedItem:bi("styles-selected-item")}}));return c.asSpec()},mg=function(n){return R(n,"items")?(t=ct(It(e=n,["items"]),{menu:!0}),r=gg(e.items),{item:t,menus:ct(r.menus,Ft(e.title,r.items)),expansions:ct(r.expansions,Ft(e.title,e.title))}):{item:n,menus:{},expansions:{}};var e,t,r},gg=function(n){return vn(n,function(n,e){var t=mg(e);return{menus:ct(n.menus,t.menus),items:[t.item].concat(n.items),expansions:ct(n.expansions,t.expansions)}},{menus:{},expansions:{},items:[]})},pg=function(u,n){var c=function(n){return function(){return u.formatter.match(n)}},a=function(n){return function(){return u.formatter.getCssText(n)}},e=I(n,"style_formats").getOr(Xd),f=function(n){return gn(n,function(n){if(R(n,"items")){var e=f(n.items);return ct(ct(n,{isSelected:y(!1),getPreview:y("")}),{items:e})}return R(n,"format")?ct(i=n,{isSelected:c(i.format),getPreview:a(i.format)}):(r=Ea((t=n).title),o=ct(t,{format:r,isSelected:c(r),getPreview:a(r)}),u.formatter.register(r,o),o);var t,r,o,i})};return f(e)},hg=function(t,n,r){var e,o,i,u=(e=t,i=(o=function(n){return Sn(n,function(n){return n.items===undefined?!R(n,"format")||e.formatter.canApply(n.format)?[n]:[]:0e.innerHeight||n.bottom()>e.innerHeight?n.bottom()-e.innerHeight+50:0;0!=t&&e.scrollTo(e.pageXOffset,e.pageYOffset+t)})})].concat(!0==Vg?[]:[Eg(Te.fromDom(r.win()),"blur",function(){t.getByDom(e).each(gi.off)}),Eg(i,"select",n),Eg(r.doc(),"selectionchange",n)]);return{destroy:function(){pn(c,function(n){n.unbind()})}}},Ag=function(n,e){var t=parseInt(Zr(n,e),10);return isNaN(t)?0:t};var jg,Hg,Ng=function _v(t,r){var e=function(n){return t(n)?O.from(n.dom().nodeValue):O.none()};return{get:function(n){if(!t(n))throw new Error("Can only get "+r+" value of a "+r+" node");return e(n).getOr("")},getOption:e,set:function(n,e){if(!t(n))throw new Error("Can only set raw "+r+" value of a "+r+" node");n.dom().nodeValue=e}}}(Me,"text"),Pg=function(n){return"img"===ke(n)?1:(e=n,Ng.getOption(e).fold(function(){return Ne(n).length},function(n){return n.length}));var e},zg=function(n,e,t,r){return{start:y(n),soffset:y(e),finish:y(t),foffset:y(r)}},Lg=ot([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Gg={before:Lg.before,on:Lg.on,after:Lg.after,cata:function(n,e,t,r){return n.fold(e,t,r)},getStart:function(n){return n.fold(b,b,b)}},$g=ot([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Ug={domRange:$g.domRange,relative:$g.relative,exact:$g.exact,exactFromRange:function(n){return $g.exact(n.start(),n.soffset(),n.finish(),n.foffset())},getWin:function(n){var e,t=n.match({domRange:function(n){return Te.fromDom(n.startContainer)},relative:function(n,e){return Gg.getStart(n)},exact:function(n,e,t,r){return n}});return e=t,Te.fromDom(e.dom().ownerDocument.defaultView)},range:zg},Wg=function(n,e,t){var r,o,i=n.document.createRange();return r=i,e.fold(function(n){r.setStartBefore(n.dom())},function(n,e){r.setStart(n.dom(),e)},function(n){r.setStartAfter(n.dom())}),o=i,t.fold(function(n){o.setEndBefore(n.dom())},function(n,e){o.setEnd(n.dom(),e)},function(n){o.setEndAfter(n.dom())}),i},Xg=function(n,e,t,r,o){var i=n.document.createRange();return i.setStart(e.dom(),t),i.setEnd(r.dom(),o),i},qg=function(n){return{left:y(n.left),top:y(n.top),right:y(n.right),bottom:y(n.bottom),width:y(n.width),height:y(n.height)}},Yg=ot([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Kg=function(n,e,t){return e(Te.fromDom(t.startContainer),t.startOffset,Te.fromDom(t.endContainer),t.endOffset)},Jg=function(n,e){var o,t,r,i=(o=n,e.match({domRange:function(n){return{ltr:y(n),rtl:O.none}},relative:function(n,e){return{ltr:V(function(){return Wg(o,n,e)}),rtl:V(function(){return O.some(Wg(o,e,n))})}},exact:function(n,e,t,r){return{ltr:V(function(){return Xg(o,n,e,t,r)}),rtl:V(function(){return O.some(Xg(o,t,r,n,e))})}}}));return(r=(t=i).ltr()).collapsed?t.rtl().filter(function(n){return!1===n.collapsed}).map(function(n){return Yg.rtl(Te.fromDom(n.endContainer),n.endOffset,Te.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return Kg(0,Yg.ltr,r)}):Kg(0,Yg.ltr,r)},Qg=(Yg.ltr,Yg.rtl,function(n,e){var t=ke(n);return"input"===t?Gg.after(n):dn(["br","img"],t)?0===e?Gg.before(n):Gg.after(n):Gg.on(n,e)}),Zg=function(n,e,t,r){var o,i,u,c,a,f=(i=e,u=t,c=r,(a=je(o=n).dom().createRange()).setStart(o.dom(),i),a.setEnd(u.dom(),c),a),s=Ae(n,t)&&e===r;return f.collapsed&&!s},np=function(n,e,t,r,o){var i,u,c=Xg(n,e,t,r,o);i=n,u=c,O.from(i.getSelection()).each(function(n){n.removeAllRanges(),n.addRange(u)})},ep=function(l,n){return Jg(l,n).match({ltr:function(n,e,t,r){np(l,n,e,t,r)},rtl:function(n,e,t,r){var o,i,u,c,a,f=l.getSelection();if(f.setBaseAndExtent)f.setBaseAndExtent(n.dom(),e,t.dom(),r);else if(f.extend)try{i=n,u=e,c=t,a=r,(o=f).collapse(i.dom(),u),o.extend(c.dom(),a)}catch(s){np(l,t,r,n,e)}else np(l,t,r,n,e)}})},tp=function(n,e,t,r,o){var i,u,c,a,f=(i=r,u=o,c=Qg(e,t),a=Qg(i,u),Ug.relative(c,a));ep(n,f)},rp=function(n){var e=Te.fromDom(n.anchorNode),t=Te.fromDom(n.focusNode);return Zg(e,n.anchorOffset,t,n.focusOffset)?O.some(zg(e,n.anchorOffset,t,n.focusOffset)):function(n){if(0e.innerHeight||t.bottom()>e.innerHeight?Math.min(r,t.bottom()-e.innerHeight+50):0);0!==o&&u.scrollTo(u.pageXOffset,u.pageYOffset+o)})}),lp(e,n.innerHeight)});lp(e,n.innerHeight);return{toEditing:function(){fp(u)},destroy:function(){t.unbind()}}},pp=function(n){return O.from(n.dom().contentWindow)},hp=function(n){return pp(n).bind(op)},vp=function(n){return n.getFrame()},yp=function(n,e,t,r){return n[t].getOrThunk(function(){return function(n){return Eg(e,r,n)}})},bp=function(n){return{left:y(n.left),top:y(n.top),right:y(n.right),bottom:y(n.bottom),width:y(n.width),height:y(n.height)}},xp=function(c){var n,a=vp(c);return n=a,O.some(Te.fromDom(n.dom().contentWindow.document.body)).bind(function(u){return n=a,O.some(Te.fromDom(n.dom().contentWindow.document)).bind(function(i){return pp(a).map(function(o){var n=Te.fromDom(i.dom().documentElement),e=c.getCursorBox.getOrThunk(function(){return function(){return op(o).map(function(n){return Ug.exact(n.start(),n.soffset(),n.finish(),n.foffset())}).bind(function(n){return ip(o,n).orThunk(function(){return op(o).filter(function(n){return Ae(n.start(),n.finish())&&n.soffset()===n.foffset()}).bind(function(n){var e=n.start().dom().getBoundingClientRect();return 0
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
- !function(nt){"use strict";var Z=function(){},d=function(e,o){return function(){for(var t=[],n=0;n "+o.toString()},function(t,n){return"state("+t+")"})}).join("\n")+"}"}}},fn=function(r){return{extract:function(e,o,t){var n=V(t,function(t,n){return r.extract(e.concat(["["+n+"]"]),o,t)});return tn(n)},toString:function(){return"array("+r.toString()+")"}}},dn=function(a,c){return{extract:function(e,o,r){var t,n,i=lt(r),u=(t=e,n=i,fn(cn(a)).extract(t,ct,n));return Ht(u,function(t){var n=V(t,function(t){return on.field(t,t,Ut(),c)});return ln(n).extract(e,o,r)})},toString:function(){return"setOf("+c.toString()+")"}}},mn=at(cn(It)),gn=d(fn,ln),pn=on.state,hn=on.field,vn=function(e,n,o,r,i){return bt(r,i).fold(function(){return t=r,n=i,en(e,function(){return'The chosen schema: "'+n+'" did not exist in branches: '+nn(t)});var t,n},function(t){return t.extract(e.concat(["branch: "+i]),n,o)})},bn=function(r,i){return{extract:function(n,e,o){return bt(o,r).fold(function(){return t=r,en(n,function(){return'Choice schema did not contain choice key: "'+t+'"'});var t},function(t){return vn(n,e,o,i,t)})},toString:function(){return"chooseOn("+r+"). Possible values: "+lt(i)}}},yn=cn(It),xn=function(t){return gn(t)},wn=function(o){return{extract:function(t,n,e){return o().extract(t,n,e)},toString:function(){return o().toString()}}},Sn=function(n){return cn(function(t){return n(t).fold(Vt,It)})},kn=function(n,t){return dn(function(t){return At(n(t))},t)},Cn=function(t,n,e){return Ft((o=t,r=ct,i=e,u=n.extract([o],r,i),Nt(u,function(t){return{input:i,errors:t}})));var o,r,i,u},On=function(t){return t.fold(function(t){throw new Error(Tn(t))},ct)},_n=function(t,n,e){return On(Cn(t,n,e))},Tn=function(t){return"Errors: \n"+(n=t.errors,e=10 ")+")\n"+t.getErrorInfo()}).join("\n"))+"\n\nInput object: "+nn(t.input);var n,e},En=function(t,n){return bn(t,n)},Bn=function(t,n){return bn(t,dt(n,ln))},Dn=at(yn),Mn=function(e,o){return cn(function(t){var n=typeof t;return e(t)?It(t):Vt("Expected type: "+o+" but got: "+n)})},An=Mn(rt,"number"),Fn=Mn(S,"string"),In=Mn(O,"boolean"),Rn=Mn(T,"function"),Vn=function(n){var t=function(t,n){for(var e=t.next();!e.done;){if(!n(e.value))return!1;e=t.next()}return!0};if(Object(n)!==n)return!0;switch({}.toString.call(n).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(n).every(function(t){return Vn(n[t])});case"Map":return t(n.keys(),Vn)&&t(n.values(),Vn);case"Set":return t(n.keys(),Vn);default:return!1}},Hn=cn(function(t){return Vn(t)?It(t):Vt("Expected value to be acceptable for sending via postMessage")}),Pn=function(n){return Sn(function(t){return F(n,t)?ot.value(t):ot.error('Unsupported value: "'+t+'", choose one of "'+n.join(", ")+'".')})},zn=function(t){return hn(t,t,Ut(),mn())},Nn=function(t,n){return hn(t,t,Ut(),n)},Ln=function(t){return Nn(t,Fn)},jn=function(t,n){return hn(t,t,Ut(),Pn(n))},Un=function(t){return Nn(t,Rn)},Wn=function(t,n){return hn(t,t,Ut(),ln(n))},Gn=function(t,n){return hn(t,t,Ut(),gn(n))},Xn=function(t,n){return hn(t,t,Ut(),fn(n))},Yn=function(t){return hn(t,t,Wt(),mn())},qn=function(t,n){return hn(t,t,Wt(),n)},Kn=function(t){return qn(t,An)},Jn=function(t){return qn(t,Fn)},$n=function(t){return qn(t,Rn)},Qn=function(t,n){return qn(t,ln(n))},Zn=function(t,n){return hn(t,t,jt(n),mn())},te=function(t,n,e){return hn(t,t,jt(n),e)},ne=function(t,n){return te(t,n,An)},ee=function(t,n){return te(t,n,Fn)},oe=function(t,n,e){return te(t,n,Pn(e))},re=function(t,n){return te(t,n,In)},ie=function(t,n){return te(t,n,Rn)},ue=function(t,n,e){return te(t,n,ln(e))},ae=function(t,n){return pn(t,n)},ce=function(t){var n=t;return{get:function(){return n},set:function(t){n=t}}},se=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:at(t)}},le={fromHtml:function(t,n){var e=(n||nt.document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||1=o.length&&e.substr(r,r+o.length)===o?t.substring(0,t.length-"/*".length):t;var n,e,o,r})},Qr=function(t,n){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:$r(i)}},t},Zr=Nr("alloy-premade"),ti=function(t){return Kt(Zr,t)},ni=function(o){return t=function(t){for(var n=[],e=1;e "):o[0].name();return Kt(r,{handler:n,purpose:at(e)})})});return $t(n,{})},mi=function(t){return Cn("custom.definition",ln([hn("dom","dom",Ut(),ln([zn("tag"),Zn("styles",{}),Zn("classes",[]),Zn("attributes",{}),Yn("value"),Yn("innerHtml")])),zn("components"),zn("uid"),Zn("events",{}),Zn("apis",{}),hn("eventOrder","eventOrder",Lt.mergeWithThunk(at({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"],"alloy.receive":["receiving","reflecting"]})),Dn()),Yn("domModification")]),t)},gi=function(t,n){var e=Dr(t,n);return e===undefined||""===e?[]:e.split(" ")},pi=function(t){return t.dom().classList!==undefined},hi=function(t,n){return r=n,i=gi(e=t,o="class").concat([r]),Br(e,o,i.join(" ")),!0;var e,o,r,i},vi=function(t,n){return r=n,0<(i=P(gi(e=t,o="class"),function(t){return t!==r})).length?Br(e,o,i.join(" ")):Fr(e,o),!1;var e,o,r,i},bi=function(t,n){pi(t)?t.dom().classList.add(n):hi(t,n)},yi=function(t){0===(pi(t)?t.dom().classList:gi(t,"class")).length&&Fr(t,"class")},xi=function(t,n){pi(t)?t.dom().classList.remove(n):vi(t,n);yi(t)},wi=function(t,n){return pi(t)&&t.dom().classList.contains(n)},Si=function(n,t){it(t,function(t){bi(n,t)})},ki=function(n,t){it(t,function(t){xi(n,t)})},Ci=function(t){return t.style!==undefined&&T(t.style.getPropertyValue)},Oi=function(t){var n=Tr(t)?t.dom().parentNode:t.dom();return n!==undefined&&null!==n&&n.ownerDocument.body.contains(n)},_i=function(){return Ti(le.fromDom(nt.document))},Ti=function(t){var n=t.dom().body;if(null===n||n===undefined)throw new Error("Body is not available yet");return le.fromDom(n)},Ei=function(t,n,e){if(!S(e))throw nt.console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Ci(t)&&t.style.setProperty(n,e)},Bi=function(t,n){Ci(t)&&t.style.removeProperty(n)},Di=function(t,n,e){var o=t.dom();Ei(o,n,e)},Mi=function(t,n){var e=t.dom();ft(n,function(t,n){Ei(e,n,t)})},Ai=function(t,n){var e=t.dom();ft(n,function(t,n){t.fold(function(){Bi(e,n)},function(t){Ei(e,n,t)})})},Fi=function(t,n){var e=t.dom(),o=nt.window.getComputedStyle(e).getPropertyValue(n);return""!==o||Oi(t)?o:Ii(e,n)},Ii=function(t,n){return Ci(t)?t.style.getPropertyValue(n):""},Ri=function(t,n){var e=t.dom(),o=Ii(e,n);return st.from(o).filter(function(t){return 0"}),Dn()),Pl=ae("schema",function(){return[Yn("preprocess")]}),zl=Zn("defaults",at({})),Nl=Zn("overrides",at({})),Ll=ln([Il,Rl,Vl,Hl,zl,Nl]),jl=ln([Il,Rl,Vl,zl,Nl]),Ul=ln([Il,Rl,Vl,Hl,zl,Nl]),Wl=ln([Il,Pl,Vl,zn("unit"),Hl,zl,Nl]),Gl=function(t){return t.fold(st.some,st.none,st.some,st.some)},Xl=function(t){var n=function(t){return t.name};return t.fold(n,n,n,n)},Yl=function(e,o){return function(t){var n=_n("Converting part type",o,t);return e(n)}},ql=Yl(Fl.required,Ll),Kl=Yl(Fl.external,jl),Jl=Yl(Fl.optional,Ul),$l=Yl(Fl.group,Wl),Ql=at("entirety"),Zl=/* */Object.freeze({__proto__:null,required:ql,external:Kl,optional:Jl,group:$l,asNamedPart:Gl,name:Xl,asCommon:function(t){return t.fold(ct,ct,ct,ct)},original:Ql}),tf=function(t,n,e,o){return Ct(n.defaults(t,e,o),e,{uid:t.partUids[n.name]},n.overrides(t,e,o))},nf=function(r,t){var n={};return it(t,function(t){Gl(t).each(function(e){var o=ef(r,e.pname);n[e.name]=function(t){var n=_n("Part: "+e.name+" in "+r,ln(e.schema),t);return et(et({},o),{config:t,validated:n})}})}),n},ef=function(t,n){return{uiType:Al(),owner:t,name:n}},of=function(t,n,e){return{uiType:Al(),owner:t,name:n,config:e,validated:{}}},rf=function(t){return U(t,function(t){return t.fold(st.none,st.some,st.none,st.none).map(function(t){return Wn(t.name,t.schema.concat([ea(Ql())]))}).toArray()})},uf=function(t){return V(t,Xl)},af=function(t,n,e){return o=n,i={},r={},it(e,function(t){t.fold(function(o){i[o.pname]=Dl(!0,function(t,n,e){return o.factory.sketch(tf(t,o,n,e))})},function(t){var n=o.parts[t.name];r[t.name]=at(t.factory.sketch(tf(o,t,n[Ql()]),n))},function(o){i[o.pname]=Dl(!1,function(t,n,e){return o.factory.sketch(tf(t,o,n,e))})},function(r){i[r.pname]=Ml(!0,function(n,t,e){var o=n[r.name];return V(o,function(t){return r.factory.sketch(Ct(r.defaults(n,t,e),t,r.overrides(n,t)))})})})}),{internals:at(i),externals:at(r)};var o,i,r},cf=function(t,n,e){return Bl(st.some(t),n,n.components,e)},sf=function(t,n,e){var o=n.partUids[e];return t.getSystem().getByUid(o).toOption()},lf=function(t,n,e){return sf(t,n,e).getOrDie("Could not find part: "+e)},ff=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return it(e,function(t){o[t]=at(i.getByUid(r[t]))}),o},df=function(t,n){var e=t.getSystem();return dt(n.partUids,function(t,n){return at(e.getByUid(t))})},mf=function(t){return lt(t.partUids)},gf=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return it(e,function(t){o[t]=at(i.getByUid(r[t]).getOrDie())}),o},pf=function(n,t){var e=uf(t);return Jt(V(e,function(t){return{key:t,value:n+"-"+t}}))},hf=function(n){return hn("partUids","partUids",Xt(function(t){return pf(t.uid,n)}),Dn())},vf=/* */Object.freeze({__proto__:null,generate:nf,generateOne:of,schemas:rf,names:uf,substitutes:af,components:cf,defaultUids:pf,defaultUidsSchema:hf,getAllParts:df,getAllPartNames:mf,getPart:sf,getPartOrDie:lf,getParts:ff,getPartsOrDie:gf}),bf=function(t,n,e,o,r){var i,u,a=(u=r,(0<(i=o).length?[Wn("parts",i)]:[]).concat([zn("uid"),Zn("dom",{}),Zn("components",[]),ea("originalSpec"),Zn("debug.sketcher",{})]).concat(u));return _n(t+" [SpecSchema]",sn(a.concat(n)),e)},yf=function(t,n,e,o,r){var i=xf(r),u=rf(e),a=hf(e),c=bf(t,n,i,u,[a]),s=af(0,c,e);return o(c,cf(t,c,s.internals()),i,s.externals())},xf=function(t){return yt(t,"uid")?t:et(et({},t),{uid:Yr("uid")})};var wf,Sf,kf=sn([zn("name"),zn("factory"),zn("configFields"),Zn("apis",{}),Zn("extraApis",{})]),Cf=sn([zn("name"),zn("factory"),zn("configFields"),zn("partFields"),Zn("apis",{}),Zn("extraApis",{})]),Of=function(t){var i=_n("Sketcher for "+t.name,kf,t),n=dt(i.apis,ni),e=dt(i.extraApis,function(t,n){return Qr(t,n)});return et(et({name:at(i.name),configFields:at(i.configFields),sketch:function(t){return n=i.name,e=i.configFields,o=i.factory,r=xf(t),o(bf(n,e,r,[],[]),r);var n,e,o,r}},n),e)},_f=function(t){var n=_n("Sketcher for "+t.name,Cf,t),e=nf(n.name,n.partFields),o=dt(n.apis,ni),r=dt(n.extraApis,function(t,n){return Qr(t,n)});return et(et({name:at(n.name),partFields:at(n.partFields),configFields:at(n.configFields),sketch:function(t){return yf(n.name,n.configFields,n.partFields,n.factory,t)},parts:at(e)},o),r)},Tf=function(t){for(var n=[],e=function(t){n.push(t)},o=0;o',e.getDoc());return vr(t,le.fromDom(n.extractContents())),n.insertNode(t.dom()),lr(t).each(function(t){return t.dom().normalize()}),Xc(t,Gc).map(function(t){var n;e.selection.setCursorLocation(t.dom(),"img"===Cr(n=t)?1:Uc(n).fold(function(){return dr(n).length},function(t){return t.length}))}),t})},np=function(t){return Au(t,"[data-mce-autocompleter]")},ep=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},op=function(t){return""!==t&&-1!==" \xa0\f\n\r\t\x0B".indexOf(t)},rp=function(t,n){return t.substring(n.length)},ip=function(t,o,r,i){if(void 0===i&&(i=0),!(n=o).collapsed||3!==n.startContainer.nodeType)return st.none();var n,e=t.getParent(o.startContainer,t.isBlock)||t.getRoot();return Zg(t,o.startContainer,o.startOffset,function(t,n,e){return function(t,n,e){var o;for(o=n-1;0<=o;o--){var r=t.charAt(o);if(op(r))return st.none();if(r===e)break}return st.some(o)}(e,n,r).getOr(n)},e).bind(function(t){var n=o.cloneRange();if(n.setStart(t.container,t.offset),n.setEnd(o.endContainer,o.endOffset),n.collapsed)return st.none();var e=ep(n);return 0!==e.lastIndexOf(r)||rp(e,r).length=t.minChars&&t.matches.getOrThunk(function(){return dp(n.dom)})(e.range,i,e.text)});if(0===u.length)return st.none();var a=cp.all(V(u,function(n){return n.fetch(e.text,n.maxResults,o).then(function(t){return{matchText:e.text,items:t,columns:n.columns,onAction:n.onAction}})}));return st.some({lookupData:a,context:e})},pp=ln([Ln("type"),Jn("text")]),hp=ln([ae("type",function(){return"autocompleteitem"}),ae("active",function(){return!1}),ae("disabled",function(){return!1}),Zn("meta",{}),Ln("value"),Jn("text"),Jn("icon")]),vp=ln([Ln("type"),Ln("ch"),ne("minChars",1),Zn("columns",1),ne("maxResults",10),$n("matches"),Un("fetch"),Un("onAction")]),bp=function(t){var n,e,o=t.ui.registry.getAll().popups,r=dt(o,function(t){return Cn("Autocompleter",vp,t).fold(function(t){throw new Error(Tn(t))},function(t){return t})}),i=(n=pt(r,function(t){return t.ch}),e={},it(n,function(t){e[t]={}}),lt(e)),u=vt(r);return{dataset:r,triggerChars:i,lookupByChar:function(n){return P(u,function(t){return t.ch===n})}}},yp=[re("disabled",!1),Jn("text"),Jn("shortcut"),hn("value","value",Gt(function(){return Nr("menuitem-value")}),Dn()),Zn("meta",{})],xp=ln([Ln("type"),ie("onSetup",function(){return Z}),ie("onAction",Z),Jn("icon")].concat(yp)),wp=ln([Ln("type"),Un("getSubmenuItems"),ie("onSetup",function(){return Z}),Jn("icon")].concat(yp)),Sp=ln([Ln("type"),Jn("icon"),re("active",!1),ie("onSetup",function(){return Z}),Un("onAction")].concat(yp)),kp=ln([Ln("type"),re("active",!1),Jn("icon")].concat(yp)),Cp=ln([Ln("type"),jn("fancytype",["inserttable","colorswatch"]),ie("onAction",Z)]),Op=function(t,o,n){var r=Yc(t.element(),"."+n);if(0o}).getOr(r.length);return st.some({numColumns:e,numRows:Math.ceil(r.length/e)})}return st.none()},_p=function(t,n){return za([Lm(t,n)])},Tp=function(t){return _p(Nr("unnamed-events"),t)},Ep=[zn("lazySink"),zn("tooltipDom"),Zn("exclusive",!0),Zn("tooltipComponents",[]),Zn("delay",300),oe("mode","normal",["normal","follow-highlight"]),Zn("anchor",function(t){return{anchor:"hotspot",hotspot:t,layouts:{onLtr:at([_a,Oa,wa,ka,Sa,Ca]),onRtl:at([_a,Oa,wa,ka,Sa,Ca])}}}),$u("onHide"),$u("onShow")],Bp=/* */Object.freeze({__proto__:null,init:function(){var e=ce(st.none()),n=ce(st.none()),o=function(){e.get().each(function(t){nt.clearTimeout(t)})},t=at("not-implemented");return oi({getTooltip:function(){return n.get()},isShowing:function(){return n.get().isSome()},setTooltip:function(t){n.set(st.some(t))},clearTooltip:function(){n.set(st.none())},clearTimer:o,resetTimer:function(t,n){o(),e.set(st.some(nt.setTimeout(function(){t()},n)))},readState:t})}}),Dp=Nr("tooltip.exclusive"),Mp=Nr("tooltip.show"),Ap=Nr("tooltip.hide"),Fp=function(t,n,e){t.getSystem().broadcastOn([Dp],{})},Ip=/* */Object.freeze({__proto__:null,hideAllExclusive:Fp,setComponents:function(t,n,e,o){e.getTooltip().each(function(t){t.getSystem().isConnected()&&Nm.set(t,o)})}}),Rp=La({fields:Ep,name:"tooltipping",active:/* */Object.freeze({__proto__:null,events:function(o,r){var e=function(n){r.getTooltip().each(function(t){Ps(t),o.onHide(n,t),r.clearTooltip()}),r.clearTimer()};return Yo(ut([[Jo(Mp,function(t){r.resetTimer(function(){!function(n){if(!r.isShowing()){Fp(n);var t=o.lazySink(n).getOrDie(),e=n.getSystem().build({dom:o.tooltipDom,components:o.tooltipComponents,events:Yo("normal"===o.mode?[Jo(ro(),function(t){Lo(n,Mp)}),Jo(eo(),function(t){Lo(n,Ap)})]:[]),behaviours:za([Nm.config({})])});r.setTooltip(e),Rs(t,e),o.onShow(n,e),Ds.position(t,o.anchor(n),e)}}(t)},o.delay)}),Jo(Ap,function(t){r.resetTimer(function(){e(t)},o.delay)}),Jo(yo(),function(t,n){F(n.channels(),Dp)&&e(t)}),rr(function(t){e(t)})],"normal"===o.mode?[Jo(io(),function(t){Lo(t,Mp)}),Jo(vo(),function(t){Lo(t,Ap)}),Jo(ro(),function(t){Lo(t,Mp)}),Jo(eo(),function(t){Lo(t,Ap)})]:[Jo(zo(),function(t,n){Lo(t,Mp)}),Jo(No(),function(t){Lo(t,Ap)})]]))}}),state:Bp,apis:Ip}),Vp=tinymce.util.Tools.resolve("tinymce.util.I18n"),Hp="tox-menu-nav__js",Pp="tox-collection__item",zp="tox-swatch",Np={normal:Hp,color:zp},Lp="tox-collection__item--enabled",jp="tox-collection__item-label",Up="tox-collection__item-caret",Wp="tox-collection__item--active",Gp=function(t){return bt(Np,t).getOr(Hp)},Xp=tinymce.util.Tools.resolve("tinymce.Env"),Yp=function(t){return{dom:{tag:"div",classes:["tox-collection__item-icon"],innerHtml:t}}},qp=function(t){return{dom:{tag:"div",classes:[jp]},components:[Yi(Vp.translate(t))]}},Kp=function(t,n){return{dom:{tag:"div",classes:[jp]},components:[{dom:{tag:t.tag,styles:t.styles},components:[Yi(Vp.translate(n))]}]}},Jp=function(t){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:(n=t,e=Xp.mac?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},o=n.split("+"),r=V(o,function(t){var n=t.toLowerCase().trim();return yt(e,n)?e[n]:t}),Xp.mac?r.join(""):r.join("+"))}};var n,e,o,r},$p=function(t){return{dom:{tag:"div",classes:["tox-collection__item-checkmark"],innerHtml:Gg("checkmark",t)}}},Qp=function(t,n,e,o,r){var i=e?n.or(st.some("")).map(Yp):st.none(),u=t.checkMark,a=t.ariaLabel.map(function(t){return{attributes:{title:Vp.translate(t)}}}).getOr({});return{dom:et({tag:"div",classes:[Hp,Pp].concat(r?["tox-collection__item-icon-rtl"]:[])},a),optComponents:[i,t.htmlContent.fold(function(){return t.textContent.map(o)},function(t){return st.some({dom:{tag:"div",classes:[jp],innerHtml:t}})}),t.shortcutContent.map(Jp),u,t.caret]}},Zp=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],th=["list-bull-circle","list-bull-default","list-bull-square"],nh=function(t,r,n,i){void 0===i&&(i=st.none());var e,o,u,a,c,s=Vp.isRtl()&&t.iconContent.exists(function(t){return F(th,t)}),l=t.iconContent.map(function(t){return Vp.isRtl()&&F(Zp,t)?t+"-rtl":t}).map(function(t){return n=t,e=r.icons,o=i,st.from(e()[n]).or(o).getOrThunk(function(){return Wg(e)});var n,e,o}),f=st.from(t.meta).fold(function(){return qp},function(t){return yt(t,"style")?g(Kp,t.style):qp});return"color"===t.presets?(e=t.ariaLabel,o=t.value,u=r,{dom:(a=l.getOr(""),c={tag:"div",attributes:e.map(function(t){return{title:u.translate(t)}}).getOr({}),classes:["tox-swatch"]},et(et({},c),"custom"===o?{tag:"button",classes:b(c.classes,["tox-swatches__picker-btn"]),innerHtml:a}:"remove"===o?{classes:b(c.classes,["tox-swatch--remove"]),innerHtml:a}:{attributes:et(et({},c.attributes),{"data-mce-color":o}),styles:{"background-color":o}})),optComponents:[]}):Qp(t,l,n,f,s)},eh=["input","button","textarea","select"],oh=function(t,n,e){(n.disabled()?sh:lh)(t,n,e)},rh=function(t,n){return!0===n.useNative&&F(eh,Cr(t.element()))},ih=function(t){Br(t.element(),"disabled","disabled")},uh=function(t){Fr(t.element(),"disabled")},ah=function(t){Br(t.element(),"aria-disabled","true")},ch=function(t){Br(t.element(),"aria-disabled","false")},sh=function(n,t,e){t.disableClass.each(function(t){bi(n.element(),t)}),(rh(n,t)?ih:ah)(n),t.onDisabled(n)},lh=function(n,t,e){t.disableClass.each(function(t){xi(n.element(),t)}),(rh(n,t)?uh:ch)(n),t.onEnabled(n)},fh=function(t,n){return rh(t,n)?Ar(t.element(),"disabled"):"true"===Dr(t.element(),"aria-disabled")},dh=/* */Object.freeze({__proto__:null,enable:lh,disable:sh,isDisabled:fh,onLoad:oh,set:function(t,n,e,o){(o?sh:lh)(t,n,e)}}),mh=/* */Object.freeze({__proto__:null,exhibit:function(t,n){return ii({classes:n.disabled?n.disableClass.map(Y).getOr([]):[]})},events:function(e,t){return Yo([qo(xo(),function(t,n){return fh(t,e)}),Ia(e,t,oh)])}}),gh=[ie("disabled",c),Zn("useNative",!0),Yn("disableClass"),$u("onDisabled"),$u("onEnabled")],ph=La({fields:gh,name:"disabling",active:mh,apis:dh}),hh=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),vh=tinymce.util.Tools.resolve("tinymce.EditorManager"),bh=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},yh=function(t){return t.getParam("width",hh.DOM.getStyle(t.getElement(),"width"))},xh=function(t){return st.from(t.settings.min_width).filter(rt)},wh=function(t){return st.from(t.settings.min_height).filter(rt)},Sh=function(t){return st.from(t.getParam("max_width")).filter(rt)},kh=function(t){return st.from(t.getParam("max_height")).filter(rt)},Ch=function(t){return!1!==t.getParam("menubar",!0,"boolean")},Oh=function(t){var n=t.getParam("toolbar",!0),e=!0===n,o=S(n),r=C(n)&&0'+t+""})}return r},ov=at(nf(pg(),hg())),rv=Nr("cell-over"),iv=Nr("cell-execute"),uv=function(n,e,t){var o,r=function(t){return jo(t,iv,{row:n,col:e})},i=function(t,n){n.stop(),r(t)};return Ji({dom:{tag:"div",attributes:((o={role:"button"})["aria-labelledby"]=t,o)},behaviours:za([Lm("insert-table-picker-cell",[Jo(ro(),Xm.focus),Jo(xo(),r),Jo(fo(),i),Jo(So(),i)]),rg.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Xm.config({onFocus:function(t){return jo(t,rv,{row:n,col:e})}})])})},av=function(t){return{value:t}},cv=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,sv=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,lv=function(t){return cv.test(t)||sv.test(t)},fv=function(t){var n={value:t.value.replace(cv,function(t,n,e,o){return n+n+e+e+o+o})},e=sv.exec(n.value);return null===e?["FFFFFF","FF","FF","FF"]:e},dv=function(t){var n=t.toString(16);return 1===n.length?"0"+n:n},mv=function(t){var n=dv(t.red)+dv(t.green)+dv(t.blue);return av(n)},gv=Math.min,pv=Math.max,hv=Math.round,vv=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,bv=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,yv=function(t,n,e,o){return{red:t,green:n,blue:e,alpha:o}},xv=function(t){var n=parseInt(t,10);return n.toString()===t&&0<=n&&n<=255},wv=function(t){var n,e,o,r=(t.hue||0)%360,i=t.saturation/100,u=t.value/100;if(i=pv(0,gv(i,1)),u=pv(0,gv(u,1)),0===i)return n=e=o=hv(255*u),yv(n,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),l=u-c;switch(Math.floor(a)){case 0:n=c,e=s,o=0;break;case 1:n=s,e=c,o=0;break;case 2:n=0,e=c,o=s;break;case 3:n=0,e=s,o=c;break;case 4:n=s,e=0,o=c;break;case 5:n=c,e=0,o=s;break;default:n=e=o=0}return n=hv(255*(n+l)),e=hv(255*(e+l)),o=hv(255*(o+l)),yv(n,e,o,1)},Sv=function(t){var n=fv(t),e=parseInt(n[1],16),o=parseInt(n[2],16),r=parseInt(n[3],16);return yv(e,o,r,1)},kv=function(t,n,e,o){var r=parseInt(t,10),i=parseInt(n,10),u=parseInt(e,10),a=parseFloat(o);return yv(r,i,u,a)},Cv=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},Ov=yv(255,0,0,1),_v=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),Tv="tinymce-custom-colors";var Ev="choiceitem",Bv=[{type:Ev,text:"Light Green",value:"#BFEDD2"},{type:Ev,text:"Light Yellow",value:"#FBEEB8"},{type:Ev,text:"Light Red",value:"#F8CAC6"},{type:Ev,text:"Light Purple",value:"#ECCAFA"},{type:Ev,text:"Light Blue",value:"#C2E0F4"},{type:Ev,text:"Green",value:"#2DC26B"},{type:Ev,text:"Yellow",value:"#F1C40F"},{type:Ev,text:"Red",value:"#E03E2D"},{type:Ev,text:"Purple",value:"#B96AD9"},{type:Ev,text:"Blue",value:"#3598DB"},{type:Ev,text:"Dark Turquoise",value:"#169179"},{type:Ev,text:"Orange",value:"#E67E23"},{type:Ev,text:"Dark Red",value:"#BA372A"},{type:Ev,text:"Dark Purple",value:"#843FA1"},{type:Ev,text:"Dark Blue",value:"#236FA1"},{type:Ev,text:"Light Gray",value:"#ECF0F1"},{type:Ev,text:"Medium Gray",value:"#CED4D9"},{type:Ev,text:"Gray",value:"#95A5A6"},{type:Ev,text:"Dark Gray",value:"#7E8C8D"},{type:Ev,text:"Navy Blue",value:"#34495E"},{type:Ev,text:"Black",value:"#000000"},{type:Ev,text:"White",value:"#ffffff"}],Dv=function zF(e){void 0===e&&(e=10);var t,n=_v.getItem(Tv),o=S(n)?JSON.parse(n):[],r=e-(t=o).length<0?t.slice(0,e):t,i=function(t){r.splice(t,1)};return{add:function(t){var n;(-1===(n=A(r,t))?st.none():st.some(n)).each(i),r.unshift(t),r.length>e&&r.pop(),_v.setItem(Tv,JSON.stringify(r))},state:function(){return r.slice(0)}}}(10),Mv=function(t){return!1!==t.getParam("custom_colors")},Av=function(t){var n=t.getParam("color_map");return n!==undefined?function(t){var n=[],u=nt.document.createElement("canvas");u.height=1,u.width=1;for(var a=u.getContext("2d"),c=function(t,n){var e=n/255;return("0"+Math.round(t*e+255*(1-e)).toString(16)).slice(-2).toUpperCase()},e=function(t){if(/^[0-9A-Fa-f]{6}$/.test(t))return"#"+t.toUpperCase();a.clearRect(0,0,u.width,u.height),a.fillStyle="#FFFFFF",a.fillStyle=t,a.fillRect(0,0,1,1);var n=a.getImageData(0,0,1,1).data,e=n[0],o=n[1],r=n[2],i=n[3];return"#"+c(e,i)+c(o,i)+c(r,i)},o=0;o"},Ww=function(o,t){return{uid:o.uid,dom:o.dom,components:t,behaviours:wl(o.formBehaviours,[bl.config({store:{mode:"manual",getValue:function(t){var n=df(t,o);return dt(n,function(t,r){return t().bind(function(t){var n,e,o=Mf.getCurrent(t);return n=o,e=new Error("Cannot find a current component to extract the value from for form part '"+r+"': "+Vr(t.element())),n.fold(function(){return ot.error(e)},ot.value)}).map(bl.getValue)})},setValue:function(e,t){ft(t,function(n,t){sf(e,o,t).each(function(t){Mf.getCurrent(t).each(function(t){bl.setValue(t,n)})})})}}})]),apis:{getField:function(t,n){return sf(t,o,n).bind(Mf.getCurrent)}}}},Gw={getField:ni(function(t,n,e){return t.getField(n,e)}),sketch:function(t){var e,n=(e=[],{field:function(t,n){return e.push(t),of("form",Uw(t),n)},record:function(){return e}}),o=t(n),r=n.record(),i=V(r,function(t){return ql({name:t,pname:Uw(t)})});return yf("form",jw,i,Ww,o)}},Xw=Nr("valid-input"),Yw=Nr("invalid-input"),qw=Nr("validating-input"),Kw="colorcustom.rgb.",Jw=function(d,m,g,p){var h=function(t,n,e,o,r){var i,u,a=d(Kw+"range"),c=[ey.parts().label({dom:{tag:"label",innerHtml:e,attributes:{"aria-label":o}}}),ey.parts().field({data:r,factory:uy,inputAttributes:et({type:"text"},"hex"===n?{"aria-live":"polite"}:{}),inputClasses:[m("textfield")],inputBehaviours:za([(i=n,u=t,Ty.config({invalidClass:m("invalid"),notify:{onValidate:function(t){jo(t,qw,{type:i})},onValid:function(t){jo(t,Xw,{type:i,value:bl.getValue(t)})},onInvalid:function(t){jo(t,Yw,{type:i,value:bl.getValue(t)})}},validator:{validate:function(t){var n=bl.getValue(t),e=u(n)?ot.value(!0):ot.error(d("aria.input.invalid"));return vy(e)},validateOnLoad:!1}})),Dy.config({})]),onSetValue:function(t){Ty.isInvalid(t)&&Ty.run(t).get(Z)}})],s="hex"!==n?[ey.parts()["aria-descriptor"]({text:a})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:c.concat(s)}},v=function(t,n){var e=n.red,o=n.green,r=n.blue;bl.setValue(t,{red:e,green:o,blue:r})},b=Ug({dom:{tag:"div",classes:[m("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),y=function(t,n){b.getOpt(t).each(function(t){Di(t.element(),"background-color","#"+n.value)})};return Of({factory:function(){var e={red:ce(st.some(255)),green:ce(st.some(255)),blue:ce(st.some(255)),hex:ce(st.some("ffffff"))},o=function(t){return e[t].get()},i=function(t,n){e[t].set(n)},r=function(t){var n=t.red,e=t.green,o=t.blue;i("red",st.some(n)),i("green",st.some(e)),i("blue",st.some(o))},n=function(t,n){var e=n.event();"hex"!==e.type()?i(e.type(),st.none()):p(t)},u=function(r,t,n){var e=parseInt(n,10);i(t,st.some(e)),o("red").bind(function(e){return o("green").bind(function(n){return o("blue").map(function(t){return yv(e,n,t,1)})})}).each(function(t){var n,e,o=(n=r,e=mv(t),Gw.getField(n,"hex").each(function(t){Xm.isFocused(t)||bl.setValue(n,{hex:e.value})}),e);y(r,o)})},a=function(t,n){var e=n.event();"hex"===e.type()?function(t,n){g(t);var e=av(n);i("hex",st.some(n));var o=Sv(e);v(t,o),r(o),jo(t,ix,{hex:e}),y(t,e)}(t,e.value()):u(t,e.type(),e.value())},t=function(t){return{label:d(Kw+t+".label"),description:d(Kw+t+".description")}},c=t("red"),s=t("green"),l=t("blue"),f=t("hex");return Ct(Gw.sketch(function(t){return{dom:{tag:"form",classes:[m("rgb-form")],attributes:{"aria-label":d("aria.color.picker")}},components:[t.field("red",ey.sketch(h(xv,"red",c.label,c.description,255))),t.field("green",ey.sketch(h(xv,"green",s.label,s.description,255))),t.field("blue",ey.sketch(h(xv,"blue",l.label,l.description,255))),t.field("hex",ey.sketch(h(lv,"hex",f.label,f.description,"ffffff"))),b.asSpec()],formBehaviours:za([Ty.config({invalidClass:m("form-invalid")}),Lm("rgb-form-events",[Jo(Xw,a),Jo(Yw,n),Jo(qw,n)])])}}),{apis:{updateHex:function(t,n){var e,o;bl.setValue(t,{hex:n.value}),e=t,o=Sv(n),v(e,o),r(o),y(t,n)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,n,e){t.updateHex(n,e)}},extraApis:{}})},$w=function(t,o){var r=Lw.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[o("sv-palette-spectrum")]}}),i=Lw.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette-thumb")],innerHtml:"'}}),u=function(t,n){var e=t.width,o=t.height,r=t.getContext("2d");if(null!==r){r.fillStyle=n,r.fillRect(0,0,e,o);var i=r.createLinearGradient(0,0,e,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,e,o);var u=r.createLinearGradient(0,0,0,o);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=u,r.fillRect(0,0,e,o)}};return Of({factory:function(t){var n=at({x:at(0),y:at(0)}),e=za([Mf.config({find:st.some}),Xm.config({})]);return Lw.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette")]},model:{mode:"xy",getInitialValue:n},rounded:!1,components:[r,i],onChange:function(t,n,e){jo(t,ax,{value:e})},onInit:function(t,n,e,o){u(e.element().dom(),Cv(Ov))},sliderBehaviours:e})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(t,n,e){var o,r;o=e,r=n.components()[0].element().dom(),u(r,Cv(o))}},extraApis:{}})},Qw=function(f,d){return Of({name:"ColourPicker",configFields:[zn("dom"),Zn("onValidHex",Z),Zn("onInvalidHex",Z)],factory:function(t){var a,v,n,e,o,r=Jw(f,d,t.onValidHex,t.onInvalidHex),i=$w(0,d),b={paletteRgba:ce(Ov)},u=Ug(i.sketch({})),c=Ug(r.sketch({})),s=function(t,e){u.getOpt(t).each(function(t){var n=Sv(e);b.paletteRgba.set(n),i.setRgba(t,n)})},l=function(t,n){c.getOpt(t).each(function(t){r.updateHex(t,n)})},y=function(n,e,t){it(t,function(t){t(n,e)})};return{uid:t.uid,dom:t.dom,components:[u.asSpec(),(n=d,e=Lw.parts().spectrum({dom:{tag:"div",classes:[n("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=Lw.parts().thumb({dom:{tag:"div",classes:[n("hue-slider-thumb")],attributes:{role:"presentation"}}}),Lw.sketch({dom:{tag:"div",classes:[n("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:at({y:at(0)})},components:[e,o],sliderBehaviours:za([Xm.config({})]),onChange:function(t,n,e){jo(t,ux,{value:e})}})),c.asSpec()],behaviours:za([Lm("colour-picker-events",[Jo(ax,(v=[l],function(t,n){var e,o,r,i,u,a,c,s,l,f=n.event().value(),d=b.paletteRgba.get(),m=(i=r=0,u=(e=d).red/255,a=e.green/255,c=e.blue/255,s=Math.min(u,Math.min(a,c)),l=Math.max(u,Math.max(a,c)),s===l?rx(0,0,100*(i=s)):(r=60*((r=u===s?3:c===s?1:5)-(u===s?a-c:c===s?u-a:c-u)/(l-s)),o=(l-s)/l,i=l,rx(Math.round(r),Math.round(100*o),Math.round(100*i)))),g=rx(m.hue,f.x(),100-f.y()),p=wv(g),h=mv(p);y(t,h,v)})),Jo(ux,(a=[s,l],function(t,n){var e,o,r,i=n.event().value(),u=(e=i.y(),o=rx((100-e)/100*360,100,100),r=wv(o),mv(r));y(t,u,a)}))]),Mf.config({find:function(t){return c.getOpt(t)}}),Rm.config({mode:"acyclic"})])}}})},Zw=function(){return Mf.config({find:st.some})},tS=function(t){return Mf.config({find:t.getOpt})},nS=function(t){return Mf.config({find:function(n){return mr(n.element(),t).bind(function(t){return n.getSystem().getByDom(t).toOption()})}})},eS={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},oS=function(t){return eS[t]},rS=tinymce.util.Tools.resolve("tinymce.Resource"),iS=ln([Zn("preprocess",ct),Zn("postprocess",ct)]),uS=function(t,n,e){return bl.config(Ct({store:{mode:"manual",getValue:n,setValue:e}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))},aS=function(t,n,e){return uS(t,function(t){return n(t.element())},function(t,n){return e(t.element(),n)})},cS=function(r,t){var i=_n("RepresentingConfigs.memento processors",iS,t);return bl.config({store:{mode:"manual",getValue:function(t){var n=r.get(t),e=bl.getValue(n);return i.postprocess(e)},setValue:function(t,n){var e=i.preprocess(n),o=r.get(t);bl.setValue(o,e)}}})},sS=uS,lS=function(t){return aS(t,Sr,kr)},fS=function(t){return bl.config({store:{mode:"memory",initialValue:t}})},dS=function(r,n){var e=function(t,n){n.stop()},o=function(t){return function(n,e){it(t,function(t){t(n,e)})}},i=function(t,n){if(!ph.isDisabled(t)){var e=n.event().raw();a(t,e.dataTransfer.files)}},u=function(t,n){var e=n.event().raw().target.files;a(t,e)},a=function(t,n){var e,o;bl.setValue(t,(e=n,o=new RegExp("("+".jpg,.jpeg,.png,.gif".split(/\s*,\s*/).join("|")+")$","i"),P($(e),function(t){return o.test(t.name)}))),jo(t,Gb,{name:r.name})},c=Ug({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:za([Lm("input-file-events",[nr(fo()),nr(So())])])}),t=r.label.map(function(t){return Iy(t,n)}),s=ey.parts().field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:za([fS([]),Zw(),ph.config({}),rg.config({toggleClass:"dragenter",toggleOnExecute:!1}),Lm("dropzone-events",[Jo("dragenter",o([e,rg.toggle])),Jo("dragleave",o([e,rg.toggle])),Jo("dragover",e),Jo("drop",o([e,i])),Jo(lo(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:n.translate("Drop an image here")}},jg.sketch({dom:{tag:"button",innerHtml:n.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[c.asSpec()],action:function(t){c.get(t).element().dom().click()},buttonBehaviours:za([Dy.config({}),Gh(n.isReadOnly),Uh()])})]}]}}}});return My(t,s,["tox-form__group--stretched"],[])},mS=Nr("alloy-fake-before-tabstop"),gS=Nr("alloy-fake-after-tabstop"),pS=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:za([Xm.config({ignore:!0}),Dy.config({})])}},hS=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[pS([mS]),t,pS([gS])],behaviours:za([nS(1)])}},vS=function(t,n){jo(t,ao(),{raw:{which:9,shiftKey:n}})},bS=function(t,n){var e=n.element();wi(e,mS)?vS(t,!0):wi(e,gS)&&vS(t,!1)},yS=function(t){return Sb(t,["."+mS,"."+gS].join(","),at(!1))},xS=!(Pe().browser.isIE()||Pe().browser.isEdge()),wS=function(t,n){var o,r,e=xS&&t.sandboxed,i=et(et({},t.label.map(function(t){return{title:t}}).getOr({})),e?{sandbox:"allow-scripts allow-same-origin"}:{}),u=(o=e,r=ce(""),{getValue:function(t){return r.get()},setValue:function(t,n){if(o)Br(t.element(),"srcdoc",n);else{Br(t.element(),"src","javascript:''");var e=t.element().dom().contentWindow.document;e.open(),e.write(n),e.close()}r.set(n)}}),a=t.label.map(function(t){return Iy(t,n)}),c=ey.parts().field({factory:{sketch:function(t){return hS({uid:t.uid,dom:{tag:"iframe",attributes:i},behaviours:za([Dy.config({}),Xm.config({}),sS(st.none(),u.getValue,u.setValue)])})}}});return My(a,c,["tox-form__group--stretched"],[])};function SS(t,n){return OS(nt.document.createElement("canvas"),t,n)}function kS(t){var n=SS(t.width,t.height);return CS(n).drawImage(t,0,0),n}function CS(t){return t.getContext("2d")}function OS(t,n,e){return t.width=n,t.height=e,t}function _S(t){return t.naturalWidth||t.width}function TS(t){return t.naturalHeight||t.height}var ES,BS,DS,MS=window.Promise?window.Promise:(BS=(ES=function(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=[],PS(t,AS(IS,this),AS(RS,this))}).immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){nt.setTimeout(t,1)},DS=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},ES.prototype["catch"]=function(t){return this.then(null,t)},ES.prototype.then=function(e,o){var r=this;return new ES(function(t,n){FS.call(r,new HS(e,o,t,n))})},ES.all=function(){for(var t=[],n=0;n
").css({position:"absolute",top:0,left:0,width:o.width,height:o.height,zIndex:2147483647,opacity:1e-4,cursor:e}).appendTo(d.body),oC(d).on("mousemove touchmove",c).on("mouseup touchend",a),r.start(t)},c=function(t){if(cC(t),t.button!==u)return a(t);t.deltaX=t.screenX-l,t.deltaY=t.screenY-f,t.preventDefault(),r.drag(t)},a=function(t){cC(t),oC(d).off("mousemove touchmove",c).off("mouseup touchend",a),i.remove(),r.stop&&r.stop(t)},this.destroy=function(){oC(m).off()},oC(m).on("mousedown touchstart",n)}var lC=0,fC=function(s,e,l,o,r){var f,n,i,u="tox-",a="tox-crid-"+lC++,c=[{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"}];i=["top","right","bottom","left"];var d=function(t,n){return{x:n.x+t.x,y:n.y+t.y,w:n.w,h:n.h}},m=function(t,n){return{x:n.x-t.x,y:n.y-t.y,w:n.w,h:n.h}};function g(t,n,e,o){var r,i,u,a,c;r=n.x,i=n.y,u=n.w,a=n.h,r+=e*t.deltaX,i+=o*t.deltaY,(u+=e*t.deltaW)<20&&(u=20),(a+=o*t.deltaH)<20&&(a=20),c=s=rC.clamp({x:r,y:i,w:u,h:a},l,"move"===t.name),c=m(l,c),f.fire("updateRect",{rect:c}),v(c)}function p(n){function t(t,n){n.h<0&&(n.h=0),n.w<0&&(n.w=0),oC("#"+a+"-"+t,o).css({left:n.x,top:n.y,width:n.w,height:n.h})}uC.each(c,function(t){oC("#"+a+"-"+t.name,o).css({left:n.w*t.xMul+n.x,top:n.h*t.yMul+n.y})}),t("top",{x:e.x,y:e.y,w:e.w,h:n.y-e.y}),t("right",{x:n.x+n.w,y:n.y,w:e.w-n.x-n.w+e.x,h:n.h}),t("bottom",{x:e.x,y:n.y+n.h,w:e.w,h:e.h-n.y-n.h+e.y}),t("left",{x:e.x,y:n.y,w:n.x-e.x,h:n.h}),t("move",n)}function h(t){p(s=t)}function v(t){h(d(l,t))}return function b(){oC('
').appendTo(o),uC.each(i,function(t){oC("#"+a,o).append('
9
+ !function(nt){"use strict";var Z=function(){},d=function(e,o){return function(){for(var t=[],n=0;n "+o.toString()},function(t,n){return"state("+t+")"})}).join("\n")+"}"}}},fn=function(r){return{extract:function(e,o,t){var n=V(t,function(t,n){return r.extract(e.concat(["["+n+"]"]),o,t)});return tn(n)},toString:function(){return"array("+r.toString()+")"}}},dn=function(a,c){return{extract:function(e,o,r){var t,n,i=lt(r),u=(t=e,n=i,fn(cn(a)).extract(t,ct,n));return Ht(u,function(t){var n=V(t,function(t){return on.field(t,t,Ut(),c)});return ln(n).extract(e,o,r)})},toString:function(){return"setOf("+c.toString()+")"}}},mn=at(cn(It)),gn=d(fn,ln),pn=on.state,hn=on.field,vn=function(e,n,o,r,i){return bt(r,i).fold(function(){return t=r,n=i,en(e,function(){return'The chosen schema: "'+n+'" did not exist in branches: '+nn(t)});var t,n},function(t){return t.extract(e.concat(["branch: "+i]),n,o)})},bn=function(r,i){return{extract:function(n,e,o){return bt(o,r).fold(function(){return t=r,en(n,function(){return'Choice schema did not contain choice key: "'+t+'"'});var t},function(t){return vn(n,e,o,i,t)})},toString:function(){return"chooseOn("+r+"). Possible values: "+lt(i)}}},yn=cn(It),xn=function(t){return gn(t)},wn=function(o){return{extract:function(t,n,e){return o().extract(t,n,e)},toString:function(){return o().toString()}}},Sn=function(n){return cn(function(t){return n(t).fold(Vt,It)})},kn=function(n,t){return dn(function(t){return At(n(t))},t)},Cn=function(t,n,e){return Ft((o=t,r=ct,i=e,u=n.extract([o],r,i),Nt(u,function(t){return{input:i,errors:t}})));var o,r,i,u},On=function(t){return t.fold(function(t){throw new Error(Tn(t))},ct)},_n=function(t,n,e){return On(Cn(t,n,e))},Tn=function(t){return"Errors: \n"+(n=t.errors,e=10 ")+")\n"+t.getErrorInfo()}).join("\n"))+"\n\nInput object: "+nn(t.input);var n,e},En=function(t,n){return bn(t,n)},Bn=function(t,n){return bn(t,dt(n,ln))},Dn=at(yn),Mn=function(e,o){return cn(function(t){var n=typeof t;return e(t)?It(t):Vt("Expected type: "+o+" but got: "+n)})},An=Mn(rt,"number"),Fn=Mn(S,"string"),In=Mn(O,"boolean"),Rn=Mn(T,"function"),Vn=function(n){var t=function(t,n){for(var e=t.next();!e.done;){if(!n(e.value))return!1;e=t.next()}return!0};if(Object(n)!==n)return!0;switch({}.toString.call(n).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(n).every(function(t){return Vn(n[t])});case"Map":return t(n.keys(),Vn)&&t(n.values(),Vn);case"Set":return t(n.keys(),Vn);default:return!1}},Hn=cn(function(t){return Vn(t)?It(t):Vt("Expected value to be acceptable for sending via postMessage")}),Pn=function(n){return Sn(function(t){return F(n,t)?ot.value(t):ot.error('Unsupported value: "'+t+'", choose one of "'+n.join(", ")+'".')})},zn=function(t){return hn(t,t,Ut(),mn())},Nn=function(t,n){return hn(t,t,Ut(),n)},Ln=function(t){return Nn(t,Fn)},jn=function(t,n){return hn(t,t,Ut(),Pn(n))},Un=function(t){return Nn(t,Rn)},Wn=function(t,n){return hn(t,t,Ut(),ln(n))},Gn=function(t,n){return hn(t,t,Ut(),gn(n))},Xn=function(t,n){return hn(t,t,Ut(),fn(n))},Yn=function(t){return hn(t,t,Wt(),mn())},qn=function(t,n){return hn(t,t,Wt(),n)},Kn=function(t){return qn(t,An)},Jn=function(t){return qn(t,Fn)},$n=function(t){return qn(t,Rn)},Qn=function(t,n){return qn(t,ln(n))},Zn=function(t,n){return hn(t,t,jt(n),mn())},te=function(t,n,e){return hn(t,t,jt(n),e)},ne=function(t,n){return te(t,n,An)},ee=function(t,n){return te(t,n,Fn)},oe=function(t,n,e){return te(t,n,Pn(e))},re=function(t,n){return te(t,n,In)},ie=function(t,n){return te(t,n,Rn)},ue=function(t,n,e){return te(t,n,ln(e))},ae=function(t,n){return pn(t,n)},ce=function(t){var n=t;return{get:function(){return n},set:function(t){n=t}}},se=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:at(t)}},le={fromHtml:function(t,n){var e=(n||nt.document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||1=o.length&&e.substr(r,r+o.length)===o?t.substring(0,t.length-"/*".length):t;var n,e,o,r})},Qr=function(t,n){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:$r(i)}},t},Zr=Nr("alloy-premade"),ti=function(t){return Kt(Zr,t)},ni=function(o){return t=function(t){for(var n=[],e=1;e "):o[0].name();return Kt(r,{handler:n,purpose:at(e)})})});return $t(n,{})},mi=function(t){return Cn("custom.definition",ln([hn("dom","dom",Ut(),ln([zn("tag"),Zn("styles",{}),Zn("classes",[]),Zn("attributes",{}),Yn("value"),Yn("innerHtml")])),zn("components"),zn("uid"),Zn("events",{}),Zn("apis",{}),hn("eventOrder","eventOrder",Lt.mergeWithThunk(at({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"],"alloy.receive":["receiving","reflecting","tooltipping"]})),Dn()),Yn("domModification")]),t)},gi=function(t,n){var e=Dr(t,n);return e===undefined||""===e?[]:e.split(" ")},pi=function(t){return t.dom().classList!==undefined},hi=function(t,n){return r=n,i=gi(e=t,o="class").concat([r]),Br(e,o,i.join(" ")),!0;var e,o,r,i},vi=function(t,n){return r=n,0<(i=P(gi(e=t,o="class"),function(t){return t!==r})).length?Br(e,o,i.join(" ")):Fr(e,o),!1;var e,o,r,i},bi=function(t,n){pi(t)?t.dom().classList.add(n):hi(t,n)},yi=function(t){0===(pi(t)?t.dom().classList:gi(t,"class")).length&&Fr(t,"class")},xi=function(t,n){pi(t)?t.dom().classList.remove(n):vi(t,n);yi(t)},wi=function(t,n){return pi(t)&&t.dom().classList.contains(n)},Si=function(n,t){it(t,function(t){bi(n,t)})},ki=function(n,t){it(t,function(t){xi(n,t)})},Ci=function(t){return t.style!==undefined&&T(t.style.getPropertyValue)},Oi=function(t){var n=Tr(t)?t.dom().parentNode:t.dom();return n!==undefined&&null!==n&&n.ownerDocument.body.contains(n)},_i=function(){return Ti(le.fromDom(nt.document))},Ti=function(t){var n=t.dom().body;if(null===n||n===undefined)throw new Error("Body is not available yet");return le.fromDom(n)},Ei=function(t,n,e){if(!S(e))throw nt.console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Ci(t)&&t.style.setProperty(n,e)},Bi=function(t,n){Ci(t)&&t.style.removeProperty(n)},Di=function(t,n,e){var o=t.dom();Ei(o,n,e)},Mi=function(t,n){var e=t.dom();ft(n,function(t,n){Ei(e,n,t)})},Ai=function(t,n){var e=t.dom();ft(n,function(t,n){t.fold(function(){Bi(e,n)},function(t){Ei(e,n,t)})})},Fi=function(t,n){var e=t.dom(),o=nt.window.getComputedStyle(e).getPropertyValue(n);return""!==o||Oi(t)?o:Ii(e,n)},Ii=function(t,n){return Ci(t)?t.style.getPropertyValue(n):""},Ri=function(t,n){var e=t.dom(),o=Ii(e,n);return st.from(o).filter(function(t){return 0"}),Dn()),Pl=ae("schema",function(){return[Yn("preprocess")]}),zl=Zn("defaults",at({})),Nl=Zn("overrides",at({})),Ll=ln([Il,Rl,Vl,Hl,zl,Nl]),jl=ln([Il,Rl,Vl,zl,Nl]),Ul=ln([Il,Rl,Vl,Hl,zl,Nl]),Wl=ln([Il,Pl,Vl,zn("unit"),Hl,zl,Nl]),Gl=function(t){return t.fold(st.some,st.none,st.some,st.some)},Xl=function(t){var n=function(t){return t.name};return t.fold(n,n,n,n)},Yl=function(e,o){return function(t){var n=_n("Converting part type",o,t);return e(n)}},ql=Yl(Fl.required,Ll),Kl=Yl(Fl.external,jl),Jl=Yl(Fl.optional,Ul),$l=Yl(Fl.group,Wl),Ql=at("entirety"),Zl=/* */Object.freeze({__proto__:null,required:ql,external:Kl,optional:Jl,group:$l,asNamedPart:Gl,name:Xl,asCommon:function(t){return t.fold(ct,ct,ct,ct)},original:Ql}),tf=function(t,n,e,o){return Ct(n.defaults(t,e,o),e,{uid:t.partUids[n.name]},n.overrides(t,e,o))},nf=function(r,t){var n={};return it(t,function(t){Gl(t).each(function(e){var o=ef(r,e.pname);n[e.name]=function(t){var n=_n("Part: "+e.name+" in "+r,ln(e.schema),t);return et(et({},o),{config:t,validated:n})}})}),n},ef=function(t,n){return{uiType:Al(),owner:t,name:n}},of=function(t,n,e){return{uiType:Al(),owner:t,name:n,config:e,validated:{}}},rf=function(t){return U(t,function(t){return t.fold(st.none,st.some,st.none,st.none).map(function(t){return Wn(t.name,t.schema.concat([ea(Ql())]))}).toArray()})},uf=function(t){return V(t,Xl)},af=function(t,n,e){return o=n,i={},r={},it(e,function(t){t.fold(function(o){i[o.pname]=Dl(!0,function(t,n,e){return o.factory.sketch(tf(t,o,n,e))})},function(t){var n=o.parts[t.name];r[t.name]=at(t.factory.sketch(tf(o,t,n[Ql()]),n))},function(o){i[o.pname]=Dl(!1,function(t,n,e){return o.factory.sketch(tf(t,o,n,e))})},function(r){i[r.pname]=Ml(!0,function(n,t,e){var o=n[r.name];return V(o,function(t){return r.factory.sketch(Ct(r.defaults(n,t,e),t,r.overrides(n,t)))})})})}),{internals:at(i),externals:at(r)};var o,i,r},cf=function(t,n,e){return Bl(st.some(t),n,n.components,e)},sf=function(t,n,e){var o=n.partUids[e];return t.getSystem().getByUid(o).toOption()},lf=function(t,n,e){return sf(t,n,e).getOrDie("Could not find part: "+e)},ff=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return it(e,function(t){o[t]=at(i.getByUid(r[t]))}),o},df=function(t,n){var e=t.getSystem();return dt(n.partUids,function(t,n){return at(e.getByUid(t))})},mf=function(t){return lt(t.partUids)},gf=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return it(e,function(t){o[t]=at(i.getByUid(r[t]).getOrDie())}),o},pf=function(n,t){var e=uf(t);return Jt(V(e,function(t){return{key:t,value:n+"-"+t}}))},hf=function(n){return hn("partUids","partUids",Xt(function(t){return pf(t.uid,n)}),Dn())},vf=/* */Object.freeze({__proto__:null,generate:nf,generateOne:of,schemas:rf,names:uf,substitutes:af,components:cf,defaultUids:pf,defaultUidsSchema:hf,getAllParts:df,getAllPartNames:mf,getPart:sf,getPartOrDie:lf,getParts:ff,getPartsOrDie:gf}),bf=function(t,n,e,o,r){var i,u,a=(u=r,(0<(i=o).length?[Wn("parts",i)]:[]).concat([zn("uid"),Zn("dom",{}),Zn("components",[]),ea("originalSpec"),Zn("debug.sketcher",{})]).concat(u));return _n(t+" [SpecSchema]",sn(a.concat(n)),e)},yf=function(t,n,e,o,r){var i=xf(r),u=rf(e),a=hf(e),c=bf(t,n,i,u,[a]),s=af(0,c,e);return o(c,cf(t,c,s.internals()),i,s.externals())},xf=function(t){return yt(t,"uid")?t:et(et({},t),{uid:Yr("uid")})};var wf,Sf,kf=sn([zn("name"),zn("factory"),zn("configFields"),Zn("apis",{}),Zn("extraApis",{})]),Cf=sn([zn("name"),zn("factory"),zn("configFields"),zn("partFields"),Zn("apis",{}),Zn("extraApis",{})]),Of=function(t){var i=_n("Sketcher for "+t.name,kf,t),n=dt(i.apis,ni),e=dt(i.extraApis,function(t,n){return Qr(t,n)});return et(et({name:at(i.name),configFields:at(i.configFields),sketch:function(t){return n=i.name,e=i.configFields,o=i.factory,r=xf(t),o(bf(n,e,r,[],[]),r);var n,e,o,r}},n),e)},_f=function(t){var n=_n("Sketcher for "+t.name,Cf,t),e=nf(n.name,n.partFields),o=dt(n.apis,ni),r=dt(n.extraApis,function(t,n){return Qr(t,n)});return et(et({name:at(n.name),partFields:at(n.partFields),configFields:at(n.configFields),sketch:function(t){return yf(n.name,n.configFields,n.partFields,n.factory,t)},parts:at(e)},o),r)},Tf=function(t){for(var n=[],e=function(t){n.push(t)},o=0;o',e.getDoc());return vr(t,le.fromDom(n.extractContents())),n.insertNode(t.dom()),lr(t).each(function(t){return t.dom().normalize()}),Xc(t,Gc).map(function(t){var n;e.selection.setCursorLocation(t.dom(),"img"===Cr(n=t)?1:Uc(n).fold(function(){return dr(n).length},function(t){return t.length}))}),t})},np=function(t){return Au(t,"[data-mce-autocompleter]")},ep=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},op=function(t){return""!==t&&-1!==" \xa0\f\n\r\t\x0B".indexOf(t)},rp=function(t,n){return t.substring(n.length)},ip=function(t,o,r,i){if(void 0===i&&(i=0),!(n=o).collapsed||3!==n.startContainer.nodeType)return st.none();var n,e=t.getParent(o.startContainer,t.isBlock)||t.getRoot();return Zg(t,o.startContainer,o.startOffset,function(t,n,e){return function(t,n,e){var o;for(o=n-1;0<=o;o--){var r=t.charAt(o);if(op(r))return st.none();if(r===e)break}return st.some(o)}(e,n,r).getOr(n)},e).bind(function(t){var n=o.cloneRange();if(n.setStart(t.container,t.offset),n.setEnd(o.endContainer,o.endOffset),n.collapsed)return st.none();var e=ep(n);return 0!==e.lastIndexOf(r)||rp(e,r).length=t.minChars&&t.matches.getOrThunk(function(){return dp(n.dom)})(e.range,i,e.text)});if(0===u.length)return st.none();var a=cp.all(V(u,function(n){return n.fetch(e.text,n.maxResults,o).then(function(t){return{matchText:e.text,items:t,columns:n.columns,onAction:n.onAction}})}));return st.some({lookupData:a,context:e})},pp=ln([Ln("type"),Jn("text")]),hp=ln([ae("type",function(){return"autocompleteitem"}),ae("active",function(){return!1}),ae("disabled",function(){return!1}),Zn("meta",{}),Ln("value"),Jn("text"),Jn("icon")]),vp=ln([Ln("type"),Ln("ch"),ne("minChars",1),Zn("columns",1),ne("maxResults",10),$n("matches"),Un("fetch"),Un("onAction")]),bp=function(t){var n,e,o=t.ui.registry.getAll().popups,r=dt(o,function(t){return Cn("Autocompleter",vp,t).fold(function(t){throw new Error(Tn(t))},function(t){return t})}),i=(n=pt(r,function(t){return t.ch}),e={},it(n,function(t){e[t]={}}),lt(e)),u=vt(r);return{dataset:r,triggerChars:i,lookupByChar:function(n){return P(u,function(t){return t.ch===n})}}},yp=[re("disabled",!1),Jn("text"),Jn("shortcut"),hn("value","value",Gt(function(){return Nr("menuitem-value")}),Dn()),Zn("meta",{})],xp=ln([Ln("type"),ie("onSetup",function(){return Z}),ie("onAction",Z),Jn("icon")].concat(yp)),wp=ln([Ln("type"),Un("getSubmenuItems"),ie("onSetup",function(){return Z}),Jn("icon")].concat(yp)),Sp=ln([Ln("type"),Jn("icon"),re("active",!1),ie("onSetup",function(){return Z}),Un("onAction")].concat(yp)),kp=ln([Ln("type"),re("active",!1),Jn("icon")].concat(yp)),Cp=ln([Ln("type"),jn("fancytype",["inserttable","colorswatch"]),ie("onAction",Z)]),Op=function(t,o,n){var r=Yc(t.element(),"."+n);if(0o}).getOr(r.length);return st.some({numColumns:e,numRows:Math.ceil(r.length/e)})}return st.none()},_p=function(t,n){return za([Lm(t,n)])},Tp=function(t){return _p(Nr("unnamed-events"),t)},Ep=[zn("lazySink"),zn("tooltipDom"),Zn("exclusive",!0),Zn("tooltipComponents",[]),Zn("delay",300),oe("mode","normal",["normal","follow-highlight"]),Zn("anchor",function(t){return{anchor:"hotspot",hotspot:t,layouts:{onLtr:at([_a,Oa,wa,ka,Sa,Ca]),onRtl:at([_a,Oa,wa,ka,Sa,Ca])}}}),$u("onHide"),$u("onShow")],Bp=/* */Object.freeze({__proto__:null,init:function(){var e=ce(st.none()),n=ce(st.none()),o=function(){e.get().each(function(t){nt.clearTimeout(t)})},t=at("not-implemented");return oi({getTooltip:function(){return n.get()},isShowing:function(){return n.get().isSome()},setTooltip:function(t){n.set(st.some(t))},clearTooltip:function(){n.set(st.none())},clearTimer:o,resetTimer:function(t,n){o(),e.set(st.some(nt.setTimeout(function(){t()},n)))},readState:t})}}),Dp=Nr("tooltip.exclusive"),Mp=Nr("tooltip.show"),Ap=Nr("tooltip.hide"),Fp=function(t,n,e){t.getSystem().broadcastOn([Dp],{})},Ip=/* */Object.freeze({__proto__:null,hideAllExclusive:Fp,setComponents:function(t,n,e,o){e.getTooltip().each(function(t){t.getSystem().isConnected()&&Nm.set(t,o)})}}),Rp=La({fields:Ep,name:"tooltipping",active:/* */Object.freeze({__proto__:null,events:function(o,r){var e=function(n){r.getTooltip().each(function(t){Ps(t),o.onHide(n,t),r.clearTooltip()}),r.clearTimer()};return Yo(ut([[Jo(Mp,function(t){r.resetTimer(function(){!function(n){if(!r.isShowing()){Fp(n);var t=o.lazySink(n).getOrDie(),e=n.getSystem().build({dom:o.tooltipDom,components:o.tooltipComponents,events:Yo("normal"===o.mode?[Jo(ro(),function(t){Lo(n,Mp)}),Jo(eo(),function(t){Lo(n,Ap)})]:[]),behaviours:za([Nm.config({})])});r.setTooltip(e),Rs(t,e),o.onShow(n,e),Ds.position(t,o.anchor(n),e)}}(t)},o.delay)}),Jo(Ap,function(t){r.resetTimer(function(){e(t)},o.delay)}),Jo(yo(),function(t,n){F(n.channels(),Dp)&&e(t)}),rr(function(t){e(t)})],"normal"===o.mode?[Jo(io(),function(t){Lo(t,Mp)}),Jo(vo(),function(t){Lo(t,Ap)}),Jo(ro(),function(t){Lo(t,Mp)}),Jo(eo(),function(t){Lo(t,Ap)})]:[Jo(zo(),function(t,n){Lo(t,Mp)}),Jo(No(),function(t){Lo(t,Ap)})]]))}}),state:Bp,apis:Ip}),Vp=tinymce.util.Tools.resolve("tinymce.util.I18n"),Hp="tox-menu-nav__js",Pp="tox-collection__item",zp="tox-swatch",Np={normal:Hp,color:zp},Lp="tox-collection__item--enabled",jp="tox-collection__item-label",Up="tox-collection__item-caret",Wp="tox-collection__item--active",Gp=function(t){return bt(Np,t).getOr(Hp)},Xp=tinymce.util.Tools.resolve("tinymce.Env"),Yp=function(t){return{dom:{tag:"div",classes:["tox-collection__item-icon"],innerHtml:t}}},qp=function(t){return{dom:{tag:"div",classes:[jp]},components:[Yi(Vp.translate(t))]}},Kp=function(t,n){return{dom:{tag:"div",classes:[jp]},components:[{dom:{tag:t.tag,styles:t.styles},components:[Yi(Vp.translate(n))]}]}},Jp=function(t){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:(n=t,e=Xp.mac?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},o=n.split("+"),r=V(o,function(t){var n=t.toLowerCase().trim();return yt(e,n)?e[n]:t}),Xp.mac?r.join(""):r.join("+"))}};var n,e,o,r},$p=function(t){return{dom:{tag:"div",classes:["tox-collection__item-checkmark"],innerHtml:Gg("checkmark",t)}}},Qp=function(t,n,e,o,r){var i=e?n.or(st.some("")).map(Yp):st.none(),u=t.checkMark,a=t.ariaLabel.map(function(t){return{attributes:{title:Vp.translate(t)}}}).getOr({});return{dom:et({tag:"div",classes:[Hp,Pp].concat(r?["tox-collection__item-icon-rtl"]:[])},a),optComponents:[i,t.htmlContent.fold(function(){return t.textContent.map(o)},function(t){return st.some({dom:{tag:"div",classes:[jp],innerHtml:t}})}),t.shortcutContent.map(Jp),u,t.caret]}},Zp=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],th=["list-bull-circle","list-bull-default","list-bull-square"],nh=function(t,r,n,i){void 0===i&&(i=st.none());var e,o,u,a,c,s=Vp.isRtl()&&t.iconContent.exists(function(t){return F(th,t)}),l=t.iconContent.map(function(t){return Vp.isRtl()&&F(Zp,t)?t+"-rtl":t}).map(function(t){return n=t,e=r.icons,o=i,st.from(e()[n]).or(o).getOrThunk(function(){return Wg(e)});var n,e,o}),f=st.from(t.meta).fold(function(){return qp},function(t){return yt(t,"style")?g(Kp,t.style):qp});return"color"===t.presets?(e=t.ariaLabel,o=t.value,u=r,{dom:(a=l.getOr(""),c={tag:"div",attributes:e.map(function(t){return{title:u.translate(t)}}).getOr({}),classes:["tox-swatch"]},et(et({},c),"custom"===o?{tag:"button",classes:b(c.classes,["tox-swatches__picker-btn"]),innerHtml:a}:"remove"===o?{classes:b(c.classes,["tox-swatch--remove"]),innerHtml:a}:{attributes:et(et({},c.attributes),{"data-mce-color":o}),styles:{"background-color":o}})),optComponents:[]}):Qp(t,l,n,f,s)},eh=["input","button","textarea","select"],oh=function(t,n,e){(n.disabled()?sh:lh)(t,n,e)},rh=function(t,n){return!0===n.useNative&&F(eh,Cr(t.element()))},ih=function(t){Br(t.element(),"disabled","disabled")},uh=function(t){Fr(t.element(),"disabled")},ah=function(t){Br(t.element(),"aria-disabled","true")},ch=function(t){Br(t.element(),"aria-disabled","false")},sh=function(n,t,e){t.disableClass.each(function(t){bi(n.element(),t)}),(rh(n,t)?ih:ah)(n),t.onDisabled(n)},lh=function(n,t,e){t.disableClass.each(function(t){xi(n.element(),t)}),(rh(n,t)?uh:ch)(n),t.onEnabled(n)},fh=function(t,n){return rh(t,n)?Ar(t.element(),"disabled"):"true"===Dr(t.element(),"aria-disabled")},dh=/* */Object.freeze({__proto__:null,enable:lh,disable:sh,isDisabled:fh,onLoad:oh,set:function(t,n,e,o){(o?sh:lh)(t,n,e)}}),mh=/* */Object.freeze({__proto__:null,exhibit:function(t,n){return ii({classes:n.disabled?n.disableClass.map(Y).getOr([]):[]})},events:function(e,t){return Yo([qo(xo(),function(t,n){return fh(t,e)}),Ia(e,t,oh)])}}),gh=[ie("disabled",c),Zn("useNative",!0),Yn("disableClass"),$u("onDisabled"),$u("onEnabled")],ph=La({fields:gh,name:"disabling",active:mh,apis:dh}),hh=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),vh=tinymce.util.Tools.resolve("tinymce.EditorManager"),bh=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},yh=function(t){return t.getParam("width",hh.DOM.getStyle(t.getElement(),"width"))},xh=function(t){return st.from(t.settings.min_width).filter(rt)},wh=function(t){return st.from(t.settings.min_height).filter(rt)},Sh=function(t){return st.from(t.getParam("max_width")).filter(rt)},kh=function(t){return st.from(t.getParam("max_height")).filter(rt)},Ch=function(t){return!1!==t.getParam("menubar",!0,"boolean")},Oh=function(t){var n=t.getParam("toolbar",!0),e=!0===n,o=S(n),r=C(n)&&0'+t+""})}return r},ov=at(nf(pg(),hg())),rv=Nr("cell-over"),iv=Nr("cell-execute"),uv=function(n,e,t){var o,r=function(t){return jo(t,iv,{row:n,col:e})},i=function(t,n){n.stop(),r(t)};return Ji({dom:{tag:"div",attributes:((o={role:"button"})["aria-labelledby"]=t,o)},behaviours:za([Lm("insert-table-picker-cell",[Jo(ro(),Xm.focus),Jo(xo(),r),Jo(fo(),i),Jo(So(),i)]),rg.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Xm.config({onFocus:function(t){return jo(t,rv,{row:n,col:e})}})])})},av=function(t){return{value:t}},cv=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,sv=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,lv=function(t){return cv.test(t)||sv.test(t)},fv=function(t){var n={value:t.value.replace(cv,function(t,n,e,o){return n+n+e+e+o+o})},e=sv.exec(n.value);return null===e?["FFFFFF","FF","FF","FF"]:e},dv=function(t){var n=t.toString(16);return 1===n.length?"0"+n:n},mv=function(t){var n=dv(t.red)+dv(t.green)+dv(t.blue);return av(n)},gv=Math.min,pv=Math.max,hv=Math.round,vv=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,bv=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,yv=function(t,n,e,o){return{red:t,green:n,blue:e,alpha:o}},xv=function(t){var n=parseInt(t,10);return n.toString()===t&&0<=n&&n<=255},wv=function(t){var n,e,o,r=(t.hue||0)%360,i=t.saturation/100,u=t.value/100;if(i=pv(0,gv(i,1)),u=pv(0,gv(u,1)),0===i)return n=e=o=hv(255*u),yv(n,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),l=u-c;switch(Math.floor(a)){case 0:n=c,e=s,o=0;break;case 1:n=s,e=c,o=0;break;case 2:n=0,e=c,o=s;break;case 3:n=0,e=s,o=c;break;case 4:n=s,e=0,o=c;break;case 5:n=c,e=0,o=s;break;default:n=e=o=0}return n=hv(255*(n+l)),e=hv(255*(e+l)),o=hv(255*(o+l)),yv(n,e,o,1)},Sv=function(t){var n=fv(t),e=parseInt(n[1],16),o=parseInt(n[2],16),r=parseInt(n[3],16);return yv(e,o,r,1)},kv=function(t,n,e,o){var r=parseInt(t,10),i=parseInt(n,10),u=parseInt(e,10),a=parseFloat(o);return yv(r,i,u,a)},Cv=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},Ov=yv(255,0,0,1),_v=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),Tv="tinymce-custom-colors";var Ev="choiceitem",Bv=[{type:Ev,text:"Light Green",value:"#BFEDD2"},{type:Ev,text:"Light Yellow",value:"#FBEEB8"},{type:Ev,text:"Light Red",value:"#F8CAC6"},{type:Ev,text:"Light Purple",value:"#ECCAFA"},{type:Ev,text:"Light Blue",value:"#C2E0F4"},{type:Ev,text:"Green",value:"#2DC26B"},{type:Ev,text:"Yellow",value:"#F1C40F"},{type:Ev,text:"Red",value:"#E03E2D"},{type:Ev,text:"Purple",value:"#B96AD9"},{type:Ev,text:"Blue",value:"#3598DB"},{type:Ev,text:"Dark Turquoise",value:"#169179"},{type:Ev,text:"Orange",value:"#E67E23"},{type:Ev,text:"Dark Red",value:"#BA372A"},{type:Ev,text:"Dark Purple",value:"#843FA1"},{type:Ev,text:"Dark Blue",value:"#236FA1"},{type:Ev,text:"Light Gray",value:"#ECF0F1"},{type:Ev,text:"Medium Gray",value:"#CED4D9"},{type:Ev,text:"Gray",value:"#95A5A6"},{type:Ev,text:"Dark Gray",value:"#7E8C8D"},{type:Ev,text:"Navy Blue",value:"#34495E"},{type:Ev,text:"Black",value:"#000000"},{type:Ev,text:"White",value:"#ffffff"}],Dv=function zF(e){void 0===e&&(e=10);var t,n=_v.getItem(Tv),o=S(n)?JSON.parse(n):[],r=e-(t=o).length<0?t.slice(0,e):t,i=function(t){r.splice(t,1)};return{add:function(t){var n;(-1===(n=A(r,t))?st.none():st.some(n)).each(i),r.unshift(t),r.length>e&&r.pop(),_v.setItem(Tv,JSON.stringify(r))},state:function(){return r.slice(0)}}}(10),Mv=function(t){return!1!==t.getParam("custom_colors")},Av=function(t){var n=t.getParam("color_map");return n!==undefined?function(t){var n=[],u=nt.document.createElement("canvas");u.height=1,u.width=1;for(var a=u.getContext("2d"),c=function(t,n){var e=n/255;return("0"+Math.round(t*e+255*(1-e)).toString(16)).slice(-2).toUpperCase()},e=function(t){if(/^[0-9A-Fa-f]{6}$/.test(t))return"#"+t.toUpperCase();a.clearRect(0,0,u.width,u.height),a.fillStyle="#FFFFFF",a.fillStyle=t,a.fillRect(0,0,1,1);var n=a.getImageData(0,0,1,1).data,e=n[0],o=n[1],r=n[2],i=n[3];return"#"+c(e,i)+c(o,i)+c(r,i)},o=0;o"},Ww=function(o,t){return{uid:o.uid,dom:o.dom,components:t,behaviours:wl(o.formBehaviours,[bl.config({store:{mode:"manual",getValue:function(t){var n=df(t,o);return dt(n,function(t,r){return t().bind(function(t){var n,e,o=Mf.getCurrent(t);return n=o,e=new Error("Cannot find a current component to extract the value from for form part '"+r+"': "+Vr(t.element())),n.fold(function(){return ot.error(e)},ot.value)}).map(bl.getValue)})},setValue:function(e,t){ft(t,function(n,t){sf(e,o,t).each(function(t){Mf.getCurrent(t).each(function(t){bl.setValue(t,n)})})})}}})]),apis:{getField:function(t,n){return sf(t,o,n).bind(Mf.getCurrent)}}}},Gw={getField:ni(function(t,n,e){return t.getField(n,e)}),sketch:function(t){var e,n=(e=[],{field:function(t,n){return e.push(t),of("form",Uw(t),n)},record:function(){return e}}),o=t(n),r=n.record(),i=V(r,function(t){return ql({name:t,pname:Uw(t)})});return yf("form",jw,i,Ww,o)}},Xw=Nr("valid-input"),Yw=Nr("invalid-input"),qw=Nr("validating-input"),Kw="colorcustom.rgb.",Jw=function(d,m,g,p){var h=function(t,n,e,o,r){var i,u,a=d(Kw+"range"),c=[ey.parts().label({dom:{tag:"label",innerHtml:e,attributes:{"aria-label":o}}}),ey.parts().field({data:r,factory:uy,inputAttributes:et({type:"text"},"hex"===n?{"aria-live":"polite"}:{}),inputClasses:[m("textfield")],inputBehaviours:za([(i=n,u=t,Ty.config({invalidClass:m("invalid"),notify:{onValidate:function(t){jo(t,qw,{type:i})},onValid:function(t){jo(t,Xw,{type:i,value:bl.getValue(t)})},onInvalid:function(t){jo(t,Yw,{type:i,value:bl.getValue(t)})}},validator:{validate:function(t){var n=bl.getValue(t),e=u(n)?ot.value(!0):ot.error(d("aria.input.invalid"));return vy(e)},validateOnLoad:!1}})),Dy.config({})]),onSetValue:function(t){Ty.isInvalid(t)&&Ty.run(t).get(Z)}})],s="hex"!==n?[ey.parts()["aria-descriptor"]({text:a})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:c.concat(s)}},v=function(t,n){var e=n.red,o=n.green,r=n.blue;bl.setValue(t,{red:e,green:o,blue:r})},b=Ug({dom:{tag:"div",classes:[m("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),y=function(t,n){b.getOpt(t).each(function(t){Di(t.element(),"background-color","#"+n.value)})};return Of({factory:function(){var e={red:ce(st.some(255)),green:ce(st.some(255)),blue:ce(st.some(255)),hex:ce(st.some("ffffff"))},o=function(t){return e[t].get()},i=function(t,n){e[t].set(n)},r=function(t){var n=t.red,e=t.green,o=t.blue;i("red",st.some(n)),i("green",st.some(e)),i("blue",st.some(o))},n=function(t,n){var e=n.event();"hex"!==e.type()?i(e.type(),st.none()):p(t)},u=function(r,t,n){var e=parseInt(n,10);i(t,st.some(e)),o("red").bind(function(e){return o("green").bind(function(n){return o("blue").map(function(t){return yv(e,n,t,1)})})}).each(function(t){var n,e,o=(n=r,e=mv(t),Gw.getField(n,"hex").each(function(t){Xm.isFocused(t)||bl.setValue(n,{hex:e.value})}),e);y(r,o)})},a=function(t,n){var e=n.event();"hex"===e.type()?function(t,n){g(t);var e=av(n);i("hex",st.some(n));var o=Sv(e);v(t,o),r(o),jo(t,ix,{hex:e}),y(t,e)}(t,e.value()):u(t,e.type(),e.value())},t=function(t){return{label:d(Kw+t+".label"),description:d(Kw+t+".description")}},c=t("red"),s=t("green"),l=t("blue"),f=t("hex");return Ct(Gw.sketch(function(t){return{dom:{tag:"form",classes:[m("rgb-form")],attributes:{"aria-label":d("aria.color.picker")}},components:[t.field("red",ey.sketch(h(xv,"red",c.label,c.description,255))),t.field("green",ey.sketch(h(xv,"green",s.label,s.description,255))),t.field("blue",ey.sketch(h(xv,"blue",l.label,l.description,255))),t.field("hex",ey.sketch(h(lv,"hex",f.label,f.description,"ffffff"))),b.asSpec()],formBehaviours:za([Ty.config({invalidClass:m("form-invalid")}),Lm("rgb-form-events",[Jo(Xw,a),Jo(Yw,n),Jo(qw,n)])])}}),{apis:{updateHex:function(t,n){var e,o;bl.setValue(t,{hex:n.value}),e=t,o=Sv(n),v(e,o),r(o),y(t,n)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,n,e){t.updateHex(n,e)}},extraApis:{}})},$w=function(t,o){var r=Lw.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[o("sv-palette-spectrum")]}}),i=Lw.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette-thumb")],innerHtml:"'}}),u=function(t,n){var e=t.width,o=t.height,r=t.getContext("2d");if(null!==r){r.fillStyle=n,r.fillRect(0,0,e,o);var i=r.createLinearGradient(0,0,e,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,e,o);var u=r.createLinearGradient(0,0,0,o);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=u,r.fillRect(0,0,e,o)}};return Of({factory:function(t){var n=at({x:at(0),y:at(0)}),e=za([Mf.config({find:st.some}),Xm.config({})]);return Lw.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette")]},model:{mode:"xy",getInitialValue:n},rounded:!1,components:[r,i],onChange:function(t,n,e){jo(t,ax,{value:e})},onInit:function(t,n,e,o){u(e.element().dom(),Cv(Ov))},sliderBehaviours:e})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(t,n,e){var o,r;o=e,r=n.components()[0].element().dom(),u(r,Cv(o))}},extraApis:{}})},Qw=function(f,d){return Of({name:"ColourPicker",configFields:[zn("dom"),Zn("onValidHex",Z),Zn("onInvalidHex",Z)],factory:function(t){var a,v,n,e,o,r=Jw(f,d,t.onValidHex,t.onInvalidHex),i=$w(0,d),b={paletteRgba:ce(Ov)},u=Ug(i.sketch({})),c=Ug(r.sketch({})),s=function(t,e){u.getOpt(t).each(function(t){var n=Sv(e);b.paletteRgba.set(n),i.setRgba(t,n)})},l=function(t,n){c.getOpt(t).each(function(t){r.updateHex(t,n)})},y=function(n,e,t){it(t,function(t){t(n,e)})};return{uid:t.uid,dom:t.dom,components:[u.asSpec(),(n=d,e=Lw.parts().spectrum({dom:{tag:"div",classes:[n("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=Lw.parts().thumb({dom:{tag:"div",classes:[n("hue-slider-thumb")],attributes:{role:"presentation"}}}),Lw.sketch({dom:{tag:"div",classes:[n("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:at({y:at(0)})},components:[e,o],sliderBehaviours:za([Xm.config({})]),onChange:function(t,n,e){jo(t,ux,{value:e})}})),c.asSpec()],behaviours:za([Lm("colour-picker-events",[Jo(ax,(v=[l],function(t,n){var e,o,r,i,u,a,c,s,l,f=n.event().value(),d=b.paletteRgba.get(),m=(i=r=0,u=(e=d).red/255,a=e.green/255,c=e.blue/255,s=Math.min(u,Math.min(a,c)),l=Math.max(u,Math.max(a,c)),s===l?rx(0,0,100*(i=s)):(r=60*((r=u===s?3:c===s?1:5)-(u===s?a-c:c===s?u-a:c-u)/(l-s)),o=(l-s)/l,i=l,rx(Math.round(r),Math.round(100*o),Math.round(100*i)))),g=rx(m.hue,f.x(),100-f.y()),p=wv(g),h=mv(p);y(t,h,v)})),Jo(ux,(a=[s,l],function(t,n){var e,o,r,i=n.event().value(),u=(e=i.y(),o=rx((100-e)/100*360,100,100),r=wv(o),mv(r));y(t,u,a)}))]),Mf.config({find:function(t){return c.getOpt(t)}}),Rm.config({mode:"acyclic"})])}}})},Zw=function(){return Mf.config({find:st.some})},tS=function(t){return Mf.config({find:t.getOpt})},nS=function(t){return Mf.config({find:function(n){return mr(n.element(),t).bind(function(t){return n.getSystem().getByDom(t).toOption()})}})},eS={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},oS=function(t){return eS[t]},rS=tinymce.util.Tools.resolve("tinymce.Resource"),iS=ln([Zn("preprocess",ct),Zn("postprocess",ct)]),uS=function(t,n,e){return bl.config(Ct({store:{mode:"manual",getValue:n,setValue:e}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))},aS=function(t,n,e){return uS(t,function(t){return n(t.element())},function(t,n){return e(t.element(),n)})},cS=function(r,t){var i=_n("RepresentingConfigs.memento processors",iS,t);return bl.config({store:{mode:"manual",getValue:function(t){var n=r.get(t),e=bl.getValue(n);return i.postprocess(e)},setValue:function(t,n){var e=i.preprocess(n),o=r.get(t);bl.setValue(o,e)}}})},sS=uS,lS=function(t){return aS(t,Sr,kr)},fS=function(t){return bl.config({store:{mode:"memory",initialValue:t}})},dS=function(r,n){var e=function(t,n){n.stop()},o=function(t){return function(n,e){it(t,function(t){t(n,e)})}},i=function(t,n){if(!ph.isDisabled(t)){var e=n.event().raw();a(t,e.dataTransfer.files)}},u=function(t,n){var e=n.event().raw().target.files;a(t,e)},a=function(t,n){var e,o;bl.setValue(t,(e=n,o=new RegExp("("+".jpg,.jpeg,.png,.gif".split(/\s*,\s*/).join("|")+")$","i"),P($(e),function(t){return o.test(t.name)}))),jo(t,Gb,{name:r.name})},c=Ug({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:za([Lm("input-file-events",[nr(fo()),nr(So())])])}),t=r.label.map(function(t){return Iy(t,n)}),s=ey.parts().field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:za([fS([]),Zw(),ph.config({}),rg.config({toggleClass:"dragenter",toggleOnExecute:!1}),Lm("dropzone-events",[Jo("dragenter",o([e,rg.toggle])),Jo("dragleave",o([e,rg.toggle])),Jo("dragover",e),Jo("drop",o([e,i])),Jo(lo(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:n.translate("Drop an image here")}},jg.sketch({dom:{tag:"button",innerHtml:n.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[c.asSpec()],action:function(t){c.get(t).element().dom().click()},buttonBehaviours:za([Dy.config({}),Gh(n.isReadOnly),Uh()])})]}]}}}});return My(t,s,["tox-form__group--stretched"],[])},mS=Nr("alloy-fake-before-tabstop"),gS=Nr("alloy-fake-after-tabstop"),pS=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:za([Xm.config({ignore:!0}),Dy.config({})])}},hS=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[pS([mS]),t,pS([gS])],behaviours:za([nS(1)])}},vS=function(t,n){jo(t,ao(),{raw:{which:9,shiftKey:n}})},bS=function(t,n){var e=n.element();wi(e,mS)?vS(t,!0):wi(e,gS)&&vS(t,!1)},yS=function(t){return Sb(t,["."+mS,"."+gS].join(","),at(!1))},xS=!(Pe().browser.isIE()||Pe().browser.isEdge()),wS=function(t,n){var o,r,e=xS&&t.sandboxed,i=et(et({},t.label.map(function(t){return{title:t}}).getOr({})),e?{sandbox:"allow-scripts allow-same-origin"}:{}),u=(o=e,r=ce(""),{getValue:function(t){return r.get()},setValue:function(t,n){if(o)Br(t.element(),"srcdoc",n);else{Br(t.element(),"src","javascript:''");var e=t.element().dom().contentWindow.document;e.open(),e.write(n),e.close()}r.set(n)}}),a=t.label.map(function(t){return Iy(t,n)}),c=ey.parts().field({factory:{sketch:function(t){return hS({uid:t.uid,dom:{tag:"iframe",attributes:i},behaviours:za([Dy.config({}),Xm.config({}),sS(st.none(),u.getValue,u.setValue)])})}}});return My(a,c,["tox-form__group--stretched"],[])};function SS(t,n){return OS(nt.document.createElement("canvas"),t,n)}function kS(t){var n=SS(t.width,t.height);return CS(n).drawImage(t,0,0),n}function CS(t){return t.getContext("2d")}function OS(t,n,e){return t.width=n,t.height=e,t}function _S(t){return t.naturalWidth||t.width}function TS(t){return t.naturalHeight||t.height}var ES,BS,DS,MS=window.Promise?window.Promise:(BS=(ES=function(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=[],PS(t,AS(IS,this),AS(RS,this))}).immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){nt.setTimeout(t,1)},DS=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},ES.prototype["catch"]=function(t){return this.then(null,t)},ES.prototype.then=function(e,o){var r=this;return new ES(function(t,n){FS.call(r,new HS(e,o,t,n))})},ES.all=function(){for(var t=[],n=0;n
").css({position:"absolute",top:0,left:0,width:o.width,height:o.height,zIndex:2147483647,opacity:1e-4,cursor:e}).appendTo(d.body),oC(d).on("mousemove touchmove",c).on("mouseup touchend",a),r.start(t)},c=function(t){if(cC(t),t.button!==u)return a(t);t.deltaX=t.screenX-l,t.deltaY=t.screenY-f,t.preventDefault(),r.drag(t)},a=function(t){cC(t),oC(d).off("mousemove touchmove",c).off("mouseup touchend",a),i.remove(),r.stop&&r.stop(t)},this.destroy=function(){oC(m).off()},oC(m).on("mousedown touchstart",n)}var lC=0,fC=function(s,e,l,o,r){var f,n,i,u="tox-",a="tox-crid-"+lC++,c=[{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"}];i=["top","right","bottom","left"];var d=function(t,n){return{x:n.x+t.x,y:n.y+t.y,w:n.w,h:n.h}},m=function(t,n){return{x:n.x-t.x,y:n.y-t.y,w:n.w,h:n.h}};function g(t,n,e,o){var r,i,u,a,c;r=n.x,i=n.y,u=n.w,a=n.h,r+=e*t.deltaX,i+=o*t.deltaY,(u+=e*t.deltaW)<20&&(u=20),(a+=o*t.deltaH)<20&&(a=20),c=s=rC.clamp({x:r,y:i,w:u,h:a},l,"move"===t.name),c=m(l,c),f.fire("updateRect",{rect:c}),v(c)}function p(n){function t(t,n){n.h<0&&(n.h=0),n.w<0&&(n.w=0),oC("#"+a+"-"+t,o).css({left:n.x,top:n.y,width:n.w,height:n.h})}uC.each(c,function(t){oC("#"+a+"-"+t.name,o).css({left:n.w*t.xMul+n.x,top:n.h*t.yMul+n.y})}),t("top",{x:e.x,y:e.y,w:e.w,h:n.y-e.y}),t("right",{x:n.x+n.w,y:n.y,w:e.w-n.x-n.w+e.x,h:n.h}),t("bottom",{x:e.x,y:n.y+n.h,w:e.w,h:e.h-n.y-n.h+e.y}),t("left",{x:e.x,y:n.y,w:n.x-e.x,h:n.h}),t("move",n)}function h(t){p(s=t)}function v(t){h(d(l,t))}return function b(){oC('
').appendTo(o),uC.each(i,function(t){oC("#"+a,o).append('
":/^(UL|OL)$/.test(n.nodeName)&&(r="
  • "+a+"
  • "),r=(i=Hs(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||'
    ',zm(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=hf({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=Or(Ne.fromDom(n))?r:hr.trim(r),zm(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},Hm=function(e,t){return e.splitText(t)},Vm=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&Zt(t)?0
    ").append(n.childNodes)}))},dp[Nf="pre"]||(dp[Nf]=[]),dp[Nf].push(Ef);var gp,hp,vp=/^(src|href|style)$/,yp=hr.each,bp=wl,Cp=function(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)},wp=function(e,t,n){var r,o;if(r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],$t(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[i=r.nodeValue.length&&(r=new ra(r,e.getBody()).next()||r),Zt(r)&&!n&&0===o&&(r=new ra(r,e.getBody()).prev()||r),r},xp=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},Sp=function(e,t,n,r,o){var i=Ne.fromDom(t),a=Ne.fromDom(e.create(r,o)),u=(n?gt:pt)(i);return Nt(a,u),n?(Ct(i,a),xt(a,i)):(wt(i,a),St(a,i)),a.dom()},Np=function(e,t,n,r){return!(t=hl(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},Ep=function(e,r,o,t,i){var n,a,u,s,c,l=e.dom;if(u=l,!(bp(s=t,(c=r).inline)||bp(s,c.block)||c.selector&&($t(s)&&u.is(s,c.selector))||(a=t,r.links&&"A"===a.nodeName)))return!1;var f,d,m,p,g,h,v,y=t;if(r.inline&&"all"===r.remove&&k(r.preserve_attributes)){var b=H(l.getAttribs(y),function(e){return M(r.preserve_attributes,e.name.toLowerCase())});if(l.removeAllAttribs(y),z(b,function(e){return l.setAttrib(y,e.name,e.value)}),0e?t.cells().length:e},0)},qp=function(e,t){for(var n,r=e.rows(),o=0;o")?{type:"fragmented",fragments:r,content:"",bookmark:null,beforeBookmark:null}:{type:"complete",fragments:null,content:t,bookmark:null,beforeBookmark:null}},ug=function(e,t,n){"fragmented"===t.type?og(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},sg=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},cg=function(e){var t=Ne.fromTag("body",ig.get().getOrThunk(function(){var e=V.document.implementation.createHTMLDocument("undo");return ig.set(R.some(e)),e}));return nu(t,sg(e)),z(Ua(t,"*[data-mce-bogus]"),_t),t.dom().innerHTML},lg=function(e,t){return!(!e||!t)&&(r=t,sg(e)===sg(r)||(n=t,cg(e)===cg(n)));var n,r},fg=function(e){return 0===e.get()},dg=function(e,t,n){fg(n)&&(e.typing=t)},mg=function(e,t){e.typing&&(dg(e,!1,t),e.add())},pg=function(e){return e instanceof df},gg=function(e,t){Fm(e.serializer.getNodeFilters(),e.serializer.getAttributeFilters(),t)},hg=function(){return{type:"complete",fragments:[],content:"",bookmark:null,beforeBookmark:null}},vg=function(s){return{undoManager:{beforeChange:function(e,t){return n=s,r=t,void(fg(e)&&r.set(R.some(Ls(n.selection))));var n,r},addUndoLevel:function(e,t,n,r,o,i){return function(e,t,n,r,o,i,a){var u=e.settings,s=ag(e);if(i=i||{},i=hr.extend(i,s),!1===fg(r)||e.removed)return null;var c=t.data[n.get()];if(e.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&lg(c,i))return null;if(t.data[n.get()]&&o.get().each(function(e){t.data[n.get()].beforeBookmark=e}),u.custom_undo_redo_levels&&t.data.length>u.custom_undo_redo_levels){for(var l=0;l",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:u.convertURL,url_converter_scope:u},pe(pe({},s),a?Lg:{}));return jg(Og||Bg,Og,c,r,o)},Vg=function(e,t,n){return R.from(t.settings[n]).filter(e)},qg=function(e,t,n,r){var o,i,a,u=t in e.settings?e.settings[t]:n;return"hash"===r?(a={},"string"==typeof(i=u)?z(0\ufeff');return Ct(n.element,r),hh(r,function(){return kt(r)})},yh=function(n,r,o,i){xh(n,function(e,t){return Ch(n,r,o,i)},o)},bh=function(e,t,n,r,o){var i,a,u={elm:r.element.dom(),alignToTop:o};i=u,e.fire("ScrollIntoView",i).isDefaultPrevented()||(n(t,Ft(t).top(),r,o),a=u,e.fire("AfterScrollIntoView",a))},Ch=function(e,t,n,r){var o=Ne.fromDom(e.getBody()),i=Ne.fromDom(e.getDoc());o.dom().offsetWidth;var a=vh(Ne.fromDom(n.startContainer),n.startOffset);bh(e,i,t,a,r),a.cleanup()},wh=function(e,t,n,r){var o,i=Ne.fromDom(e.getDoc());bh(e,i,n,(o=t,hh(Ne.fromDom(o),f)),r)},xh=function(e,t,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;t(Ne.fromDom(r),Ne.fromDom(i));var u=e.dom.createRng();u.setStart(r,o),u.setEnd(i,a),e.selection.setRng(n)},Sh=function(e,t,n,r){var o=e.pos;if(n)Ut(o.left(),o.top(),r);else{var i=o.top()-t+e.height;Ut(o.left(),i,r)}},Nh=function(e,t,n,r,o){var i=n+t,a=r.pos.top(),u=r.bottom,s=n<=u-a;if(aa.bottom&&zt(n.element,!0===r)},_h=function(e,t,n){return yh(e,Eh,t,n)},Rh=function(e,t,n){return wh(e,t,Eh,n)},Th=function(e,t,n){return yh(e,kh,t,n)},Ah=function(e,t,n){return wh(e,t,kh,n)},Dh=function(e,t,n){(e.inline?_h:Th)(e,t,n)},Oh=function(e){return on(e)||an(e)},Bh=function(e,t,n){var r,o,i,a,u,s=n;if(s.caretPositionFromPoint)(o=s.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(s.body.createTextRange){r=s.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(c){r=function(e,n,t){var r,o,i;if(r=t.elementFromPoint(e,n),o=t.body.createTextRange(),r&&"HTML"!==r.tagName||(r=t.body),o.moveToElementText(r),0<(i=(i=hr.toArray(o.getClientRects())).sort(function(e,t){return(e=Math.abs(Math.max(e.top-n,e.bottom-n)))-(t=Math.abs(Math.max(t.top-n,t.bottom-n)))})).length){n=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,n),o.collapse(!0),o}catch(a){}}return null}(e,t,n)}return i=r,a=n.body,u=i&&i.parentElement?i.parentElement():null,an(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(u,a,Oh))?null:i}return r},Ph=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return R.from(i).map(Ne.fromDom).map(function(e){return r&&t.collapsed?e:vt(e,o(e,a)).getOr(e)}).bind(function(e){return Dt(e)?R.some(e):ft(e).filter(Dt)}).map(function(e){return e.dom()}).getOr(e)},Lh=function(e,t,n){return Ph(e,t,!0,n,function(e,t){return Math.min(e.dom().childNodes.length,t)})},Ih=function(e,t,n){return Ph(e,t,!1,n,function(e,t){return 0o.childNodes.length-1&&(s=!1),tn(o)&&(o=m,i=0),o===m){if(s&&(a=o.childNodes[0R(n)?(x=T(w*b),w=T(x/b)):(w=T(x/b),x=T(w*b))),P(l,w,x),r=0<(r=d.startPos.x+t)?r:0,o=0<(o=d.startPos.y+n)?o:0,E.setStyles(f,{left:r,top:o,display:"block"}),f.innerHTML=w+" × "+x,d[2]<0&&l.clientWidth<=w&&E.setStyle(l,"left",g+(v-w)),d[3]<0&&l.clientHeight<=x&&E.setStyle(l,"top",h+(y-x)),(t=A.scrollWidth-S)+(n=A.scrollHeight-N)!==0&&E.setStyles(f,{left:r-t,top:o-n}),C||(i=c,a=v,u=y,s.fire("ObjectResizeStart",{target:i,width:a,height:u}),C=!0)},I=function(){var e=C;C=!1;var t,n,r,o=function(e,t){t&&(c.style[e]||!s.schema.isValid(c.nodeName.toLowerCase(),e)?E.setStyle(O(c),e,t):E.setAttrib(O(c),e,""+t))};e&&(o("width",w),o("height",x)),E.unbind(k,"mousemove",L),E.unbind(k,"mouseup",I),_!==k&&(E.unbind(_,"mousemove",L),E.unbind(_,"mouseup",I)),E.remove(l),E.remove(f),i(c),e&&(t=c,n=w,r=x,s.fire("ObjectResized",{target:t,width:n,height:r}),E.setAttrib(c,"style",E.getAttrib(c,"style"))),s.nodeChanged()},i=function(e){var t,r,o,n,i;M(),U(),t=E.getPos(e,A),g=t.x,h=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,c!==e&&(c=e,w=x=0),n=s.fire("ObjectSelected",{target:e}),B(e)&&!n.isDefaultPrevented()?u(a,function(n,e){var t;(t=E.get("mceResizeHandle"+e))&&E.remove(t),t=E.add(A,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===rr.ie&&(t.contentEditable=!1),E.bind(t,"mousedown",function(e){var t;e.stopImmediatePropagation(),e.preventDefault(),m=(t=e).screenX,p=t.screenY,v=O(c).clientWidth,y=O(c).clientHeight,b=y/v,(d=n).startPos={x:r*n[0]+g,y:o*n[1]+h},S=A.scrollWidth,N=A.scrollHeight,l=c.cloneNode(!0),E.addClass(l,"mce-clonedresizable"),E.setAttrib(l,"data-mce-bogus","all"),l.contentEditable=!1,l.unSelectabe=!0,E.setStyles(l,{left:g,top:h,margin:0}),P(l,r,o),l.removeAttribute("data-mce-selected"),A.appendChild(l),E.bind(k,"mousemove",L),E.bind(k,"mouseup",I),_!==k&&(E.bind(_,"mousemove",L),E.bind(_,"mouseup",I)),f=E.add(A,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},v+" × "+y)}),n.elm=t,E.setStyles(t,{left:r*n[0]+g-t.offsetWidth/2,top:o*n[1]+h-t.offsetHeight/2})}):M(),c.setAttribute("data-mce-selected","1")},M=function(){U(),c&&c.removeAttribute("data-mce-selected"),oe(a,function(e,t){var n=E.get("mceResizeHandle"+t);n&&(E.unbind(n),E.remove(n))})},o=function(e){var t,n=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};C||s.removed||(u(E.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),t="mousedown"===e.type?e.target:r.getNode(),n(t=E.$(t).closest("table,img,figure.image,hr")[0],A)&&(z(),n(r.getStart(!0),t)&&n(r.getEnd(!0),t))?i(t):M())},F=function(e){return ev(function(e,t){for(;t&&t!==e;){if(tv(t)||ev(t))return t;t=t.parentNode}return null}(s.getBody(),e))},U=function(){oe(a,function(e){e.elm&&(E.unbind(e.elm),delete e.elm)})},z=function(){try{s.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};s.on("init",function(){if(z(),rr.browser.isIE()||rr.browser.isEdge()){s.on("mousedown click",function(e){var t=e.target,n=t.nodeName;C||!/^(TABLE|IMG|HR)$/.test(n)||F(t)||(2!==e.button&&s.selection.select(t,"TABLE"===n),"mousedown"===e.type&&s.nodeChanged())});var e=function(e){var t=function(e){Xn.setEditorTimeout(s,function(){return s.selection.select(e)})};if(F(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target))};E.bind(A,"mscontrolselect",e),s.on("remove",function(){return E.unbind(A,"mscontrolselect",e)})}var t=Xn.throttle(function(e){s.composing||o(e)});s.on("nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged",t),s.on("keyup compositionend",function(e){c&&"TABLE"===c.nodeName&&t(e)}),s.on("hide blur",M),s.on("contextmenu longpress",n,!0)}),s.on("remove",U);return{isResizable:B,showResizeRect:i,hideResizeRect:M,updateResizeRect:o,destroy:function(){c=l=null}}},rv=function(e,t,n){if(e&&e.hasOwnProperty(t)){var r=H(e[t],function(e){return e!==n});0===r.length?delete e[t]:e[t]=r}};var ov=function(e){return!!e.select},iv=function(e){return!(!e||!e.ownerDocument)&&st(Ne.fromDom(e.ownerDocument),Ne.fromDom(e))},av=function(u,s,e,c){var n,t,l,f,r=function h(i,n){var a,u;return{selectorChangedWithUnbind:function(e,t){return a||(a={},u={},n.on("NodeChange",function(e){var n=e.element,r=i.getParents(n,null,i.getRoot()),o={};hr.each(a,function(e,n){hr.each(r,function(t){if(i.is(t,n))return u[n]||(hr.each(e,function(e){e(!0,{node:t,selector:n,parents:r})}),u[n]=e),o[n]=e,!1})}),hr.each(u,function(e,t){o[t]||(delete u[t],hr.each(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),a[e]||(a[e]=[]),a[e].push(t),{unbind:function(){rv(a,e,t),rv(u,e,t)}}}}}(u,c).selectorChangedWithUnbind,o=function(e,t){return Yh(c,e,t)},i=function(e){var t=m();t.collapse(!!e),a(t)},d=function(){return s.getSelection?s.getSelection():s.document.selection},m=function(){var e,t,n,r,o=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}};if(!s)return null;if(null==(r=s.document))return null;if(c.bookmark!==undefined&&!1===Pm(c)){var i=wm(c);if(i.isSome())return i.map(function(e){return Fp(c,[e])[0]}).getOr(r.createRange())}try{(e=d())&&!qt(e.anchorNode)&&(t=0t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return r=e,o=t,void((n=c).inline?Rh:Ah)(n,r,o);var n,r,o},placeCaretAt:function(e,t){return a(Bh(e,t,c.getDoc()))},getBoundingClientRect:function(){var e=m();return e.collapsed?ms.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=l=f=null,t.destroy()}};return n=Jh(g),t=nv(g,c),g.bookmarkManager=n,g.controlSelection=t,g},uv=function(e,a,u){e.addNodeFilter("font",function(e){z(e,function(e){var t,n=a.parse(e.attr("style")),r=e.attr("color"),o=e.attr("face"),i=e.attr("size");r&&(n.color=r),o&&(n["font-family"]=o),i&&(n["font-size"]=u[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",a.serialize(n)),t=e,z(["color","face","size"],function(e){t.attr(e,null)})})})},sv=function(e,t){var n,r=ao();t.convert_fonts_to_spans&&uv(e,r,hr.explode(t.font_size_legacy_values)),n=r,e.addNodeFilter("strike",function(e){z(e,function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))})})},cv=function(e){var t,n,r=decodeURIComponent(e).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(t=n[1]),{type:t,data:r[1]}},lv=function(e,t){var n;try{n=V.atob(t)}catch(pE){return R.none()}for(var r=new Uint8Array(n.length),o=0;o)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===s.element_format&&0")):"xhtml"===s.element_format&&0)\s*/g,"$1"),hr.map(c.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=hr.map(e.split(/(?:~\+|~|\+)/),qv),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]).length?(i[0].name||(i[0].name=t),t=e.selector,Vv(i,n)):Vv([t],n),o=Hv.select(t,r)[0]||r.firstChild,jv(e.styles,function(e,t){(e=l(e))&&Hv.setStyle(o,t,e)}),jv(e.attributes,function(e,t){(e=l(e))&&Hv.setAttrib(o,t,e)}),jv(e.classes,function(e){e=l(e),Hv.hasClass(o,e)||Hv.addClass(o,e)}),n.fire("PreviewFormats"),Hv.setStyles(r,{position:"absolute",left:-65535}),n.getBody().appendChild(r),a=Hv.getStyle(n.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,jv(u.split(" "),function(e){var t=Hv.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=Hv.getStyle(n.getBody(),e,!0),"#ffffff"===Hv.toHex(t).toLowerCase())||"color"===e&&"#000000"===Hv.toHex(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===a)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*a+"px"}"border"===e&&t&&(s+="padding:0 2px;"),s+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),Hv.remove(r),s)},Wv=function(s){var e=Fv(s),t=xa(null);return function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])}(s),lp(s),{get:e.get,has:e.has,register:e.register,unregister:e.unregister,apply:function(e,t,n){var r,o,i;r=e,o=t,i=n,wg(s).formatter.apply(r,o,i)},remove:function(e,t,n,r){var o,i,a,u;o=e,i=t,a=n,u=r,wg(s).formatter.remove(o,i,a,u)},toggle:function(e,t,n){var r,o,i;r=e,o=t,i=n,wg(s).formatter.toggle(r,o,i)},match:N(Gm,s),matchAll:N(Jm,s),matchNode:N(Ym,s),canApply:N(Qm,s),formatChanged:N(Mv,s,t),getCssText:N($v,s)}},Kv=function(n,r,o){var i=xa(!1),a=function(e){dg(r,!1,o),r.add({},e)};n.on("init",function(){r.add()}),n.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(mg(r,o),r.beforeChange())}),n.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&a(e)}),n.on("ObjectResizeStart cut",function(){r.beforeChange()}),n.on("SaveContent ObjectResized blur",a),n.on("dragend",a),n.on("keyup",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(a(),n.nodeChanged()),46!==t&&8!==t||n.nodeChanged(),i.get()&&r.typing&&!1===lg(ag(n),r.data[0])&&(!1===n.isDirty()&&(n.setDirty(!0),n.fire("change",{level:r.data[0],lastLevel:null})),n.fire("TypingUndo"),i.set(!1),n.nodeChanged()))}),n.on("keydown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(33<=t&&t<=36||37<=t&&t<=40||45===t)r.typing&&a(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20t;var t}},ab=function(n){return function(e){return t=n,e.line===t;var t}},ub=an,sb=vc,cb=function(e,t){return Math.abs(e.left-t)},lb=function(e,t){return Math.abs(e.right-t)},fb=function(e,t){return e>=t.left&&e<=t.right},db=function(e,o){return cr(e,function(e,t){var n,r;return n=Math.min(cb(e,o),lb(e,o)),r=Math.min(cb(t,o),lb(t,o)),fb(o,t)||!fb(o,e)&&(r===n&&ub(t.node)||r=e.top&&n<=e.bottom});return(r=(r=db(f,t))&&db((a=e,c=function(t,e){var n;return n=H(Zy([e]),function(e){return!t(e,u)}),s=s.concat(n),0===n.length},(s=[]).push(u=r),mb(Uv.Up,a,N(c,Fu),u.node),mb(Uv.Down,a,N(c,Uu),u.node),s),t))&&cc(r.node)?(i=t,{node:(o=r).node,before:cb(o,i)'),o=a,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},Lb=function(l,f){return function(){var e,t,n,r,o,i,a,u,s,c=(t=f,r=Hc((e=l).getBody()),o=N(Tc,r.next),i=N(Tc,r.prev),a=t?fs.Forwards:fs.Backwards,u=t?o:i,s=e.selection.getRng(),(n=Ob(a,e,u,s))?n:(n=Pb(e,a,s))||null);return!!c&&(l.selection.setRng(c),!0)}},Ib=function(u,s){return function(){var e,t,n,r,o,i,a=(r=(t=s)?1:-1,o=t?ob:rb,i=(e=u).selection.getRng(),(n=Bb(r,e,o,i))?n:(n=Pb(e,r,i))||null);return!!a&&(u.selection.setRng(a),!0)}},Mb=function(r,o){return function(){var t,e=o?ms.fromRangeEnd(r.selection.getRng()):ms.fromRangeStart(r.selection.getRng()),n=(o?_b:kb)(r.getBody(),e);return(o?ee:Z)(n.positions).filter((t=o,function(e){return(t?qf:Vf)(e)})).fold(x(!1),function(e){return r.selection.setRng(e.toRange()),!0})}},Fb=function(o,e){return Y(e,function(e){var t,n,r=(t=Lu(e.getBoundingClientRect()),n=-1,{left:t.left-n,top:t.top-n,right:t.right+2*n,bottom:t.bottom+2*n,width:t.width+n,height:t.height+n});return[{x:r.left,y:o(r),cell:e},{x:r.right,y:o(r),cell:e}]})},Ub=function(e,t,n,r,o){var i,a,u=Ua(Ne.fromDom(n),"td,th,caption").map(function(e){return e.dom()}),s=H(Fb(e,u),function(e){return t(e,o)});return i=r,a=o,W(s,function(e,r){return e.fold(function(){return R.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-i)+Math.abs(e.y-a)),n=Math.sqrt(Math.abs(r.x-i)+Math.abs(r.y-a));return R.some(nt}),Hb=function(t,n){return Z(n.getClientRects()).bind(function(e){return zb(t,e.left,e.top)}).bind(function(e){return Eb(el(t=e).map(function(e){return kb(t,e).positions.concat(e)}).getOr([]),n);var t})},Vb=function(t,n){return ee(n.getClientRects()).bind(function(e){return jb(t,e.left,e.top)}).bind(function(e){return Eb(Zc(t=e).map(function(e){return[e].concat(_b(t,e).positions)}).getOr([]),n);var t})},qb=function(e,t){e.selection.setRng(t),Dh(e,t)},$b=function(e,t,n){var r,o,i,a,u=e(t,n);return(a=u).breakType===eb.Wrap&&0===a.positions.length||!rn(n.getNode())&&((i=u).breakType===eb.Br&&1===i.positions.length)?(r=e,o=t,!u.breakAt.map(function(e){return r(o,e).breakAt.isSome()}).getOr(!1)):u.breakAt.isNone()},Wb=N($b,kb),Kb=N($b,_b),Xb=function(e,t,n,r){var o,i,a,u,s=e.selection.getRng(),c=t?1:-1;if(sc()&&(o=t,i=s,a=n,u=ms.fromRangeStart(i),Gc(!o,a).map(function(e){return e.isEqual(u)}).getOr(!1))){var l=vb(c,e,n,!t,!0);return qb(e,l),!0}return!1},Yb=function(e,t){var n=t.getNode(e);return $t(n)&&"TABLE"===n.nodeName?R.some(n):R.none()},Gb=function(u,s,c){var e=Yb(!!s,c),t=!1===s;e.fold(function(){return qb(u,c.toRange())},function(a){return Gc(t,u.getBody()).filter(function(e){return e.isEqual(c)}).fold(function(){return qb(u,c.toRange())},function(e){return n=s,o=a,t=c,void((i=Hs(r=u))?r.undoManager.transact(function(){var e=Ne.fromTag(i);ln(e,Vs(r)),St(e,Ne.fromTag("br")),(n?wt:Ct)(Ne.fromDom(o),e);var t=r.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),qb(r,t)}):qb(r,t.toRange()));var n,r,o,t,i})})},Jb=function(e,t,n,r){var o,i,a,u,s,c,l=e.selection.getRng(),f=ms.fromRangeStart(l),d=e.getBody();if(!t&&Wb(r,f)){var m=(u=d,Hb(s=n,c=f).orThunk(function(){return Z(c.getClientRects()).bind(function(e){return Nb(Rb(u,ms.before(s)),e.left)})}).getOr(ms.before(s)));return Gb(e,t,m),!0}if(t&&Kb(r,f)){m=(o=d,Vb(i=n,a=f).orThunk(function(){return Z(a.getClientRects()).bind(function(e){return Nb(Tb(o,ms.after(i)),e.left)})}).getOr(ms.after(i)));return Gb(e,t,m),!0}return!1},Qb=function(t,n){return function(){return R.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(e){return R.from(t.dom.getParent(e,"table")).map(function(e){return Xb(t,n,e)})}).getOr(!1)}},Zb=function(n,r){return function(){return R.from(n.dom.getParent(n.selection.getNode(),"td,th")).bind(function(t){return R.from(n.dom.getParent(t,"table")).map(function(e){return Jb(n,r,e,t)})}).getOr(!1)}},eC=function(e){return M(["figcaption"],Rt(e))},tC=function(e){var t=V.document.createRange();return t.setStartBefore(e.dom()),t.setEndBefore(e.dom()),t},nC=function(e,t,n){(n?St:xt)(e,t)},rC=function(e,t,n,r){return""===t?(l=e,f=r,d=Ne.fromTag("br"),nC(l,d,f),tC(d)):(o=e,i=r,a=t,u=n,s=Ne.fromTag(a),c=Ne.fromTag("br"),ln(s,u),St(s,c),nC(o,s,i),tC(c));var o,i,a,u,s,c,l,f,d},oC=function(e,t,n){return t?(o=e.dom(),_b(o,n).breakAt.isNone()):(r=e.dom(),kb(r,n).breakAt.isNone());var r,o},iC=function(t,n){var e,r,o=Ne.fromDom(t.getBody()),i=ms.fromRangeStart(t.selection.getRng()),a=Hs(t),u=Vs(t);return e=i,r=N(at,o),Va(Ne.fromDom(e.container()),Sr,r).filter(eC).exists(function(){if(oC(o,n,i)){var e=rC(o,a,u,n);return t.selection.setRng(e),!0}return!1})},aC=function(e,t){return function(){return!!e.selection.isCollapsed()&&iC(e,t)}},uC=function(e,r){return Y(U(e,function(e){return pe({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:f},e)}),function(e){return t=e,(n=r).keyCode===t.keyCode&&n.shiftKey===t.shiftKey&&n.altKey===t.altKey&&n.ctrlKey===t.ctrlKey&&n.metaKey===t.metaKey?[e]:[];var t,n})},sC=function(e){for(var t=[],n=1;n'},kw=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},_w=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},Rw=function(e,t,n){return!1===Zt(t)?n:e?1===n&&t.data.charAt(n-1)===su?0:n:n===t.data.length-1&&t.data.charAt(n)===su?t.data.length:n},Tw=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},Aw=function(o,i,e){R.from(e.style).map(o.dom.parseStyle).each(function(e){var t=function(e){var t={},n=e.dom();if(un(n))for(var r=0;rs.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=p&&Zt(s)?s.nodeValue.length:0),(u=Tw(g,s))&&((m&&!n||!m&&n)&&(s=function(e,t,n,r,o){var i,a,u,s,c,l,f,d=t||"P",m=e.dom,p=Tw(m,r);if(!(a=m.getParent(r,m.isBlock))||!_w(m,a)){if(l=(a=a||p)===e.getBody()||(f=a)&&/^(TD|TH|CAPTION)$/.test(f.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=m.create(d),Dw(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!m.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(l,d.toLowerCase())){for(i=m.create(d),Dw(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!m.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,m,y,s,i)),c=g.getParent(s,g.isBlock),l=c?g.getParent(c.parentNode,g.isBlock):null,f=c?c.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||R||(l=(c=l).parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&g.isEmpty(c)?Nw(a,b,l,c,m):m&&c===a.getBody()||(m=m||"P",mu(c)?(r=xu(c),g.isEmpty(c)&&Ew(c),Dw(a,r),yw(a,r)):C()?w():C(!0)?(r=c.parentNode.insertBefore(b(),c),yw(a,kw(c,"HR")?r:c)):((_=(k=y).cloneRange()).setStart(k.startContainer,Rw(!0,k.startContainer,k.startOffset)),_.setEnd(k.endContainer,Rw(!1,k.endContainer,k.endOffset)),(t=_.cloneRange()).setEndAfter(c),o=t.extractContents(),E=o,z(Fa(Ne.fromDom(E),Ot),function(e){var t=e.dom();t.nodeValue=lu(t.nodeValue)}),function(e){for(;Zt(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(o),r=o.firstChild,g.insertAfter(o,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;$t(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=e,(u=o)&&"A"===u.nodeName&&a.isEmpty(u)&&e.remove(o));var a,u}}(g,v,r),x=g,(S=c).normalize(),(N=S.lastChild)&&!/^(left|right)$/gi.test(x.getStyle(N,"float",!0))||x.add(S,"br"),g.isEmpty(c)&&Ew(c),r.normalize(),g.isEmpty(r)?(g.remove(r),w()):(Dw(a,r),yw(a,r))),g.setAttrib(r,"id",""),a.fire("NewBlock",{newBlock:r})))},Bw=function(e,t,n){var r=e.create("span",{}," ");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},Pw=function(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)},Lw=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();Wh(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u=a.startOffset,s=a.startContainer;if(1===s.nodeType&&s.hasChildNodes()){var c=u>s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=!(!t||!t.ctrlKey);"LI"!==d||m||(l=f),s&&3===s.nodeType&&u>=s.nodeValue.length&&!function(e,t,n){for(var r,o=new ra(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0i&&(u=n.pageX+r-i),n.pageY+o>a&&(s=n.pageY+o-a),t.style.width=r-u+"px",t.style.height=o-s+"px",v(e.clientX,e.clientY)}}},jx=function(l,f){return function(e){if(l.dragging&&(s=(i=f).selection,c=s.getSel().getRangeAt(0).startContainer,a=3===c.nodeType?c.parentNode:c,u=l.element,a!==u&&!i.dom.isChildOf(a,u)&&!Ix(a))){var t=(r=l.element,(o=r.cloneNode(!0)).removeAttribute("data-mce-selected"),o),n=f.fire("drop",{targetClone:t,clientX:e.clientX,clientY:e.clientY});n.isDefaultPrevented()||(t=n.targetClone,f.undoManager.transact(function(){Fx(l.element),f.insertContent(f.dom.getOuterHTML(t)),f._selectionOverrides.hideFakeCaret()}))}var r,o,i,a,u,s,c;Hx(l)}},Hx=function(e){e.dragging=!1,e.element=null,Fx(e.ghost)},Vx=function(e){var t,n,r,o,i,a,u,s,c={};t=ga.DOM,a=V.document,n=Ux(c,e),r=zx(c,e),o=jx(c,e),u=c,i=function(){u.dragging&&s.fire("dragend"),Hx(u)},(s=e).on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})},qx=function(e){var n;Vx(e),(n=e).on("drop",function(e){var t="undefined"!=typeof e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Ix(t)||Ix(n.dom.getContentEditableParent(t)))&&e.preventDefault()})},$x=on,Wx=an,Kx=function(e,t){for(var n=e.getBody();t&&t!==n;){if($x(t)||Wx(t))return t;t=t.parentNode}return null},Xx=function(g){var h,v=g.getBody(),o=uc(g,v,function(e){return g.dom.isBlock(e)},function(){return Pm(g)}),y="sel-"+g.dom.uniqueId(),a=function(e){e&&g.selection.setRng(e)},r=function(){return g.selection.getRng()},b=function(e,t,n,r){return void 0===r&&(r=!0),g.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&g.selection.scrollIntoView(t,-1===e),o.show(n,t))},t=function(e){return gu(e)||Cu(e)||wu(e)},C=function(e){return t(e.startContainer)||t(e.endContainer)},u=function(e){var t=g.schema.getShortEndedElements(),n=g.dom.createRng(),r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset;return me(t,r.nodeName.toLowerCase())?0===o?n.setStartBefore(r):n.setStartAfter(r):n.setStart(r,o),me(t,i.nodeName.toLowerCase())?0===a?n.setEndBefore(i):n.setEndAfter(i):n.setEnd(i,a),n},s=function(e,t){var n,r,o,i,a,u,s,c,l,f,d=g.$,m=g.dom;if(!e)return null;if(e.collapsed){if(!C(e))if(!1===t){if(c=_c(-1,v,e),cc(c.getNode(!0)))return b(-1,c.getNode(!0),!1,!1);if(cc(c.getNode()))return b(-1,c.getNode(),!c.isAtEnd(),!1)}else{if(c=_c(1,v,e),cc(c.getNode()))return b(1,c.getNode(),!c.isAtEnd(),!1);if(cc(c.getNode(!0)))return b(1,c.getNode(!0),!1,!1)}return null}if(i=e.startContainer,a=e.startOffset,u=e.endOffset,3===i.nodeType&&0===a&&Wx(i.parentNode)&&(i=i.parentNode,a=m.nodeIndex(i),i=i.parentNode),1!==i.nodeType)return null;if(u===a+1&&i===e.endContainer&&(n=i.childNodes[a]),!Wx(n))return null;if(l=f=n.cloneNode(!0),(s=g.fire("ObjectSelected",{target:n,targetClone:l})).isDefaultPrevented())return null;r=$a(Ne.fromDom(g.getBody()),"#"+y).fold(function(){return d([])},function(e){return d([e.dom()])}),l=s.targetClone,0===r.length&&(r=d('
    ').attr("id",y)).appendTo(g.getBody()),e=g.dom.createRng(),l===f&&rr.ie?(r.empty().append('

    \xa0

    ').append(l),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(l)):(r.empty().append(oo).append(l).append(oo),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:m.getPos(n,g.getBody()).y}),r[0].focus(),(o=g.selection.getSel()).removeAllRanges(),o.addRange(e);var p=Ne.fromDom(n);return z(Ua(Ne.fromDom(g.getBody()),"*[data-mce-selected]"),function(e){at(p,e)||dn(e,"data-mce-selected")}),g.dom.getAttrib(n,"data-mce-selected")||n.setAttribute("data-mce-selected","1"),h=n,w(),e},c=function(){h&&(h.removeAttribute("data-mce-selected"),$a(Ne.fromDom(g.getBody()),"#"+y).each(kt),h=null),$a(Ne.fromDom(g.getBody()),"#"+y).each(kt),h=null},w=function(){o.hide()};return rr.ceFalse&&function(){g.on("mouseup",function(e){var t=r();t.collapsed&&Qg(g,e.clientX,e.clientY)&&a(bb(g,t,!1))}),g.on("click",function(e){var t;(t=Kx(g,e.target))&&(Wx(t)&&(e.preventDefault(),g.focus()),$x(t)&&g.dom.isChildOf(t,g.selection.getNode())&&c())}),g.on("blur NewBlock",function(){c()}),g.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n,i=function(e,t){var n,r,o=g.dom.getParent(e,g.dom.isBlock),i=g.dom.getParent(t,g.dom.isBlock);return!(!o||!g.dom.isChildOf(o,i)||!1!==Wx(Kx(g,o)))||o&&(n=o,r=i,!(g.dom.getParent(n,g.dom.isBlock)===g.dom.getParent(r,g.dom.isBlock)))&&function(e){var t=Hc(e);if(!e.firstChild)return!1;var n=ms.before(e.firstChild),r=t.next(n);return r&&!Vf(r)&&!qf(r)}(o)};(n=g).on("tap",function(e){var t=Kx(n,e.target);Wx(t)&&(e.preventDefault(),s(yb(n,t)))},!0),g.on("mousedown",function(e){var t,n=e.target;if((n===v||"HTML"===n.nodeName||g.dom.isChildOf(n,v))&&!1!==Qg(g,e.clientX,e.clientY))if(t=Kx(g,n))Wx(t)?(e.preventDefault(),s(yb(g,t))):(c(),$x(t)&&e.shiftKey||Qh(e.clientX,e.clientY,g.selection.getRng())||(w(),g.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===cc(n)){c(),w();var r=pb(v,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=b(1,r.node,r.before,!1);g.getBody().focus(),a(o)}}}),g.on("keypress",function(e){Zh.modifierPressed(e)||(e.keyCode,Wx(g.selection.getNode())&&e.preventDefault())}),g.on("GetSelectionRange",function(e){var t=e.range;if(h){if(!h.parentNode)return void(h=null);(t=t.cloneRange()).selectNode(h),e.range=t}}),g.on("SetSelectionRange",function(e){e.range=u(e.range);var t=s(e.range,e.forward);t&&(e.range=t)});var t,e;g.on("AfterSetSelectionRange",function(e){var t,n=e.range;C(n)||"mcepastebin"===n.startContainer.parentNode.id||w(),t=n.startContainer.parentNode,g.dom.hasClass(t,"mce-offscreen-selection")||c()}),g.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!rr.ie){var r=(t=g.dom.get(y))?t.getElementsByTagName("*")[0]:t;r&&(e.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),qx(g),e=Ta(function(){if(!t.removed&&t.getBody().contains(V.document.activeElement)&&t.selection.getRng().collapsed){var e=Cb(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0),(t=g).on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})}(),{showCaret:b,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(xu(e),a(r()),g.selection.scrollIntoView(e))},hideFakeCaret:w,destroy:function(){o.destroy(),h=null}}},Yx=function(u){var s,n,r,o=hr.each,c=Zh.BACKSPACE,l=Zh.DELETE,f=u.dom,d=u.selection,e=u.settings,t=u.parser,i=rr.gecko,a=rr.ie,m=rr.webkit,p="data:text/mce-internal,",g=a?"Text":"URL",h=function(e,t){try{u.getDoc().execCommand(e,!1,t)}catch(n){}},v=function(e){return e.isDefaultPrevented()},y=function(){u.shortcuts.add("meta+a",null,"SelectAll")},b=function(){u.on("keydown",function(e){if(!v(e)&&e.keyCode===c&&d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},C=function(){u.inline||(u.contentStyles.push("body {min-height: 150px}"),u.on("click",function(e){var t;if("HTML"===e.target.nodeName){if(11")+"",e.getParam("document_base_url","")!==e.documentBaseUrl&&(r+=''),r+='',t=zs(e,"body_id","tinymce"),n=zs(e,"body_class",""),js(e)&&(r+=''),r+='
    '},iS=function(e,t){var n,r,o,i,a=e.editorManager.translate("Rich Text Area. Press ALT-0 for help."),u=(n=e.id,r=a,t.height,o=e.getParam("iframe_attrs",{}),i=Ne.fromTag("iframe"),ln(i,o),ln(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),La(i,"tox-edit-area__iframe"),i.dom());u.onload=function(){u.onload=null,e.fire("load")};var s=function(e,t){if(V.document.domain!==V.window.location.hostname&&rr.browser.isIE()){var n=Bv("mce");e[n]=function(){nS(e)};var r='javascript:(function(){document.open();document.domain="'+V.document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return rS.setAttrib(t,"src",r),!0}return!1}(e,u);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=u,e.iframeHTML=oS(e),rS.add(t.iframeContainer,u),s},aS=ga.DOM,uS=function(t,n,e){var r=th.get(e),o=th.urls[e]||t.documentBaseUrl.replace(/\/$/,"");if(e=hr.trim(e),r&&-1===hr.inArray(n,e)){if(hr.each(th.dependencies(e),function(e){uS(t,n,e)}),t.plugins[e])return;try{var i=new r(t,o,t.$);(t.plugins[e]=i).init&&(i.init(t,o),n.push(e))}catch(pE){!function(e,t,n){var r=ka.translate(["Failed to initialize plugin: {0}",t]);ch(r,n),ih(e,r)}(t,e,pE)}}},sS=function(e){return e.replace(/^\-/,"")},cS=function(e){return{editorContainer:e,iframeContainer:e}},lS=function(e){var t,n,r=e.getElement();return e.inline?cS(null):(t=r,n=aS.create("div"),aS.insertAfter(n,t),cS(n))},fS=function(e){var n,t,r,o,i,a;e.fire("ScriptsLoaded"),n=e,t=hr.trim($s(n)),r=n.ui.registry.getAll().icons,o=pe(pe({},$g.get("default").icons),$g.get(t).icons),oe(o,function(e,t){me(r,t)||n.ui.registry.addIcon(t,e)}),function(e){var t=e.settings.theme;if(q(t)){e.settings.theme=sS(t);var n=nh.get(t);e.theme=new n(e,nh.urls[t]),e.theme.init&&e.theme.init(e,nh.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}}(e),i=e,a=[],hr.each(i.settings.plugins.split(/[ ,]/),function(e){uS(i,a,sS(e))});var u,s,c,l,f,d,m,p,g,h=(f=(u=e).getElement(),u.orgDisplay=f.style.display,q(u.settings.theme)?u.theme.renderUI():D(u.settings.theme)?(c=(s=u).getElement(),(l=(0,s.settings.theme)(s,c)).editorContainer.nodeType&&(l.editorContainer.id=l.editorContainer.id||s.id+"_parent"),l.iframeContainer&&l.iframeContainer.nodeType&&(l.iframeContainer.id=l.iframeContainer.id||s.id+"_iframecontainer"),l.height=l.iframeHeight?l.iframeHeight:c.offsetHeight,l):lS(u));return e.editorContainer=h.editorContainer?h.editorContainer:null,(d=e).contentCSS=d.contentCSS.concat(lh(d)),e.inline?nS(e):(g=iS(m=e,p=h),p.editorContainer&&(rS.get(p.editorContainer).style.display=m.orgDisplay,m.hidden=rS.isHidden(p.editorContainer)),m.getElement().style.display="none",rS.setAttrib(m.id,"aria-hidden","true"),void(g||nS(m)))},dS=ga.DOM,mS=function(e){return"-"===e.charAt(0)},pS=function(e,t){var n=Ws(t),r=t.getParam("language_url","","string");if(!1===ka.hasCode(n)&&"en"!==n){var o=""!==r?r:t.editorManager.baseURL+"/langs/"+n+".js";e.add(o,f,undefined,function(){ah(t,"LanguageLoadError",uh("language",o,n))})}},gS=function(t,e,n){return R.from(e).filter(function(e){return 0")},mceToggleVisualAid:function(){i.hasVisual=!i.hasVisual,i.addVisual()},mceReplaceContent:function(e,t,n){i.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.selection.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=i.dom.getParent(i.selection.getNode(),"a"),n.href=n.href.replace(/ /g,"%20"),r&&n.href||i.formatter.remove("link"),n.href&&i.formatter.apply("link",n,r)},selectAll:function(){var e=i.dom.getParent(i.selection.getStart(),on);if(e){var t=i.dom.createRng();t.selectNodeContents(e),i.selection.setRng(t)}},"delete":function(){var e;hw(e=i)||qC(e,!1)||WC(e,!1)||GC(e,!1)||NC(e,!1)||Vd(e)||RC(e)||ew(e,!1)||(bS(e,"Delete"),dC(e))},forwardDelete:function(){var e;qC(e=i,!0)||WC(e,!0)||GC(e,!0)||NC(e,!0)||Vd(e)||RC(e)||ew(e,!0)||bS(e,"ForwardDelete")},mceNewDocument:function(){i.setContent("")},InsertLineBreak:function(e,t,n){return Hw(i,n),!0}});var e=function(n){return function(){var e=i.selection.isCollapsed()?[i.dom.getParent(i.selection.getNode(),i.dom.isBlock)]:i.selection.getSelectedBlocks(),t=OS(e,function(e){return!!i.formatter.matchNode(e,n)});return-1!==BS(t,!0)}};a.addCommands({JustifyLeft:e("alignleft"),JustifyCenter:e("aligncenter"),JustifyRight:e("alignright"),JustifyFull:e("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return a.isFormatMatch(e)},mceBlockQuote:function(){return a.isFormatMatch("blockquote")},Outdent:function(){return ow(i)},"InsertUnorderedList,InsertOrderedList":function(e){var t=i.dom.getParent(i.selection.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),a.addCommands({Undo:function(){i.undoManager.undo()},Redo:function(){i.undoManager.redo()}}),a.addQueryValueHandler("FontName",function(){return RS(t=i).fold(function(){return _S(t).map(function(e){return kS(t.getBody(),e)}).getOr("")},function(e){return kS(t.getBody(),e)});var t},this),a.addQueryValueHandler("FontSize",function(){return RS(t=i).fold(function(){return _S(t).map(function(e){return ES(t.getBody(),e)}).getOr("")},function(e){return ES(t.getBody(),e)});var t},this)},LS);function LS(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}var IS=hr.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),MS=(FS.isNative=function(e){return!!IS[e.toLowerCase()]},FS.prototype.fire=function(e,t){var n,r,o,i;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=this.scope),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=h},t.stopPropagation=function(){t.isPropagationStopped=h},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=h},t.isDefaultPrevented=g,t.isPropagationStopped=g,t.isImmediatePropagationStopped=g),this.settings.beforeFire&&this.settings.beforeFire(t),n=this.bindings[e])for(r=0,o=n.length;r"),this.parseShortcut))[o.length-1]=hr.extend(o[o.length-1],{func:n,scope:r||this.editor}),hr.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})},sN.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},sN.prototype.isFunctionKey=function(e){return"keydown"===e.type&&112<=e.keyCode&&e.keyCode<=123},sN.prototype.matchShortcut=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},sN.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},sN);function sN(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;var n=this;e.on("keyup keypress keydown",function(t){!n.hasModifier(t)&&!n.isFunctionKey(t)||t.isDefaultPrevented()||(rN(n.shortcuts,function(e){if(n.matchShortcut(t,e))return n.pendingPatterns=e.subpatterns.slice(0),"keydown"===t.type&&n.executeShortcutAction(e),!0}),n.matchShortcut(t,n.pendingPatterns[0])&&(1===n.pendingPatterns.length&&"keydown"===t.type&&n.executeShortcutAction(n.pendingPatterns[0]),n.pendingPatterns.shift()))})}var cN=function(){var e,t,n,r,o,i,a,u,s=(t={},n={},r={},o={},i={},a={},{addButton:(u=function(n,r){return function(e,t){return n[e.toLowerCase()]=pe(pe({},t),{type:r})}})(e={},"button"),addGroupToolbarButton:u(e,"grouptoolbarbutton"),addToggleButton:u(e,"togglebutton"),addMenuButton:u(e,"menubutton"),addSplitButton:u(e,"splitbutton"),addMenuItem:u(t,"menuitem"),addNestedMenuItem:u(t,"nestedmenuitem"),addToggleMenuItem:u(t,"togglemenuitem"),addAutocompleter:u(n,"autocompleter"),addContextMenu:u(o,"contextmenu"),addContextToolbar:u(i,"contexttoolbar"),addContextForm:u(i,"contextform"),addSidebar:u(a,"sidebar"),addIcon:function(e,t){return r[e.toLowerCase()]=t},getAll:function(){return{buttons:e,menuItems:t,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}});return{addAutocompleter:s.addAutocompleter,addButton:s.addButton,addContextForm:s.addContextForm,addContextMenu:s.addContextMenu,addContextToolbar:s.addContextToolbar,addIcon:s.addIcon,addMenuButton:s.addMenuButton,addMenuItem:s.addMenuItem,addNestedMenuItem:s.addNestedMenuItem,addSidebar:s.addSidebar,addSplitButton:s.addSplitButton,addToggleButton:s.addToggleButton,addGroupToolbarButton:s.addGroupToolbarButton,addToggleMenuItem:s.addToggleMenuItem,getAll:s.getAll}},lN=hr.each,fN=hr.trim,dN="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),mN={ftp:21,http:80,https:443,mailto:25},pN=(gN.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},gN.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},gN.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},gN.prototype.toRelative=function(e){var t;if("./"===e)return e;var n=new gN(e,{base_uri:this});if("mce_host"!==n.host&&this.host!==n.host&&n.host||this.port!==n.port||this.protocol!==n.protocol&&""!==n.protocol)return n.getURI();var r=this.getURI(),o=n.getURI();return r===o||"/"===r.charAt(r.length-1)&&r.substr(0,r.length-1)===o?r:(t=this.toRelPath(this.path,n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),t)},gN.prototype.toAbsolute=function(e,t){var n=new gN(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))},gN.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=mN[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},gN.prototype.toRelPath=function(e,t){var n,r,o,i=0,a="",u=e.substring(0,e.lastIndexOf("/")).split("/");if(n=t.split("/"),u.length>=n.length)for(r=0,o=u.length;r=n.length||u[r]!==n[r]){i=r+1;break}if(u.length=u.length||u[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=u.length-(i-1);r=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=WN(e.x,t.x),r=WN(e.y,t.y),o=$N(e.x+e.w,t.x+t.w),i=$N(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:YN(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=WN(0,t.x-u),o=WN(0,t.y-s),i=WN(0,c-f),a=WN(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),YN(u,s,(c-=i)-u,(l-=a)-s)},create:YN,fromClientRect:function(e){return YN(e.left,e.top,e.width,e.height)}},JN=hr.each,QN=hr.extend,ZN=function(){};ZN.extend=jN=function(n){var o,i=this.prototype,r=function(){var e,t,n;if(!HN&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},t=function(){return this};return HN=!0,o=new this,HN=!1,n.Mixins&&(JN(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),i.Mixins&&(n.Mixins=i.Mixins.concat(n.Mixins))),n.Methods&&JN(n.Methods.split(","),function(e){n[e]=t}),n.Properties&&JN(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&JN(n.Statics,function(e,t){r[t]=e}),n.Defaults&&i.Defaults&&(n.Defaults=QN({},i.Defaults,n.Defaults)),oe(n,function(e,t){var n,r;"function"==typeof e&&i[t]?o[t]=(n=t,r=e,function(){var e,t=this._super;return this._super=i[n],e=r.apply(this,arguments),this._super=t,e}):o[t]=e}),r.prototype=o,(r.constructor=r).extend=jN,r};var eE=Math.min,tE=Math.max,nE=Math.round,rE={serialize:function(e){var t=JSON.stringify(e);return q(t)?t.replace(/[\u0080-\uFFFF]/g,function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},parse:function(e){try{return JSON.parse(e)}catch(t){}}},oE={callbacks:{},count:0,send:function(t){var n=this,r=ga.DOM,o=t.count!==undefined?t.count:n.count,i="tinymce_jsonp_"+o;n.callbacks[o]=function(e){r.remove(i),delete n.callbacks[o],t.callback(e)},r.add(r.doc.body,"script",{id:i,src:t.url,type:"text/javascript"}),n.count++}},iE=pe(pe({},jS),{send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||1e4
    ":/^(UL|OL)$/.test(n.nodeName)&&(r="
  • "+a+"
  • "),r=(i=Hs(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||'
    ',zm(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=hf({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=Or(Ne.fromDom(n))?r:hr.trim(r),zm(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},Hm=function(e,t){return e.splitText(t)},Vm=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&Zt(t)?0
    ").append(n.childNodes)}))},dp[Nf="pre"]||(dp[Nf]=[]),dp[Nf].push(Ef);var gp,hp,vp=/^(src|href|style)$/,yp=hr.each,bp=wl,Cp=function(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)},wp=function(e,t,n){var r,o;if(r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],$t(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[i=r.nodeValue.length&&(r=new ra(r,e.getBody()).next()||r),Zt(r)&&!n&&0===o&&(r=new ra(r,e.getBody()).prev()||r),r},xp=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},Sp=function(e,t,n,r,o){var i=Ne.fromDom(t),a=Ne.fromDom(e.create(r,o)),u=(n?gt:pt)(i);return Nt(a,u),n?(Ct(i,a),xt(a,i)):(wt(i,a),St(a,i)),a.dom()},Np=function(e,t,n,r){return!(t=hl(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},Ep=function(e,r,o,t,i){var n,a,u,s,c,l=e.dom;if(u=l,!(bp(s=t,(c=r).inline)||bp(s,c.block)||c.selector&&($t(s)&&u.is(s,c.selector))||(a=t,r.links&&"A"===a.nodeName)))return!1;var f,d,m,p,g,h,v,y=t;if(r.inline&&"all"===r.remove&&k(r.preserve_attributes)){var b=H(l.getAttribs(y),function(e){return M(r.preserve_attributes,e.name.toLowerCase())});if(l.removeAllAttribs(y),z(b,function(e){return l.setAttrib(y,e.name,e.value)}),0e?t.cells().length:e},0)},qp=function(e,t){for(var n,r=e.rows(),o=0;o")?{type:"fragmented",fragments:r,content:"",bookmark:null,beforeBookmark:null}:{type:"complete",fragments:null,content:t,bookmark:null,beforeBookmark:null}},ug=function(e,t,n){"fragmented"===t.type?og(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},sg=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},cg=function(e){var t=Ne.fromTag("body",ig.get().getOrThunk(function(){var e=V.document.implementation.createHTMLDocument("undo");return ig.set(R.some(e)),e}));return nu(t,sg(e)),z(Ua(t,"*[data-mce-bogus]"),_t),t.dom().innerHTML},lg=function(e,t){return!(!e||!t)&&(r=t,sg(e)===sg(r)||(n=t,cg(e)===cg(n)));var n,r},fg=function(e){return 0===e.get()},dg=function(e,t,n){fg(n)&&(e.typing=t)},mg=function(e,t){e.typing&&(dg(e,!1,t),e.add())},pg=function(e){return e instanceof df},gg=function(e,t){Fm(e.serializer.getNodeFilters(),e.serializer.getAttributeFilters(),t)},hg=function(){return{type:"complete",fragments:[],content:"",bookmark:null,beforeBookmark:null}},vg=function(s){return{undoManager:{beforeChange:function(e,t){return n=s,r=t,void(fg(e)&&r.set(R.some(Ls(n.selection))));var n,r},addUndoLevel:function(e,t,n,r,o,i){return function(e,t,n,r,o,i,a){var u=e.settings,s=ag(e);if(i=i||{},i=hr.extend(i,s),!1===fg(r)||e.removed)return null;var c=t.data[n.get()];if(e.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&lg(c,i))return null;if(t.data[n.get()]&&o.get().each(function(e){t.data[n.get()].beforeBookmark=e}),u.custom_undo_redo_levels&&t.data.length>u.custom_undo_redo_levels){for(var l=0;l",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:u.convertURL,url_converter_scope:u},pe(pe({},s),a?Lg:{}));return jg(Og||Bg,Og,c,r,o)},Vg=function(e,t,n){return R.from(t.settings[n]).filter(e)},qg=function(e,t,n,r){var o,i,a,u=t in e.settings?e.settings[t]:n;return"hash"===r?(a={},"string"==typeof(i=u)?z(0\ufeff');return Ct(n.element,r),hh(r,function(){return kt(r)})},yh=function(n,r,o,i){xh(n,function(e,t){return Ch(n,r,o,i)},o)},bh=function(e,t,n,r,o){var i,a,u={elm:r.element.dom(),alignToTop:o};i=u,e.fire("ScrollIntoView",i).isDefaultPrevented()||(n(t,Ft(t).top(),r,o),a=u,e.fire("AfterScrollIntoView",a))},Ch=function(e,t,n,r){var o=Ne.fromDom(e.getBody()),i=Ne.fromDom(e.getDoc());o.dom().offsetWidth;var a=vh(Ne.fromDom(n.startContainer),n.startOffset);bh(e,i,t,a,r),a.cleanup()},wh=function(e,t,n,r){var o,i=Ne.fromDom(e.getDoc());bh(e,i,n,(o=t,hh(Ne.fromDom(o),f)),r)},xh=function(e,t,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;t(Ne.fromDom(r),Ne.fromDom(i));var u=e.dom.createRng();u.setStart(r,o),u.setEnd(i,a),e.selection.setRng(n)},Sh=function(e,t,n,r){var o=e.pos;if(n)Ut(o.left(),o.top(),r);else{var i=o.top()-t+e.height;Ut(o.left(),i,r)}},Nh=function(e,t,n,r,o){var i=n+t,a=r.pos.top(),u=r.bottom,s=n<=u-a;if(aa.bottom&&zt(n.element,!0===r)},_h=function(e,t,n){return yh(e,Eh,t,n)},Rh=function(e,t,n){return wh(e,t,Eh,n)},Th=function(e,t,n){return yh(e,kh,t,n)},Ah=function(e,t,n){return wh(e,t,kh,n)},Dh=function(e,t,n){(e.inline?_h:Th)(e,t,n)},Oh=function(e){return on(e)||an(e)},Bh=function(e,t,n){var r,o,i,a,u,s=n;if(s.caretPositionFromPoint)(o=s.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(s.body.createTextRange){r=s.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(c){r=function(e,n,t){var r,o,i;if(r=t.elementFromPoint(e,n),o=t.body.createTextRange(),r&&"HTML"!==r.tagName||(r=t.body),o.moveToElementText(r),0<(i=(i=hr.toArray(o.getClientRects())).sort(function(e,t){return(e=Math.abs(Math.max(e.top-n,e.bottom-n)))-(t=Math.abs(Math.max(t.top-n,t.bottom-n)))})).length){n=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,n),o.collapse(!0),o}catch(a){}}return null}(e,t,n)}return i=r,a=n.body,u=i&&i.parentElement?i.parentElement():null,an(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(u,a,Oh))?null:i}return r},Ph=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return R.from(i).map(Ne.fromDom).map(function(e){return r&&t.collapsed?e:vt(e,o(e,a)).getOr(e)}).bind(function(e){return Dt(e)?R.some(e):ft(e).filter(Dt)}).map(function(e){return e.dom()}).getOr(e)},Lh=function(e,t,n){return Ph(e,t,!0,n,function(e,t){return Math.min(e.dom().childNodes.length,t)})},Ih=function(e,t,n){return Ph(e,t,!1,n,function(e,t){return 0o.childNodes.length-1&&(s=!1),tn(o)&&(o=m,i=0),o===m){if(s&&(a=o.childNodes[0R(n)?(x=T(w*b),w=T(x/b)):(w=T(x/b),x=T(w*b))),P(l,w,x),r=0<(r=d.startPos.x+t)?r:0,o=0<(o=d.startPos.y+n)?o:0,E.setStyles(f,{left:r,top:o,display:"block"}),f.innerHTML=w+" × "+x,d[2]<0&&l.clientWidth<=w&&E.setStyle(l,"left",g+(v-w)),d[3]<0&&l.clientHeight<=x&&E.setStyle(l,"top",h+(y-x)),(t=A.scrollWidth-S)+(n=A.scrollHeight-N)!==0&&E.setStyles(f,{left:r-t,top:o-n}),C||(i=c,a=v,u=y,s.fire("ObjectResizeStart",{target:i,width:a,height:u}),C=!0)},I=function(){var e=C;C=!1;var t,n,r,o=function(e,t){t&&(c.style[e]||!s.schema.isValid(c.nodeName.toLowerCase(),e)?E.setStyle(O(c),e,t):E.setAttrib(O(c),e,""+t))};e&&(o("width",w),o("height",x)),E.unbind(k,"mousemove",L),E.unbind(k,"mouseup",I),_!==k&&(E.unbind(_,"mousemove",L),E.unbind(_,"mouseup",I)),E.remove(l),E.remove(f),i(c),e&&(t=c,n=w,r=x,s.fire("ObjectResized",{target:t,width:n,height:r}),E.setAttrib(c,"style",E.getAttrib(c,"style"))),s.nodeChanged()},i=function(e){var t,r,o,n,i;M(),U(),t=E.getPos(e,A),g=t.x,h=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,c!==e&&(c=e,w=x=0),n=s.fire("ObjectSelected",{target:e}),B(e)&&!n.isDefaultPrevented()?u(a,function(n,e){var t;(t=E.get("mceResizeHandle"+e))&&E.remove(t),t=E.add(A,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===rr.ie&&(t.contentEditable=!1),E.bind(t,"mousedown",function(e){var t;e.stopImmediatePropagation(),e.preventDefault(),m=(t=e).screenX,p=t.screenY,v=O(c).clientWidth,y=O(c).clientHeight,b=y/v,(d=n).startPos={x:r*n[0]+g,y:o*n[1]+h},S=A.scrollWidth,N=A.scrollHeight,l=c.cloneNode(!0),E.addClass(l,"mce-clonedresizable"),E.setAttrib(l,"data-mce-bogus","all"),l.contentEditable=!1,l.unSelectabe=!0,E.setStyles(l,{left:g,top:h,margin:0}),P(l,r,o),l.removeAttribute("data-mce-selected"),A.appendChild(l),E.bind(k,"mousemove",L),E.bind(k,"mouseup",I),_!==k&&(E.bind(_,"mousemove",L),E.bind(_,"mouseup",I)),f=E.add(A,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},v+" × "+y)}),n.elm=t,E.setStyles(t,{left:r*n[0]+g-t.offsetWidth/2,top:o*n[1]+h-t.offsetHeight/2})}):M(),c.setAttribute("data-mce-selected","1")},M=function(){U(),c&&c.removeAttribute("data-mce-selected"),oe(a,function(e,t){var n=E.get("mceResizeHandle"+t);n&&(E.unbind(n),E.remove(n))})},o=function(e){var t,n=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};C||s.removed||(u(E.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),t="mousedown"===e.type?e.target:r.getNode(),n(t=E.$(t).closest("table,img,figure.image,hr")[0],A)&&(z(),n(r.getStart(!0),t)&&n(r.getEnd(!0),t))?i(t):M())},F=function(e){return ev(function(e,t){for(;t&&t!==e;){if(tv(t)||ev(t))return t;t=t.parentNode}return null}(s.getBody(),e))},U=function(){oe(a,function(e){e.elm&&(E.unbind(e.elm),delete e.elm)})},z=function(){try{s.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};s.on("init",function(){if(z(),rr.browser.isIE()||rr.browser.isEdge()){s.on("mousedown click",function(e){var t=e.target,n=t.nodeName;C||!/^(TABLE|IMG|HR)$/.test(n)||F(t)||(2!==e.button&&s.selection.select(t,"TABLE"===n),"mousedown"===e.type&&s.nodeChanged())});var e=function(e){var t=function(e){Xn.setEditorTimeout(s,function(){return s.selection.select(e)})};if(F(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target))};E.bind(A,"mscontrolselect",e),s.on("remove",function(){return E.unbind(A,"mscontrolselect",e)})}var t=Xn.throttle(function(e){s.composing||o(e)});s.on("nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged",t),s.on("keyup compositionend",function(e){c&&"TABLE"===c.nodeName&&t(e)}),s.on("hide blur",M),s.on("contextmenu longpress",n,!0)}),s.on("remove",U);return{isResizable:B,showResizeRect:i,hideResizeRect:M,updateResizeRect:o,destroy:function(){c=l=null}}},rv=function(e,t,n){if(e&&e.hasOwnProperty(t)){var r=H(e[t],function(e){return e!==n});0===r.length?delete e[t]:e[t]=r}};var ov=function(e){return!!e.select},iv=function(e){return!(!e||!e.ownerDocument)&&st(Ne.fromDom(e.ownerDocument),Ne.fromDom(e))},av=function(u,s,e,c){var n,t,l,f,r=function h(i,n){var a,u;return{selectorChangedWithUnbind:function(e,t){return a||(a={},u={},n.on("NodeChange",function(e){var n=e.element,r=i.getParents(n,null,i.getRoot()),o={};hr.each(a,function(e,n){hr.each(r,function(t){if(i.is(t,n))return u[n]||(hr.each(e,function(e){e(!0,{node:t,selector:n,parents:r})}),u[n]=e),o[n]=e,!1})}),hr.each(u,function(e,t){o[t]||(delete u[t],hr.each(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),a[e]||(a[e]=[]),a[e].push(t),{unbind:function(){rv(a,e,t),rv(u,e,t)}}}}}(u,c).selectorChangedWithUnbind,o=function(e,t){return Yh(c,e,t)},i=function(e){var t=m();t.collapse(!!e),a(t)},d=function(){return s.getSelection?s.getSelection():s.document.selection},m=function(){var e,t,n,r,o=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}};if(!s)return null;if(null==(r=s.document))return null;if(c.bookmark!==undefined&&!1===Pm(c)){var i=wm(c);if(i.isSome())return i.map(function(e){return Fp(c,[e])[0]}).getOr(r.createRange())}try{(e=d())&&!qt(e.anchorNode)&&(t=0t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return r=e,o=t,void((n=c).inline?Rh:Ah)(n,r,o);var n,r,o},placeCaretAt:function(e,t){return a(Bh(e,t,c.getDoc()))},getBoundingClientRect:function(){var e=m();return e.collapsed?ms.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=l=f=null,t.destroy()}};return n=Jh(g),t=nv(g,c),g.bookmarkManager=n,g.controlSelection=t,g},uv=function(e,a,u){e.addNodeFilter("font",function(e){z(e,function(e){var t,n=a.parse(e.attr("style")),r=e.attr("color"),o=e.attr("face"),i=e.attr("size");r&&(n.color=r),o&&(n["font-family"]=o),i&&(n["font-size"]=u[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",a.serialize(n)),t=e,z(["color","face","size"],function(e){t.attr(e,null)})})})},sv=function(e,t){var n,r=ao();t.convert_fonts_to_spans&&uv(e,r,hr.explode(t.font_size_legacy_values)),n=r,e.addNodeFilter("strike",function(e){z(e,function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))})})},cv=function(e){var t,n,r=decodeURIComponent(e).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(t=n[1]),{type:t,data:r[1]}},lv=function(e,t){var n;try{n=V.atob(t)}catch(pE){return R.none()}for(var r=new Uint8Array(n.length),o=0;o)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===s.element_format&&0")):"xhtml"===s.element_format&&0)\s*/g,"$1"),hr.map(c.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=hr.map(e.split(/(?:~\+|~|\+)/),qv),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]).length?(i[0].name||(i[0].name=t),t=e.selector,Vv(i,n)):Vv([t],n),o=Hv.select(t,r)[0]||r.firstChild,jv(e.styles,function(e,t){(e=l(e))&&Hv.setStyle(o,t,e)}),jv(e.attributes,function(e,t){(e=l(e))&&Hv.setAttrib(o,t,e)}),jv(e.classes,function(e){e=l(e),Hv.hasClass(o,e)||Hv.addClass(o,e)}),n.fire("PreviewFormats"),Hv.setStyles(r,{position:"absolute",left:-65535}),n.getBody().appendChild(r),a=Hv.getStyle(n.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,jv(u.split(" "),function(e){var t=Hv.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=Hv.getStyle(n.getBody(),e,!0),"#ffffff"===Hv.toHex(t).toLowerCase())||"color"===e&&"#000000"===Hv.toHex(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===a)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*a+"px"}"border"===e&&t&&(s+="padding:0 2px;"),s+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),Hv.remove(r),s)},Wv=function(s){var e=Fv(s),t=xa(null);return function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])}(s),lp(s),{get:e.get,has:e.has,register:e.register,unregister:e.unregister,apply:function(e,t,n){var r,o,i;r=e,o=t,i=n,wg(s).formatter.apply(r,o,i)},remove:function(e,t,n,r){var o,i,a,u;o=e,i=t,a=n,u=r,wg(s).formatter.remove(o,i,a,u)},toggle:function(e,t,n){var r,o,i;r=e,o=t,i=n,wg(s).formatter.toggle(r,o,i)},match:N(Gm,s),matchAll:N(Jm,s),matchNode:N(Ym,s),canApply:N(Qm,s),formatChanged:N(Mv,s,t),getCssText:N($v,s)}},Kv=function(n,r,o){var i=xa(!1),a=function(e){dg(r,!1,o),r.add({},e)};n.on("init",function(){r.add()}),n.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(mg(r,o),r.beforeChange())}),n.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&a(e)}),n.on("ObjectResizeStart cut",function(){r.beforeChange()}),n.on("SaveContent ObjectResized blur",a),n.on("dragend",a),n.on("keyup",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(a(),n.nodeChanged()),46!==t&&8!==t||n.nodeChanged(),i.get()&&r.typing&&!1===lg(ag(n),r.data[0])&&(!1===n.isDirty()&&(n.setDirty(!0),n.fire("change",{level:r.data[0],lastLevel:null})),n.fire("TypingUndo"),i.set(!1),n.nodeChanged()))}),n.on("keydown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(33<=t&&t<=36||37<=t&&t<=40||45===t)r.typing&&a(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20t;var t}},ab=function(n){return function(e){return t=n,e.line===t;var t}},ub=an,sb=vc,cb=function(e,t){return Math.abs(e.left-t)},lb=function(e,t){return Math.abs(e.right-t)},fb=function(e,t){return e>=t.left&&e<=t.right},db=function(e,o){return cr(e,function(e,t){var n,r;return n=Math.min(cb(e,o),lb(e,o)),r=Math.min(cb(t,o),lb(t,o)),fb(o,t)||!fb(o,e)&&(r===n&&ub(t.node)||r=e.top&&n<=e.bottom});return(r=(r=db(f,t))&&db((a=e,c=function(t,e){var n;return n=H(Zy([e]),function(e){return!t(e,u)}),s=s.concat(n),0===n.length},(s=[]).push(u=r),mb(Uv.Up,a,N(c,Fu),u.node),mb(Uv.Down,a,N(c,Uu),u.node),s),t))&&cc(r.node)?(i=t,{node:(o=r).node,before:cb(o,i)'),o=a,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},Lb=function(l,f){return function(){var e,t,n,r,o,i,a,u,s,c=(t=f,r=Hc((e=l).getBody()),o=N(Tc,r.next),i=N(Tc,r.prev),a=t?fs.Forwards:fs.Backwards,u=t?o:i,s=e.selection.getRng(),(n=Ob(a,e,u,s))?n:(n=Pb(e,a,s))||null);return!!c&&(l.selection.setRng(c),!0)}},Ib=function(u,s){return function(){var e,t,n,r,o,i,a=(r=(t=s)?1:-1,o=t?ob:rb,i=(e=u).selection.getRng(),(n=Bb(r,e,o,i))?n:(n=Pb(e,r,i))||null);return!!a&&(u.selection.setRng(a),!0)}},Mb=function(r,o){return function(){var t,e=o?ms.fromRangeEnd(r.selection.getRng()):ms.fromRangeStart(r.selection.getRng()),n=(o?_b:kb)(r.getBody(),e);return(o?ee:Z)(n.positions).filter((t=o,function(e){return(t?qf:Vf)(e)})).fold(x(!1),function(e){return r.selection.setRng(e.toRange()),!0})}},Fb=function(o,e){return Y(e,function(e){var t,n,r=(t=Lu(e.getBoundingClientRect()),n=-1,{left:t.left-n,top:t.top-n,right:t.right+2*n,bottom:t.bottom+2*n,width:t.width+n,height:t.height+n});return[{x:r.left,y:o(r),cell:e},{x:r.right,y:o(r),cell:e}]})},Ub=function(e,t,n,r,o){var i,a,u=Ua(Ne.fromDom(n),"td,th,caption").map(function(e){return e.dom()}),s=H(Fb(e,u),function(e){return t(e,o)});return i=r,a=o,W(s,function(e,r){return e.fold(function(){return R.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-i)+Math.abs(e.y-a)),n=Math.sqrt(Math.abs(r.x-i)+Math.abs(r.y-a));return R.some(nt}),Hb=function(t,n){return Z(n.getClientRects()).bind(function(e){return zb(t,e.left,e.top)}).bind(function(e){return Eb(el(t=e).map(function(e){return kb(t,e).positions.concat(e)}).getOr([]),n);var t})},Vb=function(t,n){return ee(n.getClientRects()).bind(function(e){return jb(t,e.left,e.top)}).bind(function(e){return Eb(Zc(t=e).map(function(e){return[e].concat(_b(t,e).positions)}).getOr([]),n);var t})},qb=function(e,t){e.selection.setRng(t),Dh(e,t)},$b=function(e,t,n){var r,o,i,a,u=e(t,n);return(a=u).breakType===eb.Wrap&&0===a.positions.length||!rn(n.getNode())&&((i=u).breakType===eb.Br&&1===i.positions.length)?(r=e,o=t,!u.breakAt.map(function(e){return r(o,e).breakAt.isSome()}).getOr(!1)):u.breakAt.isNone()},Wb=N($b,kb),Kb=N($b,_b),Xb=function(e,t,n,r){var o,i,a,u,s=e.selection.getRng(),c=t?1:-1;if(sc()&&(o=t,i=s,a=n,u=ms.fromRangeStart(i),Gc(!o,a).map(function(e){return e.isEqual(u)}).getOr(!1))){var l=vb(c,e,n,!t,!0);return qb(e,l),!0}return!1},Yb=function(e,t){var n=t.getNode(e);return $t(n)&&"TABLE"===n.nodeName?R.some(n):R.none()},Gb=function(u,s,c){var e=Yb(!!s,c),t=!1===s;e.fold(function(){return qb(u,c.toRange())},function(a){return Gc(t,u.getBody()).filter(function(e){return e.isEqual(c)}).fold(function(){return qb(u,c.toRange())},function(e){return n=s,o=a,t=c,void((i=Hs(r=u))?r.undoManager.transact(function(){var e=Ne.fromTag(i);ln(e,Vs(r)),St(e,Ne.fromTag("br")),(n?wt:Ct)(Ne.fromDom(o),e);var t=r.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),qb(r,t)}):qb(r,t.toRange()));var n,r,o,t,i})})},Jb=function(e,t,n,r){var o,i,a,u,s,c,l=e.selection.getRng(),f=ms.fromRangeStart(l),d=e.getBody();if(!t&&Wb(r,f)){var m=(u=d,Hb(s=n,c=f).orThunk(function(){return Z(c.getClientRects()).bind(function(e){return Nb(Rb(u,ms.before(s)),e.left)})}).getOr(ms.before(s)));return Gb(e,t,m),!0}if(t&&Kb(r,f)){m=(o=d,Vb(i=n,a=f).orThunk(function(){return Z(a.getClientRects()).bind(function(e){return Nb(Tb(o,ms.after(i)),e.left)})}).getOr(ms.after(i)));return Gb(e,t,m),!0}return!1},Qb=function(t,n){return function(){return R.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(e){return R.from(t.dom.getParent(e,"table")).map(function(e){return Xb(t,n,e)})}).getOr(!1)}},Zb=function(n,r){return function(){return R.from(n.dom.getParent(n.selection.getNode(),"td,th")).bind(function(t){return R.from(n.dom.getParent(t,"table")).map(function(e){return Jb(n,r,e,t)})}).getOr(!1)}},eC=function(e){return M(["figcaption"],Rt(e))},tC=function(e){var t=V.document.createRange();return t.setStartBefore(e.dom()),t.setEndBefore(e.dom()),t},nC=function(e,t,n){(n?St:xt)(e,t)},rC=function(e,t,n,r){return""===t?(l=e,f=r,d=Ne.fromTag("br"),nC(l,d,f),tC(d)):(o=e,i=r,a=t,u=n,s=Ne.fromTag(a),c=Ne.fromTag("br"),ln(s,u),St(s,c),nC(o,s,i),tC(c));var o,i,a,u,s,c,l,f,d},oC=function(e,t,n){return t?(o=e.dom(),_b(o,n).breakAt.isNone()):(r=e.dom(),kb(r,n).breakAt.isNone());var r,o},iC=function(t,n){var e,r,o=Ne.fromDom(t.getBody()),i=ms.fromRangeStart(t.selection.getRng()),a=Hs(t),u=Vs(t);return e=i,r=N(at,o),Va(Ne.fromDom(e.container()),Sr,r).filter(eC).exists(function(){if(oC(o,n,i)){var e=rC(o,a,u,n);return t.selection.setRng(e),!0}return!1})},aC=function(e,t){return function(){return!!e.selection.isCollapsed()&&iC(e,t)}},uC=function(e,r){return Y(U(e,function(e){return pe({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:f},e)}),function(e){return t=e,(n=r).keyCode===t.keyCode&&n.shiftKey===t.shiftKey&&n.altKey===t.altKey&&n.ctrlKey===t.ctrlKey&&n.metaKey===t.metaKey?[e]:[];var t,n})},sC=function(e){for(var t=[],n=1;n'},kw=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},_w=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},Rw=function(e,t,n){return!1===Zt(t)?n:e?1===n&&t.data.charAt(n-1)===su?0:n:n===t.data.length-1&&t.data.charAt(n)===su?t.data.length:n},Tw=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},Aw=function(o,i,e){R.from(e.style).map(o.dom.parseStyle).each(function(e){var t=function(e){var t={},n=e.dom();if(un(n))for(var r=0;rs.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=p&&Zt(s)?s.nodeValue.length:0),(u=Tw(g,s))&&((m&&!n||!m&&n)&&(s=function(e,t,n,r,o){var i,a,u,s,c,l,f,d=t||"P",m=e.dom,p=Tw(m,r);if(!(a=m.getParent(r,m.isBlock))||!_w(m,a)){if(l=(a=a||p)===e.getBody()||(f=a)&&/^(TD|TH|CAPTION)$/.test(f.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=m.create(d),Dw(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!m.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(l,d.toLowerCase())){for(i=m.create(d),Dw(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!m.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,m,y,s,i)),c=g.getParent(s,g.isBlock),l=c?g.getParent(c.parentNode,g.isBlock):null,f=c?c.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||R||(l=(c=l).parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&g.isEmpty(c)?Nw(a,b,l,c,m):m&&c===a.getBody()||(m=m||"P",mu(c)?(r=xu(c),g.isEmpty(c)&&Ew(c),Dw(a,r),yw(a,r)):C()?w():C(!0)?(r=c.parentNode.insertBefore(b(),c),yw(a,kw(c,"HR")?r:c)):((_=(k=y).cloneRange()).setStart(k.startContainer,Rw(!0,k.startContainer,k.startOffset)),_.setEnd(k.endContainer,Rw(!1,k.endContainer,k.endOffset)),(t=_.cloneRange()).setEndAfter(c),o=t.extractContents(),E=o,z(Fa(Ne.fromDom(E),Ot),function(e){var t=e.dom();t.nodeValue=lu(t.nodeValue)}),function(e){for(;Zt(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(o),r=o.firstChild,g.insertAfter(o,c),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;$t(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=e,(u=o)&&"A"===u.nodeName&&a.isEmpty(u)&&e.remove(o));var a,u}}(g,v,r),x=g,(S=c).normalize(),(N=S.lastChild)&&!/^(left|right)$/gi.test(x.getStyle(N,"float",!0))||x.add(S,"br"),g.isEmpty(c)&&Ew(c),r.normalize(),g.isEmpty(r)?(g.remove(r),w()):(Dw(a,r),yw(a,r))),g.setAttrib(r,"id",""),a.fire("NewBlock",{newBlock:r})))},Bw=function(e,t,n){var r=e.create("span",{}," ");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},Pw=function(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)},Lw=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();Wh(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u=a.startOffset,s=a.startContainer;if(1===s.nodeType&&s.hasChildNodes()){var c=u>s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=!(!t||!t.ctrlKey);"LI"!==d||m||(l=f),s&&3===s.nodeType&&u>=s.nodeValue.length&&!function(e,t,n){for(var r,o=new ra(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0i&&(u=n.pageX+r-i),n.pageY+o>a&&(s=n.pageY+o-a),t.style.width=r-u+"px",t.style.height=o-s+"px",v(e.clientX,e.clientY)}}},jx=function(l,f){return function(e){if(l.dragging&&(s=(i=f).selection,c=s.getSel().getRangeAt(0).startContainer,a=3===c.nodeType?c.parentNode:c,u=l.element,a!==u&&!i.dom.isChildOf(a,u)&&!Ix(a))){var t=(r=l.element,(o=r.cloneNode(!0)).removeAttribute("data-mce-selected"),o),n=f.fire("drop",{targetClone:t,clientX:e.clientX,clientY:e.clientY});n.isDefaultPrevented()||(t=n.targetClone,f.undoManager.transact(function(){Fx(l.element),f.insertContent(f.dom.getOuterHTML(t)),f._selectionOverrides.hideFakeCaret()}))}var r,o,i,a,u,s,c;Hx(l)}},Hx=function(e){e.dragging=!1,e.element=null,Fx(e.ghost)},Vx=function(e){var t,n,r,o,i,a,u,s,c={};t=ga.DOM,a=V.document,n=Ux(c,e),r=zx(c,e),o=jx(c,e),u=c,i=function(){u.dragging&&s.fire("dragend"),Hx(u)},(s=e).on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})},qx=function(e){var n;Vx(e),(n=e).on("drop",function(e){var t="undefined"!=typeof e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Ix(t)||Ix(n.dom.getContentEditableParent(t)))&&e.preventDefault()})},$x=on,Wx=an,Kx=function(e,t){for(var n=e.getBody();t&&t!==n;){if($x(t)||Wx(t))return t;t=t.parentNode}return null},Xx=function(g){var h,v=g.getBody(),o=uc(g,v,function(e){return g.dom.isBlock(e)},function(){return Pm(g)}),y="sel-"+g.dom.uniqueId(),a=function(e){e&&g.selection.setRng(e)},r=function(){return g.selection.getRng()},b=function(e,t,n,r){return void 0===r&&(r=!0),g.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&g.selection.scrollIntoView(t,-1===e),o.show(n,t))},t=function(e){return gu(e)||Cu(e)||wu(e)},C=function(e){return t(e.startContainer)||t(e.endContainer)},u=function(e){var t=g.schema.getShortEndedElements(),n=g.dom.createRng(),r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset;return me(t,r.nodeName.toLowerCase())?0===o?n.setStartBefore(r):n.setStartAfter(r):n.setStart(r,o),me(t,i.nodeName.toLowerCase())?0===a?n.setEndBefore(i):n.setEndAfter(i):n.setEnd(i,a),n},s=function(e,t){var n,r,o,i,a,u,s,c,l,f,d=g.$,m=g.dom;if(!e)return null;if(e.collapsed){if(!C(e))if(!1===t){if(c=_c(-1,v,e),cc(c.getNode(!0)))return b(-1,c.getNode(!0),!1,!1);if(cc(c.getNode()))return b(-1,c.getNode(),!c.isAtEnd(),!1)}else{if(c=_c(1,v,e),cc(c.getNode()))return b(1,c.getNode(),!c.isAtEnd(),!1);if(cc(c.getNode(!0)))return b(1,c.getNode(!0),!1,!1)}return null}if(i=e.startContainer,a=e.startOffset,u=e.endOffset,3===i.nodeType&&0===a&&Wx(i.parentNode)&&(i=i.parentNode,a=m.nodeIndex(i),i=i.parentNode),1!==i.nodeType)return null;if(u===a+1&&i===e.endContainer&&(n=i.childNodes[a]),!Wx(n))return null;if(l=f=n.cloneNode(!0),(s=g.fire("ObjectSelected",{target:n,targetClone:l})).isDefaultPrevented())return null;r=$a(Ne.fromDom(g.getBody()),"#"+y).fold(function(){return d([])},function(e){return d([e.dom()])}),l=s.targetClone,0===r.length&&(r=d('
    ').attr("id",y)).appendTo(g.getBody()),e=g.dom.createRng(),l===f&&rr.ie?(r.empty().append('

    \xa0

    ').append(l),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(l)):(r.empty().append(oo).append(l).append(oo),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:m.getPos(n,g.getBody()).y}),r[0].focus(),(o=g.selection.getSel()).removeAllRanges(),o.addRange(e);var p=Ne.fromDom(n);return z(Ua(Ne.fromDom(g.getBody()),"*[data-mce-selected]"),function(e){at(p,e)||dn(e,"data-mce-selected")}),g.dom.getAttrib(n,"data-mce-selected")||n.setAttribute("data-mce-selected","1"),h=n,w(),e},c=function(){h&&(h.removeAttribute("data-mce-selected"),$a(Ne.fromDom(g.getBody()),"#"+y).each(kt),h=null),$a(Ne.fromDom(g.getBody()),"#"+y).each(kt),h=null},w=function(){o.hide()};return rr.ceFalse&&function(){g.on("mouseup",function(e){var t=r();t.collapsed&&Qg(g,e.clientX,e.clientY)&&a(bb(g,t,!1))}),g.on("click",function(e){var t;(t=Kx(g,e.target))&&(Wx(t)&&(e.preventDefault(),g.focus()),$x(t)&&g.dom.isChildOf(t,g.selection.getNode())&&c())}),g.on("blur NewBlock",function(){c()}),g.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n,i=function(e,t){var n,r,o=g.dom.getParent(e,g.dom.isBlock),i=g.dom.getParent(t,g.dom.isBlock);return!(!o||!g.dom.isChildOf(o,i)||!1!==Wx(Kx(g,o)))||o&&(n=o,r=i,!(g.dom.getParent(n,g.dom.isBlock)===g.dom.getParent(r,g.dom.isBlock)))&&function(e){var t=Hc(e);if(!e.firstChild)return!1;var n=ms.before(e.firstChild),r=t.next(n);return r&&!Vf(r)&&!qf(r)}(o)};(n=g).on("tap",function(e){var t=Kx(n,e.target);Wx(t)&&(e.preventDefault(),s(yb(n,t)))},!0),g.on("mousedown",function(e){var t,n=e.target;if((n===v||"HTML"===n.nodeName||g.dom.isChildOf(n,v))&&!1!==Qg(g,e.clientX,e.clientY))if(t=Kx(g,n))Wx(t)?(e.preventDefault(),s(yb(g,t))):(c(),$x(t)&&e.shiftKey||Qh(e.clientX,e.clientY,g.selection.getRng())||(w(),g.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===cc(n)){c(),w();var r=pb(v,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=b(1,r.node,r.before,!1);g.getBody().focus(),a(o)}}}),g.on("keypress",function(e){Zh.modifierPressed(e)||(e.keyCode,Wx(g.selection.getNode())&&e.preventDefault())}),g.on("GetSelectionRange",function(e){var t=e.range;if(h){if(!h.parentNode)return void(h=null);(t=t.cloneRange()).selectNode(h),e.range=t}}),g.on("SetSelectionRange",function(e){e.range=u(e.range);var t=s(e.range,e.forward);t&&(e.range=t)});var t,e;g.on("AfterSetSelectionRange",function(e){var t,n=e.range;C(n)||"mcepastebin"===n.startContainer.parentNode.id||w(),t=n.startContainer.parentNode,g.dom.hasClass(t,"mce-offscreen-selection")||c()}),g.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!rr.ie){var r=(t=g.dom.get(y))?t.getElementsByTagName("*")[0]:t;r&&(e.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),qx(g),e=Ta(function(){if(!t.removed&&t.getBody().contains(V.document.activeElement)&&t.selection.getRng().collapsed){var e=Cb(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0),(t=g).on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})}(),{showCaret:b,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(xu(e),a(r()),g.selection.scrollIntoView(e))},hideFakeCaret:w,destroy:function(){o.destroy(),h=null}}},Yx=function(u){var s,n,r,o=hr.each,c=Zh.BACKSPACE,l=Zh.DELETE,f=u.dom,d=u.selection,e=u.settings,t=u.parser,i=rr.gecko,a=rr.ie,m=rr.webkit,p="data:text/mce-internal,",g=a?"Text":"URL",h=function(e,t){try{u.getDoc().execCommand(e,!1,t)}catch(n){}},v=function(e){return e.isDefaultPrevented()},y=function(){u.shortcuts.add("meta+a",null,"SelectAll")},b=function(){u.on("keydown",function(e){if(!v(e)&&e.keyCode===c&&d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},C=function(){u.inline||(u.contentStyles.push("body {min-height: 150px}"),u.on("click",function(e){var t;if("HTML"===e.target.nodeName){if(11")+"",e.getParam("document_base_url","")!==e.documentBaseUrl&&(r+=''),r+='',t=zs(e,"body_id","tinymce"),n=zs(e,"body_class",""),js(e)&&(r+=''),r+='
    '},iS=function(e,t){var n,r,o,i,a=e.editorManager.translate("Rich Text Area. Press ALT-0 for help."),u=(n=e.id,r=a,t.height,o=e.getParam("iframe_attrs",{}),i=Ne.fromTag("iframe"),ln(i,o),ln(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),La(i,"tox-edit-area__iframe"),i.dom());u.onload=function(){u.onload=null,e.fire("load")};var s=function(e,t){if(V.document.domain!==V.window.location.hostname&&rr.browser.isIE()){var n=Bv("mce");e[n]=function(){nS(e)};var r='javascript:(function(){document.open();document.domain="'+V.document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return rS.setAttrib(t,"src",r),!0}return!1}(e,u);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=u,e.iframeHTML=oS(e),rS.add(t.iframeContainer,u),s},aS=ga.DOM,uS=function(t,n,e){var r=th.get(e),o=th.urls[e]||t.documentBaseUrl.replace(/\/$/,"");if(e=hr.trim(e),r&&-1===hr.inArray(n,e)){if(hr.each(th.dependencies(e),function(e){uS(t,n,e)}),t.plugins[e])return;try{var i=new r(t,o,t.$);(t.plugins[e]=i).init&&(i.init(t,o),n.push(e))}catch(pE){!function(e,t,n){var r=ka.translate(["Failed to initialize plugin: {0}",t]);ch(r,n),ih(e,r)}(t,e,pE)}}},sS=function(e){return e.replace(/^\-/,"")},cS=function(e){return{editorContainer:e,iframeContainer:e}},lS=function(e){var t,n,r=e.getElement();return e.inline?cS(null):(t=r,n=aS.create("div"),aS.insertAfter(n,t),cS(n))},fS=function(e){var n,t,r,o,i,a;e.fire("ScriptsLoaded"),n=e,t=hr.trim($s(n)),r=n.ui.registry.getAll().icons,o=pe(pe({},$g.get("default").icons),$g.get(t).icons),oe(o,function(e,t){me(r,t)||n.ui.registry.addIcon(t,e)}),function(e){var t=e.settings.theme;if(q(t)){e.settings.theme=sS(t);var n=nh.get(t);e.theme=new n(e,nh.urls[t]),e.theme.init&&e.theme.init(e,nh.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}}(e),i=e,a=[],hr.each(i.settings.plugins.split(/[ ,]/),function(e){uS(i,a,sS(e))});var u,s,c,l,f,d,m,p,g,h=(f=(u=e).getElement(),u.orgDisplay=f.style.display,q(u.settings.theme)?u.theme.renderUI():D(u.settings.theme)?(c=(s=u).getElement(),(l=(0,s.settings.theme)(s,c)).editorContainer.nodeType&&(l.editorContainer.id=l.editorContainer.id||s.id+"_parent"),l.iframeContainer&&l.iframeContainer.nodeType&&(l.iframeContainer.id=l.iframeContainer.id||s.id+"_iframecontainer"),l.height=l.iframeHeight?l.iframeHeight:c.offsetHeight,l):lS(u));return e.editorContainer=h.editorContainer?h.editorContainer:null,(d=e).contentCSS=d.contentCSS.concat(lh(d)),e.inline?nS(e):(g=iS(m=e,p=h),p.editorContainer&&(rS.get(p.editorContainer).style.display=m.orgDisplay,m.hidden=rS.isHidden(p.editorContainer)),m.getElement().style.display="none",rS.setAttrib(m.id,"aria-hidden","true"),void(g||nS(m)))},dS=ga.DOM,mS=function(e){return"-"===e.charAt(0)},pS=function(e,t){var n=Ws(t),r=t.getParam("language_url","","string");if(!1===ka.hasCode(n)&&"en"!==n){var o=""!==r?r:t.editorManager.baseURL+"/langs/"+n+".js";e.add(o,f,undefined,function(){ah(t,"LanguageLoadError",uh("language",o,n))})}},gS=function(t,e,n){return R.from(e).filter(function(e){return 0")},mceToggleVisualAid:function(){i.hasVisual=!i.hasVisual,i.addVisual()},mceReplaceContent:function(e,t,n){i.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.selection.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=i.dom.getParent(i.selection.getNode(),"a"),n.href=n.href.replace(/ /g,"%20"),r&&n.href||i.formatter.remove("link"),n.href&&i.formatter.apply("link",n,r)},selectAll:function(){var e=i.dom.getParent(i.selection.getStart(),on);if(e){var t=i.dom.createRng();t.selectNodeContents(e),i.selection.setRng(t)}},"delete":function(){var e;hw(e=i)||qC(e,!1)||WC(e,!1)||GC(e,!1)||NC(e,!1)||Vd(e)||RC(e)||ew(e,!1)||(bS(e,"Delete"),dC(e))},forwardDelete:function(){var e;qC(e=i,!0)||WC(e,!0)||GC(e,!0)||NC(e,!0)||Vd(e)||RC(e)||ew(e,!0)||bS(e,"ForwardDelete")},mceNewDocument:function(){i.setContent("")},InsertLineBreak:function(e,t,n){return Hw(i,n),!0}});var e=function(n){return function(){var e=i.selection.isCollapsed()?[i.dom.getParent(i.selection.getNode(),i.dom.isBlock)]:i.selection.getSelectedBlocks(),t=OS(e,function(e){return!!i.formatter.matchNode(e,n)});return-1!==BS(t,!0)}};a.addCommands({JustifyLeft:e("alignleft"),JustifyCenter:e("aligncenter"),JustifyRight:e("alignright"),JustifyFull:e("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return a.isFormatMatch(e)},mceBlockQuote:function(){return a.isFormatMatch("blockquote")},Outdent:function(){return ow(i)},"InsertUnorderedList,InsertOrderedList":function(e){var t=i.dom.getParent(i.selection.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),a.addCommands({Undo:function(){i.undoManager.undo()},Redo:function(){i.undoManager.redo()}}),a.addQueryValueHandler("FontName",function(){return RS(t=i).fold(function(){return _S(t).map(function(e){return kS(t.getBody(),e)}).getOr("")},function(e){return kS(t.getBody(),e)});var t},this),a.addQueryValueHandler("FontSize",function(){return RS(t=i).fold(function(){return _S(t).map(function(e){return ES(t.getBody(),e)}).getOr("")},function(e){return ES(t.getBody(),e)});var t},this)},LS);function LS(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}var IS=hr.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),MS=(FS.isNative=function(e){return!!IS[e.toLowerCase()]},FS.prototype.fire=function(e,t){var n,r,o,i;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=this.scope),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=h},t.stopPropagation=function(){t.isPropagationStopped=h},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=h},t.isDefaultPrevented=g,t.isPropagationStopped=g,t.isImmediatePropagationStopped=g),this.settings.beforeFire&&this.settings.beforeFire(t),n=this.bindings[e])for(r=0,o=n.length;r"),this.parseShortcut))[o.length-1]=hr.extend(o[o.length-1],{func:n,scope:r||this.editor}),hr.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})},sN.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},sN.prototype.isFunctionKey=function(e){return"keydown"===e.type&&112<=e.keyCode&&e.keyCode<=123},sN.prototype.matchShortcut=function(e,t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)},sN.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},sN);function sN(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;var n=this;e.on("keyup keypress keydown",function(t){!n.hasModifier(t)&&!n.isFunctionKey(t)||t.isDefaultPrevented()||(rN(n.shortcuts,function(e){if(n.matchShortcut(t,e))return n.pendingPatterns=e.subpatterns.slice(0),"keydown"===t.type&&n.executeShortcutAction(e),!0}),n.matchShortcut(t,n.pendingPatterns[0])&&(1===n.pendingPatterns.length&&"keydown"===t.type&&n.executeShortcutAction(n.pendingPatterns[0]),n.pendingPatterns.shift()))})}var cN=function(){var e,t,n,r,o,i,a,u,s=(t={},n={},r={},o={},i={},a={},{addButton:(u=function(n,r){return function(e,t){return n[e.toLowerCase()]=pe(pe({},t),{type:r})}})(e={},"button"),addGroupToolbarButton:u(e,"grouptoolbarbutton"),addToggleButton:u(e,"togglebutton"),addMenuButton:u(e,"menubutton"),addSplitButton:u(e,"splitbutton"),addMenuItem:u(t,"menuitem"),addNestedMenuItem:u(t,"nestedmenuitem"),addToggleMenuItem:u(t,"togglemenuitem"),addAutocompleter:u(n,"autocompleter"),addContextMenu:u(o,"contextmenu"),addContextToolbar:u(i,"contexttoolbar"),addContextForm:u(i,"contextform"),addSidebar:u(a,"sidebar"),addIcon:function(e,t){return r[e.toLowerCase()]=t},getAll:function(){return{buttons:e,menuItems:t,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}});return{addAutocompleter:s.addAutocompleter,addButton:s.addButton,addContextForm:s.addContextForm,addContextMenu:s.addContextMenu,addContextToolbar:s.addContextToolbar,addIcon:s.addIcon,addMenuButton:s.addMenuButton,addMenuItem:s.addMenuItem,addNestedMenuItem:s.addNestedMenuItem,addSidebar:s.addSidebar,addSplitButton:s.addSplitButton,addToggleButton:s.addToggleButton,addGroupToolbarButton:s.addGroupToolbarButton,addToggleMenuItem:s.addToggleMenuItem,getAll:s.getAll}},lN=hr.each,fN=hr.trim,dN="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),mN={ftp:21,http:80,https:443,mailto:25},pN=(gN.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},gN.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},gN.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},gN.prototype.toRelative=function(e){var t;if("./"===e)return e;var n=new gN(e,{base_uri:this});if("mce_host"!==n.host&&this.host!==n.host&&n.host||this.port!==n.port||this.protocol!==n.protocol&&""!==n.protocol)return n.getURI();var r=this.getURI(),o=n.getURI();return r===o||"/"===r.charAt(r.length-1)&&r.substr(0,r.length-1)===o?r:(t=this.toRelPath(this.path,n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),t)},gN.prototype.toAbsolute=function(e,t){var n=new gN(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))},gN.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=mN[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},gN.prototype.toRelPath=function(e,t){var n,r,o,i=0,a="",u=e.substring(0,e.lastIndexOf("/")).split("/");if(n=t.split("/"),u.length>=n.length)for(r=0,o=u.length;r=n.length||u[r]!==n[r]){i=r+1;break}if(u.length=u.length||u[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=u.length-(i-1);r=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=WN(e.x,t.x),r=WN(e.y,t.y),o=$N(e.x+e.w,t.x+t.w),i=$N(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:YN(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,c,l,f,d;return u=e.x,s=e.y,c=e.x+e.w,l=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=WN(0,t.x-u),o=WN(0,t.y-s),i=WN(0,c-f),a=WN(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),YN(u,s,(c-=i)-u,(l-=a)-s)},create:YN,fromClientRect:function(e){return YN(e.left,e.top,e.width,e.height)}},JN=hr.each,QN=hr.extend,ZN=function(){};ZN.extend=jN=function(n){var o,i=this.prototype,r=function(){var e,t,n;if(!HN&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},t=function(){return this};return HN=!0,o=new this,HN=!1,n.Mixins&&(JN(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),i.Mixins&&(n.Mixins=i.Mixins.concat(n.Mixins))),n.Methods&&JN(n.Methods.split(","),function(e){n[e]=t}),n.Properties&&JN(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&JN(n.Statics,function(e,t){r[t]=e}),n.Defaults&&i.Defaults&&(n.Defaults=QN({},i.Defaults,n.Defaults)),oe(n,function(e,t){var n,r;"function"==typeof e&&i[t]?o[t]=(n=t,r=e,function(){var e,t=this._super;return this._super=i[n],e=r.apply(this,arguments),this._super=t,e}):o[t]=e}),r.prototype=o,(r.constructor=r).extend=jN,r};var eE=Math.min,tE=Math.max,nE=Math.round,rE={serialize:function(e){var t=JSON.stringify(e);return q(t)?t.replace(/[\u0080-\uFFFF]/g,function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},parse:function(e){try{return JSON.parse(e)}catch(t){}}},oE={callbacks:{},count:0,send:function(t){var n=this,r=ga.DOM,o=t.count!==undefined?t.count:n.count,i="tinymce_jsonp_"+o;n.callbacks[o]=function(e){r.remove(i),delete n.callbacks[o],t.callback(e)},r.add(r.doc.body,"script",{id:i,src:t.url,type:"text/javascript"}),n.count++}},iE=pe(pe({},jS),{send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||1e4
    @@ -4,6 +4,6 @@
    4
    4
      * For LGPL see License.txt in the project root for license information.
    5
    5
      * For commercial licenses see https://www.tiny.cloud/
    6
    6
      *
    7
    - * Version: 5.3.0 (2020-05-21)
    7
    + * Version: 5.3.2 (2020-06-10)
    8
    8
      */
    9
    - !function(V){"use strict";var r=function(e){if(null===e)return"null";if(e===undefined)return"undefined";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},t=function(e){return{eq:e}},s=t(function(e,t){return e===t}),i=function(o){return t(function(e,t){if(e.length!==t.length)return!1;for(var n=e.length,r=0;r=r.length&&n.substr(o,o+r.length)===r;var n,r,o},qe=function(t){return function(e){return e.replace(t,"")}},$e=qe(/^\s+|\s+$/g),We=qe(/^\s+/g),Ke=qe(/\s+$/g),Xe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ye=function(t){return function(e){return He(e,t)}},Ge=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return He(e,"edge/")&&He(e,"chrome")&&He(e,"safari")&&He(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Xe],search:function(e){return He(e,"chrome")&&!He(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return He(e,"msie")||He(e,"trident")}},{name:"Opera",versionRegexes:[Xe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ye("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ye("firefox")},{name:"Safari",versionRegexes:[Xe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(He(e,"safari")||He(e,"mobile/"))&&He(e,"applewebkit")}}],Je=[{name:"Windows",search:Ye("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return He(e,"iphone")||He(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ye("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ye("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ye("linux"),versionRegexes:[]},{name:"Solaris",search:Ye("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ye("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ye("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Qe={browsers:x(Ge),oses:x(Je)},Ze=function(e,t){var n,r,o,i,a,u,s,c,l,f,d,m,p=Qe.browsers(),g=Qe.oses(),h=ze(p,e).fold(De.unknown,De.nu),v=je(g,e).fold(Fe.unknown,Fe.nu);return{browser:h,os:v,deviceType:(r=h,o=e,i=t,a=(n=v).isiOS()&&!0===/ipad/i.test(o),u=n.isiOS()&&!a,s=n.isiOS()||n.isAndroid(),c=s||i("(pointer:coarse)"),l=a||!u&&s&&i("(min-device-width:768px)"),f=u||s&&!l,d=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(o),m=!f&&!l&&!d,{isiPad:x(a),isiPhone:x(u),isTablet:x(l),isPhone:x(f),isTouch:x(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:x(d),isDesktop:x(m)})}},et=function(e){return V.window.matchMedia(e).matches},tt=(ye=!(he=function(){return Ze(V.navigator.userAgent,et)}),function(){for(var e=[],t=0;t=a.length&&r(o)}))})})},Bn=function(e){return On(e,Dn.nu)},Pn=function(n){return{is:function(e){return n===e},isValue:h,isError:g,getOr:x(n),getOrThunk:x(n),getOrDie:x(n),or:function(e){return Pn(n)},orThunk:function(e){return Pn(n)},fold:function(e,t){return t(n)},map:function(e){return Pn(e(n))},mapError:function(e){return Pn(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return R.some(n)}}},Ln=function(n){return{is:g,isValue:g,isError:h,getOr:d,getOrThunk:function(e){return e()},getOrDie:function(){return p(String(n))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Ln(n)},mapError:function(e){return Ln(e(n))},each:f,bind:function(e){return Ln(n)},exists:g,forall:h,toOption:R.none}},In={value:Pn,error:Ln,fromOption:function(e,t){return e.fold(function(){return Ln(t)},Pn)}},Mn=window.Promise?window.Promise:(xn=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Nn=(Sn=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],qn(e,Fn(zn,this),Fn(jn,this))}).immediateFn||"function"==typeof V.setImmediate&&V.setImmediate||function(e){V.setTimeout(e,1)},Sn.prototype["catch"]=function(e){return this.then(null,e)},Sn.prototype.then=function(n,r){var o=this;return new Sn(function(e,t){Un.call(o,new Vn(n,r,e,t))})},Sn.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&xn(arguments[0])?arguments[0]:arguments);return new Sn(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Mr=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Fr=/[<>&\"\']/g,Ur=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,zr={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};br={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},Cr={"<":"<",">":">","&":"&",""":'"',"'":"'"};var jr=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n>10),56320+(1023&t))):zr[t]||String.fromCharCode(t):Cr[e]||yr[e]||(n=e,(r=Ne.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},Wr={},Kr={},Xr=hr.makeMap,Yr=hr.each,Gr=hr.extend,Jr=hr.explode,Qr=hr.inArray,Zr=function(e,t){return(e=hr.trim(e))?e.split(t||" "):[]},eo=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n
    ').css(n).appendTo(a)[0];return c.set(R.some({caret:i,element:e,before:t})),c.get().each(function(e){t&&na(e.caret).addClass("mce-visual-caret-before")}),d(),(r=e.ownerDocument.createRange()).setStart(s,0),r.setEnd(s,0),r},hide:f,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){c.get().each(function(e){var t=ac(a,e.element,e.before);na(e.caret).css(pe({},t))})},destroy:function(){return Xn.clearInterval(n)}}},sc=function(){return oc.isIE()||oc.isEdge()||oc.isFirefox()},cc=function(e){return ic(e)||Gt(e)&&sc()},lc=an,fc=Kt("display","block table table-cell table-caption list-item"),dc=gu,mc=mu,pc=$t,gc=Du,hc=function(e,t){for(var n;n=e(t);)if(!mc(n))return n;return null},vc=function(e,t,n,r,o){var i=new ra(e,r);if(t<0){if((lc(e)||mc(e))&&n(e=hc(i.prev,!0)))return e;for(;e=hc(i.prev,o);)if(n(e))return e}if(0=o.data.length-1)return 1===e&&(r=s(o))?Sc(r):n;if(Cu(o)&&i<=1)return-1===e&&(r=u(o))?Nc(r):n;if(i===o.data.length)return(r=s(o))?Sc(r):n;if(0===i)return(r=u(o))?Nc(r):n}return n},kc=function(e,t){return R.from(Cc(e?0:-1,t)).filter(lc)},_c=function(e,t,n){var r=Ec(e,t,n);return-1===e?ls.fromRangeStart(r):ls.fromRangeEnd(r)},Rc=function(e){return R.from(e.getNode()).map(Ne.fromDom)},Tc=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},Ac=function(e,t){var n=bc(e,t);return!(n||!rn(e.getNode()))||n};(ds=fs=fs||{})[ds.Backwards=-1]="Backwards",ds[ds.Forwards=1]="Forwards";var Dc,Oc=an,Bc=Zt,Pc=$t,Lc=rn,Ic=Du,Mc=function(e){return Ru(e)||!!Ou(t=e)&&!0!==W(te(t.getElementsByTagName("*")),function(e,t){return e||Su(t)},!1);var t},Fc=Bu,Uc=function(e,t){return e.hasChildNodes()&&tu.length-1)return!!rl(c,i,r)||nl(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},il=function(e){return Zt(e)&&0=n.length?t=n.length-1:t<0&&(t=0),n[t]||e},jl=function(e,t,u){var n=t.startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,s=function(e){var t;return 3===(t=e[0]).nodeType&&t===n&&r>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===i&&0":" />",n&&u&&c[e]&&0"),u&&c[e]&&0")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push(""):d.push(""),u&&d.push("\n")},doctype:function(e){d.push("",u?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}},hf=function(t,p){void 0===p&&(p=no());var g=gf(t);(t=t||{}).validate=!("validate"in t)||t.validate;return{serialize:function(e){var f,d;d=t.validate,f={3:function(e){g.text(e.value,e.raw)},8:function(e){g.comment(e.value)},7:function(e){g.pi(e.name,e.value)},10:function(e){g.doctype(e.value)},4:function(e){g.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;m(e),e=e.next;);}},g.reset();var m=function(e){var t,n,r,o,i,a,u,s,c,l=f[e.type];if(l)l(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])u--;else if(!o[1]){if(o[2]in a)continue;u++}if(0===u)break}return r},bf=function(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null};function Cf(W,K){void 0===K&&(K=no());var e=function(){};!1!==(W=W||{}).fix_self_closing&&(W.fix_self_closing=!0);var X=W.comment?W.comment:e,Y=W.cdata?W.cdata:e,G=W.text?W.text:e,J=W.start?W.start:e,Q=W.end?W.end:e,Z=W.pi?W.pi:e,ee=W.doctype?W.doctype:e,n=function(m,e){void 0===e&&(e="html");var t,n,r,p,o,i,a,g,u,s,h,c,v,l,f,d,y,b,C,w,x,S,N,E,k,_,R,T,A,D=m.html,O=0,B=[],P=0,L=$r.decode,I=hr.makeMap("src,href,data,background,formaction,poster,xlink:href"),M=/((java|vb)script|mhtml):/i,F="html"===e?0:1,U=function(e){var t,n;for(t=B.length;t--&&B[t].name!==e;);if(0<=t){for(n=B.length-1;t<=n;n--)(e=B[n]).valid&&Q(e.name);B.length=t}},z=function(e,t){return G(vf(e,m),t)},j=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),W.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),X(vf(e,m)))},H=function(e,t){var n=e||"",r=!Ve(n,"--"),o=function(e,t,n){void 0===n&&(n=0);var r=e.toLowerCase();if(-1!==r.indexOf("[if ",n)&&(u=n,/^\s*\[if [\w\W]+\]>.*/.test(r.substr(u)))){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(t){var i=r.indexOf(">",n);return-1!==i?i:r.length}var a=/--!?>/;a.lastIndex=n;var u,s=a.exec(e);return s?s.index+s[0].length:r.length}(D,r,t);return e=D.substr(t,o-t),j(r?n+e:e),o+1},V=function(e,t,n,r,o){var i,a,u,s,c,l;if(t=t.toLowerCase(),u=t in h?t:L(n||r||o||""),n=de(m.uris,u).getOr(u),v&&!g&&!1==(0===(s=t).indexOf("data-")||0===s.indexOf("aria-"))){if(!(i=b[t])&&C){for(a=C.length;a--&&!(i=C[a]).pattern.test(t););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}if(I[t]&&!W.allow_script_urls){var f=n.replace(/[\s\u0000-\u001F]+/g,"");try{f=decodeURIComponent(f)}catch(d){f=unescape(f)}if(M.test(f))return;if(l=f,!(c=W).allow_html_data_urls&&(/^data:image\//i.test(l)?!1===c.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(l):/^data:/i.test(l)))return}g&&(t in I||0===t.indexOf("on"))||(p.map[t]=n,p.push({name:t,value:n}))};for(k=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),_=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,s=K.getShortEndedElements(),E=W.self_closing_elements||K.getSelfClosingElements(),h=K.getBoolAttrs(),v=W.validate,u=W.remove_internals,A=W.fix_self_closing,R=K.getSpecialElements(),N=D+">";t=k.exec(N);){var q=t[0];if(OD.length){z(L(D.substr(t.index))),O=t.index+q.length;continue}":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),c=n in s,A&&E[n]&&0]*data-mce-bogus="all"[^>]*>/g,d=e.schema;for(u=e.getTempAttrs(),s=l,c=new RegExp(["\\s?("+u.join("|")+')="[^"]+"'].join("|"),"gi"),l=s.replace(c,""),a=d.getShortEndedElements();i=f.exec(l);)r=f.lastIndex,o=i[0].length,n=a[i[1]]?r:kf.findEndTag(d,l,r),l=l.substring(0,r-o)+l.substring(n),f.lastIndex=r-o;return lu(l)},Rf=_f,Tf=function(e,t,n,r){var o,i,a,u,s;if(t.format=n,t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)o=hr.trim(Rf(e.serializer,r.innerHTML));else if("text"===t.format)o=lu(r.innerText||r.textContent);else{if("tree"===t.format)return e.serializer.serialize(r,t);a=(i=e).serializer.serialize(r,t),u=Hs(i),s=new RegExp("^(<"+u+"[^>]*>( | |\\s|\xa0|
    |)<\\/"+u+">[\r\n]*|
    [\r\n]*)$"),o=a.replace(s,"")}return"text"===t.format||Or(Ne.fromDom(r))?t.content=o:t.content=hr.trim(o),t.no_events||e.fire("GetContent",t),t.content},Af=hr.each,Df=function(o){this.compare=function(e,t){if(e.nodeName!==t.nodeName)return!1;var n=function(n){var r={};return Af(o.getAttribs(n),function(e){var t=e.nodeName.toLowerCase();0!==t.indexOf("_")&&"style"!==t&&0!==t.indexOf("data-")&&(r[t]=o.getAttrib(n,t))}),r},r=function(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0};return!!r(n(e),n(t))&&(!!r(o.parseStyle(o.getAttrib(e,"style")),o.parseStyle(o.getAttrib(t,"style")))&&(!ll(e)&&!ll(t)))}},Of=function(n,r,o){return R.from(o.container()).filter(Zt).exists(function(e){var t=n?0:-1;return r(e.data.charAt(o.offset()+t))})},Bf=N(Of,!0,dl),Pf=N(Of,!1,dl),Lf=function(e){var t=e.container();return Zt(t)&&0===t.data.length},If=function(t,n){return function(e){return R.from(Cc(t?0:-1,e)).filter(n).isSome()}},Mf=function(e){return"IMG"===e.nodeName&&"block"===mn(Ne.fromDom(e),"display")},Ff=function(e){return an(e)&&!($t(t=e)&&"all"===t.getAttribute("data-mce-bogus"));var t},Uf=If(!0,Mf),zf=If(!1,Mf),jf=If(!0,Gt),Hf=If(!1,Gt),Vf=If(!0,Ff),qf=If(!1,Ff),$f=function(e,t){var n,r,o,i=Ne.fromDom(e),a=Ne.fromDom(t);return n=a,r="pre,code",o=N(at,i),qa(n,r,o).isSome()},Wf=function(e,t){return Du(t)&&!1===(r=e,Zt(o=t)&&/^[ \t\r\n]*$/.test(o.data)&&!1===$f(r,o))||$t(n=t)&&"A"===n.nodeName&&n.hasAttribute("name")||Kf(t);var n,r,o},Kf=Xt("data-mce-bookmark"),Xf=Xt("data-mce-bogus"),Yf=(wf="data-mce-bogus",xf="all",function(e){return $t(e)&&e.getAttribute(wf)===xf}),Gf=function(e,t){return void 0===t&&(t=!0),function(e,t){var n,r=0;if(Wf(e,e))return!1;if(!(n=e.firstChild))return!0;var o=new ra(n,e);do{if(t){if(Yf(n)){n=o.next(!0);continue}if(Xf(n)){n=o.next();continue}}if(rn(n))r++,n=o.next();else{if(Wf(e,n))return!1;n=o.next()}}while(n);return r<=1}(e.dom(),t)},Jf=function(e){var t=Ua(e,"br"),n=H(function(e){for(var t=[],n=e.dom();n;)t.push(Ne.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),Er);t.length===n.length&&z(n,kt)},Qf=function(e){Et(e),St(e,Ne.fromHtml('
    '))},Zf=function(n){bt(n).each(function(t){dt(t).each(function(e){Sr(n)&&Er(t)&&Sr(e)&&kt(t)})})},ed=function(e,t,n){return st(t,e)?function(e,t){for(var n=D(t)?t:g,r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,a=Ne.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,function(e){return n(e)||at(e,t)}).slice(0,-1):[]},td=function(e,t){return ed(e,t,x(!1))},nd=function(e,t){return[e].concat(td(e,t))},rd=function(e,t,n){if(0!==n){var r,o,i,a=e.data.slice(t,t+n),u=t+n>=e.data.length,s=0===t;e.replaceData(t,n,(o=s,i=u,W(r=a,function(e,t){return dl(t)||fl(t)?e.previousCharIsSpace||""===e.str&&o||e.str.length===r.length-1&&i?{previousCharIsSpace:!1,str:e.str+oo}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}},{previousCharIsSpace:!1,str:""}).str))}},od=function(e,t){var n=e.data.slice(t),r=n.length-We(n).length;return rd(e,t,r)},id=function(e,t){return r=e,o=(n=t).container(),i=n.offset(),!1===ms.isTextPosition(n)&&o===r.parentNode&&i>ms.before(r).offset()?ms(t.container(),t.offset()-1):t;var n,r,o,i},ad=function(e){return Du(e.previousSibling)?R.some((t=e.previousSibling,Zt(t)?ms(t,t.data.length):ms.after(t))):e.previousSibling?el(e.previousSibling):R.none();var t},ud=function(e){return Du(e.nextSibling)?R.some((t=e.nextSibling,Zt(t)?ms(t,0):ms.before(t))):e.nextSibling?Zc(e.nextSibling):R.none();var t},sd=function(r,o){return ad(o).orThunk(function(){return ud(o)}).orThunk(function(){return e=r,t=o,n=ms.before(t.previousSibling?t.previousSibling:t.parentNode),Qc(e,n).fold(function(){return Jc(e,ms.after(t))},R.some);var e,t,n})},cd=function(n,r){return ud(r).orThunk(function(){return ad(r)}).orThunk(function(){return t=r,Jc(e=n,ms.after(t)).fold(function(){return Qc(e,ms.before(t))},R.some);var e,t})},ld=function(e,t,n){return(e?cd:sd)(t,n).map(N(id,n))},fd=function(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})},dd=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(Rt(t))},md=function(e){if(Gf(e)){var t=Ne.fromHtml('
    ');return Et(e),St(e,t),R.some(ms.before(t.dom()))}return R.none()},pd=function(e,t,l){var n,r,o,i,a=dt(e).filter(Ot),u=mt(e).filter(Ot);return kt(e),r=u,o=t,i=function(e,t,n){var r,o,i,a,u=e.dom(),s=t.dom(),c=u.data.length;return o=s,i=l,a=Ke((r=u).data).length,r.appendData(o.data),kt(Ne.fromDom(o)),i&&od(r,a),n.container()===s?ms(u,c):n},((n=a).isSome()&&r.isSome()&&o.isSome()?R.some(i(n.getOrDie(),r.getOrDie(),o.getOrDie())):R.none()).orThunk(function(){return l&&(a.each(function(e){return t=e.dom(),n=e.dom().length,r=t.data.slice(0,n),o=r.length-Ke(r).length,rd(t,n-o,o);var t,n,r,o}),u.each(function(e){return od(e.dom(),0)})),t})},gd=function(t,n,e,r){void 0===r&&(r=!0);var o,i,a=ld(n,t.getBody(),e.dom()),u=Ha(e,N(dd,t),(o=t.getBody(),function(e){return e.dom()===o})),s=pd(e,a,(i=e,me(t.schema.getTextInlineElements(),Rt(i))));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):u.bind(md).fold(function(){r&&fd(t,n,s)},function(e){r&&fd(t,n,R.some(e))})},hd=function(a){if(!k(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return z(a,function(e,r){var t=ne(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(n[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!k(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t|)$/," "):o("nextSibling")||(t=t.replace(/( | )(
    |)$/," "))),t}(p.getRng(),t)),r=e.parser,m=n.merge,o=hf({validate:e.settings.validate},e.schema),d='​',s={content:t,format:"html",selection:!0,paste:n.paste},(s=e.fire("BeforeSetContent",s)).isDefaultPrevented())e.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=s.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var h,v,y,b,C,w,x=(l=p.getRng()).startContainer||(l.parentElement?l.parentElement():null),S=e.getBody();x===S&&p.isCollapsed()&&g.isBlock(S.firstChild)&&(h=e,(v=S.firstChild)&&!h.schema.getShortEndedElements()[v.nodeName])&&g.isEmpty(S.firstChild)&&((l=g.createRng()).setStart(S.firstChild,0),l.setEnd(S.firstChild,0),p.setRng(l)),p.isCollapsed()||(nm(e),y=e.selection.getRng(),b=t,C=y.startContainer,w=y.startOffset,3===C.nodeType&&y.collapsed&&(C.data[w]===oo?(C.deleteData(w,1),/[\u00a0| ]$/.test(b)||(b+=" ")):C.data[w-1]===oo&&(C.deleteData(w-1,1),/[\u00a0| ]$/.test(b)||(b=" "+b))),t=b);var N,E,k,_={context:(i=p.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(t,_),!0===n.paste&&Kd(e.schema,u)&&Gd(g,i))return l=Zd(o,g,e.selection.getRng(),u),e.selection.setRng(l),void e.fire("SetContent",s);if(!function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(c=f).prev;f;f=f.walk(!0))if(3===f.type||!g.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),_.invalid){for(tm(e,d),i=p.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:g.getOuterHTML(i),t=o.serialize(r.parse(t.replace(//i,function(){return o.serialize(u)}))),i===a?g.setHTML(a,t):g.setOuterHTML(i,t)}else!function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):tm(e,t)}}(e,t=o.serialize(u),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new Df(r);hr.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,m),function(n,e){var t,r,o,i,a,u=n.dom,s=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),s.select(t);var c=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(c.setStart(i,i.nodeValue.length),rr.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(c.setStartBefore(e),c.setEndBefore(e));r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(n.$(r).empty(),c.setStart(r,0),c.setEnd(r,0),em(r)||r.getAttribute("data-mce-fragment")||!(o=function(e){var t=ms.fromRangeStart(e);if(t=Hc(n.getBody()).next(t))return t.toRange()}(c))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(c=o,u.remove(r))),s.setRng(c)}}(e,g.get("mce_marker")),N=e.getBody(),hr.each(N.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),E=e.dom,k=e.selection.getStart(),R.from(E.getParent(k,"td,th")).map(Ne.fromDom).each(Zf),e.fire("SetContent",s),e.addVisual()}},om=function(e){var t=ct(e).dom();return e.dom()===t.activeElement},im=function(e){var t=e!==undefined?e.dom():V.document;return R.from(t.activeElement).map(Ne.fromDom)},am=function(e,t,n,r){return{start:x(e),soffset:x(t),finish:x(n),foffset:x(r)}},um=hd([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),sm=(um.before,um.on,um.after,function(e){return e.fold(d,d,d)}),cm=hd([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),lm={domRange:cm.domRange,relative:cm.relative,exact:cm.exact,exactFromRange:function(e){return cm.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){var t=e.match({domRange:function(e){return Ne.fromDom(e.startContainer)},relative:function(e,t){return sm(e)},exact:function(e,t,n,r){return e}});return lt(t)},range:am},fm=nt().browser,dm=function(e,t){var n=Ot(t)?ef(t).length:ht(t).length+1;return n',"TABLE"===n.nodeName?r="
    "+a+"
    9
    + !function(V){"use strict";var r=function(e){if(null===e)return"null";if(e===undefined)return"undefined";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},t=function(e){return{eq:e}},s=t(function(e,t){return e===t}),i=function(o){return t(function(e,t){if(e.length!==t.length)return!1;for(var n=e.length,r=0;r=r.length&&n.substr(o,o+r.length)===r;var n,r,o},qe=function(t){return function(e){return e.replace(t,"")}},$e=qe(/^\s+|\s+$/g),We=qe(/^\s+/g),Ke=qe(/\s+$/g),Xe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ye=function(t){return function(e){return He(e,t)}},Ge=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return He(e,"edge/")&&He(e,"chrome")&&He(e,"safari")&&He(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Xe],search:function(e){return He(e,"chrome")&&!He(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return He(e,"msie")||He(e,"trident")}},{name:"Opera",versionRegexes:[Xe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ye("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ye("firefox")},{name:"Safari",versionRegexes:[Xe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(He(e,"safari")||He(e,"mobile/"))&&He(e,"applewebkit")}}],Je=[{name:"Windows",search:Ye("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return He(e,"iphone")||He(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ye("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ye("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ye("linux"),versionRegexes:[]},{name:"Solaris",search:Ye("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ye("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ye("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Qe={browsers:x(Ge),oses:x(Je)},Ze=function(e,t){var n,r,o,i,a,u,s,c,l,f,d,m,p=Qe.browsers(),g=Qe.oses(),h=ze(p,e).fold(De.unknown,De.nu),v=je(g,e).fold(Fe.unknown,Fe.nu);return{browser:h,os:v,deviceType:(r=h,o=e,i=t,a=(n=v).isiOS()&&!0===/ipad/i.test(o),u=n.isiOS()&&!a,s=n.isiOS()||n.isAndroid(),c=s||i("(pointer:coarse)"),l=a||!u&&s&&i("(min-device-width:768px)"),f=u||s&&!l,d=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(o),m=!f&&!l&&!d,{isiPad:x(a),isiPhone:x(u),isTablet:x(l),isPhone:x(f),isTouch:x(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:x(d),isDesktop:x(m)})}},et=function(e){return V.window.matchMedia(e).matches},tt=(ye=!(he=function(){return Ze(V.navigator.userAgent,et)}),function(){for(var e=[],t=0;t=a.length&&r(o)}))})})},Bn=function(e){return On(e,Dn.nu)},Pn=function(n){return{is:function(e){return n===e},isValue:h,isError:g,getOr:x(n),getOrThunk:x(n),getOrDie:x(n),or:function(e){return Pn(n)},orThunk:function(e){return Pn(n)},fold:function(e,t){return t(n)},map:function(e){return Pn(e(n))},mapError:function(e){return Pn(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return R.some(n)}}},Ln=function(n){return{is:g,isValue:g,isError:h,getOr:d,getOrThunk:function(e){return e()},getOrDie:function(){return p(String(n))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Ln(n)},mapError:function(e){return Ln(e(n))},each:f,bind:function(e){return Ln(n)},exists:g,forall:h,toOption:R.none}},In={value:Pn,error:Ln,fromOption:function(e,t){return e.fold(function(){return Ln(t)},Pn)}},Mn=window.Promise?window.Promise:(xn=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Nn=(Sn=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],qn(e,Fn(zn,this),Fn(jn,this))}).immediateFn||"function"==typeof V.setImmediate&&V.setImmediate||function(e){V.setTimeout(e,1)},Sn.prototype["catch"]=function(e){return this.then(null,e)},Sn.prototype.then=function(n,r){var o=this;return new Sn(function(e,t){Un.call(o,new Vn(n,r,e,t))})},Sn.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&xn(arguments[0])?arguments[0]:arguments);return new Sn(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Mr=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Fr=/[<>&\"\']/g,Ur=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,zr={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};br={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},Cr={"<":"<",">":">","&":"&",""":'"',"'":"'"};var jr=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n>10),56320+(1023&t))):zr[t]||String.fromCharCode(t):Cr[e]||yr[e]||(n=e,(r=Ne.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},Wr={},Kr={},Xr=hr.makeMap,Yr=hr.each,Gr=hr.extend,Jr=hr.explode,Qr=hr.inArray,Zr=function(e,t){return(e=hr.trim(e))?e.split(t||" "):[]},eo=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n
    ').css(n).appendTo(a)[0];return c.set(R.some({caret:i,element:e,before:t})),c.get().each(function(e){t&&na(e.caret).addClass("mce-visual-caret-before")}),d(),(r=e.ownerDocument.createRange()).setStart(s,0),r.setEnd(s,0),r},hide:f,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){c.get().each(function(e){var t=ac(a,e.element,e.before);na(e.caret).css(pe({},t))})},destroy:function(){return Xn.clearInterval(n)}}},sc=function(){return oc.isIE()||oc.isEdge()||oc.isFirefox()},cc=function(e){return ic(e)||Gt(e)&&sc()},lc=an,fc=Kt("display","block table table-cell table-caption list-item"),dc=gu,mc=mu,pc=$t,gc=Du,hc=function(e,t){for(var n;n=e(t);)if(!mc(n))return n;return null},vc=function(e,t,n,r,o){var i=new ra(e,r);if(t<0){if((lc(e)||mc(e))&&n(e=hc(i.prev,!0)))return e;for(;e=hc(i.prev,o);)if(n(e))return e}if(0=o.data.length-1)return 1===e&&(r=s(o))?Sc(r):n;if(Cu(o)&&i<=1)return-1===e&&(r=u(o))?Nc(r):n;if(i===o.data.length)return(r=s(o))?Sc(r):n;if(0===i)return(r=u(o))?Nc(r):n}return n},kc=function(e,t){return R.from(Cc(e?0:-1,t)).filter(lc)},_c=function(e,t,n){var r=Ec(e,t,n);return-1===e?ls.fromRangeStart(r):ls.fromRangeEnd(r)},Rc=function(e){return R.from(e.getNode()).map(Ne.fromDom)},Tc=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},Ac=function(e,t){var n=bc(e,t);return!(n||!rn(e.getNode()))||n};(ds=fs=fs||{})[ds.Backwards=-1]="Backwards",ds[ds.Forwards=1]="Forwards";var Dc,Oc=an,Bc=Zt,Pc=$t,Lc=rn,Ic=Du,Mc=function(e){return Ru(e)||!!Ou(t=e)&&!0!==W(te(t.getElementsByTagName("*")),function(e,t){return e||Su(t)},!1);var t},Fc=Bu,Uc=function(e,t){return e.hasChildNodes()&&tu.length-1)return!!rl(c,i,r)||nl(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},il=function(e){return Zt(e)&&0=n.length?t=n.length-1:t<0&&(t=0),n[t]||e},jl=function(e,t,u){var n=t.startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,s=function(e){var t;return 3===(t=e[0]).nodeType&&t===n&&r>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===i&&0":" />",n&&u&&c[e]&&0"),u&&c[e]&&0")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push(""):d.push(""),u&&d.push("\n")},doctype:function(e){d.push("",u?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}},hf=function(t,p){void 0===p&&(p=no());var g=gf(t);(t=t||{}).validate=!("validate"in t)||t.validate;return{serialize:function(e){var f,d;d=t.validate,f={3:function(e){g.text(e.value,e.raw)},8:function(e){g.comment(e.value)},7:function(e){g.pi(e.name,e.value)},10:function(e){g.doctype(e.value)},4:function(e){g.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;m(e),e=e.next;);}},g.reset();var m=function(e){var t,n,r,o,i,a,u,s,c,l=f[e.type];if(l)l(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])u--;else if(!o[1]){if(o[2]in a)continue;u++}if(0===u)break}return r},bf=function(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null};function Cf(W,K){void 0===K&&(K=no());var e=function(){};!1!==(W=W||{}).fix_self_closing&&(W.fix_self_closing=!0);var X=W.comment?W.comment:e,Y=W.cdata?W.cdata:e,G=W.text?W.text:e,J=W.start?W.start:e,Q=W.end?W.end:e,Z=W.pi?W.pi:e,ee=W.doctype?W.doctype:e,n=function(m,e){void 0===e&&(e="html");var t,n,r,p,o,i,a,g,u,s,h,c,v,l,f,d,y,b,C,w,x,S,N,E,k,_,R,T,A,D=m.html,O=0,B=[],P=0,L=$r.decode,I=hr.makeMap("src,href,data,background,formaction,poster,xlink:href"),M=/((java|vb)script|mhtml):/i,F="html"===e?0:1,U=function(e){var t,n;for(t=B.length;t--&&B[t].name!==e;);if(0<=t){for(n=B.length-1;t<=n;n--)(e=B[n]).valid&&Q(e.name);B.length=t}},z=function(e,t){return G(vf(e,m),t)},j=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),W.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),X(vf(e,m)))},H=function(e,t){var n=e||"",r=!Ve(n,"--"),o=function(e,t,n){void 0===n&&(n=0);var r=e.toLowerCase();if(-1!==r.indexOf("[if ",n)&&(u=n,/^\s*\[if [\w\W]+\]>.*/.test(r.substr(u)))){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(t){var i=r.indexOf(">",n);return-1!==i?i:r.length}var a=/--!?>/;a.lastIndex=n;var u,s=a.exec(e);return s?s.index+s[0].length:r.length}(D,r,t);return e=D.substr(t,o-t),j(r?n+e:e),o+1},V=function(e,t,n,r,o){var i,a,u,s,c,l;if(t=t.toLowerCase(),u=t in h?t:L(n||r||o||""),n=de(m.uris,u).getOr(u),v&&!g&&!1==(0===(s=t).indexOf("data-")||0===s.indexOf("aria-"))){if(!(i=b[t])&&C){for(a=C.length;a--&&!(i=C[a]).pattern.test(t););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}if(I[t]&&!W.allow_script_urls){var f=n.replace(/[\s\u0000-\u001F]+/g,"");try{f=decodeURIComponent(f)}catch(d){f=unescape(f)}if(M.test(f))return;if(l=f,!(c=W).allow_html_data_urls&&(/^data:image\//i.test(l)?!1===c.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(l):/^data:/i.test(l)))return}g&&(t in I||0===t.indexOf("on"))||(p.map[t]=n,p.push({name:t,value:n}))};for(k=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),_=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,s=K.getShortEndedElements(),E=W.self_closing_elements||K.getSelfClosingElements(),h=K.getBoolAttrs(),v=W.validate,u=W.remove_internals,A=W.fix_self_closing,R=K.getSpecialElements(),N=D+">";t=k.exec(N);){var q=t[0];if(OD.length){z(L(D.substr(t.index))),O=t.index+q.length;continue}":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),c=n in s,A&&E[n]&&0]*data-mce-bogus="all"[^>]*>/g,d=e.schema;for(u=e.getTempAttrs(),s=l,c=new RegExp(["\\s?("+u.join("|")+')="[^"]+"'].join("|"),"gi"),l=s.replace(c,""),a=d.getShortEndedElements();i=f.exec(l);)r=f.lastIndex,o=i[0].length,n=a[i[1]]?r:kf.findEndTag(d,l,r),l=l.substring(0,r-o)+l.substring(n),f.lastIndex=r-o;return lu(l)},Rf=_f,Tf=function(e,t,n,r){var o,i,a,u,s;if(t.format=n,t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)o=hr.trim(Rf(e.serializer,r.innerHTML));else if("text"===t.format)o=lu(r.innerText||r.textContent);else{if("tree"===t.format)return e.serializer.serialize(r,t);a=(i=e).serializer.serialize(r,t),u=Hs(i),s=new RegExp("^(<"+u+"[^>]*>( | |\\s|\xa0|
    |)<\\/"+u+">[\r\n]*|
    [\r\n]*)$"),o=a.replace(s,"")}return"text"===t.format||Or(Ne.fromDom(r))?t.content=o:t.content=hr.trim(o),t.no_events||e.fire("GetContent",t),t.content},Af=hr.each,Df=function(o){this.compare=function(e,t){if(e.nodeName!==t.nodeName)return!1;var n=function(n){var r={};return Af(o.getAttribs(n),function(e){var t=e.nodeName.toLowerCase();0!==t.indexOf("_")&&"style"!==t&&0!==t.indexOf("data-")&&(r[t]=o.getAttrib(n,t))}),r},r=function(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0};return!!r(n(e),n(t))&&(!!r(o.parseStyle(o.getAttrib(e,"style")),o.parseStyle(o.getAttrib(t,"style")))&&(!ll(e)&&!ll(t)))}},Of=function(n,r,o){return R.from(o.container()).filter(Zt).exists(function(e){var t=n?0:-1;return r(e.data.charAt(o.offset()+t))})},Bf=N(Of,!0,dl),Pf=N(Of,!1,dl),Lf=function(e){var t=e.container();return Zt(t)&&0===t.data.length},If=function(t,n){return function(e){return R.from(Cc(t?0:-1,e)).filter(n).isSome()}},Mf=function(e){return"IMG"===e.nodeName&&"block"===mn(Ne.fromDom(e),"display")},Ff=function(e){return an(e)&&!($t(t=e)&&"all"===t.getAttribute("data-mce-bogus"));var t},Uf=If(!0,Mf),zf=If(!1,Mf),jf=If(!0,Gt),Hf=If(!1,Gt),Vf=If(!0,Ff),qf=If(!1,Ff),$f=function(e,t){var n,r,o,i=Ne.fromDom(e),a=Ne.fromDom(t);return n=a,r="pre,code",o=N(at,i),qa(n,r,o).isSome()},Wf=function(e,t){return Du(t)&&!1===(r=e,Zt(o=t)&&/^[ \t\r\n]*$/.test(o.data)&&!1===$f(r,o))||$t(n=t)&&"A"===n.nodeName&&n.hasAttribute("name")||Kf(t);var n,r,o},Kf=Xt("data-mce-bookmark"),Xf=Xt("data-mce-bogus"),Yf=(wf="data-mce-bogus",xf="all",function(e){return $t(e)&&e.getAttribute(wf)===xf}),Gf=function(e,t){return void 0===t&&(t=!0),function(e,t){var n,r=0;if(Wf(e,e))return!1;if(!(n=e.firstChild))return!0;var o=new ra(n,e);do{if(t){if(Yf(n)){n=o.next(!0);continue}if(Xf(n)){n=o.next();continue}}if(rn(n))r++,n=o.next();else{if(Wf(e,n))return!1;n=o.next()}}while(n);return r<=1}(e.dom(),t)},Jf=function(e){var t=Ua(e,"br"),n=H(function(e){for(var t=[],n=e.dom();n;)t.push(Ne.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),Er);t.length===n.length&&z(n,kt)},Qf=function(e){Et(e),St(e,Ne.fromHtml('
    '))},Zf=function(n){bt(n).each(function(t){dt(t).each(function(e){Sr(n)&&Er(t)&&Sr(e)&&kt(t)})})},ed=function(e,t,n){return st(t,e)?function(e,t){for(var n=D(t)?t:g,r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,a=Ne.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,function(e){return n(e)||at(e,t)}).slice(0,-1):[]},td=function(e,t){return ed(e,t,x(!1))},nd=function(e,t){return[e].concat(td(e,t))},rd=function(e,t,n){if(0!==n){var r,o,i,a=e.data.slice(t,t+n),u=t+n>=e.data.length,s=0===t;e.replaceData(t,n,(o=s,i=u,W(r=a,function(e,t){return dl(t)||fl(t)?e.previousCharIsSpace||""===e.str&&o||e.str.length===r.length-1&&i?{previousCharIsSpace:!1,str:e.str+oo}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}},{previousCharIsSpace:!1,str:""}).str))}},od=function(e,t){var n=e.data.slice(t),r=n.length-We(n).length;return rd(e,t,r)},id=function(e,t){return r=e,o=(n=t).container(),i=n.offset(),!1===ms.isTextPosition(n)&&o===r.parentNode&&i>ms.before(r).offset()?ms(t.container(),t.offset()-1):t;var n,r,o,i},ad=function(e){return Du(e.previousSibling)?R.some((t=e.previousSibling,Zt(t)?ms(t,t.data.length):ms.after(t))):e.previousSibling?el(e.previousSibling):R.none();var t},ud=function(e){return Du(e.nextSibling)?R.some((t=e.nextSibling,Zt(t)?ms(t,0):ms.before(t))):e.nextSibling?Zc(e.nextSibling):R.none();var t},sd=function(r,o){return ad(o).orThunk(function(){return ud(o)}).orThunk(function(){return e=r,t=o,n=ms.before(t.previousSibling?t.previousSibling:t.parentNode),Qc(e,n).fold(function(){return Jc(e,ms.after(t))},R.some);var e,t,n})},cd=function(n,r){return ud(r).orThunk(function(){return ad(r)}).orThunk(function(){return t=r,Jc(e=n,ms.after(t)).fold(function(){return Qc(e,ms.before(t))},R.some);var e,t})},ld=function(e,t,n){return(e?cd:sd)(t,n).map(N(id,n))},fd=function(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})},dd=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(Rt(t))},md=function(e){if(Gf(e)){var t=Ne.fromHtml('
    ');return Et(e),St(e,t),R.some(ms.before(t.dom()))}return R.none()},pd=function(e,t,l){var n,r,o,i,a=dt(e).filter(Ot),u=mt(e).filter(Ot);return kt(e),r=u,o=t,i=function(e,t,n){var r,o,i,a,u=e.dom(),s=t.dom(),c=u.data.length;return o=s,i=l,a=Ke((r=u).data).length,r.appendData(o.data),kt(Ne.fromDom(o)),i&&od(r,a),n.container()===s?ms(u,c):n},((n=a).isSome()&&r.isSome()&&o.isSome()?R.some(i(n.getOrDie(),r.getOrDie(),o.getOrDie())):R.none()).orThunk(function(){return l&&(a.each(function(e){return t=e.dom(),n=e.dom().length,r=t.data.slice(0,n),o=r.length-Ke(r).length,rd(t,n-o,o);var t,n,r,o}),u.each(function(e){return od(e.dom(),0)})),t})},gd=function(t,n,e,r){void 0===r&&(r=!0);var o,i,a=ld(n,t.getBody(),e.dom()),u=Ha(e,N(dd,t),(o=t.getBody(),function(e){return e.dom()===o})),s=pd(e,a,(i=e,me(t.schema.getTextInlineElements(),Rt(i))));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):u.bind(md).fold(function(){r&&fd(t,n,s)},function(e){r&&fd(t,n,R.some(e))})},hd=function(a){if(!k(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return z(a,function(e,r){var t=ne(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(n[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!k(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t|)$/," "):o("nextSibling")||(t=t.replace(/( | )(
    |)$/," "))),t}(p.getRng(),t)),r=e.parser,m=n.merge,o=hf({validate:e.settings.validate},e.schema),d='​',s={content:t,format:"html",selection:!0,paste:n.paste},(s=e.fire("BeforeSetContent",s)).isDefaultPrevented())e.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=s.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var h,v,y,b,C,w,x=(l=p.getRng()).startContainer||(l.parentElement?l.parentElement():null),S=e.getBody();x===S&&p.isCollapsed()&&g.isBlock(S.firstChild)&&(h=e,(v=S.firstChild)&&!h.schema.getShortEndedElements()[v.nodeName])&&g.isEmpty(S.firstChild)&&((l=g.createRng()).setStart(S.firstChild,0),l.setEnd(S.firstChild,0),p.setRng(l)),p.isCollapsed()||(nm(e),y=e.selection.getRng(),b=t,C=y.startContainer,w=y.startOffset,3===C.nodeType&&y.collapsed&&(C.data[w]===oo?(C.deleteData(w,1),/[\u00a0| ]$/.test(b)||(b+=" ")):C.data[w-1]===oo&&(C.deleteData(w-1,1),/[\u00a0| ]$/.test(b)||(b=" "+b))),t=b);var N,E,k,_={context:(i=p.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(t,_),!0===n.paste&&Kd(e.schema,u)&&Gd(g,i))return l=Zd(o,g,e.selection.getRng(),u),e.selection.setRng(l),void e.fire("SetContent",s);if(!function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(c=f).prev;f;f=f.walk(!0))if(3===f.type||!g.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),_.invalid){for(tm(e,d),i=p.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:g.getOuterHTML(i),t=o.serialize(r.parse(t.replace(//i,function(){return o.serialize(u)}))),i===a?g.setHTML(a,t):g.setOuterHTML(i,t)}else!function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):tm(e,t)}}(e,t=o.serialize(u),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new Df(r);hr.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,m),function(n,e){var t,r,o,i,a,u=n.dom,s=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),s.select(t);var c=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(c.setStart(i,i.nodeValue.length),rr.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(c.setStartBefore(e),c.setEndBefore(e));r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(n.$(r).empty(),c.setStart(r,0),c.setEnd(r,0),em(r)||r.getAttribute("data-mce-fragment")||!(o=function(e){var t=ms.fromRangeStart(e);if(t=Hc(n.getBody()).next(t))return t.toRange()}(c))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(c=o,u.remove(r))),s.setRng(c)}}(e,g.get("mce_marker")),N=e.getBody(),hr.each(N.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),E=e.dom,k=e.selection.getStart(),R.from(E.getParent(k,"td,th")).map(Ne.fromDom).each(Zf),e.fire("SetContent",s),e.addVisual()}},om=function(e){var t=ct(e).dom();return e.dom()===t.activeElement},im=function(e){var t=e!==undefined?e.dom():V.document;return R.from(t.activeElement).map(Ne.fromDom)},am=function(e,t,n,r){return{start:x(e),soffset:x(t),finish:x(n),foffset:x(r)}},um=hd([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),sm=(um.before,um.on,um.after,function(e){return e.fold(d,d,d)}),cm=hd([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),lm={domRange:cm.domRange,relative:cm.relative,exact:cm.exact,exactFromRange:function(e){return cm.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){var t=e.match({domRange:function(e){return Ne.fromDom(e.startContainer)},relative:function(e,t){return sm(e)},exact:function(e,t,n,r){return e}});return lt(t)},range:am},fm=nt().browser,dm=function(e,t){var n=Ot(t)?ef(t).length:ht(t).length+1;return n',"TABLE"===n.nodeName?r="
    "+a+"
    metadata CHANGED
    @@ -1,14 +1,14 @@
    1
    1
      --- !ruby/object:Gem::Specification
    2
    2
      name: tinymce-rails
    3
    3
      version: !ruby/object:Gem::Version
    4
    - version: 5.3.0
    4
    + version: 5.3.2
    5
    5
      platform: ruby
    6
    6
      authors:
    7
    7
      - Sam Pohlenz
    8
    8
      autorequire:
    9
    9
      bindir: bin
    10
    10
      cert_chain: []
    11
    - date: 2020-05-21 00:00:00.000000000 Z
    11
    + date: 2020-06-10 00:00:00.000000000 Z
    12
    12
      dependencies:
    13
    13
      - !ruby/object:Gem::Dependency
    14
    14
      name: railties