tinymce-rails 5.6.1 → 5.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/source/tinymce/tinymce.js +3 -3
  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 +1 -1
  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/themes/mobile/theme.js +1 -1
  49. data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +2 -2
  50. data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
  51. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c6bcc8f9687f3c8589968d7bb3ed2e821139801cc800113eba9eac5b28c2a40
4
- data.tar.gz: 1589c8b63fe0d6265e3833cf82a606bdfe2148884cf19ccacd7f920cdba63f1a
3
+ metadata.gz: 5d491e52271301e60ad19c3140e88cdd34db8683e2da56daa8f590f507f20659
4
+ data.tar.gz: e5b165b06bf8abb9cced34b26939ff34a52916b91f72af836c724c719858899a
5
5
  SHA512:
6
- metadata.gz: eb6a91e42e2142bdfda4f407a5d7bb70431dfdd13d3b5cbc76ec279211131ca6b2255dbf81fe491fac29ec7d5035006a6b014c7b64f67be41a1dbb283969a7e2
7
- data.tar.gz: 89832d511d4278c6378e063252d3b6b3434dd27f6833b3a778d4283ab744ba99c2bc29fc43c34f3a436ec01cff1193318cd8a3d1467b1969fa2490deadc9e0fa
6
+ metadata.gz: 9e86eae512a802233e70ecc5e9de00265f2fdf3110d6a94f72bb423689f26612ded4d266ec277a388c0d2f300caa14a91efb1783ca39f9e6b854e7b28c4b440e
7
+ data.tar.gz: e4e18abd76b8f984d1364003eab9671d800c3c487f4766a257a70e710b8d8ef9b6f6f26c9e2d55a792201c7b022dae9a4c9f50255df7d1ce62408b62fd693f8e
@@ -4,7 +4,7 @@
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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  (function () {
10
10
  'use strict';
@@ -28739,8 +28739,8 @@
28739
28739
  suffix: null,
28740
28740
  $: DomQuery,
28741
28741
  majorVersion: '5',
28742
- minorVersion: '6.1',
28743
- releaseDate: '2020-11-25',
28742
+ minorVersion: '6.2',
28743
+ releaseDate: '2020-12-08',
28744
28744
  editors: legacyEditors,
28745
28745
  i18n: I18n,
28746
28746
  activeEditor: null,
@@ -1,6 +1,6 @@
1
1
  module TinyMCE
2
2
  module Rails
3
- VERSION = "5.6.1"
4
- TINYMCE_VERSION = "5.6.1"
3
+ VERSION = "5.6.2"
4
+ TINYMCE_VERSION = "5.6.2"
5
5
  end
6
6
  end
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var n,e,t,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(n,e,t){var r="UL"===e?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===t?null:{"list-style-type":t})},l=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(n){return function(){return n}},c=i(!1),s=i(!0),o=function(){return a},a=(n=function(n){return n.isNone()},{fold:function(n,e){return n()},is:c,isSome:c,isNone:s,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:t,orThunk:e,map:o,each:function(){},bind:o,exists:c,forall:s,filter:o,equals:n,equals_:n,toArray:function(){return[]},toString:i("none()")}),f=function(t){var n=i(t),e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:s,isNone:c,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return f(n(t))},each:function(n){n(t)},bind:r,exists:r,forall:r,filter:function(n){return n(t)?o:a},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(c,function(n){return e(t,n)})}};return o},d=function(n){return null===n||n===undefined?a:f(n)},g=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},m=function(r){return function(n){return n&&/^(OL|UL|DL)$/.test(n.nodeName)&&(t=n,(e=r).$.contains(e.getBody(),t));var e,t}},p=function(n,e,t){var r=function(n,e){for(var t=0;t<n.length;t++){if(e(n[t]))return t}return-1}(e.parents,g),o=-1!==r?e.parents.slice(0,r):e.parents,i=l.grep(o,m(n));return 0<i.length&&i[0].nodeName===t},y=function(o,n,e,t,r,i){o.ui.registry.addSplitButton(n,{tooltip:e,icon:"OL"===r?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(n){n(l.map(i,function(n){return{type:"choiceitem",value:"default"===n?"":n,icon:"list-"+("OL"===r?"num":"bull")+"-"+("disc"===n||"decimal"===n?"default":n),text:n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()})}}))},onAction:function(){return o.execCommand(t)},onItemAction:function(n,e){u(o,r,e)},select:function(e){var n,t,r;return(t=(n=o).dom.getParent(n.selection.getNode(),"ol,ul"),r=n.dom.getStyle(t,"listStyleType"),d(r)).map(function(n){return e===n}).getOr(!1)},onSetup:function(e){var n=function(n){e.setActive(p(o,n,r))};return o.on("NodeChange",n),function(){return o.off("NodeChange",n)}}})},v=function(n,e,t,r,o,i){var u,l,c,s,a;1<i.length?y(n,e,t,r,o,i):(l=e,c=t,s=r,a=o,(u=n).ui.registry.addToggleButton(l,{active:!1,tooltip:c,icon:"OL"===a?"ordered-list":"unordered-list",onSetup:function(e){var n=function(n){e.setActive(p(u,n,a))};return u.on("NodeChange",n),function(){return u.off("NodeChange",n)}},onAction:function(){return u.execCommand(s)}}))};r.add("advlist",function(n){var t,e,r,o;n.hasPlugin("lists")&&(v(e=n,"numlist","Numbered list","InsertOrderedList","OL",(r=e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"))?r.split(/[ ,]/):[]),v(e,"bullist","Bullet list","InsertUnorderedList","UL",(o=e.getParam("advlist_bullet_styles","default,circle,square"))?o.split(/[ ,]/):[]),(t=n).addCommand("ApplyUnorderedListStyle",function(n,e){u(t,"UL",e["list-style-type"])}),t.addCommand("ApplyOrderedListStyle",function(n,e){u(t,"OL",e["list-style-type"])}))})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),a="a:not([href])",n=function(e){return e.getAttribute("id")||e.getAttribute("name")||""},r=function(e){return(t=e)&&"a"===t.nodeName.toLowerCase()&&!e.getAttribute("href")&&""!==n(e);var t},c=function(e){var n=e.dom;t(n).walk(e.selection.getRng(),function(e){o.each(e,function(e){var t;r(t=e)&&!t.firstChild&&n.remove(e,!1)})})},u=function(e){return e.dom.getParent(e.selection.getStart(),a)},i=function(e,t){var n,o,a,r,i,l=u(e);l?(a=e,r=t,(i=l).removeAttribute("name"),i.id=r,a.addVisual(),a.undoManager.add()):(o=t,(n=e).undoManager.transact(function(){n.getParam("allow_html_in_named_anchor",!1,"boolean")||n.selection.collapse(!0),n.selection.isCollapsed()?n.insertContent(n.dom.createHTML("a",{id:o})):(c(n),n.formatter.remove("namedAnchor",null,null,!0),n.formatter.apply("namedAnchor",{value:o}),n.addVisual())})),e.focus()},l=function(o){var e,t=(e=u(o))?n(e):"";o.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:function(e){var t,n;t=o,n=e.getData().id,(/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(n)?(i(t,n),1):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),0))&&e.close()}})},d=function(r){return function(e){for(var t,n,o=0;o<e.length;o++){var a=e[o];n=void 0,!(n=t=a)||n.attr("href")||!n.attr("id")&&!n.attr("name")||t.firstChild||a.attr("contenteditable",r)}}};e.add("anchor",function(e){var t,n,o;(t=e).on("PreInit",function(){t.parser.addNodeFilter("a",d("false")),t.serializer.addNodeFilter("a",d(null))}),(n=e).addCommand("mceAnchor",function(){l(n)}),(o=e).ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return o.execCommand("mceAnchor")},onSetup:function(e){return o.selection.selectorChangedWithUnbind("a:not([href])",e.setActive).unbind}}),o.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return o.execCommand("mceAnchor")}}),e.on("PreInit",function(){e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:function(e,t,n){return r(e)}})})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),i=function(e,t){var n;return t<0&&(t=0),3!==e.nodeType||(n=e.data.length)<t&&(t=n),t},y=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,i(t,n)):e.setStartBefore(t)},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,i(t,n)):e.setEndAfter(t)},r=function(e,t,n){var o,i,r,a,s,d,f,l=e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@(?!.*@))(.+)$/i),c=e.getParam("default_link_target",!1);if("A"!==e.selection.getNode().tagName){var g=e.selection.getRng().cloneRange();if(g.startOffset<5){if(!(s=g.endContainer.previousSibling)){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;s=g.endContainer.firstChild.nextSibling}if(d=s.length,y(g,s,d),k(g,s,d),g.endOffset<5)return;o=g.endOffset,i=s}else{if(3!==(i=g.endContainer).nodeType&&i.firstChild){for(;3!==i.nodeType&&i.firstChild;)i=i.firstChild;3===i.nodeType&&(y(g,i,0),k(g,i,i.nodeValue.length))}o=1===g.endOffset?2:g.endOffset-1-t}for(var u,h=o;y(g,i,2<=o?o-2:0),k(g,i,1<=o?o-1:0),--o," "!==(f=g.toString())&&""!==f&&160!==f.charCodeAt(0)&&0<=o-2&&f!==n;);(u=g.toString())===n||" "===u||160===u.charCodeAt(0)?(y(g,i,o),k(g,i,h),o+=1):(0===g.startOffset?y(g,i,0):y(g,i,o),k(g,i,h)),"."===(a=g.toString()).charAt(a.length-1)&&k(g,i,h-1);var m=(a=g.toString().trim()).match(l),C=e.getParam("link_default_protocol","http","string");m&&("www."===m[1]?m[1]=C+"://www.":/@$/.test(m[1])&&!/^mailto:/.test(m[1])&&(m[1]="mailto:"+m[1]),r=e.selection.getBookmark(),e.selection.setRng(g),e.execCommand("createlink",!1,m[1]+m[2]),!1!==c&&e.dom.setAttrib(e.selection.getNode(),"target",c),e.selection.moveToBookmark(r),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){13!==e.keyCode||r(t,-1,"")}),o.browser.isIE()?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){41!==e.keyCode||r(t,-1,"(")}),t.on("keyup",function(e){32!==e.keyCode||r(t,0,"")}))};e.add("autolink",function(e){t(e)})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),y=function(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")},a=function(e,t,n,i,o){r.setEditorTimeout(e,function(){b(e,t),n--?a(e,t,n,i,o):o&&o()},i)},p=function(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))},v=function(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o},b=function(e,t){var n,i,o,r,s,a,g,u,l,c,m,f=e.dom,d=e.getDoc();d&&((n=e).plugins.fullscreen&&n.plugins.fullscreen.isFullscreen()?p(e,!0):(i=d.documentElement,o=e.getParam("autoresize_bottom_margin",50,"number"),r=y(e),s=v(f,i,"margin-top",!0),a=v(f,i,"margin-bottom",!0),(g=i.offsetHeight+s+a+o)<0&&(g=0),g+(u=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight)>y(e)&&(r=g+u),(l=e.getParam("max_height",0,"number"))&&l<r?(r=l,p(e,!0)):p(e,!1),r!==t.get()&&(c=r-t.get(),f.setStyle(e.getContainer(),"height",r+"px"),t.set(r),e.fire("ResizeEditor"),h.browser.isSafari()&&h.mac&&(m=e.getWin()).scrollTo(m.pageXOffset,m.pageYOffset),e.hasFocus()&&e.selection.scrollIntoView(e.selection.getNode()),h.webkit&&c<0&&b(e,t))))};e.add("autoresize",function(e){var t,n,i,o,r,s;e.settings.hasOwnProperty("resize")||(e.settings.resize=!1),e.inline||(s=0,r=t={get:function(){return s},set:function(e){s=e}},(o=e).addCommand("mceAutoResize",function(){b(o,r)}),i=t,(n=e).on("init",function(){var e=n.getParam("autoresize_overflow_padding",1,"number"),t=n.dom;t.setStyles(n.getDoc().documentElement,{height:"auto"}),t.setStyles(n.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})}),n.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",function(){b(n,i)}),n.getParam("autoresize_on_init",!0,"boolean")&&n.on("init",function(){a(n,i,20,100,function(){a(n,i,5,1e3)})}))})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=(e=undefined,function(t){return e===t}),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),n=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(t,e){var r=t||e,n=/^(\d+)([ms]?)$/.exec(""+r);return(n[2]?{s:1e3,m:6e4}[n[2]]:1)*parseInt(r,10)},u=function(t){var e=document.location;return t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},s=function(t,e){if(a(e))return t.dom.isEmpty(t.getBody());var r=o.trim(e);if(""===r)return!0;var n=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(n)},f=function(t){var e=parseInt(n.getItem(u(t)+"time"),10)||0;return!((new Date).getTime()-e>i(t.getParam("autosave_retention"),"20m"))||(c(t,!1),!1)},c=function(t,e){var r=u(t);n.removeItem(r+"draft"),n.removeItem(r+"time"),!1!==e&&t.fire("RemoveDraft")},m=function(t){var e=u(t);!s(t)&&t.isDirty()&&(n.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),n.setItem(e+"time",(new Date).getTime().toString()),t.fire("StoreDraft"))},l=function(t){var e=u(t);f(t)&&(t.setContent(n.getItem(e+"draft"),{format:"raw"}),t.fire("RestoreDraft"))},v=function(t){var e=i(t.getParam("autosave_interval"),"30s");r.setEditorInterval(t,function(){m(t)},e)},d=function(t){t.undoManager.transact(function(){l(t),c(t)}),t.focus()},g=tinymce.util.Tools.resolve("tinymce.EditorManager"),y=function(r){return function(t){t.setDisabled(!f(r));var e=function(){return t.setDisabled(!f(r))};return r.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return r.off("StoreDraft RestoreDraft RemoveDraft",e)}}};t.add("autosave",function(t){var e,r;return t.editorManager.on("BeforeUnload",function(t){var e;o.each(g.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e&&(t.preventDefault(),t.returnValue=e)}),v(e=t),e.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),e.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),t.on("init",function(){t.getParam("autosave_restore_when_empty",!1)&&t.dom.isEmpty(t.getBody())&&l(t)}),r=t,{hasDraft:function(){return f(r)},storeDraft:function(){return m(r)},restoreDraft:function(){return l(r)},removeDraft:function(t){return c(r,t)},isEmpty:function(t){return s(r,t)}}})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(t){t=e.trim(t);var o=function(o,e){t=t.replace(o,e)};return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;'),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;'),t};o.add("bbcode",function(o){o.on("BeforeSetContent",function(o){o.content=t(o.content)}),o.on("PostProcess",function(o){o.set&&(o.content=t(o.content)),o.get&&(o.content=function(t){t=e.trim(t);var o=function(o,e){t=t.replace(o,e)};return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/&nbsp;|\u00a0/gi," "),o(/&quot;/gi,'"'),o(/&lt;/gi,"<"),o(/&gt;/gi,">"),o(/&amp;/gi,"&"),t}(o.content))})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e,n,r,t,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=function(e,n){var r,t=(r=n,e.fire("insertCustomChar",{chr:r}).chr);e.execCommand("mceInsertContent",!1,t)},i=function(e){return function(){return e}},o=i(!1),c=i(!0),u=function(){return l},l=(e=function(e){return e.isNone()},{fold:function(e,n){return e()},is:o,isSome:o,isNone:c,getOr:r=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:r,orThunk:n,map:u,each:function(){},bind:u,exists:o,forall:c,filter:u,equals:e,equals_:e,toArray:function(){return[]},toString:i("none()")}),g=function(r){var e=i(r),n=function(){return a},t=function(e){return e(r)},a={fold:function(e,n){return n(r)},is:function(e){return r===e},isSome:c,isNone:o,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return g(e(r))},each:function(e){e(r)},bind:t,exists:t,forall:t,filter:function(e){return e(r)?a:l},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(e){return e.is(r)},equals_:function(e,n){return e.fold(o,function(e){return n(r,e)})}};return a},m={some:g,none:u,from:function(e){return null===e||e===undefined?l:g(e)}},f=(t="array",function(e){return r=typeof(n=e),(null===n?"null":"object"==r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}),h=Array.prototype.push,p=function(e,n){for(var r=e.length,t=new Array(r),a=0;a<r;a++){var i=e[a];t[a]=n(i,a)}return t},d=function(e,n){return function(e,n,r){for(var t=0,a=e.length;t<a;t++){var i=e[t];if(n(i,t))return m.some(i);if(r(i,t))break}return m.none()}(e,n,o)},y=function(e,n){return function(e){for(var n=[],r=0,t=e.length;r<t;++r){if(!f(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);h.apply(n,e[r])}return n}(p(e,n))},v=tinymce.util.Tools.resolve("tinymce.util.Tools"),w=v.isArray,b="User Defined",k=function(e){return w(e)?[].concat((n=e,v.grep(n,function(e){return w(e)&&2===e.length}))):"function"==typeof e?e():[];var n},C=function(e){var n=function(e,n){var r=e.getParam("charmap");r&&(n=[{name:b,characters:k(r)}]);var t=e.getParam("charmap_append");if(t){var a=v.grep(n,function(e){return e.name===b});return a.length?(a[0].characters=[].concat(a[0].characters).concat(k(t)),n):[].concat(n).concat({name:b,characters:k(t)})}return n}(e,[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[169,"copyright sign"],[174,"registered sign"],[8482,"trade mark sign"],[8240,"per mille sign"],[181,"micro sign"],[183,"middle dot"],[8226,"bullet"],[8230,"three dot leader"],[8242,"minutes / feet"],[8243,"seconds / inches"],[167,"section sign"],[182,"paragraph sign"],[223,"sharp s / ess-zed"]]},{name:"Quotations",characters:[[8249,"single left-pointing angle quotation mark"],[8250,"single right-pointing angle quotation mark"],[171,"left pointing guillemet"],[187,"right pointing guillemet"],[8216,"left single quotation mark"],[8217,"right single quotation mark"],[8220,"left double quotation mark"],[8221,"right double quotation mark"],[8218,"single low-9 quotation mark"],[8222,"double low-9 quotation mark"],[60,"less-than sign"],[62,"greater-than sign"],[8804,"less-than or equal to"],[8805,"greater-than or equal to"],[8211,"en dash"],[8212,"em dash"],[175,"macron"],[8254,"overline"],[164,"currency sign"],[166,"broken bar"],[168,"diaeresis"],[161,"inverted exclamation mark"],[191,"turned question mark"],[710,"circumflex accent"],[732,"small tilde"],[176,"degree sign"],[8722,"minus sign"],[177,"plus-minus sign"],[247,"division sign"],[8260,"fraction slash"],[215,"multiplication sign"],[185,"superscript one"],[178,"superscript two"],[179,"superscript three"],[188,"fraction one quarter"],[189,"fraction one half"],[190,"fraction three quarters"]]},{name:"Mathematical",characters:[[402,"function / florin"],[8747,"integral"],[8721,"n-ary sumation"],[8734,"infinity"],[8730,"square root"],[8764,"similar to"],[8773,"approximately equal to"],[8776,"almost equal to"],[8800,"not equal to"],[8801,"identical to"],[8712,"element of"],[8713,"not an element of"],[8715,"contains as member"],[8719,"n-ary product"],[8743,"logical and"],[8744,"logical or"],[172,"not sign"],[8745,"intersection"],[8746,"union"],[8706,"partial differential"],[8704,"for all"],[8707,"there exists"],[8709,"diameter"],[8711,"backward difference"],[8727,"asterisk operator"],[8733,"proportional to"],[8736,"angle"]]},{name:"Extended Latin",characters:[[192,"A - grave"],[193,"A - acute"],[194,"A - circumflex"],[195,"A - tilde"],[196,"A - diaeresis"],[197,"A - ring above"],[256,"A - macron"],[198,"ligature AE"],[199,"C - cedilla"],[200,"E - grave"],[201,"E - acute"],[202,"E - circumflex"],[203,"E - diaeresis"],[274,"E - macron"],[204,"I - grave"],[205,"I - acute"],[206,"I - circumflex"],[207,"I - diaeresis"],[298,"I - macron"],[208,"ETH"],[209,"N - tilde"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"superset of or equal to"],[8853,"circled plus"],[8855,"circled times"],[8869,"perpendicular"],[8901,"dot operator"],[8968,"left ceiling"],[8969,"right ceiling"],[8970,"left floor"],[8971,"right floor"],[9001,"left-pointing angle bracket"],[9002,"right-pointing angle bracket"],[9674,"lozenge"],[9824,"black spade suit"],[9827,"black club suit"],[9829,"black heart suit"],[9830,"black diamond suit"],[8194,"en space"],[8195,"em space"],[8201,"thin space"],[8204,"zero width non-joiner"],[8205,"zero width joiner"],[8206,"left-to-right mark"],[8207,"right-to-left mark"]]}]);return 1<n.length?[{name:"All",characters:y(n,function(e){return e.characters})}].concat(n):n},x=function(e){var n=e;return{get:function(){return n},set:function(e){n=e}}},A=String.fromCodePoint,O=function(e,n){return-1!==e.indexOf(n)},q=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(A)return A.apply(void 0,e);for(var r=[],t="",a=0,i=e.length;a!==i;++a){var o=+e[a];if(!(o<1114111&&o>>>0===o))throw RangeError("Invalid code point: "+o);16383<=(o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)))&&(t+=String.fromCharCode.apply(null,r),r.length=0)}return t+String.fromCharCode.apply(null,r)},S=function(e,n){var a=[],i=n.toLowerCase();return function(e,n){for(var r=0,t=e.length;r<t;r++){n(e[r],r)}}(e.characters,function(e){var n,r,t;n=e[0],r=e[1],t=i,(O(q(n).toLowerCase(),t)||O(r.toLowerCase(),t)||O(r.toLowerCase().replace(/\s+/g,""),t))&&a.push(e)}),p(a,function(e){return{text:e[1],value:q(e[0]),icon:q(e[0])}})},T="pattern",E=function(r,a){var t,i,o,n=function(){return[{label:"Search",type:"input",name:T},{type:"collection",name:"results"}]},c=1===a.length?x(b):x("All"),u=(t=function(e){var r,t,n=e.getData().pattern;r=e,t=n,d(a,function(e){return e.name===c.get()}).each(function(e){var n=S(e,t);r.setData({results:n})})},i=40,o=null,{cancel:function(){null!==o&&(clearTimeout(o),o=null)},throttle:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];null!==o&&clearTimeout(o),o=setTimeout(function(){t.apply(null,e),o=null},i)}}),e={title:"Special Character",size:"normal",body:1===a.length?{type:"panel",items:n()}:{type:"tabpanel",tabs:p(a,function(e){return{title:e.name,name:e.name,items:n()}})},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{pattern:"",results:S(a[0],"")},onAction:function(e,n){"results"===n.name&&(s(r,n.value),e.close())},onTabChange:function(e,n){c.set(n.newTabName),u.throttle(e)},onChange:function(e,n){n.name===T&&u.throttle(e)}};r.windowManager.open(e).focus(T)},P=tinymce.util.Tools.resolve("tinymce.util.Promise");a.add("charmap",function(e){var n,r,t,a,i,o,c=C(e);return r=c,(n=e).addCommand("mceShowCharmap",function(){E(n,r)}),(t=e).ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:function(){return t.execCommand("mceShowCharmap")}}),t.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:function(){return t.execCommand("mceShowCharmap")}}),a=e,i=c[0],a.ui.registry.addAutocompleter("charmap",{ch:":",columns:"auto",minChars:2,fetch:function(r,e){return new P(function(e,n){e(S(i,r))})},onAction:function(e,n,r){a.selection.setRng(n),a.insertContent(r),e.hide()}}),o=e,{getCharMap:function(){return C(o)},insertChar:function(e){s(o,e)}}})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(o){var e=o.getContent({source_view:!0});o.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){var t,n;t=o,n=e.getData().code,t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged(),e.close()}})};e.add("code",function(e){var t,n;return(t=e).addCommand("mceCodeEditor",function(){o(t)}),(n=e).ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return o(n)}}),n.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return o(n)}}),{}})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e,n,t,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=function(e){return function(){return e}},i=s(!1),o=s(!0),a=function(){return l},l=(e=function(e){return e.isNone()},{fold:function(e,n){return e()},is:i,isSome:i,isNone:o,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:s(null),getOrUndefined:s(undefined),or:t,orThunk:n,map:a,each:function(){},bind:a,exists:i,forall:o,filter:a,equals:e,equals_:e,toArray:function(){return[]},toString:s("none()")}),u=function(t){var e=s(t),n=function(){return a},r=function(e){return e(t)},a={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:o,isNone:i,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return u(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?a:l},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(i,function(e){return n(t,e)})}};return a},c={some:u,none:a,from:function(e){return null===e||e===undefined?l:u(e)}},p=function(e){return n=e,(t=0)<=t&&t<n.length?c.some(n[t]):c.none();var n,t},d=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");function g(e){return e&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-")}function m(t){return function(e,n){return t(n)}}var f="undefined"!=typeof window?window:Function("return this;")(),h={},b={exports:h},y={};!function(n,t,r,p){var e=window.Prism;window.Prism={manual:!0},function(e){"object"==typeof t&&void 0!==r?r.exports=e():"function"==typeof n&&n.amd?n([],e):("undefined"!=typeof window?window:void 0!==y?y:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function c(s,i,o){function l(n,e){if(!i[n]){if(!s[n]){var t="function"==typeof p&&p;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var a=i[n]={exports:{}};s[n][0].call(a.exports,function(e){return l(s[n][1][e]||e)},a,a.exports,c,s,i,o)}return i[n].exports}for(var u="function"==typeof p&&p,e=0;e<o.length;e++)l(o[e]);return l}({1:[function(e,n,t){Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,"function":/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],comment:Prism.languages.c.comment,directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c["boolean"]},{}],2:[function(e,n,t){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},{}],3:[function(e,t,n){(function(n){(function(){var e=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,O={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function a(e){return e instanceof N?new N(e.type,a(e.content),e.alias):Array.isArray(e)?e.map(a):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function i(e,t){var r,n;switch(t=t||{},O.util.type(e)){case"Object":if(n=O.util.objId(e),t[n])return t[n];for(var a in r={},t[n]=r,e)e.hasOwnProperty(a)&&(r[a]=i(e[a],t));return r;case"Array":return(n=O.util.objId(e),t[n])?t[n]:(r=[],t[n]=r,e.forEach(function(e,n){r[n]=i(e,t)}),r);default:return e}},getLanguage:function(e){for(;e&&!c.test(e.className);)e=e.parentElement;return e?(e.className.match(c)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(r.stack)||[])[1];if(e){var n=document.getElementsByTagName("script");for(var t in n)if(n[t].src==e)return n[t]}return null}},isActive:function(e,n,t){for(var r="no-"+n;e;){var a=e.classList;if(a.contains(n))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!t}},languages:{extend:function(e,n){var t=O.util.clone(O.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(t,e,n,r){var a=(r=r||O.languages)[t],s={};for(var i in a)if(a.hasOwnProperty(i)){if(i==e)for(var o in n)n.hasOwnProperty(o)&&(s[o]=n[o]);n.hasOwnProperty(i)||(s[i]=a[i])}var l=r[t];return r[t]=s,O.languages.DFS(O.languages,function(e,n){n===l&&e!=t&&(this[e]=s)}),s},DFS:function l(e,n,t,r){r=r||{};var a,s,i=O.util.objId;for(var o in e){e.hasOwnProperty(o)&&(n.call(e,o,e[o],t||o),a=e[o],"Object"!==(s=O.util.type(a))||r[i(a)]?"Array"!==s||r[i(a)]||(r[i(a)]=!0,l(a,n,o,r)):(r[i(a)]=!0,l(a,n,null,r)))}}},plugins:{},highlightAll:function(e,n){O.highlightAllUnder(document,e,n)},highlightAllUnder:function(e,n,t){var r={callback:t,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};O.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),O.hooks.run("before-all-elements-highlight",r);for(var a,s=0;a=r.elements[s++];)O.highlightElement(a,!0===n,r.callback)},highlightElement:function(e,n,t){var r=O.util.getLanguage(e),a=O.languages[r];e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+r;var s=e.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&(s.className=s.className.replace(c,"").replace(/\s+/g," ")+" language-"+r);var i,o={element:e,language:r,grammar:a,code:e.textContent};function l(e){o.highlightedCode=e,O.hooks.run("before-insert",o),o.element.innerHTML=o.highlightedCode,O.hooks.run("after-highlight",o),O.hooks.run("complete",o),t&&t.call(o.element)}if(O.hooks.run("before-sanity-check",o),!o.code)return O.hooks.run("complete",o),void(t&&t.call(o.element));O.hooks.run("before-highlight",o),o.grammar?n&&u.Worker?((i=new Worker(O.filename)).onmessage=function(e){l(e.data)},i.postMessage(JSON.stringify({language:o.language,code:o.code,immediateClose:!0}))):l(O.highlight(o.code,o.grammar,o.language)):l(O.util.encode(o.code))},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};return O.hooks.run("before-tokenize",r),r.tokens=O.tokenize(r.code,r.grammar),O.hooks.run("after-tokenize",r),N.stringify(O.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var a=new s;return B(a,a.head,e),function C(e,n,t,r,a,s){for(var i in t)if(t.hasOwnProperty(i)&&t[i]){var o=t[i];o=Array.isArray(o)?o:[o];for(var l=0;l<o.length;++l){if(s&&s.cause==i+","+l)return;var u,c=o[l],p=c.inside,d=!!c.lookbehind,g=!!c.greedy,m=0,f=c.alias;g&&!c.pattern.global&&(u=c.pattern.toString().match(/[imsuy]*$/)[0],c.pattern=RegExp(c.pattern.source,u+"g"));for(var h=c.pattern||c,b=r.next,y=a;b!==n.tail&&!(s&&y>=s.reach);y+=b.value.length,b=b.next){var v=b.value;if(n.length>e.length)return;if(!(v instanceof N)){var w,k,x,_,P,F,A=1;if(g&&b!=n.tail.prev){h.lastIndex=y;var S=h.exec(e);if(!S)break;var $=S.index+(d&&S[1]?S[1].length:0),j=S.index+S[0].length,E=y;for(E+=b.value.length;E<=$;)b=b.next,E+=b.value.length;if(E-=b.value.length,y=E,b.value instanceof N)continue;for(var z=b;z!==n.tail&&(E<j||"string"==typeof z.value);z=z.next)A++,E+=z.value.length;A--,v=e.slice(y,E),S.index-=y}else{h.lastIndex=0;var S=h.exec(v)}S&&(d&&(m=S[1]?S[1].length:0),$=S.index+m,w=S[0].slice(m),j=$+w.length,k=v.slice(0,$),x=v.slice(j),_=y+v.length,s&&_>s.reach&&(s.reach=_),P=b.prev,k&&(P=B(n,P,k),y+=k.length),T(n,P,A),F=new N(i,p?O.tokenize(w,p):w,f,w),b=B(n,P,F),x&&B(n,b,x),1<A&&C(e,n,t,b.prev,y,{cause:i+","+l,reach:_}))}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=O.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=O.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:N};function N(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function B(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function T(e,n,t){for(var r=n.next,a=0;a<t&&r!==e.tail;a++)r=r.next;(n.next=r).prev=n,e.length-=a}if(u.Prism=O,N.stringify=function o(e,n){if("string"==typeof e)return e;if(Array.isArray(e)){var t="";return e.forEach(function(e){t+=o(e,n)}),t}var r={type:e.type,content:o(e.content,n),tag:"span",classes:["token",e.type],attributes:{},language:n},a=e.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(r.classes,a):r.classes.push(a)),O.hooks.run("wrap",r);var s="";for(var i in r.attributes)s+=" "+i+'="'+(r.attributes[i]||"").replace(/"/g,"&quot;")+'"';return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+s+">"+r.content+"</"+r.tag+">"},!u.document)return u.addEventListener&&(O.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(O.highlight(r,O.languages[t],t)),a&&u.close()},!1)),O;var e,t=O.util.currentScript();function r(){O.manual||O.highlightAll()}return t&&(O.filename=t.src,t.hasAttribute("data-manual")&&(O.manual=!0)),O.manual||("loading"===(e=document.readyState)||"interactive"===e&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)),O}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});void 0!==t&&t.exports&&(t.exports=e),void 0!==n&&(n.Prism=e)}).call(this)}).call(this,void 0!==y?y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,n,t){var r,a;r=Prism,a=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r.languages.cpp=r.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return a.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:a,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,"boolean":/\b(?:true|false)\b/}),r.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),r.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)(?:[^;{}"'])+?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:r.languages.extend("cpp",{})}}),r.languages.insertBefore("inside","operator",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},r.languages.cpp["base-clause"])},{}],5:[function(e,n,t){!function(t){function r(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function a(e,n,t){return RegExp(r(e,n),t||"")}function e(e,n){for(var t=0;t<n;t++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",s="class enum interface struct",i="add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var u=l(s),c=RegExp(l(n+" "+s+" "+i+" "+o)),p=l(s+" "+i+" "+o),d=l(n+" "+s+" "+o),g=e(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),m=e(/\((?:[^()]|<<self>>)*\)/.source,2),f=/@?\b[A-Za-z_]\w*\b/.source,h=r(/<<0>>(?:\s*<<1>>)?/.source,[f,g]),b=r(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[p,h]),y=/\[\s*(?:,\s*)*\]/.source,v=r(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[b,y]),w=r(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[g,m,y]),k=r(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),x=r(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[k,b,y]),_={keyword:c,punctuation:/[<>()?,.:[\]]/},P=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,F=/"(?:\\.|[^\\"\r\n])*"/.source,A=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;t.languages.csharp=t.languages.extend("clike",{string:[{pattern:a(/(^|[^$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0},{pattern:a(/(^|[^@$\\])<<0>>/.source,[F]),lookbehind:!0,greedy:!0},{pattern:RegExp(P),greedy:!0,alias:"character"}],"class-name":[{pattern:a(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[b]),lookbehind:!0,inside:_},{pattern:a(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[f,x]),lookbehind:!0,inside:_},{pattern:a(/(\busing\s+)<<0>>(?=\s*=)/.source,[f]),lookbehind:!0},{pattern:a(/(\b<<0>>\s+)<<1>>/.source,[u,h]),lookbehind:!0,inside:_},{pattern:a(/(\bcatch\s*\(\s*)<<0>>/.source,[b]),lookbehind:!0,inside:_},{pattern:a(/(\bwhere\s+)<<0>>/.source,[f]),lookbehind:!0},{pattern:a(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:_},{pattern:a(/\b<<0>>(?=\s+(?!<<1>>)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[x,d,f]),inside:_}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),t.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),t.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:a(/([(,]\s*)<<0>>(?=\s*:)/.source,[f]),lookbehind:!0,alias:"punctuation"}}),t.languages.insertBefore("csharp","class-name",{namespace:{pattern:a(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[f]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:a(/(\b(?:default|typeof|sizeof)\s*\(\s*)(?:[^()\s]|\s(?!\s*\))|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:_},"return-type":{pattern:a(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[x,b]),inside:_,alias:"class-name"},"constructor-invocation":{pattern:a(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[x]),lookbehind:!0,inside:_,alias:"class-name"},"generic-method":{pattern:a(/<<0>>\s*<<1>>(?=\s*\()/.source,[f,g]),inside:{"function":a(/^<<0>>/.source,[f]),generic:{pattern:RegExp(g),alias:"class-name",inside:_}}},"type-list":{pattern:a(/\b((?:<<0>>\s+<<1>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>)(?:\s*,\s*(?:<<3>>|<<4>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[u,h,f,x,c.source]),lookbehind:!0,inside:{keyword:c,"class-name":{pattern:RegExp(x),greedy:!0,inside:_},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var S=F+"|"+P,$=r(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[S]),j=e(r(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[$]),2),E=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,z=r(/<<0>>(?:\s*\(<<1>>*\))?/.source,[b,j]);t.languages.insertBefore("csharp","class-name",{attribute:{pattern:a(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[E,z]),lookbehind:!0,greedy:!0,inside:{target:{pattern:a(/^<<0>>(?=\s*:)/.source,[E]),alias:"keyword"},"attribute-arguments":{pattern:a(/\(<<0>>*\)/.source,[j]),inside:t.languages.csharp},"class-name":{pattern:RegExp(b),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var C=/:[^}\r\n]+/.source,O=e(r(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[$]),2),N=r(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[O,C]),B=e(r(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[S]),2),T=r(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[B,C]);function D(e,n){return{interpolation:{pattern:a(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[e]),lookbehind:!0,inside:{"format-string":{pattern:a(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[n,C]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:t.languages.csharp}}},string:/[\s\S]+/}}t.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:a(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[N]),lookbehind:!0,greedy:!0,inside:D(N,O)},{pattern:a(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[T]),lookbehind:!0,greedy:!0,inside:D(T,B)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp},{}],6:[function(e,n,t){!function(e){var n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{"function":/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+n.source+")*?(?=\\s*\\{)"),string:{pattern:n,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var t=e.languages.markup;t&&(t.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:t.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},t.tag))}(Prism)},{}],7:[function(e,n,t){var r,a,s;r=Prism,a=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|record|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,s=/\b[A-Z](?:\w*[a-z]\w*)?\b/,r.languages.java=r.languages.extend("clike",{"class-name":[s,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:a,"function":[r.languages.clike["function"],{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),r.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),r.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return a.source})),lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":s,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})},{}],8:[function(e,n,t){Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,"function":/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript},{}],9:[function(e,n,t){function b(e,n){return"___"+e.toUpperCase()+n+"___"}var y;y=Prism,Object.defineProperties(y.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,a,e,s){var i;r.language===a&&(i=r.tokenStack=[],r.code=r.code.replace(e,function(e){if("function"==typeof s&&!s(e))return e;for(var n,t=i.length;-1!==r.code.indexOf(n=b(a,t));)++t;return i[t]=e,n}),r.grammar=y.languages.markup)}},tokenizePlaceholders:{value:function(d,g){var m,f;d.language===g&&d.tokenStack&&(d.grammar=y.languages[g],m=0,f=Object.keys(d.tokenStack),function h(e){for(var n=0;n<e.length&&!(m>=f.length);n++){var t,r,a,s,i,o,l,u,c,p=e[n];"string"==typeof p||p.content&&"string"==typeof p.content?(t=f[m],r=d.tokenStack[t],a="string"==typeof p?p:p.content,s=b(g,t),-1<(i=a.indexOf(s))&&(++m,o=a.substring(0,i),l=new y.Token(g,y.tokenize(r,d.grammar),"language-"+g,r),u=a.substring(i+s.length),c=[],o&&c.push.apply(c,h([o])),c.push(l),u&&c.push.apply(c,h([u])),"string"==typeof p?e.splice.apply(e,[n,1].concat(c)):p.content=c)):p.content&&h(p.content)}return e}(d.tokens))}}})},{}],10:[function(e,n,t){Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var t={};t["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},t.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:t}};r["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var a={};a[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",a)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},{}],11:[function(e,n,t){!function(n){n.languages.php=n.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,"boolean":{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),n.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),n.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),n.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),n.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:n.languages.php};n.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:e}}}),delete n.languages.php.string,n.hooks.add("before-tokenize",function(e){/<\?/.test(e.code)&&n.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism)},{}],12:[function(e,n,t){Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},{}],13:[function(e,n,t){!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby["function"],e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp(/%r/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/.source,/\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/.source,/\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/.source,/\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/.source,/<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/.source].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{"function":/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp(/%[qQiIwWxs]?/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S])*\)/.source,/\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S])*\]/.source,/<(?:[^<>\\]|\\[\s\S])*>/.source].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism)},{}],14:[function(e,n,t){var r=e("prismjs/components/prism-core");e("prismjs/components/prism-clike"),e("prismjs/components/prism-markup-templating"),e("prismjs/components/prism-c"),e("prismjs/components/prism-cpp"),e("prismjs/components/prism-csharp"),e("prismjs/components/prism-css"),e("prismjs/components/prism-java"),e("prismjs/components/prism-javascript"),e("prismjs/components/prism-markup"),e("prismjs/components/prism-php"),e("prismjs/components/prism-python"),e("prismjs/components/prism-ruby"),n.exports={boltExport:r}},{"prismjs/components/prism-c":1,"prismjs/components/prism-clike":2,"prismjs/components/prism-core":3,"prismjs/components/prism-cpp":4,"prismjs/components/prism-csharp":5,"prismjs/components/prism-css":6,"prismjs/components/prism-java":7,"prismjs/components/prism-javascript":8,"prismjs/components/prism-markup":10,"prismjs/components/prism-markup-templating":9,"prismjs/components/prism-php":11,"prismjs/components/prism-python":12,"prismjs/components/prism-ruby":13}]},{},[14])(14)});var a=window.Prism;window.Prism=e}(undefined,h,b,undefined);var v=b.exports.boltExport,w=function(e){return f.Prism&&e.getParam("codesample_global_prismjs",!1,"boolean")?f.Prism:v},k=function(e){var n=e.selection?e.selection.getNode():null;return g(n)?c.some(n):c.none()},x=function(s){var t,e=s.getParam("codesample_languages")||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}],n=p(e).fold(function(){return""},function(e){return e.value}),r=(t=n,k(s).fold(function(){return t},function(e){var n=e.className.match(/language-(\w+)/);return n?n[1]:t})),a=k(s).fold(function(){return""},function(e){return e.textContent});s.windowManager.open({title:"Insert/Edit Code Sample",size:"large",body:{type:"panel",items:[{type:"selectbox",name:"language",label:"Language",items:e},{type:"textarea",name:"code",label:"Code view"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{language:r,code:a},onSubmit:function(e){var n,t,r,a=e.getData();n=s,t=a.language,r=a.code,n.undoManager.transact(function(){var e=k(n);return r=d.DOM.encode(r),e.fold(function(){n.insertContent('<pre id="__new" class="language-'+t+'">'+r+"</pre>"),n.selection.select(n.$("#__new").removeAttr("id")[0])},function(e){n.dom.setAttrib(e,"class","language-"+t),e.innerHTML=r,w(n).highlightElement(e),n.selection.select(e)})}),e.close()}})},_=function(r){r.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:function(){return x(r)},onSetup:function(t){var e=function(){var e,n;t.setActive((n=(e=r).selection.getStart(),e.dom.is(n,'pre[class*="language-"]')))};return r.on("NodeChange",e),function(){return r.off("NodeChange",e)}}}),r.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:function(){return x(r)}})};r.add("codesample",function(n){var t,a,r;a=(t=n).$,t.on("PreProcess",function(e){a("pre[contenteditable=false]",e.node).filter(m(g)).each(function(e,n){var t=a(n),r=n.textContent;t.attr("class",a.trim(t.attr("class"))),t.removeAttr("contentEditable"),t.empty().append(a("<code></code>").each(function(){this.textContent=r}))})}),t.on("SetContent",function(){var e=a("pre").filter(m(g)).filter(function(e,n){return"false"!==n.contentEditable});e.length&&t.undoManager.transact(function(){e.each(function(e,n){a(n).find("br").each(function(e,n){n.parentNode.replaceChild(t.getDoc().createTextNode("\n"),n)}),n.contentEditable="false",n.innerHTML=t.dom.encode(n.textContent),w(t).highlightElement(n),n.className=a.trim(n.className)})})}),_(n),(r=n).addCommand("codesample",function(){var e=r.selection.getNode();r.selection.isCollapsed()||g(e)?x(r):r.formatter.toggle("code")}),n.on("dblclick",function(e){g(e.target)&&x(n)})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("colorpicker",function(){console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("contextmenu",function(){console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var n,t,e,o,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(n,t){var e,o=n.dom,r=n.selection.getSelectedBlocks();r.length&&(e=o.getAttrib(r[0],"dir"),u.each(r,function(n){o.getParent(n.parentNode,'*[dir="'+t+'"]',o.getRoot())||o.setAttrib(n,"dir",e!==t?t:null)}),n.nodeChanged())},c=function(n){return function(){return n}},f=c(!1),d=c(!0),l=function(){return m},m=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:f,isSome:f,isNone:d,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:c(null),getOrUndefined:c(undefined),or:e,orThunk:t,map:l,each:function(){},bind:l,exists:f,forall:d,filter:l,equals:n,equals_:n,toArray:function(){return[]},toString:c("none()")}),a=function(e){var n=c(e),t=function(){return r},o=function(n){return n(e)},r={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:d,isNone:f,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return a(n(e))},each:function(n){n(e)},bind:o,exists:o,forall:o,filter:function(n){return n(e)?r:m},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(f,function(n){return t(e,n)})}};return r},s={some:a,none:l,from:function(n){return null===n||n===undefined?m:a(n)}},g=(o="function",function(n){return typeof n===o}),h=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:n}},y={fromHtml:function(n,t){var e=(t||document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return h(e.childNodes[0])},fromTag:function(n,t){var e=(t||document).createElement(n);return h(e)},fromText:function(n,t){var e=(t||document).createTextNode(n);return h(e)},fromDom:h,fromPoint:function(n,t,e){return s.from(n.dom.elementFromPoint(t,e)).map(h)}},v=("undefined"!=typeof window||Function("return this;")(),function(t){return function(n){return n.dom.nodeType===t}}),p=v(3),T=v(9),N=v(11),D=g(Element.prototype.attachShadow)&&g(Node.prototype.getRootNode)?function(n){return y.fromDom(n.dom.getRootNode())}:function(n){return T(n)?n:(t=n,y.fromDom(t.dom.ownerDocument));var t},w=function(n){var t=D(n);return N(t)?s.some(t):s.none()},O=function(n){return y.fromDom(n.dom.host)},C=function(n){var t=p(n)?n.dom.parentNode:n.dom;if(t===undefined||null===t||null===t.ownerDocument)return!1;var e,o,r=t.ownerDocument;return w(y.fromDom(t)).fold(function(){return r.body.contains(t)},(e=C,o=O,function(n){return e(o(n))}))},S=function(n,t){return(e=n).style!==undefined&&g(e.style.getPropertyValue)?n.style.getPropertyValue(t):"";var e},L=function(n){return"rtl"===(e="direction",o=(t=n).dom,""!==(r=window.getComputedStyle(o).getPropertyValue(e))||C(t)?r:S(o,e))?"rtl":"ltr";var t,e,o,r},R=function(t,o){return function(e){var n=function(n){var t=y.fromDom(n.element);e.setActive(L(t)===o)};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}};r.add("directionality",function(n){var t,e;(t=n).addCommand("mceDirectionLTR",function(){i(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){i(t,"rtl")}),(e=n).ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return e.execCommand("mceDirectionLTR")},onSetup:R(e,"ltr")}),e.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return e.execCommand("mceDirectionRTL")},onSetup:R(e,"rtl")})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var u,t,n,e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(){return(o=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},m=function(t){var n=t;return{get:function(){return n},set:function(t){n=t}}},a=Object.prototype.hasOwnProperty,c=function(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var e={},r=0;r<t.length;r++){var o=t[r];for(var i in o)a.call(o,i)&&(e[i]=u(e[i],o[i]))}return e},i=function(t){return function(){return t}},l=i(!(u=function(t,n){return n})),s=i(!0),f=function(){return g},g=(t=function(t){return t.isNone()},{fold:function(t,n){return t()},is:l,isSome:l,isNone:s,getOr:e=function(t){return t},getOrThunk:n=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:e,orThunk:n,map:f,each:function(){},bind:f,exists:l,forall:s,filter:f,equals:t,equals_:t,toArray:function(){return[]},toString:i("none()")}),d=function(e){var t=i(e),n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:s,isNone:l,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return d(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?o:g},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(l,function(t){return n(e,t)})}};return o},h={some:d,none:f,from:function(t){return null===t||t===undefined?g:d(t)}},y=Object.keys,v=Object.hasOwnProperty,p=function(t,n){for(var e=y(t),r=0,o=e.length;r<o;r++){var i=e[r];n(t[i],i)}},b=function(t,r){var o={};return p(t,function(t,n){var e=r(t,n);o[e.k]=e.v}),o},w=function(t,n){return-1!==t.indexOf(n)},O=tinymce.util.Tools.resolve("tinymce.Resource"),C=tinymce.util.Tools.resolve("tinymce.util.Delay"),j=tinymce.util.Tools.resolve("tinymce.util.Promise"),k="All",A={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags",user:"User Defined"},_=function(t,n){return e=t,r=n,v.call(e,r)?t[n]:n;var e,r},T=function(t){var e,n=t.getParam("emoticons_append",{},"object");return e=function(t){return o({keywords:[],category:"user"},t)},b(n,function(t,n){return{k:n,v:e(t,n)}})},P=function(e,o,t){var r=m(h.none()),n=m(h.none()),f=e.getParam("emoticons_images_url","https://twemoji.maxcdn.com/v/13.0.1/72x72/","string"),i=function(t){var l={},s=[];p(t,function(t,n){var e,r,o,i,u,a={title:n,keywords:t.keywords,"char":(r=(e=t)["char"],u=0,i="<img",(o=r).length>=i.length&&o.substr(u,u+i.length)===i?e["char"].replace(/src="([^"]+)"/,function(t,n){return'src="'+f+n+'"'}):e["char"]),category:_(A,t.category)},c=l[a.category]!==undefined?l[a.category]:[];l[a.category]=c.concat([a]),s.push(a)}),r.set(h.some(l)),n.set(h.some(s))};e.on("init",function(){O.load(t,o).then(function(t){var n=T(e);i(c(t,n))},function(t){console.log("Failed to load emoticons: "+t),r.set(h.some({})),n.set(h.some([]))})});var u=function(){return n.get().getOr([])},a=function(){return r.get().isSome()&&n.get().isSome()};return{listCategories:function(){return[k].concat(y(r.get().getOr({})))},hasLoaded:a,waitForLoad:function(){return a()?j.resolve(!0):new j(function(t,n){var e=15,r=C.setInterval(function(){a()?(C.clearInterval(r),t(!0)):--e<0&&(console.log("Could not load emojis from url: "+o),C.clearInterval(r),n(!1))},100)})},listAll:u,listCategory:function(n){return n===k?u():r.get().bind(function(t){return h.from(t[n])}).getOr([])}}},x=function(t,n,e){for(var r=[],o=n.toLowerCase(),i=e.fold(function(){return l},function(n){return function(t){return n<=t}}),u=0;u<t.length&&(0!==n.length&&!function(t,n){return w(t.title.toLowerCase(),n)||function(t,n){for(var e=0,r=t.length;e<r;e++){if(n(t[e],e))return!0}return!1}(t.keywords,function(t){return w(t.toLowerCase(),n)})}(t[u],o)||(r.push({value:t[u]["char"],text:t[u].title,icon:t[u]["char"]}),!i(r.length)));u++);return r},D="pattern",L=function(o,u){var e,r,i,t={pattern:"",results:x(u.listAll(),"",h.some(300))},a=m(k),c=(e=function(t){var n,e,r,o,i;e=(n=t).getData(),r=a.get(),o=u.listCategory(r),i=x(o,e[D],r===k?h.some(300):h.none()),n.setData({results:i})},r=200,i=null,{cancel:function(){null!==i&&(clearTimeout(i),i=null)},throttle:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];null!==i&&clearTimeout(i),i=setTimeout(function(){e.apply(null,t),i=null},r)}}),n={label:"Search",type:"input",name:D},l={type:"collection",name:"results"},s=function(){return{title:"Emoticons",size:"normal",body:{type:"tabpanel",tabs:function(t,n){for(var e=t.length,r=new Array(e),o=0;o<e;o++){var i=t[o];r[o]=n(i,o)}return r}(u.listCategories(),function(t){return{title:t,name:t,items:[n,l]}})},initialData:t,onTabChange:function(t,n){a.set(n.newTabName),c.throttle(t)},onChange:c.throttle,onAction:function(t,n){var e,r;"results"===n.name&&(e=o,r=n.value,e.insertContent(r),t.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}},f=o.windowManager.open(s());f.focus(D),u.hasLoaded()||(f.block("Loading emoticons..."),u.waitForLoad().then(function(){f.redial(s()),c.throttle(f),f.focus(D),f.unblock()})["catch"](function(t){f.redial({title:"Emoticons",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"<p>Could not load emoticons</p>"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),f.focus(D),f.unblock()}))};r.add("emoticons",function(t,n){var e,r,o,i,u,a,c,l,s,f=(r=n,o=(e=t).getParam("emoticons_database","emojis","string"),e.getParam("emoticons_database_url",r+"/js/"+o+e.suffix+".js","string")),m=t.getParam("emoticons_database_id","tinymce.plugins.emoticons","string"),g=P(t,f,m);u=g,a=function(){return L(i,u)},(i=t).ui.registry.addButton("emoticons",{tooltip:"Emoticons",icon:"emoji",onAction:a}),i.ui.registry.addMenuItem("emoticons",{text:"Emoticons...",icon:"emoji",onAction:a}),l=g,(c=t).ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,fetch:function(n,e){return l.waitForLoad().then(function(){var t=l.listAll();return x(t,n,h.some(e))})},onAction:function(t,n,e){c.selection.setRng(n),c.insertContent(e),t.hide()}}),(s=t).on("PreInit",function(){s.parser.addAttributeFilter("data-emoticon",function(t){!function(t,n){for(var e=0,r=t.length;e<r;e++){n(t[e],e)}}(t,function(t){t.attr("data-mce-resize","false"),t.attr("data-mce-placeholder","1")})})})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var s=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(){return(u=Object.assign||function(e){for(var t,n=1,l=arguments.length;n<l;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},p=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=tinymce.util.Tools.resolve("tinymce.html.DomParser"),m=tinymce.util.Tools.resolve("tinymce.html.Node"),f=tinymce.util.Tools.resolve("tinymce.html.Serializer"),h=function(e){return e.getParam("fullpage_hide_in_source_view")},i=function(e){return e.getParam("fullpage_default_encoding")},g=function(e){return e.getParam("fullpage_default_font_family")},y=function(e){return e.getParam("fullpage_default_font_size")},v=function(e){return t({validate:!1,root_name:"#document"}).parse(e,{format:"xhtml"})},d=function(l,i){var e,t,n,o,r,a,c=(e=l,t=i.get(),r=v(t),(a={}).fontface=g(e),a.fontsize=y(e),7===(n=r.firstChild).type&&(a.xml_pi=!0,(o=/encoding="([^"]+)"/.exec(n.value))&&(a.docencoding=o[1])),(n=r.getAll("#doctype")[0])&&(a.doctype="<!DOCTYPE"+n.value+">"),(n=r.getAll("title")[0])&&n.firstChild&&(a.title=n.firstChild.value),p.each(r.getAll("meta"),function(e){var t,n=e.attr("name"),l=e.attr("http-equiv");n?a[n.toLowerCase()]=e.attr("content"):"Content-Type"===l&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")))&&(a.docencoding=t[1])}),(n=r.getAll("html")[0])&&(a.langcode=s(n,"lang")||s(n,"xml:lang")),a.stylesheets=[],p.each(r.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&a.stylesheets.push(e.attr("href"))}),(n=r.getAll("body")[0])&&(a.langdir=s(n,"dir"),a.style=s(n,"style"),a.visited_color=s(n,"vlink"),a.link_color=s(n,"link"),a.active_color=s(n,"alink")),a);function s(e,t){return e.attr(t)||""}var d=u(u({},{title:"",keywords:"",description:"",robots:"",author:"",docencoding:""}),c);l.windowManager.open({title:"Metadata and Document Properties",size:"normal",body:{type:"panel",items:[{name:"title",type:"input",label:"Title"},{name:"keywords",type:"input",label:"Keywords"},{name:"description",type:"input",label:"Description"},{name:"robots",type:"input",label:"Robots"},{name:"author",type:"input",label:"Author"},{name:"docencoding",type:"input",label:"Encoding"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:d,onSubmit:function(e){var t=e.getData(),n=function(e,o,t){var r,n,l=e.dom;function i(e,t,n){e.attr(t,n||undefined)}function a(e){c.firstChild?c.insert(e,c.firstChild):c.append(e)}var c,s=v(t);(c=s.getAll("head")[0])||(r=s.getAll("html")[0],c=new m("head",1),r.firstChild?r.insert(c,r.firstChild,!0):r.append(c)),r=s.firstChild,o.xml_pi?(n='version="1.0"',o.docencoding&&(n+=' encoding="'+o.docencoding+'"'),7!==r.type&&(r=new m("xml",7),s.insert(r,s.firstChild,!0)),r.value=n):r&&7===r.type&&r.remove(),r=s.getAll("#doctype")[0],o.doctype?(r||(r=new m("#doctype",10),o.xml_pi?s.insert(r,s.firstChild):a(r)),r.value=o.doctype.substring(9,o.doctype.length-1)):r&&r.remove(),r=null,p.each(s.getAll("meta"),function(e){"Content-Type"===e.attr("http-equiv")&&(r=e)}),o.docencoding?(r||((r=new m("meta",1)).attr("http-equiv","Content-Type"),r.shortEnded=!0,a(r)),r.attr("content","text/html; charset="+o.docencoding)):r&&r.remove(),r=s.getAll("title")[0],o.title?(r?r.empty():a(r=new m("title",1)),r.append(new m("#text",3)).value=o.title):r&&r.remove(),p.each("keywords,description,author,copyright,robots".split(","),function(e){for(var t,n=s.getAll("meta"),l=o[e],i=0;i<n.length;i++)if((t=n[i]).attr("name")===e)return void(l?t.attr("content",l):t.remove());l&&((r=new m("meta",1)).attr("name",e),r.attr("content",l),r.shortEnded=!0,a(r))});var d={};p.each(s.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&(d[e.attr("href")]=e)}),p.each(o.stylesheets,function(e){d[e]||((r=new m("link",1)).attr({rel:"stylesheet",text:"text/css",href:e}),r.shortEnded=!0,a(r)),delete d[e]}),p.each(d,function(e){e.remove()}),(r=s.getAll("body")[0])&&(i(r,"dir",o.langdir),i(r,"style",o.style),i(r,"vlink",o.visited_color),i(r,"link",o.link_color),i(r,"alink",o.active_color),l.setAttribs(e.getBody(),{style:o.style,dir:o.dir,vLink:o.visited_color,link:o.link_color,aLink:o.active_color})),(r=s.getAll("html")[0])&&(i(r,"lang",o.langcode),i(r,"xml:lang",o.langcode)),c.firstChild||c.remove();var u=f({validate:!1,indent:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(s);return u.substring(0,u.indexOf("</body>"))}(l,p.extend(c,t),i.get());i.set(n),e.close()}})},_=p.each,b=function(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})},x=function(e,t,n,l){var i,o,r,a,c,s,d,u,m,f="",g=e.dom;l.selection||(a=e.getParam("protect"),c=l.content,p.each(a,function(e){c=c.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})}),r=c,"raw"===l.format&&t.get()||l.source_view&&h(e)||(0!==r.length||l.source_view||(r=p.trim(t.get())+"\n"+p.trim(r)+"\n"+p.trim(n.get())),-1!==(i=(r=r.replace(/<(\/?)BODY/gi,"<$1body")).indexOf("<body"))?(i=r.indexOf(">",i),t.set(b(r.substring(0,i+1))),-1===(o=r.indexOf("</body",i))&&(o=r.length),l.content=p.trim(r.substring(i+1,o)),n.set(b(r.substring(o)))):(t.set(k(e)),n.set("\n</body>\n</html>")),s=v(t.get()),_(s.getAll("style"),function(e){e.firstChild&&(f+=e.firstChild.value)}),(d=s.getAll("body")[0])&&g.setAttribs(e.getBody(),{style:d.attr("style")||"",dir:d.attr("dir")||"",vLink:d.attr("vlink")||"",link:d.attr("link")||"",aLink:d.attr("alink")||""}),g.remove("fullpage_styles"),u=e.getDoc().getElementsByTagName("head")[0],f&&g.add(u,"style",{id:"fullpage_styles"}).appendChild(document.createTextNode(f)),m={},p.each(u.getElementsByTagName("link"),function(e){"stylesheet"===e.rel&&e.getAttribute("data-mce-fullpage")&&(m[e.href]=e)}),p.each(s.getAll("link"),function(e){var t=e.attr("href");if(!t)return!0;m[t]||"stylesheet"!==e.attr("rel")||g.add(u,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),delete m[t]}),p.each(m,function(e){e.parentNode.removeChild(e)})))},k=function(e){var t,n="",l="";return e.getParam("fullpage_default_xml_pi")&&(n+='<?xml version="1.0" encoding="'+(i(e)||"ISO-8859-1")+'" ?>\n'),n+=e.getParam("fullpage_default_doctype","<!DOCTYPE html>"),n+="\n<html>\n<head>\n",(t=e.getParam("fullpage_default_title"))&&(n+="<title>"+t+"</title>\n"),(t=i(e))&&(n+='<meta http-equiv="Content-Type" content="text/html; charset='+t+'" />\n'),(t=g(e))&&(l+="font-family: "+t+";"),(t=y(e))&&(l+="font-size: "+t+";"),(t=e.getParam("fullpage_default_text_color"))&&(l+="color: "+t+";"),n+="</head>\n<body"+(l?' style="'+l+'"':"")+">\n"},C=function(e,t,n,l){"html"!==l.format||l.selection||l.source_view&&h(e)||(l.content=(p.trim(t)+"\n"+p.trim(l.content)+"\n"+p.trim(n)).replace(/<!--mce:protected ([\s\S]*?)-->/g,function(e,t){return unescape(t)}))};e.add("fullpage",function(e){var t,n,l,i,o,r,a=s(""),c=s("");n=a,(t=e).addCommand("mceFullPageProperties",function(){d(t,n)}),(l=e).ui.registry.addButton("fullpage",{tooltip:"Metadata and document properties",icon:"document-properties",onAction:function(){l.execCommand("mceFullPageProperties")}}),l.ui.registry.addMenuItem("fullpage",{text:"Metadata and document properties",icon:"document-properties",onAction:function(){l.execCommand("mceFullPageProperties")}}),o=a,r=c,(i=e).on("BeforeSetContent",function(e){x(i,o,r,e)}),i.on("GetContent",function(e){C(i,o.get(),r.get(),e)})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var c=function(n){var e=n;return{get:function(){return e},set:function(n){e=n}}},n=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n){return{isFullscreen:function(){return null!==n.get()}}},e=function(){},u=function(n){return function(){return n}};var t,r,o,l=u(!1),f=u(!0),a=function(){return d},d=(t=function(n){return n.isNone()},{fold:function(n,e){return n()},is:l,isSome:l,isNone:f,getOr:o=function(n){return n},getOrThunk:r=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(undefined),or:o,orThunk:r,map:a,each:e,bind:a,exists:l,forall:f,filter:a,equals:t,equals_:t,toArray:function(){return[]},toString:u("none()")}),s=function(t){var n=u(t),e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:f,isNone:l,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return s(n(t))},each:function(n){n(t)},bind:r,exists:r,forall:r,filter:function(n){return n(t)?o:d},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(l,function(n){return e(t,n)})}};return o},S={some:s,none:a,from:function(n){return null===n||n===undefined?d:s(n)}},m=function(){return n=function(n){return n.unbind()},e=c(S.none()),t=function(){return e.get().each(n)},{clear:function(){t(),e.set(S.none())},isSet:function(){return e.get().isSome()},set:function(n){t(),e.set(S.some(n))}};var n,e,t},h=function(r){return function(n){return t=typeof(e=n),(null===e?"null":"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)===r;var e,t}},g=function(e){return function(n){return typeof n===e}},p=h("string"),v=h("array"),y=g("boolean"),w=function(n){return!(null===(e=n)||e===undefined);var e},b=g("function"),E=g("number"),F=Array.prototype.push,T=function(n,e){for(var t=n.length,r=new Array(t),o=0;o<t;o++){var u=n[o];r[o]=e(u,o)}return r},x=function(n,e){for(var t=0,r=n.length;t<r;t++){e(n[t],t)}},D=function(n,e){for(var t=[],r=0,o=n.length;r<o;r++){var u=n[r];e(u,r)&&t.push(u)}return t},k=function(n,e){return function(n){for(var e=[],t=0,r=n.length;t<r;++t){if(!v(n[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+n);F.apply(e,n[t])}return e}(T(n,e))},C=function(n){return e=n,(t=0)<=t&&t<e.length?S.some(e[t]):S.none();var e,t},O=Object.keys,A=function(n){return n.style!==undefined&&b(n.style.getPropertyValue)},N=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:n}},M={fromHtml:function(n,e){var t=(e||document).createElement("div");if(t.innerHTML=n,!t.hasChildNodes()||1<t.childNodes.length)throw console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return N(t.childNodes[0])},fromTag:function(n,e){var t=(e||document).createElement(n);return N(t)},fromText:function(n,e){var t=(e||document).createTextNode(n);return N(t)},fromDom:N,fromPoint:function(n,e,t){return S.from(n.dom.elementFromPoint(e,t)).map(N)}},P=("undefined"!=typeof window||Function("return this;")(),function(e){return function(n){return n.dom.nodeType===e}}),L=P(1),q=P(3),H=P(9),R=P(11),V=function(n,e){var t=n.dom;if(1!==t.nodeType)return!1;var r=t;if(r.matches!==undefined)return r.matches(e);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(e);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(e);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},W=function(n){return M.fromDom(n.dom.ownerDocument)},B=function(t){var n;return n=t,S.from(n.dom.parentNode).map(M.fromDom).map(j).map(function(n){return D(n,function(n){return e=n,t.dom!==e.dom;var e})}).getOr([])},j=function(n){return T(n.dom.childNodes,M.fromDom)},z=b(Element.prototype.attachShadow)&&b(Node.prototype.getRootNode),I=u(z),U=z?function(n){return M.fromDom(n.dom.getRootNode())}:function(n){return H(n)?n:W(n)},_=function(n){var e=U(n);return R(e)?S.some(e):S.none()},K=function(n){return M.fromDom(n.dom.host)},X=function(n){return w(n.dom.shadowRoot)},Y=function(n){var e=q(n)?n.dom.parentNode:n.dom;if(e===undefined||null===e||null===e.ownerDocument)return!1;var t,r,o=e.ownerDocument;return _(M.fromDom(e)).fold(function(){return o.body.contains(e)},(t=Y,r=K,function(n){return t(r(n))}))},G=function(n,e,t){!function(n,e,t){if(!(p(t)||y(t)||E(t)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",t,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(e,t+"")}(n.dom,e,t)},J=function(n,e){var t=n.dom.getAttribute(e);return null===t?undefined:t},Q=function(n,e){n.dom.removeAttribute(e)},Z=function(n,e){var t=n.dom;!function(n,e){for(var t=O(n),r=0,o=t.length;r<o;r++){var u=t[r];e(n[u],u)}}(e,function(n,e){!function(n,e,t){if(!p(t))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",t,":: Element ",n),new Error("CSS value must be a string: "+t);A(n)&&n.style.setProperty(e,t)}(t,e,n)})},$=function(n,e){return A(n)?n.style.getPropertyValue(e):""},nn=function(n){var t,r,e=M.fromDom(function(n){if(I()&&w(n.target)){var e=M.fromDom(n.target);if(L(e)&&X(e)&&n.composed&&n.composedPath){var t=n.composedPath();if(t)return C(t)}}return S.from(n.target)}(n).getOr(n.target)),o=function(){return n.stopPropagation()},u=function(){return n.preventDefault()},i=(t=u,r=o,function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(r.apply(null,n))});return{target:e,x:n.clientX,y:n.clientY,stop:o,prevent:u,kill:i,raw:n}},en=function(n,e,t,r,o){var u,i,c=(u=t,i=r,function(n){u(n)&&i(nn(n))});return n.dom.addEventListener(e,c,o),{unbind:function(r){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=o.concat(n);return r.apply(null,t)}}(tn,n,e,c,o)}},tn=function(n,e,t,r){n.dom.removeEventListener(e,t,r)},rn=f,on=function(n,e,t){return en(n,e,rn,t,!1)},un=function(t,r){return{left:t,top:r,translate:function(n,e){return un(t+n,r+e)}}},cn=un,ln=function(n){var e=n===undefined?window:n;return S.from(e.visualViewport)},fn=function(n,e,t,r){return{x:n,y:e,width:t,height:r,right:n+t,bottom:e+r}},an=function(n){var e,t,r,o,u=n===undefined?window:n,i=u.document,c=(e=M.fromDom(i),t=e!==undefined?e.dom:document,r=t.body.scrollLeft||t.documentElement.scrollLeft,o=t.body.scrollTop||t.documentElement.scrollTop,cn(r,o));return ln(u).fold(function(){var n=u.document.documentElement,e=n.clientWidth,t=n.clientHeight;return fn(c.left,c.top,e,t)},function(n){return fn(Math.max(n.pageLeft,c.left),Math.max(n.pageTop,c.top),n.width,n.height)})},dn=function(t,r,n){return ln(n).map(function(n){var e=function(n){return r(nn(n))};return n.addEventListener(t,e),{unbind:function(){return n.removeEventListener(t,e)}}}).getOrThunk(function(){return{unbind:e}})},sn=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),mn=tinymce.util.Tools.resolve("tinymce.Env"),hn=tinymce.util.Tools.resolve("tinymce.util.Delay"),gn=function(n,e){n.fire("FullscreenStateChanged",{state:e})},pn=function(n){return n.getParam("fullscreen_native",!1,"boolean")},vn=function(n){var e=M.fromDom(n.getElement());return _(e).map(K).getOrThunk(function(){return function(n){var e=n.dom.body;if(null===e||e===undefined)throw new Error("Body is not available yet");return M.fromDom(e)}(W(e))})},yn=function(n){return n.dom===((e=W(n).dom).fullscreenElement!==undefined?e.fullscreenElement:e.msFullscreenElement!==undefined?e.msFullscreenElement:e.webkitFullscreenElement!==undefined?e.webkitFullscreenElement:null);var e},wn=function(n,e,t){return D(function(n,e){for(var t=b(e)?e:l,r=n.dom,o=[];null!==r.parentNode&&r.parentNode!==undefined;){var u=r.parentNode,i=M.fromDom(u);if(o.push(i),!0===t(i))break;r=u}return o}(n,t),e)},bn=function(n){return e=n,o=t===undefined?document:t.dom,1!==(r=o).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?[]:T(o.querySelectorAll(e),M.fromDom);var e,t,r,o},Sn=function(n,e){return t=function(n){return V(n,e)},D(B(n),t);var t},En="data-ephox-mobile-fullscreen-style",Fn="position:absolute!important;",Tn="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",xn=mn.os.isAndroid(),Dn=function(n){var e,t,r,o,u=(t="background-color",r=(e=n).dom,""!==(o=window.getComputedStyle(r).getPropertyValue(t))||Y(e)?o:$(r,t));return u!==undefined&&""!==u?"background-color:"+u+"!important":"background-color:rgb(255,255,255)!important;"},kn=function(o,n,e){var t,r,u=function(r){return function(n){var e=J(n,"style"),t=e===undefined?"no-styles":e.trim();t!==r&&(G(n,En,t),Z(n,o.parseStyle(r)))}},i=(t="*",wn(n,function(n){return V(n,t)},r)),c=k(i,function(n){return Sn(n,"*:not(.tox-silver-sink)")}),l=Dn(e);x(c,u("display:none!important;")),x(i,u(Fn+Tn+l)),u((!0===xn?"":Fn)+Tn+l)(n)},Cn=sn.DOM,On=ln().fold(function(){return{bind:e,unbind:e}},function(e){var t,r=(t=c(S.none()),{clear:function(){return t.set(S.none())},set:function(n){return t.set(S.some(n))},isSet:function(){return t.get().isSome()},on:function(n){return t.get().each(n)}}),o=m(),u=m(),i=hn.throttle(function(){document.body.scrollTop=0,document.documentElement.scrollTop=0,window.requestAnimationFrame(function(){r.on(function(n){return Z(n,{top:e.offsetTop+"px",left:e.offsetLeft+"px",height:e.height+"px",width:e.width+"px"})})})},50);return{bind:function(n){r.set(n),i(),o.set(dn("resize",i)),u.set(dn("scroll",i))},unbind:function(){r.on(function(){o.clear(),u.clear()}),r.clear()}}}),An=function(e,r){var n,t,o,u,i,c,l,f=document.body,a=document.documentElement,d=e.getContainer(),s=M.fromDom(d),m=vn(e),h=r.get(),g=M.fromDom(e.getBody()),p=mn.deviceType.isTouch(),v=d.style,y=e.iframeElement.style,w=function(e){e(f,"tox-fullscreen"),e(a,"tox-fullscreen"),e(d,"tox-fullscreen"),_(s).map(function(n){return K(n).dom}).each(function(n){e(n,"tox-fullscreen"),e(n,"tox-shadowhost")})},b=function(){var t,n;p&&(t=e.dom,n=bn("["+En+"]"),x(n,function(n){var e=J(n,En);"no-styles"!==e?Z(n,t.parseStyle(e)):Q(n,"style"),Q(n,En)})),w(Cn.removeClass),On.unbind(),S.from(r.get()).each(function(n){return n.fullscreenChangeHandler.unbind()})};h?(h.fullscreenChangeHandler.unbind(),pn(e)&&yn(m)&&(u=W(m),(i=u.dom).exitFullscreen?i.exitFullscreen():i.msExitFullscreen?i.msExitFullscreen():i.webkitCancelFullScreen&&i.webkitCancelFullScreen()),y.width=h.iframeWidth,y.height=h.iframeHeight,v.width=h.containerWidth,v.height=h.containerHeight,v.top=h.containerTop,v.left=h.containerLeft,o=h.scrollPos,window.scrollTo(o.x,o.y),r.set(null),gn(e,!1),b(),e.off("remove",b)):(n=on(W(m),document.fullscreenElement!==undefined?"fullscreenchange":document.msFullscreenElement!==undefined?"MSFullscreenChange":document.webkitFullscreenElement!==undefined?"webkitfullscreenchange":"fullscreenchange",function(n){pn(e)&&(yn(m)||null===r.get()||An(e,r))}),t={scrollPos:{x:(l=an(window)).x,y:l.y},containerWidth:v.width,containerHeight:v.height,containerTop:v.top,containerLeft:v.left,iframeWidth:y.width,iframeHeight:y.height,fullscreenChangeHandler:n},p&&kn(e.dom,s,g),y.width=y.height="100%",v.width=v.height="",w(Cn.addClass),On.bind(s),e.on("remove",b),r.set(t),pn(e)&&((c=m.dom).requestFullscreen?c.requestFullscreen():c.msRequestFullscreen?c.msRequestFullscreen():c.webkitRequestFullScreen&&c.webkitRequestFullScreen()),gn(e,!0))},Nn=function(t,r){return function(e){e.setActive(null!==r.get());var n=function(n){return e.setActive(n.state)};return t.on("FullscreenStateChanged",n),function(){return t.off("FullscreenStateChanged",n)}}};n.add("fullscreen",function(n){var e,t,r,o,u=c(null);return n.inline||(t=u,(e=n).addCommand("mceFullScreen",function(){An(e,t)}),o=u,(r=n).ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:function(){return r.execCommand("mceFullScreen")},onSetup:Nn(r,o)}),r.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:function(){return r.execCommand("mceFullScreen")},onSetup:Nn(r,o)}),n.addShortcut("Meta+Shift+F","","mceFullScreen")),i(u)})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e,t,n,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=function(){return(m=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=function(e){return function(){return e}},r=i(!1),s=i(!0),o=function(){return l},l=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:r,isSome:r,isNone:s,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:n,orThunk:t,map:o,each:function(){},bind:o,exists:r,forall:s,filter:o,equals:e,equals_:e,toArray:function(){return[]},toString:i("none()")}),c=function(n){var e=i(n),t=function(){return o},a=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:s,isNone:r,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return c(e(n))},each:function(e){e(n)},bind:a,exists:a,forall:a,filter:function(e){return e(n)?o:l},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(r,function(e){return t(n,e)})}};return o},d={some:c,none:o,from:function(e){return null===e||e===undefined?l:c(e)}},u=Array.prototype.indexOf,h=function(e,t){return n=e,a=t,-1<u.call(n,a);var n,a},p=function(e,t){for(var n=e.length,a=new Array(n),o=0;o<n;o++){var i=e[o];a[o]=t(i,o)}return a},g=function(e,t){return function(e,t,n){for(var a=0,o=e.length;a<o;a++){var i=e[a];if(t(i,a))return d.some(i);if(n(i,a))break}return d.none()}(e,t,r)},f=Object.keys,b=Object.hasOwnProperty,y=function(e,t){return b.call(e,t)},k=tinymce.util.Tools.resolve("tinymce.Env"),v=function(e){var n=k.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl ",access:"Shift + Alt "},t=e.split("+"),a=p(t,function(e){var t=e.toLowerCase().trim();return y(n,t)?n[t]:e});return k.mac?a.join("").replace(/\s/,""):a.join("+")},w=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Heading 1"},{shortcuts:["Access + 2"],action:"Heading 2"},{shortcuts:["Access + 3"],action:"Heading 3"},{shortcuts:["Access + 4"],action:"Heading 4"},{shortcuts:["Access + 5"],action:"Heading 5"},{shortcuts:["Access + 6"],action:"Heading 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],A=tinymce.util.Tools.resolve("tinymce.util.I18n"),C=[{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"noneditable",name:"Noneditable"},{key:"pagebreak",name:"Page Break"},{key:"paste",name:"Paste"},{key:"preview",name:"Preview"},{key:"print",name:"Print"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"spellchecker",name:"Spell Checker"},{key:"tabfocus",name:"Tab Focus"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"textpattern",name:"Text Pattern"},{key:"toc",name:"Table of Contents"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"advcode",name:"Advanced Code Editor*"},{key:"formatpainter",name:"Format Painter*"},{key:"powerpaste",name:"PowerPaste*"},{key:"tinydrive",name:"Tiny Drive*",slug:"drive"},{key:"tinymcespellchecker",name:"Spell Checker Pro*"},{key:"a11ychecker",name:"Accessibility Checker*"},{key:"linkchecker",name:"Link Checker*"},{key:"mentions",name:"Mentions*"},{key:"mediaembed",name:"Enhanced Media Embed*"},{key:"checklist",name:"Checklist*"},{key:"casechange",name:"Case Change*"},{key:"permanentpen",name:"Permanent Pen*"},{key:"pageembed",name:"Page Embed*"},{key:"tinycomments",name:"Tiny Comments*",slug:"comments"},{key:"advtable",name:"Advanced Tables*"},{key:"autocorrect",name:"Autocorrect*"}],T=function(e){var t,n,l=function(e){return'<a href="'+e.url+'" target="_blank" rel="noopener">'+e.name+"</a>"};return{name:"plugins",title:"Plugins",items:[{type:"htmlpanel",presets:"document",html:[null==(n=e)?"":'<div data-mce-tabstop="1" tabindex="-1">'+function(a){var e,t,n,o=(t=f((e=a).plugins),(n=e.getParam("forced_plugins"))===undefined?t:function(e,t){for(var n=[],a=0,o=e.length;a<o;a++){var i=e[a];t(i,a)&&n.push(i)}return n}(t,function(e){return!h(n,e)})),i=p(o,function(e){return"<li>"+(t=a,n=e,g(C,function(e){return e.key===n}).fold(function(){var e=t.plugins[n].getMetadata;return"function"==typeof e?l(e()):n},function(e){var t=e.slug||e.key;return l({name:e.name,url:"https://www.tiny.cloud/docs/plugins/"+t})}))+"</li>";var t,n}),r=i.length,s=i.join("");return"<p><b>"+A.translate(["Plugins installed ({0}):",r])+"</b></p><ul>"+s+"</ul>"}(n)+"</div>",(t=p(["Accessibility Checker","Advanced Code Editor","Advanced Tables","Case Change","Checklist","Tiny Comments","Tiny Drive","Enhanced Media Embed","Format Painter","Link Checker","Mentions","MoxieManager","Page Embed","Permanent Pen","PowerPaste","Spell Checker Pro"],function(e){return"<li>"+A.translate(e)+"</li>"}).join(""),'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+A.translate("Premium plugins:")+"</b></p><ul>"+t+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">'+A.translate("Learn more...")+"</a></li></ul></div>")].join("")}]}},x=tinymce.util.Tools.resolve("tinymce.EditorManager"),P=function(e,t){var n,a,o,i,r,s={name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:p(w,function(e){var t=p(e.shortcuts,v).join(" or ");return[e.action,t]})}]},l={name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n <li>Focus the menubar: Alt + F9 (Windows) or &#x2325;F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or &#x2325;F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or &#x2325;F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n <li>the menubar</li>\n <li>each group of the toolbar </li>\n <li>the sidebar</li>\n <li>the element path in the footer </li>\n <li>the wordcount toggle button in the footer </li>\n <li>the branding link in the footer </li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n <li>moving between menus in the menubar</li>\n <li>moving between buttons in a toolbar group</li>\n <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or &#x2303;F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>"}]},c=T(e),u=(i='<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+(a=x.majorVersion,o=x.minorVersion,0===a.indexOf("@")?"X.X.X":a+"."+o)+"</a>",{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+A.translate(["You are using {0}",i])+"</p>",presets:"document"}]}),h=m(((n={})[s.name]=s,n[l.name]=l,n[c.name]=c,n[u.name]=u,n),t.get());return r=e,d.from(r.getParam("help_tabs")).fold(function(){return t=f(e=h),-1!==(n=t.indexOf("versions"))&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t};var e,t,n},function(e){return t=h,n={},a=p(e,function(e){return"string"==typeof e?(y(t,e)&&(n[e]=t[e]),e):(n[e.name]=e).name}),{tabs:n,names:a};var t,n,a})},M=function(o,i){return function(){var e=P(o,i),a=e.tabs,t=e.names,n={type:"tabpanel",tabs:function(e){for(var t=[],n=function(e){t.push(e)},a=0;a<e.length;a++)e[a].each(n);return t}(p(t,function(e){return y(t=a,n=e)?d.from(t[n]):d.none();var t,n}))};o.windowManager.open({title:"Help",size:"medium",body:n,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}};a.add("help",function(e){var t,n,a,o,i,r=(t={},{get:function(){return t},set:function(e){t=e}}),s={addTab:function(e){var t=n.get();t[e.name]=e,n.set(t)}},l=M(e,n=r);return o=l,(a=e).ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:o}),a.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:o}),i=l,e.addCommand("mceHelp",i),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),s})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager");n.add("hr",function(n){var o,t;(o=n).addCommand("InsertHorizontalRule",function(){o.execCommand("mceInsertContent",!1,"<hr />")}),(t=n).ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var t,e,n,r,o,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},i=function(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}},l=function(t){return function(e){return typeof e===t}},A=i("string"),s=i("object"),u=i("array"),m=function(e){return t===e},d=l("boolean"),g=l("number"),f=function(){},p=function(e){return function(){return e}},h=p(!1),b=p(!(t=null)),v=function(){return y},y=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:h,isSome:h,isNone:b,getOr:r=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:p(null),getOrUndefined:p(undefined),or:r,orThunk:n,map:v,each:f,bind:v,exists:h,forall:b,filter:v,equals:e,equals_:e,toArray:function(){return[]},toString:p("none()")}),D=function(n){var e=p(n),t=function(){return a},r=function(e){return e(n)},a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:b,isNone:h,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return D(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?a:y},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(h,function(e){return t(n,e)})}};return a},S={some:D,none:v,from:function(e){return null===e||e===undefined?y:D(e)}},w=Array.prototype.push,x=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!u(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);w.apply(t,e[n])}return t},T=function(e){return t=e,(n=0)<=n&&n<t.length?S.some(t[n]):S.none();var t,n},C=("undefined"!=typeof window||Function("return this;")(),function(e,t,n){!function(e,t,n){if(!(A(n)||d(n)||g(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}(e.dom,t,n)}),U=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:e}},O={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return U(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return U(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return U(n)},fromDom:U,fromPoint:function(e,t,n){return S.from(e.dom.elementFromPoint(t,n)).map(U)}},I=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),N=tinymce.util.Tools.resolve("tinymce.util.Promise"),P=tinymce.util.Tools.resolve("tinymce.util.XHR"),_=function(e){return e.getParam("image_dimensions",!0,"boolean")},L=function(e){return e.getParam("images_upload_url","","string")},E=function(e){return e.getParam("images_upload_handler",undefined,"function")},M=function(e,t){return Math.max(parseInt(e,10),parseInt(t,10))},R=function(e){return e=e&&e.replace(/px$/,"")},z=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},H=function(e){if(e.margin){var t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},k=function(e){return"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder"))},j=I.DOM,B=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?R(e.style.marginLeft):""},F=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?R(e.style.marginTop):""},G=function(e){return e.style.borderWidth?R(e.style.borderWidth):""},W=function(e,t){return e.hasAttribute(t)?e.getAttribute(t):""},q=function(e,t){return e.style[t]?e.style[t]:""},$=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},J=function(e,t,n){""===n?e.removeAttribute(t):e.setAttribute(t,n)},X=function(e){var t,n,r,a;$(e)?(a=(r=e).parentNode,j.insertAfter(r,a),j.remove(a)):(t=e,n=j.create("figure",{"class":"image"}),j.insertAfter(n,t),n.appendChild(t),n.appendChild(j.create("figcaption",{contentEditable:"true"},"Caption")),n.contentEditable="false")},V=function(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},K=function(e,r){return function(e,t,n){e.style[t]?(e.style[t]=z(n),V(e,r)):J(e,t,n)}},Z=function(e,t){return e.style[t]?R(e.style[t]):W(e,t)},Q=function(e,t){var n=z(t);e.style.marginLeft=n,e.style.marginRight=n},Y=function(e,t){var n=z(t);e.style.marginTop=n,e.style.marginBottom=n},ee=function(e,t){var n=z(t);e.style.borderWidth=n},te=function(e,t){e.style.borderStyle=t},ne=function(e){return"FIGURE"===e.nodeName},re=function(e){return 0===j.getAttrib(e,"alt").length&&"presentation"===j.getAttrib(e,"role")},ae=function(){return{src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}},ie=function(e,t){var n=document.createElement("img");return J(n,"style",t.style),!B(n)&&""===t.hspace||Q(n,t.hspace),!F(n)&&""===t.vspace||Y(n,t.vspace),!G(n)&&""===t.border||ee(n,t.border),!q(n,"borderStyle")&&""===t.borderStyle||te(n,t.borderStyle),e(n.getAttribute("style"))},oe=function(e,t){return{src:W(t,"src"),alt:re(n=t)?"":W(n,"alt"),title:W(t,"title"),width:Z(t,"width"),height:Z(t,"height"),"class":W(t,"class"),style:e(W(t,"style")),caption:$(t),hspace:B(t),vspace:F(t),border:G(t),borderStyle:q(t,"borderStyle"),isDecorative:re(t)};var n},le=function(e,t,n,r,a){n[r]!==t[r]&&a(e,r,n[r])},se=function(e,t,n){var r,a;n?(j.setAttrib(e,"role","presentation"),r=O.fromDom(e),C(r,"alt","")):(m(t)?(r=O.fromDom(e),a="alt",r.dom.removeAttribute(a)):(r=O.fromDom(e),C(r,"alt",t)),"presentation"===j.getAttrib(e,"role")&&j.setAttrib(e,"role",""))},ue=function(r,a){return function(e,t,n){r(e,n),V(e,a)}},ce=function(e,t,n){var r,a,i,o=oe(e,n);le(n,o,t,"caption",function(e,t,n){return X(e),0}),le(n,o,t,"src",J),le(n,o,t,"title",J),le(n,o,t,"width",K(0,e)),le(n,o,t,"height",K(0,e)),le(n,o,t,"class",J),le(n,o,t,"style",ue(function(e,t){return J(e,"style",t),0},e)),le(n,o,t,"hspace",ue(Q,e)),le(n,o,t,"vspace",ue(Y,e)),le(n,o,t,"border",ue(ee,e)),le(n,o,t,"borderStyle",ue(te,e)),r=n,a=o,(i=t).alt===a.alt&&i.isDecorative===a.isDecorative||se(r,i.alt,i.isDecorative)},me=function(e,t){var n=e.dom.styles.parse(t),r=H(n),a=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(a)},de=function(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return n?e.dom.select("img",n)[0]:t&&("IMG"!==t.nodeName||k(t))?null:t},ge=function(t,e){var n=t.dom,r=n.getParent(e.parentNode,function(e){return!!t.schema.getTextBlockElements()[e.nodeName]},t.getBody());return r?n.split(r,e):e},fe=function(t,e){var n=function(e,t){var n=document.createElement("img");if(ce(e,c(c({},t),{caption:!1}),n),se(n,t.alt,t.isDecorative),t.caption){var r=j.create("figure",{"class":"image"});return r.appendChild(n),r.appendChild(j.create("figcaption",{contentEditable:"true"},"Caption")),r.contentEditable="false",r}return n}(function(e){return me(t,e)},e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r,a=t.dom.select('*[data-mce-id="__mcenew"]')[0];t.dom.setAttrib(a,"data-mce-id",null),ne(a)?(r=ge(t,a),t.selection.select(r)):t.selection.select(a)},pe=function(t,e){var n,r,a,i,o,l,s=de(t);ce(function(e){return me(t,e)},e,s),n=s,t.dom.setAttrib(n,"src",n.getAttribute("src")),ne(s.parentNode)?(r=s.parentNode,ge(t,r),t.selection.select(s.parentNode)):(t.selection.select(s),a=t,i=e,l=function(){o.onload=o.onerror=null,a.selection&&(a.selection.select(o),a.nodeChanged())},(o=s).onload=function(){i.width||i.height||!_(a)||a.dom.setAttribs(o,{width:String(o.clientWidth),height:String(o.clientHeight)}),l()},o.onerror=l)},he=Object.prototype.hasOwnProperty,be=(o=function(e,t){return s(e)&&s(t)?be(e,t):t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var a=e[r];for(var i in a)he.call(a,i)&&(n[i]=o(n[i],a[i]))}return n}),ve=tinymce.util.Tools.resolve("tinymce.util.Tools"),ye=function(e){return A(e.value)?e.value:""},De=function(e,i){var o=[];return ve.each(e,function(e){var t,n,r,a=A((t=e).text)?t.text:A(t.title)?t.title:"";e.menu!==undefined?(n=De(e.menu,i),o.push({text:a,items:n})):(r=i(e),o.push({text:a,value:r}))}),o},we=function(t){return void 0===t&&(t=ye),function(e){return e?S.from(e).map(function(e){return De(e,t)}):S.none()}},Ae=function(e,n){return function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return S.none()}(e,function(e){return t=e,Object.prototype.hasOwnProperty.call(t,"items")?Ae(e.items,n):e.value===n?S.some(e):S.none();var t})},Se=we,xe=function(e){return we(ye)(e)},Te=function(e,t){return e.bind(function(e){return Ae(e,t)})};function Ce(o){var t=function(e,r,a,t){var i=new XMLHttpRequest;i.open("POST",o.url),i.withCredentials=o.credentials,i.upload.onprogress=function(e){t(e.loaded/e.total*100)},i.onerror=function(){a("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e,t,n;i.status<200||300<=i.status?a("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?r((t=o.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):a("Invalid JSON: "+i.responseText)};var n=new FormData;n.append("file",e.blob(),e.filename()),i.send(n)};return o=ve.extend({credentials:!1,handler:t},o),{upload:function(e){return o.url||o.handler!==t?(r=e,a=o.handler,new N(function(e,t){try{a(r,e,t,f)}catch(n){t(n.message)}})):N.reject("Upload url missing from the settings.");var r,a}}}var Ue=function(e){return{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}},Oe=function(r){var t,e,a=Se(function(e){return r.convertURL(e.value||e.url,"src")}),n=new N(function(t){var n,e;n=function(e){t(a(e).map(function(e){return x([[{text:"None",value:""}],e])}))},"string"==typeof(e=r.getParam("image_list",!1))?P.send({url:e,success:function(e){n(JSON.parse(e))}}):"function"==typeof e?e(n):n(e)}),i=xe(r.getParam("image_class_list")),o=r.getParam("image_advtab",!1,"boolean"),l=r.getParam("image_uploadtab",!0,"boolean"),s=!!L(r),u=!!E(r),c=(e=de(t=r))?oe(function(e){return me(t,e)},e):ae(),m=r.getParam("image_description",!0,"boolean"),d=r.getParam("image_title",!1,"boolean"),g=_(r),f=r.getParam("image_caption",!1,"boolean"),p=r.getParam("a11y_advanced_options",!1,"boolean"),h=L(r),b=r.getParam("images_upload_base_path",undefined,"string"),v=r.getParam("images_upload_credentials",!1,"boolean"),y=E(r),D=r.getParam("automatic_uploads",!0,"boolean"),w=S.some(r.getParam("image_prepend_url","","string")).filter(function(e){return A(e)&&0<e.length});return n.then(function(e){return{image:c,imageList:e,classList:i,hasAdvTab:o,hasUploadTab:l,hasUploadUrl:s,hasUploadHandler:u,hasDescription:m,hasImageTitle:d,hasDimensions:g,hasImageCaption:f,url:h,basePath:b,credentials:v,handler:y,prependURL:w,hasAccessibilityOptions:p,automaticUploads:D}})},Ie=function(e){var t=e.imageList.map(function(e){return{name:"images",type:"listbox",label:"Image list",items:e}}),n={name:"alt",type:"input",label:"Alternative description",disabled:e.hasAccessibilityOptions&&e.image.isDecorative},r=e.classList.map(function(e){return{name:"classes",type:"listbox",label:"Class",items:e}});return x([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[n]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{type:"grid",columns:2,items:x([r.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]])},Ne=function(e){return{title:"General",name:"general",items:Ie(e)}},Pe=Ie,_e=function(e){return{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}},Le=function(e){return{src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e["class"],caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}},Ee=function(e,t){return{src:e.src.value,alt:0===e.alt.length&&t?null:e.alt,title:e.title,width:e.dimensions.width,height:e.dimensions.height,"class":e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}},Me=function(e,t){var n,r,a=t.getData();n=e,r=a.src.value,(/^(?:[a-zA-Z]+:)?\/\//.test(r)?S.none():n.prependURL.bind(function(e){return r.substring(0,e.length)!==e?S.some(e+r):S.none()})).each(function(e){t.setData({src:{value:e,meta:a.src.meta}})})},Re=function(e,t){var n,r,a,i,o=t.getData(),l=o.src.meta;l!==undefined&&(n=be({},o),a=n,i=l,(r=e).hasDescription&&A(i.alt)&&(a.alt=i.alt),r.hasAccessibilityOptions&&(a.isDecorative=i.isDecorative||a.isDecorative||!1),r.hasImageTitle&&A(i.title)&&(a.title=i.title),r.hasDimensions&&(A(i.width)&&(a.dimensions.width=i.width),A(i.height)&&(a.dimensions.height=i.height)),A(i["class"])&&Te(r.classList,i["class"]).each(function(e){a.classes=e.value}),r.hasImageCaption&&d(i.caption)&&(a.caption=i.caption),r.hasAdvTab&&(A(i.style)&&(a.style=i.style),A(i.vspace)&&(a.vspace=i.vspace),A(i.border)&&(a.border=i.border),A(i.hspace)&&(a.hspace=i.hspace),A(i.borderstyle)&&(a.borderstyle=i.borderstyle)),t.setData(n))},ze=function(e,t,n,r){var a,i,o,l,s,u,c,m,d,g,f,p;Me(t,r),Re(t,r),a=e,i=t,o=n,s=(l=r).getData(),u=s.src.value,(c=s.src.meta||{}).width||c.height||!i.hasDimensions||a.imageSize(u).then(function(e){o.open&&l.setData({dimensions:e})}),m=t,d=n,f=(g=r).getData(),p=Te(m.imageList,f.src.value),d.prevImage=p,g.setData({images:p.map(function(e){return e.value}).getOr("")})},He=function(e,t,n){var r,a,i,o,l,s=H(e(n.style)),u=be({},n);return u.vspace=(r=s)["margin-top"]&&r["margin-bottom"]&&r["margin-top"]===r["margin-bottom"]?R(String(r["margin-top"])):"",u.hspace=(a=s)["margin-right"]&&a["margin-left"]&&a["margin-right"]===a["margin-left"]?R(String(a["margin-right"])):"",u.border=(i=s)["border-width"]?R(String(i["border-width"])):"",u.borderstyle=(o=s)["border-style"]?String(o["border-style"]):"",u.style=(l=t)(e(l(s))),u},ke=function(s,u,t,c){var e=c.getData();c.block("Uploading image"),T(e.fileinput).fold(function(){c.unblock()},function(n){var r,a=URL.createObjectURL(n),i=Ce({url:u.url,basePath:u.basePath,credentials:u.credentials,handler:u.handler}),o=function(){c.unblock(),URL.revokeObjectURL(a)},l=function(e){c.setData({src:{value:e,meta:{}}}),c.showTab("general"),ze(s,u,t,c)};r=n,new N(function(e,t){var n=new FileReader;n.onload=function(){e(n.result)},n.onerror=function(){t(n.error.message)},n.readAsDataURL(r)}).then(function(e){var t=s.createBlobCache(n,a,e);u.automaticUploads?i.upload(t).then(function(e){l(e),o()})["catch"](function(e){o(),s.alertErr(e)}):(s.addToBlobCache(t),l(t.blobUri()),c.unblock())})})},je=function(h,b,v){return function(e,t){var n,r,a,i,o,l,s,u,c,m,d,g,f,p;"src"===t.name?ze(h,b,v,e):"images"===t.name?(c=h,m=b,d=v,f=(g=e).getData(),(p=Te(m.imageList,f.images)).each(function(e){""===f.alt||d.prevImage.map(function(e){return e.text===f.alt}).getOr(!1)?""===e.value?g.setData({src:e,alt:d.prevAlt}):g.setData({src:e,alt:e.text}):g.setData({src:e})}),d.prevImage=p,ze(c,m,d,g)):"alt"===t.name?v.prevAlt=e.getData().alt:"style"===t.name?(o=h,s=(l=e).getData(),u=He(o.parseStyle,o.serializeStyle,s),l.setData(u)):"vspace"===t.name||"hspace"===t.name||"border"===t.name||"borderstyle"===t.name?(n=h,r=e,a=be(Le(b.image),r.getData()),i=ie(n.normalizeCss,Ee(a,!1)),r.setData({style:i})):"fileinput"===t.name?ke(h,b,v,e):"isDecorative"===t.name&&(e.getData().isDecorative?e.disable("alt"):e.enable("alt"))}},Be=function(i){return function(e){var t,n,r,a={prevImage:Te((t=e).imageList,t.image.src),prevAlt:t.image.alt,open:!0};return{title:"Insert/Edit Image",size:"normal",body:(r=e).hasAdvTab||r.hasUploadUrl||r.hasUploadHandler?{type:"tabpanel",tabs:x([[Ne(r)],r.hasAdvTab?[Ue(r)]:[],r.hasUploadTab&&(r.hasUploadUrl||r.hasUploadHandler)?[_e(r)]:[]])}:{type:"panel",items:Pe(r)},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Le(e.image),onSubmit:i.onSubmit(e),onChange:je(i,e,a),onClose:(n=a,function(){n.open=!1})}}},Fe=function(t){return function(e){return a=t.documentBaseURI.toAbsolute(e),new N(function(t){var n=document.createElement("img"),r=function(e){n.parentNode&&n.parentNode.removeChild(n),t(e)};n.onload=function(){var e={width:M(n.width,n.clientWidth),height:M(n.height,n.clientHeight)};r(N.resolve(e))},n.onerror=function(){r(N.reject("Failed to get image dimensions for: "+a))};var e=n.style;e.visibility="hidden",e.position="fixed",e.bottom=e.left="0px",e.width=e.height="auto",document.body.appendChild(n),n.src=a}).then(function(e){return{width:String(e.width),height:String(e.height)}});var a}},Ge=function(e){var n,t,r,a,i,o,l,s={onSubmit:function(n){return function(e){var t=be(Le(n.image),e.getData());l.execCommand("mceUpdateImage",!1,Ee(t,n.hasAccessibilityOptions)),l.editorUpload.uploadImagesAuto(),e.close()}},imageSize:Fe(l=e),addToBlobCache:function(e){o.editorUpload.blobCache.add(e)},createBlobCache:function(e,t,n){return i.editorUpload.blobCache.create({blob:e,blobUri:t,name:e.name?e.name.replace(/\.[^\.]+$/,""):null,filename:e.name,base64:n.split(",")[1]})},alertErr:function(e){a.windowManager.alert(e)},normalizeCss:function(e){return me(r,e)},parseStyle:function(e){return t.dom.parseStyle(e)},serializeStyle:(n=t=r=a=i=o=e,function(e,t){return n.dom.serializeStyle(e,t)})};return{open:function(){Oe(e).then(Be(s)).then(e.windowManager.open)}}},We=function(u){u.addCommand("mceImage",Ge(u).open),u.addCommand("mceUpdateImage",function(e,s){u.undoManager.transact(function(){return e=s,void((l=de(t=u))?(n=oe(function(e){return me(t,e)},l),(r=c(c({},n),e)).src?pe(t,r):(a=t,(i=l)&&(o=a.dom.is(i.parentNode,"figure.image")?i.parentNode:i,a.dom.remove(o),a.focus(),a.nodeChanged(),a.dom.isEmpty(a.getBody())&&(a.setContent(""),a.selection.setCursorLocation())))):e.src&&fe(t,c(c({},ae()),e)));var t,e,n,r,a,i,o,l})})},qe=function(i){return function(e){for(var t,n=e.length,r=function(e){e.attr("contenteditable",i?"true":null)};n--;){var a=e[n];(t=a.attr("class"))&&/\bimage\b/.test(t)&&(a.attr("contenteditable",i?"false":null),ve.each(a.getAll("figcaption"),r))}}};a.add("image",function(e){var t,n;(t=e).on("PreInit",function(){t.parser.addNodeFilter("figure",qe(!0)),t.serializer.addNodeFilter("figure",qe(!1))}),(n=e).ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:Ge(n).open,onSetup:function(e){return n.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",e.setActive).unbind}}),n.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:Ge(n).open}),n.ui.registry.addContextMenu("image",{update:function(e){return ne(e)||"IMG"===e.nodeName&&!k(e)?["image"]:[]}}),We(e)})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var t,e,n,r,l=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(){},u=function(t){return function(){return t}},a=u(!1),c=u(!0),f=function(){return s},s=(t=function(t){return t.isNone()},{fold:function(t,e){return t()},is:a,isSome:a,isNone:c,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(undefined),or:n,orThunk:e,map:f,each:i,bind:f,exists:a,forall:c,filter:f,equals:t,equals_:t,toArray:function(){return[]},toString:u("none()")}),m=function(n){var t=u(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:c,isNone:a,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return m(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:s},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(a,function(t){return e(n,t)})}};return o},g={some:m,none:f,from:function(t){return null===t||t===undefined?s:m(t)}},h=function(t){return!(null===(e=t)||e===undefined);var e},v=(r="function",function(t){return typeof t===r});function p(t,e){return b(document.createElement("canvas"),t,e)}function y(t){var e=p(t.width,t.height);return w(e).drawImage(t,0,0),e}function w(t){return t.getContext("2d")}function b(t,e,n){return t.width=e,t.height=n,t}var I,T,_,R,U=window.Promise?window.Promise:(I=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=[],C(t,A(E,this),A(L,this))},T=window,_=I.immediateFn||"function"==typeof T.setImmediate&&T.setImmediate||function(t){setTimeout(t,1)},R=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},I.prototype["catch"]=function(t){return this.then(null,t)},I.prototype.then=function(n,r){var o=this;return new I(function(t,e){x.call(o,new k(n,r,t,e))})},I.all=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var c=Array.prototype.slice.call(1===t.length&&R(t[0])?t[0]:t);return new I(function(o,i){if(0===c.length)return o([]);for(var u=c.length,t=0;t<c.length;t++)!function a(e,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){a(e,t)},i)}c[e]=t,0==--u&&o(c)}catch(r){i(r)}}(t,c[t])})},I.resolve=function(e){return e&&"object"==typeof e&&e.constructor===I?e:new I(function(t){t(e)})},I.reject=function(n){return new I(function(t,e){e(n)})},I.race=function(o){return new I(function(t,e){for(var n=0,r=o;n<r.length;n++)r[n].then(t,e)})},I);function A(t,e){return function(){return t.apply(e,arguments)}}function x(r){var o=this;null!==this._state?_(function(){var t,e=o._state?r.onFulfilled:r.onRejected;if(null!==e){try{t=e(o._value)}catch(n){return void r.reject(n)}r.resolve(t)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function E(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void C(A(e,t),A(E,this),A(L,this))}this._state=!0,this._value=t,j.call(this)}catch(n){L.call(this,n)}}function L(t){this._state=!1,this._value=t,j.call(this)}function j(){for(var t=0,e=this._deferreds;t<e.length;t++){var n=e[t];x.call(this,n)}this._deferreds=[]}function k(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function C(t,e,n){var r=!1;try{t(function(t){r||(r=!0,e(t))},function(t){r||(r=!0,n(t))})}catch(o){if(r)return;r=!0,n(o)}}function O(t){var r,e=t.src;return 0===e.indexOf("data:")?S(e):(r=e,new U(function(t,n){var e=new XMLHttpRequest;e.open("GET",r,!0),e.responseType="blob",e.onload=function(){200===this.status&&t(this.response)},e.onerror=function(){var t,e=this;n(0===this.status?((t=new Error("No access to download image")).code=18,t.name="SecurityError",t):new Error("Error "+e.status+" downloading image"))},e.send()}))}function P(a){return new U(function(t,e){var n=URL.createObjectURL(a),r=new Image,o=function(){r.removeEventListener("load",i),r.removeEventListener("error",u)};function i(){o(),t(r)}function u(){o(),e("Unable to load data of type "+a.type+": "+n)}r.addEventListener("load",i),r.addEventListener("error",u),r.src=n,r.complete&&i()})}function S(n){return new U(function(t,e){(function(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return g.none();for(var r=n[1],o=e[1],i=atob(o),u=i.length,a=Math.ceil(u/1024),c=new Array(a),f=0;f<a;++f){for(var s=1024*f,l=Math.min(1024+s,u),d=new Array(l-s),m=s,h=0;m<l;++h,++m)d[h]=i[m].charCodeAt(0);c[f]=new Uint8Array(d)}return g.some(new Blob(c,{type:r}))})(n).fold(function(){e("uri is not base64: "+n)},t)})}function M(t,r,o){return r=r||"image/png",v(HTMLCanvasElement.prototype.toBlob)?new U(function(e,n){t.toBlob(function(t){t?e(t):n()},r,o)}):S(t.toDataURL(r,o))}function B(t){return P(t).then(function(t){var e;e=t,URL.revokeObjectURL(e.src);var n,r,o=p((r=t).naturalWidth||r.width,(n=t).naturalHeight||n.height);return w(o).drawImage(t,0,0),o})}var N=P,D=O,F=function(t,e){return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return g.some(i);if(n(i,r))break}return g.none()}(t,e,a)};function H(t,e,n){var r=e.type;function o(r,o){return t.then(function(t){return n=o,e=(e=r)||"image/png",t.toDataURL(e,n);var e,n})}return{getType:u(r),toBlob:function(){return U.resolve(e)},toDataURL:u(n),toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(e,n){return t.then(function(t){return M(t,e,n)})},toAdjustedDataURL:o,toAdjustedBase64:function(t,e){return o(t,e).then(function(t){return t.split(",")[1]})},toCanvas:function(){return t.then(y)}}}function q(e){return n=e,new U(function(t){var e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(n)}).then(function(t){return H(B(e),e,t)});var n}function z(e,t){return M(e,t).then(function(t){return H(U.resolve(e),t,e.toDataURL())})}function $(e,n){return e.toCanvas().then(function(t){return function(t,e,n){var r=p(t.width,t.height),o=w(r),i=0,u=0;90!==(n=n<0?360+n:n)&&270!==n||b(r,r.height,r.width);90!==n&&180!==n||(i=r.width);270!==n&&180!==n||(u=r.height);return o.translate(i,u),o.rotate(n*Math.PI/180),o.drawImage(t,0,0),z(r,e)}(t,e.getType(),n)})}function G(e,n){return e.toCanvas().then(function(t){return function(t,e,n){var r=p(t.width,t.height),o=w(r);"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0));return z(r,e)}(t,e.getType(),n)})}var J=G,K=$,V=Object.keys,W=function(e,r,o){return void 0===o&&(o=!1),new U(function(t){var n=new XMLHttpRequest;n.onreadystatechange=function(){4===n.readyState&&t({status:n.status,blob:n.response})},n.open("GET",e,!0),n.withCredentials=o,function(t,e){for(var n=V(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}}(r,function(t,e){n.setRequestHeader(e,t)}),n.responseType="blob",n.send()})},X=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],Q=[{type:"not_found",message:"Failed to load image."},{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],Y=function(t,e){var n,r,o=(n=function(t,e){return h(t)?t[e]:undefined},r=t,function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)}(e,function(t){r=n(r,t)}),r);return g.from(o)},Z=function(t){var e,n=(e=t,"ImageProxy HTTP error: "+F(X,function(t){return e===t.code}).fold(u("Unknown ImageProxy error"),function(t){return t.message}));return U.reject(n)},tt=function(e){return F(Q,function(t){return t.type===e}).fold(u("Unknown service error"),function(t){return t.message})},et=function(t){return"ImageProxy Service error: "+function(t){try{return g.some(JSON.parse(t))}catch(e){return g.none()}}(t).bind(function(t){return Y(t,["error","type"]).map(tt)}).getOr("Invalid JSON in service error message")},nt=function(t){return r=t,new U(function(t,e){var n=new FileReader;n.onload=function(){t(n.result)},n.onerror=function(t){e(t)},n.readAsText(r)}).then(function(t){var e=et(t);return U.reject(e)});var r},rt=function(t){return t<200||300<=t},ot=function(t,e){var n,r,o,i={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":e};return W((r=e,o=-1===(n=t).indexOf("?")?"?":"&",/[?&]apiKey=/.test(n)?n:n+o+"apiKey="+encodeURIComponent(r)),i).then(function(t){return rt(t.status)?(e=t.status,n=t.blob,r=e,"application/json"!==(null==(o=n)?void 0:o.type)||400!==r&&403!==r&&404!==r&&500!==r?Z(e):nt(n)):U.resolve(t.blob);var e,n,r,o})},it=function(t,e,n){return void 0===n&&(n=!1),e?ot(t,e):W(t,{},n).then(function(t){return rt(t.status)?Z(t.status):U.resolve(t.blob)})},ut=q,at=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:t}},ct={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return at(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return at(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return at(n)},fromDom:at,fromPoint:function(t,e,n){return g.from(t.dom.elementFromPoint(e,n)).map(at)}},ft=("undefined"!=typeof window||Function("return this;")(),function(t,e){return n=function(t){return function(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(r.matches!==undefined)return r.matches(e);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(e);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(e);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}(t,e)},F(t.dom.childNodes,function(t){return n(ct.fromDom(t))}).map(ct.fromDom);var n}),st=tinymce.util.Tools.resolve("tinymce.util.Delay"),lt=tinymce.util.Tools.resolve("tinymce.util.Promise"),dt=tinymce.util.Tools.resolve("tinymce.util.URI"),mt=function(t){return t.getParam("imagetools_proxy")};function ht(t){var e,n;function r(t){return/^[0-9\.]+px$/.test(t)}return e=t.style.width,n=t.style.height,e||n?r(e)&&r(n)?{w:parseInt(e,10),h:parseInt(n,10)}:null:(e=t.width,n=t.height,e&&n?{w:parseInt(e,10),h:parseInt(n,10)}:null)}function gt(t){return{w:t.naturalWidth,h:t.naturalHeight}}var vt=0,pt=function(t){return ft(ct.fromDom(t),"img")},yt=function(t,e){return t.dom.is(e,"figure")},wt=function(t,e){return t.dom.is(e,"img:not([data-mce-object],[data-mce-placeholder])")},bt=function(e,t){var n=function(t){return wt(e,t)&&(Rt(e,t)||Ut(e,t)||h(mt(e)))};return yt(e,t)?pt(t).bind(function(t){return n(t.dom)?g.some(t.dom):g.none()}):n(t)?g.some(t):g.none()},It=function(t,e){t.notificationManager.open({text:e,type:"error"})},Tt=function(t){var e=t.selection.getNode(),n=t.dom.getParent(e,"figure.image");return null!==n&&yt(t,n)?pt(n):wt(t,e)?g.some(ct.fromDom(e)):g.none()},_t=function(t,e,n){var r=e.match(/(?:\/|^)(([^\/\?]+)\.(?:[a-z0-9.]+))(?:\?|$)/i);return h(r)?t.dom.encode(r[n]):null},Rt=function(t,e){var n=e.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new dt(n).host===t.documentBaseURI.host},Ut=function(t,e){return-1!==d.inArray(t.getParam("imagetools_cors_hosts",[],"string[]"),new dt(e.src).host)},At=function(t,e){if(Ut(t,e))return it(e.src,null,(n=t,r=e,-1!==d.inArray(n.getParam("imagetools_credentials_hosts",[],"string[]"),new dt(r.src).host)));var n,r,o;if(Rt(t,e))return D(e);var i=mt(t),u=i+(-1===i.indexOf("?")?"?":"&")+"url="+encodeURIComponent(e.src),a=(o=t).getParam("api_key",o.getParam("imagetools_api_key","","string"),"string");return it(u,a,!1)},xt=function(t,e){return n=t,g.from(n.getParam("imagetools_fetch_image",null,"function")).fold(function(){return At(t,e)},function(t){return t(e)});var n},Et=function(t,e){var n=t.editorUpload.blobCache.getByUri(e.src);return n?lt.resolve(n.blob()):xt(t,e)},Lt=function(t){st.clearTimeout(t.get())},jt=function(a,c,f,s,l,d,m){return f.toBlob().then(function(t){var e,n,o,r=a.editorUpload.blobCache,i=d.src,u=c.type===t.type;return a.getParam("images_reuse_filename",!1,"boolean")&&(o=r.getByUri(i),n=h(o)?(i=o.uri(),e=o.name(),o.filename()):(e=_t(a,i,2),_t(a,i,1))),o=r.create({id:"imagetools"+vt++,blob:t,base64:f.toBase64(),uri:i,name:e,filename:u?n:undefined}),r.add(o),a.undoManager.transact(function(){a.$(d).on("load",function r(){var t,e,n;a.$(d).off("load",r),a.nodeChanged(),s?a.editorUpload.uploadImagesAuto():(Lt(l),t=a,e=l,n=st.setEditorTimeout(t,function(){t.editorUpload.uploadImagesAuto()},t.getParam("images_upload_timeout",3e4,"number")),e.set(n))}),m&&a.$(d).attr({width:m.w,height:m.h}),a.$(d).attr({src:o.blobUri()}).removeAttr("data-mce-src")}),o})},kt=function(r,o,t,i){return function(){return Tt(r).fold(function(){It(r,"Could not find selected image")},function(n){return r._scanForImages().then(function(){return Et(r,n.dom)}).then(function(e){return ut(e).then(t).then(function(t){return jt(r,e,t,!1,o,n.dom,i)})})["catch"](function(t){It(r,t)})})}},Ct=function(e,n,r){return function(){var t=Tt(e).fold(function(){return null},function(t){var e=ht(t.dom);return e?{w:e.h,h:e.w}:null});return kt(e,n,function(t){return K(t,r)},t)()}},Ot=function(t,e,n){return function(){return kt(t,e,function(t){return J(t,n)})()}},Pt=function(e,n,u,a,c){return N(c).then(function(t){var e,n,r,o,i=gt(t);return a.w===i.w&&a.h===i.h||ht(u)&&(e=u,(n=i)&&(r=e.style.width,o=e.style.height,(r||o)&&(e.style.width=n.w+"px",e.style.height=n.h+"px",e.removeAttribute("data-mce-style")),r=e.width,o=e.height,(r||o)&&(e.setAttribute("width",String(n.w)),e.setAttribute("height",String(n.h))))),URL.revokeObjectURL(t.src),c}).then(ut).then(function(t){return jt(e,c,t,!0,n,u)})["catch"](function(){})},St=function(i,u){return function(){var r=Tt(i),o=r.map(function(t){return gt(t.dom)});r.each(function(e){bt(i,e.dom).each(function(t){Et(i,e.dom).then(function(t){var e,n={blob:e=t,url:URL.createObjectURL(e)};i.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:n}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(t){var n=t.getData().imagetools.blob;r.each(function(e){o.each(function(t){Pt(i,u,e.dom,t,n)})}),t.close()},onCancel:function(){},onAction:function(t,e){switch(e.name){case"save-state":e.value?t.enable("save"):t.disable("save");break;case"disable":t.disable("save"),t.disable("cancel");break;case"enable":t.enable("cancel")}}})})})})}};o.add("imagetools",function(t){var n,e,r,o,i,u,a,c,f=l(0),s=l(null);n=t,e=f,d.each({mceImageRotateLeft:Ct(n,e,-90),mceImageRotateRight:Ct(n,e,90),mceImageFlipVertical:Ot(n,e,"v"),mceImageFlipHorizontal:Ot(n,e,"h"),mceEditImage:St(n,e)},function(t,e){n.addCommand(e,t)}),o=function(t){return function(){return r.execCommand(t)}},(r=t).ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:o("mceImageRotateLeft")}),r.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:o("mceImageRotateRight")}),r.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:o("mceImageFlipVertical")}),r.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:o("mceImageFlipHorizontal")}),r.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:o("mceEditImage"),onSetup:function(e){var t=function(){var t=Tt(r).forall(function(t){return bt(r,t.dom).isNone()});e.setDisabled(t)};return r.on("NodeChange",t),function(){r.off("NodeChange",t)}}}),r.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image",onAction:o("mceImage")}),r.ui.registry.addContextMenu("imagetools",{update:function(t){return bt(r,t).fold(function(){return[]},function(t){return[{text:"Edit image",icon:"edit-image",onAction:o("mceEditImage")}]})}}),(i=t).ui.registry.addContextToolbar("imagetools",{items:i.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions"),predicate:function(t){return bt(i,t).isSome()},position:"node",scope:"node"}),a=f,c=s,(u=t).on("NodeChange",function(t){var e=c.get(),n=bt(u,t.element);e&&!n.exists(function(t){return e.src===t.src})&&(Lt(a),u.editorUpload.uploadImagesAuto(),c.set(null)),n.each(c.set)})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var n,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.EditorManager"),m=tinymce.util.Tools.resolve("tinymce.Env"),h=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=function(t){return t.getParam("importcss_selector_converter")},o=(n="array",function(t){return r=typeof(e=t),(null===e?"null":"object"==r&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":r)===n;var e,r}),i=Array.prototype.push,l=function(t,e){return function(t){for(var e=[],r=0,n=t.length;r<n;++r){if(!o(t[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+t);i.apply(e,t[r])}return e}(function(t,e){for(var r=t.length,n=new Array(r),o=0;o<r;o++){var i=t[o];n[o]=e(i,o)}return n}(t,e))},p=function(e){return"string"==typeof e?function(t){return-1!==t.indexOf(e)}:e instanceof RegExp?function(t){return e.test(t)}:e},_=function(s,t,a){var u=[],r={};function l(t,e){var r,n,o,i=t.href;if(n=i,o=m.cacheSuffix,"string"==typeof n&&(n=n.replace("?"+o,"").replace("&"+o,"")),(i=n)&&a(i,e)&&!function(t,e){var r,n=!1!==(r=t.getParam("skin"))&&(r||"oxide");if(n){var o=t.getParam("skin_url"),i=o?t.documentBaseURI.toAbsolute(o):f.baseURL+"/skins/ui/"+n,c=f.baseURL+"/skins/content/";return e===i+"/content"+(t.inline?".inline":"")+".min.css"||-1!==e.indexOf(c)}return!1}(s,i)){h.each(t.imports,function(t){l(t,!0)});try{r=t.cssRules||t.rules}catch(c){}h.each(r,function(t){t.styleSheet?l(t.styleSheet,!0):t.selectorText&&h.each(t.selectorText.split(","),function(t){u.push(h.trim(t))})})}}h.each(s.contentCSS,function(t){r[t]=!0}),a=a||function(t,e){return e||r[t]};try{h.each(t.styleSheets,function(t){l(t)})}catch(e){}return u},x=function(t,e){var r,n=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(n){var o=n[1],i=n[2].substr(1).split(".").join(" "),c=h.makeMap("a,img");return n[1]?(r={title:e},t.schema.getTextBlockElements()[o]?r.block=o:t.schema.getBlockElements()[o]||c[o.toLowerCase()]?r.selector=o:r.inline=o):n[2]&&(r={inline:"span",title:e.substr(1),classes:i}),!1!==t.getParam("importcss_merge_classes")?r.classes=i:r.attributes={"class":i},r}},P=function(t,e){return null===e||!1!==t.getParam("importcss_exclusive")},r=function(y){y.on("init",function(t){var e,r,n,o,i=(e=[],r=[],n={},{addItemToGroup:function(t,e){n[t]?n[t].push(e):(r.push(t),n[t]=[e])},addItem:function(t){e.push(t)},toFormats:function(){return l(r,function(t){var e=n[t];return 0===e.length?[]:[{title:t,items:e}]}).concat(e)}}),g={},c=p(y.getParam("importcss_selector_filter")),s=(o=y.getParam("importcss_groups"),h.map(o,function(t){return h.extend({},t,{original:t,selectors:{},filter:p(t.filter),item:{text:t.title,menu:[]}})})),a=function(t,e){if(f=t,p=g,!(P(y,m=e)?f in p:f in m.selectors)){a=t,l=g,P(y,u=e)?l[a]=!0:u.selectors[a]=!0;var r=(i=(o=y).plugins.importcss,c=t,((s=e)&&s.selector_converter?s.selector_converter:d(o)?d(o):function(){return x(o,c)}).call(i,c,s));if(r){var n=r.name||v.DOM.uniqueId();return y.formatter.register(n,r),h.extend({},{title:r.title,format:n})}}var o,i,c,s,a,u,l,f,m,p;return null};h.each(_(y,y.getDoc(),p(y.getParam("importcss_file_filter"))),function(r){var t,e,n,o;-1===r.indexOf(".mce-")&&(c&&!c(r)||(n=s,o=r,0<(t=h.grep(n,function(t){return!t.filter||t.filter(o)})).length?h.each(t,function(t){var e=a(r,t);e&&i.addItemToGroup(t.title,e)}):(e=a(r,null))&&i.addItem(e)))});var u=i.toFormats();y.fire("addStyleModifications",{items:u,replace:!y.getParam("importcss_append")})})};t.add("importcss",function(t){return r(t),e=t,{convertSelectorToFormat:function(t){return x(e,t)}};var e})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},c=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),i="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),o="January February March April May June July August September October November December".split(" "),m=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},s=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",m(n.getMonth()+1,2))).replace("%d",m(n.getDate(),2))).replace("%H",""+m(n.getHours(),2))).replace("%M",""+m(n.getMinutes(),2))).replace("%S",""+m(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(o[n.getMonth()]))).replace("%b",""+e.translate(i[n.getMonth()]))).replace("%A",""+e.translate(a[n.getDay()]))).replace("%a",""+e.translate(r[n.getDay()]))).replace("%%","%")},l=function(e,t){var n,r,a,i,o,u,c,m;e.getParam("insertdatetime_element",!1)?(n=s(e,t),r=void 0,r=/%[HMSIp]/.test(t)?s(e,"%Y-%m-%dT%H:%M"):s(e,"%Y-%m-%d"),(a=e.dom.getParent(e.selection.getStart(),"time"))?(o=a,u=r,c=n,m=(i=e).dom.create("time",{datetime:u},c),o.parentNode.insertBefore(m,o),i.dom.remove(o),i.selection.select(m,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")):e.insertContent(s(e,t))},t=function(t){t.addCommand("mceInsertDate",function(){var e;l(t,(e=t).getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),t.addCommand("mceInsertTime",function(){l(t,u(t))})},d=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(n){var e,t,r,a,i=c(n),o=(a=c(r=n),e=0<a.length?a[0]:u(r),t=e,{get:function(){return t},set:function(e){t=e}});n.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===o.get()},fetch:function(e){e(d.map(i,function(e){return{type:"choiceitem",text:s(n,e),value:e}}))},onAction:function(e){l(n,o.get())},onItemAction:function(e,t){o.set(t),l(n,t)}});n.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return d.map(i,function(e){return{type:"menuitem",text:s(n,e),onAction:(t=e,function(){o.set(t),l(n,t)})};var t})}})};e.add("insertdatetime",function(e){t(e),n(e)})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(s){var e,t,i,a;t=!1,(e=s).settings.inline_styles=t,e.getParam("fontsize_formats")||(i="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",e.settings.fontsize_formats=i),e.getParam("font_formats")||(a="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",e.settings.font_formats=a),s.on("PreInit",function(){return e=s,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table",i=l.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large")),a=e.schema,e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all",preserve_attributes:["class","style"]},{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all",preserve_attributes:["class","style"]},{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",toggle:!1,attributes:{face:"%value"}},fontsize:{inline:"font",toggle:!1,attributes:{size:function(e){return String(l.inArray(i,e.value)+1)}}},forecolor:{inline:"font",attributes:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0}}),l.each("b,i,u,strike".split(","),function(e){a.addValidElements(e+"[*]")}),a.getElementRule("font")||a.addValidElements("font[face|size|color|style]"),void l.each(t.split(","),function(e){var t=a.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))});var e,t,i,a})};e.add("legacyoutput",function(e){t(e)})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var n,t,e,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.util.VK"),u=function(r){return function(t){return e=typeof(n=t),(null===n?"null":"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e)===r;var n,e}},a=function(n){return function(t){return typeof t===n}},l=u("string"),c=u("array"),f=function(t){return n===t},s=a("boolean"),m=a("function"),g=function(t){var n=t.getParam("link_assume_external_targets",!1);return s(n)&&n?1:!l(n)||"http"!==n&&"https"!==n?0:n},p=function(t){return t.getParam("default_link_target")},d=function(t){return t.getParam("target_list",!0)},h=function(t){return t.getParam("rel_list",[],"array")},v=function(t){return t.getParam("allow_unsafe_link_target",!1,"boolean")},y=function(){},k=function(t){return function(){return t}},x=k(!1),b=k(!(n=null)),O=function(){return w},w=(t=function(t){return t.isNone()},{fold:function(t,n){return t()},is:x,isSome:x,isNone:b,getOr:r=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:k(null),getOrUndefined:k(undefined),or:r,orThunk:e,map:O,each:y,bind:O,exists:x,forall:b,filter:O,equals:t,equals_:t,toArray:function(){return[]},toString:k("none()")}),C=function(e){var t=k(e),n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:b,isNone:x,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return C(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?o:w},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(x,function(t){return n(e,t)})}};return o},N={some:C,none:O,from:function(t){return null===t||t===undefined?w:C(t)}},A=Array.prototype.indexOf,P=Array.prototype.push,T=function(t,n){return e=t,r=n,-1<A.call(e,r);var e,r},S=function(t){for(var n=[],e=0,r=t.length;e<r;++e){if(!c(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);P.apply(n,t[e])}return n},_=function(t,n){return S(function(t,n){for(var e=t.length,r=new Array(e),o=0;o<e;o++){var i=t[o];r[o]=n(i,o)}return r}(t,n))},R=function(t,n){for(var e=0;e<t.length;e++){var r=n(t[e],e);if(r.isSome())return r}return N.none()},D=function(t,n){return t?N.some(n):N.none()},L=tinymce.util.Tools.resolve("tinymce.util.Tools"),E=function(t){return l(t.value)?t.value:""},M=function(t,i){var u=[];return L.each(t,function(t){var n,e,r,o=l((n=t).text)?n.text:l(n.title)?n.title:"";t.menu!==undefined?(e=M(t.menu,i),u.push({text:o,items:e})):(r=i(t),u.push({text:o,value:r}))}),u},U=function(n){return void 0===n&&(n=E),function(t){return N.from(t).map(function(t){return M(t,n)})}},B={sanitize:function(t){return U(E)(t)},sanitizeWith:U,createUi:function(n,e){return function(t){return{name:n,type:"listbox",label:e,items:t}}},getValue:E},q=function(){return(q=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},I=Object.keys,K=Object.hasOwnProperty,z=function(t,e,r,o){return function(t,n){for(var e=I(t),r=0,o=e.length;r<o;r++){var i=e[r];n(t[i],i)}}(t,function(t,n){(e(t,n)?r:o)(t,n)}),{}},j=function(t,n){var e,r={};return z(t,n,(e=r,function(t,n){e[n]=t}),y),r},V=function(t,n){return K.call(t,n)},F=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),W=function(t){return t&&"a"===t.nodeName.toLowerCase()},H=function(t){return W(t)&&!!X(t)},G=function(t,n){if(t.collapsed)return[];for(var e=t.cloneContents(),r=new F(e.firstChild,e),o=[],i=e.firstChild;n(i)&&o.push(i),i=r.next(););return o},J=function(t){return/^\w+:/i.test(t)},X=function(t){var n=t.getAttribute("data-mce-href");return n||t.getAttribute("href")},$=function(t,n){var e,r,o=["noopener"],i=t?t.split(/\s+/):[],u=function(t){return t.filter(function(t){return-1===L.inArray(o,t)})},a=n?0<(e=u(e=i)).length?e.concat(o):o:u(i);return 0<a.length?(r=a,L.trim(r.sort().join(" "))):""},Q=function(t,n){return n=n||t.selection.getNode(),nt(n)?t.dom.select("a[href]",n)[0]:t.dom.getParent(n,"a[href]")},Y=function(t,n){var e=n?n.innerText||n.textContent:t.getContent({format:"text"});return e.replace(/\uFEFF/g,"")},Z=function(t){return 0<L.grep(t,H).length},tt=function(t){var n=t.schema.getTextInlineElements();return 0===G(t.selection.getRng(),function(t){return 1===t.nodeType&&!W(t)&&!V(n,t.nodeName.toLowerCase())}).length},nt=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},et=function(t){return n=["title","rel","class","target"],e=function(n,e){return t[e].each(function(t){n[e]=0<t.length?t:null}),n},r={href:t.href},function(t,n){for(var e=0,r=t.length;e<r;e++)n(t[e],e)}(n,function(t){r=e(r,t)}),r;var n,e,r},rt=function(t,n){var e,r,o,i=q({},n);return 0<h(t).length||!1!==v(t)||(e=$(i.rel,"_blank"===i.target),i.rel=e||null),N.from(i.target).isNone()&&!1===d(t)&&(i.target=p(t)),i.href=(r=i.href,"http"!==(o=g(t))&&"https"!==o||J(r)?r:o+"://"+r),i},ot=function(l,c,f){var s=l.selection.getNode(),m=Q(l,s),g=rt(l,et(f));l.undoManager.transact(function(){var n,t,e,r,o,i,u,a;f.href===c.href&&c.attach(),m?(l.focus(),o=l,i=m,u=f.text,a=g,u.each(function(t){i.hasOwnProperty("innerText")?i.innerText=t:i.textContent=t}),o.dom.setAttribs(i,a),o.selection.select(i)):(n=l,t=s,e=f.text,r=g,nt(t)?ct(n,t,r):e.fold(function(){n.execCommand("mceInsertLink",!1,r)},function(t){n.insertContent(n.dom.createHTML("a",r,n.dom.encode(t)))}))})},it=function(l){l.undoManager.transact(function(){var t,n,e,r,o,i,u,a=l.selection.getNode();nt(a)?lt(l,a):(n=(t=l).dom,e=t.selection,r=e.getBookmark(),o=e.getRng().cloneRange(),i=n.getParent(o.startContainer,"a[href]",t.getBody()),u=n.getParent(o.endContainer,"a[href]",t.getBody()),i&&o.setStartBefore(i),u&&o.setEndAfter(u),e.setRng(o),t.execCommand("unlink"),e.moveToBookmark(r)),l.focus()})},ut=function(t,n,e){var r,o,i,u,a,l,c;t.hasPlugin("rtc",!0)?t.execCommand("createlink",!1,(o=(r=e)["class"],i=r.href,u=r.rel,a=r.target,l=r.text,c=r.title,j({"class":o.getOrNull(),href:i,rel:u.getOrNull(),target:a.getOrNull(),text:l.getOrNull(),title:c.getOrNull()},function(t,n){return!1===f(t)}))):ot(t,n,e)},at=function(t){t.hasPlugin("rtc",!0)?t.execCommand("unlink"):it(t)},lt=function(t,n){var e,r=t.dom.select("img",n)[0];!r||(e=t.dom.getParents(r,"a[href]",n)[0])&&(e.parentNode.insertBefore(r,e),t.dom.remove(e))},ct=function(t,n,e){var r,o=t.dom.select("img",n)[0];o&&(r=t.dom.create("a",e),o.parentNode.insertBefore(r,o),r.appendChild(o))},ft=function(t){return V(n=t,e="items")&&n[e]!==undefined&&null!==n[e];var n,e},st=function(n,t){return R(t,function(t){return ft(t)?st(n,t.items):D(t.value===n,t)})},mt=function(n,t,e,r){var o=r[t],i=0<n.length;return o!==undefined?st(o,e).map(function(t){return{url:{value:t.value,meta:{text:i?n:t.text,attach:y}},text:i?n:t.text}}):N.none()},gt=function(t,i){var u={text:t.text,title:t.title},r=function(t){var n,e,r=(n=t.url,D(u.text.length<=0,N.from(n.meta.text).getOr(n.value))),o=(e=t.url,D(u.title.length<=0,N.from(e.meta.title).getOr("")));return r.isSome()||o.isSome()?N.some(q(q({},r.map(function(t){return{text:t}}).getOr({})),o.map(function(t){return{title:t}}).getOr({}))):N.none()},o=function(t,n){var e,r,o=(e=i,("link"===(r=n.name)?e.link:"anchor"===r?e.anchor:N.none()).getOr([]));return mt(u.text,n.name,o,t)};return{onChange:function(t,n){var e=n.name;return"url"===e?r(t()):T(["anchor","link"],e)?o(t(),n):(("text"===e||"title"===e)&&(u[e]=t()[e]),N.none())}}},dt=tinymce.util.Tools.resolve("tinymce.util.Delay"),ht=tinymce.util.Tools.resolve("tinymce.util.Promise"),pt=function(t){var n=t.href;return 0<n.indexOf("@")&&-1===n.indexOf("/")&&-1===n.indexOf("mailto:")?N.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(t){return q(q({},t),{href:"mailto:"+n})}}):N.none()},vt=function(u,a){return R([pt,(e=g(u),r=u.getParam("link_default_protocol","http","string"),function(t){var n=t.href;return 1===e&&!J(n)||0===e&&/^\s*www(\.|\d\.)/i.test(n)?N.some({message:"The URL you entered seems to be an external link. Do you want to add the required "+r+":// prefix?",preprocess:function(t){return q(q({},t),{href:r+"://"+n})}}):N.none()})],function(t){return t(a)}).fold(function(){return ht.resolve(a)},function(i){return new ht(function(n){var e,t,r,o;e=u,t=i.message,r=function(t){n(t?i.preprocess(a):a)},o=e.selection.getRng(),dt.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),r(t)})})})});var e,r},yt=function(t){var n=t.dom.select("a:not([href])"),e=_(n,function(t){var n=t.name||t.id;return n?[{text:n,value:"#"+n}]:[]});return 0<e.length?N.some([{text:"None",value:""}].concat(e)):N.none()},kt=function(t){var n=t.getParam("link_class_list",[],"array");return 0<n.length?B.sanitize(n):N.none()},xt=tinymce.util.Tools.resolve("tinymce.util.XHR"),bt=function(n){var e=function(t){return n.convertURL(t.value||t.url,"href")},t=n.getParam("link_list");return new ht(function(n){l(t)?xt.send({url:t,success:function(t){return n(function(t){try{return N.some(JSON.parse(t))}catch(n){return N.none()}}(t))},error:function(t){return n(N.none())}}):m(t)?t(function(t){return n(N.some(t))}):n(N.from(t))}).then(function(t){return t.bind(B.sanitizeWith(e)).map(function(t){if(0<t.length){return[{text:"None",value:""}].concat(t)}return t})})},Ot=function(t,n){var e=h(t);if(0<e.length){var r=n.is("_blank");return(!1===v(t)?B.sanitizeWith(function(t){return $(B.getValue(t),r)}):B.sanitize)(e)}return N.none()},wt=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],Ct=function(t){var n=d(t);return c(n)?B.sanitize(n).orThunk(function(){return N.some(wt)}):!1===n?N.none():N.some(wt)},Nt=function(t,n,e){var r=t.getAttrib(n,e);return null!==r&&0<r.length?N.some(r):N.none()},At=function(f,s){return bt(f).then(function(t){var n,e,r,o,i,u,a,l,c=(e=s,r=(n=f).dom,o=tt(n)?N.some(Y(n.selection,e)):N.none(),i=e?N.some(r.getAttrib(e,"href")):N.none(),u=e?N.from(r.getAttrib(e,"target")):N.none(),a=Nt(r,e,"rel"),l=Nt(r,e,"class"),{url:i,text:o,title:Nt(r,e,"title"),target:u,rel:a,linkClass:l});return{anchor:c,catalogs:{targets:Ct(f),rels:Ot(f,c.target),classes:kt(f),anchor:yt(f),link:t},optNode:N.from(s),flags:{titleEnabled:f.getParam("link_title",!0,"boolean")}}})},Pt=function(h){var t,n;(n=Q(t=h),At(t,n)).then(function(t){var i,u,n,e,r,o,a,l,c,f,s,m,g,d;return e=function(t){var e=t.getData();if(!e.url.value)return at(i),void t.close();var n=function(n){return N.from(e[n]).filter(function(t){return!u.anchor[n].is(t)})},r={href:e.url.value,text:n("text"),target:n("target"),rel:n("rel"),"class":n("linkClass"),title:n("title")},o={href:e.url.value,attach:e.url.meta!==undefined&&e.url.meta.attach?e.url.meta.attach:function(){}};vt(i,r).then(function(t){ut(i,o,t)}),t.close()},r=i=h,c=(n=u=t).anchor.text.map(function(){return{name:"text",type:"input",label:"Text to display"}}).toArray(),f=n.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],s=N.from(p(r)),o=s,a=n.anchor,m={url:{value:l=a.url.getOr(""),meta:{original:{value:l}}},text:a.text.getOr(""),title:a.title.getOr(""),anchor:l,link:l,rel:a.rel.getOr(""),target:a.target.or(o).getOr(""),linkClass:a.linkClass.getOr("")},g=n.catalogs,d=gt(m,g),{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:S([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],c,f,function(t){for(var n=[],e=function(t){n.push(t)},r=0;r<t.length;r++)t[r].each(e);return n}([g.anchor.map(B.createUi("anchor","Anchors")),g.rels.map(B.createUi("rel","Rel")),g.targets.map(B.createUi("target","Open link in...")),g.link.map(B.createUi("link","Link list")),g.classes.map(B.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:m,onChange:function(n,t){var e=t.name;d.onChange(n.getData,{name:e}).each(function(t){n.setData(t)})},onSubmit:e}}).then(function(t){h.windowManager.open(t)})},Tt=function(t){var n=document.createElement("a");n.target="_blank",n.href=t,n.rel="noreferrer noopener";var e,r,o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e=n,r=o,document.body.appendChild(e),e.dispatchEvent(r),document.body.removeChild(e)},St=function(t,n){return t.dom.getParent(n,"a[href]")},_t=function(t){return St(t,t.selection.getStart())},Rt=function(t,n){var e,r;n&&(e=X(n),/^#/.test(e)?(r=t.$(e)).length&&t.selection.scrollIntoView(r[0],!0):Tt(n.href))},Dt=function(t){return function(){Pt(t)}},Lt=function(t){return function(){Rt(t,_t(t))}},Et=function(r){r.on("click",function(t){var n=St(r,t.target);n&&i.metaKeyPressed(t)&&(t.preventDefault(),Rt(r,n))}),r.on("keydown",function(t){var n,e=_t(r);e&&13===t.keyCode&&(!0===(n=t).altKey&&!1===n.shiftKey&&!1===n.ctrlKey&&!1===n.metaKey)&&(t.preventDefault(),Rt(r,e))})},Mt=function(t,n){return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}},Ut=function(n){return function(t){return Mt(n,function(){t.setActive(!n.mode.isReadOnly()&&null!==Q(n,n.selection.getNode()))})}},Bt=function(e){return function(t){var n=function(){return t.setDisabled(null===Q(e,e.selection.getNode()))};return n(),Mt(e,n)}},qt=function(r){return function(n){var e=function(t){return Z(t)||(n=r.selection.getRng(),0<G(n,H).length);var n},t=r.dom.getParents(r.selection.getStart());return n.setDisabled(!e(t)),Mt(r,function(t){return n.setDisabled(!e(t.parents))})}};o.add("link",function(t){var n,e,r,i,o,u,a;(n=t).ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Dt(n),onSetup:Ut(n)}),n.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Lt(n),onSetup:Bt(n)}),n.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return at(n)},onSetup:qt(n)}),(e=t).ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Lt(e),onSetup:Bt(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Dt(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return at(e)},onSetup:qt(e)}),(r=t).ui.registry.addContextMenu("link",{update:function(t){return Z(r.dom.getParents(t,"a"))?"link unlink openlink":"link"}}),o=function(t){var n=i.selection.getNode();return t.setDisabled(!Q(i,n)),function(){}},(i=t).ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Ut(i)},label:"Link",predicate:function(t){return!!Q(i,t)&&i.getParam("link_context_toolbar",!1,"boolean")},initValue:function(){var t=Q(i);return t?X(t):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(t){var n=i.selection.getNode();return t.setActive(!!Q(i,n)),Ut(i)(t)},onAction:function(t){var n,e,r=Q(i),o=t.getValue();r?i.undoManager.transact(function(){i.dom.setAttrib(r,"href",o),i.selection.collapse(!1),t.hide()}):(n={href:o,attach:function(){}},e=tt(i)?N.some(Y(i.selection,r)).filter(function(t){return 0<t.length}).or(N.from(o)):N.none(),ut(i,n,{href:o,text:e,title:N.none(),rel:N.none(),target:N.none(),"class":N.none()}),t.hide())}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:o,onAction:function(t){at(i),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:o,onAction:function(t){Lt(i)(),t.hide()}}]}),Et(t),(u=t).addCommand("mceLink",function(){u.getParam("link_quicklink",!1,"boolean")?u.fire("contexttoolbar-show",{toolbarKey:"quicklink"}):Dt(u)()}),(a=t).addShortcut("Meta+K","",function(){a.execCommand("mceLink")})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e,n,t,r,o,i,u,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=function(){},y=function(e){return function(){return e}},c=function(n){return function(e){return!n(e)}},f=y(!1),d=y(!0),l=function(){return m},m=(e=function(e){return e.isNone()},{fold:function(e,n){return e()},is:f,isSome:f,isNone:d,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:y(null),getOrUndefined:y(undefined),or:t,orThunk:n,map:l,each:s,bind:l,exists:f,forall:d,filter:l,equals:e,equals_:e,toArray:function(){return[]},toString:y("none()")}),p=function(t){var e=y(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:d,isNone:f,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return p(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:m},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(f,function(e){return n(t,e)})}};return o},g={some:p,none:l,from:function(e){return null===e||e===undefined?m:p(e)}},v=function(r){return function(e){return t=typeof(n=e),(null===n?"null":"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t)===r;var n,t}},h=function(n){return function(e){return typeof e===n}},S=v("string"),b=v("array"),C=h("boolean"),O=h("function"),N=h("number"),L=Array.prototype.slice,T=Array.prototype.push,D=function(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var i=e[o];r[o]=n(i,o)}return r},k=function(e,n){for(var t=0,r=e.length;t<r;t++){n(e[t],t)}},w=function(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r)&&t.push(i)}return t},x=function(e,n,t){return k(e,function(e){t=n(t,e)}),t},A=function(e,n,t){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(n(i,r))return g.some(i);if(t(i,r))break}return g.none()},E=function(e,n){return A(e,n,f)},P=function(e,n){return function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!b(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);T.apply(n,e[t])}return n}(D(e,n))},B=function(e){var n=L.call(e,0);return n.reverse(),n},I=function(e,n){return 0<=n&&n<e.length?g.some(e[n]):g.none()},R=function(e){return I(e,0)},M=function(e){return I(e,e.length-1)},U=function(){return(U=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},_=function(e,n){var t=function(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.test(n))return r}return undefined}(e,n);if(!t)return{major:0,minor:0};var r=function(e){return Number(n.replace(t,"$"+e))};return H(r(1),r(2))},F=function(){return H(0,0)},H=function(e,n){return{major:e,minor:n}},$={nu:H,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?F():_(e,t)},unknown:F},j=function(e,n){var t=String(n).toLowerCase();return E(e,function(e){return e.search(t)})},q=function(e,t){return j(e,t).map(function(e){var n=$.detect(e.versionRegexes,t);return{current:e.name,version:n}})},K=function(e,t){return j(e,t).map(function(e){var n=$.detect(e.versionRegexes,t);return{current:e.name,version:n}})},V=function(e,n){return-1!==e.indexOf(n)},W=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Q=function(n){return function(e){return V(e,n)}},X=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return V(e,"edge/")&&V(e,"chrome")&&V(e,"safari")&&V(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,W],search:function(e){return V(e,"chrome")&&!V(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return V(e,"msie")||V(e,"trident")}},{name:"Opera",versionRegexes:[W,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Q("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Q("firefox")},{name:"Safari",versionRegexes:[W,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(V(e,"safari")||V(e,"mobile/"))&&V(e,"applewebkit")}}],z=[{name:"Windows",search:Q("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return V(e,"iphone")||V(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Q("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Q("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Q("linux"),versionRegexes:[]},{name:"Solaris",search:Q("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Q("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Q("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Y={browsers:y(X),oses:y(z)},G="Edge",J="Firefox",Z=function(e){var n=e.current,t=e.version,r=function(e){return function(){return n===e}};return{current:n,version:t,isEdge:r(G),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r(J),isSafari:r("Safari")}},ee={unknown:function(){return Z({current:undefined,version:$.unknown()})},nu:Z,edge:y(G),chrome:y("Chrome"),ie:y("IE"),opera:y("Opera"),firefox:y(J),safari:y("Safari")},ne="Windows",te="Android",re="Solaris",oe="FreeBSD",ie="ChromeOS",ue=function(e){var n=e.current,t=e.version,r=function(e){return function(){return n===e}};return{current:n,version:t,isWindows:r(ne),isiOS:r("iOS"),isAndroid:r(te),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r(re),isFreeBSD:r(oe),isChromeOS:r(ie)}},ae={unknown:function(){return ue({current:undefined,version:$.unknown()})},nu:ue,windows:y(ne),ios:y("iOS"),android:y(te),linux:y("Linux"),osx:y("OSX"),solaris:y(re),freebsd:y(oe),chromeos:y(ie)},se=function(e,n){var t,r,o,i,u,a,s,c,f,d,l,m,p=Y.browsers(),g=Y.oses(),v=q(p,e).fold(ee.unknown,ee.nu),h=K(g,e).fold(ae.unknown,ae.nu);return{browser:v,os:h,deviceType:(r=v,o=e,i=n,u=(t=h).isiOS()&&!0===/ipad/i.test(o),a=t.isiOS()&&!u,s=t.isiOS()||t.isAndroid(),c=s||i("(pointer:coarse)"),f=u||!a&&s&&i("(min-device-width:768px)"),d=a||s&&!f,l=r.isSafari()&&t.isiOS()&&!1===/safari/i.test(o),m=!d&&!f&&!l,{isiPad:y(u),isiPhone:y(a),isTablet:y(f),isPhone:y(d),isTouch:y(c),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:y(l),isDesktop:y(m)})}},ce=function(e){return window.matchMedia(e).matches},fe=(i=!(r=function(){return se(navigator.userAgent,ce)}),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return i||(i=!0,o=r.apply(null,e)),o}),de=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:e}},le={fromHtml:function(e,n){var t=(n||document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return de(t.childNodes[0])},fromTag:function(e,n){var t=(n||document).createElement(e);return de(t)},fromText:function(e,n){var t=(n||document).createTextNode(e);return de(t)},fromDom:de,fromPoint:function(e,n,t){return g.from(e.dom.elementFromPoint(n,t)).map(de)}},me=function(e,n){return e.dom===n.dom},pe=function(e,n){return t=e.dom,r=n.dom,o=t,i=r,u=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(o.compareDocumentPosition(i)&u);var t,r,o,i,u},ge=function(e,n){return fe().browser.isIE()?pe(e,n):(t=n,r=e.dom,o=t.dom,r!==o&&r.contains(o));var t,r,o},ve=function(e,n){var t=e.dom;if(1!==t.nodeType)return!1;var r=t;if(r.matches!==undefined)return r.matches(n);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(n);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(n);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},he=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),ye=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Se=tinymce.util.Tools.resolve("tinymce.util.VK"),be=Object.keys,Ce=function(e,n){for(var t=be(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i)}},Oe=function(e,n){var t,r,o,i,u={};return t=n,i=u,r=function(e,n){i[n]=e},o=s,Ce(e,function(e,n){(t(e,n)?r:o)(e,n)}),u},Ne=("undefined"!=typeof window||Function("return this;")(),function(e){return e.dom.nodeName.toLowerCase()}),Le=(u=1,function(e){return e.dom.nodeType===u}),Te=function(e,n){var t=e.dom;Ce(n,function(e,n){!function(e,n,t){if(!(S(t)||C(t)||N(t)))throw console.error("Invalid call to Attribute.set. Key ",n,":: Value ",t,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,t+"")}(t,n,e)})},De=function(e){return x(e.dom.attributes,function(e,n){return e[n.name]=n.value,e},{})},ke=function(e){return g.from(e.dom.parentNode).map(le.fromDom)},we=function(e){return D(e.dom.childNodes,le.fromDom)},xe=function(e,n){var t=e.dom.childNodes;return g.from(t[n]).map(le.fromDom)},Ae=function(e){return xe(e,0)},Ee=function(e){return xe(e,e.dom.childNodes.length-1)},Pe=function(n,t){ke(n).each(function(e){e.dom.insertBefore(t.dom,n.dom)})},Be=function(e,n){e.dom.appendChild(n.dom)},Ie=function(n,e){k(e,function(e){Be(n,e)})},Re=function(e){var n=e.dom;null!==n.parentNode&&n.parentNode.removeChild(n)},Me=function(e){return n=e,t=!0,le.fromDom(n.dom.cloneNode(t));var n,t},Ue=function(e,n){var t,r,o,i,u=(t=e,r=n,o=le.fromTag(r),i=De(t),Te(o,i),o);Pe(e,u);var a=we(e);return Ie(u,a),Re(e),u},_e=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Fe=tinymce.util.Tools.resolve("tinymce.util.Tools"),He=function(n){return function(e){return e&&e.nodeName.toLowerCase()===n}},$e=function(n){return function(e){return e&&n.test(e.nodeName)}},je=function(e){return e&&3===e.nodeType},qe=$e(/^(OL|UL|DL)$/),Ke=$e(/^(OL|UL)$/),Ve=He("ol"),We=$e(/^(LI|DT|DD)$/),Qe=$e(/^(DT|DD)$/),Xe=$e(/^(TH|TD)$/),ze=He("br"),Ye=function(e,n){return n&&!!e.schema.getTextBlockElements()[n.nodeName]},Ge=function(e,n){return e&&e.nodeName in n},Je=function(e,n,t){var r=e.isEmpty(n);return!(t&&0<e.select("span[data-mce-type=bookmark]",n).length)&&r},Ze=function(e,n){return e.isChildOf(n,e.getRoot())},en=function(e,n){var t,r,o,i,u=e.dom,a=e.schema.getBlockElements(),s=u.createFragment(),c=!1===(t=e.getParam("forced_root_block","p"))?"":!0===t?"p":t;if(c&&((o=u.create(c)).tagName===c.toUpperCase()&&u.setAttribs(o,e.getParam("forced_root_block_attrs",{})),Ge(n.firstChild,a)||s.appendChild(o)),n)for(;r=n.firstChild;){var f=r.nodeName;i||"SPAN"===f&&"bookmark"===r.getAttribute("data-mce-type")||(i=!0),Ge(r,a)?(s.appendChild(r),o=null):c?(o||(o=u.create(c),s.appendChild(o)),o.appendChild(r)):s.appendChild(r)}return c?i||o.appendChild(u.create("br",{"data-mce-bogus":"1"})):s.appendChild(u.create("br")),s},nn=_e.DOM,tn=function(n,t){ve(t,"dd")?Ue(t,"dt"):ve(t,"dt")&&ke(t).each(function(e){return function(e,n,t){var r=nn.select('span[data-mce-type="bookmark"]',n),o=en(e,t),i=nn.createRng();i.setStartAfter(t),i.setEndAfter(n);for(var u,a=i.extractContents(),s=a.firstChild;s;s=s.firstChild)if("LI"===s.nodeName&&e.dom.isEmpty(s)){nn.remove(s);break}e.dom.isEmpty(a)||nn.insertAfter(a,n),nn.insertAfter(o,n),Je(e.dom,t.parentNode)&&(u=t.parentNode,Fe.each(r,function(e){u.parentNode.insertBefore(e,t.parentNode)}),nn.remove(u)),nn.remove(t),Je(e.dom,n)&&nn.remove(n)}(n,e.dom,t.dom)})},rn=function(e){ve(e,"dt")&&Ue(e,"dd")},on=function(e,n){if(je(e))return{container:e,offset:n};var t=he.getNode(e,n);return je(t)?{container:t,offset:n>=e.childNodes.length?t.data.length:0}:t.previousSibling&&je(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&je(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},un=function(e){var n=e.cloneRange(),t=on(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=on(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},an=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),sn=function(e,n){var t=n||e.selection.getStart(!0);return e.dom.getParent(t,"OL,UL,DL",dn(e,t))},cn=function(e){var n,t,r,o=sn(e),i=e.selection.getSelectedBlocks();return r=i,(t=o)&&1===r.length&&r[0]===t?(n=o,Fe.grep(n.querySelectorAll("ol,ul,dl"),function(e){return qe(e)})):Fe.grep(i,function(e){return qe(e)&&o!==e})},fn=function(e){var t,n,r,o=e.selection.getSelectedBlocks();return Fe.grep((t=e,n=o,r=Fe.map(n,function(e){var n=t.dom.getParent(e,"li,dd,dt",dn(t,e));return n||e}),an.unique(r)),function(e){return We(e)})},dn=function(e,n){var t=e.dom.getParents(n,"TD,TH");return 0<t.length?t[0]:e.getBody()},ln=function(e,n){var t=e.dom.getParents(n,"ol,ul",dn(e,n));return M(t)},mn=function(e){var n,t,r,o=(t=ln(n=e,n.selection.getStart()),r=w(n.selection.getSelectedBlocks(),Ke),t.toArray().concat(r));return pn(e,o)},pn=function(n,e){var t=D(e,function(e){return ln(n,e).getOr(e)});return an.unique(t)},gn=function(e,n,t){return e.isSome()&&n.isSome()?g.some(t(e.getOrDie(),n.getOrDie())):g.none()},vn=function(e,n,t){return e.fire("ListMutation",{action:n,element:t})},hn=function(e,n,t){if(!S(t))throw console.error("Invalid call to CSS.set. Property ",n,":: Value ",t,":: Element ",e),new Error("CSS value must be a string: "+t);var r;(r=e).style!==undefined&&O(r.style.getPropertyValue)&&e.style.setProperty(n,t)},yn=function(e,n){Be(e.item,n.list)},Sn=function(e,n,t){for(var r,o,i,u=[],a=0;a<t;a++)u.push((r=e,o=n.listType,i={list:le.fromTag(o,r),item:le.fromTag("li",r)},Be(i.list,i.item),i));return u},bn=function(e,n){for(var t,r,o,i,u=0;u<e.length-1;u++)t=e[u].item,r="list-style-type",o="none",i=t.dom,hn(i,r,o);M(e).each(function(e){Te(e.list,n.listAttributes),Te(e.item,n.itemAttributes),Ie(e.item,n.content)})},Cn=function(f,e,d){var n=e.slice(0,d.depth);return M(n).each(function(e){var n,t,r,o,i,u,a,s,c=(n=f,t=d.itemAttributes,r=d.content,o=le.fromTag("li",n),Te(o,t),Ie(o,r),o);u=c,Be((i=e).list,u),i.item=u,s=d,Ne((a=e).list)!==s.listType&&(a.list=Ue(a.list,s.listType)),Te(a.list,s.listAttributes)}),n},On=function(e,n,t){var r,o=Sn(e,t,t.depth-n.length);return function(e){for(var n=1;n<e.length;n++)yn(e[n-1],e[n])}(o),bn(o,t),r=o,gn(M(n),R(r),yn),n.concat(o)},Nn=function(e){return ve(e,"OL,UL")},Ln=function(e){return Ae(e).map(Nn).getOr(!1)},Tn=function(e){return 0<e.depth},Dn=function(e){return e.isSelected},kn=function(e){var n=we(e),t=Ee(e).map(Nn).getOr(!1)?n.slice(0,-1):n;return D(t,Me)},wn=function(a){return k(a,function(r,e){var n,t,o,i,u;o=(n=a)[t=e].depth,i=function(e){return e.depth===o&&!e.dirty},u=function(e){return e.depth<o},A(B(n.slice(0,t)),i,u).orThunk(function(){return A(n.slice(t+1),i,u)}).fold(function(){var e;r.dirty&&((e=r).listAttributes=Oe(e.listAttributes,function(e,n){return"start"!==n}))},function(e){return t=e,(n=r).listType=t.listType,void(n.listAttributes=U({},t.listAttributes));var n,t})}),a},xn=function(i,u,a,s){return Ae(s).filter(Nn).fold(function(){u.each(function(e){me(e.start,s)&&a.set(!0)});var n,t,r,e=(n=s,t=i,r=a.get(),ke(n).filter(Le).map(function(e){return{depth:t,dirty:!1,isSelected:r,content:kn(n),itemAttributes:De(n),listAttributes:De(e),listType:Ne(e)}}));u.each(function(e){me(e.end,s)&&a.set(!1)});var o=Ee(s).filter(Nn).map(function(e){return An(i,u,a,e)}).getOr([]);return e.toArray().concat(o)},function(e){return An(i,u,a,e)})},An=function(n,t,r,e){return P(we(e),function(e){return(Nn(e)?An:xn)(n+1,t,r,e)})},En=function(e,n){var t,r=(t=!1,{get:function(){return t},set:function(e){t=e}});return D(e,function(e){return{sourceList:e,entries:An(0,n,r,e)}})},Pn=function(i,e){var n=wn(e);return D(n,function(e){var n,t,r,o=(n=e.content,r=(t||document).createDocumentFragment(),k(n,function(e){r.appendChild(e.dom)}),le.fromDom(r));return le.fromDom(en(i,o.dom))})},Bn=function(e,n){var t,r,o=wn(n);return t=e.contentDocument,r=x(o,function(e,n){return(n.depth>e.length?On:Cn)(t,e,n)},[]),R(r).map(function(e){return e.list}).toArray()},In=function(a,e,s){var n,t=En(e,(n=D(fn(a),le.fromDom),gn(E(n,c(Ln)),E(B(n),c(Ln)),function(e,n){return{start:e,end:n}})));k(t,function(e){var n,t;n=e.entries,t=s,k(w(n,Dn),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}n.dirty=!0}(t,e),0});var r,o,i,u=(r=a,o=e.entries,P(function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i<u;i++){var a=e[i],s=n(a);s!==t&&(r.push(o),o=[]),t=s,o.push(a)}return 0!==o.length&&r.push(o),r}(o,Tn),function(e){return(R(e).map(Tn).getOr(!1)?Bn:Pn)(r,e)}));k(u,function(e){vn(a,"Indent"===s?"IndentList":"OutdentList",e.dom)}),i=e.sourceList,k(u,function(e){Pe(i,e)}),Re(e.sourceList)})},Rn=function(e,n){var t,r,o=D(mn(e),le.fromDom),i=D(w(fn(e),Qe),le.fromDom),u=!1;return(o.length||i.length)&&(t=e.selection.getBookmark(),In(e,o,n),r=e,k(i,"Indent"===n?rn:function(e){return tn(r,e),0}),e.selection.moveToBookmark(t),e.selection.setRng(un(e.selection.getRng())),e.nodeChanged(),u=!0),u},Mn=function(e){return Rn(e,"Indent")},Un=function(e){return Rn(e,"Outdent")},_n=function(e){return Rn(e,"Flatten")},Fn=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),Hn=_e.DOM,$n=function(o){var i={},e=function(e){var n,t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"];1===t.nodeType&&(n=Hn.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):Hn.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},jn=function(o){function e(e){var n,t=n=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"];t&&(1===t.nodeType&&(r=function(e){for(var n=e.parentNode.firstChild,t=0;n;){if(n===e)return t;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(t),t=t.parentNode,Hn.remove(n),!t.hasChildNodes()&&Hn.isBlock(t)&&t.appendChild(Hn.create("br"))),o[e?"startContainer":"endContainer"]=t,o[e?"startOffset":"endOffset"]=r)}e(!0),e();var n=Hn.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),un(n)},qn=function(e){switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},Kn=function(e){return/\btox\-/.test(e.className)},Vn=function(e,t,r){var n=function(e){var n=A(e.parents,qe,Xe).filter(function(e){return e.nodeName===t&&!Kn(e)}).isSome();r(n)},o=e.dom.getParents(e.selection.getNode());return n({parents:o}),e.on("NodeChange",n),function(){return e.off("NodeChange",n)}},Wn=function(t,e){Fe.each(e,function(e,n){t.setAttribute(n,e)})},Qn=function(e,n,t){var r,o,i,u,a,s,c;r=e,o=n,u=(i=t)["list-style-type"]?i["list-style-type"]:null,r.setStyle(o,"list-style-type",u),a=e,Wn(s=n,(c=t)["list-attributes"]),Fe.each(a.select("li",s),function(e){Wn(e,c["list-item-attributes"])})},Xn=function(e,n,t,r){var o=n[t?"startContainer":"endContainer"],i=n[t?"startOffset":"endOffset"];for(1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!t&&ze(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(Ye(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},zn=function(f,d,l){void 0===l&&(l={});var e,n=f.selection.getRng(),m="LI",t=dn(f,f.selection.getStart(!0)),p=f.dom;"false"!==p.getContentEditable(f.selection.getNode())&&("DL"===(d=d.toUpperCase())&&(m="DT"),e=$n(n),Fe.each(function(t,e,r){for(var o,i=[],u=t.dom,n=Xn(t,e,!0,r),a=Xn(t,e,!1,r),s=[],c=n;c&&(s.push(c),c!==a);c=c.nextSibling);return Fe.each(s,function(e){if(Ye(t,e))return i.push(e),void(o=null);if(u.isBlock(e)||ze(e))return ze(e)&&u.remove(e),void(o=null);var n=e.nextSibling;Fn.isBookmarkNode(e)&&(Ye(t,n)||!n&&e.parentNode===r)?o=null:(o||(o=u.create("p"),e.parentNode.insertBefore(o,e),i.push(o)),o.appendChild(e))}),i}(f,n,t),function(e){var n,t,r,o,i,u,a,s,c=e.previousSibling;c&&qe(c)&&c.nodeName===d&&(t=c,r=l,o=p.getStyle(t,"list-style-type"),i=r?r["list-style-type"]:"",o===(i=null===i?"":i))?(n=c,e=p.rename(e,m),c.appendChild(e)):(n=p.create(d),e.parentNode.insertBefore(n,e),n.appendChild(e),e=p.rename(e,m)),u=p,a=e,s=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],Fe.each(s,function(e){var n;return u.setStyle(a,((n={})[e]="",n))}),Qn(p,n,l),Gn(f.dom,n)}),f.selection.setRng(jn(e)))},Yn=function(e,n,t){return s=t,(a=n)&&s&&qe(a)&&a.nodeName===s.nodeName&&(i=n,u=t,(o=e).getStyle(i,"list-style-type",!0)===o.getStyle(u,"list-style-type",!0))&&(r=t,n.className===r.className);var r,o,i,u,a,s},Gn=function(e,n){var t,r=n.nextSibling;if(Yn(e,n,r)){for(;t=r.firstChild;)n.appendChild(t);e.remove(r)}if(r=n.previousSibling,Yn(e,n,r)){for(;t=r.lastChild;)n.insertBefore(t,n.firstChild);e.remove(r)}},Jn=function(u,e,n,a,s){var t;e.nodeName!==a||Zn(s)?(t=$n(u.selection.getRng(!0)),Fe.each([e].concat(n),function(e){var n,t,r,o,i;n=u,r=a,o=s,(t=e).nodeName!==r?(i=n.dom.rename(t,r),Qn(n.dom,i,o),vn(n,qn(r),i)):(Qn(n.dom,t,o),vn(n,qn(r),t))}),u.selection.setRng(jn(t))):_n(u)},Zn=function(e){return"list-style-type"in e},et=function(e,n,t){var r,o,i,u,a,s,c=sn(e),f=cn(e);t=t||{},c&&0<f.length?Jn(e,c,f,n,t):(i=n,u=t,(o=c)!==(r=e).getBody()&&(o?o.nodeName!==i||Zn(u)||Kn(o)?(a=$n(r.selection.getRng(!0)),Qn(r.dom,o,u),s=r.dom.rename(o,i),Gn(r.dom,s),r.selection.setRng(jn(a)),vn(r,qn(i),s)):_n(r):(zn(r,i,u),vn(r,qn(i),o))))},nt=_e.DOM,tt=function(i,e){Fe.each(Fe.grep(i.select("ol,ul",e)),function(e){var n,t,r,o;n=i,"LI"===(o=(t=e).parentNode).nodeName&&o.firstChild===t&&((r=o.previousSibling)&&"LI"===r.nodeName?(r.appendChild(t),Je(n,o)&&nt.remove(o)):nt.setStyle(o,"listStyleType","none")),qe(o)&&(r=o.previousSibling)&&"LI"===r.nodeName&&r.appendChild(t)})},rt=function(e,n,t,r){var o=n.startContainer,i=n.startOffset;if(je(o)&&(t?i<o.data.length:0<i))return o;var u=e.schema.getNonEmptyElements();1===o.nodeType&&(o=he.getNode(o,i));var a,s,c=new ye(o,r);for(t&&(a=e.dom,ze(s=o)&&a.isBlock(s.nextSibling)&&!ze(s.previousSibling)&&c.next());o=c[t?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(u[o.nodeName])return o;if(je(o)&&0<o.data.length)return o}},ot=function(e,n){var t=n.childNodes;return 1===t.length&&!qe(t[0])&&e.isBlock(t[0])},it=function(e,n,t){var r,o,i,u=ot(e,t)?t.firstChild:t;if(ot(o=e,i=n)&&o.remove(i.firstChild,!0),!Je(e,n,!0))for(;r=n.firstChild;)u.appendChild(r)},ut=function(n,e,t){var r,o,i,u=e.parentNode;Ze(n,e)&&Ze(n,t)&&(qe(t.lastChild)&&(r=t.lastChild),u===t.lastChild&&ze(u.previousSibling)&&n.remove(u.previousSibling),(o=t.lastChild)&&ze(o)&&e.hasChildNodes()&&n.remove(o),Je(n,t,!0)&&n.$(t).empty(),it(n,e,t),r&&t.appendChild(r),i=ge(le.fromDom(t),le.fromDom(e))?n.getParents(e,qe,t):[],n.remove(e),k(i,function(e){Je(n,e)&&e!==n.getRoot()&&n.remove(e)}))},at=function(e,n,t,r){var o,i,u,a,s=e.dom;s.isEmpty(r)?(u=t,a=r,(i=e).dom.$(a).empty(),ut(i.dom,u,a),i.selection.setCursorLocation(a)):(o=$n(n),ut(s,t,r),e.selection.setRng(jn(o)))},st=function(n,t){var e=n.dom,r=n.selection,o=r.getStart(),i=dn(n,o),u=e.getParent(r.getStart(),"LI",i);if(u){var a=u.parentNode;if(a===n.getBody()&&Je(e,a))return!0;var s=un(r.getRng()),c=e.getParent(rt(n,s,t,i),"LI",i);if(c&&c!==u)return n.undoManager.transact(function(){var e;t?at(n,s,c,u):(e=u).parentNode.firstChild===e?Un(n):function(e,n,t,r){var o=$n(n);ut(e.dom,t,r);var i=jn(o);e.selection.setRng(i)}(n,s,u,c)}),!0;if(!c&&!t&&0===s.startOffset&&0===s.endOffset)return n.undoManager.transact(function(){_n(n)}),!0}return!1},ct=function(o,i){var u=o.dom,e=o.selection.getStart(),a=dn(o,e),s=u.getParent(e,u.isBlock,a);if(s&&u.isEmpty(s)){var n=un(o.selection.getRng()),c=u.getParent(rt(o,n,i,a),"LI",a);if(c)return o.undoManager.transact(function(){var e,n,t,r;n=s,t=a,r=(e=u).getParent(n.parentNode,e.isBlock,t),e.remove(n),r&&e.isEmpty(r)&&e.remove(r),Gn(u,c.parentNode),o.selection.select(c,!0),o.selection.collapse(i)}),!0}return!1},ft=function(e,n){return e.selection.isCollapsed()?st(i=e,u=n)||ct(i,u):(r=(t=e).selection.getStart(),o=dn(t,r),!!(t.dom.getParent(r,"LI,DT,DD",o)||0<fn(t).length)&&(t.undoManager.transact(function(){t.execCommand("Delete"),tt(t.dom,t.getBody())}),!0));var t,r,o,i,u},dt=function(t){var r=t.dom,e=sn(t);Ve(e)&&t.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:r.getAttrib(e,"start")||"1"},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var n=e.getData();t.undoManager.transact(function(){r.setAttrib(sn(t),"start","1"===n.start?"":n.start)}),e.close()}})},lt=function(n,t){return function(){var e=n.dom.getParent(n.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===t}},mt=function(e){var n,t;e.getParam("lists_indent_on_tab",!0)&&(n=e).on("keydown",function(e){e.keyCode!==Se.TAB||Se.metaKeyPressed(e)||n.undoManager.transact(function(){(e.shiftKey?Un:Mn)(n)&&e.preventDefault()})}),(t=e).on("keydown",function(e){e.keyCode===Se.BACKSPACE?ft(t,!1)&&e.preventDefault():e.keyCode===Se.DELETE&&ft(t,!0)&&e.preventDefault()})};a.add("lists",function(e){var t,n,r,o,i,u;return!1===e.hasPlugin("rtc",!0)&&(mt(e),(t=e).on("BeforeExecCommand",function(e){var n=e.command.toLowerCase();"indent"===n?Mn(t):"outdent"===n&&Un(t)}),t.addCommand("InsertUnorderedList",function(e,n){et(t,"UL",n)}),t.addCommand("InsertOrderedList",function(e,n){et(t,"OL",n)}),t.addCommand("InsertDefinitionList",function(e,n){et(t,"DL",n)}),t.addCommand("RemoveList",function(){_n(t)}),t.addCommand("mceListProps",function(){dt(t)}),t.addQueryStateHandler("InsertUnorderedList",lt(t,"UL")),t.addQueryStateHandler("InsertOrderedList",lt(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",lt(t,"DL"))),r=function(e){return function(){return n.execCommand(e)}},(n=e).hasPlugin("advlist")||(n.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:r("InsertOrderedList"),onSetup:function(e){return Vn(n,"OL",e.setActive)}}),n.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:r("InsertUnorderedList"),onSetup:function(e){return Vn(n,"UL",e.setActive)}})),i={text:"List properties...",icon:"ordered-list",onAction:function(){return dt(o)},onSetup:function(n){return Vn(o,"OL",function(e){return n.setDisabled(!e)})}},(o=e).ui.registry.addMenuItem("listprops",i),o.ui.registry.addContextMenu("lists",{update:function(e){var n=sn(o,e);return Ve(n)?["listprops"]:[]}}),u=e,{backspaceDelete:function(e){ft(u,e)}}})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e,t,r,n=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=function(){return(p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=function(e){return function(){return e}},o=a(!1),c=a(!0),i=function(){return u},u=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:o,isSome:o,isNone:c,getOr:r=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:r,orThunk:t,map:i,each:function(){},bind:i,exists:o,forall:c,filter:i,equals:e,equals_:e,toArray:function(){return[]},toString:a("none()")}),s=function(r){var e=a(r),t=function(){return i},n=function(e){return e(r)},i={fold:function(e,t){return t(r)},is:function(e){return r===e},isSome:c,isNone:o,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return s(e(r))},each:function(e){e(r)},bind:n,exists:n,forall:n,filter:function(e){return e(r)?i:u},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(e){return e.is(r)},equals_:function(e,t){return e.fold(o,function(e){return t(r,e)})}};return i},l={some:s,none:i,from:function(e){return null===e||e===undefined?u:s(e)}},m=function(n){return function(e){return r=typeof(t=e),(null===t?"null":"object"==r&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":r)===n;var t,r}},d=m("string"),h=m("object"),g=m("array"),v=Array.prototype.push,f=function(e,t){for(var r=0,n=e.length;r<n;r++){t(e[r],r)}},w=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},b=Object.keys,y=Object.hasOwnProperty,x=function(e,t){return j(e,t)?l.from(e[t]):l.none()},j=function(e,t){return y.call(e,t)},O=function(e){return e.getParam("media_scripts")},S=tinymce.util.Tools.resolve("tinymce.util.Tools"),_=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),k=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),A=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},T=_.DOM,C=function(e){return e.replace(/px$/,"")},P=function(o,e){var c=w(!1),u={};return k({validate:!1,allow_conditional_comments:!0,start:function(e,t){if(!c.get())if(j(t.map,"data-ephox-embed-iri"))c.set(!0),i=(n=t).map.style,a=i?T.parseStyle(i):{},u={type:"ephox-embed-iri",source:n.map["data-ephox-embed-iri"],altsource:"",poster:"",width:x(a,"max-width").map(C).getOr(""),height:x(a,"max-height").map(C).getOr("")};else{if(u.source||"param"!==e||(u.source=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(u.type||(u.type=e),u=S.extend(t.map,u)),"script"===e){var r=A(o,t.map.src);if(!r)return;u={type:"script",source:t.map.src,width:String(r.width),height:String(r.height)}}"source"===e&&(u.source?u.altsource||(u.altsource=t.map.src):u.source=t.map.src),"img"!==e||u.poster||(u.poster=t.map.src)}var n,i,a}}).parse(e),u.source=u.source||u.src||u.data,u.altsource=u.altsource||"",u.poster=u.poster||"",u},D=function(e){var t={mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()];return t||""},$=tinymce.util.Tools.resolve("tinymce.html.Schema"),F=tinymce.util.Tools.resolve("tinymce.html.Writer"),M=_.DOM,z=function(e){return/^[0-9.]+$/.test(e)?e+"px":e},N=function(a,e){!function(e,t){for(var r=b(e),n=0,i=r.length;n<i;n++){var a=r[n];t(e[a],a)}}(e,function(e,t){var r=""+e;if(a.map[t])for(var n=a.length;n--;){var i=a[n];i.name===t&&(r?(a.map[t]=r,i.value=r):(delete a.map[t],a.splice(n,1)))}else r&&(a.push({name:t,value:r}),a.map[t]=r)})},U=["source","altsource"],E=function(e,c,u){var s,l=F(),m=w(!1),d=0;return k({validate:!1,allow_conditional_comments:!0,comment:function(e){l.comment(e)},cdata:function(e){l.cdata(e)},text:function(e,t){l.text(e,t)},start:function(e,t,r){if(!m.get())if(j(t.map,"data-ephox-embed-iri"))m.set(!0),n=c,a=(i=t).map.style,(o=a?M.parseStyle(a):{})["max-width"]=z(n.width),o["max-height"]=z(n.height),N(i,{style:M.serializeStyle(o)});else{switch(e){case"video":case"object":case"embed":case"img":case"iframe":c.height!==undefined&&c.width!==undefined&&N(t,{width:c.width,height:c.height})}if(u)switch(e){case"video":N(t,{poster:c.poster,src:""}),c.altsource&&N(t,{src:""});break;case"iframe":N(t,{src:c.source});break;case"source":if(d<2&&(N(t,{src:c[U[d]],type:c[U[d]+"mime"]}),!c[U[d]]))return;d++;break;case"img":if(!c.poster)return;s=!0}}var n,i,a,o;l.start(e,t,r)},end:function(e){if(!m.get()){if("video"===e&&u)for(var t,r=0;r<2;r++){c[U[r]]&&((t=[]).map={},d<=r&&(N(t,{src:c[U[r]],type:c[U[r]+"mime"]}),l.start("source",t,!0)))}var n;c.poster&&"object"===e&&u&&!s&&((n=[]).map={},N(n,{src:c.poster,width:c.width,height:c.height}),l.start("img",n,!0))}l.end(e)}},$({})).parse(e),l.getContent()},R=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],L=function(t){var e=R.filter(function(e){return e.regex.test(t)});return 0<e.length?S.extend({},e[0],{url:function(e,t){for(var r,n=(r=t.match(/^(https?:\/\/|www\.)(.+)$/i))&&1<r.length&&"www."!==r[1]?r[1]:"https://",i=e.regex.exec(t),a=n+e.url,o=0;o<i.length;o++)!function(e){a=a.replace("$"+e,function(){return i[e]?i[e]:""})}(o);return a.replace(/\?$/,"")}(e[0],t)}):null},I=function(r,e){var n=S.extend({},e);if(!n.source&&(S.extend(n,P(O(r),n.embed)),!n.source))return"";n.altsource||(n.altsource=""),n.poster||(n.poster=""),n.source=r.convertURL(n.source,"source"),n.altsource=r.convertURL(n.altsource,"source"),n.sourcemime=D(n.source),n.altsourcemime=D(n.altsource),n.poster=r.convertURL(n.poster,"poster");var t=L(n.source);if(t&&(n.source=t.url,n.type=t.type,n.allowFullscreen=t.allowFullscreen,n.width=n.width||String(t.w),n.height=n.height||String(t.h)),n.embed)return E(n.embed,n,!0);var i=A(O(r),n.source);i&&(n.type="script",n.width=String(i.width),n.height=String(i.height));var a,o,c,u,s,l,m,d,h=r.getParam("audio_template_callback"),f=r.getParam("video_template_callback");return n.width=n.width||"300",n.height=n.height||"150",S.each(n,function(e,t){n[t]=r.dom.encode(""+e)}),"iframe"===n.type?(d=(m=n).allowFullscreen?' allowFullscreen="1"':"",'<iframe src="'+m.source+'" width="'+m.width+'" height="'+m.height+'"'+d+"></iframe>"):"application/x-shockwave-flash"===n.sourcemime?(l='<object data="'+(s=n).source+'" width="'+s.width+'" height="'+s.height+'" type="application/x-shockwave-flash">',s.poster&&(l+='<img src="'+s.poster+'" width="'+s.width+'" height="'+s.height+'" />'),l+="</object>"):-1!==n.sourcemime.indexOf("audio")?(c=n,(u=h)?u(c):'<audio controls="controls" src="'+c.source+'">'+(c.altsource?'\n<source src="'+c.altsource+'"'+(c.altsourcemime?' type="'+c.altsourcemime+'"':"")+" />\n":"")+"</audio>"):"script"===n.type?'<script src="'+n.source+'"><\/script>':(a=n,(o=f)?o(a):'<video width="'+a.width+'" height="'+a.height+'"'+(a.poster?' poster="'+a.poster+'"':"")+' controls="controls">\n<source src="'+a.source+'"'+(a.sourcemime?' type="'+a.sourcemime+'"':"")+" />\n"+(a.altsource?'<source src="'+a.altsource+'"'+(a.altsourcemime?' type="'+a.altsourcemime+'"':"")+" />\n":"")+"</video>")},q=tinymce.util.Tools.resolve("tinymce.util.Promise"),B={},W=function(t){return function(e){return I(t,e)}},G=function(e,t){var r,n,i,a,o,c=e.getParam("media_url_resolver");return c?(i=t,a=W(e),o=c,new q(function(t,e){var r=function(e){return e.html&&(B[i.source]=e),t({url:i.source,html:e.html?e.html:a(i)})};B[i.source]?r(B[i.source]):o({url:i.source},r,e)})):(r=t,n=W(e),new q(function(e){e({html:n(r),url:r.source})}))},H=function(a,o,c){return function(e){var t=function(){return x(a,e)},r=function(){return x(o,e)},n=function(e){return x(e,"value").bind(function(e){return 0<e.length?l.some(e):l.none()})},i={};return i[e]=(e===c?t().bind(function(e){return h(e)?n(e).orThunk(r):r().orThunk(function(){return l.from(e)})}):r().orThunk(function(){return t().bind(function(e){return h(e)?n(e):l.from(e)})})).getOr(""),i}},J=function(e,t){var r,n,i=t?x(e,t).bind(function(e){return x(e,"meta")}).getOr({}):{},a=H(e,i,t);return p(p(p(p(p({},a("source")),a("altsource")),a("poster")),a("embed")),(r=i,n={},x(e,"dimensions").each(function(e){f(["width","height"],function(t){x(r,t).orThunk(function(){return x(e,t)}).each(function(e){return n[t]=e})})}),n))},K=function(e){var n=p(p({},e),{source:{value:x(e,"source").getOr("")},altsource:{value:x(e,"altsource").getOr("")},poster:{value:x(e,"poster").getOr("")}});return f(["width","height"],function(r){x(e,r).each(function(e){var t=n.dimensions||{};t[r]=e,n.dimensions=t})}),n},Q=function(r){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";r.notificationManager.open({type:"error",text:t})}},V=function(e,t){return P(O(e),t)},X=function(i,a){return function(e){var t,r,n;d(e.url)&&0<e.url.trim().length&&(t=e.html,r=V(a,t),n=p(p({},r),{source:e.url,embed:t}),i.setData(K(n)))}},Y=function(e,t){var r=e.dom.select("img[data-mce-object]");e.insertContent(t),function(e,t){for(var r=e.dom.select("img[data-mce-object]"),n=0;n<t.length;n++)for(var i=r.length-1;0<=i;i--)t[n]===r[i]&&r.splice(i,1);e.selection.select(r[0])}(e,r),e.nodeChanged()},Z=function(e,t,r){var n;t.embed=E(t.embed,t),t.embed&&(e.source===t.source||(n=t.source,B.hasOwnProperty(n)))?Y(r,t.embed):G(r,t).then(function(e){Y(r,e.html)})["catch"](Q(r))},ee=function(m){var e,t,r,n,i=(r=(e=m).selection.getNode(),n=(t=r).getAttribute("data-mce-object")||t.getAttribute("data-ephox-embed-iri")?e.serializer.serialize(r,{selection:!0}):"",p({embed:n},P(O(e),n))),d=w(i),a=K(i),o={title:"General",name:"general",items:function(e){for(var t=[],r=0,n=e.length;r<n;++r){if(!g(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);v.apply(t,e[r])}return t}([[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],m.getParam("media_dimensions",!0)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[]])},c={title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]},u=[];m.getParam("media_alt_source",!0)&&u.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),m.getParam("media_poster",!0)&&u.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var s={title:"Advanced",name:"advanced",items:u},l=[o,c];0<u.length&&l.push(s);var h={type:"tabpanel",tabs:l},f=m.windowManager.open({title:"Insert/Edit Media",size:"normal",body:h,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var t=J(e.getData());Z(d.get(),t,m),e.close()},onChange:function(e,t){switch(t.name){case"source":s=d.get(),l=J(e.getData(),"source"),s.source!==l.source&&(X(f,m)({url:l.source,html:""}),G(m,l).then(X(f,m))["catch"](Q(m)));break;case"embed":c=J((o=e).getData()),u=V(m,c.embed),o.setData(K(u));break;case"dimensions":case"altsource":case"poster":r=e,n=t.name,i=J(r.getData(),n),a=I(m,i),r.setData(K(p(p({},i),{embed:a})))}var r,n,i,a,o,c,u,s,l;d.set(J(e.getData()))},initialData:a})},te=tinymce.util.Tools.resolve("tinymce.html.Node"),re=tinymce.util.Tools.resolve("tinymce.Env"),ne=function(a,e){if(!1===a.getParam("media_filter_html",!0))return e;var o,c=F();return k({validate:!1,allow_conditional_comments:!1,comment:function(e){c.comment(e)},cdata:function(e){c.cdata(e)},text:function(e,t){c.text(e,t)},start:function(e,t,r){if(o=!0,"script"!==e&&"noscript"!==e&&"svg"!==e){for(var n=t.length-1;0<=n;n--){var i=t[n].name;0===i.indexOf("on")&&(delete t.map[i],t.splice(n,1)),"style"===i&&(t[n].value=a.dom.serializeStyle(a.dom.parseStyle(t[n].value),e))}c.start(e,t,r),o=!1}},end:function(e){o||c.end(e)}},$({})).parse(e),c.getContent()},ie=function(e,t,r){for(var n,i,a=t.attributes,o=a.length;o--;)n=a[o].name,i=a[o].value,"width"!==n&&"height"!==n&&"style"!==n&&("data"!==n&&"src"!==n||(i=e.convertURL(i,n)),r.attr("data-mce-p-"+n,i));var c=t.firstChild&&t.firstChild.value;c&&(r.attr("data-mce-html",escape(ne(e,c))),r.firstChild=null)},ae=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri")||(t=e.attr("class"))&&/\btiny-pageembed\b/.test(t))return!0;var t;return!1},oe=function(u){return function(e){for(var t,r,n,i,a,o,c=e.length;c--;)(t=e[c]).parent&&(t.parent.attr("data-mce-object")||"script"===t.name&&!(r=A(O(u),t.attr("src")))||(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),"iframe"===t.name&&u.getParam("media_live_embeds",!0)&&re.ceFalse?ae(t)||t.replace(function(e,t){var r=t.name,n=new te("span",1);n.attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":r,"class":"mce-preview-object mce-object-"+r}),ie(e,t,n);var i=new te(r,1);i.attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),style:t.attr("style"),"class":t.attr("class"),width:t.attr("width"),height:t.attr("height"),frameborder:"0"});var a=new te("span",1);return a.attr("class","mce-shim"),n.append(i),n.append(a),n}(u,t)):ae(t)||t.replace((n=u,o=void 0,a=(i=t).name,(o=new te("img",1)).shortEnded=!0,ie(n,i,o),o.attr({width:i.attr("width")||"300",height:i.attr("height")||("audio"===a?"30":"150"),style:i.attr("style"),src:re.transparentSrc,"data-mce-object":a,"class":"mce-object mce-object-"+a}),o))))}},ce=function(e){var t,r;e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:function(){e.execCommand("mceMedia")},onSetup:(t=e,r=["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"],function(e){return t.selection.selectorChangedWithUnbind(r.join(","),e.setActive).unbind})}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:function(){e.execCommand("mceMedia")}})};n.add("media",function(e){var t,d,r,n;return(t=e).addCommand("mceMedia",function(){ee(t)}),ce(e),e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}),(d=e).on("preInit",function(){var t=d.schema.getSpecialElements();S.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=d.schema.getBoolAttrs();S.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",oe(d)),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,n,i,a,o,c,u,s,l=e.length;l--;)if((r=e[l]).parent){for(u=r.attr(t),n=new te(u,1),"audio"!==u&&"script"!==u&&((s=r.attr("class"))&&-1!==s.indexOf("mce-preview-object")?n.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):n.attr({width:r.attr("width"),height:r.attr("height")})),n.attr({style:r.attr("style")}),i=(a=r.attributes).length;i--;){var m=a[i].name;0===m.indexOf("data-mce-p-")&&n.attr(m.substr(11),a[i].value)}"script"===u&&n.attr("type","text/javascript"),(o=r.attr("data-mce-html"))&&((c=new te("#text",3)).raw=!0,c.value=ne(d,unescape(o)),n.append(c)),r.replace(n)}})}),d.on("SetContent",function(){d.$("span.mce-preview-object").each(function(e,t){var r=d.$(t);0===r.find("span.mce-shim").length&&r.append('<span class="mce-shim"></span>')})}),(r=e).on("click keyup touchend",function(){var e=r.selection.getNode();e&&r.dom.hasClass(e,"mce-preview-object")&&r.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),r.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),r.on("ObjectResized",function(e){var t,r=e.target;r.getAttribute("data-mce-object")&&(t=r.getAttribute("data-mce-html"))&&(t=unescape(t),r.setAttribute("data-mce-html",escape(E(t,{width:String(e.width),height:String(e.height)}))))}),n=e,{showDialog:function(){ee(n)}}})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n,e){for(var a="",o=0;o<e;o++)a+=n;return a},r=function(n,e){var a,o=n.getParam("nonbreaking_wrap",!0,"boolean")||n.plugins.visualchars?'<span class="'+((a=n).plugins.visualchars&&a.plugins.visualchars.isEnabled()?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap")+'" contenteditable="false">'+i("&nbsp;",e)+"</span>":i("&nbsp;",e);n.undoManager.transact(function(){return n.insertContent(o)})},c=tinymce.util.Tools.resolve("tinymce.util.VK");n.add("nonbreaking",function(n){var e,a,o,i,t;(e=n).addCommand("mceNonBreaking",function(){r(e,1)}),(a=n).ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return a.execCommand("mceNonBreaking")}}),a.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return a.execCommand("mceNonBreaking")}}),0<(t="boolean"==typeof(i=(o=n).getParam("nonbreaking_force_tab",0))?!0===i?3:0:i)&&o.on("keydown",function(n){if(n.keyCode===c.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),r(o,t)}})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},f=function(e){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(e)}},e=function(e){var t,r="contenteditable",n=" "+l.trim(e.getParam("noneditable_editable_class","mceEditable"))+" ",a=" "+l.trim(u(e))+" ",i=f(n),o=f(a),c=(t=e.getParam("noneditable_regexp",[]))&&t.constructor===RegExp?[t]:t;e.on("PreInit",function(){0<c.length&&e.on("BeforeSetContent",function(t){!function(t,e,n){var r=e.length,a=n.content;if("raw"!==n.format){for(;r--;)a=a.replace(e[r],function(i,o,c){return function(t){var e=arguments,n=e[e.length-2],r=0<n?o.charAt(n-1):"";if('"'===r)return t;if(">"===r){var a=o.lastIndexOf("<",n);if(-1!==a)if(-1!==o.substring(a,n).indexOf('contenteditable="false"'))return t}return'<span class="'+c+'" data-mce-content="'+i.dom.encode(e[0])+'">'+i.dom.encode("string"==typeof e[1]?e[1]:e[0])+"</span>"}}(t,a,u(t)));n.content=a}}(e,c,t)}),e.parser.addAttributeFilter("class",function(t){for(var e,n=t.length;n--;)e=t[n],i(e)?e.attr(r,"true"):o(e)&&e.attr(r,"false")}),e.serializer.addAttributeFilter(r,function(t){for(var e,n=t.length;n--;)e=t[n],(i(e)||o(e))&&(0<c.length&&e.attr("data-mce-content")?(e.name="#text",e.type=3,e.raw=!0,e.value=e.attr("data-mce-content")):e.attr(r,null))})})};t.add("noneditable",function(t){e(t)})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),i=function(e){return e.getParam("pagebreak_split_block",!1)},g=function(){return"mce-pagebreak"},m=function(){return'<img src="'+a.transparentSrc+'" class="'+g()+'" data-mce-resize="false" data-mce-placeholder />'};e.add("pagebreak",function(e){var a,n,o,c,t,r;(a=e).addCommand("mcePageBreak",function(){i(a)?a.insertContent("<p>"+m()+"</p>"):a.insertContent(m())}),(n=e).ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return n.execCommand("mcePageBreak")}}),n.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return n.execCommand("mcePageBreak")}}),c=(o=e).getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e"),t=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),o.on("BeforeSetContent",function(e){e.content=e.content.replace(t,m())}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var a,n,t=e.length;t--;)if((n=(a=e[t]).attr("class"))&&-1!==n.indexOf("mce-pagebreak")){var r=a.parent;if(o.schema.getBlockElements()[r.name]&&i(o)){r.type=3,r.value=c,r.raw=!0,a.remove();continue}a.type=3,a.value=c,a.raw=!0}})}),(r=e).on("ResolveName",function(e){"IMG"===e.target.nodeName&&r.dom.hasClass(e.target,g())&&(e.name="pagebreak")})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e,t,n,r,d=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},a=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(e){return function(){return e}},i=o(!1),s=o(!0),u=function(){return l},l=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:i,isSome:i,isNone:s,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:n,orThunk:t,map:u,each:function(){},bind:u,exists:i,forall:s,filter:u,equals:e,equals_:e,toArray:function(){return[]},toString:o("none()")}),c=function(n){var e=o(n),t=function(){return a},r=function(e){return e(n)},a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:s,isNone:i,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return c(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?a:l},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(i,function(e){return t(n,e)})}};return a},f={some:c,none:u,from:function(e){return null===e||e===undefined?l:c(e)}},P=function(e){return!(null===(t=e)||t===undefined);var t},m=(r="function",function(e){return typeof e===r}),p=Array.prototype.slice,g=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return!0}return!1},v=function(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var o=e[a];r[a]=t(o,a)}return r},h=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}},y=m(Array.from)?Array.from:function(e){return p.call(e)},b=function(){var t=d(f.none());return{clear:function(){return t.set(f.none())},set:function(e){return t.set(f.some(e))},isSet:function(){return t.get().isSome()},on:function(e){return t.get().each(e)}}},x=function(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t},w=tinymce.util.Tools.resolve("tinymce.Env"),_=tinymce.util.Tools.resolve("tinymce.util.Delay"),T=tinymce.util.Tools.resolve("tinymce.util.Promise"),C=tinymce.util.Tools.resolve("tinymce.util.VK"),D=function(e,t){return e.fire("PastePlainTextToggle",{state:t})},k=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(e){return e.getParam("paste_data_images",!1)},O=function(e){return e.getParam("paste_retain_style_properties")},j=function(e){return e.getParam("validate")},R=function(e){return e.getParam("paste_data_images",!1,"boolean")},A=function(e){return k.explode(e.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))},I="x-tinymce/html",F="\x3c!-- "+I+" --\x3e",E=function(e){return-1!==e.indexOf(F)},M=tinymce.util.Tools.resolve("tinymce.html.Entities"),N=function(e,t,n){var r=e.split(/\n\n/),a=function(e,t){var n,r=[],a="<"+e;if("object"==typeof t){for(n in t)t.hasOwnProperty(n)&&r.push(n+'="'+M.encodeAllRaw(t[n])+'"');r.length&&(a+=" "+r.join(" "))}return a+">"}(t,n),o="</"+t+">",i=k.map(r,function(e){return e.split(/\n/).join("<br />")});return 1===i.length?i[0]:k.map(i,function(e){return a+e+o}).join("")},B=tinymce.util.Tools.resolve("tinymce.html.DomParser"),H=tinymce.util.Tools.resolve("tinymce.html.Serializer"),L="\xa0",$=tinymce.util.Tools.resolve("tinymce.html.Node"),z=tinymce.util.Tools.resolve("tinymce.html.Schema");function U(t,e){return k.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function q(e){var t=z(),n=B({},t),r="",a=t.getShortEndedElements(),o=k.makeMap("script noscript style textarea video audio iframe object"," "),i=t.getBlockElements();return e=U(e,[/<!\[[^\]]+\]>/g]),function s(e){var t=e.name,n=e;if("br"!==t){if("wbr"!==t)if(a[t]&&(r+=" "),o[t])r+=" ";else{if(3===e.type&&(r+=e.value),!e.shortEnded&&(e=e.firstChild))for(;s(e),e=e.next;);i[t]&&n.next&&(r+="\n","p"===t&&(r+="\n"))}}else r+="\n"}(n.parse(e)),r}function V(e){return e=U(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?L:" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function K(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function X(e){var o,i,s=1;function u(e,t){if(3!==e.type||!t.test(e.value)){if(e=e.firstChild)do{if(!u(e,t))return}while(e=e.next);return 1}e.value=e.value.replace(t,"")}function t(e,t,n){var r=e._listLevel||s;r!==s&&(o=r<s?o&&o.parent.parent:(i=o,null)),o&&o.name===t?o.append(e):(i=i||o,o=new $(t,1),1<n&&o.attr("start",""+n),e.wrap(o)),e.name="li",s<r&&i&&i.lastChild.append(o),s=r,function a(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)for(;a(e),e=e.next;);}(e),u(e,/^\u00a0+/),u(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),u(e,/^\u00a0+/)}for(var n=[],r=e.firstChild;null!=r;)if(n.push(r),null!==(r=r.walk()))for(;void 0!==r&&r.parent!==e;)r=r.walk();for(var a=0;a<n.length;a++)if("p"===(e=n[a]).name&&e.firstChild){var l=function d(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)for(;t+=d(e),e=e.next;);return t}(e);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(l)){t(e,"ul");continue}if(function(t){var n;return t=t.replace(/^[\u00a0 ]+/,""),k.each([/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],function(e){if(e.test(t))return!(n=!0)}),n}(l)){var c=/([0-9]+)\./.exec(l),f=1;c&&(f=parseInt(c[1],10)),t(e,"ol",f);continue}if(e._listLevel){t(e,"ul",1);continue}o=null}else i=o,o=null}var W,Y,Z=function(r,e){var a,t=O(r);t&&(a=k.makeMap(t.split(/[, ]/))),e=U(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,L],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join(L):""}]]);var n=r.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody"),o=z({valid_elements:n,valid_children:"-li[p]"});k.each(o.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var i=B({},o);i.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)(t=e[n]).attr("style",function(n,r,a,o){var i,s={},e=n.dom.parseStyle(o);return k.each(e,function(e,t){switch(t){case"mso-list":(i=/\w+ \w+([0-9]+)/i.exec(o))&&(a._listLevel=parseInt(i[1],10)),/Ignore/i.test(e)&&a.firstChild&&(a._listIgnore=!0,a.firstChild._listIgnore=!0);break;case"horiz-align":t="text-align";break;case"vert-align":t="vertical-align";break;case"font-color":case"mso-foreground":t="color";break;case"mso-background":case"mso-highlight":t="background";break;case"font-weight":case"font-style":return void("normal"!==e&&(s[t]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void a.remove()}0!==t.indexOf("mso-comment")?0!==t.indexOf("mso-")&&("all"===O(n)||r&&r[t])&&(s[t]=e):a.remove()}),/(bold)/i.test(s["font-weight"])&&(delete s["font-weight"],a.wrap(new $("b",1))),/(italic)/i.test(s["font-style"])&&(delete s["font-style"],a.wrap(new $("i",1))),(s=n.dom.serializeStyle(s,a.name))||null}(r,a,t,t.attr("style"))),"span"===t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),i.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),i.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),i.addNodeFilter("a",function(e){for(var t,n,r,a=e.length;a--;)if(n=(t=e[a]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=(n=n.split("#")[1])&&"#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){t.unwrap();continue}t.attr({href:n,name:r})}else t.unwrap()});var s=i.parse(e);return r.getParam("paste_convert_word_fake_lists",!0)&&X(s),e=H({validate:j(r)},o).serialize(s)},G=function(e,t){return{content:e,cancelled:t}},J=function(e,t,n,r){var a,o,i,s,u,l,c,f,d,m,p,g,v=(a=t,o=n,i=r,e.fire("PastePreProcess",{content:a,internal:o,wordContent:i})),h=function(e,t){var n=B({},e.schema);n.addNodeFilter("meta",function(e){k.each(e,function(e){e.remove()})});var r=n.parse(t,{forced_root_block:!1,isRootContent:!0});return H({validate:j(e)},e.schema).serialize(r)}(e,v.content);return e.hasEventListeners("PastePostProcess")&&!v.isDefaultPrevented()?(u=h,l=n,c=r,p=(s=e).dom.create("div",{style:"display:none"},u),f=p,d=l,m=c,g=s.fire("PastePostProcess",{node:f,internal:d,wordContent:m}),G(g.node.innerHTML,g.isDefaultPrevented())):G(h,v.isDefaultPrevented())},Q=function(e,t,n){var r,a,o=K(t),i=o?(a=t,(r=e).getParam("paste_enable_default_filters",!0)?Z(r,a):a):t;return J(e,i,n,o)},ee=function(e,t){return e.insertContent(t,{merge:e.getParam("paste_merge_formats",!0),paste:!0}),!0},te=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},ne=function(e,r){return te(r)&&g(A(e),function(e){return x(t=r,n="."+e,t.length-n.length);var t,n})},re=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!te(t))&&(a=t,o=n,(r=e).undoManager.extra(function(){o(r,a)},function(){r.execCommand("mceInsertLink",!1,a)}),!0);var r,a,o},ae=function(e,t,n){return!!ne(e,t)&&(a=t,o=n,(r=e).undoManager.extra(function(){o(r,a)},function(){r.insertContent('<img src="'+a+'">')}),!0);var r,a,o},oe=function(e,t,n){var r,a;n||!1===e.getParam("smart_paste",!0)?ee(e,t):(r=e,a=t,k.each([re,ae,ee],function(e){return!0!==e(r,a,ee)}))},ie=function(e){return"\n"===e||"\r"===e},se=function(e,t){var n,r,a,o,i=(n=" ",(r=e.getParam("paste_tab_spaces",4,"number"))<=0?"":new Array(r+1).join(n)),s=t.replace(/\t/g,i);return(o={pcIsSpace:!(a=function(e,t){return-1!==" \f\t\x0B".indexOf(t)||t===L?e.pcIsSpace||""===e.str||e.str.length===s.length-1||(n=s,(r=e.str.length+1)<n.length&&0<=r&&ie(n[r]))?{pcIsSpace:!1,str:e.str+L}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:ie(t),str:e.str+t};var n,r}),str:""},h(s,function(e){o=a(o,e)}),o).str},ue=function(e,t,n,r){var a=Q(e,t,n);!1===a.cancelled&&oe(e,a.content,r)},le=function(e,t,n){var r=n||E(t);ue(e,t.replace(F,""),r,!1)},ce=function(e,t){var n,r,a,o=e.dom.encode(t).replace(/\r\n/g,"\n"),i=se(e,o),s=(n=i,r=e.getParam("forced_root_block"),a=e.getParam("forced_root_block_attrs"),r?N(n,!0===r?"p":r,a):n.replace(/\r?\n/g,"<br>"));ue(e,s,!1,!0)},fe=function(e){var t,n={};if(e&&(!e.getData||(t=e.getData("Text"))&&0<t.length&&-1===t.indexOf("data:text/mce-internal,")&&(n["text/plain"]=t),e.types))for(var r=0;r<e.types.length;r++){var a=e.types[r];try{n[a]=e.getData(a)}catch(o){n[a]=""}}return n},de=function(e,t){return t in e&&0<e[t].length},me=function(e){return de(e,"text/html")||de(e,"text/plain")},pe=(W="mceclip",Y=0,function(){return W+Y++}),ge=function(e,t){var n,r,a,o,i,s,u,l,c,f,d,m,p,g=(n=t.uri,(r=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(n))?{type:r[1],data:decodeURIComponent(r[2])}:{type:null,data:null}),v=g.data,h=g.type,y=pe(),b=t.blob,x=new Image;x.src=t.uri,m=x,!(p=e.getParam("images_dataimg_filter"))||p(m)?(l=void 0,(o=(a=e.editorUpload.blobCache).getByData(v,h))?l=o:(s=(i=e.getParam("images_reuse_filename")&&P(b.name))?(c=e,f=b.name,d=f.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i),P(d)?c.dom.encode(d[1]):null):y,u=i?b.name:undefined,l=a.create(y,b,v,s,u),a.add(l)),le(e,'<img src="'+l.blobUri()+'">',!1)):le(e,'<img src="'+t.uri+'">',!1)},ve=function(e){return T.all(v(e,function(r){return new T(function(e){var t=P(r.getAsFile)?r.getAsFile():r,n=new window.FileReader;n.onload=function(){e({blob:t,uri:n.result})},n.readAsDataURL(t)})}))},he=function(e){var t=A(e);return function(r){return e=r.type,x(e,"image/",0)&&g(t,function(e){return t=e,n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"},(k.hasOwn(n,t)?"image/"+n[t]:"image/"+t)===r.type;var t,n});var e}},ye=function(t,e,n){var r,a,o,i,s="paste"===e.type?e.clipboardData:e.dataTransfer;if(R(t)&&s){var u=(r=t,o=(a=s).items?v(y(a.items),function(e){return e.getAsFile()}):[],i=a.files?y(a.files):[],function(e,t){for(var n=[],r=0,a=e.length;r<a;r++){var o=e[r];t(o,r)&&n.push(o)}return n}(0<o.length?o:i,he(r)));if(0<u.length)return e.preventDefault(),ve(u).then(function(e){n&&t.selection.setRng(n),h(e,function(e){ge(t,e)})}),!0}return!1},be=function(e){return C.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode},xe=function(s,u,l){var c,f=b(),d=b();function m(e,t,n,r,a){var o;de(t,"text/html")?o=t["text/html"]:(o=u.getHtml(),a=a||E(o),u.isDefaultContent(o)&&(r=!0)),o=V(o),u.remove();var i=!1===a&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(o),s=ne(e,o);o.length&&(!i||s)||(r=!0),(r||s)&&(o=de(t,"text/plain")&&i?t["text/plain"]:q(o)),u.isDefaultContent(o)?n||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):r?ce(e,o):le(e,o,a)}s.on("keyup",d.clear),s.on("keydown",function(e){var t,n=function(e){be(e)&&!e.isDefaultPrevented()&&u.remove()};if(be(e)&&!e.isDefaultPrevented()){if((c=e.shiftKey&&86===e.keyCode)&&w.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(e.stopImmediatePropagation(),f.set(e),d.set(!0),w.ie&&c)return e.preventDefault(),t=!0,void s.fire("paste",{ieFake:t});u.remove(),u.create(),s.once("keyup",n),s.once("paste",function(){s.off("keyup",n)})}});s.on("paste",function(e){var t=f.isSet()||d.isSet();t&&f.clear();var n,r,a=(n=s,fe(e.clipboardData||n.getDoc().dataTransfer)),o="text"===l.get()||c,i=de(a,I);c=!1,!(e.isDefaultPrevented()||(r=e.clipboardData,-1!==navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length))&&(me(a)||!ye(s,e,u.getLastRng()||s.selection.getRng()))?(t||e.preventDefault(),!w.ie||t&&!e.ieFake||de(a,"text/html")||(u.create(),s.dom.bind(u.getEl(),"paste",function(e){e.stopPropagation()}),s.getDoc().execCommand("Paste",!1,null),a["text/html"]=u.getHtml()),de(a,"text/html")?(e.preventDefault(),i=i||E(a["text/html"]),m(s,a,t,o,i)):_.setEditorTimeout(s,function(){m(s,a,t,o,i)},0)):u.remove()})},Pe=function(i,e,t){var s;xe(i,e,t),i.parser.addNodeFilter("img",function(e,t,n){var r,a=function(e){e.attr("data-mce-object")||s===w.transparentSrc||e.remove()};if(!R(i)&&((r=n).data&&!0===r.data.paste))for(var o=e.length;o--;)(s=e[o].attr("src"))&&(0!==s.indexOf("webkit-fake-url")&&(i.getParam("allow_html_data_urls",!1,"boolean")||0!==s.indexOf("data:"))||a(e[o]))})},we=function(e){return w.ie&&e.inline?document.body:e.getBody()},_e=function(t,e,n){var r;we(r=t)!==r.getBody()&&t.dom.bind(e,"paste keyup",function(e){De(t,n)||t.fire("paste")})},Te=function(e){return e.dom.get("mcepastebin")},Ce=function(e,t){return t===e},De=function(e,t){var n,r=Te(e);return(n=r)&&"mcepastebin"===n.id&&Ce(t,r.innerHTML)},ke=function(e){var t=d(null),n="%MCEPASTEBIN%";return{create:function(){return function(e,t,n){var r=e.dom,a=e.getBody();t.set(e.selection.getRng());var o=e.dom.add(we(e),"div",{id:"mcepastebin","class":"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n);(w.ie||w.gecko)&&r.setStyle(o,"left","rtl"===r.getStyle(a,"direction",!0)?65535:-65535),r.bind(o,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),_e(e,o,n),o.focus(),e.selection.select(o,!0)}(e,t,n)},remove:function(){return function(e,t){if(Te(e)){for(var n=void 0,r=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);r&&e.selection.setRng(r)}t.set(null)}(e,t)},getEl:function(){return Te(e)},getHtml:function(){return function(n){var t=function(e,t){e.appendChild(t),n.dom.remove(t,!0)},e=k.grep(we(n).childNodes,function(e){return"mcepastebin"===e.id}),r=e.shift();k.each(e,function(e){t(r,e)});for(var a=n.dom.select("div[id=mcepastebin]",r),o=a.length-1;0<=o;o--){var i=n.dom.create("div");r.insertBefore(i,a[o]),t(i,a[o])}return r?r.innerHTML:""}(e)},getLastRng:function(){return t.get()},isDefault:function(){return De(e,n)},isDefaultContent:function(e){return e===n}}},Se=function(n,r){n.addCommand("mceTogglePlainTextPaste",function(){var e,t;e=n,"text"===(t=r).pasteFormat.get()?(t.pasteFormat.set("html"),D(e,!1)):(t.pasteFormat.set("text"),D(e,!0)),e.focus()}),n.addCommand("mceInsertClipboardContent",function(e,t){t.content&&r.pasteHtml(t.content,t.internal),t.text&&r.pasteText(t.text)})},Oe=function(e,t,n){if(r=e,!1!==w.iOS||"function"!=typeof(null==r?void 0:r.setData))return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(I,t),!0}catch(a){return!1}var r},je=function(e,t,n,r){Oe(e.clipboardData,t.html,t.text)?(e.preventDefault(),r()):n(t.html,r)},Re=function(s){return function(e,t){var n=F+e,r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),a=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(a),s.dom.add(s.getBody(),r);var o=s.selection.getRng();a.focus();var i=s.dom.createRng();i.selectNodeContents(a),s.selection.setRng(i),_.setTimeout(function(){s.selection.setRng(o),r.parentNode.removeChild(r),t()},0)}},Ae=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},Ie=function(e){return!e.selection.isCollapsed()||!!(t=e).dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody());var t},Fe=function(e){var t,n;e.on("cut",(t=e,function(e){Ie(t)&&je(e,Ae(t),Re(t),function(){var e;w.browser.isChrome()||w.browser.isFirefox()?(e=t.selection.getRng(),_.setEditorTimeout(t,function(){t.selection.setRng(e),t.execCommand("Delete")},0)):t.execCommand("Delete")})})),e.on("copy",(n=e,function(e){Ie(n)&&je(e,Ae(n),Re(n),function(){})}))},Ee=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Me=function(e,t){return Ee.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())},Ne=function(e,t){e.focus(),e.selection.setRng(t)},Be=function(i,s,u){i.getParam("paste_block_drop",!1)&&i.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),S(i)||i.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()}),i.on("drop",function(e){var t,n,r,a,o=Me(i,e);e.isDefaultPrevented()||u.get()||(t=s.getDataTransferItems(e.dataTransfer),n=s.hasContentType(t,I),(!s.hasHtmlOrText(t)||(r=t["text/plain"])&&0===r.indexOf("file://"))&&s.pasteImageData(e,o)||!o||!i.getParam("paste_filter_drop",!0)||(a=t["mce-internal"]||t["text/html"]||t["text/plain"])&&(e.preventDefault(),_.setEditorTimeout(i,function(){i.undoManager.transact(function(){t["mce-internal"]&&i.execCommand("Delete"),Ne(i,o),a=V(a),t["text/html"]?s.pasteHtml(a,n):s.pasteText(a)})})))}),i.on("dragstart",function(e){u.set(!0)}),i.on("dragover dragend",function(e){S(i)&&!1===u.get()&&(e.preventDefault(),Ne(i,Me(i,e))),"dragend"===e.type&&u.set(!1)})};function He(t,n){t.on("PastePreProcess",function(e){e.content=n(t,e.content,e.internal,e.wordContent)})}function Le(e,t){if(!K(t))return t;var n=[];return k.each(e.schema.getBlockElements(),function(e,t){n.push(t)}),t=U(t,[[new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g"),"$1"]]),t=U(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function $e(e,t,n,r){if(r||n)return t;var l,c,f,a=e.getParam("paste_webkit_styles");return!1===e.getParam("paste_remove_styles_if_webkit",!0)||"all"===a?t:(a&&(l=a.split(/[, ]/)),t=(t=l?(c=e.dom,f=e.selection.getNode(),t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,r){var a=c.parseStyle(c.decode(n)),o={};if("none"===l)return t+r;for(var i=0;i<l.length;i++){var s=a[l[i]],u=c.getStyle(f,l[i],!0);/color/.test(l[i])&&(s=c.toHex(s),u=c.toHex(u)),u!==s&&(o[l[i]]=s)}return(o=c.serializeStyle(o,"span"))?t+' style="'+o+'"'+r:t+r})):t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3")).replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r}))}function ze(n,e){n.$("a",e).find("font,u").each(function(e,t){n.dom.remove(t,!0)})}var Ue=function(n,r){return function(t){t.setActive("text"===r.pasteFormat.get());var e=function(e){return t.setActive(e.state)};return n.on("PastePlainTextToggle",e),function(){return n.off("PastePlainTextToggle",e)}}};a.add("paste",function(e){if(!1==(!!e.hasPlugin("powerpaste",!0)&&("undefined"!=typeof window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0))){var t=d(!1),n=d(e.getParam("paste_as_text",!1)?"text":"html"),r=(c=n,f=ke(l=e),l.on("PreInit",function(){return Pe(l,f,c)}),{pasteFormat:c,pasteHtml:function(e,t){return le(l,e,t)},pasteText:function(e){return ce(l,e)},pasteImageData:function(e,t){return ye(l,e,t)},getDataTransferItems:fe,hasHtmlOrText:me,hasContentType:de});i=e,w.webkit&&He(i,$e),w.ie&&(He(i,Le),u=ze,(s=i).on("PastePostProcess",function(e){u(s,e.node)}));return o=r,(a=e).ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:function(){return a.execCommand("mceTogglePlainTextPaste")},onSetup:Ue(a,o)}),a.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:function(){return a.execCommand("mceTogglePlainTextPaste")},onSetup:Ue(a,o)}),Se(e,r),function(e){var t=e.plugins.paste,n=e.getParam("paste_preprocess");n&&e.on("PastePreProcess",function(e){n.call(t,t,e)});var r=e.getParam("paste_postprocess");r&&e.on("PastePostProcess",function(e){r.call(t,t,e)})}(e),Fe(e),Be(e,r,t),{clipboard:r,quirks:void 0}}var a,o,i,s,u,l,c,f})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.Env"),w=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(e){var t=function(t){var n="",i=t.dom.encode,e=t.getParam("content_style","","string");n+='<base href="'+i(t.documentBaseURI.getURI())+'">',e&&(n+='<style type="text/css">'+e+"</style>");var o=t.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"";w.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+i(t.documentBaseURI.toAbsolute(e))+'"'+o+">"});var r,a,c,s,d,m,l,y=-1===(s=(r=t).getParam("body_id","tinymce","string")).indexOf("=")?s:(c=(a=r).getParam("body_id","","hash"))[a.id]||c,u=-1===(l=(d=t).getParam("body_class","","string")).indexOf("=")?l:(m=d).getParam("body_class","","hash")[m.id]||"",v='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(f.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",g=t.getBody().dir,p=g?' dir="'+i(g)+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+i(y)+'" class="mce-content-body '+i(u)+'"'+p+">"+t.getContent()+v+"</body></html>"}(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}}).focus("close")};e.add("preview",function(e){var t,n;(t=e).addCommand("mcePreview",function(){i(t)}),(n=e).ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:function(){return n.execCommand("mcePreview")}}),n.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:function(){return n.execCommand("mcePreview")}})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.Env");n.add("print",function(n){var t,i;(t=n).addCommand("mcePrint",function(){e.browser.isIE()?t.getDoc().execCommand("print",!1,null):t.getWin().print()}),(i=n).ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:function(){return i.execCommand("mcePrint")}}),i.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:function(){return i.execCommand("mcePrint")}}),n.addShortcut("Meta+P","","mcePrint")})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e,t,n,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=0,a=function(e,t,n){var r,o,i=e.editorUpload.blobCache,u=i.create((r="mceu",o=(new Date).getTime(),r+"_"+Math.floor(1e9*Math.random())+ ++c+String(o)),n,t);i.add(u),e.insertContent(e.dom.createHTML("img",{src:u.blobUri()}))},l=tinymce.util.Tools.resolve("tinymce.util.Promise"),s=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=function(u){u.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){var i;i=u,new l(function(n){var r=document.createElement("input");r.type="file",r.accept="image/*",r.style.position="fixed",r.style.left="0",r.style.top="0",r.style.opacity="0.001",document.body.appendChild(r),r.addEventListener("change",function(e){n(Array.prototype.slice.call(e.target.files))});var o=function(e){var t=function(){n([]),r.parentNode.removeChild(r)};s.os.isAndroid()&&"remove"!==e.type?f.setEditorTimeout(i,t,0):t(),i.off("focusin remove",o)};i.on("focusin remove",o),r.click()}).then(function(e){var t,n;0<e.length&&(t=e[0],n=t,new l(function(e){var t=new FileReader;t.onloadend=function(){e(t.result.split(",")[1])},t.readAsDataURL(n)}).then(function(e){a(u,e,t)}))})}}),u.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:function(){var e,t,n,r,o,i;n=t=2,(e=u).plugins.table?e.plugins.table.insertTable(t,n):(o=t,i=n,(r=e).undoManager.transact(function(){r.insertContent(function(e,t){var n,r,o='<table data-mce-id="mce" style="width: 100%">';for(o+="<tbody>",r=0;r<t;r++){for(o+="<tr>",n=0;n<e;n++)o+="<td><br></td>";o+="</tr>"}return o+="</tbody>",o+="</table>"}(o,i));var e=r.dom.select("*[data-mce-id]")[0];e.removeAttribute("data-mce-id");var t=r.dom.select("td,th",e);r.selection.setCursorLocation(t[0],0)}))}})},u=function(e){return function(){return e}},d=u(!1),m=u(!0),g=function(){return h},h=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:d,isSome:d,isNone:m,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(undefined),or:n,orThunk:t,map:g,each:function(){},bind:g,exists:d,forall:m,filter:g,equals:e,equals_:e,toArray:function(){return[]},toString:u("none()")}),p=function(n){var e=u(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:m,isNone:d,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return p(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:h},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(d,function(e){return t(n,e)})}};return o},b={some:p,none:g,from:function(e){return null===e||e===undefined?h:p(e)}},y=function(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}},v=function(t){return function(e){return typeof e===t}},k=y("string"),w=y("object"),T=y("array"),N=v("boolean"),q=(r=undefined,function(e){return r===e}),E=v("function");function M(e,t,n,r,o){return e(n,r)?b.some(n):E(o)&&o(n)?b.none():t(n,r,o)}var S,C=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:e}},O={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return C(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return C(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return C(n)},fromDom:C,fromPoint:function(e,t,n){return b.from(e.dom.elementFromPoint(t,n)).map(C)}},x=function(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var r=n;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},A=("undefined"!=typeof window||Function("return this;")(),function(e,t,n){for(var r=e.dom,o=E(n)?n:d;r.parentNode;){r=r.parentNode;var i=O.fromDom(r);if(t(i))return b.some(i);if(o(i))break}return b.none()}),D=function(e,t,n){return A(e,function(e){return x(e,t)},n)},_=(S=k,function(e,t,n){return function(e,t){if(!t(e))throw new Error("Default value doesn't match requested type.")}(n,S),function(e,t){if(T(e)||w(e))throw new Error("expected a string but found: "+e);return q(e)?t:N(e)?!1===e?"":t:e}(e.getParam(t,n),n)}),L=function(o){var e=_(o,"quickbars_insert_toolbar","quickimage quicktable");0<e.trim().length&&o.ui.registry.addContextToolbar("quickblock",{predicate:function(e){var t=O.fromDom(e),n=o.schema.getTextBlockElements(),r=function(e){return e.dom===o.getBody()};return M(x,D,t,"table",r).fold(function(){return M(function(e,t){return t(e)},A,t,function(e){return e.dom.nodeName.toLowerCase()in n&&o.dom.isEmpty(e.dom)},r).isSome()},function(){return!1})},items:e,position:"line",scope:"editor"})},P=function(n){var r=function(e){return"IMG"===e.nodeName||"FIGURE"===e.nodeName&&/image/i.test(e.className)},e=_(n,"quickbars_image_toolbar","alignleft aligncenter alignright");0<e.trim().length&&n.ui.registry.addContextToolbar("imageselection",{predicate:r,items:e,position:"node"});var t=_(n,"quickbars_selection_toolbar","bold italic | quicklink h2 h3 blockquote");0<t.trim().length&&n.ui.registry.addContextToolbar("textselection",{predicate:function(e){return!r(e)&&!n.selection.isCollapsed()&&(t=e,"false"!==n.dom.getContentEditableParent(t));var t},items:t,position:"selection",scope:"editor"})};o.add("quickbars",function(e){i(e),L(e),P(e)})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(e){return e.getParam("save_enablewhendirty",!0)},c=function(e,n){e.notificationManager.open({text:n,type:"error"})},t=function(t){t.addCommand("mceSave",function(){!function(e){var n=o.DOM.getParent(e.id,"form");if(!i(e)||e.isDirty()){if(e.save(),e.getParam("save_onsavecallback"))return e.execCallback("save_onsavecallback",e),e.nodeChanged();n?(e.setDirty(!1),n.onsubmit&&!n.onsubmit()||("function"==typeof n.submit?n.submit():c(e,"Error: Form submit field collision.")),e.nodeChanged()):c(e,"Error: No form element found.")}}(t)}),t.addCommand("mceCancel",function(){var e,n;e=t,n=a.trim(e.startContent),e.getParam("save_oncancelcallback")?e.execCallback("save_oncancelcallback",e):e.resetContent(n)})},r=function(t){return function(e){var n=function(){e.setDisabled(i(t)&&!t.isDirty())};return t.on("NodeChange dirty",n),function(){return t.off("NodeChange dirty",n)}}};e.add("save",function(e){var n;(n=e).ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:r(n)}),n.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return n.execCommand("mceCancel")},onSetup:r(n)}),n.addShortcut("Meta+S","","mceSave"),t(e)})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e,t,n,r,d=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=function(e){return function(){return e}},a=i(!1),m=i(!0),u=i("[!-#%-*,-\\/:;?@\\[-\\]_{}\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]"),c=function(){return l},l=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:a,isSome:a,isNone:m,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:n,orThunk:t,map:c,each:function(){},bind:c,exists:a,forall:m,filter:c,equals:e,equals_:e,toArray:function(){return[]},toString:i("none()")}),s=function(n){var e=i(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:m,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return s(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:l},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(a,function(e){return t(n,e)})}};return o},g={some:s,none:c,from:function(e){return null===e||e===undefined?l:s(e)}},p=u,v=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=function(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}},y=function(t){return function(e){return typeof e===t}},x=f("string"),b=f("array"),w=y("boolean"),O=y("number"),C=Array.prototype.slice,T=Array.prototype.push,N=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},E=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}},k=function(e,t){for(var n=e.length-1;0<=n;n--){t(e[n],n)}},S=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!b(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);T.apply(t,e[n])}return t}(N(e,t))},A=Object.hasOwnProperty,D=function(e,t){return A.call(e,t)},M=("undefined"!=typeof window||Function("return this;")(),r=3,function(e){return e.dom.nodeType===r}),B=function(e,t,n){!function(e,t,n){if(!(x(n)||w(n)||O(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}(e.dom,t,n)},F=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:e}},I={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return F(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return F(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return F(n)},fromDom:F,fromPoint:function(e,t,n){return g.from(e.dom.elementFromPoint(t,n)).map(F)}},P=function(e,t){return{element:e,offset:t}},R=function(e,t){var n=N(e.dom.childNodes,I.fromDom);return 0<n.length&&t<n.length?P(n[t],0):P(e,t)},W=function(t,n){var e;(e=t,g.from(e.dom.parentNode).map(I.fromDom)).each(function(e){e.dom.insertBefore(n.dom,t.dom)})},j=function(e,t){var n;W(e,t),n=e,t.dom.appendChild(n.dom)};var q,V,_,H=(q=M,V="text",{get:function(e){if(!q(e))throw new Error("Can only get "+V+" value of a "+V+" node");return _(e).getOr("")},getOption:_=function(e){return q(e)?g.from(e.dom.nodeValue):g.none()},set:function(e,t){if(!q(e))throw new Error("Can only set raw "+V+" value of a "+V+" node");e.dom.nodeValue=t}}),L=function(e){return H.get(e)},U=function(e,t){return n=t,i=(r=e)===undefined?document:r.dom,1!==(o=i).nodeType&&9!==o.nodeType&&11!==o.nodeType||0===o.childElementCount?[]:N(i.querySelectorAll(n),I.fromDom);var n,r,o,i},$=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),z=function(e,t){return e.isBlock(t)||D(e.schema.getShortEndedElements(),t.nodeName)},G=function(e,t){return"false"===e.getContentEditable(t)},K=function(e,t){return!e.isBlock(t)&&D(e.schema.getWhiteSpaceElements(),t.nodeName)},J=function(){return{sOffset:0,fOffset:0,elements:[]}},Q=function(e,t){return R(I.fromDom(e),t)},X=function(e,t,n,r,o,i){void 0===i&&(i=!0);for(var a=i?t(!1):n;a;){var u=G(e,a);if(u||K(e,a)){if(u?r.cef(a):r.boundary(a))break;a=t(!0)}else{if(z(e,a)){if(r.boundary(a))break}else 3===a.nodeType&&r.text(a);if(a===o)break;a=t(!1)}}},Y=function(e,t,n,r,o){var i,a,u,c,l,s,f;z(i=e,a=n)||G(i,a)||K(i,a)||(c=a,"true"===(u=i).getContentEditable(c)&&"false"===u.getContentEditableParent(c.parentNode))||(l=e.getParent(r,e.isBlock),s=new $(n,l),f=o?s.next:s.prev,X(e,f,n,{boundary:m,cef:m,text:function(e){o?t.fOffset+=e.length:t.sOffset+=e.length,t.elements.push(I.fromDom(e))}}))},Z=function(e,t,n,r,o,i){void 0===i&&(i=!0);var a=new $(n,t),u=[],c=J();Y(e,c,n,t,!1);var l=function(){return 0<c.elements.length&&(u.push(c),c=J()),!1};return X(e,a.next,n,{boundary:l,cef:function(e){return l(),o&&u.push.apply(u,o.cef(e)),!1},text:function(e){c.elements.push(I.fromDom(e)),o&&o.text(e,c)}},r,i),r&&Y(e,c,r,t,!0),l(),u},ee=function(i,e){var n=Q(e.startContainer,e.startOffset),r=n.element.dom,o=Q(e.endContainer,e.endOffset),a=o.element.dom;return Z(i,e.commonAncestorContainer,r,a,{text:function(e,t){e===a?t.fOffset+=e.length-o.offset:e===r&&(t.sOffset+=n.offset)},cef:function(e){var t,n,r,o=S(U(I.fromDom(e),"*[contenteditable=true]"),function(e){var t=e.dom;return Z(i,t,t)});return t=o,n=function(e,t){return n=e.elements[0].dom,r=t.elements[0].dom,o=n,i=r,a=Node.DOCUMENT_POSITION_PRECEDING,0!=(o.compareDocumentPosition(i)&a)?1:-1;var n,r,o,i,a},(r=C.call(t,0)).sort(n),r}},!1)},te=function(e,t){return t.collapsed?[]:ee(e,t)},ne=function(e,t){var n=e.createRng();return n.selectNode(t),te(e,n)},re=function(e,a){var t,n;return function(e,t){if(0===e.length)return[];for(var n=t(e[0]),r=[],o=[],i=0,a=e.length;i<a;i++){var u=e[i],c=t(u);c!==n&&(r.push(o),o=[]),n=c,o.push(u)}return 0!==o.length&&r.push(o),r}((t=function(e,n){var t=L(n),r=e.last,o=r+t.length,i=S(a,function(e,t){return e.start<o&&e.finish>r?[{element:n,start:Math.max(r,e.start)-r,finish:Math.min(o,e.finish)-r,matchId:t}]:[]});return{results:e.results.concat(i),last:o}},n={results:[],last:0},E(e,function(e){n=t(n,e)}),n.results),function(e){return e.matchId})},oe=function(o,e){return S(e,function(e){var t=e.elements,n=N(t,L).join(""),r=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=e.length);var o=t.regex;o.lastIndex=n;for(var i,a=[];i=o.exec(e);){var u=i[t.matchIndex],c=i.index+i[0].indexOf(u),l=c+u.length;if(r<l)break;a.push({start:c,finish:l}),o.lastIndex=l}return a}(n,o,e.sOffset,n.length-e.fOffset);return re(t,r)})},ie=function(e,i){k(e,function(e,o){k(e,function(e){var t=I.fromDom(i.cloneNode(!1));B(t,"data-mce-index",o);var n,r=e.element.dom;r.length===e.finish&&0===e.start?j(e.element,t):(r.length!==e.finish&&r.splitText(e.finish),n=r.splitText(e.start),j(I.fromDom(n),t))})})},ae=function(e,t,n,r){var o,i=n.getBookmark(),a=e.select("td[data-mce-selected],th[data-mce-selected]"),u=0<a.length?(o=e,S(a,function(e){return ne(o,e)})):te(e,n.getRng()),c=oe(t,u);return ie(c,r),n.moveToBookmark(i),c.length},ue=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},ce=function(e,t,n,r){var o=e.dom.create("span",{"data-mce-bogus":1});o.className="mce-match-marker";var i,a,u,c,l,s=e.getBody();return ye(e,t,!1),r?ae(e.dom,n,e.selection,o):(i=e.dom,a=n,u=o,c=ne(i,s),l=oe(a,c),ie(l,u),l.length)},le=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},se=function(e,t){var n=[],r=v.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(var o=0;o<r.length;o++){var i=ue(r[o]);null!==i&&i.length&&i===t.toString()&&n.push(r[o])}return n},fe=function(e,t,n){var r=t.get(),o=r.index,i=e.dom;(n=!1!==n)?o+1===r.count?o=0:o++:o-1==-1?o=r.count-1:o--,i.removeClass(se(e,r.index),"mce-match-marker-selected");var a=se(e,o);return a.length?(i.addClass(se(e,o),"mce-match-marker-selected"),e.selection.scrollIntoView(a[0]),o):-1},de=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},me=function(e,t,n,r,o,i){var a,u,c,l=(a=o,u="("+n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]")+")",a?"(?:^|\\s|"+p()+")"+u+"(?=$|\\s|"+p()+")":u),s={regex:new RegExp(l,r?"g":"gi"),matchIndex:1},f=ce(e,t,s,i);return f&&(c=fe(e,t,!0),t.set({index:c,count:f,text:n,matchCase:r,wholeWord:o,inSelection:i})),f},he=function(e,t){var n=fe(e,t,!0);t.set(h(h({},t.get()),{index:n}))},ge=function(e,t){var n=fe(e,t,!1);t.set(h(h({},t.get()),{index:n}))},pe=function(e){var t=ue(e);return null!==t&&0<t.length},ve=function(e,t,n,r,o){var i,a=t.get(),u=a.index,c=u;r=!1!==r;for(var l=e.getBody(),s=v.grep(v.toArray(l.getElementsByTagName("span")),pe),f=0;f<s.length;f++){var d=ue(s[f]),m=i=parseInt(d,10);if(o||m===a.index){for(n.length?(s[f].firstChild.nodeValue=n,le(s[f])):de(e.dom,s[f]);s[++f];){if((m=parseInt(ue(s[f]),10))!==i){f--;break}de(e.dom,s[f])}r&&c--}else u<i&&s[f].setAttribute("data-mce-index",String(i-1))}return t.set(h(h({},a),{count:o?0:a.count-1,index:c})),(r?he:ge)(e,t),!o&&0<t.get().count},ye=function(e,t,n){for(var r,o,i=t.get(),a=v.toArray(e.getBody().getElementsByTagName("span")),u=0;u<a.length;u++){var c=ue(a[u]);null!==c&&c.length&&(c===i.index.toString()&&(r=r||a[u].firstChild,o=a[u].firstChild),le(a[u]))}if(t.set(h(h({},i),{index:-1,count:0,text:""})),r&&o){var l=e.dom.createRng();return l.setStart(r,0),l.setEnd(o,o.data.length),!1!==n&&e.selection.setRng(l),l}},xe=tinymce.util.Tools.resolve("tinymce.Env"),be=function(i,a){var t,e=(t=d(g.none()),{clear:function(){return t.set(g.none())},set:function(e){return t.set(g.some(e))},isSet:function(){return t.get().isSome()},on:function(e){return t.get().each(e)}});i.undoManager.add();var n=v.trim(i.selection.getContent({format:"text"}));function u(e){(1<a.get().count?e.enable:e.disable)("next"),(1<a.get().count?e.enable:e.disable)("prev")}var c=function(e,t){var n=t?e.disable:e.enable;E(["replace","replaceall","prev","next"],n)};var l=function(e,t){xe.browser.isSafari()&&xe.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)},s=function(e){ye(i,a,!1),c(e,!0),u(e)},f=function(e){var t,n,r=e.getData(),o=a.get();r.findtext.length?(o.text===r.findtext&&o.matchCase===r.matchcase&&o.wholeWord===r.wholewords?he(i,a):((t=me(i,a,r.findtext,r.matchcase,r.wholewords,r.inselection))<=0&&(n=e,i.windowManager.alert("Could not find the specified string.",function(){n.focus("findtext")})),c(e,0===t)),u(e)):s(e)},r=a.get(),o={title:"Find and Replace",size:"normal",body:{type:"panel",items:[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",disabled:!0,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",disabled:!0,borderless:!0}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}]},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"},{type:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{type:"custom",name:"find",text:"Find",primary:!0},{type:"custom",name:"replace",text:"Replace",disabled:!0},{type:"custom",name:"replaceall",text:"Replace All",disabled:!0}],initialData:{findtext:n,replacetext:"",wholewords:r.wholeWord,matchcase:r.matchCase,inselection:r.inSelection},onChange:function(e,t){"findtext"===t.name&&0<a.get().count&&s(e)},onAction:function(e,t){var n,r,o=e.getData();switch(t.name){case"find":f(e);break;case"replace":(ve(i,a,o.replacetext)?u:s)(e);break;case"replaceall":ve(i,a,o.replacetext,!0,!0),s(e);break;case"prev":ge(i,a),u(e);break;case"next":he(i,a),u(e);break;case"matchcase":case"wholewords":case"inselection":n=e.getData(),r=a.get(),a.set(h(h({},r),{matchCase:n.matchcase,wholeWord:n.wholewords,inSelection:n.inselection})),s(e)}l(e,t.name)},onSubmit:function(e){f(e),l(e,"find")},onClose:function(){i.focus(),ye(i,a),i.undoManager.add()}};e.set(i.windowManager.open(o,{inline:"toolbar"}))},we=function(e,t){return function(){be(e,t)}};o.add("searchreplace",function(e){var t,n,r,o,i,a,u=d({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return n=u,(t=e).addCommand("SearchReplace",function(){be(t,n)}),o=u,(r=e).ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:we(r,o),icon:"search"}),r.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:we(r,o),icon:"search"}),r.shortcuts.add("Meta+F","",we(r,o)),i=e,a=u,{done:function(e){return ye(i,a,e)},find:function(e,t,n,r){return void 0===r&&(r=!1),me(i,a,e,t,n,r)},next:function(){return he(i,a)},prev:function(){return ge(i,a)},replace:function(e,t,n){return ve(i,a,e,t,n)}}})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var N=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=Object.hasOwnProperty,g=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=tinymce.util.Tools.resolve("tinymce.util.URI"),f=tinymce.util.Tools.resolve("tinymce.util.XHR"),h=function(e){return e.getParam("spellchecker_rpc_url")},k=function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)};function p(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var r=function(i,r){var n,a=[],v=r.dom,f=r.schema.getBlockElements(),h=r.schema.getWhiteSpaceElements(),g=r.schema.getShortEndedElements();function o(e){var t=i.getElementsByTagName("*"),n=[];e="number"==typeof e?""+e:null;for(var r=0;r<t.length;r++){var o=t[r],a=o.getAttribute("data-mce-index");null!==a&&a.length&&-1!==o.className.indexOf("mce-spellchecker-word")&&(a!==e&&null!==e||n.push(o))}return n}function c(e){for(var t=a.length;t--;)if(a[t]===e)return t;return-1}function e(e){for(var t=0,n=a.length;t<n&&!1!==e(a[t],t);t++);return this}function t(e){for(var t=o(e?c(e):null),n=t.length;n--;)!function(e){for(var t=e.parentNode;0<e.childNodes.length;)t.insertBefore(e.childNodes[0],e);t.removeChild(e)}(t[n]);return this}function s(e){var t=o(c(e)),n=r.dom.createRng();return n.setStartBefore(t[0]),n.setEndAfter(t[t.length-1]),n}var l=function u(e){var t;if(3===e.nodeType)return e.data;if(h[e.nodeName]&&!f[e.nodeName])return"";if(p(e))return"\n";if(t="",(f[e.nodeName]||g[e.nodeName])&&(t+="\n"),e=e.firstChild)for(;t+=u(e),e=e.nextSibling;);return t}(i);return{text:l,matches:a,each:e,filter:function(n){var r=[];return e(function(e,t){n(e,t)&&r.push(e)}),a=r,this},reset:function(){return a.splice(0,a.length),t(),this},matchFromElement:function(e){return a[e.getAttribute("data-mce-index")]},elementFromMatch:function(e){return o(c(e))[0]},find:function(e,t){if(l&&e.global)for(;n=e.exec(l);)a.push(function(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}(n,t));return this},add:function(e,t,n){return a.push({start:e,end:e+t,text:l.substr(e,t),data:n}),this},wrap:function(e){function m(e,t){var n=a[t];n.stencil||(n.stencil=o(n));var r=n.stencil.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(v.doc.createTextNode(e)),r}var o;return a.length&&function(e,t,n){var r,o,a,i,c,s=[],l=0,u=e,d=0;(t=t.slice(0)).sort(function(e,t){return e.start-t.start}),c=t.shift();e:for(;;){if((f[u.nodeName]||g[u.nodeName]||p(u))&&l++,3===u.nodeType&&(!o&&u.length+l>=c.end?(o=u,i=c.end-l):r&&s.push(u),!r&&u.length+l>c.start&&(r=u,a=c.start-l),l+=u.length),r&&o){if(u=n({startNode:r,startNodeIndex:a,endNode:o,endNodeIndex:i,innerNodes:s,match:c.text,matchIndex:d}),l-=o.length-i,o=r=null,s=[],d++,!(c=t.shift()))break}else if(h[u.nodeName]&&!f[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!p(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===e)break e;u=u.parentNode}}}(i,a,(o=e,function(e){var t,n,r=e.startNode,o=e.endNode,a=e.matchIndex,i=v.doc;if(r===o){var c=r,s=c.parentNode;0<e.startNodeIndex&&(t=i.createTextNode(c.data.substring(0,e.startNodeIndex)),s.insertBefore(t,c));var l=m(e.match,a);return s.insertBefore(l,c),e.endNodeIndex<c.length&&(n=i.createTextNode(c.data.substring(e.endNodeIndex)),s.insertBefore(n,c)),c.parentNode.removeChild(c),l}t=i.createTextNode(r.data.substring(0,e.startNodeIndex)),n=i.createTextNode(o.data.substring(e.endNodeIndex));for(var u=m(r.data.substring(e.startNodeIndex),a),d=0,f=e.innerNodes.length;d<f;++d){var h=e.innerNodes[d],g=m(h.data,a);h.parentNode.replaceChild(g,h)}var p=m(o.data.substring(0,e.endNodeIndex),a);return(s=r.parentNode).insertBefore(t,r),s.insertBefore(u,r),s.removeChild(r),(s=o.parentNode).insertBefore(p,o),s.insertBefore(n,o),s.removeChild(o),p})),this},unwrap:t,replace:function(e,t){var n=s(e);return n.deleteContents(),0<t.length&&n.insertNode(r.dom.doc.createTextNode(t)),n},rangeFromMatch:s,indexOf:c}},u=function(e,t){var n;return t.get()||(n=r(e.getBody(),e),t.set(n)),t.get()},m=function(e,t,n,r,o,a,i){var c,s,l,u=e.getParam("spellchecker_callback");(u||(c=e,s=t,l=n,function(e,t,r,o){var n={method:e,lang:l.get()},a="";n["addToDictionary"===e?"word":"text"]=t,g.each(n,function(e,t){a&&(a+="&"),a+=t+"="+encodeURIComponent(e)}),f.send({url:new d(s).toAbsolute(h(c)),type:"post",content_type:"application/x-www-form-urlencoded",data:a,success:function(e){var t,n=JSON.parse(e);n?n.error?o(n.error):r(n):(t=c.translate("Server response wasn't proper JSON."),o(t))},error:function(){var e=c.translate("The spelling service was not found: (")+h(c)+c.translate(")");o(e)}})})).call(e.plugins.spellchecker,r,o,a,i)},y=function(t,e,n,r,o,a){i(t,n,r)||(t.setProgressState(!0),m(t,e,a,"spellcheck",u(t,r).text,function(e){S(t,n,r,o,e)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1),i(t,n,r)}),t.focus())},v=function(e,t,n){e.dom.select("span.mce-spellchecker-word").length||i(e,t,n)},o=function(t,e,n,r,o,a){t.selection.collapse(),a?g.each(t.dom.select("span.mce-spellchecker-word"),function(e){e.getAttribute("data-mce-word")===r&&t.dom.remove(e,!0)}):t.dom.remove(o,!0),v(t,e,n)},i=function(e,t,n){var r=e.selection.getBookmark();if(u(e,n).reset(),e.selection.moveToBookmark(r),n.set(null),t.get())return t.set(!1),e.fire("SpellcheckEnd"),!0},x=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},S=function(t,e,n,r,o){var a=!!o.dictionary,i=o.words;if(t.setProgressState(!1),function(e){for(var t in e)if(l.call(e,t))return!1;return!0}(i)){var c=t.translate("No misspellings found.");return t.notificationManager.open({text:c,type:"info"}),void e.set(!1)}r.set({suggestions:i,hasDictionarySupport:a});var s=t.selection.getBookmark();u(t,n).find(k(t)).filter(function(e){return!!i[e.text]}).wrap(function(e){return t.dom.create("span",{"class":"mce-spellchecker-word","aria-invalid":"spelling","data-mce-bogus":1,"data-mce-word":e.text})}),t.selection.moveToBookmark(s),e.set(!0),t.fire("SpellcheckStart")},b=function(){return(b=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},w="SpellcheckStart SpellcheckEnd",T=function(n,e,r,t,o,a){var i,c,s,l=(s=n,i=g.map(s.getParam("spellchecker_languages","English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv").split(","),function(e){var t=e.split("=");return{name:t[0],value:t[1]}}),c=[],g.each(i,function(e){c.push({selectable:!0,text:e.name,data:e.value})}),c),u=function(){y(n,e,r,t,a,o)},d={tooltip:"Spellcheck",onAction:u,icon:"spell-check",onSetup:function(e){var t=function(){e.setActive(r.get())};return n.on(w,t),function(){n.off(w,t)}}},f=b(b({},d),{type:"splitbutton",select:function(e){return e===o.get()},fetch:function(e){e(g.map(l,function(e){return{type:"choiceitem",value:e.data,text:e.text}}))},onItemAction:function(e,t){o.set(t)}});1<l.length?n.ui.registry.addSplitButton("spellchecker",f):n.ui.registry.addToggleButton("spellchecker",d),n.ui.registry.addToggleMenuItem("spellchecker",{text:"Spellcheck",icon:"spell-check",onSetup:function(e){e.setActive(r.get());var t=function(){e.setActive(r.get())};return n.on(w,t),function(){n.off(w,t)}},onAction:u})},A=function(c,s,e,l,u,d,f,h){var t=[],n=e.get().suggestions[f];return g.each(n,function(e){t.push({text:e,onAction:function(){c.insertContent(c.dom.encode(e)),c.dom.remove(h),v(c,l,u)}})}),e.get().hasDictionarySupport&&(t.push({type:"separator"}),t.push({text:"Add to dictionary",onAction:function(){var t,e,n,r,o,a,i;e=s,n=l,r=u,o=d,a=f,i=h,(t=c).setProgressState(!0),m(t,e,o,"addToDictionary",a,function(){t.setProgressState(!1),t.dom.remove(i,!0),v(t,n,r)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1)})}})),t.push.apply(t,[{type:"separator"},{text:"Ignore",onAction:function(){o(c,l,u,f,h)}},{text:"Ignore all",onAction:function(){o(c,l,u,f,h,!0)}}]),t},B=function(o,a,i,c,s,l){o.ui.registry.addContextMenu("spellchecker",{update:function(e){var t=e;if("mce-spellchecker-word"!==t.className)return[];var n=function(e,t){var n=[],r=g.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(var o=0;o<r.length;o++){var a=x(r[o]);null!==a&&a.length&&a===t.toString()&&n.push(r[o])}return n}(o,x(t));if(0<n.length){var r=o.dom.createRng();return r.setStartBefore(n[0]),r.setEndAfter(n[n.length-1]),o.selection.setRng(r),A(o,a,i,c,s,l,t.getAttribute("data-mce-word"),n)}}})};e.add("spellchecker",function(e,t){if(!1==(!!e.hasPlugin("tinymcespellchecker",!0)&&("undefined"!=typeof window.console&&window.console.log&&window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),!0))){var n=N(!1),r=N((x=(v=e).getParam("language","en"),v.getParam("spellchecker_language",x))),o=N(null),a=N(null);return T(e,t,n,o,r,a),B(e,t,a,n,o,r),f=t,h=n,g=o,p=a,m=r,(d=e).addCommand("mceSpellCheck",function(){y(d,f,h,g,p,m)}),i=e,c=n,s=a,l=o,u=r,{getTextMatcher:function(){return l.get()},getWordCharPattern:function(){return k(i)},markErrors:function(e){S(i,c,l,s,e)},getLanguage:function(){return u.get()}}}var i,c,s,l,u,d,f,h,g,p,m,v,x})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Delay"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=tinymce.util.Tools.resolve("tinymce.util.VK"),m=t.DOM,n=function(e){e.keyCode!==f.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(s){function e(i){var o,l,e,t,n,u;function r(e){var t=m.select(":input:enabled,*[tabindex]:not(iframe)");function n(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&c.get(i.id)&&-1!==e.tabIndex&&function t(e){return"BODY"===e.nodeName||"hidden"!==e.type&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&t(e.parentNode)}(e)}if(d.each(t,function(e,t){if(e.id===s.id)return o=t,!1}),0<e){for(l=o+1;l<t.length;l++)if(n(t[l]))return t[l]}else for(l=o-1;0<=l;l--)if(n(t[l]))return t[l];return null}i.keyCode!==f.TAB||i.ctrlKey||i.altKey||i.metaKey||i.isDefaultPrevented()||(1===(e=d.explode((t=s).getParam("tab_focus",t.getParam("tabfocus_elements",":prev,:next")))).length&&(e[1]=e[0],e[0]=":prev"),(n=i.shiftKey?":prev"===e[0]?r(-1):m.get(e[0]):":next"===e[1]?r(1):m.get(e[1]))&&(u=c.get(n.id||n.name),n.id&&u?u.focus():y.setTimeout(function(){a.webkit||window.focus(),n.focus()},10),i.preventDefault()))}s.on("init",function(){s.inline&&m.setAttrib(s.getBody(),"tabIndex",null),s.on("keyup",n),a.gecko?s.on("keypress keydown",e):s.on("keydown",e)})};e.add("tabfocus",function(e){i(e)})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var y=function(){},b=function(n){return function(){return n}},d=function(n){return n};function w(r){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=o.concat(n);return r.apply(null,t)}}var n,e,t,r,g=function(e){return function(n){return!e(n)}},f=b(!1),C=b(!0),o=function(){return u},u=(n=function(n){return n.isNone()},{fold:function(n,e){return n()},is:f,isSome:f,isNone:C,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:b(null),getOrUndefined:b(undefined),or:t,orThunk:e,map:o,each:y,bind:o,exists:f,forall:C,filter:o,equals:n,equals_:n,toArray:function(){return[]},toString:b("none()")}),i=function(t){var n=b(t),e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:C,isNone:f,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return i(n(t))},each:function(n){n(t)},bind:r,exists:r,forall:r,filter:function(n){return n(t)?o:u},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(f,function(n){return e(t,n)})}};return o},x={some:i,none:o,from:function(n){return null===n||n===undefined?u:i(n)}},c=function(r){return function(n){return t=typeof(e=n),(null===e?"null":"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)===r;var e,t}},a=function(e){return function(n){return typeof n===e}},p=c("string"),h=c("object"),l=c("array"),s=a("boolean"),m=(r=undefined,function(n){return r===n}),v=function(n){return!(null===(e=n)||e===undefined);var e},S=a("function"),T=a("number"),R=Array.prototype.slice,O=Array.prototype.indexOf,D=Array.prototype.push,A=function(n,e){return t=n,r=e,-1<O.call(t,r);var t,r},I=function(n,e){for(var t=0,r=n.length;t<r;t++){if(e(n[t],t))return!0}return!1},B=function(n,e){for(var t=[],r=0;r<n;r++)t.push(e(r));return t},E=function(n,e){for(var t=n.length,r=new Array(t),o=0;o<t;o++){var u=n[o];r[o]=e(u,o)}return r},P=function(n,e){for(var t=0,r=n.length;t<r;t++){e(n[t],t)}},k=function(n,e){for(var t=[],r=0,o=n.length;r<o;r++){var u=n[r];e(u,r)&&t.push(u)}return t},M=function(n,e,t){return function(n,e){for(var t=n.length-1;0<=t;t--){e(n[t],t)}}(n,function(n){t=e(t,n)}),t},N=function(n,e,t){return P(n,function(n){t=e(t,n)}),t},j=function(n,e){return function(n,e,t){for(var r=0,o=n.length;r<o;r++){var u=n[r];if(e(u,r))return x.some(u);if(t(u,r))break}return x.none()}(n,e,f)},_=function(n,e){for(var t=0,r=n.length;t<r;t++){if(e(n[t],t))return x.some(t)}return x.none()},z=function(n){for(var e=[],t=0,r=n.length;t<r;++t){if(!l(n[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+n);D.apply(e,n[t])}return e},W=function(n,e){return z(E(n,e))},F=function(n,e){for(var t=0,r=n.length;t<r;++t){if(!0!==e(n[t],t))return!1}return!0},L=function(n){return[n]},H=function(n,e){return 0<=e&&e<n.length?x.some(n[e]):x.none()},q=function(n){return H(n,n.length-1)},V=function(n,e){for(var t=0;t<n.length;t++){var r=e(n[t],t);if(r.isSome())return r}return x.none()},U=function(){return(U=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}).apply(this,arguments)};function $(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;for(var r=Array(n),o=0,e=0;e<t;e++)for(var u=arguments[e],i=0,c=u.length;i<c;i++,o++)r[o]=u[i];return r}var G,K=function(t){var r,o=!1;return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return o||(o=!0,r=t.apply(null,n)),r}},X=function(n,e){var t=function(n,e){for(var t=0;t<n.length;t++){var r=n[t];if(r.test(e))return r}return undefined}(n,e);if(!t)return{major:0,minor:0};var r=function(n){return Number(e.replace(t,"$"+n))};return J(r(1),r(2))},Y=function(){return J(0,0)},J=function(n,e){return{major:n,minor:e}},Q={nu:J,detect:function(n,e){var t=String(e).toLowerCase();return 0===n.length?Y():X(n,t)},unknown:Y},Z=function(n,e){var t=String(e).toLowerCase();return j(n,function(n){return n.search(t)})},nn=function(n,t){return Z(n,t).map(function(n){var e=Q.detect(n.versionRegexes,t);return{current:n.name,version:e}})},en=function(n,t){return Z(n,t).map(function(n){var e=Q.detect(n.versionRegexes,t);return{current:n.name,version:e}})},tn=function(n,e,t){return""===e||n.length>=e.length&&n.substr(t,t+e.length)===e},rn=function(n,e){return-1!==n.indexOf(e)},on=function(n,e){return tn(n,e,0)},un=function(n,e){return tn(n,e,n.length-e.length)},cn=(G=/^\s+|\s+$/g,function(n){return n.replace(G,"")}),an=function(n){return 0<n.length},ln=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,fn=function(e){return function(n){return rn(n,e)}},sn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return rn(n,"edge/")&&rn(n,"chrome")&&rn(n,"safari")&&rn(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ln],search:function(n){return rn(n,"chrome")&&!rn(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return rn(n,"msie")||rn(n,"trident")}},{name:"Opera",versionRegexes:[ln,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:fn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:fn("firefox")},{name:"Safari",versionRegexes:[ln,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(rn(n,"safari")||rn(n,"mobile/"))&&rn(n,"applewebkit")}}],dn=[{name:"Windows",search:fn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return rn(n,"iphone")||rn(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:fn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:fn("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:fn("linux"),versionRegexes:[]},{name:"Solaris",search:fn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:fn("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:fn("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],mn={browsers:b(sn),oses:b(dn)},gn="Firefox",pn=function(n){var e=n.current,t=n.version,r=function(n){return function(){return e===n}};return{current:e,version:t,isEdge:r("Edge"),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r(gn),isSafari:r("Safari")}},hn={unknown:function(){return pn({current:undefined,version:Q.unknown()})},nu:pn,edge:b("Edge"),chrome:b("Chrome"),ie:b("IE"),opera:b("Opera"),firefox:b(gn),safari:b("Safari")},vn="Windows",bn="Android",wn="Solaris",yn="FreeBSD",Cn="ChromeOS",xn=function(n){var e=n.current,t=n.version,r=function(n){return function(){return e===n}};return{current:e,version:t,isWindows:r(vn),isiOS:r("iOS"),isAndroid:r(bn),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r(wn),isFreeBSD:r(yn),isChromeOS:r(Cn)}},Sn={unknown:function(){return xn({current:undefined,version:Q.unknown()})},nu:xn,windows:b(vn),ios:b("iOS"),android:b(bn),linux:b("Linux"),osx:b("OSX"),solaris:b(wn),freebsd:b(yn),chromeos:b(Cn)},Tn=function(n,e){var t,r,o,u,i,c,a,l,f,s,d,m,g=mn.browsers(),p=mn.oses(),h=nn(g,n).fold(hn.unknown,hn.nu),v=en(p,n).fold(Sn.unknown,Sn.nu);return{browser:h,os:v,deviceType:(r=h,o=n,u=e,i=(t=v).isiOS()&&!0===/ipad/i.test(o),c=t.isiOS()&&!i,a=t.isiOS()||t.isAndroid(),l=a||u("(pointer:coarse)"),f=i||!c&&a&&u("(min-device-width:768px)"),s=c||a&&!f,d=r.isSafari()&&t.isiOS()&&!1===/safari/i.test(o),m=!s&&!f&&!d,{isiPad:b(i),isiPhone:b(c),isTablet:b(f),isPhone:b(s),isTouch:b(l),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:b(d),isDesktop:b(m)})}},Rn=function(n){return window.matchMedia(n).matches},On=K(function(){return Tn(navigator.userAgent,Rn)}),Dn=function(){return On()},An=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:n}},In={fromHtml:function(n,e){var t=(e||document).createElement("div");if(t.innerHTML=n,!t.hasChildNodes()||1<t.childNodes.length)throw console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return An(t.childNodes[0])},fromTag:function(n,e){var t=(e||document).createElement(n);return An(t)},fromText:function(n,e){var t=(e||document).createTextNode(n);return An(t)},fromDom:An,fromPoint:function(n,e,t){return x.from(n.dom.elementFromPoint(e,t)).map(An)}},Bn=function(n,e){var t=n.dom;if(1!==t.nodeType)return!1;var r=t;if(r.matches!==undefined)return r.matches(e);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(e);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(e);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},En=function(n){return 1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType||0===n.childElementCount},Pn=function(n,e){return n.dom===e.dom},kn=function(n,e){return t=n.dom,r=e.dom,o=t,u=r,i=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(o.compareDocumentPosition(u)&i);var t,r,o,u,i},Mn=function(n,e){return Dn().browser.isIE()?kn(n,e):(t=e,r=n.dom,o=t.dom,r!==o&&r.contains(o));var t,r,o},Nn=Bn,jn=Object.keys,_n=Object.hasOwnProperty,zn=function(n,e){for(var t=jn(n),r=0,o=t.length;r<o;r++){var u=t[r];e(n[u],u)}},Wn=function(n,t){return Fn(n,function(n,e){return{k:e,v:t(n,e)}})},Fn=function(n,r){var o={};return zn(n,function(n,e){var t=r(n,e);o[t.k]=t.v}),o},Ln=function(n,e){var t,r,o,u,i={};return t=e,u=i,r=function(n,e){u[e]=n},o=y,zn(n,function(n,e){(t(n,e)?r:o)(n,e)}),i},Hn=function(n){return t=function(n){return n},r=[],zn(n,function(n,e){r.push(t(n,e))}),r;var t,r},qn=function(n,e){return Vn(n,e)?x.from(n[e]):x.none()},Vn=function(n,e){return _n.call(n,e)},Un=["tfoot","thead","tbody","colgroup"],$n=function(n,e,t){return{element:n,rowspan:e,colspan:t}},Gn=function(n,e,t){return{element:n,cells:e,section:t}},Kn=function(n,e){return{element:n,isNew:e}},Xn=function(n,e){return{cells:n,section:e}},Yn=("undefined"!=typeof window||Function("return this;")(),function(n){return n.dom.nodeName.toLowerCase()}),Jn=function(n){return n.dom.nodeType},Qn=function(e){return function(n){return Jn(n)===e}},Zn=function(n){return 8===Jn(n)||"#comment"===Yn(n)},ne=Qn(1),ee=Qn(3),te=Qn(9),re=Qn(11),oe=function(n){return In.fromDom(n.dom.ownerDocument)},ue=function(n){return te(n)?n:oe(n)},ie=function(n){return x.from(n.dom.parentNode).map(In.fromDom)},ce=function(n,e){for(var t=S(e)?e:f,r=n.dom,o=[];null!==r.parentNode&&r.parentNode!==undefined;){var u=r.parentNode,i=In.fromDom(u);if(o.push(i),!0===t(i))break;r=u}return o},ae=function(n){return x.from(n.dom.previousSibling).map(In.fromDom)},le=function(n){return x.from(n.dom.nextSibling).map(In.fromDom)},fe=function(n){return E(n.dom.childNodes,In.fromDom)},se=function(n,e){var t=n.dom.childNodes;return x.from(t[e]).map(In.fromDom)},de=S(Element.prototype.attachShadow)&&S(Node.prototype.getRootNode),me=b(de),ge=de?function(n){return In.fromDom(n.dom.getRootNode())}:ue,pe=function(n){var e=ge(n);return re(e)?x.some(e):x.none()},he=function(n){return In.fromDom(n.dom.host)},ve=function(n){if(me()&&v(n.target)){var e=In.fromDom(n.target);if(ne(e)&&be(e)&&n.composed&&n.composedPath){var t=n.composedPath();if(t)return H(t,0)}}return x.from(n.target)},be=function(n){return v(n.dom.shadowRoot)},we=function(n){var e=ee(n)?n.dom.parentNode:n.dom;if(e===undefined||null===e||null===e.ownerDocument)return!1;var t,r,o=e.ownerDocument;return pe(In.fromDom(e)).fold(function(){return o.body.contains(e)},(t=we,r=he,function(n){return t(r(n))}))},ye=function(n){var e=n.dom.body;if(null===e||e===undefined)throw new Error("Body is not available yet");return In.fromDom(e)},Ce=function(n,e){var t=[];return P(fe(n),function(n){e(n)&&(t=t.concat([n])),t=t.concat(Ce(n,e))}),t},xe=function(n,e,t){return r=function(n){return Bn(n,e)},k(ce(n,t),r);var r},Se=function(n,e){return t=function(n){return Bn(n,e)},k(fe(n),t);var t},Te=function(n,e){return t=e,o=(r=n)===undefined?document:r.dom,En(o)?[]:E(o.querySelectorAll(t),In.fromDom);var t,r,o};function Re(n,e,t,r,o){return n(t,r)?x.some(t):S(o)&&o(t)?x.none():e(t,r,o)}var Oe=function(n,e,t){for(var r=n.dom,o=S(t)?t:f;r.parentNode;){r=r.parentNode;var u=In.fromDom(r);if(e(u))return x.some(u);if(o(u))break}return x.none()},De=function(n,e,t){return Oe(n,function(n){return Bn(n,e)},t)},Ae=function(n,e){return t=function(n){return Bn(n,e)},j(n.dom.childNodes,function(n){return t(In.fromDom(n))}).map(In.fromDom);var t},Ie=function(n,e){return t=e,o=(r=n)===undefined?document:r.dom,En(o)?x.none():x.from(o.querySelector(t)).map(In.fromDom);var t,r,o},Be=function(n,e,t){return Re(Bn,De,n,e,t)},Ee=function(n,e,t){if(!(p(t)||s(t)||T(t)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",t,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(e,t+"")},Pe=function(n,e,t){Ee(n.dom,e,t)},ke=function(n,e){var t=n.dom;zn(e,function(n,e){Ee(t,e,n)})},Me=function(n,e){var t=n.dom.getAttribute(e);return null===t?undefined:t},Ne=function(n,e){return x.from(Me(n,e))},je=function(n,e){n.dom.removeAttribute(e)},_e=function(n){return N(n.dom.attributes,function(n,e){return n[e.name]=e.value,n},{})},ze=function(n){return n.style!==undefined&&S(n.style.getPropertyValue)},We=function(n,e,t){if(!p(t))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",t,":: Element ",n),new Error("CSS value must be a string: "+t);ze(n)&&n.style.setProperty(e,t)},Fe=function(n,e,t){var r=n.dom;We(r,e,t)},Le=function(n,e){var t=n.dom;zn(e,function(n,e){We(t,e,n)})},He=function(n,e){var t=n.dom,r=window.getComputedStyle(t).getPropertyValue(e);return""!==r||we(n)?r:qe(t,e)},qe=function(n,e){return ze(n)?n.style.getPropertyValue(e):""},Ve=function(n,e){var t=n.dom,r=qe(t,e);return x.from(r).filter(function(n){return 0<n.length})},Ue=function(n,e){var t,r,o=n.dom;r=e,ze(t=o)&&t.style.removeProperty(r),Ne(n,"style").map(cn).is("")&&je(n,"style")},$e=function(n,e,t){return void 0===t&&(t=0),Ne(n,e).map(function(n){return parseInt(n,10)}).getOr(t)},Ge=function(n,e){return $e(n,e,1)},Ke=function(n){return 1<Ge(n,"colspan")},Xe=function(n){return 1<Ge(n,"rowspan")},Ye=function(n,e){return parseInt(He(n,e),10)},Je=b(10),Qe=b(10),Ze=function(n,e){return nt(n,e,C)},nt=function(n,e,t){return W(fe(n),function(n){return Bn(n,e)?t(n)?[n]:[]:nt(n,e,t)})},et=function(n,e){return function(n,e,t){if(void 0===t&&(t=f),t(e))return x.none();if(A(n,Yn(e)))return x.some(e);return De(e,n.join(","),function(n){return Bn(n,"table")||t(n)})}(["td","th"],n,e)},tt=function(n){return Ze(n,"th,td")},rt=function(n){return Bn(n,"colgroup")?Se(n,"col"):W(it(n),function(n){return Se(n,"col")})},ot=function(n,e){return Be(n,"table",e)},ut=function(n){return Ze(n,"tr")},it=function(n){return ot(n).fold(b([]),function(n){return Se(n,"colgroup")})},ct=function(n,t){return E(n,function(n){if("colgroup"===Yn(n)){var e=E(rt(n),function(n){var e=$e(n,"span",1);return $n(n,1,e)});return Gn(n,e,"colgroup")}e=E(tt(n),function(n){var e=$e(n,"rowspan",1),t=$e(n,"colspan",1);return $n(n,e,t)});return Gn(n,e,t(n))})},at=function(n){return ie(n).map(function(n){var e=Yn(n);return A(Un,e)?e:"tbody"}).getOr("tbody")},lt=function(n){var e=ut(n),t=$(it(n),e);return ct(t,at)},ft=function(n,e){return n+","+e},st=function(n,e){var t=W(n.all,function(n){return n.cells});return k(t,e)},dt=function(n){var a={},e=[],t={},r=0,l=0,f=0;return P(n,function(n){var c,o,u;"colgroup"===n.section?(o={},u=0,P(n.cells,function(t){var r=t.colspan;B(r,function(n){var e=u+n;o[e]={element:t.element,colspan:r,column:e}}),u+=r}),t=o):(c=[],P(n.cells,function(n){for(var e=0;a[ft(f,e)]!==undefined;)e++;for(var t={element:n.element,rowspan:n.rowspan,colspan:n.colspan,row:f,column:e},r=0;r<n.colspan;r++)for(var o=0;o<n.rowspan;o++){var u=e+r,i=ft(f+o,u);a[i]=t,l=Math.max(l,u+1)}c.push(t)}),r++,e.push(Gn(n.element,c,n.section)),f++)}),{grid:{rows:r,columns:l},access:a,all:e,columns:t}},mt={fromTable:function(n){var e=lt(n);return dt(e)},generate:dt,getAt:function(n,e,t){var r=n.access[ft(e,t)];return r!==undefined?x.some(r):x.none()},findItem:function(n,e,t){var r=st(n,function(n){return t(e,n.element)});return 0<r.length?x.some(r[0]):x.none()},filterItems:st,justCells:function(n){return W(n.all,function(n){return n.cells})},justColumns:function(n){return Hn(n.columns)},hasColumns:function(n){return 0<jn(n.columns).length},getColumnAt:function(n,e){return x.from(n.columns[e])}},gt=function(n,e){var t=e.column,r=e.column+e.colspan-1,o=e.row,u=e.row+e.rowspan-1;return t<=n.finishCol&&r>=n.startCol&&o<=n.finishRow&&u>=n.startRow},pt=function(n,e){return e.column>=n.startCol&&e.column+e.colspan-1<=n.finishCol&&e.row>=n.startRow&&e.row+e.rowspan-1<=n.finishRow},ht=function(n,e,t){var r=mt.findItem(n,e,Pn),o=mt.findItem(n,t,Pn);return r.bind(function(r){return o.map(function(n){return e=r,t=n,{startRow:Math.min(e.row,t.row),startCol:Math.min(e.column,t.column),finishRow:Math.max(e.row+e.rowspan-1,t.row+t.rowspan-1),finishCol:Math.max(e.column+e.colspan-1,t.column+t.colspan-1)};var e,t})})},vt=function(e,n,t){return ht(e,n,t).bind(function(n){return function(n,e){for(var t=!0,r=w(pt,e),o=e.startRow;o<=e.finishRow;o++)for(var u=e.startCol;u<=e.finishCol;u++)t=t&&mt.getAt(n,o,u).exists(r);return t?x.some(e):x.none()}(e,n)})},bt=function(t,n,e){return ht(t,n,e).map(function(n){var e=mt.filterItems(t,w(gt,n));return E(e,function(n){return n.element})})},wt=function(n,e){return mt.findItem(n,e,function(n,e){return Mn(e,n)}).map(function(n){return n.element})},yt=function(i,c,a){return ot(i).bind(function(n){var r,e,o,u,t=xt(n);return r=t,e=i,o=c,u=a,mt.findItem(r,e,Pn).bind(function(n){var e=0<o?n.row+n.rowspan-1:n.row,t=0<u?n.column+n.colspan-1:n.column;return mt.getAt(r,e+o,t+u).map(function(n){return n.element})})})},Ct=function(n,e,t,r,o){var u=xt(n),i=Pn(n,t)?x.some(e):wt(u,e),c=Pn(n,o)?x.some(r):wt(u,r);return i.bind(function(e){return c.bind(function(n){return bt(u,e,n)})})},xt=mt.fromTable,St=function(e,t){ie(e).each(function(n){n.dom.insertBefore(t.dom,e.dom)})},Tt=function(n,e){le(n).fold(function(){ie(n).each(function(n){Ot(n,e)})},function(n){St(n,e)})},Rt=function(e,t){se(e,0).fold(function(){Ot(e,t)},function(n){e.dom.insertBefore(t.dom,n.dom)})},Ot=function(n,e){n.dom.appendChild(e.dom)},Dt=function(n,e){St(n,e),Ot(e,n)},At=function(r,o){P(o,function(n,e){var t=0===e?r:o[e-1];Tt(t,n)})},It=function(e,n){P(n,function(n){Ot(e,n)})},Bt=function(n){n.dom.textContent="",P(fe(n),function(n){Et(n)})},Et=function(n){var e=n.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Pt=function(n){var e,t=fe(n);0<t.length&&(e=n,P(t,function(n){St(e,n)})),Et(n)};var kt,Mt,Nt,jt=(kt=ee,Mt="text",{get:function(n){if(!kt(n))throw new Error("Can only get "+Mt+" value of a "+Mt+" node");return Nt(n).getOr("")},getOption:Nt=function(n){return kt(n)?x.from(n.dom.nodeValue):x.none()},set:function(n,e){if(!kt(n))throw new Error("Can only set raw "+Mt+" value of a "+Mt+" node");n.dom.nodeValue=e}}),_t=function(n){return jt.get(n)},zt=function(n){return jt.getOption(n)},Wt=function(n,e){return jt.set(n,e)},Ft=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function Lt(){return{up:b({selector:De,closest:Be,predicate:Oe,all:ce}),down:b({selector:Te,predicate:Ce}),styles:b({get:He,getRaw:Ve,set:Fe,remove:Ue}),attrs:b({get:Me,set:Pe,remove:je,copyTo:function(n,e){var t=_e(n);ke(e,t)}}),insert:b({before:St,after:Tt,afterAll:At,append:Ot,appendAll:It,prepend:Rt,wrap:Dt}),remove:b({unwrap:Pt,remove:Et}),create:b({nu:In.fromTag,clone:function(n){return In.fromDom(n.dom.cloneNode(!1))},text:In.fromText}),query:b({comparePosition:function(n,e){return n.dom.compareDocumentPosition(e.dom)},prevSibling:ae,nextSibling:le}),property:b({children:fe,name:Yn,parent:ie,document:function(n){return ue(n).dom},isText:ee,isComment:Zn,isElement:ne,getText:_t,setText:Wt,isBoundary:function(n){return!!ne(n)&&("body"===Yn(n)||A(Ft,Yn(n)))},isEmptyTag:function(n){return!!ne(n)&&A(["br","img","hr","input"],Yn(n))},isNonEditable:function(n){return ne(n)&&"false"===Me(n,"contenteditable")}}),eq:Pn,is:Nn}}var Ht=function(r,o,n,e){var t=o(r,n);return M(e,function(n,e){var t=o(r,e);return qt(r,n,t)},t)},qt=function(e,n,t){return n.bind(function(n){return t.filter(w(e.eq,n))})},Vt=function(n,e,t){return 0<t.length?Ht(n,e,(r=t)[0],r.slice(1)):x.none();var r},Ut=function(t,n,e,r){void 0===r&&(r=f);var o=[n].concat(t.up().all(n)),u=[e].concat(t.up().all(e)),i=function(e){return _(e,r).fold(function(){return e},function(n){return e.slice(0,n+1)})},c=i(o),a=i(u),l=j(c,function(n){return I(a,(e=n,w(t.eq,e)));var e});return{firstpath:c,secondpath:a,shared:l}},$t=Lt(),Gt=function(t,n){return Vt($t,function(n,e){return t(e)},n)},Kt=function(n){return De(n,"table")},Xt=function(l,f,s){var d=function(e){return function(n){return s!==undefined&&s(n)||Pn(n,e)}};return Pn(l,f)?x.some({boxes:x.some([l]),start:l,finish:f}):Kt(l).bind(function(a){return Kt(f).bind(function(u){if(Pn(a,u))return x.some({boxes:(o=l,i=f,c=xt(a),bt(c,o,i)),start:l,finish:f});if(Mn(a,u)){var n=0<(e=xe(f,"td,th",d(a))).length?e[e.length-1]:f;return x.some({boxes:Ct(a,l,a,f,u),start:l,finish:n})}if(Mn(u,a)){var e,t=0<(e=xe(l,"td,th",d(u))).length?e[e.length-1]:l;return x.some({boxes:Ct(u,l,a,f,u),start:l,finish:t})}return Ut($t,l,f,r).shared.bind(function(n){return Be(n,"table",s).bind(function(n){var e=xe(f,"td,th",d(n)),t=0<e.length?e[e.length-1]:f,r=xe(l,"td,th",d(n)),o=0<r.length?r[r.length-1]:l;return x.some({boxes:Ct(n,l,a,f,u),start:o,finish:t})})});var r,o,i,c})})},Yt=function(n,e){var t=Te(n,e);return 0<t.length?x.some(t):x.none()},Jt=function(n,e,r){return Ie(n,e).bind(function(t){return Ie(n,r).bind(function(e){return Gt(Kt,[t,e]).map(function(n){return{first:t,last:e,table:n}})})})},Qt=function(n,e,t,r,o){return u=o,j(n,function(n){return Bn(n,u)}).bind(function(n){return yt(n,e,t).bind(function(n){return t=r,De(e=n,"table").bind(function(n){return Ie(n,t).bind(function(n){return Xt(n,e).bind(function(e){return e.boxes.map(function(n){return{boxes:n,start:e.start,finish:e.finish}})})})});var e,t})});var u},Zt=Yt,nr=function(o,n,e){return Jt(o,n,e).bind(function(i){var n=function(n){return Pn(o,n)},e="thead,tfoot,tbody,table",t=De(i.first,e,n),r=De(i.last,e,n);return t.bind(function(u){return r.bind(function(n){return Pn(u,n)?(e=i.table,t=i.first,r=i.last,o=xt(e),vt(o,t,r)):x.none();var e,t,r,o})})})},er=function(i){if(!l(i))throw new Error("cases must be an array");if(0===i.length)throw new Error("there must be at least one case");var c=[],t={};return P(i,function(n,r){var e=jn(n);if(1!==e.length)throw new Error("one and only one name per case");var o=e[0],u=n[o];if(t[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!l(u))throw new Error("case arguments must be an array");c.push(o),t[o]=function(){var n=arguments.length;if(n!==u.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+u.length+" ("+u+"), got "+n);for(var t=new Array(n),e=0;e<t.length;e++)t[e]=arguments[e];return{fold:function(){if(arguments.length!==i.length)throw new Error("Wrong number of arguments to fold. Expected "+i.length+", got "+arguments.length);return arguments[r].apply(null,t)},match:function(n){var e=jn(n);if(c.length!==e.length)throw new Error("Wrong number of arguments to match. Expected: "+c.join(",")+"\nActual: "+e.join(","));if(!F(c,function(n){return A(e,n)}))throw new Error("Not all branches were specified when using match. Specified: "+e.join(", ")+"\nRequired: "+c.join(", "));return n[o].apply(null,t)},log:function(n){console.log(n,{constructors:c,constructor:o,params:t})}}}}),t},tr=er([{none:[]},{multiple:["elements"]},{single:["element"]}]),rr=function(n,e,t,r){return n.fold(e,t,r)},or=tr.none,ur=tr.multiple,ir=tr.single,cr=function(n,e,t){return{get:function(){return Zt(n(),t).fold(function(){return e().map(ir).getOrThunk(or)},function(n){return ur(n)})}}},ar=tinymce.util.Tools.resolve("tinymce.PluginManager"),lr=function(n,e,t,r){for(var o,u,i,c=e.grid.columns,a=e.grid.rows,l=0;l<a;l++)for(var f=!1,s=0;s<c;s++){l<t.minRow||l>t.maxRow||s<t.minCol||s>t.maxCol||(mt.getAt(e,l,s).filter(r).isNone()?(o=f,0,u=n[l].element,i=In.fromTag("td"),Ot(i,In.fromTag("br")),(o?Ot:Rt)(u,i)):f=!0)}},fr=function(n,e){var t,u,r,i,c,a,l,o,f,s,d=function(n){return Bn(n.element,e)},m=lt(n),g=mt.generate(m),p=(u=d,r=(t=g).grid.columns,i=t.grid.rows,c=r,l=a=0,zn(t.access,function(n){var e,t,r,o;u(n)&&(t=(e=n.row)+n.rowspan-1,o=(r=n.column)+n.colspan-1,e<i?i=e:a<t&&(a=t),r<c?c=r:l<o&&(l=o))}),{minRow:i,minCol:c,maxRow:a,maxCol:l}),h="th:not("+e+"),td:not("+e+")",v=nt(n,"th,td",function(n){return Bn(n,h)});return P(v,Et),lr(m,g,p,d),f=p,s=k(Ze(o=n,"tr"),function(n){return 0===n.dom.childElementCount}),P(s,Et),f.minCol!==f.maxCol&&f.minRow!==f.maxRow||P(Ze(o,"th,td"),function(n){je(n,"rowspan"),je(n,"colspan")}),je(o,"width"),je(o,"height"),Ue(o,"width"),Ue(o,"height"),n},sr=function(n){return"img"===Yn(n)?1:zt(n).fold(function(){return fe(n).length},function(n){return n.length})},dr=["img","br"],mr=function(n){return zt(n).filter(function(n){return 0!==n.trim().length||-1<n.indexOf("\xa0")}).isSome()||A(dr,Yn(n))},gr=function(n){return o=mr,(u=function(n){for(var e=0;e<n.childNodes.length;e++){var t=In.fromDom(n.childNodes[e]);if(o(t))return x.some(t);var r=u(n.childNodes[e]);if(r.isSome())return r}return x.none()})(n.dom);var o,u},pr=function(n){return hr(n,mr)},hr=function(n,u){var i=function(n){for(var e=fe(n),t=e.length-1;0<=t;t--){var r=e[t];if(u(r))return x.some(r);var o=i(r);if(o.isSome())return o}return x.none()};return i(n)},vr=function(n,e){return In.fromDom(n.dom.cloneNode(e))},br=function(n){return vr(n,!1)},wr=function(n){return vr(n,!0)},yr=function(n,e){var t,r,o,u,i=(t=n,r=e,o=In.fromTag(r),u=_e(t),ke(o,u),o),c=fe(wr(n));return It(i,c),i},Cr={scope:["row","col"]},xr=function(){var n=In.fromTag("td");return Ot(n,In.fromTag("br")),n},Sr=function(){return In.fromTag("col")},Tr=function(){return In.fromTag("colgroup")},Rr=function(n,e,t){var r=yr(n,e);return zn(t,function(n,e){null===n?je(r,e):Pe(r,e,n)}),r},Or=function(n){return n},Dr=function(n){return function(){return In.fromTag("tr",n.dom)}},Ar=function(f,n,s){var d=function(n,e){var t,r,o,u;t=n.element,r=e,o=t.dom,u=r.dom,ze(o)&&ze(u)&&(u.style.cssText=o.style.cssText),Ue(e,"height"),1!==n.colspan&&Ue(n.element,"width")};return{col:function(n){var e=oe(n.element),t=In.fromTag(Yn(n.element),e.dom);return d(n,t),f(n.element,t),t},colgroup:Tr,row:Dr(n),cell:function(n){var r,o,u,i,c,e=oe(n.element),t=In.fromTag(Yn(n.element),e.dom),a=s.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),l=0<a.length?(r=n.element,o=t,u=a,gr(r).map(function(n){var e=u.join(","),t=xe(n,e,function(n){return Pn(n,r)});return M(t,function(n,e){var t=br(e);return je(t,"contenteditable"),Ot(n,t),t},o)}).getOr(o)):t;return Ot(l,In.fromTag("br")),d(n,t),i=n.element,c=t,zn(Cr,function(e,t){return Ne(i,t).filter(function(n){return A(e,n)}).each(function(n){return Pe(c,t,n)})}),f(n.element,t),t},replace:Rr,gap:xr}},Ir=function(n){return{col:Sr,colgroup:Tr,row:Dr(n),cell:xr,replace:Or,gap:xr}},Br=function(n){return E(n,In.fromDom)},Er=function(n){return rr(n.get(),b([]),d,L)},Pr="data-mce-selected",kr="data-mce-first-selected",Mr="data-mce-last-selected",Nr={selected:Pr,selectedSelector:"td[data-mce-selected],th[data-mce-selected]",firstSelected:kr,firstSelectedSelector:"td[data-mce-first-selected],th[data-mce-first-selected]",lastSelected:Mr,lastSelectedSelector:"td[data-mce-last-selected],th[data-mce-last-selected]"},jr=function(n){return{element:n,mergable:x.none(),unmergable:x.none(),selection:[n]}},_r=function(n,e,t){return{element:t,mergable:(u=e,i=Nr,rr(n.get(),x.none,function(e){return e.length<=1?x.none():nr(u,i.firstSelectedSelector,i.lastSelectedSelector).map(function(n){return{bounds:n,cells:e}})},x.none)),unmergable:(r=function(n,e){return Ne(n,e).exists(function(n){return 1<parseInt(n,10)})},0<(o=Er(n)).length&&F(o,function(n){return r(n,"rowspan")||r(n,"colspan")})?x.some(o):x.none()),selection:Er(n)};var r,o,u,i},zr=function(s,n,d,m){s.on("BeforeGetContent",function(t){!0===t.selection&&rr(n.get(),y,function(n){t.preventDefault(),ot(n[0]).map(wr).map(function(n){return[fr(n,"[data-mce-selected]")]}).each(function(n){var e;t.content="text"===t.format?E(n,function(n){return n.dom.innerText}).join(""):(e=s,E(n,function(n){return e.selection.serializer.serialize(n.dom,{})}).join(""))})},y)}),s.on("BeforeSetContent",function(f){!0===f.selection&&!0===f.paste&&x.from(s.dom.getParent(s.selection.getStart(),"th,td")).each(function(n){var l=In.fromDom(n);ot(l).each(function(e){var n,t,r,o,u,i,c,a=k((n=f.content,(r=(t||document).createElement("div")).innerHTML=n,fe(In.fromDom(r))),function(n){return"meta"!==Yn(n)});1===a.length&&(c=a[0],"table"===Yn(c))&&(f.preventDefault(),o=In.fromDom(s.getDoc()),u=Ir(o),i={element:l,clipboard:a[0],generators:u},d.pasteCells(e,i).each(function(n){s.selection.setRng(n),s.focus(),m.clear(e)}))})})})},Wr=er([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),Fr=U({},Wr),Lr=function(n,e,r,o,u){var t,i,c=n.slice(0),a=(i=e,0===(t=n).length?Fr.none():1===t.length?Fr.only(0):0===i?Fr.left(0,1):i===t.length-1?Fr.right(i-1,i):0<i&&i<t.length-1?Fr.middle(i-1,i,i+1):Fr.none()),l=b(E(c,b(0)));return a.fold(l,function(n){return o.singleColumnWidth(c[n],r)},function(n,e){return u.calcLeftEdgeDeltas(c,n,e,r,o.minCellWidth(),o.isRelative)},function(n,e,t){return u.calcMiddleDeltas(c,n,e,t,r,o.minCellWidth(),o.isRelative)},function(n,e){return u.calcRightEdgeDeltas(c,n,e,r,o.minCellWidth(),o.isRelative)})},Hr=function(n){for(var e=[],t=function(n){e.push(n)},r=0;r<n.length;r++)n[r].each(t);return e};function qr(r,o){var n=function(n){var e=o(n);if(e<=0||null===e){var t=He(n,r);return parseFloat(t)||0}return e},u=function(o,n){return N(n,function(n,e){var t=He(o,e),r=t===undefined?0:parseInt(t,10);return isNaN(r)?n:n+r},0)};return{set:function(n,e){if(!T(e)&&!e.match(/^[0-9]+$/))throw new Error(r+".set accepts only positive integer values. Value was "+e);var t=n.dom;ze(t)&&(t.style[r]=e+"px")},get:n,getOuter:n,aggregate:u,max:function(n,e,t){var r=u(n,t);return r<e?e-r:0}}}var Vr,Ur,$r,Gr,Kr,Xr=qr("width",function(n){return n.dom.offsetWidth}),Yr=function(n){return Xr.get(n)},Jr=function(n){return Xr.getOuter(n)},Qr=function(t){var n=t.grid,e=B(n.columns,d),r=B(n.rows,d);return E(e,function(e){return Zr(function(){return W(r,function(n){return mt.getAt(t,n,e).filter(function(n){return n.column===e}).toArray()})},function(n){return 1===n.colspan},function(){return mt.getAt(t,0,e)})})},Zr=function(n,e,t){var r=n();return j(r,e).orThunk(function(){return x.from(r[0]).orThunk(t)}).map(function(n){return n.element})},no=function(t){var n=t.grid,e=B(n.rows,d),r=B(n.columns,d);return E(e,function(e){return Zr(function(){return W(r,function(n){return mt.getAt(t,e,n).filter(function(n){return n.row===e}).fold(b([]),function(n){return[n]})})},function(n){return 1===n.rowspan},function(){return mt.getAt(t,e,0)})})},eo=function(r,o){if(o<0||o>=r.length-1)return x.none();var n=r[o].fold(function(){var n,e,t=(n=r.slice(0,o),(e=R.call(n,0)).reverse(),e);return V(t,function(n,e){return n.map(function(n){return{value:n,delta:e+1}})})},function(n){return x.some({value:n,delta:0})}),e=r[o+1].fold(function(){var n=r.slice(o+1);return V(n,function(n,e){return n.map(function(n){return{value:n,delta:e+1}})})},function(n){return x.some({value:n,delta:1})});return n.bind(function(t){return e.map(function(n){var e=n.delta+t.delta;return Math.abs(n.value-t.value)/e})})},to=function(e,t){return function(n){return"rtl"===ro(n)?t:e}},ro=function(n){return"rtl"===He(n,"direction")?"rtl":"ltr"},oo=qr("height",function(n){var e=n.dom;return we(n)?e.getBoundingClientRect().height:e.offsetHeight}),uo=function(n){return oo.get(n)},io=function(n){return oo.getOuter(n)},co=function(t,r){return{left:t,top:r,translate:function(n,e){return co(t+n,r+e)}}},ao=co,lo=function(n,e){return n!==undefined?n:e!==undefined?e:0},fo=function(n){var e=n.dom.ownerDocument,t=e.body,r=e.defaultView,o=e.documentElement;if(t===n.dom)return ao(t.offsetLeft,t.offsetTop);var u=lo(null==r?void 0:r.pageYOffset,o.scrollTop),i=lo(null==r?void 0:r.pageXOffset,o.scrollLeft),c=lo(o.clientTop,t.clientTop),a=lo(o.clientLeft,t.clientLeft);return so(n).translate(i-a,u-c)},so=function(n){var e,t=n.dom,r=t.ownerDocument.body;return r===t?ao(r.offsetLeft,r.offsetTop):we(n)?(e=t.getBoundingClientRect(),ao(e.left,e.top)):ao(0,0)},mo=function(n,e){return{row:n,y:e}},go=function(n,e){return{col:n,x:e}},po=function(n){return fo(n).left+Jr(n)},ho=function(n){return fo(n).left},vo=function(n,e){return go(n,ho(e))},bo=function(n,e){return go(n,po(e))},wo=function(n){return fo(n).top},yo=function(n,e){return mo(n,wo(e))},Co=function(n,e){return mo(n,wo(e)+io(e))},xo=function(t,e,r){if(0===r.length)return[];var n=E(r.slice(1),function(n,e){return n.map(function(n){return t(e,n)})}),o=r[r.length-1].map(function(n){return e(r.length-1,n)});return n.concat([o])},So={delta:d,positions:function(n){return xo(yo,Co,n)},edge:wo},To=to({delta:d,edge:ho,positions:function(n){return xo(vo,bo,n)}},{delta:function(n){return-n},edge:po,positions:function(n){return xo(bo,vo,n)}}),Ro={delta:function(n,e){return To(e).delta(n,e)},positions:function(n,e){return To(e).positions(n,e)},edge:function(n){return To(n).edge(n)}},Oo={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},Do=(Ur="[eE][+-]?[0-9]+",Gr=["Infinity",(Vr="[0-9]+")+"\\."+($r=function(n){return"(?:"+n+")?"})(Vr)+$r(Ur),"\\."+Vr+$r(Ur),Vr+$r(Ur)].join("|"),new RegExp("^([+-]?(?:"+Gr+"))(.*)$")),Ao=function(n,o){return x.from(Do.exec(n)).bind(function(n){var e,t=Number(n[1]),r=n[2];return e=r,I(o,function(n){return I(Oo[n],function(n){return e===n})})?x.some({value:t,unit:r}):x.none()})},Io=function(){var n=Dn().browser;return n.isIE()||n.isEdge()},Bo=function(n,e,t){return r=He(n,e),o=t,u=parseFloat(r),isNaN(u)?o:u;var r,o,u},Eo=function(n){return Io()?(t=(e=n).dom.getBoundingClientRect().height,"border-box"===He(e,"box-sizing")?t:t-Bo(e,"padding-top",0)-Bo(e,"padding-bottom",0)-(Bo(e,"border-top-width",0)+Bo(e,"border-bottom-width",0))):Bo(n,"height",uo(n));var e,t},Po=function(n){return Io()?(t=(e=n).dom.getBoundingClientRect().width,"border-box"===He(e,"box-sizing")?t:t-Bo(e,"padding-left",0)-Bo(e,"padding-right",0)-(Bo(e,"border-left-width",0)+Bo(e,"border-right-width",0))):Bo(n,"width",Yr(n));var e,t},ko=/(\d+(\.\d+)?)%/,Mo=/(\d+(\.\d+)?)px|em/,No=function(n,e){var t,r=(t=n,x.from(t.dom.offsetParent).map(In.fromDom).getOr(ye(oe(n))));return e(n)/e(r)*100},jo=function(n,e){Fe(n,"width",e+"px")},_o=function(n,e){Fe(n,"width",e+"%")},zo=function(n,e){Fe(n,"height",e+"px")},Wo=function(n,e,t,r){var o,u,i,c,a,l=parseInt(n,10);return un(n,"%")&&"table"!==Yn(e)?(u=l,i=t,c=r,a=ot(o=e).map(function(n){var e=i(n);return Math.floor(u/100*e)}).getOr(u),c(o,a),a):l},Fo=function(n){var e,t=Ve(e=n,"height").getOrThunk(function(){return Eo(e)+"px"});return t?Wo(t,n,uo,zo):uo(n)},Lo=function(n){return Ve(n,"width").fold(function(){return x.from(Me(n,"width"))},function(n){return x.some(n)})},Ho=function(n,e){return n/e.pixelWidth()*100},qo=function(e,t){return Lo(e).fold(function(){var n=Yr(e);return Ho(n,t)},function(n){return function(n,e,t){var r=ko.exec(e);if(null!==r)return parseFloat(r[1]);var o=Po(n);return Ho(o,t)}(e,n,t)})},Vo=function(e,t){return Lo(e).fold(function(){return Po(e)},function(n){return function(n,e,t){var r=Mo.exec(e);if(null!==r)return parseInt(r[1],10);var o=ko.exec(e);if(null===o)return Po(n);var u=parseFloat(o[1]);return u/100*t.pixelWidth()}(e,n,t)})},Uo=function(n){return t="rowspan",Fo(e=n)/Ge(e,t);var e,t},$o=function(n,e,t){Fe(n,"width",e+t)},Go=function(n){return No(n,Yr)+"%"},Ko=b(ko),Xo=b(Mo),Yo=(Kr="col",function(n){return ne(n)&&Yn(n)===Kr}),Jo=function(n,e,t){return Ve(n,e).fold(function(){return t(n)+"px"},function(n){return n})},Qo=function(n,e){return Jo(n,"width",function(n){return Yo(n)?Yr(n):Vo(n,e)})},Zo=function(n){return Jo(n,"height",Uo)},nu=function(n,e,t,r,o,u){return n.filter(r).fold(function(){return u(eo(t,e))},function(n){return o(n)})},eu=function(n,e,i,c,a){var t,l=Qr(n),r=mt.hasColumns(n)?(t=n,E(mt.justColumns(t),function(n){return x.from(n.element)})):l,f=[x.some(Ro.edge(e))].concat(E(Ro.positions(l,e),function(n){return n.map(function(n){return n.x})})),s=g(Ke);return E(r,function(n,u){return nu(n,u,f,s,function(n){if(!Yo(r=n)||Ve(r,"width").isSome())return i(n,a);var e,t,r,o=(e=l[u],t=d,e!==undefined&&null!==e?t(e):x.none());return nu(o,u,f,s,function(n){return c(x.some(Yr(n)))},c)},c)})},tu=function(n){return n.map(function(n){return n+"px"}).getOr("")},ru=function(n,e,t){return eu(n,e,Vo,function(n){return n.getOrThunk(t.minCellWidth)},t)},ou=function(n,e,t,r,o){var u=no(n),i=[x.some(t.edge(e))].concat(E(t.positions(u,e),function(n){return n.map(function(n){return n.y})}));return E(u,function(n,e){return nu(n,e,i,g(Xe),r,o)})},uu=function(n,e,t){for(var r=0,o=n;o<e;o++)r+=t[o]!==undefined?t[o]:0;return r},iu=function(n,e){return mt.hasColumns(n)?(u=n,i=e,c=mt.justColumns(u),E(c,function(n,e){return{element:n.element,width:i[e],colspan:n.colspan}})):(t=n,r=e,o=mt.justCells(t),E(o,function(n){var e=uu(n.column,n.column+n.colspan,r);return{element:n.element,width:e,colspan:n.colspan}}));var t,r,o,u,i,c},cu=function(n,e,t){var r=iu(n,e);P(r,function(n){t.setElementWidth(n.element,n.width)})},au=function(n,e,t,r,o){var u=mt.fromTable(n),i=o.getCellDelta(e),c=o.getWidths(u,o),a=t===u.grid.columns-1,l=r.clampTableDelta(c,t,i,o.minCellWidth(),a),f=Lr(c,t,l,o,r),s=E(f,function(n,e){return n+c[e]});cu(u,s,o),r.resizeTable(o.adjustTableWidth,l,a)},lu=function(n,t,r,e){var o,u,i,c,a=mt.fromTable(n),l=ou(a,n,e,Uo,function(n){return n.getOrThunk(Qe)}),f=E(l,function(n,e){return r===e?Math.max(t+n,Qe()):n}),s=(o=a,u=f,i=mt.justCells(o),E(i,function(n){var e=uu(n.row,n.row+n.rowspan,u);return{element:n.element,height:e,rowspan:n.rowspan}})),d=(c=f,E(a.all,function(n,e){return{element:n.element,height:c[e]}}));P(d,function(n){zo(n.element,n.height)}),P(s,function(n){zo(n.element,n.height)});var m=M(f,function(n,e){return n+e},0);zo(n,m)},fu=function(n){return E(n,b(0))},su=function(n,e,t,r,o){return o(n.slice(0,e)).concat(r).concat(o(n.slice(t)))},du=function(i){return function(n,e,t,r){if(i(t)){var o=Math.max(r,n[e]-Math.abs(t)),u=Math.abs(o-n[e]);return 0<=t?u:-u}return t}},mu=du(function(n){return n<0}),gu=du(C),pu=function(){var f=function(n,t,e,r){var o=(100+e)/100,u=Math.max(r,(n[t]+e)/o);return E(n,function(n,e){return(e===t?u:n/o)-n})},c=function(n,e,t,r,o,u){return u?f(n,e,r,o):(a=t,l=mu(i=n,c=e,r,o),su(i,c,a+1,[l,0],fu));var i,c,a,l};return{resizeTable:function(n,e){return n(e)},clampTableDelta:mu,calcLeftEdgeDeltas:c,calcMiddleDeltas:function(n,e,t,r,o,u,i){return c(n,t,r,o,u,i)},calcRightEdgeDeltas:function(n,e,t,r,o,u){if(u)return f(n,t,r,o);var i=mu(n,t,r,o);return fu(n.slice(0,t)).concat([i])}}},hu=function(n,e){var t=x.from(n.dom.documentElement).map(In.fromDom).getOr(n);return{parent:b(t),view:b(n),origin:b(ao(0,0)),isResizable:e}},vu=function(n,e,t){return{parent:b(e),view:b(n),origin:b(ao(0,0)),isResizable:t}},bu=er([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),wu=function(n,e,t){var r=t.substring(0,t.length-n.length),o=parseFloat(r);return r===o.toString()?e(o):bu.invalid(t)},yu=U(U({},bu),{from:function(n){return un(n,"%")?wu("%",bu.percent,n):un(n,"px")?wu("px",bu.pixels,n):bu.invalid(n)}}),Cu=function(n,r,o){return n.fold(function(){return r},function(n){return t=(e=n)/o,E(r,function(n){return yu.from(n).fold(function(){return n},function(n){return n*t+"px"},function(n){return n/100*e+"px"})});var e,t},function(n){return e=o,E(r,function(n){return yu.from(n).fold(function(){return n},function(n){return n/e*100+"%"},function(n){return n+"%"})});var e})},xu=function(n,e,t){var r,o,u,i=yu.from(t),c=F(n,function(n){return"0px"===n})?(r=i,o=n.length,u=r.fold(function(){return b("")},function(n){return b(n/o+"px")},function(){return b(100/o+"%")}),B(o,u)):Cu(i,n,e);return Tu(c)},Su=function(n,e){return 0===n.length?e:M(n,function(n,e){return yu.from(e).fold(b(0),d,d)+n},0)},Tu=function(n){if(0===n.length)return n;var e,t,r=M(n,function(n,e){var t=yu.from(e).fold(function(){return{value:e,remainder:0}},function(n){return e=n,t="px",{value:(r=Math.floor(e))+t,remainder:e-r};var e,t,r},function(n){return{value:n+"%",remainder:0}});return{output:[t.value].concat(n.output),remainder:n.remainder+t.remainder}},{output:[],remainder:0}),o=r.output;return o.slice(0,o.length-1).concat([(e=o[o.length-1],t=Math.round(r.remainder),yu.from(e).fold(b(e),function(n){return n+t+"px"},function(n){return n+t+"%"}))])},Ru=yu.from,Ou=function(n){return Ru(n).fold(b("px"),b("px"),b("%"))},Du=function(l,n,e,f){var s=mt.fromTable(l),a=s.all,d=mt.justCells(s),m=mt.justColumns(s);n.each(function(n){var r,o,u,i,e=Ou(n),t=Yr(l),c=eu(s,l,Qo,tu,f),a=xu(c,t,n);mt.hasColumns(s)?(u=a,i=e,P(m,function(n,e){var t=Su([u[e]],Je());Fe(n.element,"width",t+i)})):(r=a,o=e,P(d,function(n){var e=r.slice(n.column,n.colspan+n.column),t=Su(e,Je());Fe(n.element,"width",t+o)})),Fe(l,"width",n)}),e.each(function(n){var r,e,o,t=Ou(n),u=uo(l),i=ou(s,l,So,Zo,tu),c=xu(i,u,n);r=c,e=a,o=t,P(d,function(n){var e=r.slice(n.row,n.rowspan+n.row),t=Su(e,Qe());Fe(n.element,"height",t+o)}),P(e,function(n,e){Fe(n.element,"height",r[e])}),Fe(l,"height",n)})},Au=function(n){return Lo(n).exists(function(n){return ko.test(n)})},Iu=function(n){return Lo(n).exists(function(n){return Mo.test(n)})},Bu=function(n){return Lo(n).isNone()},Eu=Go,Pu=function(n){return mt.fromTable(n).grid},ku=function(e){var o=[];return{bind:function(n){if(n===undefined)throw new Error("Event bind error: undefined handler");o.push(n)},unbind:function(e){o=k(o,function(n){return n!==e})},trigger:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r={};P(e,function(n,e){r[n]=t[e]}),P(o,function(n){n(r)})}}},Mu=function(n){return{registry:Wn(n,function(n){return{bind:n.bind,unbind:n.unbind}}),trigger:Wn(n,function(n){return n.trigger})}},Nu=function(n){return n.slice(0).sort()},ju=function(r,o,u){if(0===o.length)throw new Error("You must specify at least one required field.");var t;return function(e,n){if(!l(n))throw new Error("The "+e+" fields must be an array. Was: "+n+".");P(n,function(n){if(!p(n))throw new Error("The value "+n+" in the "+e+" fields was not a string.")})}("required",o),t=Nu(o),j(t,function(n,e){return e<t.length-1&&n===t[e+1]}).each(function(n){throw new Error("The field: "+n+" occurs more than once in the combined fields: ["+t.join(", ")+"].")}),function(e){var t=jn(e);F(o,function(n){return A(t,n)})||function(n,e){throw new Error("All required keys ("+Nu(n).join(", ")+") were not specified. Specified keys were: "+Nu(e).join(", ")+".")}(o,t),r(o,t);var n=k(o,function(n){return!u.validate(e[n],n)});return 0<n.length&&function(n,e){throw new Error("All values need to be of type: "+e+". Keys ("+Nu(n).join(", ")+") were not.")}(n,u.label),e}},_u=function(e,n){var t=k(n,function(n){return!A(e,n)});0<t.length&&function(n){throw new Error("Unsupported keys for object: "+Nu(n).join(", "))}(t)},zu=function(n){return ju(_u,n,{validate:S,label:"function"})},Wu=zu(["compare","extract","mutate","sink"]),Fu=zu(["element","start","stop","destroy"]),Lu=zu(["forceDrop","drop","move","delayDrop"]);function Hu(){var u=x.none(),i=Mu({move:ku(["info"])});return{onEvent:function(n,o){o.extract(n).each(function(n){var e,t,r;(e=o,t=n,r=u.map(function(n){return e.compare(n,t)}),u=x.some(t),r).each(function(n){i.trigger.move(n)})})},reset:function(){u=x.none()},events:i.registry}}function qu(){var n={onEvent:y,reset:y},e=Hu(),t=n;return{on:function(){t.reset(),t=e},off:function(){t.reset(),t=n},isOn:function(){return t===e},onEvent:function(n,e){t.onEvent(n,e)},events:e.events}}var Vu=function(e,t,n){var r,o,u,i=!1,c=Mu({start:ku([]),stop:ku([])}),a=qu(),l=function(){d.stop(),a.isOn()&&(a.off(),c.trigger.stop())},f=(r=l,o=200,u=null,{cancel:function(){null!==u&&(clearTimeout(u),u=null)},throttle:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];null!==u&&clearTimeout(u),u=setTimeout(function(){r.apply(null,n),u=null},o)}});a.events.move.bind(function(n){t.mutate(e,n.info)});var s=function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];i&&t.apply(null,n)}},d=t.sink(Lu({forceDrop:l,drop:s(l),move:s(function(n){f.cancel(),a.onEvent(n,t)}),delayDrop:s(f.throttle)}),n);return{element:d.element,go:function(n){d.start(n),a.on(),c.trigger.start()},on:function(){i=!0},off:function(){i=!1},destroy:function(){d.destroy()},events:c.registry}},Uu=function(n){var t,r,e=In.fromDom(ve(n).getOr(n.target)),o=function(){return n.stopPropagation()},u=function(){return n.preventDefault()},i=(t=u,r=o,function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(r.apply(null,n))});return{target:e,x:n.clientX,y:n.clientY,stop:o,prevent:u,kill:i,raw:n}},$u=function(n,e,t,r,o){var u,i,c=(u=t,i=r,function(n){u(n)&&i(Uu(n))});return n.dom.addEventListener(e,c,o),{unbind:w(Gu,n,e,c,o)}},Gu=function(n,e,t,r){n.dom.removeEventListener(e,t,r)},Ku=C,Xu=function(n,e,t){return $u(n,e,Ku,t,!1)},Yu=Uu,Ju=function(n,e){var t=Me(n,e);return t===undefined||""===t?[]:t.split(" ")},Qu=function(n){return n.dom.classList!==undefined},Zu=function(n,e){return o=e,u=Ju(t=n,r="class").concat([o]),Pe(t,r,u.join(" ")),!0;var t,r,o,u},ni=function(n,e){return o=e,0<(u=k(Ju(t=n,r="class"),function(n){return n!==o})).length?Pe(t,r,u.join(" ")):je(t,r),!1;var t,r,o,u},ei=function(n,e){Qu(n)?n.dom.classList.add(e):Zu(n,e)},ti=function(n){0===(Qu(n)?n.dom.classList:Ju(n,"class")).length&&je(n,"class")},ri=function(n,e){return Qu(n)&&n.dom.classList.contains(e)},oi=function(n){var e=n.replace(/\./g,"-");return{resolve:function(n){return e+"-"+n}}},ui=oi("ephox-dragster").resolve,ii=Wu({compare:function(n,e){return ao(e.left-n.left,e.top-n.top)},extract:function(n){return x.some(ao(n.x,n.y))},sink:function(n,e){var t=function(n){var e=U({layerClass:ui("blocker")},n),t=In.fromTag("div");Pe(t,"role","presentation"),Le(t,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),ei(t,ui("blocker")),ei(t,e.layerClass);return{element:function(){return t},destroy:function(){Et(t)}}}(e),r=Xu(t.element(),"mousedown",n.forceDrop),o=Xu(t.element(),"mouseup",n.drop),u=Xu(t.element(),"mousemove",n.move),i=Xu(t.element(),"mouseout",n.delayDrop);return Fu({element:t.element,start:function(n){Ot(n,t.element())},stop:function(){Et(t.element())},destroy:function(){t.destroy(),o.unbind(),u.unbind(),i.unbind(),r.unbind()}})},mutate:function(n,e){n.mutate(e.left,e.top)}}),ci=function(n){return"true"===Me(n,"contenteditable")},ai=oi("ephox-snooker").resolve,li=function(){var t,r=Mu({drag:ku(["xDelta","yDelta","target"])}),o=x.none(),n={mutate:function(n,e){t.trigger.drag(n,e)},events:(t=Mu({drag:ku(["xDelta","yDelta"])})).registry};n.events.drag.bind(function(e){o.each(function(n){r.trigger.drag(e.xDelta,e.yDelta,n)})});return{assign:function(n){o=x.some(n)},get:function(){return o},mutate:n.mutate,events:r.registry}},fi=ai("resizer-bar"),si=ai("resizer-rows"),di=ai("resizer-cols"),mi=function(n){var e=Te(n.parent(),"."+fi);P(e,Et)},gi=function(t,n,r){var o=t.origin();P(n,function(n){n.each(function(n){var e=r(o,n);ei(e,fi),Ot(t.parent(),e)})})},pi=function(n,e,l,f){gi(n,e,function(n,e){var t,r,o,u,i,c,a=(t=e.col,r=e.x-n.left,o=l.top-n.top,u=7,i=f,c=In.fromTag("div"),Le(c,{position:"absolute",left:r-u/2+"px",top:o+"px",height:i+"px",width:u+"px"}),ke(c,{"data-column":t,role:"presentation"}),c);return ei(a,di),a})},hi=function(n,e,l,f){gi(n,e,function(n,e){var t,r,o,u,i,c,a=(t=e.row,r=l.left-n.left,o=e.y-n.top,u=f,i=7,c=In.fromTag("div"),Le(c,{position:"absolute",left:r+"px",top:o-i/2+"px",height:i+"px",width:u+"px"}),ke(c,{"data-row":t,role:"presentation"}),c);return ei(a,si),a})},vi=function(n,e,t,r,o){var u,i=fo(t),c=e.isResizable,a=0<r.length?So.positions(r,t):[],l=0<a.length?(u=c,W(n.all,function(n,e){return u(n.element)?[e]:[]})):[],f=k(a,function(n,e){return I(l,function(n){return e===n})});hi(e,f,i,Jr(t));var s,d,m,g=0<o.length?Ro.positions(o,t):[],p=0<g.length?(d=c,m=[],B((s=n).grid.columns,function(n){mt.getColumnAt(s,n).map(function(n){return n.element}).forall(d)&&m.push(n)}),k(m,function(e){var n=mt.filterItems(s,function(n){return n.column===e});return F(n,function(n){return d(n.element)})})):[],h=k(g,function(n,e){return I(p,function(n){return e===n})});pi(e,h,i,io(t))},bi=function(n,e){var t,r,o;mi(n),n.isResizable(e)&&(t=mt.fromTable(e),r=no(t),o=Qr(t),vi(t,n,e,r,o))},wi=function(n,e){var t=Te(n.parent(),"."+fi);P(t,e)},yi=function(n){wi(n,function(n){Fe(n,"display","none")})},Ci=function(n){wi(n,function(n){Fe(n,"display","block")})},xi=ai("resizer-bar-dragging"),Si=function(o){var t=li(),r=function(n,e){void 0===e&&(e={});var t=e.mode!==undefined?e.mode:ii;return Vu(n,t,e)}(t,{}),e=x.none(),n=function(n,e){return x.from(Me(n,e))};t.events.drag.bind(function(t){n(t.target,"data-row").each(function(n){var e=Ye(t.target,"top");Fe(t.target,"top",e+t.yDelta+"px")}),n(t.target,"data-column").each(function(n){var e=Ye(t.target,"left");Fe(t.target,"left",e+t.xDelta+"px")})});var u=function(n,e){return Ye(n,e)-$e(n,"data-initial-"+e,0)};r.events.stop.bind(function(){t.get().each(function(r){e.each(function(t){n(r,"data-row").each(function(n){var e=u(r,"top");je(r,"data-initial-top"),s.trigger.adjustHeight(t,e,parseInt(n,10))}),n(r,"data-column").each(function(n){var e=u(r,"left");je(r,"data-initial-left"),s.trigger.adjustWidth(t,e,parseInt(n,10))}),bi(o,t)})})});var i=function(n,e){s.trigger.startAdjust(),t.assign(n),Pe(n,"data-initial-"+e,Ye(n,e)),ei(n,xi),Fe(n,"opacity","0.2"),r.go(o.parent())},c=Xu(o.parent(),"mousedown",function(n){var e,t;e=n.target,ri(e,si)&&i(n.target,"top"),t=n.target,ri(t,di)&&i(n.target,"left")}),a=function(n){return Pn(n,o.view())},l=function(n){return Be(n,"table",a).filter(function(n){return Be(n,"[contenteditable]",a).exists(ci)})},f=Xu(o.view(),"mouseover",function(n){l(n.target).fold(function(){we(n.target)&&mi(o)},function(n){e=x.some(n),bi(o,n)})}),s=Mu({adjustHeight:ku(["table","delta","row"]),adjustWidth:ku(["table","delta","column"]),startAdjust:ku([])});return{destroy:function(){c.unbind(),f.unbind(),r.destroy(),mi(o)},refresh:function(n){bi(o,n)},on:r.on,off:r.off,hideBars:w(yi,o),showBars:w(Ci,o),events:s.registry}},Ti=function(n,o,u){var r=So,i=Ro,e=Si(n),c=Mu({beforeResize:ku(["table","type"]),afterResize:ku(["table","type"]),startDrag:ku([])});return e.events.adjustHeight.bind(function(n){var e=n.table;c.trigger.beforeResize(e,"row");var t=r.delta(n.delta,e);lu(e,t,n.row,r),c.trigger.afterResize(e,"row")}),e.events.startAdjust.bind(function(n){c.trigger.startDrag()}),e.events.adjustWidth.bind(function(n){var e=n.table;c.trigger.beforeResize(e,"col");var t=i.delta(n.delta,e),r=u(e);au(e,t,n.column,o,r),c.trigger.afterResize(e,"col")}),{on:e.on,off:e.off,hideBars:e.hideBars,showBars:e.showBars,destroy:e.destroy,events:c.registry}},Ri=function(n,e){return n.fire("newrow",{node:e})},Oi=function(n,e){return n.fire("newcell",{node:e})},Di=function(n,e,t,r,o){n.fire("TableSelectionChange",{cells:e,start:t,finish:r,otherCells:o})},Ai=function(n){n.fire("TableSelectionClear")},Ii=function(n,e,t){n.fire("TableModified",U(U({},t),{table:e}))},Bi={"border-collapse":"collapse",width:"100%"},Ei={border:"1"},Pi="preservetable",ki=function(n){return n.getParam("table_sizing_mode","auto")},Mi=function(n){return n.getParam("table_responsive_width")},Ni=function(n){return n.getParam("table_default_attributes",Ei,"object")},ji=function(n){return n.getParam("table_default_styles",function(n){if(qi(n)){var e=n.getBody().offsetWidth;return U(U({},Bi),{width:e+"px"})}return Vi(n)?Ln(Bi,function(n,e){return"width"!==e}):Bi}(n),"object")},_i=function(n){return n.getParam("table_tab_navigation",!0,"boolean")},zi=function(n){return n.getParam("table_cell_advtab",!0,"boolean")},Wi=function(n){return n.getParam("table_row_advtab",!0,"boolean")},Fi=function(n){return n.getParam("table_advtab",!0,"boolean")},Li=function(n){return n.getParam("table_style_by_css",!1,"boolean")},Hi=function(n){return"relative"===ki(n)||!0===Mi(n)},qi=function(n){return"fixed"===ki(n)||!1===Mi(n)},Vi=function(n){return"responsive"===ki(n)},Ui=function(n){var e="section",t=n.getParam("table_header_type",e,"string");return A(["section","cells","sectionCells","auto"],t)?t:e},$i=function(n){var e=n.getParam("table_column_resizing",Pi,"string");return j(["preservetable","resizetable"],function(n){return n===e}).getOr(Pi)},Gi=function(n){return"preservetable"===$i(n)},Ki=function(n){var e=n.getParam("table_clone_elements");return p(e)?x.some(e.split(/[ ,]/)):Array.isArray(e)?x.some(e):x.none()},Xi=function(n){return n.nodeName.toLowerCase()},Yi=function(n){return In.fromDom(n.getBody())},Ji=function(n){return n.getBoundingClientRect().width},Qi=function(n){return n.getBoundingClientRect().height},Zi=function(e){return function(n){return Pn(n,Yi(e))}},nc=function(n){return/^\d+(\.\d+)?$/.test(n)?n+"px":n},ec=function(n){je(n,"data-mce-style");var e=function(n){return je(n,"data-mce-style")};P(tt(n),e),P(rt(n),e)},tc=function(n,e){var t=n.dom.getStyle(e,"width")||n.dom.getAttrib(e,"width");return x.from(t).filter(an)},rc=function(n){return/^(\d+(\.\d+)?)%$/.test(n)},oc=function(n){return In.fromDom(n.selection.getStart())},uc=function(n){var e=n;return{get:function(){return e},set:function(n){e=n}}},ic=function(t){var n=function(){return Yr(t)},e=b(0);return{width:n,pixelWidth:n,getWidths:function(n,e){return ru(n,t,e)},getCellDelta:e,singleColumnWidth:b([0]),minCellWidth:e,setElementWidth:y,adjustTableWidth:y,isRelative:!0,label:"none"}},cc=function(n,r){var o=uc(parseFloat(n)),u=uc(Yr(r));return{width:o.get,pixelWidth:u.get,getWidths:function(n,e){return eu(n,r,qo,function(n){return n.fold(function(){return t.minCellWidth()},function(n){return n/t.pixelWidth()*100})},t=e);var t},getCellDelta:function(n){return n/u.get()*100},singleColumnWidth:function(n,e){return[100-n]},minCellWidth:function(){return Je()/u.get()*100},setElementWidth:_o,adjustTableWidth:function(n){var e=o.get(),t=e+n/100*e;_o(r,t),o.set(t),u.set(Yr(r))},isRelative:!0,label:"percent"}},ac=function(n,t){var r=uc(n),o=r.get;return{width:o,pixelWidth:o,getWidths:function(n,e){return ru(n,t,e)},getCellDelta:d,singleColumnWidth:function(n,e){return[Math.max(Je(),n+e)-n]},minCellWidth:Je,setElementWidth:jo,adjustTableWidth:function(n){var e=o()+n;jo(t,e),r.set(e)},isRelative:!1,label:"pixel"}},lc=function(e){return Lo(e).fold(function(){return ic(e)},function(n){return function(n,e){var t=Ko().exec(e);if(null!==t)return cc(t[1],n);var r=Xo().exec(e);if(null!==r){var o=parseInt(r[1],10);return ac(o,n)}var u=Yr(n);return ac(u,n)}(e,n)})},fc=ac,sc=cc,dc=function(n,e){if(Hi(n)){var t=tc(n,e.dom).filter(rc).getOrThunk(function(){return Eu(e)});return sc(t,e)}return qi(n)?fc(Yr(e),e):lc(e)},mc=function(n){je(n,"width")},gc=function(n,e){var t=Yr(n)+"px";Du(n,x.some(t),x.none(),e),mc(n)},pc=function(n,e){var t,r,o,u=dc(n,e);r=u,o=Go(t=e),Du(t,x.some(o),x.none(),r),mc(t)},hc=function(n,e){var t=dc(n,e);gc(e,t)},vc=function(n){Ue(n,"width");var e=rt(n),t=0<e.length?e:tt(n);P(t,function(n){Ue(n,"width"),mc(n)}),mc(n)},bc=function(){var n=In.fromTag("div");return Le(n,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),Ot(ye(In.fromDom(document)),n),n},wc="bar-",yc=function(n){return"false"!==Me(n,"data-mce-resize")},Cc=function(f){var s,d,a=x.none(),i=x.none(),c=x.none(),o=function(n){return"TABLE"===n.nodeName},n=function(){return i},m=function(n){return dc(f,n)},g=function(){return Gi(f)?{resizeTable:function(n,e,t){t&&n(e)},clampTableDelta:function(n,e,t,r,o){if(o){if(0<=t)return t;var u=N(n,function(n,e){return n+e-r},0);return Math.max(-u,t)}return mu(n,e,t,r)},calcLeftEdgeDeltas:i=function(n,e,t,r,o){var u=gu(n,0<=r?t:e,r,o);return su(n,e,t+1,[u,-u],fu)},calcMiddleDeltas:function(n,e,t,r,o,u){return i(n,t,r,o,u)},calcRightEdgeDeltas:function(n,e,t,r,o,u){if(u)return fu(n);var i=r/n.length;return E(n,b(i))}}:pu();var i},u=function(n,e,t){var r,o,u,i,c,a,l=un(e,"e");""===d&&pc(f,n),t!==s&&""!==d?(Fe(n,"width",d),r=g(),o=m(n),u=Gi(f)||l?Pu(n).columns-1:0,au(n,t-s,u,r,o)):rc(d)&&(i=parseFloat(d.replace("%","")),Fe(n,"width",t*i/s+"%")),/^(\d+(\.\d+)?)px$/.test(d)&&(c=n,a=mt.fromTable(c),mt.hasColumns(a)||P(tt(c),function(n){var e=He(n,"width");Fe(n,"width",e),je(n,"width")}))};return f.on("init",function(){var n,e,t,r,o,u=(e=yc,(n=f).inline?vu(Yi(n),bc(),e):hu(In.fromDom(n.getDoc()),e));c=x.some(u),o=f.getParam("object_resizing",!0),(p(o)?"table"===o:o)&&f.getParam("table_resize_bars",!0,"boolean")&&(t=g(),(r=Ti(u,t,m)).on(),r.events.startDrag.bind(function(n){a=x.some(f.selection.getRng())}),r.events.beforeResize.bind(function(n){var e,t,r,o,u,i=n.table.dom;e=f,r=Ji(t=i),o=Qi(i),u=wc+n.type,e.fire("ObjectResizeStart",{target:t,width:r,height:o,origin:u})}),r.events.afterResize.bind(function(n){var e,t,r,o,u,i=n.table,c=i.dom;ec(i),a.each(function(n){f.selection.setRng(n),f.focus()}),e=f,r=Ji(t=c),o=Qi(c),u=wc+n.type,e.fire("ObjectResized",{target:t,width:r,height:o,origin:u}),f.undoManager.add()}),i=x.some(r))}),f.on("ObjectResizeStart",function(n){var e,t=n.target;o(t)&&(e=In.fromDom(t),P(f.dom.select(".mce-clonedresizable"),function(n){f.dom.addClass(n,"mce-"+$i(f)+"-columns")}),!Iu(e)&&qi(f)?hc(f,e):!Au(e)&&Hi(f)&&pc(f,e),Bu(e)&&on(n.origin,wc)&&pc(f,e),s=n.width,d=Vi(f)?"":tc(f,t).getOr(""))}),f.on("ObjectResized",function(n){var e,t,r=n.target;o(r)&&(e=In.fromDom(r),t=n.origin,on(t,"corner-")&&u(e,t,n.width),ec(e),Ii(f,e.dom))}),f.on("SwitchMode",function(){i.each(function(n){f.mode.isReadOnly()?n.hideBars():n.showBars()})}),{lazyResize:n,lazyWire:function(){return c.getOr(hu(In.fromDom(f.getBody()),yc))},destroy:function(){i.each(function(n){n.destroy()}),c.each(function(n){var e;e=n,f.inline&&Et(e.parent())})}}},xc=function(n,e){return{element:n,offset:e}},Sc=function(e,n,t){return e.property().isText(n)&&0===e.property().getText(n).trim().length||e.property().isComment(n)?t(n).bind(function(n){return Sc(e,n,t).orThunk(function(){return x.some(n)})}):x.none()},Tc=function(n,e){return n.property().isText(e)?n.property().getText(e).length:n.property().children(e).length},Rc=function(n,e){var t=Sc(n,e,n.query().prevSibling).getOr(e);if(n.property().isText(t))return xc(t,Tc(n,t));var r=n.property().children(t);return 0<r.length?Rc(n,r[r.length-1]):xc(t,Tc(n,t))},Oc=Rc,Dc=Lt(),Ac=function(t,r){Lo(t).bind(function(n){return Ao(n,["fixed","relative","empty"])}).each(function(n){var e=n.value/2;$o(t,e,n.unit),$o(r,e,n.unit)})},Ic=function(n,e,t){n.cells[e]=t},Bc=function(n,e){return Xn(e,n.section)},Ec=function(n,e){var t=n.cells,r=E(t,e);return Xn(r,n.section)},Pc=function(n,e){return n.cells[e]},kc=function(n,e){return Pc(n,e).element},Mc=function(n){return n.cells.length},Nc=function(n){var e=function(n,e){for(var t=[],r=[],o=0,u=n.length;o<u;o++){var i=n[o];(e(i,o)?t:r).push(i)}return{pass:t,fail:r}}(n,function(n){return"colgroup"===n.section});return{rows:e.fail,cols:e.pass}},jc=function(n,e,t,r){t===r?je(n,e):Pe(n,e,t)},_c=function(n,e,t){q(Se(n,e)).fold(function(){return Rt(n,t)},function(n){return Tt(n,t)})},zc=function(c,n){var t=[],r=[],a=function(n){return E(n,function(n){n.isNew&&t.push(n.element);var e=n.element;return Bt(e),P(n.cells,function(n){n.isNew&&r.push(n.element),jc(n.element,"colspan",n.colspan,1),jc(n.element,"rowspan",n.rowspan,1),Ot(e,n.element)}),e})},l=function(n){return W(n,function(n){return E(n.cells,function(n){return jc(n.element,"span",n.colspan,1),n.element})})},o=function(n,e){var t,r,o,u=(o=Ae(t=c,r=e).getOrThunk(function(){var n=In.fromTag(r,oe(t).dom);return"thead"===r?_c(t,"caption,colgroup",n):"colgroup"===r?_c(t,"caption",n):Ot(t,n),n}),Bt(o),o),i=("colgroup"===e?l:a)(n);It(u,i)},e=function(n,e){0<n.length?o(n,e):Ae(c,e).each(Et)},u=[],i=[],f=[],s=[];return P(n,function(n){switch(n.section){case"thead":u.push(n);break;case"tbody":i.push(n);break;case"tfoot":f.push(n);break;case"colgroup":s.push(n)}}),e(s,"colgroup"),e(u,"thead"),e(i,"tbody"),e(f,"tfoot"),{newRows:t,newCells:r}},Wc=function(n,e){if(0===n.length)return 0;var t=n[0];return _(n,function(n){return!e(t.element,n.element)}).fold(function(){return n.length},function(n){return n})},Fc=function(n,e,t,r){var o,u=n[e].cells.slice(t),i=Wc(u,r),c=(o=t,E(n,function(n){return Pc(n,o)}).slice(e));return{colspan:i,rowspan:Wc(c,r)}},Lc=function(o,u){var i=E(o,function(n){return E(n.cells,f)});return E(o,function(n,r){return{details:W(n.cells,function(n,e){if(!1!==i[r][e])return[];var t=Fc(o,r,e,u);return function(n,e,t,r){for(var o=n;o<n+t;o++)for(var u=e;u<e+r;u++)i[o][u]=!0}(r,e,t.rowspan,t.colspan),[{element:n.element,rowspan:t.rowspan,colspan:t.colspan,isNew:n.isNew}]}),section:n.section}})},Hc=function(n,e,t){var r,o=[];mt.hasColumns(n)&&(r=E(mt.justColumns(n),function(n){return Kn(n.element,t)}),o.push(Xn(r,"colgroup")));for(var u=0;u<n.grid.rows;u++){for(var i=[],c=0;c<n.grid.columns;c++){var a=mt.getAt(n,u,c).map(function(n){return Kn(n.element,t)}).getOrThunk(function(){return Kn(e.gap(),!0)});i.push(a)}var l=Xn(i,n.all[u].section);o.push(l)}return o},qc=function(n,r){return E(n,function(n){var e,t=(e=n.details,V(e,function(n){return ie(n.element).map(function(n){var e=ie(n).isNone();return Kn(n,e)})}).getOrThunk(function(){return Kn(r.row(),!0)}));return{element:t.element,cells:n.details,section:n.section,isNew:t.isNew}})},Vc=function(n,e){var t=Lc(n,Pn);return qc(t,e)},Uc=function(n,e){return V(n.all,function(n){return j(n.cells,function(n){return Pn(e,n.element)})})},$c=function(a,e,l,f,s){return function(r,o,n,u,i){var c=mt.fromTable(o);return e(c,n).map(function(n){var e=Hc(c,u,!1),t=a(e,n,Pn,s(u));return{grid:Vc(t.grid,u),cursor:t.cursor}}).fold(function(){return x.none()},function(n){var e=zc(o,n.grid),t=x.from(i).getOrThunk(function(){return lc(o)});return l(o,n.grid,t),f(o),bi(r,o),x.some({cursor:n.cursor,newRows:e.newRows,newCells:e.newCells})})}},Gc=function(e,n){return et(n.element).bind(function(n){return Uc(e,n)})},Kc=function(e,n){var t=E(n.selection,function(n){return et(n).bind(function(n){return Uc(e,n)})}),r=Hr(t);return 0<r.length?x.some({cells:r,generators:n.generators,clipboard:n.clipboard}):x.none()},Xc=function(e,n){var t=E(n.selection,function(n){return et(n).bind(function(n){return Uc(e,n)})}),r=Hr(t);return 0<r.length?x.some(r):x.none()},Yc=function(n,e,t,r){for(var o=Nc(n).rows,u=!0,i=0;i<o.length;i++)for(var c=0;c<Mc(o[0]);c++){var a=t(kc(o[i],c),e);!0===a&&!1===u?Ic(o[i],c,Kn(r(),!0)):!0===a&&(u=!1)}return n},Jc=function(n,e,u,i){var t,r,o,c=Nc(n).rows;return 0<e&&e<c.length&&(t=c[e-1].cells,o=u,r=N(t,function(n,e){return I(n,function(n){return o(n.element,e.element)})?n:n.concat([e])},[]),P(r,function(r){for(var o=x.none(),n=e;n<c.length;n++)!function(t){for(var n=0;n<Mc(c[0]);n++)!function(e){var n=c[t].cells[e];u(n.element,r.element)&&(o.isNone()&&(o=x.some(i())),o.each(function(n){Ic(c[t],e,Kn(n,!0))}))}(n)}(n)})),n},Qc=function(t){return{is:function(n){return t===n},isValue:C,isError:f,getOr:b(t),getOrThunk:b(t),getOrDie:b(t),or:function(n){return Qc(t)},orThunk:function(n){return Qc(t)},fold:function(n,e){return e(t)},map:function(n){return Qc(n(t))},mapError:function(n){return Qc(t)},each:function(n){n(t)},bind:function(n){return n(t)},exists:function(n){return n(t)},forall:function(n){return n(t)},toOptional:function(){return x.some(t)}}},Zc=function(t){return{is:f,isValue:f,isError:C,getOr:d,getOrThunk:function(n){return n()},getOrDie:function(){return n=String(t),function(){throw new Error(n)}();var n},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,e){return n(t)},map:function(n){return Zc(t)},mapError:function(n){return Zc(n(t))},each:y,bind:function(n){return Zc(t)},exists:f,forall:C,toOptional:x.none}},na={value:Qc,error:Zc,fromOption:function(n,e){return n.fold(function(){return Zc(e)},Qc)}},ea=function(n,e){return{rowDelta:0,colDelta:Mc(n[0])-Mc(e[0])}},ta=function(n,e){return{rowDelta:n.length-e.length,colDelta:0}},ra=function(n,e,t){var r="colgroup"===e.section?t.col:t.cell;return E(n,function(){return Kn(r(),!0)})},oa=function(e,n,t){return e.concat(B(n,function(){var n=e[e.length-1];return Bc(n,ra(n.cells,n,t))}))},ua=function(n,t,r){return E(n,function(n){var e=ra(B(t,d),n,r);return Bc(n,n.cells.concat(e))})},ia=function(n,e,t){var r=e.colDelta<0?ua:d;return(e.rowDelta<0?oa:d)(r(n,Math.abs(e.colDelta),t),Math.abs(e.rowDelta),t)},ca=function(n,e,t,r,o){for(var u,i,c,a,l,f=n.row,s=n.column,d=f+t.length,m=s+Mc(t[0]),g=f;g<d;g++)for(var p=s;p<m;p++){c=p,a=void 0,a=w(o,Pc((u=e)[i=g],c).element),l=u[i],1<u.length&&1<Mc(l)&&(0<c&&a(kc(l,c-1))||c<l.cells.length-1&&a(kc(l,c+1))||0<i&&a(kc(u[i-1],c))||i<u.length-1&&a(kc(u[i+1],c)))&&Yc(e,kc(e[g],p),o,r.cell);var h=kc(t[g-f],p-s),v=r.replace(h);Ic(e[g],p,Kn(v,!0))}return e},aa=function(t,r,o,u,i){return function(n,e,t){if(n.row>=e.length||n.column>Mc(e[0]))return na.error("invalid start address out of table bounds, row: "+n.row+", column: "+n.column);var r=e.slice(n.row),o=r[0].cells.slice(n.column),u=Mc(t[0]),i=t.length;return na.value({rowDelta:r.length-i,colDelta:o.length-u})}(t,r,o).map(function(n){var e=ia(r,n,u);return ca(t,e,o,u,i)})},la=function(r,n,e,t,o){var u,i,c,a;u=n,i=r,c=o,a=t.cell,0<i&&i<u[0].cells.length&&P(u,function(n){var e=n.cells[i-1],t=n.cells[i];c(t.element,e.element)&&Ic(n,i,Kn(a(),!0))});var l=ta(e,n),f=ia(e,l,t),s=ta(n,f),d=ia(n,s,t);return E(d,function(n,e){var t=n.cells.slice(0,r).concat(f[e].cells).concat(n.cells.slice(r,n.cells.length));return Bc(n,t)})},fa=function(n,e,t,r,o){Jc(e,n,o,r.cell);var u=ea(t,e),i=ia(t,u,r),c=ea(e,i),a=ia(e,c,r),l=Nc(a),f=l.cols,s=l.rows;return f.concat(s.slice(0,n)).concat(i).concat(s.slice(n,s.length))},sa=function(n,t,e,r,o){var u=Nc(n),i=u.rows,c=u.cols,a=i.slice(0,t),l=i.slice(t),f=Ec(i[e],function(n,e){return 0<t&&t<i.length&&r(kc(i[t-1],e),kc(i[t],e))?Pc(i[t],e):Kn(o(n.element,r),!0)});return c.concat(a).concat([f]).concat(l)},da=function(n,v,b,w,y){return E(n,function(n){var e,t,r,o,u,i,c,a,l,f,s,d,m,g,p=0<v&&v<Mc(n)&&w(kc(n,v-1),kc(n,v)),h=(t=v,r=(e=n).section,o=p,u=b,i=w,c=y,"colgroup"!==r&&o?Pc(e,t):Kn(c(kc(e,u),i),!0));return l=v,f=h,s=(a=n).cells,d=s.slice(0,l),m=s.slice(l),g=d.concat([f]).concat(m),Bc(a,g)})},ma=function(n,t,r,o){return E(n,function(n){return Ec(n,function(n){return e=n,I(t,function(n){return r(e.element,n.element)})?Kn(o(n.element,r),!0):n;var e})})},ga=function(n,e,t,r){return kc(n[e],t)!==undefined&&0<e&&r(kc(n[e-1],t),kc(n[e],t))},pa=function(n,e,t){return 0<e&&t(kc(n,e-1),kc(n,e))},ha=function(t,r,o,n){var e=W(t,function(n,e){return ga(t,e,r,o)||pa(n,r,o)?[]:[Pc(n,r)]});return ma(t,e,o,n)},va=function(n,t,r,e){var o=Nc(n).rows,u=o[t],i=W(u.cells,function(n,e){return ga(o,t,e,r)||pa(u,e,r)?[]:[n]});return ma(n,i,r,e)},ba=zu(["cell","row","replace","gap","col","colgroup"]),wa=function(n){return{element:n,colspan:$e(n,"colspan",1),rowspan:$e(n,"rowspan",1)}},ya=function(e,t){void 0===t&&(t=wa),ba(e);var r=uc(x.none()),o=function(n){return function(n){switch(Yn(n.element)){case"col":return e.col(n);default:return e.cell(n)}}(t(n))},u=function(n){var e=o(n);return r.get().isNone()&&r.set(x.some(e)),i=x.some({item:n,replacement:e}),e},i=x.none();return{getOrInit:function(e,t){return i.fold(function(){return u(e)},function(n){return t(e,n.item)?n.replacement:u(e)})},cursor:r.get}},Ca=function(c,a){return function(r){var o=uc(x.none());ba(r);var u=[],i=function(n){var e={scope:c},t=r.replace(n,a,e);return u.push({item:n,sub:t}),o.get().isNone()&&o.set(x.some(t)),t};return{replaceOrInit:function(e,t){return r=e,o=t,j(u,function(n){return o(n.item,r)}).fold(function(){return i(e)},function(n){return t(e,n.item)?n.sub:i(e)});var r,o},cursor:o.get}}},xa=function(t){ba(t);var n=uc(x.none());return{combine:function(e){return n.get().isNone()&&n.set(x.some(e)),function(){var n=t.cell({element:e,colspan:1,rowspan:1});return Ue(n,"width"),Ue(e,"width"),n}},cursor:n.get}},Sa=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],Ta=Lt(),Ra=function(n){return e=n,t=Ta.property().name(e),A(Sa,t);var e,t},Oa=function(n){return e=n,t=Ta.property().name(e),A(["ol","ul"],t);var e,t},Da=function(n){return e=n,A(["br","img","hr","input"],Ta.property().name(e));var e},Aa=function(n){var e,u=function(n){return"br"===Yn(n)},t=function(o){return pr(o).bind(function(t){var r=le(t).map(function(n){return!!Ra(n)||!!Da(n)&&"img"!==Yn(n)}).getOr(!1);return ie(t).map(function(n){return!0===r||("li"===Yn(e=n)||Oe(e,Oa).isSome())||u(t)||Ra(n)&&!Pn(o,n)?[]:[In.fromTag("br")];var e})}).getOr([])},r=0===(e=W(n,function(n){var e=fe(n);return F(e,function(n){return u(n)||ee(n)&&0===_t(n).trim().length})?[]:e.concat(t(n))})).length?[In.fromTag("br")]:e;Bt(n[0]),It(n[0],r)},Ia=function(n){0===tt(n).length&&Et(n)},Ba=function(n,e){return{grid:n,cursor:e}},Ea=function(n,e,t){var r=Nc(n).rows;return Pa(r,e,t).orThunk(function(){return Pa(r,0,0)})},Pa=function(n,e,t){return x.from(n[e]).bind(function(n){return x.from(n.cells[t]).bind(function(n){return x.from(n.element)})})},ka=function(n,e,t){var r=Nc(n).rows;return Ba(n,Pa(r,e,t))},Ma=function(n){return N(n,function(n,e){return I(n,function(n){return n.row===e.row})?n:n.concat([e])},[]).sort(function(n,e){return n.row-e.row})},Na=function(n){return N(n,function(n,e){return I(n,function(n){return n.column===e.column})?n:n.concat([e])},[]).sort(function(n,e){return n.column-e.column})},ja=function(n,e,t){var r,o,u=(r=n,o=t.section,ct(r,function(){return o})),i=mt.generate(u);return Hc(i,e,!0)},_a=function(n,e){var t=k(n,e);return 0===t.length?x.some("td"):t.length===n.length?x.some("th"):x.none()},za=function(n,e,t){var r=mt.generate(e),o=t.getWidths(r,t);cu(r,o,t)},Wa=$c(function(n,e,t,r){var o=e[0].row,u=e[0].row,i=Ma(e),c=N(i,function(n,e){return sa(n,u,o,t,r.getOrInit)},n);return ka(c,u,e[0].column)},Xc,y,y,ya),Fa=$c(function(n,e,t,r){var o=Ma(e),u=o[o.length-1].row,i=o[o.length-1].row+o[o.length-1].rowspan,c=N(o,function(n,e){return sa(n,i,u,t,r.getOrInit)},n);return ka(c,i,e[0].column)},Xc,y,y,ya),La=$c(function(n,e,t,r){var o=Na(e),u=o[0].column,i=o[0].column,c=N(o,function(n,e){return da(n,i,u,t,r.getOrInit)},n);return ka(c,e[0].row,i)},Xc,za,y,ya),Ha=$c(function(n,e,t,r){var o=e[e.length-1].column,u=e[e.length-1].column+e[e.length-1].colspan,i=Na(e),c=N(i,function(n,e){return da(n,u,o,t,r.getOrInit)},n);return ka(c,e[0].row,u)},Xc,za,y,ya),qa=$c(function(n,e,t,r){var o,u,i,c,a=Na(e),l=(o=n,u=a[0].column,i=a[a.length-1].column,c=E(o,function(n){var e=n.cells.slice(0,u).concat(n.cells.slice(i+1));return Xn(e,n.section)}),k(c,function(n){return 0<n.cells.length})),f=Ea(l,e[0].row,e[0].column);return Ba(l,f)},Xc,za,Ia,ya),Va=$c(function(n,e,t,r){var o,u,i,c,a,l=Ma(e),f=(o=n,u=l[0].row,i=l[l.length-1].row,c=Nc(o),a=c.rows,c.cols.concat(a.slice(0,u)).concat(a.slice(i+1))),s=Ea(f,e[0].row,e[0].column);return Ba(f,s)},Xc,y,Ia,ya),Ua=($c(function(n,e,t,r){var o=ha(n,e.column,t,r.replaceOrInit);return ka(o,e.row,e.column)},Gc,y,y,Ca("row","th")),$c(function(n,e,t,r){var o=Na(e),u=N(o,function(n,e){return ha(n,e.column,t,r.replaceOrInit)},n);return ka(u,e[0].row,e[0].column)},Xc,y,y,Ca("row","th"))),$a=($c(function(n,e,t,r){var o=ha(n,e.column,t,r.replaceOrInit);return ka(o,e.row,e.column)},Gc,y,y,Ca(null,"td")),$c(function(n,e,t,r){var o=Na(e),u=N(o,function(n,e){return ha(n,e.column,t,r.replaceOrInit)},n);return ka(u,e[0].row,e[0].column)},Xc,y,y,Ca(null,"td"))),Ga=($c(function(n,e,t,r){var o=va(n,e.row,t,r.replaceOrInit);return ka(o,e.row,e.column)},Gc,y,y,Ca("col","th")),$c(function(n,e,t,r){var o=Ma(e),u=N(o,function(n,e){return va(n,e.row,t,r.replaceOrInit)},n);return ka(u,e[0].row,e[0].column)},Xc,y,y,Ca("col","th")),$c(function(n,e,t,r){var o=va(n,e.row,t,r.replaceOrInit);return ka(o,e.row,e.column)},Gc,y,y,Ca(null,"td")),$c(function(n,e,t,r){var o=Ma(e),u=N(o,function(n,e){return va(n,e.row,t,r.replaceOrInit)},n);return ka(u,e[0].row,e[0].column)},Xc,y,y,Ca(null,"td")),$c(function(n,e,t,r){var o=e.cells;Aa(o);var u=function(n,e,t){var r=Nc(n).rows;if(0===r.length)return n;for(var o=e.startRow;o<=e.finishRow;o++)for(var u=e.startCol;u<=e.finishCol;u++)Ic(r[o],u,Kn(t(),!1));return n}(n,e.bounds,b(o[0]));return Ba(u,x.from(o[0]))},function(n,e){return e.mergable},y,y,xa)),Ka=$c(function(n,e,t,r){var o=M(e,function(n,e){return Yc(n,e,t,r.combine(e))},n);return Ba(o,x.from(e[0]))},function(n,e){return e.unmergable},za,y,xa),Xa=$c(function(n,t,e,r){var o,u,i,c=(o=t.clipboard,u=t.generators,i=mt.fromTable(o),Hc(i,u,!0)),a={row:t.row,column:t.column};return aa(a,n,c,t.generators,e).fold(function(){return Ba(n,x.some(t.element))},function(n){var e=Ea(n,t.row,t.column);return Ba(n,e)})},function(e,t){return et(t.element).bind(function(n){return Uc(e,n).map(function(n){return U(U({},n),{generators:t.generators,clipboard:t.clipboard})})})},za,y,ya),Ya=$c(function(n,e,t,r){var o=Nc(n).rows,u=e.cells[0].column,i=o[e.cells[0].row],c=ja(e.clipboard,e.generators,i),a=la(u,n,c,e.generators,t),l=Ea(a,e.cells[0].row,e.cells[0].column);return Ba(a,l)},Kc,y,y,ya),Ja=$c(function(n,e,t,r){var o=Nc(n).rows,u=e.cells[e.cells.length-1].column+e.cells[e.cells.length-1].colspan,i=o[e.cells[0].row],c=ja(e.clipboard,e.generators,i),a=la(u,n,c,e.generators,t),l=Ea(a,e.cells[0].row,e.cells[0].column);return Ba(a,l)},Kc,y,y,ya),Qa=$c(function(n,e,t,r){var o=Nc(n).rows,u=e.cells[0].row,i=o[u],c=ja(e.clipboard,e.generators,i),a=fa(u,n,c,e.generators,t),l=Ea(a,e.cells[0].row,e.cells[0].column);return Ba(a,l)},Kc,y,y,ya),Za=$c(function(n,e,t,r){var o=Nc(n).rows,u=e.cells[e.cells.length-1].row+e.cells[e.cells.length-1].rowspan,i=o[e.cells[0].row],c=ja(e.clipboard,e.generators,i),a=fa(u,n,c,e.generators,t),l=Ea(a,e.cells[0].row,e.cells[0].column);return Ba(a,l)},Kc,y,y,ya),nl=function(n,e){var u=mt.fromTable(n);return Xc(u,e).bind(function(n){var e=n[n.length-1],t=n[0].column,r=e.column+e.colspan,o=z(E(u.all,function(n){return k(n.cells,function(n){return n.column>=t&&n.column<r})}));return _a(o,function(n){return"th"===Yn(n.element)})}).getOr("")},el=function(n){return Xi(n.parentNode)},tl=function(n,e){var t="thead"===el(e),r=!I(e.cells,function(n){return"th"!==Xi(n)});return t||r?x.some({thead:t,ths:r}):x.none()},rl=function(n,e){return"thead"===(t=tl(0,e).fold(function(){return el(e)},function(n){return"thead"}))?"header":"tfoot"===t?"footer":"body";var t},ol=function(e,n,t){var r,o,u=e.getParent(n,"table"),i=n.parentNode,c=Xi(i);t!==c&&((r=e.select(t,u)[0])||(r=e.create(t),o=u.firstChild,"thead"===t?q(Se(In.fromDom(u),"caption,colgroup")).fold(function(){return u.insertBefore(r,o)},function(n){return e.insertAfter(r,n.dom)}):u.appendChild(r)),"tbody"===t&&"thead"===c&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),i.hasChildNodes()||e.remove(i))},ul=function(n,e,t,r){var o=n.dom,u=function(n,e,t){if(v(t)&&Xi(e)!==t){var r=n.dom.rename(e,t);return Oi(n,r),r}return e}(n,e,t);return m(r)||o.setAttrib(u,"scope",r),u},il=function(e,n,t,r){return P(n,function(n){return ul(e,n,t,r)})},cl=function(n,e,t){var r,o,u,i=n.dom;"header"===t?(o="auto"===(r=Ui(n))?(u=ot(In.fromDom(e.cells[0])).map(ut).getOr([]),V(u,function(n){return tl(0,n.dom)}).map(function(n){return n.thead&&n.ths?"sectionCells":n.thead?"section":"cells"}).getOr("section")):r,il(n,e.cells,"section"===o?"td":"th","col"),ol(i,e,"cells"===o?"tbody":"thead")):(il(n,e.cells,"td",null),ol(i,e,"footer"===t?"tfoot":"tbody"))},al=function(o){return function(n){var e,t=Yn(n),r="col"===t||"colgroup"===t?ot(e=n).bind(function(n){return Zt(n,Nr.firstSelectedSelector)}).fold(function(){return e},function(n){return n[0]}):n;return Be(r,o)}},ll=al("th,td"),fl=al("th,td,caption"),sl=function(n,e){return ll(n).map(function(n){return Er(e)}).getOr([])},dl=function(n,t){var e,r,o,u=ll(n),i=u.bind(function(n){return ot(n)}).map(ut);return r=i,o=function(e,n){return k(n,function(n){return I(Br(n.dom.cells),function(n){return"1"===Me(n,t)||Pn(n,e)})})},((e=u).isSome()&&r.isSome()?x.some(o(e.getOrDie(),r.getOrDie())):x.none()).getOr([])},ml=function(f,n,r){var e=function(n){return"table"===Yn(Yi(n))},s=Ki(f),t=function(i,c,a,l){return function(n,e){ec(n);var t=l(),r=In.fromDom(f.getDoc()),o=Ar(a,r,s),u=dc(f,n);return c(n)?i(t,n,e,o,u).bind(function(n){return P(n.newRows,function(n){Ri(f,n.dom)}),P(n.newCells,function(n){Oi(f,n.dom)}),n.cursor.map(function(n){var e=Oc(Dc,n),t=f.dom.createRng();return t.setStart(e.element.dom,e.offset),t.setEnd(e.element.dom,e.offset),t})}):x.none()}},o=t(Va,function(n){return!1===e(f)||1<Pu(n).rows},y,n),u=t(qa,function(n){return!1===e(f)||1<Pu(n).columns},y,n),i=t(Wa,C,y,n),c=t(Fa,C,y,n),a=t(La,C,Ac,n),l=t(Ha,C,Ac,n),d=t(Ga,C,y,n),m=t(Ka,C,y,n),g=t(Ya,C,y,n),p=t(Ja,C,y,n),h=t(Qa,C,y,n),v=t(Za,C,y,n),b=t(Xa,C,y,n),w=function(n,e){return qn(n,"type").filter(function(n){return A(e,n)})};return{deleteRow:o,deleteColumn:u,insertRowsBefore:i,insertRowsAfter:c,insertColumnsBefore:a,insertColumnsAfter:l,mergeCells:d,unmergeCells:m,pasteColsBefore:g,pasteColsAfter:p,pasteRowsBefore:h,pasteRowsAfter:v,pasteCells:b,setTableCellType:function(t,n){return w(n,["td","th"]).each(function(n){var e=E(sl(oc(t),r),function(n){return n.dom});il(t,e,n,null)})},setTableRowType:function(t,n){return w(n,["header","body","footer"]).each(function(e){E(dl(oc(t),Nr.selected),function(n){return cl(t,n.dom,e)})})},makeColumnsHeader:t(Ua,C,y,n),unmakeColumnsHeader:t($a,C,y,n),getTableRowType:function(n){var e=dl(oc(n),Nr.selected);if(0<e.length){var t=E(e,function(n){return rl(0,n.dom)}),r=A(t,"header"),o=A(t,"footer");if(r||o){var u=A(t,"body");return!r||u||o?r||u||!o?"":"footer":"header"}return"body"}},getTableCellType:function(n){return _a(sl(oc(n),r),function(n){return"th"===Yn(n)}).getOr("")},getTableColType:nl}},gl={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},pl=function(n,e,t,r){for(var o=In.fromTag("tr"),u=0;u<n;u++){var i=r<e||u<t?In.fromTag("th"):In.fromTag("td");u<t&&Pe(i,"scope","row"),r<e&&Pe(i,"scope","col"),Ot(i,In.fromTag("br")),Ot(o,i)}return o},hl=function(n){var e=In.fromTag("colgroup");return B(n,function(){return Ot(e,In.fromTag("col"))}),e},vl=function(n,e,t,r){return B(n,function(n){return pl(e,t,r,n)})},bl=function(n,e){n.selection.select(e.dom,!0),n.selection.collapse(!0)},wl=function(u,i,c,a,l){var o=ji(u),f={styles:o,attributes:Ni(u),colGroups:u.getParam("table_use_colgroups",!1,"boolean")};return u.undoManager.ignore(function(){var n=function(n,e,t,r,o,u){void 0===u&&(u=gl);var i=In.fromTag("table"),c="cells"!==o;Le(i,u.styles),ke(i,u.attributes),u.colGroups&&Ot(i,hl(e));var a,l,f=Math.min(n,t);c&&0<t&&(a=In.fromTag("thead"),Ot(i,a),l=vl(t,e,"sectionCells"===o?f:0,r),It(a,l));var s=In.fromTag("tbody");Ot(i,s);var d=vl(c?n-f:n,e,c?0:t,r);return It(s,d),i}(c,i,l,a,Ui(u),f);Pe(n,"data-mce-id","__mce");var e,t,r,o=(e=n,t=In.fromTag("div"),r=In.fromDom(e.dom.cloneNode(!0)),Ot(t,r),t.dom.innerHTML);u.insertContent(o),u.addVisual()}),Ie(Yi(u),'table[data-mce-id="__mce"]').map(function(n){var e,t,r;return qi(u)?hc(u,n):Vi(u)?vc(n):(Hi(u)||(e=o.width,p(e)&&-1!==e.indexOf("%")))&&pc(u,n),ec(n),je(n,"data-mce-id"),t=u,P(Te(n,"tr"),function(n){Ri(t,n.dom),P(Te(n,"th,td"),function(n){Oi(t,n.dom)})}),r=u,Ie(n,"td,th").each(w(bl,r)),n.dom}).getOr(null)},yl=function(n,e,t,r,o){void 0===r&&(r={});var u=function(n){return T(n)&&0<n};if(u(e)&&u(t)){var i=r.headerRows||0,c=r.headerColumns||0;return wl(n,t,e,c,i)}return console.error(o),null},Cl=function(n){return function(){return n().fold(function(){return[]},function(n){return E(n,function(n){return n.dom})})}},xl=function(t){return function(n){var e=0<n.length?x.some(Br(n)):x.none();t(e)}},Sl=function(n,e,t,r){return{insertTable:(o=n,function(n,e,t){void 0===t&&(t={});var r=yl(o,e,n,t,"Invalid values for insertTable - rows and columns values are required to insert a table.");return o.undoManager.add(),r}),setClipboardRows:xl(e.setRows),getClipboardRows:Cl(e.getRows),setClipboardCols:xl(e.setColumns),getClipboardCols:Cl(e.getColumns),resizeHandler:t,selectionTargets:r};var o},Tl=function(n,e,t){var r=$e(n,e,1);1===t||r<=1?je(n,e):Pe(n,e,Math.min(t,r))},Rl=function(n,e){var i=mt.fromTable(n);return Xc(i,e).map(function(n){var o,u,e=n[n.length-1],t=n[0].column,r=e.column+e.colspan;return $(function(n,t,r){if(mt.hasColumns(n)){var e=k(mt.justColumns(n),function(n){return n.column>=t&&n.column<r}),o=E(e,function(n){var e=wr(n.element);return Tl(e,"span",r-t),e}),u=In.fromTag("colgroup");return It(u,o),[u]}return[]}(i,t,r),(o=t,u=r,E(i.all,function(n){var e=k(n.cells,function(n){return n.column>=o&&n.column<u}),t=E(e,function(n){var e=wr(n.element);return Tl(e,"colspan",u-o),e}),r=In.fromTag("tr");return It(r,t),r})))})},Ol=function(n,e,o){var u=mt.fromTable(n);return Xc(u,e).map(function(n){var e=Hc(u,o,!1),t=Nc(e).rows.slice(n[0].row,n[n.length-1].row+n[n.length-1].rowspan),r=Vc(t,o);return E(r,function(n){var t=br(n.element);return P(n.cells,function(n){var e=wr(n.element);jc(e,"colspan",n.colspan,1),jc(e,"rowspan",n.rowspan,1),Ot(t,e)}),t})})},Dl=tinymce.util.Tools.resolve("tinymce.util.Tools"),Al=function(o,n,u){return function(n,e){for(var t=0;t<e.length;t++){var r=o.getStyle(e[t],u);if(void 0===n&&(n=r),n!==r)return""}return n}(void 0,o.select("td,th",n))},Il=function(n,e,t){t&&n.formatter.apply("align"+t,{},e)},Bl=function(e,t){Dl.each("left center right".split(" "),function(n){e.formatter.remove("align"+n,{},t)})},El=function(n){return Vn(e=n,t="menu")&&e[t]!==undefined&&null!==e[t];var e,t},Pl=function(n,e){return(e||[]).concat(E(n,function(n){var e=n.text||n.title;return El(n)?{text:e,items:Pl(n.menu)}:{text:e,value:n.value}}))},kl=function(e){return function(n){return on(n,"rgb")?e.toHex(n):n}},Ml=function(n,e){var t=In.fromDom(e);return{borderwidth:Ve(t,"border-width").getOr(""),borderstyle:Ve(t,"border-style").getOr(""),bordercolor:Ve(t,"border-color").map(kl(n)).getOr(""),backgroundcolor:Ve(t,"background-color").map(kl(n)).getOr("")}},Nl=function(n){var o=n[0],e=n.slice(1);return P(e,function(n){P(jn(o),function(r){zn(n,function(n,e){var t=o[r];""!==t&&r===e&&t!==n&&(o[r]="")})})}),o},jl=function(n){var e=[{name:"borderstyle",type:"listbox",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:"cell"===n?[{name:"borderwidth",type:"input",label:"Border width"}].concat(e):e}},_l=function(n,e,t,r){return j(n,function(n){return t.formatter.matchNode(r,e+n)}).getOr("")},zl=w(_l,["left","center","right"],"align"),Wl=w(_l,["top","middle","bottom"],"valign"),Fl=function(n,e){var t,r,o,u,i=ji(n),c=Ni(n),a=e?(t=n.dom,{borderstyle:qn(i,"border-style").getOr(""),bordercolor:kl(t)(qn(i,"border-color").getOr("")),backgroundcolor:kl(t)(qn(i,"background-color").getOr(""))}):{};return U(U(U(U(U(U({},{height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,"class":"",align:"",border:""}),i),c),a),(u=i["border-width"],Li(n)&&u?{border:u}:qn(c,"border").fold(function(){return{}},function(n){return{border:n}}))),(r=qn(i,"border-spacing").or(qn(c,"cellspacing")).fold(function(){return{}},function(n){return{cellspacing:n}}),o=qn(i,"border-padding").or(qn(c,"cellpadding")).fold(function(){return{}},function(n){return{cellpadding:n}}),U(U({},r),o)))},Ll=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"listbox",label:"H Align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"V Align",items:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}],Hl=function(n){return Ll.concat((0<(e=Pl(n.getParam("table_cell_class_list",[],"array"))).length?x.some({name:"class",type:"listbox",label:"Class",items:e}):x.none()).toArray());var e},ql=function(u){return function(t,r){var o=t.dom;return{setAttrib:function(n,e){u&&!e||o.setAttrib(r,n,e)},setStyle:function(n,e){u&&!e||o.setStyle(r,n,e)},setFormat:function(n,e){u&&!e||(""===e?t.formatter.remove(n,{value:null},r,!0):t.formatter.apply(n,{value:e},r))}}}},Vl={normal:ql(!1),ifTruthy:ql(!0)},Ul=function(o){return ot(o[0]).map(function(n){var e=mt.fromTable(n),t=mt.justCells(e),r=k(t,function(e){return I(o,function(n){return Pn(e.element,n)})});return E(r,function(n){return{element:n.element.dom,column:mt.getColumnAt(e,n.column).map(function(n){return n.element.dom})}})})},$l=function(g,n,p){var e,h=1===n.length;1<=n.length&&(e=ot(n[0]),Ul(n).each(function(n){P(n,function(n){var e,t,r,o,u,i,c,a,l,f,s=ul(g,n.element,p.celltype),d=h?Vl.normal(g,s):Vl.ifTruthy(g,s),m=n.column.map(function(n){return h?Vl.normal(g,n):Vl.ifTruthy(g,n)}).getOr(d);t=m,r=p,(e=d).setAttrib("scope",r.scope),e.setAttrib("class",r["class"]),e.setStyle("height",nc(r.height)),t.setStyle("width",nc(r.width)),zi(g)&&(u=p,(o=d).setFormat("tablecellbackgroundcolor",u.backgroundcolor),o.setFormat("tablecellbordercolor",u.bordercolor),o.setFormat("tablecellborderstyle",u.borderstyle),o.setFormat("tablecellborderwidth",nc(u.borderwidth))),h&&(Bl(g,s),i=g,c=s,Dl.each("top middle bottom".split(" "),function(n){i.formatter.remove("valign"+n,{},c)})),p.halign&&Il(g,s,p.halign),p.valign&&(a=g,l=s,(f=p.valign)&&a.formatter.apply("valign"+f,{},l))})}),e.each(function(n){return Ii(g,n.dom)}))},Gl=function(n,e,t){var r=t.getData();t.close(),n.undoManager.transact(function(){$l(n,e,r),n.focus()})},Kl=function(a,n){var e=Ul(n).map(function(n){return E(n,function(n){return e=a,t=n.element,r=zi(a),o=n.column,u=e.dom,i=o.getOr(t),U({width:(c=function(n,e){return u.getStyle(n,e)||u.getAttrib(n,e)})(i,"width"),height:c(t,"height"),scope:u.getAttrib(t,"scope"),celltype:Xi(t),"class":u.getAttrib(t,"class",""),halign:zl(e,t),valign:Wl(e,t)},r?Ml(u,t):{});var e,t,r,o,u,i,c})});return Nl(e.getOrDie())},Xl=function(n,e){var t,r,o,u=sl(oc(n),e);0!==u.length&&(t=Kl(n,u),r={type:"tabpanel",tabs:[{title:"General",name:"general",items:Hl(n)},jl("cell")]},o={type:"panel",items:[{type:"grid",columns:2,items:Hl(n)}]},n.windowManager.open({title:"Cell Properties",size:"normal",body:zi(n)?r:o,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:t,onSubmit:w(Gl,n,u)}))},Yl=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],Jl=function(n){return Yl.concat((0<(e=Pl(n.getParam("table_row_class_list",[],"array"))).length?x.some({name:"class",type:"listbox",label:"Class",items:e}):x.none()).toArray());var e},Ql=function(i,n,c,a){var l=1===n.length;P(n,function(n){a.type!==Xi(n.parentNode)&&cl(i,n,a.type);var e,t,r,o,u=l?Vl.normal(i,n):Vl.ifTruthy(i,n);t=a,(e=u).setAttrib("scope",t.scope),e.setAttrib("class",t["class"]),e.setStyle("height",nc(t.height)),Wi(i)&&(o=a,(r=u).setStyle("background-color",o.backgroundcolor),r.setStyle("border-color",o.bordercolor),r.setStyle("border-style",o.borderstyle)),a.align!==c.align&&(Bl(i,n),Il(i,n,a.align))}),ot(In.fromDom(n[0])).each(function(n){return Ii(i,n.dom)})},Zl=function(n,e,t,r){var o=r.getData();r.close(),n.undoManager.transact(function(){Ql(n,e,t,o),n.focus()})},nf=function(u){var n,e,t,r,o=dl(oc(u),Nr.selected);0!==o.length&&(n=E(o,function(n){return e=u,t=n.dom,r=Wi(u),o=e.dom,U({height:o.getStyle(t,"height")||o.getAttrib(t,"height"),scope:o.getAttrib(t,"scope"),"class":o.getAttrib(t,"class",""),type:rl(0,t),align:zl(e,t)},r?Ml(o,t):{});var e,t,r,o}),e=Nl(n),t={type:"tabpanel",tabs:[{title:"General",name:"general",items:Jl(u)},jl("row")]},r={type:"panel",items:[{type:"grid",columns:2,items:Jl(u)}]},u.windowManager.open({title:"Row Properties",size:"normal",body:Wi(u)?t:r,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:e,onSubmit:w(Zl,u,E(o,function(n){return n.dom}),e)}))},ef=tinymce.util.Tools.resolve("tinymce.Env"),tf=function(n,e,t,r){if("TD"===e.tagName||"TH"===e.tagName)p(t)?n.setStyle(e,t,r):n.setStyle(e,t);else if(e.children)for(var o=0;o<e.children.length;o++)tf(n,e.children[o],t,r)},rf=function(t,r,n){var o,u=t.dom,i=n.getData();n.close(),""===i["class"]&&delete i["class"],t.undoManager.transact(function(){var n,e;r||(n=parseInt(i.cols,10)||1,e=parseInt(i.rows,10)||1,r=wl(t,n,e,0,0)),function(n,e,t){var r,o=n.dom,u={},i={};if(u["class"]=t["class"],i.height=nc(t.height),o.getAttrib(e,"width")&&!Li(n)?u.width=(r=t.width)?r.replace(/px$/,""):"":i.width=nc(t.width),Li(n)?(i["border-width"]=nc(t.border),i["border-spacing"]=nc(t.cellspacing)):(u.border=t.border,u.cellpadding=t.cellpadding,u.cellspacing=t.cellspacing),Li(n)&&e.children)for(var c=0;c<e.children.length;c++)tf(o,e.children[c],{"border-width":nc(t.border),padding:nc(t.cellpadding)}),Fi(n)&&tf(o,e.children[c],{"border-color":t.bordercolor});Fi(n)&&(i["background-color"]=t.backgroundcolor,i["border-color"]=t.bordercolor,i["border-style"]=t.borderstyle),u.style=o.serializeStyle(U(U({},ji(n)),i)),o.setAttribs(e,U(U({},Ni(n)),u)),Ii(n,e)}(t,r,i),(o=u.select("caption",r)[0])&&!i.caption&&u.remove(o),!o&&i.caption&&((o=u.create("caption")).innerHTML=ef.ie?"\xa0":'<br data-mce-bogus="1"/>',r.insertBefore(o,r.firstChild)),""===i.align?Bl(t,r):Il(t,r,i.align),t.focus(),t.addVisual()})},of=function(n,e){var t,r,o,u,i,c,a,l,f=n.dom,s=Fl(n,Fi(n));!1===e?(t=f.getParent(n.selection.getStart(),"table"))?(o=t,u=Fi(r=n),l=r.dom,s=U({width:l.getStyle(o,"width")||l.getAttrib(o,"width"),height:l.getStyle(o,"height")||l.getAttrib(o,"height"),cellspacing:l.getStyle(o,"border-spacing")||l.getAttrib(o,"cellspacing"),cellpadding:l.getAttrib(o,"cellpadding")||Al(r.dom,o,"padding"),border:(i=l,c=o,a=Ve(In.fromDom(c),"border-width"),Li(r)&&a.isSome()?a.getOr(""):i.getAttrib(c,"border")||Al(r.dom,c,"border-width")||Al(r.dom,c,"border")),caption:!!l.select("caption",o)[0],"class":l.getAttrib(o,"class",""),align:zl(r,o)},u?Ml(l,o):{})):Fi(n)&&(s.borderstyle="",s.bordercolor="",s.backgroundcolor=""):(s.cols="1",s.rows="1",Fi(n)&&(s.borderstyle="",s.bordercolor="",s.backgroundcolor=""));var d=Pl(n.getParam("table_class_list",[],"array"));0<d.length&&s["class"]&&(s["class"]=s["class"].replace(/\s*mce\-item\-table\s*/g,""));var m,g,p,h,v={type:"grid",columns:2,items:(m=d,g=e?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],p=n.getParam("table_appearance_options",!0,"boolean")?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],h=0<m.length?[{type:"listbox",name:"class",label:"Class",items:m}]:[],g.concat([{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}]).concat(p).concat([{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]).concat(h))},b=Fi(n)?{type:"tabpanel",tabs:[{title:"General",name:"general",items:[v]},jl("table")]}:{type:"panel",items:[v]};n.windowManager.open({title:"Table Properties",size:"normal",body:b,onSubmit:w(rf,n,t),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:s})},uf=function(n){return fl(oc(n))},cf=function(n){return ll(oc(n))},af=function(c,r,t,a,e){var o=Zi(c),l=function(n){return ot(n,o)},f=function(e){return function(n){c.selection.setRng(n),c.focus(),t.clear(e),ec(e),Ii(c,e.dom)}},u=function(r){return cf(c).each(function(t){l(t).each(function(n){var e=_r(a,n,t);r(n,e).each(f(n))})})},i=function(){return cf(c).map(function(r){return l(r).bind(function(n){var e=_r(a,n,r),t=Ar(y,In.fromDom(c.getDoc()),x.none());return Ol(n,e,t)})})},s=function(){return cf(c).map(function(t){return l(t).bind(function(n){var e=_r(a,n,t);return Rl(n,e)})})},d=function(i,n){return n().each(function(n){var u=E(n,wr);cf(c).each(function(n){return l(n).each(function(n){var e,t,r=Ir(In.fromDom(c.getDoc())),o=(e=u,t=r,{selection:Er(a),clipboard:e,generators:t});i(n,o).each(f(n))})})})};zn({mceTableSplitCells:function(){return u(r.unmergeCells)},mceTableMergeCells:function(){return u(r.mergeCells)},mceTableInsertRowBefore:function(){return u(r.insertRowsBefore)},mceTableInsertRowAfter:function(){return u(r.insertRowsAfter)},mceTableInsertColBefore:function(){return u(r.insertColumnsBefore)},mceTableInsertColAfter:function(){return u(r.insertColumnsAfter)},mceTableDeleteCol:function(){return u(r.deleteColumn)},mceTableDeleteRow:function(){return u(r.deleteRow)},mceTableCutCol:function(n){return s().each(function(n){e.setColumns(n),u(r.deleteColumn)})},mceTableCutRow:function(n){return i().each(function(n){e.setRows(n),u(r.deleteRow)})},mceTableCopyCol:function(n){return s().each(function(n){return e.setColumns(n)})},mceTableCopyRow:function(n){return i().each(function(n){return e.setRows(n)})},mceTablePasteColBefore:function(n){return d(r.pasteColsBefore,e.getColumns)},mceTablePasteColAfter:function(n){return d(r.pasteColsAfter,e.getColumns)},mceTablePasteRowBefore:function(n){return d(r.pasteRowsBefore,e.getRows)},mceTablePasteRowAfter:function(n){return d(r.pasteRowsAfter,e.getRows)},mceTableDelete:function(){return uf(c).each(function(n){ot(n,o).filter(g(o)).each(function(n){var e,t=In.fromText("");Tt(n,t),Et(n),c.dom.isEmpty(c.getBody())?(c.setContent(""),c.selection.setCursorLocation()):((e=c.dom.createRng()).setStart(t.dom,0),e.setEnd(t.dom,0),c.selection.setRng(e),c.nodeChanged())})})},mceTableSizingMode:function(n,e){return t=e,uf(c).each(function(n){Vi(c)||qi(c)||Hi(c)||ot(n,o).each(function(n){"relative"!==t||Au(n)?"fixed"!==t||Iu(n)?"responsive"!==t||Bu(n)||vc(n):hc(c,n):pc(c,n),ec(n),Ii(c,n.dom)})});var t}},function(n,e){return c.addCommand(e,n)});var m=function(e,n){n.each(function(n){Ii(e,n.dom)})};zn({mceTableCellType:function(n,e){var t=ot(oc(c),o);r.setTableCellType(c,e),m(c,t)},mceTableRowType:function(n,e){var t=ot(oc(c),o);r.setTableRowType(c,e),m(c,t)}},function(n,e){return c.addCommand(e,n)}),c.addCommand("mceTableColType",function(n,e){return qn(e,"type").each(function(n){return u("th"===n?r.makeColumnsHeader:r.unmakeColumnsHeader)})}),zn({mceTableProps:w(of,c,!1),mceTableRowProps:w(nf,c),mceTableCellProps:w(Xl,c,a)},function(n,e){return c.addCommand(e,function(){return n()})}),c.addCommand("mceInsertTable",function(n,e){h(e)&&0<jn(e).length?yl(c,e.rows,e.columns,e.options,"Invalid values for mceInsertTable - rows and columns values are required to insert a table."):of(c,!0)}),c.addCommand("mceTableApplyCellStyle",function(n,e){var r,t,o=function(n){return"tablecell"+n.toLowerCase().replace("-","")};!h(e)||0!==(r=sl(oc(c),a)).length&&(function(n){for(var e in n)if(_n.call(n,e))return!1;return!0}(t=Ln(e,function(n,e){return c.formatter.has(o(e))&&p(n)}))||(zn(t,function(e,t){P(r,function(n){Vl.normal(c,n.dom).setFormat(o(t),e)})}),l(r[0]).each(function(n){return Ii(c,n.dom,{structure:!1,style:!0})})))})},lf=function(t,r,o){var n=Zi(t);zn({mceTableRowType:function(){return r.getTableRowType(t)},mceTableCellType:function(){return r.getTableCellType(t)},mceTableColType:function(){return ll(oc(t)).bind(function(t){return ot(t,n).map(function(n){var e=_r(o,n,t);return r.getTableColType(n,e)})}).getOr("")}},function(n,e){return t.addQueryValueHandler(e,n)})},ff=function(){var e=uc(x.none()),t=uc(x.none()),r=function(n){n.set(x.none())};return{getRows:e.get,setRows:function(n){e.set(n),r(t)},clearRows:function(){return r(e)},getColumns:t.get,setColumns:function(n){t.set(n),r(e)},clearColumns:function(){return r(t)}}},sf={tablecellbackgroundcolor:{selector:"td,th",styles:{backgroundColor:"%value"},remove_similar:!0},tablecellbordercolor:{selector:"td,th",styles:{borderColor:"%value"},remove_similar:!0},tablecellborderstyle:{selector:"td,th",styles:{borderStyle:"%value"},remove_similar:!0},tablecellborderwidth:{selector:"td,th",styles:{borderWidth:"%value"},remove_similar:!0}},df=function(n){n.formatter.register(sf)},mf=er([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),gf=U(U({},mf),{none:function(n){return void 0===n&&(n=undefined),mf.none(n)}}),pf=function(t,n){return ot(t,n).bind(function(n){var e=tt(n);return _(e,function(n){return Pn(t,n)}).map(function(n){return{index:n,all:e}})})},hf=function(n,e,t,r){return{start:n,soffset:e,finish:t,foffset:r}},vf=er([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),bf={before:vf.before,on:vf.on,after:vf.after,cata:function(n,e,t,r){return n.fold(e,t,r)},getStart:function(n){return n.fold(d,d,d)}},wf=er([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),yf={domRange:wf.domRange,relative:wf.relative,exact:wf.exact,exactFromRange:function(n){return wf.exact(n.start,n.soffset,n.finish,n.foffset)},getWin:function(n){var e,t=n.match({domRange:function(n){return In.fromDom(n.startContainer)},relative:function(n,e){return bf.getStart(n)},exact:function(n,e,t,r){return n}});return e=t,In.fromDom(ue(e).dom.defaultView)},range:hf},Cf=function(n,e){return n.selectNodeContents(e.dom)},xf=function(n,e,t){var r,o,u=n.document.createRange();return r=u,e.fold(function(n){r.setStartBefore(n.dom)},function(n,e){r.setStart(n.dom,e)},function(n){r.setStartAfter(n.dom)}),o=u,t.fold(function(n){o.setEndBefore(n.dom)},function(n,e){o.setEnd(n.dom,e)},function(n){o.setEndAfter(n.dom)}),u},Sf=function(n,e,t,r,o){var u=n.document.createRange();return u.setStart(e.dom,t),u.setEnd(r.dom,o),u},Tf=function(n){return{left:n.left,top:n.top,right:n.right,bottom:n.bottom,width:n.width,height:n.height}},Rf=er([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Of=function(n,e,t){return e(In.fromDom(t.startContainer),t.startOffset,In.fromDom(t.endContainer),t.endOffset)},Df=function(n,e){var o,t,r,u=(o=n,e.match({domRange:function(n){return{ltr:b(n),rtl:x.none}},relative:function(n,e){return{ltr:K(function(){return xf(o,n,e)}),rtl:K(function(){return x.some(xf(o,e,n))})}},exact:function(n,e,t,r){return{ltr:K(function(){return Sf(o,n,e,t,r)}),rtl:K(function(){return x.some(Sf(o,t,r,n,e))})}}}));return(r=(t=u).ltr()).collapsed?t.rtl().filter(function(n){return!1===n.collapsed}).map(function(n){return Rf.rtl(In.fromDom(n.endContainer),n.endOffset,In.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return Of(0,Rf.ltr,r)}):Of(0,Rf.ltr,r)},Af=function(u,n){return Df(u,n).match({ltr:function(n,e,t,r){var o=u.document.createRange();return o.setStart(n.dom,e),o.setEnd(t.dom,r),o},rtl:function(n,e,t,r){var o=u.document.createRange();return o.setStart(t.dom,r),o.setEnd(n.dom,e),o}})},If=(Rf.ltr,Rf.rtl,function(n,e,t){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom}),Bf=function(t,r,n,e,o){var u=function(n){var e=t.dom.createRange();return e.setStart(r.dom,n),e.collapse(!0),e},i=_t(r).length,c=function(n,e,t,r,o){if(0===o)return 0;if(e===r)return o-1;for(var u=r,i=1;i<o;i++){var c=n(i),a=Math.abs(e-c.left);if(t<=c.bottom){if(t<c.top||u<a)return i-1;u=a}}return 0}(function(n){return u(n).getBoundingClientRect()},n,e,o.right,i);return u(c)},Ef=function(n,e,t,r){return ee(e)?function(e,t,r,o){var n=e.dom.createRange();n.selectNode(t.dom);var u=n.getClientRects();return V(u,function(n){return If(n,r,o)?x.some(n):x.none()}).map(function(n){return Bf(e,t,r,o,n)})}(n,e,t,r):(u=e,i=t,c=r,a=(o=n).dom.createRange(),l=fe(u),V(l,function(n){return a.selectNode(n.dom),If(a.getBoundingClientRect(),i,c)?Ef(o,n,i,c):x.none()}));var o,u,i,c,a,l},Pf=function(n,e){return e-n.left<n.right-e},kf=function(n,e,t){var r=n.dom.createRange();return r.selectNode(e.dom),r.collapse(t),r},Mf=function(e,n,t){var r=e.dom.createRange();r.selectNode(n.dom);var o=r.getBoundingClientRect(),u=Pf(o,t);return(!0===u?gr:pr)(n).map(function(n){return kf(e,n,u)})},Nf=function(n,e,t){var r=e.dom.getBoundingClientRect(),o=Pf(r,t);return x.some(kf(n,e,o))},jf=function(t,n,e){return x.from(t.dom.caretPositionFromPoint(n,e)).bind(function(n){if(null===n.offsetNode)return x.none();var e=t.dom.createRange();return e.setStart(n.offsetNode,n.offset),e.collapse(),x.some(e)})},_f=function(n,e,t){return x.from(n.dom.caretRangeFromPoint(e,t))},zf=function(n,e,t,r){var o=n.dom.createRange();o.selectNode(e.dom);var u=o.getBoundingClientRect();return function(n,e,t,r){var o=n.dom.createRange();o.selectNode(e.dom);var u=o.getBoundingClientRect(),i=Math.max(u.left,Math.min(u.right,t)),c=Math.max(u.top,Math.min(u.bottom,r));return Ef(n,e,i,c)}(n,e,Math.max(u.left,Math.min(u.right,t)),Math.max(u.top,Math.min(u.bottom,r)))},Wf=function(o,u,e){return In.fromPoint(o,u,e).bind(function(r){var n=function(){return n=o,t=u,(0===fe(e=r).length?Nf:Mf)(n,e,t);var n,e,t};return 0===fe(r).length?n():zf(o,r,u,e).orThunk(n)})},Ff=document.caretPositionFromPoint?jf:document.caretRangeFromPoint?_f:Wf,Lf=function(n,e){var t=Yn(n);return"input"===t?bf.after(n):A(["br","img"],t)?0===e?bf.before(n):bf.after(n):bf.on(n,e)},Hf=function(n,e){var t=n.fold(bf.before,Lf,bf.after),r=e.fold(bf.before,Lf,bf.after);return yf.relative(t,r)},qf=function(n,e,t,r){var o=Lf(n,e),u=Lf(t,r);return yf.relative(o,u)},Vf=function(n,e,t,r){var o,u,i,c,a,l=(u=e,i=t,c=r,(a=oe(o=n).dom.createRange()).setStart(o.dom,u),a.setEnd(i.dom,c),a),f=Pn(n,t)&&e===r;return l.collapsed&&!f},Uf=function(n){return x.from(n.getSelection())},$f=function(n,e){Uf(n).each(function(n){n.removeAllRanges(),n.addRange(e)})},Gf=function(n,e,t,r,o){var u=Sf(n,e,t,r,o);$f(n,u)},Kf=function(s,n){return Df(s,n).match({ltr:function(n,e,t,r){Gf(s,n,e,t,r)},rtl:function(c,a,l,f){Uf(s).each(function(n){if(n.setBaseAndExtent)n.setBaseAndExtent(c.dom,a,l.dom,f);else if(n.extend)try{t=c,r=a,o=l,u=f,(e=n).collapse(t.dom,r),e.extend(o.dom,u)}catch(i){Gf(s,l,f,c,a)}else Gf(s,l,f,c,a);var e,t,r,o,u})}})},Xf=function(n,e,t,r,o){var u=qf(e,t,r,o);Kf(n,u)},Yf=function(n,e,t){var r=Hf(e,t);Kf(n,r)},Jf=function(n){var o=yf.getWin(n).dom,e=function(n,e,t,r){return Sf(o,n,e,t,r)},t=n.match({domRange:function(n){var e=In.fromDom(n.startContainer),t=In.fromDom(n.endContainer);return qf(e,n.startOffset,t,n.endOffset)},relative:Hf,exact:qf});return Df(o,t).match({ltr:e,rtl:e})},Qf=function(n){if(0<n.rangeCount){var e=n.getRangeAt(0),t=n.getRangeAt(n.rangeCount-1);return x.some(hf(In.fromDom(e.startContainer),e.startOffset,In.fromDom(t.endContainer),t.endOffset))}return x.none()},Zf=function(n){if(null===n.anchorNode||null===n.focusNode)return Qf(n);var e=In.fromDom(n.anchorNode),t=In.fromDom(n.focusNode);return Vf(e,n.anchorOffset,t,n.focusOffset)?x.some(hf(e,n.anchorOffset,t,n.focusOffset)):Qf(n)},ns=function(n,e){var t,r,o=(t=e,r=n.document.createRange(),Cf(r,t),r);$f(n,o)},es=function(n){return Uf(n).filter(function(n){return 0<n.rangeCount}).bind(Zf).map(function(n){return yf.exact(n.start,n.soffset,n.finish,n.foffset)})},ts=function(n,e){var t,r,o,u=Af(n,e);return r=(t=u).getClientRects(),0<(o=0<r.length?r[0]:t.getBoundingClientRect()).width||0<o.height?x.some(o).map(Tf):x.none()},rs=function(n,e,t){return r=n,o=e,u=t,i=In.fromDom(r.document),Ff(i,o,u).map(function(n){return hf(In.fromDom(n.startContainer),n.startOffset,In.fromDom(n.endContainer),n.endOffset)});var r,o,u,i},os=tinymce.util.Tools.resolve("tinymce.util.VK"),us=function(n,e,t,r){return as(n,e,pf(o=t,u).fold(function(){return gf.none(o)},function(n){return n.index+1<n.all.length?gf.middle(o,n.all[n.index+1]):gf.last(o)}),r);var o,u},is=function(n,e,t,r){return as(n,e,pf(o=t,u).fold(function(){return gf.none()},function(n){return 0<=n.index-1?gf.middle(o,n.all[n.index-1]):gf.first(o)}),r);var o,u},cs=function(n,e){var t=yf.exact(e,0,e,0);return Jf(t)},as=function(o,n,e,u){return e.fold(x.none,x.none,function(n,e){return gr(e).map(function(n){return cs(0,n)})},function(r){return ot(r,n).bind(function(n){var e,t=jr(r);return o.undoManager.transact(function(){u.insertRowsAfter(n,t)}),e=Te(n,"tr"),q(e).bind(function(n){return Ie(n,"td,th").map(function(n){return cs(0,n)})})})})},ls=["table","li","dl"],fs=function(e,t,r){var o,u,n,i;e.keyCode===os.TAB&&(o=Yi(t),u=function(n){var e=Yn(n);return Pn(n,o)||A(ls,e)},(n=t.selection.getRng()).collapsed&&(i=In.fromDom(n.startContainer),et(i,u).each(function(n){e.preventDefault(),(e.shiftKey?is:us)(t,u,n,r).each(function(n){t.selection.setRng(n)})})))},ss=function(n,e){return{selection:n,kill:e}},ds=function(n,e,t,r){return{start:bf.on(n,e),finish:bf.on(t,r)}},ms=function(n,e){var t=Af(n,e);return hf(In.fromDom(t.startContainer),t.startOffset,In.fromDom(t.endContainer),t.endOffset)},gs=ds,ps=function(t,n,r,e,o){return Pn(r,e)?x.none():Xt(r,e,n).bind(function(n){var e=n.boxes.getOr([]);return 0<e.length?(o(t,e,n.start,n.finish),x.some(ss(x.some(gs(r,0,r,sr(r))),!0))):x.none()})},hs=function(n,e){return{item:n,mode:e}},vs=function(n,e,t,r){return void 0===r&&(r=bs),n.property().parent(e).map(function(n){return hs(n,r)})},bs=function(n,e,t,r){return void 0===r&&(r=ws),t.sibling(n,e).map(function(n){return hs(n,r)})},ws=function(n,e,t,r){void 0===r&&(r=ws);var o=n.property().children(e);return t.first(o).map(function(n){return hs(n,r)})},ys=[{current:vs,next:bs,fallback:x.none()},{current:bs,next:ws,fallback:x.some(vs)},{current:ws,next:ws,fallback:x.some(bs)}],Cs=function(e,t,r,o,n){return void 0===n&&(n=ys),j(n,function(n){return n.current===r}).bind(function(n){return n.current(e,t,o,n.next).orThunk(function(){return n.fallback.bind(function(n){return Cs(e,t,n,o)})})})},xs=function(){return{sibling:function(n,e){return n.query().prevSibling(e)},first:function(n){return 0<n.length?x.some(n[n.length-1]):x.none()}}},Ss=function(){return{sibling:function(n,e){return n.query().nextSibling(e)},first:function(n){return 0<n.length?x.some(n[0]):x.none()}}},Ts=function(e,n,t,r,o,u){return Cs(e,n,r,o).bind(function(n){return u(n.item)?x.none():t(n.item)?x.some(n.item):Ts(e,n.item,t,n.mode,o,u)})},Rs=function(e){return function(n){return 0===e.property().children(n).length}},Os=function(n,e,t,r){return Ts(n,e,t,bs,xs(),r)},Ds=function(n,e,t,r){return Ts(n,e,t,bs,Ss(),r)},As=Lt(),Is=function(n,e){return Os(t=As,n,Rs(t),e);var t},Bs=function(n,e){return Ds(t=As,n,Rs(t),e);var t},Es=er([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),Ps=function(n){return Be(n,"tr")},ks=U(U({},Es),{verify:function(c,n,e,t,r,a,o){return Be(t,"td,th",o).bind(function(i){return Be(n,"td,th",o).map(function(u){return Pn(i,u)?Pn(t,i)&&sr(i)===r?a(u):Es.none("in same cell"):Gt(Ps,[i,u]).fold(function(){return e=u,t=i,r=(n=c).getRect(e),(o=n.getRect(t)).right>r.left&&o.left<r.right?Es.success():a(u);var n,e,t,r,o},function(n){return a(u)})})}).getOr(Es.none("default"))},cata:function(n,e,t,r,o){return n.fold(e,t,r,o)}}),Ms=function(n,e){return _(n,w(Pn,e))},Ns=function(n){return"br"===Yn(n)},js=function(n,e,t){return e(n,t).bind(function(n){return ee(n)&&0===_t(n).trim().length?js(n,e,t):x.some(n)})},_s=function(e,n,t,r){return se(o=n,u=t).filter(Ns).orThunk(function(){return se(o,u-1).filter(Ns)}).bind(function(n){return r.traverse(n).fold(function(){return js(n,r.gather,e).map(r.relative)},function(n){return ie(r=n).bind(function(e){var t=fe(e);return Ms(t,r).map(function(n){return{parent:e,children:t,element:r,index:n}})}).map(function(n){return bf.on(n.parent,n.index)});var r})});var o,u},zs=function(n,e,t,r){var o,u,i;return(Ns(e)?(o=n,u=e,(i=r).traverse(u).orThunk(function(){return js(u,i.gather,o)}).map(i.relative)):_s(n,e,t,r)).map(function(n){return{start:n,finish:n}})},Ws=function(n,e){return{left:n.left,top:n.top+e,right:n.right,bottom:n.bottom+e}},Fs=function(n,e){return{left:n.left,top:n.top-e,right:n.right,bottom:n.bottom-e}},Ls=function(n,e,t){return{left:n.left+e,top:n.top+t,right:n.right+e,bottom:n.bottom+t}},Hs=function(n){return{left:n.left,top:n.top,right:n.right,bottom:n.bottom}},qs=function(n,e){return x.some(n.getRect(e))},Vs=function(n,e,t){return ne(e)?qs(n,e).map(Hs):ee(e)?(r=n,o=e,(0<=(u=t)&&u<sr(o)?r.getRangedRect(o,u,o,u+1):0<u?r.getRangedRect(o,u-1,o,u):x.none()).map(Hs)):x.none();var r,o,u},Us=function(n,e){return ne(e)?qs(n,e).map(Hs):ee(e)?n.getRangedRect(e,0,e,sr(e)).map(Hs):x.none()},$s=er([{none:[]},{retry:["caret"]}]),Gs=function(e,n,r){return Re(function(n,e){return e(n)},Oe,n,Ra,t).fold(f,function(n){return Us(e,n).exists(function(n){return t=n,(e=r).left<t.left||Math.abs(t.right-e.left)<1||e.left>t.right;var e,t})});var t},Ks={point:function(n){return n.bottom},adjuster:function(n,e,t,r,o){var u=Ws(o,5);return Math.abs(t.bottom-r.bottom)<1||t.top>o.bottom?$s.retry(u):t.top===o.bottom?$s.retry(Ws(o,1)):Gs(n,e,o)?$s.retry(Ls(u,5,0)):$s.none()},move:Ws,gather:Bs},Xs=function(t,r,o,u,i){return 0===i?x.some(u):(a=t,l=u.left,f=r.point(u),a.elementFromPoint(l,f).filter(function(n){return"table"===Yn(n)}).isSome()?(e=u,c=i-1,Xs(t,n=r,o,n.move(e,5),c)):t.situsFromPoint(u.left,r.point(u)).bind(function(n){return n.start.fold(x.none,function(e){return Us(t,e).bind(function(n){return r.adjuster(t,e,n,o,u).fold(x.none,function(n){return Xs(t,r,o,n,i-1)})}).orThunk(function(){return x.some(u)})},x.none)}));var n,e,c,a,l,f},Ys=function(e,t,n){var r,o,u,i=e.move(n,5),c=Xs(t,e,n,i,100).getOr(i);return o=c,u=t,((r=e).point(o)>u.getInnerHeight()?x.some(r.point(o)-u.getInnerHeight()):r.point(o)<0?x.some(-r.point(o)):x.none()).fold(function(){return t.situsFromPoint(c.left,e.point(c))},function(n){return t.scrollBy(0,n),t.situsFromPoint(c.left,e.point(c)-n)})},Js={tryUp:w(Ys,{point:function(n){return n.top},adjuster:function(n,e,t,r,o){var u=Fs(o,5);return Math.abs(t.top-r.top)<1||t.bottom<o.top?$s.retry(u):t.bottom===o.top?$s.retry(Fs(o,1)):Gs(n,e,o)?$s.retry(Ls(u,5,0)):$s.none()},move:Fs,gather:Is}),tryDown:w(Ys,Ks),ieTryUp:function(n,e){return n.situsFromPoint(e.left,e.top-5)},ieTryDown:function(n,e){return n.situsFromPoint(e.left,e.bottom+5)},getJumpSize:b(5)},Qs=function(u,i,c){return u.getSelection().bind(function(o){return zs(i,o.finish,o.foffset,c).fold(function(){return x.some(xc(o.finish,o.foffset))},function(n){var e,t=u.fromSitus(n),r=ks.verify(u,o.finish,o.foffset,t.finish,t.foffset,c.failure,i);return e=r,ks.cata(e,function(n){return x.none()},function(){return x.none()},function(n){return x.some(xc(n,0))},function(n){return x.some(xc(n,sr(n)))})})})},Zs=function(r,o,u,i,c,a){return 0===a?x.none():td(r,o,u,i,c).bind(function(n){var e=r.fromSitus(n),t=ks.verify(r,u,i,e.finish,e.foffset,c.failure,o);return ks.cata(t,function(){return x.none()},function(){return x.some(n)},function(n){return Pn(u,n)&&0===i?nd(r,u,i,Fs,c):Zs(r,o,n,0,c,a-1)},function(n){return Pn(u,n)&&i===sr(n)?nd(r,u,i,Ws,c):Zs(r,o,n,sr(n),c,a-1)})})},nd=function(e,n,t,r,o){return Vs(e,n,t).bind(function(n){return ed(e,o,r(n,Js.getJumpSize()))})},ed=function(n,e,t){var r=Dn().browser;return r.isChrome()||r.isSafari()||r.isFirefox()||r.isEdge()?e.otherRetry(n,t):r.isIE()?e.ieRetry(n,t):x.none()},td=function(e,n,t,r,o){return Vs(e,t,r).bind(function(n){return ed(e,o,n)})},rd=function(n,e){return Oe(n,function(n){return ie(n).exists(function(n){return Pn(n,e)})},t).isSome();var t},od=function(u,i,c,n,a){return Be(n,"td,th",i).bind(function(o){return Be(o,"table",i).bind(function(n){return rd(a,n)?Qs(e=u,t=i,r=c).bind(function(n){return Zs(e,t,n.element,n.offset,r,20).map(e.fromSitus)}).bind(function(e){return Be(e.finish,"td,th",i).map(function(n){return{start:o,finish:n,range:e}})}):x.none();var e,t,r})})},ud=function(n,e,t,r,o,u){return Dn().browser.isIE()?x.none():u(r,e).orThunk(function(){return od(n,e,t,r,o).map(function(n){var e=n.range;return ss(x.some(gs(e.start,e.soffset,e.finish,e.foffset)),!0)})})},id=function(n,r){return Be(n,"tr",r).bind(function(t){return Be(t,"table",r).bind(function(n){var e=Te(n,"tr");return Pn(t,e[0])?Os(As,n,function(n){return pr(n).isSome()},r).map(function(n){var e=sr(n);return ss(x.some(gs(n,e,n,e)),!0)}):x.none()})})},cd=function(n,r){return Be(n,"tr",r).bind(function(t){return Be(t,"table",r).bind(function(n){var e=Te(n,"tr");return Pn(t,e[e.length-1])?Ds(As,n,function(n){return gr(n).isSome()},r).map(function(n){return ss(x.some(gs(n,0,n,0)),!0)}):x.none()})})},ad=function(n,e,t,r,o,u,i){return od(n,t,r,o,u).bind(function(n){return ps(e,t,n.start,n.finish,i)})},ld=function(n,e){return Be(n,"td,th",e)};function fd(o,u,e,i){var t,r=(t=uc(x.none()),{clear:function(){return t.set(x.none())},set:function(n){return t.set(x.some(n))},isSet:function(){return t.get().isSome()},on:function(n){return t.get().each(n)}}),c=r.clear;return{clearstate:c,mousedown:function(n){i.clear(u),ld(n.target,e).each(r.set)},mouseover:function(n){r.on(function(r){i.clearBeforeUpdate(u),ld(n.target,e).each(function(t){Xt(r,t,e).each(function(n){var e=n.boxes.getOr([]);(1<e.length||1===e.length&&!Pn(r,t))&&(i.selectRange(u,e,n.start,n.finish),o.selectContents(t))})})})},mouseup:function(n){c()}}}var sd={traverse:le,gather:Bs,relative:bf.before,otherRetry:Js.tryDown,ieRetry:Js.ieTryDown,failure:ks.failedDown},dd={traverse:ae,gather:Is,relative:bf.before,otherRetry:Js.tryUp,ieRetry:Js.ieTryUp,failure:ks.failedUp},md=function(e){return function(n){return n===e}},gd=md(38),pd=md(40),hd=function(n){return 37<=n&&n<=40},vd={isBackward:md(37),isForward:md(39)},bd={isBackward:md(39),isForward:md(37)},wd=function(c){return{elementFromPoint:function(n,e){return In.fromPoint(In.fromDom(c.document),n,e)},getRect:function(n){return n.dom.getBoundingClientRect()},getRangedRect:function(n,e,t,r){var o=yf.exact(n,e,t,r);return ts(c,o)},getSelection:function(){return es(c).map(function(n){return ms(c,n)})},fromSitus:function(n){var e=yf.relative(n.start,n.finish);return ms(c,e)},situsFromPoint:function(n,e){return rs(c,n,e).map(function(n){return ds(n.start,n.soffset,n.finish,n.foffset)})},clearSelection:function(){Uf(c).each(function(n){return n.removeAllRanges()})},collapseSelection:function(i){void 0===i&&(i=!1),es(c).each(function(n){return n.fold(function(n){return n.collapse(i)},function(n,e){var t=i?n:e;Yf(c,t,t)},function(n,e,t,r){var o=i?n:t,u=i?e:r;Xf(c,o,u,o,u)})})},setSelection:function(n){Xf(c,n.start,n.soffset,n.finish,n.foffset)},setRelativeSelection:function(n,e){Yf(c,n,e)},selectContents:function(n){ns(c,n)},getInnerHeight:function(){return c.innerHeight},getScrollY:function(){var n,e,t,r;return(n=In.fromDom(c.document),e=n!==undefined?n.dom:document,t=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop,ao(t,r)).top},scrollBy:function(n,e){var t,r,o,u;t=n,r=e,o=In.fromDom(c.document),(u=(o!==undefined?o.dom:document).defaultView)&&u.scrollBy(t,r)}}},yd=function(n,e){return{rows:n,cols:e}},Cd=function(n,e,t,r){var o=fd(wd(n),e,t,r);return{clearstate:o.clearstate,mousedown:o.mousedown,mouseover:o.mouseover,mouseup:o.mouseup}},xd=function(n,g,p,h){var l=wd(n),f=function(){return h.clear(g),x.none()};return{keydown:function(n,e,t,r,o,i){var u=n.raw,c=u.which,a=!0===u.shiftKey;return Yt(g,h.selectedSelector).fold(function(){return pd(c)&&a?w(ad,l,g,p,sd,r,e,h.selectRange):gd(c)&&a?w(ad,l,g,p,dd,r,e,h.selectRange):pd(c)?w(ud,l,p,sd,r,e,cd):gd(c)?w(ud,l,p,dd,r,e,id):x.none},function(u){var n=function(n){return function(){return V(n,function(n){return e=n.rows,t=n.cols,r=g,Qt(u,e,t,(o=h).firstSelectedSelector,o.lastSelectedSelector).map(function(n){return o.clearBeforeUpdate(r),o.selectRange(r,n.boxes,n.start,n.finish),n.boxes});var e,t,r,o}).fold(function(){return Jt(g,h.firstSelectedSelector,h.lastSelectedSelector).map(function(n){var e=pd(c)||i.isForward(c)?bf.after:bf.before;return l.setRelativeSelection(bf.on(n.first,0),e(n.table)),h.clear(g),ss(x.none(),!0)})},function(n){return x.some(ss(x.none(),!0))})}};return pd(c)&&a?n([yd(1,0)]):gd(c)&&a?n([yd(-1,0)]):i.isBackward(c)&&a?n([yd(0,-1),yd(-1,0)]):i.isForward(c)&&a?n([yd(0,1),yd(1,0)]):hd(c)&&!1==a?f:x.none})()},keyup:function(l,f,s,d,m){return Yt(g,h.selectedSelector).fold(function(){var t,r,n,e,o,u,i,c=l.raw,a=c.which;return!1!=(!0===c.shiftKey)&&hd(a)?(t=g,r=p,n=f,e=s,o=d,u=m,i=h.selectRange,Pn(n,o)&&e===u?x.none():Be(n,"td,th",r).bind(function(e){return Be(o,"td,th",r).bind(function(n){return ps(t,r,e,n,i)})})):x.none()},x.none)}}},Sd=function(n,r,e,o){var u=wd(n);return function(n,t){o.clearBeforeUpdate(r),Xt(n,t,e).each(function(n){var e=n.boxes.getOr([]);o.selectRange(r,e,n.start,n.finish),u.selectContents(t),u.collapseSelection()})}},Td=function(r,n){P(n,function(n){var e,t;t=n,Qu(e=r)?e.dom.classList.remove(t):ni(e,t),ti(e)})},Rd={byClass:function(o){var e,t,u=(e=o.selected,function(n){ei(n,e)}),r=(t=[o.selected,o.lastSelected,o.firstSelected],function(n){Td(n,t)}),i=function(n){var e=Te(n,o.selectedSelector);P(e,r)};return{clearBeforeUpdate:i,clear:i,selectRange:function(n,e,t,r){i(n),P(e,u),ei(t,o.firstSelected),ei(r,o.lastSelected)},selectedSelector:o.selectedSelector,firstSelectedSelector:o.firstSelectedSelector,lastSelectedSelector:o.lastSelectedSelector}},byAttr:function(o,u,e){var t=function(n){je(n,o.selected),je(n,o.firstSelected),je(n,o.lastSelected)},i=function(n){Pe(n,o.selected,"1")},c=function(n){r(n),e()},r=function(n){var e=Te(n,o.selectedSelector);P(e,t)};return{clearBeforeUpdate:r,clear:c,selectRange:function(n,e,t,r){c(n),P(e,i),Pe(t,o.firstSelected,"1"),Pe(r,o.lastSelected,"1"),u(e,t,r)},selectedSelector:o.selectedSelector,firstSelectedSelector:o.firstSelectedSelector,lastSelectedSelector:o.lastSelectedSelector}}},Od=function(n,e,s){var d=mt.fromTable(n);return Xc(d,e).map(function(n){var t,e,r,o,u,i,c,a,l,f=Hc(d,s,!1);return{upOrLeftCells:(t=n,e=s,r=f.slice(0,t[t.length-1].row+1),o=Vc(r,e),W(o,function(n){var e=n.cells.slice(0,t[t.length-1].column+1);return E(e,function(n){return n.element})})),downOrRightCells:(i=n,c=s,a=(u=f).slice(i[0].row+i[0].rowspan-1,u.length),l=Vc(a,c),W(l,function(n){var e=n.cells.slice(i[0].column+i[0].colspan-1,n.cells.length);return E(e,function(n){return n.element})}))}})},Dd=function(n){return!1===ri(In.fromDom(n.target),"ephox-snooker-resizer-bar")};function Ad(d,m,n){var g=Rd.byAttr(Nr,function(u,i,c){n.targets().each(function(o){ot(i).each(function(n){var e=Ki(d),t=Ar(y,In.fromDom(d.getDoc()),e),r=Od(n,o,t);Di(d,u,i,c,r)})})},function(){return Ai(d)});return d.on("init",function(n){var r=d.getWin(),o=Yi(d),e=Zi(d),t=Cd(r,o,e,g),i=xd(r,o,e,g),u=Sd(r,o,e,g);d.on("TableSelectorChange",function(n){return u(n.start,n.finish)});var c,a,l=function(n,e){!0===n.raw.shiftKey&&(e.kill&&n.kill(),e.selection.each(function(n){var e=yf.relative(n.start,n.finish),t=Af(r,e);d.selection.setRng(t)}))},f=function(n){return 0===n.button},s=(c=uc(In.fromDom(o)),a=uc(0),{touchEnd:function(n){var e,t,r=In.fromDom(n.target);"td"!==Yn(r)&&"th"!==Yn(r)||(e=c.get(),t=a.get(),Pn(e,r)&&n.timeStamp-t<300&&(n.preventDefault(),u(r,r))),c.set(r),a.set(n.timeStamp)}});d.on("dragstart",function(n){t.clearstate()}),d.on("mousedown",function(n){f(n)&&Dd(n)&&t.mousedown(Yu(n))}),d.on("mouseover",function(n){var e;((e=n).buttons===undefined||ef.browser.isEdge()&&0===e.buttons||0!=(1&e.buttons))&&Dd(n)&&t.mouseover(Yu(n))}),d.on("mouseup",function(n){f(n)&&Dd(n)&&t.mouseup(Yu(n))}),d.on("touchend",s.touchEnd),d.on("keyup",function(n){var e,t,r,o=Yu(n);o.raw.shiftKey&&hd(o.raw.which)&&(e=d.selection.getRng(),t=In.fromDom(e.startContainer),r=In.fromDom(e.endContainer),i.keyup(o,t,e.startOffset,r,e.endOffset).each(function(n){l(o,n)}))}),d.on("keydown",function(n){var e=Yu(n);m().each(function(n){return n.hideBars()});var t=d.selection.getRng(),r=In.fromDom(t.startContainer),o=In.fromDom(t.endContainer),u=to(vd,bd)(In.fromDom(d.selection.getStart()));i.keydown(e,r,t.startOffset,o,t.endOffset,u).each(function(n){l(e,n)}),m().each(function(n){return n.showBars()})}),d.on("NodeChange",function(){var n=d.selection,e=In.fromDom(n.getStart()),t=In.fromDom(n.getEnd());Gt(ot,[e,t]).fold(function(){return g.clear(o)},y)})}),{clear:g.clear}}var Id=function(n,t){var o=uc(x.none()),u=uc([]),e=function(){return fl(oc(n)).bind(function(e){var n=ot(e);return n.map(function(n){return"caption"===Yn(e)?jr(e):_r(t,n,e)})})},r=function(){o.set(K(e)()),P(u.get(),function(n){return n()})},i=function(e,t){var r=function(){return o.get().fold(function(){e.setDisabled(!0)},function(n){e.setDisabled(t(n))})};return r(),u.set(u.get().concat([r])),function(){u.set(k(u.get(),function(n){return n!==r}))}};return n.on("NodeChange ExecCommand TableSelectorChange",r),{onSetupTable:function(n){return i(n,function(n){return!1})},onSetupCellOrRow:function(n){return i(n,function(n){return"caption"===Yn(n.element)})},onSetupPasteable:function(e){return function(n){return i(n,function(n){return"caption"===Yn(n.element)||e().isNone()})}},onSetupMergeable:function(n){return i(n,function(n){return n.mergable.isNone()})},onSetupUnmergeable:function(n){return i(n,function(n){return n.unmergable.isNone()})},resetTargets:r,targets:function(){return o.get()}}},Bd=function(e,n,t){e.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:function(n){return n("inserttable | cell row column | advtablesort | tableprops deletetable")}});var r=function(n){return function(){return e.execCommand(n)}};e.ui.registry.addButton("tableprops",{tooltip:"Table properties",onAction:r("mceTableProps"),icon:"table",onSetup:n.onSetupTable}),e.ui.registry.addButton("tabledelete",{tooltip:"Delete table",onAction:r("mceTableDelete"),icon:"table-delete-table",onSetup:n.onSetupTable}),e.ui.registry.addButton("tablecellprops",{tooltip:"Cell properties",onAction:r("mceTableCellProps"),icon:"table-cell-properties",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablemergecells",{tooltip:"Merge cells",onAction:r("mceTableMergeCells"),icon:"table-merge-cells",onSetup:n.onSetupMergeable}),e.ui.registry.addButton("tablesplitcells",{tooltip:"Split cell",onAction:r("mceTableSplitCells"),icon:"table-split-cells",onSetup:n.onSetupUnmergeable}),e.ui.registry.addButton("tableinsertrowbefore",{tooltip:"Insert row before",onAction:r("mceTableInsertRowBefore"),icon:"table-insert-row-above",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tableinsertrowafter",{tooltip:"Insert row after",onAction:r("mceTableInsertRowAfter"),icon:"table-insert-row-after",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tabledeleterow",{tooltip:"Delete row",onAction:r("mceTableDeleteRow"),icon:"table-delete-row",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablerowprops",{tooltip:"Row properties",onAction:r("mceTableRowProps"),icon:"table-row-properties",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tableinsertcolbefore",{tooltip:"Insert column before",onAction:r("mceTableInsertColBefore"),icon:"table-insert-column-before",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tableinsertcolafter",{tooltip:"Insert column after",onAction:r("mceTableInsertColAfter"),icon:"table-insert-column-after",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tabledeletecol",{tooltip:"Delete column",onAction:r("mceTableDeleteCol"),icon:"table-delete-column",onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablecutrow",{tooltip:"Cut row",icon:"cut-row",onAction:r("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablecopyrow",{tooltip:"Copy row",icon:"duplicate-row",onAction:r("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablepasterowbefore",{tooltip:"Paste row before",icon:"paste-row-before",onAction:r("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(t.getRows)}),e.ui.registry.addButton("tablepasterowafter",{tooltip:"Paste row after",icon:"paste-row-after",onAction:r("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(t.getRows)}),e.ui.registry.addButton("tablecutcol",{tooltip:"Cut column",icon:"cut-column",onAction:r("mceTableCutCol"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablecopycol",{tooltip:"Copy column",icon:"duplicate-column",onAction:r("mceTableCopyCol"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addButton("tablepastecolbefore",{tooltip:"Paste column before",icon:"paste-column-before",onAction:r("mceTablePasteColBefore"),onSetup:n.onSetupPasteable(t.getColumns)}),e.ui.registry.addButton("tablepastecolafter",{tooltip:"Paste column after",icon:"paste-column-after",onAction:r("mceTablePasteColAfter"),onSetup:n.onSetupPasteable(t.getColumns)}),e.ui.registry.addButton("tableinsertdialog",{tooltip:"Insert table",onAction:r("mceInsertTable"),icon:"table"})},Ed=function(e){var n=e.getParam("table_toolbar","tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol");0<n.length&&e.ui.registry.addContextToolbar("table",{predicate:function(n){return e.dom.is(n,"table")&&e.getBody().contains(n)},items:n,scope:"node",position:"node"})},Pd=function(e,n,t){var r=function(n){return function(){return e.execCommand(n)}},o=function(n){e.execCommand("mceInsertTable",!1,{rows:n.numRows,columns:n.numColumns})},u={text:"Table properties",onSetup:n.onSetupTable,onAction:r("mceTableProps")},i={text:"Delete table",icon:"table-delete-table",onSetup:n.onSetupTable,onAction:r("mceTableDelete")};e.ui.registry.addMenuItem("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",onAction:r("mceTableInsertRowBefore"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",onAction:r("mceTableInsertRowAfter"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tabledeleterow",{text:"Delete row",icon:"table-delete-row",onAction:r("mceTableDeleteRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablerowprops",{text:"Row properties",icon:"table-row-properties",onAction:r("mceTableRowProps"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablecutrow",{text:"Cut row",icon:"cut-row",onAction:r("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablecopyrow",{text:"Copy row",icon:"duplicate-row",onAction:r("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",onAction:r("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(t.getRows)}),e.ui.registry.addMenuItem("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",onAction:r("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(t.getRows)});e.ui.registry.addMenuItem("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",onAction:r("mceTableInsertColBefore"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",onAction:r("mceTableInsertColAfter"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",onAction:r("mceTableDeleteCol"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablecutcolumn",{text:"Cut column",icon:"cut-column",onAction:r("mceTableCutCol"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",onAction:r("mceTableCopyCol"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",onAction:r("mceTablePasteColBefore"),onSetup:n.onSetupPasteable(t.getColumns)}),e.ui.registry.addMenuItem("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",onAction:r("mceTablePasteColAfter"),onSetup:n.onSetupPasteable(t.getColumns)});e.ui.registry.addMenuItem("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",onAction:r("mceTableCellProps"),onSetup:n.onSetupCellOrRow}),e.ui.registry.addMenuItem("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",onAction:r("mceTableMergeCells"),onSetup:n.onSetupMergeable}),e.ui.registry.addMenuItem("tablesplitcells",{text:"Split cell",icon:"table-split-cells",onAction:r("mceTableSplitCells"),onSetup:n.onSetupUnmergeable});!1===e.getParam("table_grid",!0,"boolean")?e.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:r("mceInsertTable")}):e.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"inserttable",onAction:o}]}}),e.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:r("mceInsertTable")}),e.ui.registry.addMenuItem("tableprops",u),e.ui.registry.addMenuItem("deletetable",i),e.ui.registry.addNestedMenuItem("row",{type:"nestedmenuitem",text:"Row",getSubmenuItems:function(){return"tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter"}}),e.ui.registry.addNestedMenuItem("column",{type:"nestedmenuitem",text:"Column",getSubmenuItems:function(){return"tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter"}}),e.ui.registry.addNestedMenuItem("cell",{type:"nestedmenuitem",text:"Cell",getSubmenuItems:function(){return"tablecellprops tablemergecells tablesplitcells"}}),e.ui.registry.addContextMenu("table",{update:function(){return n.resetTargets(),n.targets().fold(function(){return""},function(n){return"caption"===Yn(n.element)?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"})}})};function kd(e){var n=cr(function(){return Yi(e)},function(){return fl(oc(e))},Nr.selectedSelector),t=Id(e,n),r=Cc(e),o=Ad(e,r.lazyResize,t),u=ml(e,r.lazyWire,n),i=ff();return af(e,u,o,n,i),lf(e,u,n),zr(e,n,u,o),Pd(e,t,i),Bd(e,t,i),Ed(e),e.on("PreInit",function(){e.serializer.addTempAttr(Nr.firstSelected),e.serializer.addTempAttr(Nr.lastSelected),df(e)}),_i(e)&&e.on("keydown",function(n){fs(n,e,u)}),e.on("remove",function(){r.destroy()}),Sl(e,i,r,t)}ar.add("table",kd)}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(){},o=function(e){return function(){return e}};var n,r,a,c=o(!1),u=o(!0),_=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=tinymce.util.Tools.resolve("tinymce.util.XHR"),i=function(e){return e.getParam("template_mdate_classes","mdate")},l=function(e){return e.getParam("template_replace_values")},f=function(e){return e.getParam("template_mdate_format",e.translate("%Y-%m-%d"))},m=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},p=function(e,t,n){var r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),c="January February March April May June July August September October November December".split(" ");return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",m(n.getMonth()+1,2))).replace("%d",m(n.getDate(),2))).replace("%H",""+m(n.getHours(),2))).replace("%M",""+m(n.getMinutes(),2))).replace("%S",""+m(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(c[n.getMonth()]))).replace("%b",""+e.translate(o[n.getMonth()]))).replace("%A",""+e.translate(a[n.getDay()]))).replace("%a",""+e.translate(r[n.getDay()]))).replace("%%","%")},d=function(t,n){return function(){var e=t.getParam("templates");"function"!=typeof e?"string"==typeof e?s.send({url:e,success:function(e){n(JSON.parse(e))}}):n(e):e(n)}},x=function(n,e){return _.each(e,function(e,t){"function"==typeof e&&(e=e(t)),n=n.replace(new RegExp("\\{\\$"+t+"\\}","g"),e)}),n},g=function(e,t){var r=e.dom,a=l(e);_.each(r.select("*",t),function(n){_.each(a,function(e,t){r.hasClass(n,t)&&"function"==typeof a[t]&&a[t](n)})})},v=function(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)},y=function(n,e,t){var r,a=n.dom,o=n.selection.getContent();t=x(t,l(n)),r=a.create("div",null,t);var c=a.select(".mceTmpl",r);c&&0<c.length&&(r=a.create("div",null)).appendChild(c[0].cloneNode(!0)),_.each(a.select("*",r),function(e){var t;v(e,n.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(e.innerHTML=p(n,(t=n).getParam("template_cdate_format",t.translate("%Y-%m-%d")))),v(e,i(n).replace(/\s+/g,"|"))&&(e.innerHTML=p(n,f(n))),v(e,n.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(e.innerHTML=o)}),g(n,r),n.execCommand("mceInsertContent",!1,r.innerHTML),n.addVisual()},h=function(e){e.addCommand("mceInsertTemplate",function(r){for(var a=[],e=1;e<arguments.length;e++)a[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=a.concat(e);return r.apply(null,n)}}(y,e))},b=function(){return T},T=(n=function(e){return e.isNone()},{fold:function(e,t){return e()},is:c,isSome:c,isNone:u,getOr:a=function(e){return e},getOrThunk:r=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:a,orThunk:r,map:b,each:t,bind:b,exists:c,forall:u,filter:b,equals:n,equals_:n,toArray:function(){return[]},toString:o("none()")}),M=function(n){var e=o(n),t=function(){return a},r=function(e){return e(n)},a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:u,isNone:c,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return M(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?a:T},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(c,function(e){return t(n,e)})}};return a},O={some:M,none:b,from:function(e){return null===e||e===undefined?T:M(e)}},P=function(e,t){return function(e,t,n){for(var r=0,a=e.length;r<a;r++){var o=e[r];if(t(o,r))return O.some(o);if(n(o,r))break}return O.none()}(e,t,c)},S=tinymce.util.Tools.resolve("tinymce.Env"),w=tinymce.util.Tools.resolve("tinymce.util.Promise"),D=Object.hasOwnProperty,A=function(e,t){return D.call(e,t)},C={'"':"&quot;","<":"&lt;",">":"&gt;","&":"&amp;","'":"&#039;"},N=function(e){return e.replace(/["'<>&]/g,function(e){return(A(t=C,n=e)?O.from(t[n]):O.none()).getOr(e);var t,n})},I=function(M,t){var e=function(e){return function(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var o=e[a];r[a]=t(o,a)}return r}(e,function(e){return{text:e.text,value:e.text}})},u=function(e,t){return P(e,function(e){return e.text===t})},i=function(e){M.windowManager.alert("Could not load the specified template.",function(){return e.focus("template")})},l=function(e){return new w(function(t,n){e.value.url.fold(function(){return t(e.value.content.getOr(""))},function(e){return s.send({url:e,success:function(e){t(e)},error:function(e){n(e)}})})})};(function(){if(t&&0!==t.length)return O.from(_.map(t,function(e,t){var n=function(e){return e.url!==undefined};return{selected:0===t,text:e.title,value:{url:n(e)?O.from(e.url):O.none(),content:n(e)?O.none():O.from(e.content),description:e.description}}}));var e=M.translate("No templates defined.");return M.notificationManager.open({text:e,type:"info"}),O.none()})().each(function(o){var b=e(o),T=function(e,t){return{title:"Insert Template",size:"large",body:{type:"panel",items:e},initialData:t,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(t){var e=t.getData();u(n,e.template).each(function(e){l(e).then(function(e){y(M,0,e),t.close()})["catch"](function(){t.disable("save"),i(t)})})},onChange:(r=n=o,a=c,function(n,e){var t;"template"===e.name&&(t=n.getData().template,u(r,t).each(function(t){n.block("Loading..."),l(t).then(function(e){a(n,t,e)})["catch"](function(){a(n,t,""),n.disable("save"),i(n)})}))})};var r,a,n},c=function(e,t,n){var r,a,o,c,u,i,l,s,f,m,p,d,g,v=(r=M,-1===(a=n).indexOf("<html>")&&(o="",(c=r.getParam("content_style","","string"))&&(o+='<style type="text/css">'+c+"</style>"),u=r.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"",_.each(r.contentCSS,function(e){o+='<link type="text/css" rel="stylesheet" href="'+r.documentBaseURI.toAbsolute(e)+'"'+u+">"}),i=-1===(g=(p=r).getParam("body_class","","string")).indexOf("=")?g:(d=p).getParam("body_class","","hash")[d.id]||"",l=r.dom.encode,s='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(S.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",m=(f=r.getBody().dir)?' dir="'+l(f)+'"':"",a='<!DOCTYPE html><html><head><base href="'+l(r.documentBaseURI.getURI())+'">'+o+s+'</head><body class="'+l(i)+'"'+m+">"+a+"</body></html>"),x(a,r.getParam("template_preview_replace_values"))),y=[{type:"selectbox",name:"template",label:"Templates",items:b},{type:"htmlpanel",html:'<p aria-live="polite">'+N(t.value.description)+"</p>"},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1}],h={template:t.text,preview:v};e.unblock(),e.redial(T(y,h)),e.focus("template")},t=M.windowManager.open(T([],{template:"",preview:""}));t.block("Loading..."),l(o[0]).then(function(e){c(t,o[0],e)})["catch"](function(){c(t,o[0],""),t.disable("save"),i(t)})})},k=function(t){return function(e){I(t,e)}};e.add("template",function(e){var t,r;(t=e).ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onAction:d(t,k(t))}),t.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onAction:d(t,k(t))}),h(e),(r=e).on("PreProcess",function(e){var t=r.dom,n=f(r);_.each(t.select("div",e.node),function(e){t.hasClass(e,"mceTmpl")&&(_.each(t.select("*",e),function(e){t.hasClass(e,i(r).replace(/\s+/g,"|"))&&(e.innerHTML=p(r,n))}),g(r,e))})})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("textcolor",function(){console.warn("Text color plugin is now built in to the core editor, please remove it from your editor configuration")})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(){return(u=Object.assign||function(t){for(var n,r=1,e=arguments.length;r<e;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};var n,r,e,o=function(){},a=function(t){return function(){return t}},i=function(t){return t},f=a(!1),c=a(!0),s=function(){return l},l=(n=function(t){return t.isNone()},{fold:function(t,n){return t()},is:f,isSome:f,isNone:c,getOr:e=function(t){return t},getOrThunk:r=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:e,orThunk:r,map:s,each:o,bind:s,exists:f,forall:c,filter:s,equals:n,equals_:n,toArray:function(){return[]},toString:a("none()")}),d=function(r){var t=a(r),n=function(){return o},e=function(t){return t(r)},o={fold:function(t,n){return n(r)},is:function(t){return r===t},isSome:c,isNone:f,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return d(t(r))},each:function(t){t(r)},bind:e,exists:e,forall:e,filter:function(t){return t(r)?o:l},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(t){return t.is(r)},equals_:function(t,n){return t.fold(f,function(t){return n(r,t)})}};return o},y={some:d,none:s,from:function(t){return null===t||t===undefined?l:d(t)}},m=function(e){return function(t){return r=typeof(n=t),(null===n?"null":"object"==r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===e;var n,r}},g=m("string"),p=m("object"),h=m("array"),v=Array.prototype.slice,b=Array.prototype.indexOf,k=function(t,n){return r=t,e=n,-1<b.call(r,e);var r,e},O=function(t,n){for(var r=t.length,e=new Array(r),o=0;o<r;o++){var a=t[o];e[o]=n(a,o)}return e},w=function(t,n){for(var r=0,e=t.length;r<e;r++){n(t[r],r)}},C=function(t,n){for(var r=[],e=0,o=t.length;e<o;e++){var a=t[e];n(a,e)&&r.push(a)}return r},E=function(t,n,r){return function(t,n){for(var r=t.length-1;0<=r;r--){n(t[r],r)}}(t,function(t){r=n(r,t)}),r},x=function(t,n){return function(t,n,r){for(var e=0,o=t.length;e<o;e++){var a=t[e];if(n(a,e))return y.some(a);if(r(a,e))break}return y.none()}(t,n,f)},R=function(t,n){for(var r=0,e=t.length;r<e;++r){if(!0!==n(t[r],r))return!1}return!0},T=function(t){return n=t,(r=0)<=r&&r<n.length?y.some(n[r]):y.none();var n,r},N=Object.keys,P=Object.hasOwnProperty,S=(function(i){if(!h(i))throw new Error("cases must be an array");if(0===i.length)throw new Error("there must be at least one case");var u=[],r={};w(i,function(t,e){var n=N(t);if(1!==n.length)throw new Error("one and only one name per case");var o=n[0],a=t[o];if(r[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!h(a))throw new Error("case arguments must be an array");u.push(o),r[o]=function(){var t=arguments.length;if(t!==a.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+a.length+" ("+a+"), got "+t);for(var r=new Array(t),n=0;n<r.length;n++)r[n]=arguments[n];return{fold:function(){if(arguments.length!==i.length)throw new Error("Wrong number of arguments to fold. Expected "+i.length+", got "+arguments.length);return arguments[e].apply(null,r)},match:function(t){var n=N(t);if(u.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+n.join(","));if(!R(u,function(t){return k(n,t)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+u.join(", "));return t[o].apply(null,r)},log:function(t){console.log(t,{constructors:u,constructor:o,params:r})}}}})}([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(t){var n=[],r=[];return w(t,function(t){t.fold(function(t){n.push(t)},function(t){r.push(t)})}),{errors:n,values:r}}),M=function(r){return{is:function(t){return r===t},isValue:c,isError:f,getOr:a(r),getOrThunk:a(r),getOrDie:a(r),or:function(t){return M(r)},orThunk:function(t){return M(r)},fold:function(t,n){return n(r)},map:function(t){return M(t(r))},mapError:function(t){return M(r)},each:function(t){t(r)},bind:function(t){return t(r)},exists:function(t){return t(r)},forall:function(t){return t(r)},toOptional:function(){return y.some(r)}}},A=function(r){return{is:f,isValue:f,isError:c,getOr:i,getOrThunk:function(t){return t()},getOrDie:function(){return t=String(r),function(){throw new Error(t)}();var t},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,n){return t(r)},map:function(t){return A(r)},mapError:function(t){return A(t(r))},each:o,bind:function(t){return A(r)},exists:f,forall:c,toOptional:y.none}},B={value:M,error:A,fromOption:function(t,n){return t.fold(function(){return A(n)},M)}},D=function(t){return"inline-command"===t.type||"inline-format"===t.type},I=function(t){return"block-command"===t.type||"block-format"===t.type},j=function(t){return n=t,r=function(t,n){return t.start.length===n.start.length?0:t.start.length>n.start.length?-1:1},(e=v.call(n,0)).sort(r),e;var n,r,e},_=function(o){var a=function(t){return B.error({message:t,pattern:o})},t=function(t,n,r){if(o.format===undefined)return o.cmd!==undefined?g(o.cmd)?B.value(r(o.cmd,o.value)):a(t+" pattern has non-string `cmd` parameter"):a(t+" pattern is missing both `format` and `cmd` parameters");var e=void 0;if(h(o.format)){if(!R(o.format,g))return a(t+" pattern has non-string items in the `format` array");e=o.format}else{if(!g(o.format))return a(t+" pattern has non-string `format` parameter");e=[o.format]}return B.value(n(e))};if(!p(o))return a("Raw pattern is not an object");if(!g(o.start))return a("Raw pattern is missing `start` parameter");if(o.end===undefined)return o.replacement!==undefined?g(o.replacement)?0===o.start.length?a("Replacement pattern has empty `start` parameter"):B.value({type:"inline-command",start:"",end:o.start,cmd:"mceInsertContent",value:o.replacement}):a("Replacement pattern has non-string `replacement` parameter"):0===o.start.length?a("Block pattern has empty `start` parameter"):t("Block",function(t){return{type:"block-format",start:o.start,format:t[0]}},function(t,n){return{type:"block-command",start:o.start,cmd:t,value:n}});if(!g(o.end))return a("Inline pattern has non-string `end` parameter");if(0===o.start.length&&0===o.end.length)return a("Inline pattern has empty `start` and `end` parameters");var r=o.start,e=o.end;return 0===e.length&&(e=r,r=""),t("Inline",function(t){return{type:"inline-format",start:r,end:e,format:t}},function(t,n){return{type:"inline-command",start:r,end:e,cmd:t,value:n}})},U=function(t){return"block-command"===t.type?{start:t.start,cmd:t.cmd,value:t.value}:"block-format"===t.type?{start:t.start,format:t.format}:"inline-command"===t.type?"mceInsertContent"===t.cmd&&""===t.start?{start:t.end,replacement:t.value}:{start:t.start,end:t.end,cmd:t.cmd,value:t.value}:"inline-format"===t.type?{start:t.start,end:t.end,format:1===t.format.length?t.format[0]:t.format}:void 0},q=function(t){return{inlinePatterns:C(t,D),blockPatterns:j(C(t,I))}},L=function(e){return{setPatterns:function(t){var n=S(O(t,_));if(0<n.errors.length){var r=n.errors[0];throw new Error(r.message+":\n"+JSON.stringify(r.pattern,null,2))}e.set(q(n.values))},getPatterns:function(){return function(){for(var t=0,n=0,r=arguments.length;n<r;n++)t+=arguments[n].length;for(var e=Array(t),o=0,n=0;n<r;n++)for(var a=arguments[n],i=0,u=a.length;i<u;i++,o++)e[o]=a[i];return e}(O(e.get().inlinePatterns,U),O(e.get().blockPatterns,U))}}},V="undefined"!=typeof window?window:Function("return this;")(),W=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=V.console;r&&(r.error?r.error.apply(r,t):r.log.apply(r,t))},F=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],G=function(t){var n=t.getParam("forced_root_block","p");return!1===n?"":!0===n?"p":n},H=tinymce.util.Tools.resolve("tinymce.util.Delay"),J=tinymce.util.Tools.resolve("tinymce.util.VK"),K=tinymce.util.Tools.resolve("tinymce.util.Tools"),X=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),z=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),Q=function(t,n){return{container:t,offset:n}},Y=function(t){return t.nodeType===Node.TEXT_NODE},Z=function(t,n,r){var e;n&&t.isEmpty(n)&&!r(n)&&(e=n.parentNode,t.remove(n),Z(t,e,r))},$=function(t,n,r,e){void 0===e&&(e=!0);var o=n.startContainer.parentNode,a=n.endContainer.parentNode;n.deleteContents(),e&&!r(n.startContainer)&&(Y(n.startContainer)&&0===n.startContainer.data.length&&t.remove(n.startContainer),Y(n.endContainer)&&0===n.endContainer.data.length&&t.remove(n.endContainer),Z(t,o,r),o!==a&&Z(t,a,r))},tt=function(t,n){var r=n.get(t);return h(r)&&T(r).exists(function(t){return n=t,r="block",P.call(n,r);var n,r})},nt=function(t){return 0===t.start.length},rt=function(t,n){var r=y.from(t.dom.getParent(n.startContainer,t.dom.isBlock));return""===G(t)?r.orThunk(function(){return y.some(t.getBody())}):r},et=X.DOM,ot=function(n){return function(t){return n===t?-1:0}},at=function(t,n,r){if(Y(t)&&0<=n)return y.some(Q(t,n));var e=z(et);return y.from(e.backwards(t,n,ot(t),r)).map(function(t){return Q(t.container,t.container.data.length)})},it=function(t,r,e){if(!Y(t))return y.none();var n=t.textContent;if(0<=r&&r<=n.length)return y.some(Q(t,r));var o=z(et);return y.from(o.backwards(t,r,ot(t),e)).bind(function(t){var n=t.container.data;return it(t.container,r+n.length,e)})},ut=function(t,n,r){if(!Y(t))return y.none();var e=t.textContent;if(n<=e.length)return y.some(Q(t,n));var o=z(et);return y.from(o.forwards(t,n,ot(t),r)).bind(function(t){return ut(t.container,n-e.length,r)})},ft=function(t,n,r,e,o){var a,i=z(t,(a=t,function(t){return a.isBlock(t)||k(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===a.getContentEditable(t)}));return y.from(i.backwards(n,r,e,o))},ct=function(t,n,r){if(Y(n)&&(r<0||r>n.data.length))return[];for(var e=[r],o=n;o!==t&&o.parentNode;){for(var a=o.parentNode,i=0;i<a.childNodes.length;i++)if(a.childNodes[i]===o){e.push(i);break}o=a}return o===t?e.reverse():[]},st=function(t,n,r,e,o){return{start:ct(t,n,r),end:ct(t,e,o)}},lt=function(t,n){var r,e,o,a=n.slice(),i=a.pop();return(r=a,e=function(t,n){return t.bind(function(t){return y.from(t.childNodes[n])})},o=y.some(t),w(r,function(t){o=e(o,t)}),o).bind(function(t){return Y(t)&&(i<0||i>t.data.length)?y.none():y.some({node:t,offset:i})})},dt=function(n,r){return lt(n,r.start).bind(function(t){var o=t.node,a=t.offset;return lt(n,r.end).map(function(t){var n=t.node,r=t.offset,e=document.createRange();return e.setStart(o,a),e.setEnd(n,r),e})})},mt=function(e,o,n){(function(t,n,r){if(Y(t)&&n>=t.length)return y.some(Q(t,n));var e=z(et);return y.from(e.forwards(t,n,ot(t),r)).map(function(t){return Q(t.container,0)})})(o,0,o).each(function(t){var r=t.container;ut(r,n.start.length,o).each(function(t){var n=e.createRng();n.setStart(r,0),n.setEnd(t.container,t.offset),$(e,n,function(t){return t===o})})})},gt=function(e,a){var i=e.dom,t=e.selection.getRng();return rt(e,t).filter(function(t){var n=G(e),r=""===n&&i.is(t,"body")||i.is(t,n);return null!==t&&r}).bind(function(n){var t,r,e,o=n.textContent;return(t=a,e=(r=o).replace("\xa0"," "),x(t,function(t){return 0===r.indexOf(t.start)||0===e.indexOf(t.start)})).map(function(t){return K.trim(o).length===t.start.length?[]:[{pattern:t,range:st(i.getRoot(),n,0,n,0)}]})}).getOr([])},pt=function(i,t){var n;0!==t.length&&(n=i.selection.getBookmark(),w(t,function(t){return r=t,e=(n=i).dom,o=r.pattern,a=dt(e.getRoot(),r.range).getOrDie("Unable to resolve path range"),rt(n,a).each(function(t){"block-format"===o.type?tt(o.format,n.formatter)&&n.undoManager.transact(function(){mt(n.dom,t,o),n.formatter.apply(o.format)}):"block-command"===o.type&&n.undoManager.transact(function(){mt(n.dom,t,o),n.execCommand(o.cmd,!1,o.value)})}),1;var n,r,e,o,a}),i.selection.moveToBookmark(n))},ht=0,vt=function(t,n){return t.create("span",{"data-mce-type":"bookmark",id:n})},yt=function(t,n){var r=t.createRng();return r.setStartAfter(n.start),r.setEndBefore(n.end),r},bt=function(t,n,r){var e=dt(t.getRoot(),r).getOrDie("Unable to resolve path range"),o=e.startContainer,a=e.endContainer,i=0===e.endOffset?a:a.splitText(e.endOffset),u=0===e.startOffset?o:o.splitText(e.startOffset);return{prefix:n,end:i.parentNode.insertBefore(vt(t,n+"-end"),i),start:u.parentNode.insertBefore(vt(t,n+"-start"),u)}},kt=function(t,n,r){Z(t,t.get(n.prefix+"-end"),r),Z(t,t.get(n.prefix+"-start"),r)},Ot=function(e,o,a,t){var i,u=o.start;return ft(e,t.container,t.offset,(i=u,function(t,n){var r=t.data.substring(0,n),e=r.lastIndexOf(i.charAt(i.length-1)),o=r.lastIndexOf(i);return-1!==o?o+i.length:-1!==e?e+1:-1}),a).bind(function(r){if(r.offset>=u.length){var t=e.createRng();return t.setStart(r.container,r.offset-u.length),t.setEnd(r.container,r.offset),y.some(t)}var n=r.offset-u.length;return it(r.container,n,a).map(function(t){var n=e.createRng();return n.setStart(t.container,t.offset),n.setEnd(r.container,r.offset),n}).filter(function(t){return t.toString()===u}).orThunk(function(){return Ot(e,o,a,Q(r.container,0))})})},wt=function(a,i,u){var f=a.dom,c=f.getRoot(),s=u.pattern,l=u.position.container,d=u.position.offset;return it(l,d-u.pattern.end.length,i).bind(function(t){var e=st(c,t.container,t.offset,l,d);if(nt(s))return y.some({matches:[{pattern:s,startRng:e,endRng:e}],position:t});var n=Ct(a,u.remainingPatterns,t.container,t.offset,i),o=n.getOr({matches:[],position:t}),r=o.position;return function(t,r,n,e,o,a){if(void 0===a&&(a=!1),0!==r.start.length||a)return at(n,e,o).bind(function(n){return Ot(t,r,o,n).bind(function(t){if(a){if(t.endContainer===n.container&&t.endOffset===n.offset)return y.none();if(0===n.offset&&t.endContainer.textContent.length===t.endOffset)return y.none()}return y.some(t)})});var i=t.createRng();return i.setStart(n,e),i.setEnd(n,e),y.some(i)}(f,s,r.container,r.offset,i,n.isNone()).map(function(t){var n,r=st(c,(n=t).startContainer,n.startOffset,n.endContainer,n.endOffset);return{matches:o.matches.concat([{pattern:s,startRng:r,endRng:e}]),position:Q(t.startContainer,t.startOffset)}})})},Ct=function(d,m,g,p,h){var v=d.dom;return at(g,p,v.getRoot()).bind(function(t){var n=v.createRng();n.setStart(h,0),n.setEnd(g,p);for(var r,e,o,a,i,u=n.toString(),f=0;f<m.length;f++){var c=m[f];if(r=u,e=c.end,i=a=o=void 0,a=e,i=(o=r).length-e.length,""===a||o.length>=a.length&&o.substr(i,i+a.length)===a){var s=m.slice();s.splice(f,1);var l=wt(d,h,{pattern:c,remainingPatterns:s,position:t});if(l.isSome())return l}}return y.none()})},Et=function(n,t,r){n.selection.setRng(r),"inline-format"===t.type?w(t.format,function(t){n.formatter.apply(t)}):n.execCommand(t.cmd,!1,t.value)},xt=function(o,t){var n,r,a=(n="mce_textpattern",r=(new Date).getTime(),n+"_"+Math.floor(1e9*Math.random())+ ++ht+String(r)),i=E(t,function(t,n){var r=bt(o,a+"_end"+t.length,n.endRng);return t.concat([u(u({},n),{endMarker:r})])},[]);return E(i,function(t,n){var r=i.length-t.length-1,e=nt(n.pattern)?n.endMarker:bt(o,a+"_start"+r,n.startRng);return t.concat([u(u({},n),{startMarker:e})])},[])},Rt=function(r,e,o){var a=r.selection.getRng();return!1===a.collapsed?[]:rt(r,a).bind(function(t){var n=a.startOffset-(o?1:0);return Ct(r,e,a.startContainer,n,t)}).fold(function(){return[]},function(t){return t.matches})},Tt=function(f,t){var c,n,r;0!==t.length&&(c=f.dom,n=f.selection.getBookmark(),r=xt(c,t),w(r,function(t){var n,r,e,o,a,i=c.getParent(t.startMarker.start,c.isBlock),u=function(t){return t===i};nt(t.pattern)?(n=f,r=t.pattern,e=t.endMarker,o=u,a=yt(n.dom,e),$(n.dom,a,o),Et(n,r,a)):function(t,n,r,e,o){var a=t.dom,i=yt(a,e),u=yt(a,r);$(a,u,o),$(a,i,o);var f={prefix:r.prefix,start:r.end,end:e.start},c=yt(a,f);Et(t,n,c)}(f,t.pattern,t.startMarker,t.endMarker,u),kt(c,t.endMarker,u),kt(c,t.startMarker,u)}),f.selection.moveToBookmark(n))},Nt=function(t,n){var r=Rt(t,n.inlinePatterns,!0);0<r.length&&t.undoManager.transact(function(){Tt(t,r)})},Pt=function(t,n,r){for(var e=0;e<t.length;e++)if(r(t[e],n))return!0},St=function(n,r){var e=[",",".",";",":","!","?"],o=[32];n.on("keydown",function(t){13!==t.keyCode||J.modifierPressed(t)||!function(r,t){if(!r.selection.isCollapsed())return!1;var e=Rt(r,t.inlinePatterns,!1),o=gt(r,t.blockPatterns);return(0<o.length||0<e.length)&&(r.undoManager.add(),r.undoManager.extra(function(){r.execCommand("mceInsertNewLine")},function(){r.insertContent("\ufeff"),Tt(r,e),pt(r,o);var t=r.selection.getRng(),n=at(t.startContainer,t.startOffset,r.dom.getRoot());r.execCommand("mceInsertNewLine"),n.each(function(t){var n=t.container;"\ufeff"===n.data.charAt(t.offset-1)&&(n.deleteData(t.offset-1,1),Z(r.dom,n.parentNode,function(t){return t===r.dom.getRoot()}))})}),!0)}(n,r.get())||t.preventDefault()},!0),n.on("keyup",function(t){Pt(o,t,function(t,n){return t===n.keyCode&&!1===J.modifierPressed(n)})&&Nt(n,r.get())}),n.on("keypress",function(t){Pt(e,t,function(t,n){return t.charCodeAt(0)===n.charCode})&&H.setEditorTimeout(n,function(){Nt(n,r.get())})})};t.add("textpattern",function(t){var n,r,e=(n=function(t){var n=t.getParam("textpattern_patterns",F,"array");if(!h(n))return W("The setting textpattern_patterns should be an array"),{inlinePatterns:[],blockPatterns:[]};var r=S(O(n,_));return w(r.errors,function(t){return W(t.message,t.pattern),0}),q(r.values)}(t),r=n,{get:function(){return r},set:function(t){r=t}});return St(t,e),L(e)})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
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)}),v=function(n){var t,o=l(n),e=m(n),r=function(t){for(var e=[],n=1;n<=t;n++)e.push("h"+n);return e.join(",")}(1<=(t=parseInt(n.getParam("toc_depth","3"),10))&&t<=9?t:3),i=n.$(r);return i.length&&/^h[1-9]$/i.test(e)&&(i=i.filter(function(t,e){return!n.dom.hasClass(e.parentNode,o)})),c.map(i,function(t){var e=t.id;return{id:e||a(),level:parseInt(t.nodeName.replace(/^H/i,""),10),title:n.$.text(t),element:t}})},u=function(t){var e,n,o,r,i,c,l,a="",u=v(t),d=function(t){for(var e=9,n=0;n<t.length;n++)if(t[n].level<e&&(e=t[n].level),1===e)return e;return e}(u)-1;if(!u.length)return"";for(a+=(i=m(t),c=f.translate("Table of Contents"),l="</"+i+">","<"+i+' contenteditable="true">'+s.DOM.encode(c)+l),e=0;e<u.length;e++){if((o=u[e]).element.id=o.id,r=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>",r!==o.level&&r)for(n=o.level;r<n;n--)a+="</li></ul><li>";else a+="</li>",r||(a+="</ul>");d=o.level}return a},i=function(t){var e,n,o,r,i=l(t),c=t.$("."+i);o=t,!(r=c).length||0<o.dom.getParents(r[0],".mce-offscreen-selection").length?t.insertContent((n=u(e=t),'<div class="'+e.dom.encode(l(e))+'" contenteditable="false">'+n+"</div>")):d(t)},d=function(t){var e=l(t),n=t.$("."+e);n.length&&t.undoManager.transact(function(){n.html(u(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)}}},g=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"})};t.add("toc",function(t){var e,n,o,r;(e=t).addCommand("mceInsertToc",function(){i(e)}),e.addCommand("mceUpdateToc",function(){d(e)}),g(t),o=(n=t).$,r=l(n),n.on("PreProcess",function(t){var e=o("."+r,t.node);e.length&&(e.removeAttr("contentEditable"),e.find("[contenteditable]").removeAttr("contentEditable"))}),n.on("SetContent",function(){var t=o("."+r);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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(t,o,e){var n,i;t.dom.toggleClass(t.getBody(),"mce-visualblocks"),e.set(!e.get()),n=t,i=e.get(),n.fire("VisualBlocks",{state:i})},f=function(e,n){return function(o){o.setActive(n.get());var t=function(t){return o.setActive(t.state)};return e.on("VisualBlocks",t),function(){return e.off("VisualBlocks",t)}}};t.add("visualblocks",function(t,o){var e,n,i,s,c,u,l,a=(e=!1,{get:function(){return e},set:function(t){e=t}});i=a,(n=t).addCommand("mceVisualBlocks",function(){r(n,0,i)}),c=a,(s=t).ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:function(){return s.execCommand("mceVisualBlocks")},onSetup:f(s,c)}),s.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:function(){return s.execCommand("mceVisualBlocks")},onSetup:f(s,c)}),l=a,(u=t).on("PreviewFormats AfterPreviewFormats",function(t){l.get()&&u.dom.toggleClass(u.getBody(),"mce-visualblocks","afterpreviewformats"===t.type)}),u.on("init",function(){u.getParam("visualblocks_default_state",!1,"boolean")&&r(u,0,l)})})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var n,t,e,r,o,u,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=function(n){return function(){return n}},a=c(!1),s=c(!0),f=function(){return l},l=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:a,isSome:a,isNone:s,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:c(null),getOrUndefined:c(undefined),or:e,orThunk:t,map:f,each:function(){},bind:f,exists:a,forall:s,filter:f,equals:n,equals_:n,toArray:function(){return[]},toString:c("none()")}),d=function(e){var n=c(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:s,isNone:a,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return d(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?o:l},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(a,function(n){return t(e,n)})}};return o},m=function(n){return null===n||n===undefined?l:d(n)},v=function(t){return function(n){return typeof n===t}},g=(r="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)===r;var t,e}),h=v("boolean"),p=v("number"),y=function(n,t){for(var e=0,r=n.length;e<r;e++){t(n[e],e)}},b=Object.keys,w=function(n,t){for(var e=b(n),r=0,o=e.length;r<o;r++){var u=e[r];t(n[u],u)}},N=("undefined"!=typeof window||Function("return this;")(),function(n){return n.dom.nodeValue}),T=(o=3,function(n){return n.dom.nodeType===o}),k=function(n,t,e){!function(n,t,e){if(!(g(e)||h(e)||p(e)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",e,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,e+"")}(n.dom,t,e)},A=function(n,t){n.dom.removeAttribute(t)},O=function(n,t){var e,r,o=(e=t,null===(r=n.dom.getAttribute(e))?undefined:r);return o===undefined||""===o?[]:o.split(" ")},C=function(n){return n.dom.classList!==undefined},S=function(n,t){return o=t,u=O(e=n,r="class").concat([o]),k(e,r,u.join(" ")),!0;var e,r,o,u},D=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}(O(e=n,r="class"),function(n){return n!==o})).length?k(e,r,u.join(" ")):A(e,r),!1;var e,r,o,u},E=function(n){0===(C(n)?n.dom.classList:O(n,"class")).length&&A(n,"class")},L=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:n}},x={fromHtml:function(n,t){var e=(t||document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return L(e.childNodes[0])},fromTag:function(n,t){var e=(t||document).createElement(n);return L(e)},fromText:function(n,t){var e=(t||document).createTextNode(n);return L(e)},fromDom:L,fromPoint:function(n,t,e){return m(n.dom.elementFromPoint(t,e)).map(L)}},V={"\xa0":"nbsp","\xad":"shy"},B=function(n,t){var e="";return w(n,function(n,t){e+=t}),new RegExp("["+e+"]",t?"g":"")},P=B(V),_=B(V,!0),j=(u="",w(V,function(n){u&&(u+=","),u+="span.mce-"+n}),u),M="mce-nbsp",q=function(n){return'<span data-mce-bogus="1" class="mce-'+V[n]+'">'+n+"</span>"},H=function(n){var t=N(n);return T(n)&&t!==undefined&&P.test(t)},F=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,x.fromDom);return y(r,function(n){t(n)&&(e=e.concat([n])),e=e.concat(F(n,t))}),e},I=function(n){return"span"===n.nodeName.toLowerCase()&&n.classList.contains("mce-nbsp-wrap")},U=function(c,n){var t=F(x.fromDom(n),H);y(t,function(n){var t,e,r=n.dom.parentNode;if(I(r))t=x.fromDom(r),e=M,C(t)?t.dom.classList.add(e):S(t,e);else{for(var o=c.dom.encode(N(n)).replace(_,q),u=c.dom.create("div",null,o),i=void 0;i=u.lastChild;)c.dom.insertAfter(i,n.dom);c.dom.remove(n.dom)}})},K=function(r,n){var t=r.dom.select(j,n);y(t,function(n){var t,e;I(n)?(t=x.fromDom(n),e=M,C(t)?t.dom.classList.remove(e):D(t,e),E(t)):r.dom.remove(n,!0)})},R=function(n){var t=n.getBody(),e=n.selection.getBookmark(),r=(r=function(n,t){for(;n.parentNode;){if(n.parentNode===t)return n;n=n.parentNode}}(n.selection.getNode(),t))!==undefined?r:t;K(n,r),U(n,r),n.selection.moveToBookmark(e)},z=function(n,t){var e,r;e=n,r=t.get(),e.fire("VisualChars",{state:r});var o=n.getBody();(!0===t.get()?U:K)(n,o)},G=function(n,t){n.addCommand("mceVisualChars",function(){!function(n,t){t.set(!t.get());var e=n.selection.getBookmark();z(n,t),n.selection.moveToBookmark(e)}(n,t)})},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)}}};i.add("visualchars",function(n){var t,e,r,o,u,i,c,a,s,f,l=(t=n.getParam("visualchars_default_state",!1),e=t,{get:function(){return e},set:function(n){e=n}});return G(n,l),o=l,(r=n).ui.registry.addToggleButton("visualchars",{tooltip:"Show invisible characters",icon:"visualchars",onAction:function(){return r.execCommand("mceVisualChars")},onSetup:Q(r,o)}),r.ui.registry.addToggleMenuItem("visualchars",{text:"Show invisible characters",icon:"visualchars",onAction:function(){return r.execCommand("mceVisualChars")},onSetup:Q(r,o)}),u=n,i=l,c=J.debounce(function(){R(u)},300),!1!==u.getParam("forced_root_block")&&u.on("keydown",function(n){!0===i.get()&&(13===n.keyCode?R(u):c())}),u.on("remove",c.stop),s=l,(a=n).on("init",function(){z(a,s)}),f=l,{isEnabled:function(){return f.get()}}})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var s,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(t){return t},a=function(){return(a=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",i="\\n",g="[\x0B\f\x85\u2028\u2029]",l="[\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]",p="[\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200e\u200f\u202a-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb]",f="[\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<>]",h="[!-#%-*,-\\/:;?@\\[-\\]_{}\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]",C=0,y=1,v=2,w=3,m=4,E=5,W=6,x=7,R=8,b=9,S=10,F=11,j=12,A=13,D=[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(i),new RegExp(g),new RegExp(l),new RegExp(p),new RegExp(f),new RegExp(d),new RegExp("@")],T=new RegExp("^"+h+"$"),B=D,k=A,P=function(t){for(var e=k,n=B.length,r=0;r<n;++r){var o=B[r];if(o&&o.test(t)){e=r;break}}return e},M=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=P,r={},function(t){if(r[t])return r[t];var e=n(t);return r[t]=e}))},O=/^\s+$/,U=T,_=function(t,e){var n=function(t,e){for(var n=e;n<t.length&&!O.test(t[n]);n++);return n}(t,e+1);return"://"===t.slice(e+1,n).join("").substr(0,3)?n:e},N=function(t,e,n,r){for(var o,u,c,i,a,s,g,l=[],p=[],f=0;f<n.length;++f){p.push(t[f]),function(t,e){var n=t[e],r=t[e+1];if(e<0||e>t.length-1&&0!==e)return!1;if(n===C&&r===C)return!1;var o=t[e+2];if(n===C&&(r===v||r===y||r===j)&&o===C)return!1;var u=t[e-1];return(n!==v&&n!==y&&r!==j||r!==C||u!==C)&&((n!==m&&n!==C||r!==m&&r!==C)&&((n!==w&&n!==y||r!==m||u!==m)&&((n!==m||r!==w&&r!==y||o!==m)&&(n!==R&&n!==b&&u!==R&&u!==b&&r!==R&&r!==b&&((n!==E||r!==W)&&(n===x||n===E||n===W||(r===x||r===E||r===W||(n!==S||r!==S)&&((r!==F||n!==C&&n!==m&&n!==S&&n!==F)&&((n!==F||r!==C&&r!==m&&r!==S)&&n!==j)))))))))}(n,f)&&(o=e[f],!r.includeWhitespace&&O.test(o)||!r.includePunctuation&&U.test(o)||(u=f-p.length+1,c=f+1,i=e.slice(u,c).join(""),"http"!==(g=i)&&"https"!==g||(a=_(e,f),s=t.slice(c,a),Array.prototype.push.apply(p,s),f=a),l.push(p)),p=[])}return l},$=function(t,e,n){n=a(a({},{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))}var i=M(o);return N(r,o,i,n)},z=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),I=function(t,e){for(var n,r=e.getBlockElements(),o=e.getShortEndedElements(),u=[],c="",i=new z(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},q=function(t,e){var n=I(t,e).join("\n");return $(n.split(""),r).length},G=function(t,e){var n=I(t,e).join("");return Z(n)},H=function(t,e){var n=I(t,e).join("").replace(/\s/g,"");return Z(n)},J=function(t,e){return function(){return e(t.getBody(),t.schema)}},K=function(t,e){return function(){return e(t.selection.getRng().cloneContents(),t.schema)}},L=function(t){return J(t,q)},Q=tinymce.util.Tools.resolve("tinymce.util.Delay"),V=function(t,e){var n;n=e,t.fire("wordCountUpdate",{wordCount:{words:n.body.getWordCount(),characters:n.body.getCharacterCount(),charactersWithoutSpaces:n.body.getCharacterCountWithoutSpaces()}})},X=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}]})};void 0===s&&(s=300),t.add("wordcount",function(t){var e,n,r,o,u,c,i,a={body:{getWordCount:L(e=t),getCharacterCount:J(e,G),getCharacterCountWithoutSpaces:J(e,H)},selection:{getWordCount:K(e,q),getCharacterCount:K(e,G),getCharacterCountWithoutSpaces:K(e,H)},getCount:L(e)};return r=a,(n=t).ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:function(){return X(n,r)}}),n.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:function(){return X(n,r)}}),o=t,u=a,c=s,i=Q.debounce(function(){return V(o,u)},c),o.on("init",function(){V(o,u),Q.setEditorTimeout(o,function(){o.on("SetContent BeforeAddUndo Undo Redo keyup",i)},0)}),a})}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
9
  !function(){"use strict";var x=function(){return(x=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}).apply(this,arguments)};function c(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(n);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(n,r[o])&&(t[r[o]]=n[r[o]]);return t}function u(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;for(var r=Array(n),o=0,e=0;e<t;e++)for(var i=arguments[e],u=0,c=i.length;u<c;u++,o++)r[o]=i[u];return r}var O=function(){},i=function(t,r){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(r.apply(null,n))}},y=function(n){return function(){return n}},v=function(n){return n};function b(r){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=o.concat(n);return r.apply(null,t)}}var n,e,t,r,o,a,m=function(e){return function(n){return!e(n)}},f=function(n){return function(){throw new Error(n)}},s=function(n){return n()},l=y(!1),w=y(!0),d=function(t){var r,o=!1;return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return o||(o=!0,r=t.apply(null,n)),r}},g=function(){return p},p=(n=function(n){return n.isNone()},{fold:function(n,e){return n()},is:l,isSome:l,isNone:w,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:y(null),getOrUndefined:y(undefined),or:t,orThunk:e,map:g,each:O,bind:g,exists:l,forall:w,filter:g,equals:n,equals_:n,toArray:function(){return[]},toString:y("none()")}),h=function(t){var n=y(t),e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:w,isNone:l,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return h(n(t))},each:function(n){n(t)},bind:r,exists:r,forall:r,filter:function(n){return n(t)?o:p},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(l,function(n){return e(t,n)})}};return o},T={some:h,none:g,from:function(n){return null===n||n===undefined?p:h(n)}},S=function(r){return function(n){return t=typeof(e=n),(null===e?"null":"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)===r;var e,t}},k=function(e){return function(n){return typeof n===e}},E=S("string"),C=S("object"),M=S("array"),D=k("boolean"),_=function(n){return!(null===(e=n)||e===undefined);var e},I=k("function"),F=k("number"),R=Array.prototype.slice,V=Array.prototype.indexOf,B=Array.prototype.push,A=function(n,e){return t=n,r=e,-1<V.call(t,r);var t,r},j=function(n,e){for(var t=0,r=n.length;t<r;t++){if(e(n[t],t))return!0}return!1},N=function(n,e){for(var t=n.length,r=new Array(t),o=0;o<t;o++){var i=n[o];r[o]=e(i,o)}return r},P=function(n,e){for(var t=0,r=n.length;t<r;t++){e(n[t],t)}},H=function(n,e){for(var t=[],r=0,o=n.length;r<o;r++){var i=n[r];e(i,r)&&t.push(i)}return t},z=function(n,e,t){return function(n,e){for(var t=n.length-1;0<=t;t--){e(n[t],t)}}(n,function(n){t=e(t,n)}),t},L=function(n,e,t){return P(n,function(n){t=e(t,n)}),t},G=function(n,e){return function(n,e,t){for(var r=0,o=n.length;r<o;r++){var i=n[r];if(e(i,r))return T.some(i);if(t(i,r))break}return T.none()}(n,e,l)},$=function(n,e){for(var t=0,r=n.length;t<r;t++){if(e(n[t],t))return T.some(t)}return T.none()},U=function(n){for(var e=[],t=0,r=n.length;t<r;++t){if(!M(n[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+n);B.apply(e,n[t])}return e},W=function(n,e){return U(N(n,e))},X=function(n,e){for(var t=0,r=n.length;t<r;++t){if(!0!==e(n[t],t))return!1}return!0},q=function(n){var e=R.call(n,0);return e.reverse(),e},Y=function(n,e){return H(n,function(n){return!A(e,n)})},K=function(n){return[n]},J=function(n){return e=n,(t=0)<=t&&t<e.length?T.some(e[t]):T.none();var e,t},Q=function(n,e){for(var t=0;t<n.length;t++){var r=e(n[t],t);if(r.isSome())return r}return T.none()},Z=function(n,e){var t=function(n,e){for(var t=0;t<n.length;t++){var r=n[t];if(r.test(e))return r}return undefined}(n,e);if(!t)return{major:0,minor:0};var r=function(n){return Number(e.replace(t,"$"+n))};return en(r(1),r(2))},nn=function(){return en(0,0)},en=function(n,e){return{major:n,minor:e}},tn={nu:en,detect:function(n,e){var t=String(e).toLowerCase();return 0===n.length?nn():Z(n,t)},unknown:nn},rn=function(n,e){var t=String(e).toLowerCase();return G(n,function(n){return n.search(t)})},on=function(n,t){return rn(n,t).map(function(n){var e=tn.detect(n.versionRegexes,t);return{current:n.name,version:e}})},un=function(n,t){return rn(n,t).map(function(n){var e=tn.detect(n.versionRegexes,t);return{current:n.name,version:e}})},cn=function(n,o){return n.replace(/\$\{([^{}]*)\}/g,function(n,e){var t,r=o[e];return"string"==(t=typeof r)||"number"==t?r.toString():n})},an=function(n,e){return-1!==n.indexOf(e)},fn=(r=/^\s+|\s+$/g,function(n){return n.replace(r,"")}),sn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ln=function(e){return function(n){return an(n,e)}},dn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return an(n,"edge/")&&an(n,"chrome")&&an(n,"safari")&&an(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,sn],search:function(n){return an(n,"chrome")&&!an(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return an(n,"msie")||an(n,"trident")}},{name:"Opera",versionRegexes:[sn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ln("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ln("firefox")},{name:"Safari",versionRegexes:[sn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(an(n,"safari")||an(n,"mobile/"))&&an(n,"applewebkit")}}],mn=[{name:"Windows",search:ln("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return an(n,"iphone")||an(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ln("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ln("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ln("linux"),versionRegexes:[]},{name:"Solaris",search:ln("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ln("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ln("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],gn={browsers:y(dn),oses:y(mn)},pn="Firefox",hn=function(n){var e=n.current,t=n.version,r=function(n){return function(){return e===n}};return{current:e,version:t,isEdge:r("Edge"),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r(pn),isSafari:r("Safari")}},vn={unknown:function(){return hn({current:undefined,version:tn.unknown()})},nu:hn,edge:y("Edge"),chrome:y("Chrome"),ie:y("IE"),opera:y("Opera"),firefox:y(pn),safari:y("Safari")},yn="Windows",bn="Android",xn="Solaris",wn="FreeBSD",Sn="ChromeOS",On=function(n){var e=n.current,t=n.version,r=function(n){return function(){return e===n}};return{current:e,version:t,isWindows:r(yn),isiOS:r("iOS"),isAndroid:r(bn),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r(xn),isFreeBSD:r(wn),isChromeOS:r(Sn)}},Tn={unknown:function(){return On({current:undefined,version:tn.unknown()})},nu:On,windows:y(yn),ios:y("iOS"),android:y(bn),linux:y("Linux"),osx:y("OSX"),solaris:y(xn),freebsd:y(wn),chromeos:y(Sn)},kn=function(n,e){var t,r,o,i,u,c,a,f,s,l,d,m,g=gn.browsers(),p=gn.oses(),h=on(g,n).fold(vn.unknown,vn.nu),v=un(p,n).fold(Tn.unknown,Tn.nu);return{browser:h,os:v,deviceType:(r=h,o=n,i=e,u=(t=v).isiOS()&&!0===/ipad/i.test(o),c=t.isiOS()&&!u,a=t.isiOS()||t.isAndroid(),f=a||i("(pointer:coarse)"),s=u||!c&&a&&i("(min-device-width:768px)"),l=c||a&&!s,d=r.isSafari()&&t.isiOS()&&!1===/safari/i.test(o),m=!l&&!s&&!d,{isiPad:y(u),isiPhone:y(c),isTablet:y(s),isPhone:y(l),isTouch:y(f),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:y(d),isDesktop:y(m)})}},En=function(n){return window.matchMedia(n).matches},Cn=d(function(){return kn(navigator.userAgent,En)}),Mn=function(){return Cn()},Dn=y,_n=Dn("touchstart"),In=Dn("touchmove"),Fn=Dn("touchend"),Rn=Dn("mousedown"),Vn=Dn("mousemove"),Bn=Dn("mouseup"),An=Dn("mouseover"),jn=Dn("keydown"),Nn=Dn("keyup"),Pn=Dn("input"),Hn=Dn("change"),zn=Dn("click"),Ln=Dn("transitionend"),Gn=Dn("selectstart"),$n=function(n){return y("alloy."+n)},Un={tap:$n("tap")},Wn=$n("focus"),Xn=$n("blur.post"),qn=$n("paste.post"),Yn=$n("receive"),Kn=$n("execute"),Jn=$n("focus.item"),Qn=Un.tap,Zn=$n("longpress"),ne=$n("system.init"),ee=$n("system.attached"),te=$n("system.detached"),re=$n("focusmanager.shifted"),oe=$n("highlight"),ie=$n("dehighlight"),ue=function(n,e){se(n,n.element,e,{})},ce=function(n,e,t){se(n,n.element,e,t)},ae=function(n){ue(n,Kn())},fe=function(n,e,t){se(n,e,t,{})},se=function(n,e,t,r){var o=x({target:e},r);n.getSystem().triggerEvent(t,e,o)},le=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:n}},de={fromHtml:function(n,e){var t=(e||document).createElement("div");if(t.innerHTML=n,!t.hasChildNodes()||1<t.childNodes.length)throw console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return le(t.childNodes[0])},fromTag:function(n,e){var t=(e||document).createElement(n);return le(t)},fromText:function(n,e){var t=(e||document).createTextNode(n);return le(t)},fromDom:le,fromPoint:function(n,e,t){return T.from(n.dom.elementFromPoint(e,t)).map(le)}},me=function(n,e){var t=n.dom;if(1!==t.nodeType)return!1;var r=t;if(r.matches!==undefined)return r.matches(e);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(e);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(e);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},ge=function(n){return 1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType||0===n.childElementCount},pe=function(n,e){var t=e===undefined?document:e.dom;return ge(t)?[]:N(t.querySelectorAll(n),de.fromDom)},he=function(n,e){var t=e===undefined?document:e.dom;return ge(t)?T.none():T.from(t.querySelector(n)).map(de.fromDom)},ve=function(n,e){return n.dom===e.dom},ye=("undefined"!=typeof window||Function("return this;")(),function(n){return n.dom.nodeName.toLowerCase()}),be=function(e){return function(n){return n.dom.nodeType===e}},xe=be(1),we=be(3),Se=be(9),Oe=be(11),Te=function(n){return de.fromDom(n.dom.ownerDocument)},ke=function(n){return Se(n)?n:Te(n)},Ee=function(n){return T.from(n.dom.parentNode).map(de.fromDom)},Ce=function(n){return N(n.dom.childNodes,de.fromDom)},Me=function(n,e){var t=n.dom.childNodes;return T.from(t[e]).map(de.fromDom)},De=function(e,t){Ee(e).each(function(n){n.dom.insertBefore(t.dom,e.dom)})},_e=function(n,e){var t;(t=n,T.from(t.dom.nextSibling).map(de.fromDom)).fold(function(){Ee(n).each(function(n){Fe(n,e)})},function(n){De(n,e)})},Ie=function(e,t){Me(e,0).fold(function(){Fe(e,t)},function(n){e.dom.insertBefore(t.dom,n.dom)})},Fe=function(n,e){n.dom.appendChild(e.dom)},Re=function(e,n){P(n,function(n){Fe(e,n)})},Ve=function(n){n.dom.textContent="",P(Ce(n),function(n){Be(n)})},Be=function(n){var e=n.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Ae=I(Element.prototype.attachShadow)&&I(Node.prototype.getRootNode),je=y(Ae),Ne=Ae?function(n){return de.fromDom(n.dom.getRootNode())}:ke,Pe=function(n){var e=Ne(n);return Oe(e)?T.some(e):T.none()},He=function(n){return de.fromDom(n.dom.host)},ze=function(n){return _(n.dom.shadowRoot)},Le=function(n){var e=we(n)?n.dom.parentNode:n.dom;if(e===undefined||null===e||null===e.ownerDocument)return!1;var t,r,o=e.ownerDocument;return Pe(de.fromDom(e)).fold(function(){return o.body.contains(e)},(t=Le,r=He,function(n){return t(r(n))}))},Ge=function(){return $e(de.fromDom(document))},$e=function(n){var e=n.dom.body;if(null===e||e===undefined)throw new Error("Body is not available yet");return de.fromDom(e)},Ue=function(n){ue(n,te());var e=n.components();P(e,Ue)},We=function(n){var e=n.components();P(e,We),ue(n,ee())},Xe=function(n,e){Fe(n.element,e.element)},qe=function(e,n){var t,r=e.components();P((t=e).components(),function(n){return Be(n.element)}),Ve(t.element),t.syncComponents();var o=Y(r,n);P(o,function(n){Ue(n),e.getSystem().removeFromWorld(n)}),P(n,function(n){n.getSystem().isConnected()?Xe(e,n):(e.getSystem().addToWorld(n),Xe(e,n),Le(e.element)&&We(n)),e.syncComponents()})},Ye=function(n,e,t){n.getSystem().addToWorld(e),t(n.element,e.element),Le(n.element)&&We(e),n.syncComponents()},Ke=function(e){var n,t=Ee(e.element).bind(function(n){return e.getSystem().getByDom(n).toOptional()});Ue(n=e),Be(n.element),n.getSystem().removeFromWorld(n),t.each(function(n){n.syncComponents()})},Je=function(n,e,t){t(n,e.element);var r=Ce(e.element);P(r,function(n){e.getByDom(n).each(We)})},Qe=Object.keys,Ze=Object.hasOwnProperty,nt=function(n,e){for(var t=Qe(n),r=0,o=t.length;r<o;r++){var i=t[r];e(n[i],i)}},et=function(n,t){return tt(n,function(n,e){return{k:e,v:t(n,e)}})},tt=function(n,r){var o={};return nt(n,function(n,e){var t=r(n,e);o[t.k]=t.v}),o},rt=function(n,e){var t,r,o,i,u={};return t=e,i=u,r=function(n,e){i[e]=n},o=O,nt(n,function(n,e){(t(n,e)?r:o)(n,e)}),u},ot=function(n,t){var r=[];return nt(n,function(n,e){r.push(t(n,e))}),r},it=function(n,e){return ut(n,e)?T.from(n[e]):T.none()},ut=function(n,e){return Ze.call(n,e)},ct=function(n,e){return ut(n,e)&&n[e]!==undefined&&null!==n[e]},at=function(n,e,t){if(!(E(t)||D(t)||F(t)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",t,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(e,t+"")},ft=function(n,e,t){at(n.dom,e,t)},st=function(n,e){var t=n.dom;nt(e,function(n,e){at(t,e,n)})},lt=function(n,e){var t=n.dom.getAttribute(e);return null===t?undefined:t},dt=function(n,e){return T.from(lt(n,e))},mt=function(n,e){var t=n.dom;return!(!t||!t.hasAttribute)&&t.hasAttribute(e)},gt=function(n,e){n.dom.removeAttribute(e)},pt=function(n,e){var t=lt(n,e);return t===undefined||""===t?[]:t.split(" ")},ht=function(n){return n.dom.classList!==undefined},vt=function(n,e){return o=e,i=pt(t=n,r="class").concat([o]),ft(t,r,i.join(" ")),!0;var t,r,o,i},yt=function(n,e){return o=e,0<(i=H(pt(t=n,r="class"),function(n){return n!==o})).length?ft(t,r,i.join(" ")):gt(t,r),!1;var t,r,o,i},bt=function(n,e){ht(n)?n.dom.classList.add(e):vt(n,e)},xt=function(n){0===(ht(n)?n.dom.classList:pt(n,"class")).length&&gt(n,"class")},wt=function(n,e){ht(n)?n.dom.classList.remove(e):yt(n,e),xt(n)},St=function(n,e){return ht(n)&&n.dom.classList.contains(e)},Ot=function(n,e,t){wt(n,t),bt(n,e)},Tt=/* */Object.freeze({__proto__:null,toAlpha:function(n,e,t){Ot(n.element,e.alpha,e.omega)},toOmega:function(n,e,t){Ot(n.element,e.omega,e.alpha)},isAlpha:function(n,e,t){return St(n.element,e.alpha)},isOmega:function(n,e,t){return St(n.element,e.omega)},clear:function(n,e,t){wt(n.element,e.alpha),wt(n.element,e.omega)}}),kt=function(t){return{is:function(n){return t===n},isValue:w,isError:l,getOr:y(t),getOrThunk:y(t),getOrDie:y(t),or:function(n){return kt(t)},orThunk:function(n){return kt(t)},fold:function(n,e){return e(t)},map:function(n){return kt(n(t))},mapError:function(n){return kt(t)},each:function(n){n(t)},bind:function(n){return n(t)},exists:function(n){return n(t)},forall:function(n){return n(t)},toOptional:function(){return T.some(t)}}},Et=function(t){return{is:l,isValue:l,isError:w,getOr:v,getOrThunk:function(n){return n()},getOrDie:function(){return f(String(t))()},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,e){return n(t)},map:function(n){return Et(t)},mapError:function(n){return Et(n(t))},each:O,bind:function(n){return Et(t)},exists:l,forall:w,toOptional:T.none}},Ct={value:kt,error:Et,fromOption:function(n,e){return n.fold(function(){return Et(e)},kt)}};(a=o=o||{})[a.Error=0]="Error",a[a.Value=1]="Value";var Mt,Dt,_t,It,Ft,Rt=function(n,e,t){return n.stype===o.Error?e(n.serror):t(n.svalue)},Vt=function(n){return{stype:o.Value,svalue:n}},Bt=function(n){return{stype:o.Error,serror:n}},At=function(n){return n.fold(Bt,Vt)},jt=function(n){return Rt(n,Ct.error,Ct.value)},Nt=Vt,Pt=function(n){var e=[],t=[];return P(n,function(n){Rt(n,function(n){return t.push(n)},function(n){return e.push(n)})}),{values:e,errors:t}},Ht=Bt,zt=function(n,e){return n.stype===o.Value?e(n.svalue):n},Lt=function(n,e){return n.stype===o.Error?e(n.serror):n},Gt=function(n,e){return n.stype===o.Value?{stype:o.Value,svalue:e(n.svalue)}:n},$t=function(n,e){return n.stype===o.Error?{stype:o.Error,serror:e(n.serror)}:n},Ut=function(u){if(!M(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var c=[],t={};return P(u,function(n,r){var e=Qe(n);if(1!==e.length)throw new Error("one and only one name per case");var o=e[0],i=n[o];if(t[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!M(i))throw new Error("case arguments must be an array");c.push(o),t[o]=function(){var n=arguments.length;if(n!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+n);for(var t=new Array(n),e=0;e<t.length;e++)t[e]=arguments[e];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[r].apply(null,t)},match:function(n){var e=Qe(n);if(c.length!==e.length)throw new Error("Wrong number of arguments to match. Expected: "+c.join(",")+"\nActual: "+e.join(","));if(!X(c,function(n){return A(e,n)}))throw new Error("Not all branches were specified when using match. Specified: "+e.join(", ")+"\nRequired: "+c.join(", "));return n[o].apply(null,t)},log:function(n){console.log(n,{constructors:c,constructor:o,params:t})}}}}),t},Wt=Object.prototype.hasOwnProperty,Xt=function(u){return function(){for(var n=new Array(arguments.length),e=0;e<n.length;e++)n[e]=arguments[e];if(0===n.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<n.length;r++){var o=n[r];for(var i in o)Wt.call(o,i)&&(t[i]=u(t[i],o[i]))}return t}},qt=Xt(function(n,e){return C(n)&&C(e)?qt(n,e):e}),Yt=Xt(function(n,e){return e}),Kt=Ut([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),Jt=function(n){return Kt.defaultedThunk(y(n))},Qt=Kt.strict,Zt=Kt.asOption,nr=Kt.defaultedThunk,er=(Kt.asDefaultedOptionThunk,Kt.mergeWithThunk),tr=(Ut([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(n,e){var t={};return t[n]=e,t}),rr=function(n,e){return t=e,r={},nt(n,function(n,e){A(t,e)||(r[e]=n)}),r;var t,r},or=tr,ir=function(n){return e={},P(n,function(n){e[n.key]=n.value}),e;var e},ur=function(n,e){var t,r,o,i,u,c=(t=[],r=[],P(n,function(n){n.fold(function(n){t.push(n)},function(n){r.push(n)})}),{errors:t,values:r});return 0<c.errors.length?(u=c.errors,Ct.error(U(u))):(i=e,0===(o=c.values).length?Ct.value(i):Ct.value(qt(i,Yt.apply(undefined,o))))},cr=function(n){return i(Ht,U)(n)},ar=function(n,e){var t,r,o=Pt(n);return 0<o.errors.length?cr(o.errors):(t=o.values,r=e,0<t.length?Nt(qt(r,Yt.apply(undefined,t))):Nt(r))},fr=function(n){var e=Pt(n);return 0<e.errors.length?cr(e.errors):Nt(e.values)},sr=function(n){return C(n)&&100<Qe(n).length?" removed due to size":JSON.stringify(n,null,2)},lr=function(n,e){return Ht([{path:n,getErrorInfo:e}])},dr=Ut([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),mr=function(t,r,o){return it(r,o).fold(function(){return n=o,e=r,lr(t,function(){return'Could not find valid *strict* value for "'+n+'" in '+sr(e)});var n,e},Nt)},gr=function(n,e,t){var r=it(n,e).fold(function(){return t(n)},v);return Nt(r)},pr=function(c,a,n,f){return n.fold(function(o,t,n,r){var i=function(n){var e=r.extract(c.concat([o]),f,n);return Gt(e,function(n){return tr(t,f(n))})},u=function(n){return n.fold(function(){var n=tr(t,f(T.none()));return Nt(n)},function(n){var e=r.extract(c.concat([o]),f,n);return Gt(e,function(n){return tr(t,f(T.some(n)))})})};return n.fold(function(){return zt(mr(c,a,o),i)},function(n){return zt(gr(a,o,n),i)},function(){return zt(Nt(it(a,o)),u)},function(n){return zt((t=n,r=it(e=a,o).map(function(n){return!0===n?t(e):n}),Nt(r)),u);var e,t,r},function(n){var e=n(a),t=Gt(gr(a,o,y({})),function(n){return qt(e,n)});return zt(t,i)})},function(n,e){var t=e(a);return Nt(tr(n,f(t)))})},hr=function(r){return{extract:function(t,n,e){return Lt(r(e,n),function(n){return e=n,lr(t,function(){return e});var e})},toString:function(){return"val"}}},vr=function(n){var u=yr(n),c=z(n,function(e,n){return n.fold(function(n){return qt(e,or(n,!0))},y(e))},{});return{extract:function(n,e,t){var r,o=D(t)?[]:Qe(rt(t,function(n){return n!==undefined&&null!==n})),i=H(o,function(n){return!ct(c,n)});return 0===i.length?u.extract(n,e,t):(r=i,lr(n,function(){return"There are unsupported fields: ["+r.join(", ")+"] specified"}))},toString:u.toString}},yr=function(c){return{extract:function(n,e,t){return r=n,o=t,i=e,u=N(c,function(n){return pr(r,o,n,i)}),ar(u,{});var r,o,i,u},toString:function(){return"obj{\n"+N(c,function(n){return n.fold(function(n,e,t,r){return n+" -> "+r.toString()},function(n,e){return"state("+n+")"})}).join("\n")+"}"}}},br=function(t,i){var u=function(n,e){return o=hr(t),function(t,r,n){var e=N(n,function(n,e){return o.extract(t.concat(["["+e+"]"]),r,n)});return fr(e)}(n,v,e);var o};return{extract:function(t,r,o){var n=Qe(o),e=u(t,n);return zt(e,function(n){var e=N(n,function(n){return dr.field(n,n,Qt(),i)});return yr(e).extract(t,r,o)})},toString:function(){return"setOf("+i.toString()+")"}}},xr=y(hr(Nt)),wr=dr.state,Sr=dr.field,Or=function(t,e,r,o,i){return it(o,i).fold(function(){return n=o,e=i,lr(t,function(){return'The chosen schema: "'+e+'" did not exist in branches: '+sr(n)});var n,e},function(n){return n.extract(t.concat(["branch: "+i]),e,r)})},Tr=function(o,i){return{extract:function(e,t,r){return it(r,o).fold(function(){return n=o,lr(e,function(){return'Choice schema did not contain choice key: "'+n+'"'});var n},function(n){return Or(e,t,r,i,n)})},toString:function(){return"chooseOn("+o+"). Possible values: "+Qe(i)}}},kr=hr(Nt),Er=function(e){return hr(function(n){return e(n).fold(Ht,Nt)})},Cr=function(e,n){return br(function(n){return At(e(n))},n)},Mr=function(n,e,t){return jt((r=n,o=v,i=t,u=e.extract([r],o,i),$t(u,function(n){return{input:i,errors:n}})));var r,o,i,u},Dr=function(n){return n.fold(function(n){throw new Error(Ir(n))},v)},_r=function(n,e,t){return Dr(Mr(n,e,t))},Ir=function(n){return"Errors: \n"+(e=n.errors,t=10<e.length?e.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):e,N(t,function(n){return"Failed path: ("+n.path.join(" > ")+")\n"+n.getErrorInfo()}).join("\n"))+"\n\nInput object: "+sr(n.input);var e,t},Fr=function(n,e){return Tr(n,et(e,yr))},Rr=y(kr),Vr=(Mt=I,Dt="function",hr(function(n){var e=typeof n;return Mt(n)?Nt(n):Ht("Expected type: "+Dt+" but got: "+e)})),Br=function(n){return Sr(n,n,Qt(),xr())},Ar=function(n,e){return Sr(n,n,Qt(),e)},jr=function(n,e){return Sr(n,n,Qt(),yr(e))},Nr=function(n){return Sr(n,n,Zt(),xr())},Pr=function(n,e){return Sr(n,n,Zt(),e)},Hr=function(n,e){return Pr(n,yr(e))},zr=function(n,e){return Pr(n,vr(e))},Lr=function(n,e){return Sr(n,n,Jt(e),xr())},Gr=function(n,e,t){return Sr(n,n,Jt(e),t)},$r=function(n,e){return wr(n,e)},Ur=[Br("alpha"),Br("omega")],Wr=function(n){return I(n)?n:l},Xr=function(n,e,t){var r=e(n),o=Wr(t);return r.orThunk(function(){return o(n)?T.none():function(n,e,t){for(var r=n.dom,o=Wr(t);r.parentNode;){r=r.parentNode;var i=de.fromDom(r),u=e(i);if(u.isSome())return u;if(o(i))break}return T.none()}(n,e,o)})},qr=function(n,e){return ve(n.element,e.event.target)},Yr=function(n){if(!ct(n,"can")&&!ct(n,"abort")&&!ct(n,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(n,null,2)+" does not have can, abort, or run!");return _r("Extracting event.handler",vr([Lr("can",w),Lr("abort",l),Lr("run",O)]),n)},Kr=function(t){var e,r,o,i,n=(r=function(n){return n.can},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return L(e,function(n,e){return n&&r(e).apply(undefined,t)},!0)}),u=(o=e=t,i=function(n){return n.abort},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return L(o,function(n,e){return n||i(e).apply(undefined,t)},!1)});return Yr({can:n,abort:u,run:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];P(t,function(n){n.run.apply(undefined,e)})}})},Jr=ir,Qr=function(n,e){return{key:n,value:Yr({abort:e})}},Zr=function(n,e){return{key:n,value:Yr({run:e})}},no=function(n,t,r){return{key:n,value:Yr({run:function(n,e){t.apply(undefined,[n,e].concat(r))}})}},eo=function(n){return function(t){return{key:n,value:Yr({run:function(n,e){qr(n,e)&&t(n,e)}})}}},to=function(u,e){return Zr(u,function(n,i){n.getSystem().getByUid(e).each(function(n){var e,t,r,o;t=(e=n).element,r=u,o=i,e.getSystem().triggerEvent(r,t,o.event)})})},ro=function(n,e,t){var r=e.partUids[t];return to(n,r)},oo=function(n){return Zr(n,function(n,e){e.cut()})},io=eo(ee()),uo=eo(te()),co=eo(ne()),ao=(_t=Kn(),function(n){return Zr(_t,n)}),fo=function(n){return N(n,function(n){return r=e="/*",o=(t=n).length-e.length,""===r||t.length>=r.length&&t.substr(o,o+r.length)===r?n.substring(0,n.length-"/*".length):n;var e,t,r,o})},so=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:fo(i)}},n},lo=function(n){return{classes:n.classes!==undefined?n.classes:[],attributes:n.attributes!==undefined?n.attributes:{},styles:n.styles!==undefined?n.styles:{}}},mo=function(t,r,o){return co(function(n,e){o(n,t,r)})},go=function(o,i,u){var n,e,t,r,c,a;return n=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var r=[t].concat(n);return t.config({name:y(o)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+o+". Using API: "+u)},function(n){var e=Array.prototype.slice.call(r,1);return i.apply(undefined,[t,n.config,n.state].concat(e))})},e=u,t=i.toString(),r=t.indexOf(")")+1,c=t.indexOf("("),a=t.substring(c+1,r-1).split(/,\s*/),n.toFunctionAnnotation=function(){return{name:e,parameters:fo(a.slice(0,1).concat(a.slice(3)))}},n},po=function(n){return{key:n,value:undefined}},ho=function(t,n,r,o,e,i,u){var c=function(n){return ct(n,r)?n[r]():T.none()},a=et(e,function(n,e){return go(r,n,e)}),f=et(i,so),s=x(x(x({},f),a),{revoke:b(po,r),config:function(n){var e=_r(r+"-config",t,n);return{key:r,value:{config:e,me:s,configAsRaw:d(function(){return _r(r+"-config",t,n)}),initialConfig:n,state:u}}},schema:function(){return n},exhibit:function(n,t){return c(n).bind(function(e){return it(o,"exhibit").map(function(n){return n(t,e.config,e.state)})}).getOr(lo({}))},name:function(){return r},handlers:function(n){return c(n).map(function(n){return it(o,"events").getOr(function(){return{}})(n.config,n.state)}).getOr({})}});return s},vo={init:function(){return yo({readState:function(){return"No State required"}})}},yo=function(n){return n},bo=ir,xo=vr([Br("fields"),Br("name"),Lr("active",{}),Lr("apis",{}),Lr("state",vo),Lr("extra",{})]),wo=function(n){var e,t,r,o,i,u,c,a,f=_r("Creating behaviour: "+n.name,xo,n);return e=f.fields,t=f.name,r=f.active,o=f.apis,i=f.extra,u=f.state,c=vr(e),a=Hr(t,[zr("config",e)]),ho(c,a,t,r,o,i,u)},So=vr([Br("branchKey"),Br("branches"),Br("name"),Lr("active",{}),Lr("apis",{}),Lr("state",vo),Lr("extra",{})]),Oo=y(undefined),To=wo({fields:Ur,name:"swapping",apis:Tt}),ko=function(n){var e=n;return{get:function(){return e},set:function(n){e=n}}},Eo=function(n){return n.dom.focus()},Co=function(n){return n.dom.blur()},Mo=function(n){return void 0===n&&(n=de.fromDom(document)),T.from(n.dom.activeElement).map(de.fromDom)},Do=function(e){return Mo(Ne(e)).filter(function(n){return e.dom.contains(n.dom)})},_o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Io=tinymce.util.Tools.resolve("tinymce.ThemeManager"),Fo=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],Ro=["undo","bold","italic","link","image","bullist","styleselect"],Vo="formatChanged",Bo="orientationChanged",Ao="dropupDismissed",jo=function(n){return n.dom.innerHTML},No=function(n,e){var t,r,o=Te(n).dom,i=de.fromDom(o.createDocumentFragment()),u=(t=e,(r=(o||document).createElement("div")).innerHTML=t,Ce(de.fromDom(r)));Re(i,u),Ve(n),Fe(n,i)},Po=function(n){return e=n,t=!1,de.fromDom(e.dom.cloneNode(t));var e,t},Ho=function(n){var e,t,r,o=Po(n);return e=o,t=de.fromTag("div"),r=de.fromDom(e.dom.cloneNode(!0)),Fe(t,r),jo(t)},zo=/* */Object.freeze({__proto__:null,events:function(a){return Jr([Zr(Yn(),function(o,n){var e,t,i=a.channels,r=Qe(i),u=n,c=(e=r,(t=u).universal?e:H(e,function(n){return A(t.channels,n)}));P(c,function(n){var e=i[n],t=e.schema,r=_r("channel["+n+"] data\nReceiver: "+Ho(o.element),t,u.data);e.onReceive(o,r)})})])}}),Lo="unknown";(Ft=It=It||{})[Ft.STOP=0]="STOP",Ft[Ft.NORMAL=1]="NORMAL",Ft[Ft.LOGGING=2]="LOGGING";var Go,$o=ko({}),Uo=["alloy/data/Fields","alloy/debugging/Debugging"],Wo=function(e,n,t){var r,o,i,u;switch(it($o.get(),e).orThunk(function(){var n=Qe($o.get());return Q(n,function(n){return-1<e.indexOf(n)?T.some($o.get()[n]):T.none()})}).getOr(It.NORMAL)){case It.NORMAL:return t(Xo());case It.LOGGING:var c=(r=e,o=n,i=[],u=(new Date).getTime(),{logEventCut:function(n,e,t){i.push({outcome:"cut",target:e,purpose:t})},logEventStopped:function(n,e,t){i.push({outcome:"stopped",target:e,purpose:t})},logNoParent:function(n,e,t){i.push({outcome:"no-parent",target:e,purpose:t})},logEventNoHandlers:function(n,e){i.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(n,e,t){i.push({outcome:"response",purpose:t,target:e})},write:function(){var n=(new Date).getTime();A(["mousemove","mouseover","mouseout",ne()],r)||console.log(r,{event:r,time:n-u,target:o.dom,sequence:N(i,function(n){return A(["cut","stopped","response"],n.outcome)?"{"+n.purpose+"} "+n.outcome+" at ("+Ho(n.target)+")":n.outcome})})}}),a=t(c);return c.write(),a;case It.STOP:return!0}},Xo=y({logEventCut:O,logEventStopped:O,logNoParent:O,logEventNoHandlers:O,logEventResponse:O,write:O}),qo=y([Br("menu"),Br("selectedMenu")]),Yo=y([Br("item"),Br("selectedItem")]),Ko=(y(yr(Yo().concat(qo()))),y(yr(Yo()))),Jo=jr("initSize",[Br("numColumns"),Br("numRows")]),Qo=function(n,e,t){!function(){var n=new Error;if(n.stack===undefined)return;var e=n.stack.split("\n");G(e,function(e){return 0<e.indexOf("alloy")&&!j(Uo,function(n){return-1<e.indexOf(n)})}).getOr(Lo)}();return Sr(e,e,t,Er(function(t){return Ct.value(function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t.apply(undefined,n)})}))},Zo=function(n){return Qo(0,n,Jt(O))},ni=function(n){return Qo(0,n,Jt(T.none))},ei=function(n){return Qo(0,n,Qt())},ti=function(n){return Qo(0,n,Qt())},ri=function(n,e){return $r(n,y(e))},oi=function(n){return $r(n,v)},ii=y(Jo),ui=[Ar("channels",Cr(Ct.value,vr([ei("onReceive"),Lr("schema",Rr())])))],ci=wo({fields:ui,name:"receiving",active:zo}),ai=function(n,e,t){var r=e.aria;r.update(n,r,t.get())},fi=function(e,n,t){n.toggleClass.each(function(n){(t.get()?bt:wt)(e.element,n)})},si=function(n,e,t){mi(n,e,t,!t.get())},li=function(n,e,t){t.set(!0),fi(n,e,t),ai(n,e,t)},di=function(n,e,t){t.set(!1),fi(n,e,t),ai(n,e,t)},mi=function(n,e,t,r){(r?li:di)(n,e,t)},gi=function(n,e,t){mi(n,e,t,e.selected)},pi=/* */Object.freeze({__proto__:null,onLoad:gi,toggle:si,isOn:function(n,e,t){return t.get()},on:li,off:di,set:mi}),hi=/* */Object.freeze({__proto__:null,exhibit:function(){return lo({})},events:function(n,e){var t,r,o,i=(t=n,r=e,o=si,ao(function(n){o(n,t,r)})),u=mo(n,e,gi);return Jr(U([n.toggleOnExecute?[i]:[],[u]]))}}),vi=function(n,e,t){ft(n.element,"aria-expanded",t)},yi=[Lr("selected",!1),Nr("toggleClass"),Lr("toggleOnExecute",!0),Gr("aria",{mode:"none"},Fr("mode",{pressed:[Lr("syncWithExpanded",!1),ri("update",function(n,e,t){ft(n.element,"aria-pressed",t),e.syncWithExpanded&&vi(n,e,t)})],checked:[ri("update",function(n,e,t){ft(n.element,"aria-checked",t)})],expanded:[ri("update",vi)],selected:[ri("update",function(n,e,t){ft(n.element,"aria-selected",t)})],none:[ri("update",O)]}))],bi=wo({fields:yi,name:"toggling",active:hi,apis:pi,state:(Go=!1,{init:function(){var e=ko(Go);return{get:function(){return e.get()},set:function(n){return e.set(n)},clear:function(){return e.set(Go)},readState:function(){return e.get()}}}})}),xi=function(t,r){return ci.config({channels:or(Vo,{onReceive:function(n,e){e.command===t&&r(n,e.state)}})})},wi=function(n){return ci.config({channels:or(Bo,{onReceive:n})})},Si=function(n,e){return{key:n,value:{onReceive:e}}},Oi="tinymce-mobile",Ti=function(n){return Oi+"-"+n},ki=function(){var n=function(n,e){e.stop(),ae(n)};return[Zr(zn(),n),Zr(Qn(),n),oo(_n()),oo(Rn())]},Ei=function(n,e){e.ignore||(Eo(n.element),e.onFocus(n))},Ci=/* */Object.freeze({__proto__:null,focus:Ei,blur:function(n,e){e.ignore||Co(n.element)},isFocused:function(n){return e=n.element,t=Ne(e).dom,e.dom===t.activeElement;var e,t}}),Mi=/* */Object.freeze({__proto__:null,exhibit:function(n,e){var t=e.ignore?{}:{attributes:{tabindex:"-1"}};return lo(t)},events:function(t){return Jr([Zr(Wn(),function(n,e){Ei(n,t),e.stop()})].concat(t.stopMousedown?[Zr(Rn(),function(n,e){e.event.prevent()})]:[]))}}),Di=[Zo("onFocus"),Lr("stopMousedown",!1),Lr("ignore",!1)],_i=wo({fields:Di,name:"focusing",active:Mi,apis:Ci}),Ii=function(n){return n.style!==undefined&&I(n.style.getPropertyValue)},Fi=function(n,e,t){if(!E(t))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",t,":: Element ",n),new Error("CSS value must be a string: "+t);Ii(n)&&n.style.setProperty(e,t)},Ri=function(n,e,t){var r=n.dom;Fi(r,e,t)},Vi=function(n,e){var t=n.dom;nt(e,function(n,e){Fi(t,e,n)})},Bi=function(n,e){var t=n.dom,r=window.getComputedStyle(t).getPropertyValue(e);return""!==r||Le(n)?r:Ai(t,e)},Ai=function(n,e){return Ii(n)?n.style.getPropertyValue(e):""},ji=function(n,e){var t=n.dom,r=Ai(t,e);return T.from(r).filter(function(n){return 0<n.length})},Ni=function(n,e){var t,r,o=n.dom;r=e,Ii(t=o)&&t.style.removeProperty(r),dt(n,"style").map(fn).is("")&&gt(n,"style")},Pi=function(n){return n.dom.offsetWidth};function Hi(r,o){var n=function(n){var e=o(n);if(e<=0||null===e){var t=Bi(n,r);return parseFloat(t)||0}return e},i=function(o,n){return L(n,function(n,e){var t=Bi(o,e),r=t===undefined?0:parseInt(t,10);return isNaN(r)?n:n+r},0)};return{set:function(n,e){if(!F(e)&&!e.match(/^[0-9]+$/))throw new Error(r+".set accepts only positive integer values. Value was "+e);var t=n.dom;Ii(t)&&(t.style[r]=e+"px")},get:n,getOuter:n,aggregate:i,max:function(n,e,t){var r=i(n,t);return r<e?e-r:0}}}var zi=Hi("height",function(n){var e=n.dom;return Le(n)?e.getBoundingClientRect().height:e.offsetHeight}),Li=function(n){return zi.get(n)},Gi=function(n,e,t){return H(function(n,e){for(var t=I(e)?e:l,r=n.dom,o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,u=de.fromDom(i);if(o.push(u),!0===t(u))break;r=i}return o}(n,t),e)},$i=function(n,e){return H(Ee(t=n).map(Ce).map(function(n){return H(n,function(n){return!ve(t,n)})}).getOr([]),e);var t},Ui=function(n,e){return pe(e,n)};function Wi(n,e,t,r,o){return n(t,r)?T.some(t):I(o)&&o(t)?T.none():e(t,r,o)}var Xi,qi,Yi=function(n,e,t){for(var r=n.dom,o=I(t)?t:l;r.parentNode;){r=r.parentNode;var i=de.fromDom(r);if(e(i))return T.some(i);if(o(i))break}return T.none()},Ki=function(n){return he(n)},Ji=function(n,e,t){return Yi(n,function(n){return me(n,e)},t)},Qi=function(n,e){return he(e,n)},Zi=function(n,e,t){return Wi(me,Ji,n,e,t)},nu=[8],eu=[9],tu=[13],ru=[27],ou=[32],iu=[37],uu=[38],cu=[39],au=[40],fu=function(n,e,t){var r=q(n.slice(0,e)),o=q(n.slice(e+1));return G(r.concat(o),t)},su=function(n,e,t){var r=q(n.slice(0,e));return G(r,t)},lu=function(n,e,t){var r=n.slice(0,e),o=n.slice(e+1);return G(o.concat(r),t)},du=function(n,e,t){var r=n.slice(e+1);return G(r,t)},mu=function(t){return function(n){var e=n.raw;return A(t,e.which)}},gu=function(n){return function(e){return X(n,function(n){return n(e)})}},pu=function(n){return!0===n.raw.shiftKey},hu=function(n){return!0===n.raw.ctrlKey},vu=m(pu),yu=function(n,e){return{matches:n,classification:e}},bu=function(n,e,t,r){var o=n+e;return r<o?t:o<t?r:o},xu=function(n,e,t){return Math.min(Math.max(n,e),t)},wu=function(n){for(var e=[],t=function(n){e.push(n)},r=0;r<n.length;r++)n[r].each(t);return e},Su=function(t,r,n,o){var e=Ui(t.element,"."+r.highlightClass);P(e,function(e){j(o,function(n){return n.element===e})||(wt(e,r.highlightClass),t.getSystem().getByDom(e).each(function(n){r.onDehighlight(t,n),ue(n,ie())}))})},Ou=function(n,e,t,r){Su(n,e,0,[r]),Tu(n,e,t,r)||(bt(r.element,e.highlightClass),e.onHighlight(n,r),ue(r,oe()))},Tu=function(n,e,t,r){return St(r.element,e.highlightClass)},ku=function(n,e,t,r){var o=Ui(n.element,"."+e.itemClass);return T.from(o[r]).fold(function(){return Ct.error("No element found with index "+r)},n.getSystem().getByDom)},Eu=function(e,n,t){return Qi(e.element,"."+n.itemClass).bind(function(n){return e.getSystem().getByDom(n).toOptional()})},Cu=function(e,n,t){var r=Ui(e.element,"."+n.itemClass);return(0<r.length?T.some(r[r.length-1]):T.none()).bind(function(n){return e.getSystem().getByDom(n).toOptional()})},Mu=function(t,e,n,r){var o=Ui(t.element,"."+e.itemClass);return $(o,function(n){return St(n,e.highlightClass)}).bind(function(n){var e=bu(n,r,0,o.length-1);return t.getSystem().getByDom(o[e]).toOptional()})},Du=function(e,n,t){var r=Ui(e.element,"."+n.itemClass);return wu(N(r,function(n){return e.getSystem().getByDom(n).toOptional()}))},_u=/* */Object.freeze({__proto__:null,dehighlightAll:function(n,e,t){return Su(n,e,0,[])},dehighlight:function(n,e,t,r){Tu(n,e,t,r)&&(wt(r.element,e.highlightClass),e.onDehighlight(n,r),ue(r,ie()))},highlight:Ou,highlightFirst:function(e,t,r){Eu(e,t).each(function(n){Ou(e,t,r,n)})},highlightLast:function(e,t,r){Cu(e,t).each(function(n){Ou(e,t,r,n)})},highlightAt:function(e,t,r,n){ku(e,t,r,n).fold(function(n){throw new Error(n)},function(n){Ou(e,t,r,n)})},highlightBy:function(e,t,r,n){var o=Du(e,t);G(o,n).each(function(n){Ou(e,t,r,n)})},isHighlighted:Tu,getHighlighted:function(e,n,t){return Qi(e.element,"."+n.highlightClass).bind(function(n){return e.getSystem().getByDom(n).toOptional()})},getFirst:Eu,getLast:Cu,getPrevious:function(n,e,t){return Mu(n,e,0,-1)},getNext:function(n,e,t){return Mu(n,e,0,1)},getCandidates:Du}),Iu=[Br("highlightClass"),Br("itemClass"),Zo("onHighlight"),Zo("onDehighlight")],Fu=wo({fields:Iu,name:"highlighting",apis:_u}),Ru=function(n,e,t){e.exists(function(e){return t.exists(function(n){return ve(n,e)})})||ce(n,re(),{prevFocus:e,newFocus:t})},Vu=function(){var o=function(n){return Do(n.element)};return{get:o,set:function(n,e){var t=o(n);n.getSystem().triggerFocus(e,n.element);var r=o(n);Ru(n,t,r)}}};(qi=Xi=Xi||{}).OnFocusMode="onFocus",qi.OnEnterOrSpaceMode="onEnterOrSpace",qi.OnApiMode="onApi";var Bu,Au,ju,Nu,Pu,Hu,zu,Lu,Gu,$u,Uu=function(n,e,t,r,c){var a=function(e,t,n,r,o){var i,u,c=n(e,t,r,o);return i=c,u=t.event,G(i,function(n){return n.matches(u)}).map(function(n){return n.classification}).bind(function(n){return n(e,t,r,o)})},o={schema:function(){return n.concat([Lr("focusManager",Vu()),Gr("focusInside","onFocus",Er(function(n){return A(["onFocus","onEnterOrSpace","onApi"],n)?Ct.value(n):Ct.error("Invalid value for focusInside")})),ri("handler",o),ri("state",e),ri("sendFocusIn",c)])},processKey:a,toEvents:function(i,u){var n=i.focusInside!==Xi.OnFocusMode?T.none():c(i).map(function(t){return Zr(Wn(),function(n,e){t(n,i,u),e.stop()})}),e=[Zr(jn(),function(r,o){a(r,o,t,i,u).fold(function(){var e,t,n;e=r,t=o,n=mu(ou.concat(tu))(t.event),i.focusInside===Xi.OnEnterOrSpaceMode&&n&&qr(e,t)&&c(i).each(function(n){n(e,i,u),t.stop()})},function(n){o.stop()})}),Zr(Nn(),function(n,e){a(n,e,r,i,u).each(function(n){e.stop()})})];return Jr(n.toArray().concat(e))}};return o},Wu=function(n){var e=[Nr("onEscape"),Nr("onEnter"),Lr("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Lr("firstTabstop",0),Lr("useTabstopAt",w),Nr("visibilitySelector")].concat([n]),u=function(n,e){var t=n.visibilitySelector.bind(function(n){return Zi(e,n)}).getOr(e);return 0<Li(t)},t=function(e,t,n){var r,o,i;r=t,o=Ui(e.element,r.selector),i=H(o,function(n){return u(r,n)}),T.from(i[r.firstTabstop]).each(function(n){t.focusManager.set(e,n)})},c=function(e,n,t,r,o){return o(n,t,function(n){return u(e=r,t=n)&&e.useTabstopAt(t);var e,t}).fold(function(){return r.cyclic?T.some(!0):T.none()},function(n){return r.focusManager.set(e,n),T.some(!0)})},o=function(e,n,t,r){var o,i,u=Ui(e.element,t.selector);return o=e,(i=t).focusManager.get(o).bind(function(n){return Zi(n,i.selector)}).bind(function(n){return $(u,b(ve,n)).bind(function(n){return c(e,u,n,t,r)})})},r=y([yu(gu([pu,mu(eu)]),function(n,e,t){var r=t.cyclic?fu:su;return o(n,0,t,r)}),yu(mu(eu),function(n,e,t){var r=t.cyclic?lu:du;return o(n,0,t,r)}),yu(mu(ru),function(e,t,n){return n.onEscape.bind(function(n){return n(e,t)})}),yu(gu([vu,mu(tu)]),function(e,t,n){return n.onEnter.bind(function(n){return n(e,t)})})]),i=y([]);return Uu(e,vo.init,r,i,function(){return T.some(t)})},Xu=Wu($r("cyclic",l)),qu=Wu($r("cyclic",w)),Yu=function(n){return"input"===ye(n)&&"radio"!==lt(n,"type")||"textarea"===ye(n)},Ku=function(n,e,t){return Yu(t)&&mu(ou)(e.event)?T.none():(fe(n,t,Kn()),T.some(!0))},Ju=function(n,e){return T.some(!0)},Qu=[Lr("execute",Ku),Lr("useSpace",!1),Lr("useEnter",!0),Lr("useControlEnter",!1),Lr("useDown",!1)],Zu=function(n,e,t){return t.execute(n,e,n.element)},nc=Uu(Qu,vo.init,function(n,e,t,r){var o=t.useSpace&&!Yu(n.element)?ou:[],i=t.useEnter?tu:[],u=t.useDown?au:[],c=o.concat(i).concat(u);return[yu(mu(c),Zu)].concat(t.useControlEnter?[yu(gu([hu,mu(tu)]),Zu)]:[])},function(n,e,t,r){return t.useSpace&&!Yu(n.element)?[yu(mu(ou),Ju)]:[]},function(){return T.none()}),ec=function(){var t=ko(T.none());return yo({readState:function(){return t.get().map(function(n){return{numRows:String(n.numRows),numColumns:String(n.numColumns)}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(n,e){t.set(T.some({numRows:n,numColumns:e}))},getNumRows:function(){return t.get().map(function(n){return n.numRows})},getNumColumns:function(){return t.get().map(function(n){return n.numColumns})}})},tc=/* */Object.freeze({__proto__:null,flatgrid:ec,init:function(n){return n.state(n)}}),rc=function(e,t){return function(n){return"rtl"===oc(n)?t:e}},oc=function(n){return"rtl"===Bi(n,"direction")?"rtl":"ltr"},ic=function(i){return function(n,e,t,r){var o=i(n.element);return fc(o,n,e,t,r)}},uc=function(n,e){var t=rc(n,e);return ic(t)},cc=function(n,e){var t=rc(e,n);return ic(t)},ac=function(o){return function(n,e,t,r){return fc(o,n,e,t,r)}},fc=function(e,t,n,r,o){return r.focusManager.get(t).bind(function(n){return e(t.element,n,r,o)}).map(function(n){return r.focusManager.set(t,n),!0})},sc=ac,lc=ac,dc=ac,mc=function(n){return!((e=n.dom).offsetWidth<=0&&e.offsetHeight<=0);var e},gc=function(n,e,t){var r,o=Ui(n,t),i=H(o,mc);return $(r=i,function(n){return ve(n,e)}).map(function(n){return{index:n,candidates:r}})},pc=function(n,e){return $(n,function(n){return ve(e,n)})},hc=function(t,n,r,e){return e(Math.floor(n/r),n%r).bind(function(n){var e=n.row*r+n.column;return 0<=e&&e<t.length?T.some(t[e]):T.none()})},vc=function(o,n,i,u,c){return hc(o,n,u,function(n,e){var t=n===i-1?o.length-n*u:u,r=bu(e,c,0,t-1);return T.some({row:n,column:r})})},yc=function(i,n,u,c,a){return hc(i,n,c,function(n,e){var t=bu(n,a,0,u-1),r=t===u-1?i.length-t*c:c,o=xu(e,0,r-1);return T.some({row:t,column:o})})},bc=[Br("selector"),Lr("execute",Ku),ni("onEscape"),Lr("captureTab",!1),ii()],xc=function(e,t,n){Qi(e.element,t.selector).each(function(n){t.focusManager.set(e,n)})},wc=function(o){return function(n,e,t,r){return gc(n,e,t.selector).bind(function(n){return o(n.candidates,n.index,r.getNumRows().getOr(t.initSize.numRows),r.getNumColumns().getOr(t.initSize.numColumns))})}},Sc=function(n,e,t){return t.captureTab?T.some(!0):T.none()},Oc=wc(function(n,e,t,r){return vc(n,e,t,r,-1)}),Tc=wc(function(n,e,t,r){return vc(n,e,t,r,1)}),kc=wc(function(n,e,t,r){return yc(n,e,t,r,-1)}),Ec=wc(function(n,e,t,r){return yc(n,e,t,r,1)}),Cc=y([yu(mu(iu),uc(Oc,Tc)),yu(mu(cu),cc(Oc,Tc)),yu(mu(uu),sc(kc)),yu(mu(au),lc(Ec)),yu(gu([pu,mu(eu)]),Sc),yu(gu([vu,mu(eu)]),Sc),yu(mu(ru),function(n,e,t){return t.onEscape(n,e)}),yu(mu(ou.concat(tu)),function(e,t,r,n){return o=e,(i=r).focusManager.get(o).bind(function(n){return Zi(n,i.selector)}).bind(function(n){return r.execute(e,t,n)});var o,i})]),Mc=y([yu(mu(ou),Ju)]),Dc=Uu(bc,ec,Cc,Mc,function(){return T.some(xc)}),_c=function(n,e,t,i){var u=function(n,e,t){var r,o=bu(e,i,0,t.length-1);return o===n?T.none():(r=t[o],"button"===ye(r)&&"disabled"===lt(r,"disabled")?u(n,o,t):T.from(t[o]))};return gc(n,t,e).bind(function(n){var e=n.index,t=n.candidates;return u(e,e,t)})},Ic=[Br("selector"),Lr("getInitial",T.none),Lr("execute",Ku),ni("onEscape"),Lr("executeOnMove",!1),Lr("allowVertical",!0)],Fc=function(e,t,r){return n=e,(o=r).focusManager.get(n).bind(function(n){return Zi(n,o.selector)}).bind(function(n){return r.execute(e,t,n)});var n,o},Rc=function(e,t,n){t.getInitial(e).orThunk(function(){return Qi(e.element,t.selector)}).each(function(n){t.focusManager.set(e,n)})},Vc=function(n,e,t){return _c(n,t.selector,e,-1)},Bc=function(n,e,t){return _c(n,t.selector,e,1)},Ac=function(o){return function(n,e,t,r){return o(n,e,t,r).bind(function(){return t.executeOnMove?Fc(n,e,t):T.some(!0)})}},jc=function(n,e,t){return t.onEscape(n,e)},Nc=y([yu(mu(ou),Ju)]),Pc=Uu(Ic,vo.init,function(n,e,t,r){var o=iu.concat(t.allowVertical?uu:[]),i=cu.concat(t.allowVertical?au:[]);return[yu(mu(o),Ac(uc(Vc,Bc))),yu(mu(i),Ac(cc(Vc,Bc))),yu(mu(tu),Fc),yu(mu(ou),Fc),yu(mu(ru),jc)]},Nc,function(){return T.some(Rc)}),Hc=function(n,e,t){return T.from(n[e]).bind(function(n){return T.from(n[t]).map(function(n){return{rowIndex:e,columnIndex:t,cell:n}})})},zc=function(n,e,t,r){var o=n[e].length,i=bu(t,r,0,o-1);return Hc(n,e,i)},Lc=function(n,e,t,r){var o=bu(t,r,0,n.length-1),i=n[o].length,u=xu(e,0,i-1);return Hc(n,o,u)},Gc=function(n,e,t,r){var o=n[e].length,i=xu(t+r,0,o-1);return Hc(n,e,i)},$c=function(n,e,t,r){var o=xu(t+r,0,n.length-1),i=n[o].length,u=xu(e,0,i-1);return Hc(n,o,u)},Uc=[jr("selectors",[Br("row"),Br("cell")]),Lr("cycles",!0),Lr("previousSelector",T.none),Lr("execute",Ku)],Wc=function(e,t,n){t.previousSelector(e).orThunk(function(){var n=t.selectors;return Qi(e.element,n.cell)}).each(function(n){t.focusManager.set(e,n)})},Xc=function(n,e){return function(t,r,i){var u=i.cycles?n:e;return Zi(r,i.selectors.row).bind(function(n){var e=Ui(n,i.selectors.cell);return pc(e,r).bind(function(r){var o=Ui(t,i.selectors.row);return pc(o,n).bind(function(n){var e,t=(e=i,N(o,function(n){return Ui(n,e.selectors.cell)}));return u(t,n,r).map(function(n){return n.cell})})})})}},qc=Xc(function(n,e,t){return zc(n,e,t,-1)},function(n,e,t){return Gc(n,e,t,-1)}),Yc=Xc(function(n,e,t){return zc(n,e,t,1)},function(n,e,t){return Gc(n,e,t,1)}),Kc=Xc(function(n,e,t){return Lc(n,t,e,-1)},function(n,e,t){return $c(n,t,e,-1)}),Jc=Xc(function(n,e,t){return Lc(n,t,e,1)},function(n,e,t){return $c(n,t,e,1)}),Qc=y([yu(mu(iu),uc(qc,Yc)),yu(mu(cu),cc(qc,Yc)),yu(mu(uu),sc(Kc)),yu(mu(au),lc(Jc)),yu(mu(ou.concat(tu)),function(e,t,r){return Do(e.element).bind(function(n){return r.execute(e,t,n)})})]),Zc=y([yu(mu(ou),Ju)]),na=Uu(Uc,vo.init,Qc,Zc,function(){return T.some(Wc)}),ea=[Br("selector"),Lr("execute",Ku),Lr("moveOnTab",!1)],ta=function(e,t,r){return r.focusManager.get(e).bind(function(n){return r.execute(e,t,n)})},ra=function(e,t,n){Qi(e.element,t.selector).each(function(n){t.focusManager.set(e,n)})},oa=function(n,e,t){return _c(n,t.selector,e,-1)},ia=function(n,e,t){return _c(n,t.selector,e,1)},ua=y([yu(mu(uu),dc(oa)),yu(mu(au),dc(ia)),yu(gu([pu,mu(eu)]),function(n,e,t,r){return t.moveOnTab?dc(oa)(n,e,t,r):T.none()}),yu(gu([vu,mu(eu)]),function(n,e,t,r){return t.moveOnTab?dc(ia)(n,e,t,r):T.none()}),yu(mu(tu),ta),yu(mu(ou),ta)]),ca=y([yu(mu(ou),Ju)]),aa=Uu(ea,vo.init,ua,ca,function(){return T.some(ra)}),fa=[ni("onSpace"),ni("onEnter"),ni("onShiftEnter"),ni("onLeft"),ni("onRight"),ni("onTab"),ni("onShiftTab"),ni("onUp"),ni("onDown"),ni("onEscape"),Lr("stopSpaceKeyup",!1),Nr("focusIn")],sa=Uu(fa,vo.init,function(n,e,t){return[yu(mu(ou),t.onSpace),yu(gu([vu,mu(tu)]),t.onEnter),yu(gu([pu,mu(tu)]),t.onShiftEnter),yu(gu([pu,mu(eu)]),t.onShiftTab),yu(gu([vu,mu(eu)]),t.onTab),yu(mu(uu),t.onUp),yu(mu(au),t.onDown),yu(mu(iu),t.onLeft),yu(mu(cu),t.onRight),yu(mu(ou),t.onSpace),yu(mu(ru),t.onEscape)]},function(n,e,t){return t.stopSpaceKeyup?[yu(mu(ou),Ju)]:[]},function(n){return n.focusIn}),la=Xu.schema(),da=qu.schema(),ma=Pc.schema(),ga=Dc.schema(),pa=na.schema(),ha=nc.schema(),va=aa.schema(),ya=sa.schema(),ba=($u=_r("Creating behaviour: "+(Bu={branchKey:"mode",branches:/* */Object.freeze({__proto__:null,acyclic:la,cyclic:da,flow:ma,flatgrid:ga,matrix:pa,execution:ha,menu:va,special:ya}),name:"keying",active:{events:function(n,e){return n.handler.toEvents(n,e)}},apis:{focusIn:function(e,t,r){t.sendFocusIn(t).fold(function(){e.getSystem().triggerFocus(e.element,e.element)},function(n){n(e,t,r)})},setGridSize:function(n,e,t,r,o){ct(t,"setGridSize")?t.setGridSize(r,o):console.error("Layout does not support setGridSize")}},state:tc}).name,So,Bu),Au=Fr($u.branchKey,$u.branches),ju=$u.name,Nu=$u.active,Pu=$u.apis,Hu=$u.extra,zu=$u.state,Gu=Hr(ju,[Pr("config",Lu=Au)]),ho(Lu,Gu,ju,Nu,Pu,Hu,zu)),xa=function(r,n){return e=r,t={},o=N(n,function(n){return e=n.name(),t="Cannot configure "+n.name()+" for "+r,Sr(e,e,Zt(),hr(function(n){return Ht("The field: "+e+" is forbidden. "+t)}));var e,t}).concat([$r("dump",v)]),Gr(e,t,yr(o));var e,t,o},wa=function(n){return n.dump},Sa=function(n,e){return x(x({},n.dump),bo(e))},Oa=xa,Ta=Sa,ka="placeholder",Ea=Ut([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Ca=function(n){return ut(n,"uiType")},Ma=function(n,e,t,r){return Ca(t)&&t.uiType===ka?(i=t,u=r,(o=n).exists(function(n){return n!==i.owner})?Ea.single(!0,y(i)):it(u,i.name).fold(function(){throw new Error("Unknown placeholder component: "+i.name+"\nKnown: ["+Qe(u)+"]\nNamespace: "+o.getOr("none")+"\nSpec: "+JSON.stringify(i,null,2))},function(n){return n.replace()})):Ea.single(!1,y(t));var o,i,u},Da=function(i,u,c,a){return Ma(i,0,c,a).fold(function(n,e){var t=Ca(c)?e(u,c.config,c.validated):e(u),r=it(t,"components").getOr([]),o=W(r,function(n){return Da(i,u,n,a)});return[x(x({},t),{components:o})]},function(n,e){if(Ca(c)){var t=e(u,c.config,c.validated);return c.validated.preprocess.getOr(v)(t)}return e(u)})},_a=function(e,t,n,r){var o,i,u,c=et(r,function(n,e){return r=n,o=!1,{name:y(t=e),required:function(){return r.fold(function(n,e){return n},function(n,e){return n})},used:function(){return o},replace:function(){if(o)throw new Error("Trying to use the same placeholder more than once: "+t);return o=!0,r}};var t,r,o}),a=(o=e,i=t,u=c,W(n,function(n){return Da(o,i,n,u)}));return nt(c,function(n){if(!1===n.used()&&n.required())throw new Error("Placeholder: "+n.name()+" was not found in components list\nNamespace: "+e.getOr("none")+"\nComponents: "+JSON.stringify(t.components,null,2))}),a},Ia=Ea.single,Fa=Ea.multiple,Ra=y(ka),Va=0,Ba=function(n){var e=(new Date).getTime();return n+"_"+Math.floor(1e9*Math.random())+ ++Va+String(e)},Aa=Ut([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),ja=Lr("factory",{sketch:v}),Na=Lr("schema",[]),Pa=Br("name"),Ha=Sr("pname","pname",nr(function(n){return"<alloy."+Ba(n.name)+">"}),Rr()),za=$r("schema",function(){return[Nr("preprocess")]}),La=Lr("defaults",y({})),Ga=Lr("overrides",y({})),$a=yr([ja,Na,Pa,Ha,La,Ga]),Ua=yr([ja,Na,Pa,La,Ga]),Wa=yr([ja,Na,Pa,Ha,La,Ga]),Xa=yr([ja,za,Pa,Br("unit"),Ha,La,Ga]),qa=function(n){var e=function(n){return n.name};return n.fold(e,e,e,e)},Ya=function(t,r){return function(n){var e=_r("Converting part type",r,n);return t(e)}},Ka=Ya(Aa.required,$a),Ja=(Ya(Aa.external,Ua),Ya(Aa.optional,Wa)),Qa=Ya(Aa.group,Xa),Za=y("entirety"),nf=function(n,e,t,r){return qt(e.defaults(n,t,r),t,{uid:n.partUids[e.name]},e.overrides(n,t,r))},ef=function(o,n){var e={};return P(n,function(n){n.fold(T.some,T.none,T.some,T.some).each(function(t){var r=tf(o,t.pname);e[t.name]=function(n){var e=_r("Part: "+t.name+" in "+o,yr(t.schema),n);return x(x({},r),{config:n,validated:e})}})}),e},tf=function(n,e){return{uiType:Ra(),owner:n,name:e}},rf=function(n,e,t){return r=e,i={},o={},P(t,function(n){n.fold(function(r){i[r.pname]=Ia(!0,function(n,e,t){return r.factory.sketch(nf(n,r,e,t))})},function(n){var e=r.parts[n.name];o[n.name]=y(n.factory.sketch(nf(r,n,e[Za()]),e))},function(r){i[r.pname]=Ia(!1,function(n,e,t){return r.factory.sketch(nf(n,r,e,t))})},function(o){i[o.pname]=Fa(!0,function(e,n,t){var r=e[o.name];return N(r,function(n){return o.factory.sketch(qt(o.defaults(e,n,t),n,o.overrides(e,n)))})})})}),{internals:y(i),externals:y(o)};var r,i,o},of=function(n,e,t){return _a(T.some(n),e,e.components,t)},uf=function(n,e,t){var r=e.partUids[t];return n.getSystem().getByUid(r).toOptional()},cf=function(n,e,t){return uf(n,e,t).getOrDie("Could not find part: "+t)},af=function(e,n){var t=N(n,qa);return ir(N(t,function(n){return{key:n,value:e+"-"+n}}))},ff=function(e){return Sr("partUids","partUids",er(function(n){return af(n.uid,e)}),Rr())},sf=Ba("alloy-premade"),lf=function(n){return or(sf,n)},df=function(r){return n=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return r.apply(void 0,u([n.getApis(),n],e))},e=r.toString(),t=e.indexOf(")")+1,o=e.indexOf("("),i=e.substring(o+1,t-1).split(/,\s*/),n.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:fo(i.slice(1))}},n;var n,e,t,o,i},mf=y("alloy-id-"),gf=y("data-alloy-id"),pf=mf(),hf=gf(),vf=function(n,e){Object.defineProperty(n.dom,hf,{value:e,writable:!0})},yf=function(n){var e=xe(n)?n.dom[hf]:null;return T.from(e)},bf=Ba,xf=function(n,e,t,r,o){var i,u,c=(u=o,(0<(i=r).length?[jr("parts",i)]:[]).concat([Br("uid"),Lr("dom",{}),Lr("components",[]),oi("originalSpec"),Lr("debug.sketcher",{})]).concat(u));return _r(n+" [SpecSchema]",vr(c.concat(e)),t)},wf=function(n,e,t,r,o){var i=Sf(o),u=W(t,function(n){return n.fold(T.none,T.some,T.none,T.none).map(function(n){return jr(n.name,n.schema.concat([oi(Za())]))}).toArray()}),c=ff(t),a=xf(n,e,i,u,[c]),f=rf(0,a,t);return r(a,of(n,a,f.internals()),i,f.externals())},Sf=function(n){return ut(n,"uid")?n:x(x({},n),{uid:bf("uid")})};var Of,Tf,kf,Ef,Cf=vr([Br("name"),Br("factory"),Br("configFields"),Lr("apis",{}),Lr("extraApis",{})]),Mf=vr([Br("name"),Br("factory"),Br("configFields"),Br("partFields"),Lr("apis",{}),Lr("extraApis",{})]),Df=function(n){var i=_r("Sketcher for "+n.name,Cf,n),e=et(i.apis,df),t=et(i.extraApis,so);return x(x({name:i.name,configFields:i.configFields,sketch:function(n){return e=i.name,t=i.configFields,r=i.factory,o=Sf(n),r(xf(e,t,o,[],[]),o);var e,t,r,o}},e),t)},_f=function(n){var e=_r("Sketcher for "+n.name,Mf,n),t=ef(e.name,e.partFields),r=et(e.apis,df),o=et(e.extraApis,so);return x(x({name:e.name,partFields:e.partFields,configFields:e.configFields,sketch:function(n){return wf(e.name,e.configFields,e.partFields,e.factory,n)},parts:t},r),o)},If=Df({name:"Button",factory:function(n){var e,t=(e=n.action,Jr(U([e.map(function(t){return ao(function(n,e){t(n),e.stop()})}).toArray(),ki()]))),r=n.dom.tag,o=function(e){return it(n.dom,"attributes").bind(function(n){return it(n,e)})};return{uid:n.uid,dom:n.dom,components:n.components,events:t,behaviours:Ta(n.buttonBehaviours,[_i.config({}),ba.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"!==r)return{role:o("role").getOr("button")};var n=o("type").getOr("button"),e=o("role").map(function(n){return{role:n}}).getOr({});return x({type:n},e)}()},eventOrder:n.eventOrder}},configFields:[Lr("uid",undefined),Br("dom"),Lr("components",[]),Oa("buttonBehaviours",[_i,ba]),Nr("action"),Nr("role"),Lr("eventOrder",{})]}),Ff=wo({fields:[],name:"unselecting",active:/* */Object.freeze({__proto__:null,events:function(){return Jr([Qr(Gn(),w)])},exhibit:function(){return lo({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),Rf=function(n){var e,t,r,o=de.fromHtml(n),i=Ce(o),u=(t=(e=o).dom.attributes!==undefined?e.dom.attributes:[],L(t,function(n,e){var t;return"class"===e.name?n:x(x({},n),((t={})[e.name]=e.value,t))},{})),c=(r=o,Array.prototype.slice.call(r.dom.classList,0)),a=0===i.length?{}:{innerHtml:jo(o)};return x({tag:ye(o),classes:c,attributes:u},a)},Vf=function(n){var e=cn(n,{prefix:Oi});return Rf(e)},Bf=function(n){return{dom:Vf(n)}},Af=function(n){return bo([bi.config({toggleClass:Ti("toolbar-button-selected"),toggleOnExecute:!1,aria:{mode:"pressed"}}),xi(n,function(n,e){(e?bi.on:bi.off)(n)})])},jf=function(n,e,t,r){var o=Af(t);return Pf(e,r,o,n)},Nf=function(n,e){var t=e.ui.registry.getAll().icons;return T.from(t[n]).fold(function(){return Vf('<span class="${prefix}-toolbar-button ${prefix}-toolbar-group-item ${prefix}-icon-'+n+' ${prefix}-icon"></span>')},function(n){return Vf('<span class="${prefix}-toolbar-button ${prefix}-toolbar-group-item">'+n+"</span>")})},Pf=function(n,e,t,r){return If.sketch({dom:Nf(n,r),action:e,buttonBehaviours:qt(bo([Ff.config({})]),t)})},Hf=Ja({schema:[Br("dom")],name:"label"}),zf=function(e){return Ja({name:e+"-edge",overrides:function(n){return n.model.manager.edgeActions[e].fold(function(){return{}},function(r){return{events:Jr([no(_n(),function(n,e,t){return r(n,t)},[n]),no(Rn(),function(n,e,t){return r(n,t)},[n]),no(Vn(),function(n,e,t){t.mouseIsDown.get()&&r(n,t)},[n])])}})}})},Lf=zf("top-left"),Gf=zf("top"),$f=zf("top-right"),Uf=zf("right"),Wf=zf("bottom-right"),Xf=zf("bottom"),qf=zf("bottom-left"),Yf=[Hf,zf("left"),Uf,Gf,Xf,Lf,$f,qf,Wf,Ka({name:"thumb",defaults:y({dom:{styles:{position:"absolute"}}}),overrides:function(n){return{events:Jr([ro(_n(),n,"spectrum"),ro(In(),n,"spectrum"),ro(Fn(),n,"spectrum"),ro(Rn(),n,"spectrum"),ro(Vn(),n,"spectrum"),ro(Bn(),n,"spectrum")])}}}),Ka({schema:[$r("mouseIsDown",function(){return ko(!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:bo([ba.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)}}),_i.config({})]),events:Jr([Zr(_n(),o),Zr(In(),o),Zr(Rn(),o),Zr(Vn(),function(n,e){t.mouseIsDown.get()&&o(n,e)})])}}})],Kf=function(n,e,t){e.store.manager.onLoad(n,e,t)},Jf=function(n,e,t){e.store.manager.onUnload(n,e,t)},Qf=/* */Object.freeze({__proto__:null,onLoad:Kf,onUnload:Jf,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}}),Zf=/* */Object.freeze({__proto__:null,events:function(t,r){var n=t.resetOnDom?[io(function(n,e){Kf(n,t,r)}),uo(function(n,e){Jf(n,t,r)})]:[mo(t,r,Kf)];return Jr(n)}}),ns=function(){var n=ko(null);return yo({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()}}})},es=function(){var i=ko({}),u=ko({});return yo({readState:function(){return{mode:"dataset",dataByValue:i.get(),dataByText:u.get()}},lookup:function(n){return it(i.get(),n).orThunk(function(){return it(u.get(),n)})},update:function(n){var e=i.get(),t=u.get(),r={},o={};P(n,function(e){r[e.value]=e,it(e,"meta").each(function(n){it(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({})}})},ts=/* */Object.freeze({__proto__:null,memory:ns,dataset:es,manual:function(){return yo({readState:function(){}})},init:function(n){return n.store.manager.state(n)}}),rs=function(n,e,t,r){var o=e.store;t.update([r]),o.setValue(n,r),e.onSetValue(n,r)},os=[Nr("initialValue"),Br("getFallbackEntry"),Br("getDataKey"),Br("setValue"),ri("manager",{setValue:rs,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){rs(e,t,r,n)})},onUnload:function(n,e,t){t.clear()},state:es})],is=[Br("getValue"),Lr("setValue",O),Nr("initialValue"),ri("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:O,state:vo.init})],us=[Nr("initialValue"),ri("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:ns})],cs=[Gr("store",{mode:"memory"},Fr("mode",{memory:us,manual:is,dataset:os})),Zo("onSetValue"),Lr("resetOnDom",!1)],as=wo({fields:cs,name:"representing",active:Zf,apis:Qf,extra:{setValueFrom:function(n,e){var t=as.getValue(e);as.setValue(n,t)}},state:ts}),fs=Hi("width",function(n){return n.dom.offsetWidth}),ss=function(n,e){return fs.set(n,e)},ls=function(n){return fs.get(n)},ds=function(t,r){return{left:t,top:r,translate:function(n,e){return ds(t+n,r+e)}}},ms=ds,gs=y("slider.change.value"),ps=function(n){var e=n.event.raw;return-1===e.type.indexOf("touch")?e.clientX!==undefined?T.some(e).map(function(n){return ms(n.clientX,n.clientY)}):T.none():e.touches!==undefined&&1===e.touches.length?T.some(e.touches[0]).map(function(n){return ms(n.clientX,n.clientY)}):T.none()},hs=function(n){return n.model.minX},vs=function(n){return n.model.minY},ys=function(n){return n.model.minX-1},bs=function(n){return n.model.minY-1},xs=function(n){return n.model.maxX},ws=function(n){return n.model.maxY},Ss=function(n){return n.model.maxX+1},Os=function(n){return n.model.maxY+1},Ts=function(n,e,t){return e(n)-t(n)},ks=function(n){return Ts(n,xs,hs)},Es=function(n){return Ts(n,ws,vs)},Cs=function(n){return ks(n)/2},Ms=function(n){return Es(n)/2},Ds=function(n){return n.stepSize},_s=function(n){return n.snapToGrid},Is=function(n){return n.snapStart},Fs=function(n){return n.rounded},Rs=function(n,e){return n[e+"-edge"]!==undefined},Vs=function(n){return Rs(n,"left")},Bs=function(n){return Rs(n,"right")},As=function(n){return Rs(n,"top")},js=function(n){return Rs(n,"bottom")},Ns=function(n){return n.model.value.get()},Ps=function(n){return{x:n}},Hs=function(n){return{y:n}},zs=function(n,e){return{x:n,y:e}},Ls=function(n,e){ce(n,gs(),{value:e})},Gs=function(n,e,t,r){return n<e?n:t<n?t:n===e?e-1:Math.max(e,n-r)},$s=function(n,e,t,r){return t<n?n:n<e?e:n===t?t+1:Math.min(t,n+r)},Us=function(n,e,t){return Math.max(e,Math.min(t,n))},Ws=function(n){var e=n.min,t=n.max,r=n.range,o=n.value,i=n.step,u=n.snap,c=n.snapStart,a=n.rounded,f=n.hasMinEdge,s=n.hasMaxEdge,l=n.minBound,d=n.maxBound,m=n.screenRange,g=f?e-1:e,p=s?t+1:t;if(o<l)return g;if(d<o)return p;var h,v,y,b,x,w,S,O=(x=o,w=l,S=d,Math.min(S,Math.max(x,w))-w),T=Us(O/m*r+e,g,p);return u&&e<=T&&T<=t?(h=T,v=e,y=t,b=i,c.fold(function(){var n=h-v,e=Math.round(n/b)*b;return Us(v+e,v-1,y+1)},function(n){var e=(h-n)%b,t=Math.round(e/b),r=Math.floor((h-n)/b),o=Math.floor((y-n)/b),i=n+Math.min(o,r+t)*b;return Math.max(n,i)})):a?Math.round(T):T},Xs=function(n){var e=n.min,t=n.max,r=n.range,o=n.value,i=n.hasMinEdge,u=n.hasMaxEdge,c=n.maxBound,a=n.maxOffset,f=n.centerMinEdge,s=n.centerMaxEdge;return o<e?i?0:f:t<o?u?c:s:(o-e)/r*a},qs="left",Ys=function(n){return n.element.dom.getBoundingClientRect()},Ks=function(n,e){return n[e]},Js=function(n){var e=Ys(n);return Ks(e,qs)},Qs=function(n){var e=Ys(n);return Ks(e,"right")},Zs=function(n){var e=Ys(n);return Ks(e,"top")},nl=function(n){var e=Ys(n);return Ks(e,"bottom")},el=function(n){var e=Ys(n);return Ks(e,"width")},tl=function(n){var e=Ys(n);return Ks(e,"height")},rl=function(n,e,t){return(n+e)/2-t},ol=function(n,e){var t=Ys(n),r=Ys(e),o=Ks(t,qs),i=Ks(t,"right"),u=Ks(r,qs);return rl(o,i,u)},il=function(n,e){var t=Ys(n),r=Ys(e),o=Ks(t,"top"),i=Ks(t,"bottom"),u=Ks(r,"top");return rl(o,i,u)},ul=function(n,e){ce(n,gs(),{value:e})},cl=function(n){return{x:n}},al=function(n,e,t){var r={min:hs(e),max:xs(e),range:ks(e),value:t,step:Ds(e),snap:_s(e),snapStart:Is(e),rounded:Fs(e),hasMinEdge:Vs(e),hasMaxEdge:Bs(e),minBound:Js(n),maxBound:Qs(n),screenRange:el(n)};return Ws(r)},fl=function(i){return function(n,e){return t=n,o=(0<i?$s:Gs)(Ns(r=e).x,hs(r),xs(r),Ds(r)),ul(t,cl(o)),T.some(o).map(function(){return!0});var t,r,o}},sl=function(n,e,t,r,o,i){var u,c,a,f,s,l,d,m,g,p=(c=i,a=t,f=r,s=o,l=el(u=e),d=f.bind(function(n){return T.some(ol(n,u))}).getOr(0),m=s.bind(function(n){return T.some(ol(n,u))}).getOr(l),g={min:hs(c),max:xs(c),range:ks(c),value:a,hasMinEdge:Vs(c),hasMaxEdge:Bs(c),minBound:Js(u),minOffset:0,maxBound:Qs(u),maxOffset:l,centerMinEdge:d,centerMaxEdge:m},Xs(g));return Js(e)-Js(n)+p},ll=fl(-1),dl=fl(1),ml=T.none,gl=T.none,pl={"top-left":T.none(),top:T.none(),"top-right":T.none(),right:T.some(function(n,e){Ls(n,Ps(Ss(e)))}),"bottom-right":T.none(),bottom:T.none(),"bottom-left":T.none(),left:T.some(function(n,e){Ls(n,Ps(ys(e)))})},hl=/* */Object.freeze({__proto__:null,setValueFrom:function(n,e,t){var r=al(n,e,t),o=cl(r);return ul(n,o),r},setToMin:function(n,e){var t=hs(e);ul(n,cl(t))},setToMax:function(n,e){var t=xs(e);ul(n,cl(t))},findValueOfOffset:al,getValueFromEvent:function(n){return ps(n).map(function(n){return n.left})},findPositionOfValue:sl,setPositionFromValue:function(n,e,t,r){var o=Ns(t),i=sl(n,r.getSpectrum(n),o.x,r.getLeftEdge(n),r.getRightEdge(n),t),u=ls(e.element)/2;Ri(e.element,"left",i-u+"px")},onLeft:ll,onRight:dl,onUp:ml,onDown:gl,edgeActions:pl}),vl=function(n,e){ce(n,gs(),{value:e})},yl=function(n){return{y:n}},bl=function(n,e,t){var r={min:vs(e),max:ws(e),range:Es(e),value:t,step:Ds(e),snap:_s(e),snapStart:Is(e),rounded:Fs(e),hasMinEdge:As(e),hasMaxEdge:js(e),minBound:Zs(n),maxBound:nl(n),screenRange:tl(n)};return Ws(r)},xl=function(i){return function(n,e){return t=n,o=(0<i?$s:Gs)(Ns(r=e).y,vs(r),ws(r),Ds(r)),vl(t,yl(o)),T.some(o).map(function(){return!0});var t,r,o}},wl=function(n,e,t,r,o,i){var u,c,a,f,s,l,d,m,g,p=(c=i,a=t,f=r,s=o,l=tl(u=e),d=f.bind(function(n){return T.some(il(n,u))}).getOr(0),m=s.bind(function(n){return T.some(il(n,u))}).getOr(l),g={min:vs(c),max:ws(c),range:Es(c),value:a,hasMinEdge:As(c),hasMaxEdge:js(c),minBound:Zs(u),minOffset:0,maxBound:nl(u),maxOffset:l,centerMinEdge:d,centerMaxEdge:m},Xs(g));return Zs(e)-Zs(n)+p},Sl=T.none,Ol=T.none,Tl=xl(-1),kl=xl(1),El={"top-left":T.none(),top:T.some(function(n,e){Ls(n,Hs(bs(e)))}),"top-right":T.none(),right:T.none(),"bottom-right":T.none(),bottom:T.some(function(n,e){Ls(n,Hs(Os(e)))}),"bottom-left":T.none(),left:T.none()},Cl=/* */Object.freeze({__proto__:null,setValueFrom:function(n,e,t){var r=bl(n,e,t),o=yl(r);return vl(n,o),r},setToMin:function(n,e){var t=vs(e);vl(n,yl(t))},setToMax:function(n,e){var t=ws(e);vl(n,yl(t))},findValueOfOffset:bl,getValueFromEvent:function(n){return ps(n).map(function(n){return n.top})},findPositionOfValue:wl,setPositionFromValue:function(n,e,t,r){var o=Ns(t),i=wl(n,r.getSpectrum(n),o.y,r.getTopEdge(n),r.getBottomEdge(n),t),u=Li(e.element)/2;Ri(e.element,"top",i-u+"px")},onLeft:Sl,onRight:Ol,onUp:Tl,onDown:kl,edgeActions:El}),Ml=function(n,e){ce(n,gs(),{value:e})},Dl=function(n,e){return{x:n,y:e}},_l=function(a,f){return function(n,e){return r=n,o=e,i=0<a?$s:Gs,u=(t=f)?Ns(o).x:i(Ns(o).x,hs(o),xs(o),Ds(o)),c=t?i(Ns(o).y,vs(o),ws(o),Ds(o)):Ns(o).y,Ml(r,Dl(u,c)),T.some(u).map(function(){return!0});var t,r,o,i,u,c}},Il=ps,Fl=_l(-1,!1),Rl=_l(1,!1),Vl=_l(-1,!0),Bl=_l(1,!0),Al={"top-left":T.some(function(n,e){Ls(n,zs(ys(e),bs(e)))}),top:T.some(function(n,e){Ls(n,zs(Cs(e),bs(e)))}),"top-right":T.some(function(n,e){Ls(n,zs(Ss(e),bs(e)))}),right:T.some(function(n,e){Ls(n,zs(Ss(e),Ms(e)))}),"bottom-right":T.some(function(n,e){Ls(n,zs(Ss(e),Os(e)))}),bottom:T.some(function(n,e){Ls(n,zs(Cs(e),Os(e)))}),"bottom-left":T.some(function(n,e){Ls(n,zs(ys(e),Os(e)))}),left:T.some(function(n,e){Ls(n,zs(ys(e),Ms(e)))})},jl=/* */Object.freeze({__proto__:null,setValueFrom:function(n,e,t){var r=al(n,e,t.left),o=bl(n,e,t.top),i=Dl(r,o);return Ml(n,i),i},setToMin:function(n,e){var t=hs(e),r=vs(e);Ml(n,Dl(t,r))},setToMax:function(n,e){var t=xs(e),r=ws(e);Ml(n,Dl(t,r))},getValueFromEvent:Il,setPositionFromValue:function(n,e,t,r){var o=Ns(t),i=sl(n,r.getSpectrum(n),o.x,r.getLeftEdge(n),r.getRightEdge(n),t),u=wl(n,r.getSpectrum(n),o.y,r.getTopEdge(n),r.getBottomEdge(n),t),c=ls(e.element)/2,a=Li(e.element)/2;Ri(e.element,"left",i-c+"px"),Ri(e.element,"top",u-a+"px")},onLeft:Fl,onRight:Rl,onUp:Vl,onDown:Bl,edgeActions:Al}),Nl=[Lr("stepSize",1),Lr("onChange",O),Lr("onChoose",O),Lr("onInit",O),Lr("onDragStart",O),Lr("onDragEnd",O),Lr("snapToGrid",!1),Lr("rounded",!0),Nr("snapStart"),Ar("model",Fr("mode",{x:[Lr("minX",0),Lr("maxX",100),$r("value",function(n){return ko(n.mode.minX)}),Br("getInitialValue"),ri("manager",hl)],y:[Lr("minY",0),Lr("maxY",100),$r("value",function(n){return ko(n.mode.minY)}),Br("getInitialValue"),ri("manager",Cl)],xy:[Lr("minX",0),Lr("maxX",100),Lr("minY",0),Lr("maxY",100),$r("value",function(n){return ko({x:n.mode.minX,y:n.mode.minY})}),Br("getInitialValue"),ri("manager",jl)]})),xa("sliderBehaviours",[ba,as]),$r("mouseIsDown",function(){return ko(!1)})],Pl=y("mouse.released"),Hl=_f({name:"Slider",configFields:Nl,partFields:Yf,factory:function(i,n,e,t){var r,u=function(n){return cf(n,i,"thumb")},c=function(n){return cf(n,i,"spectrum")},o=function(n){return uf(n,i,"left-edge")},a=function(n){return uf(n,i,"right-edge")},f=function(n){return uf(n,i,"top-edge")},s=function(n){return uf(n,i,"bottom-edge")},l=i.model,d=l.manager,m=function(n,e){d.setPositionFromValue(n,e,i,{getLeftEdge:o,getRightEdge:a,getTopEdge:f,getBottomEdge:s,getSpectrum:c})},g=function(n,e){l.value.set(e);var t=u(n);return m(n,t),i.onChange(n,t,e),T.some(!0)},p=function(t){var n=i.mouseIsDown.get();i.mouseIsDown.set(!1),n&&uf(t,i,"thumb").each(function(n){var e=l.value.get();i.onChoose(t,n,e)})},h=function(n,e){e.stop(),i.mouseIsDown.set(!0),i.onDragStart(n,u(n))},v=function(n,e){e.stop(),i.onDragEnd(n,u(n)),p(n)};return{uid:i.uid,dom:i.dom,components:n,behaviours:Sa(i.sliderBehaviours,[ba.config({mode:"special",focusIn:function(n){return uf(n,i,"spectrum").map(ba.focusIn).map(w)}}),as.config({store:{mode:"manual",getValue:function(n){return l.value.get()}}}),ci.config({channels:((r={})[Pl()]={onReceive:p},r)})]),events:Jr([Zr(gs(),function(n,e){g(n,e.event.value)}),io(function(n,e){var t=l.getInitialValue();l.value.set(t);var r=u(n);m(n,r);var o=c(n);i.onInit(n,r,o,l.value.get())}),Zr(_n(),h),Zr(Fn(),v),Zr(Rn(),h),Zr(Bn(),v)]),apis:{resetToMin:function(n){d.setToMin(n,i)},resetToMax:function(n){d.setToMax(n,i)},changeValue:g,refresh:m},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(n,e){n.resetToMin(e)},resetToMax:function(n,e){n.resetToMax(e)},refresh:function(n,e){n.refresh(e)}}}),zl=function(e,t,r,n){return Pf(t,function(){var n=r();e.setContextToolbar([{label:t+" group",items:n}])},{},n)},Ll=function(n){return[(o=n,i=function(n){return n<0?"black":360<n?"white":"hsl("+n+", 100%, 50%)"},Hl.sketch({dom:Vf('<div class="${prefix}-slider ${prefix}-hue-slider-container"></div>'),components:[Hl.parts["left-edge"](Bf('<div class="${prefix}-hue-slider-black"></div>')),Hl.parts.spectrum({dom:Vf('<div class="${prefix}-slider-gradient-container"></div>'),components:[Bf('<div class="${prefix}-slider-gradient"></div>')],behaviours:bo([bi.config({toggleClass:Ti("thumb-active")})])}),Hl.parts["right-edge"](Bf('<div class="${prefix}-hue-slider-white"></div>')),Hl.parts.thumb({dom:Vf('<div class="${prefix}-slider-thumb"></div>'),behaviours:bo([bi.config({toggleClass:Ti("thumb-active")})])})],onChange:function(n,e,t){var r=i(t.x());Ri(e.element,"background-color",r),o.onChange(n,e,r)},onDragStart:function(n,e){bi.on(e)},onDragEnd:function(n,e){bi.off(e)},onInit:function(n,e,t,r){var o=i(r.x());Ri(e.element,"background-color",o)},stepSize:10,model:{mode:"x",minX:0,maxX:360,getInitialValue:function(){return{x:o.getInitialValue()}}},sliderBehaviours:bo([wi(Hl.refresh)])}))];var o,i},Gl=["9px","10px","11px","12px","14px","16px","18px","20px","24px","32px","36px"],$l=function(e,n){return(xe(n)?T.some(n):Ee(n).filter(xe)).map(function(n){return Wi(function(n,e){return e(n)},Yi,n,function(n){return ji(n,"font-size").isSome()},e).bind(function(n){return ji(n,"font-size")}).getOrThunk(function(){return Bi(n,"font-size")})}).getOr("")},Ul=function(n){var e=n.selection.getStart(),t=de.fromDom(e),r=de.fromDom(n.getBody()),o=$l(function(n){return ve(r,n)},t);return G(Gl,function(n){return o===n}).getOr("medium")},Wl=function(n){var e,t=Ul(n);return e=t,$(Gl,function(n){return n===e}).getOr(2)},Xl=function(r,n){var e;e=n,T.from(Gl[e]).each(function(n){var e,t;t=n,Ul(e=r)!==t&&e.execCommand("fontSize",!1,t)})},ql=y(Gl),Yl=vr([Br("getInitialValue"),Br("onChange"),Br("category"),Br("sizes")]),Kl=function(n){var i=_r("SizeSlider",Yl,n);return Hl.sketch({dom:{tag:"div",classes:[Ti("slider-"+i.category+"-size-container"),Ti("slider"),Ti("slider-size-container")]},onChange:function(n,e,t){var r,o=t.x();0<=(r=o)&&r<i.sizes.length&&i.onChange(o)},onDragStart:function(n,e){bi.on(e)},onDragEnd:function(n,e){bi.off(e)},model:{mode:"x",minX:0,maxX:i.sizes.length-1,getInitialValue:function(){return{x:i.getInitialValue()}}},stepSize:1,snapToGrid:!0,sliderBehaviours:bo([wi(Hl.refresh)]),components:[Hl.parts.spectrum({dom:Vf('<div class="${prefix}-slider-size-container"></div>'),components:[Bf('<div class="${prefix}-slider-size-line"></div>')]}),Hl.parts.thumb({dom:Vf('<div class="${prefix}-slider-thumb"></div>'),behaviours:bo([bi.config({toggleClass:Ti("thumb-active")})])})]})},Jl=ql(),Ql=function(n){return[Bf('<span class="${prefix}-toolbar-button ${prefix}-icon-small-font ${prefix}-icon"></span>'),Kl({onChange:(e=n).onChange,sizes:Jl,category:"font",getInitialValue:e.getInitialValue}),Bf('<span class="${prefix}-toolbar-button ${prefix}-icon-large-font ${prefix}-icon"></span>')];var e},Zl=function(n){var e=n.uid!==undefined&&ct(n,"uid")?n.uid:bf("memento");return{get:function(n){return n.getSystem().getByUid(e).getOrDie()},getOpt:function(n){return n.getSystem().getByUid(e).toOptional()},asSpec:function(){return x(x({},n),{uid:e})}}},nd=window.Promise?window.Promise:(Of=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=[],cd(n,ed(rd,this),ed(od,this))},Tf=window,kf=Of.immediateFn||"function"==typeof Tf.setImmediate&&Tf.setImmediate||function(n){setTimeout(n,1)},Ef=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},Of.prototype["catch"]=function(n){return this.then(null,n)},Of.prototype.then=function(t,r){var o=this;return new Of(function(n,e){td.call(o,new ud(t,r,n,e))})},Of.all=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var a=Array.prototype.slice.call(1===n.length&&Ef(n[0])?n[0]:n);return new Of(function(o,i){if(0===a.length)return o([]);for(var u=a.length,n=0;n<a.length;n++)!function c(e,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if("function"==typeof t)return void t.call(n,function(n){c(e,n)},i)}a[e]=n,0==--u&&o(a)}catch(r){i(r)}}(n,a[n])})},Of.resolve=function(e){return e&&"object"==typeof e&&e.constructor===Of?e:new Of(function(n){n(e)})},Of.reject=function(t){return new Of(function(n,e){e(t)})},Of.race=function(o){return new Of(function(n,e){for(var t=0,r=o;t<r.length;t++)r[t].then(n,e)})},Of);function ed(n,e){return function(){return n.apply(e,arguments)}}function td(r){var o=this;null!==this._state?kf(function(){var n,e=o._state?r.onFulfilled:r.onRejected;if(null!==e){try{n=e(o._value)}catch(t){return void r.reject(t)}r.resolve(n)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function rd(n){try{if(n===this)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if("function"==typeof e)return void cd(ed(e,n),ed(rd,this),ed(od,this))}this._state=!0,this._value=n,id.call(this)}catch(t){od.call(this,t)}}function od(n){this._state=!1,this._value=n,id.call(this)}function id(){for(var n=0,e=this._deferreds;n<e.length;n++){var t=e[n];td.call(this,t)}this._deferreds=[]}function ud(n,e,t,r){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof e?e:null,this.resolve=t,this.reject=r}function cd(n,e,t){var r=!1;try{n(function(n){r||(r=!0,e(n))},function(n){r||(r=!0,t(n))})}catch(o){if(r)return;r=!0,t(o)}}function ad(n){return t=n,new nd(function(n){var e=new FileReader;e.onloadend=function(){n(e.result)},e.readAsDataURL(t)}).then(function(n){return n.split(",")[1]});var t}var fd=ad,sd=function(u){var e=Zl({dom:{tag:"input",attributes:{accept:"image/*",type:"file",title:""},styles:{visibility:"hidden",position:"absolute"}},events:Jr([oo(zn()),Zr(Hn(),function(n,e){var t,r;t=e.event.raw,r=t.target.files||t.dataTransfer.files,T.from(r[0]).each(function(n){var o,i;o=u,fd(i=n).then(function(r){o.undoManager.transact(function(){var n=o.editorUpload.blobCache,e=n.create(Ba("mceu"),i,r);n.add(e);var t=o.dom.createHTML("img",{src:e.blobUri()});o.insertContent(t)})})})})])});return If.sketch({dom:Nf("image",u),components:[e.asSpec()],action:function(n){e.get(n).element.dom.click()}})},ld=function(n){return n.dom.textContent},dd=function(n){return 0<n.length},md=function(n){return n===undefined||null===n?"":n},gd=function(n){return vd(n).fold(function(){return{url:"",text:n.selection.getContent({format:"text"}),title:"",target:"",link:T.none()}},function(n){return t=ld(e=n),r=lt(e,"href"),o=lt(e,"title"),i=lt(e,"target"),{url:md(r),text:t!==r?md(t):"",title:md(o),target:md(i),link:T.some(e)};var e,t,r,o,i})},pd=function(e,t,n){return n.text.toOptional().filter(dd).fold(function(){return lt(n=e,"href")===ld(n)?T.some(t):T.none();var n},T.some)},hd=function(o,i){i.url.toOptional().filter(dd).fold(function(){var e;e=o,i.link.bind(v).each(function(n){e.execCommand("unlink")})},function(e){var n,t,r=(n=i,(t={}).href=e,n.title.toOptional().filter(dd).each(function(n){t.title=n}),n.target.toOptional().filter(dd).each(function(n){t.target=n}),t);i.link.bind(v).fold(function(){var n=i.text.toOptional().filter(dd).getOr(e);o.insertContent(o.dom.createHTML("a",r,o.dom.encode(n)))},function(t){var n=pd(t,e,i);st(t,r),n.each(function(n){var e;e=n,t.dom.textContent=e})})})},vd=function(n){var e=de.fromDom(n.selection.getStart());return Zi(e,"a")},yd=Mn(),bd=function(n,e){var t=e.selection.getRng();n(),e.selection.setRng(t)},xd=function(n,e){var t,r;return{key:n,value:{config:{},me:(t=n,r=Jr(e),wo({fields:[Br("enabled")],name:t,active:{events:y(r)}})),configAsRaw:y({}),initialConfig:{},state:vo}}},wd=/* */Object.freeze({__proto__:null,getCurrent:function(n,e,t){return e.find(n)}}),Sd=[Br("find")],Od=wo({fields:Sd,name:"composing",apis:wd}),Td=Df({name:"Container",factory:function(n){var e=n.dom,t=e.attributes,r=c(e,["attributes"]);return{uid:n.uid,dom:x({tag:"div",attributes:x({role:"presentation"},t)},r),components:n.components,behaviours:wa(n.containerBehaviours),events:n.events,domModification:n.domModification,eventOrder:n.eventOrder}},configFields:[Lr("components",[]),xa("containerBehaviours",[]),Lr("events",{}),Lr("domModification",{}),Lr("eventOrder",{})]}),kd=Df({name:"DataField",factory:function(t){return{uid:t.uid,dom:t.dom,behaviours:Ta(t.dataBehaviours,[as.config({store:{mode:"memory",initialValue:t.getInitialValue()}}),Od.config({find:T.some})]),events:Jr([io(function(n,e){as.setValue(n,t.getInitialValue())})])}},configFields:[Br("uid"),Br("dom"),Br("getInitialValue"),Oa("dataBehaviours",[as,Od])]}),Ed=function(n){return n.dom.value},Cd=function(n,e){if(e===undefined)throw new Error("Value.set was undefined");n.dom.value=e},Md=y([Nr("data"),Lr("inputAttributes",{}),Lr("inputStyles",{}),Lr("tag","input"),Lr("inputClasses",[]),Zo("onSetValue"),Lr("styles",{}),Lr("eventOrder",{}),xa("inputBehaviours",[as,_i]),Lr("selectOnFocus",!0)]),Dd=function(n){return x(x({},(e=n,bo([_i.config({onFocus:e.selectOnFocus?function(n){var e=n.element,t=Ed(e);e.dom.setSelectionRange(0,t.length)}:O})]))),Sa(n.inputBehaviours,[as.config({store:x(x({mode:"manual"},n.data.map(function(n){return{initialValue:n}}).getOr({})),{getValue:function(n){return Ed(n.element)},setValue:function(n,e){Ed(n.element)!==e&&Cd(n.element,e)}}),onSetValue:n.onSetValue})]));var e},_d=Df({name:"Input",configFields:Md(),factory:function(n,e){return{uid:n.uid,dom:{tag:(t=n).tag,attributes:x({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses},components:[],behaviours:Dd(n),eventOrder:n.eventOrder};var t}}),Id=/* */Object.freeze({__proto__:null,exhibit:function(n,e){return lo({attributes:ir([{key:e.tabAttr,value:"true"}])})}}),Fd=[Lr("tabAttr","data-alloy-tabstop")],Rd=wo({fields:Fd,name:"tabstopping",active:Id}),Vd=tinymce.util.Tools.resolve("tinymce.util.I18n"),Bd=function(n,e){var t=Zl(_d.sketch({inputAttributes:{placeholder:Vd.translate(e)},onSetValue:function(n,e){ue(n,Pn())},inputBehaviours:bo([Od.config({find:T.some}),Rd.config({}),ba.config({mode:"execution"})]),selectOnFocus:!1})),r=Zl(If.sketch({dom:Vf('<button class="${prefix}-input-container-x ${prefix}-icon-cancel-circle ${prefix}-icon"></button>'),action:function(n){var e=t.get(n);as.setValue(e,"")}}));return{name:n,spec:Td.sketch({dom:Vf('<div class="${prefix}-input-container"></div>'),components:[t.asSpec(),r.asSpec()],containerBehaviours:bo([bi.config({toggleClass:Ti("input-container-empty")}),Od.config({find:function(n){return T.some(t.get(n))}}),xd("input-clearing",[Zr(Pn(),function(n){var e=t.get(n);(0<as.getValue(e).length?bi.off:bi.on)(n)})])])})}},Ad=["input","button","textarea","select"],jd=function(n,e,t){(e.disabled()?Gd:$d)(n,e)},Nd=function(n,e){return!0===e.useNative&&A(Ad,ye(n.element))},Pd=function(n){ft(n.element,"disabled","disabled")},Hd=function(n){gt(n.element,"disabled")},zd=function(n){ft(n.element,"aria-disabled","true")},Ld=function(n){ft(n.element,"aria-disabled","false")},Gd=function(e,n,t){n.disableClass.each(function(n){bt(e.element,n)}),(Nd(e,n)?Pd:zd)(e),n.onDisabled(e)},$d=function(e,n,t){n.disableClass.each(function(n){wt(e.element,n)}),(Nd(e,n)?Hd:Ld)(e),n.onEnabled(e)},Ud=function(n,e){return Nd(n,e)?mt(n.element,"disabled"):"true"===lt(n.element,"aria-disabled")},Wd=/* */Object.freeze({__proto__:null,enable:$d,disable:Gd,isDisabled:Ud,onLoad:jd,set:function(n,e,t,r){(r?Gd:$d)(n,e)}}),Xd=/* */Object.freeze({__proto__:null,exhibit:function(n,e){return lo({classes:e.disabled()?e.disableClass.toArray():[]})},events:function(t,n){return Jr([Qr(Kn(),function(n,e){return Ud(n,t)}),mo(t,n,jd)])}}),qd=[Gr("disabled",l,Vr),Lr("useNative",!0),Nr("disableClass"),Zo("onDisabled"),Zo("onEnabled")],Yd=wo({fields:qd,name:"disabling",active:Xd,apis:Wd}),Kd=[xa("formBehaviours",[as])],Jd=function(n){return"<alloy.field."+n+">"},Qd=function(o,n){return{uid:o.uid,dom:o.dom,components:n,behaviours:Sa(o.formBehaviours,[as.config({store:{mode:"manual",getValue:function(n){var e,t,r=(e=o,t=n.getSystem(),et(e.partUids,function(n,e){return y(t.getByUid(n))}));return et(r,function(n,o){return n().bind(function(n){var e,t,r=Od.getCurrent(n);return e=r,t=new Error("Cannot find a current component to extract the value from for form part '"+o+"': "+Ho(n.element)),e.fold(function(){return Ct.error(t)},Ct.value)}).map(as.getValue)})},setValue:function(t,n){nt(n,function(e,n){uf(t,o,n).each(function(n){Od.getCurrent(n).each(function(n){as.setValue(n,e)})})})}}})]),apis:{getField:function(n,e){return uf(n,o,e).bind(Od.getCurrent)}}}},Zd=(df(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=Jd(n),o=e,{uiType:Ra(),owner:t,name:r,config:o,validated:{}};var t,r,o},record:function(){return i}}),t=n(e),r=e.record(),o=N(r,function(n){return Ka({name:n,pname:Jd(n)})});return wf("form",Kd,o,Qd,t)}),nm=function(){var e=ko(T.none()),t=function(){return e.get().each(function(n){return n.destroy()})};return{clear:function(){t(),e.set(T.none())},isSet:function(){return e.get().isSome()},set:function(n){t(),e.set(T.some(n))},run:function(n){return e.get().each(n)}}},em=function(){var e=ko(T.none());return{clear:function(){return e.set(T.none())},set:function(n){return e.set(T.some(n))},isSet:function(){return e.get().isSome()},on:function(n){return e.get().each(n)}}},tm=function(n){var r="navigateEvent",e=yr([Br("fields"),Lr("maxFieldIndex",n.fields.length-1),Br("onExecute"),Br("getInitialValue"),$r("state",function(){return{dialogSwipeState:em(),currentScreen:ko(0)}})]),u=_r("SerialisedDialog",e,n),o=function(e,n,t){return If.sketch({dom:Vf('<span class="${prefix}-icon-'+n+' ${prefix}-icon"></span>'),action:function(n){ce(n,r,{direction:e})},buttonBehaviours:bo([Yd.config({disableClass:Ti("toolbar-navigation-disabled"),disabled:function(){return!t}})])})},i=function(n,o){var i=Ui(n.element,"."+Ti("serialised-dialog-screen"));Qi(n.element,"."+Ti("serialised-dialog-chain")).each(function(r){0<=u.state.currentScreen.get()+o&&u.state.currentScreen.get()+o<i.length&&(ji(r,"left").each(function(n){var e=parseInt(n,10),t=ls(i[0]);Ri(r,"left",e-o*t+"px")}),u.state.currentScreen.set(u.state.currentScreen.get()+o))})},c=function(r){var n=Ui(r.element,"input");T.from(n[u.state.currentScreen.get()]).each(function(n){r.getSystem().getByDom(n).each(function(n){var e,t;e=r,t=n.element,e.getSystem().triggerFocus(t,e.element)})});var e=f.get(r);Fu.highlightAt(e,u.state.currentScreen.get())},a=Zl(Zd(function(t){return{dom:Vf('<div class="${prefix}-serialised-dialog"></div>'),components:[Td.sketch({dom:Vf('<div class="${prefix}-serialised-dialog-chain" style="left: 0px; position: absolute;"></div>'),components:N(u.fields,function(n,e){return e<=u.maxFieldIndex?Td.sketch({dom:Vf('<div class="${prefix}-serialised-dialog-screen"></div>'),components:[o(-1,"previous",0<e),t.field(n.name,n.spec),o(1,"next",e<u.maxFieldIndex)]}):t.field(n.name,n.spec)})})],formBehaviours:bo([wi(function(n,e){var t;t=e,Qi(n.element,"."+Ti("serialised-dialog-chain")).each(function(n){Ri(n,"left",-u.state.currentScreen.get()*t.width+"px")})}),ba.config({mode:"special",focusIn:function(n,e){c(n)},onTab:function(n,e){return i(n,1),T.some(!0)},onShiftTab:function(n,e){return i(n,-1),T.some(!0)}}),xd("form-events",[io(function(e,n){u.state.currentScreen.set(0),u.state.dialogSwipeState.clear();var t=f.get(e);Fu.highlightFirst(t),u.getInitialValue(e).each(function(n){as.setValue(e,n)})}),ao(u.onExecute),Zr(Ln(),function(n,e){"left"===e.event.raw.propertyName&&c(n)}),Zr(r,function(n,e){var t=e.event.direction;i(n,t)})])])}})),f=Zl({dom:Vf('<div class="${prefix}-dot-container"></div>'),behaviours:bo([Fu.config({highlightClass:Ti("dot-active"),itemClass:Ti("dot-item")})]),components:W(u.fields,function(n,e){return e<=u.maxFieldIndex?[Bf('<div class="${prefix}-dot-item ${prefix}-icon-full-dot ${prefix}-icon"></div>')]:[]})});return{dom:Vf('<div class="${prefix}-serializer-wrapper"></div>'),components:[a.asSpec(),f.asSpec()],behaviours:bo([ba.config({mode:"special",focusIn:function(n){var e=a.get(n);ba.focusIn(e)}}),xd("serializer-wrapper-events",[Zr(_n(),function(n,e){var t=e.event;u.state.dialogSwipeState.set({xValue:t.raw.touches[0].clientX,points:[]})}),Zr(In(),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<e-n.xValue?1:-1,r={direction:t,xValue:e};return{xValue:e,points:(0===n.points.length?[]:n.points[n.points.length-1].direction===t?n.points.slice(0,n.points.length-1):n.points).concat([r])}}(n,t.raw.touches[0].clientX))})}),Zr(Fn(),function(r,n){u.state.dialogSwipeState.on(function(n){var e=a.get(r),t=-1*function(n){if(0===n.points.length)return 0;var e=n.points[0].direction,t=n.points[n.points.length-1].direction;return-1===e&&-1===t?-1:1===e&&1===t?1:0}(n);i(e,t)})})])])}},rm=d(function(r,o){return[{label:"the link group",items:[tm({fields:[Bd("url","Type or paste URL"),Bd("text","Link text"),Bd("title","Link title"),Bd("target","Link target"),{name:"link",spec:kd.sketch({dom:{tag:"span",styles:{display:"none"}},getInitialValue:function(){return T.none()}})}],maxFieldIndex:["url","text","title","target"].length-1,getInitialValue:function(){return T.some(gd(o))},onExecute:function(n,e){var t=as.getValue(n);hd(o,t),r.restoreToolbar(),o.focus()}})]}]}),om=function(r,o){return jf(o,"link","link",function(){var n,e,t=rm(r,o);r.setContextToolbar(t),n=o,e=function(){r.focusToolbar()},(yd.os.isAndroid()?bd:s)(e,n),vd(o).each(function(n){o.selection.select(n.dom)})})},im=Jr([{key:Wn(),value:Yr({can:function(n,e){var t,r,o=e.event,i=o.originator,u=o.target;return r=u,!(ve(t=i,n.element)&&!ve(t,r))||(console.warn(Wn()+" did not get interpreted by the desired target. \nOriginator: "+Ho(i)+"\nTarget: "+Ho(u)+"\nCheck the "+Wn()+" event handlers"),!1)}})}]),um=/* */Object.freeze({__proto__:null,events:im}),cm=v,am=function(e){var n=function(n){return function(){throw new Error("The component must be in a context to send: "+n+(e?"\n"+Ho(e().element)+" is not in context.":""))}};return{debugInfo:y("fake"),triggerEvent:n("triggerEvent"),triggerFocus:n("triggerFocus"),triggerEscape:n("triggerEscape"),build:n("build"),addToWorld:n("addToWorld"),removeFromWorld:n("removeFromWorld"),addToGui:n("addToGui"),removeFromGui:n("removeFromGui"),getByUid:n("getByUid"),getByDom:n("getByDom"),broadcast:n("broadcast"),broadcastOn:n("broadcastOn"),broadcastEvent:n("broadcastEvent"),isConnected:l}},fm=am(),sm=function(n,o){var i={};return nt(n,function(n,r){nt(n,function(n,e){var t=it(i,e).getOr([]);i[e]=t.concat([o(r,n)])})}),i},lm=function(u,c,n,a){try{var e=(t=n,r=function(n,e){var t=n[c],r=e[c],o=a.indexOf(t),i=a.indexOf(r);if(-1===o)throw new Error("The ordering for "+u+" does not have an entry for "+t+".\nOrder specified: "+JSON.stringify(a,null,2));if(-1===i)throw new Error("The ordering for "+u+" does not have an entry for "+r+".\nOrder specified: "+JSON.stringify(a,null,2));return o<i?-1:i<o?1:0},(o=R.call(t,0)).sort(r),o);return Ct.value(e)}catch(i){return Ct.error([i])}var t,r,o},dm=function(n,e){return{cHandler:b.apply(undefined,[n.handler].concat(e)),purpose:n.purpose}},mm=function(n){return n.cHandler},gm=function(n,e){return{name:n,handler:e}},pm=function(n,e,t){var r,o,i=x(x({},t),(r=n,o={},P(e,function(n){o[n.name()]=n.handlers(r)}),o));return sm(i,gm)},hm=function(n){var e,i=I(e=n)?{can:y(!0),abort:y(!1),run:e}:e;return function(n,e){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var o=[n,e].concat(t);i.abort.apply(undefined,o)?e.stop():i.can.apply(undefined,o)&&i.run.apply(undefined,o)}},vm=function(n,e,t){var r,o,i=e[t];return i?lm("Event: "+t,"name",n,i).map(function(n){var e=N(n,function(n){return n.handler});return Kr(e)}):(r=t,o=n,Ct.error(["The event ("+r+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(N(o,function(n){return n.name}),null,2)]))},ym=function(n,i){var e=ot(n,function(r,o){return(1===r.length?Ct.value(r[0].handler):vm(r,i,o)).map(function(n){var e=hm(n),t=1<r.length?H(i[o],function(e){return j(r,function(n){return n.name===e})}).join(" > "):r[0].name;return or(o,{handler:e,purpose:t})})});return ur(e,{})},bm="alloy.base.behaviour",xm=function(n){var e,t;return Mr("custom.definition",yr([Sr("dom","dom",Qt(),yr([Br("tag"),Lr("styles",{}),Lr("classes",[]),Lr("attributes",{}),Nr("value"),Nr("innerHtml")])),Br("components"),Br("uid"),Lr("events",{}),Lr("apis",{}),Sr("eventOrder","eventOrder",((e={})[Kn()]=["disabling",bm,"toggling","typeaheadevents"],e[Wn()]=[bm,"focusing","keying"],e[ne()]=[bm,"disabling","toggling","representing"],e[Pn()]=[bm,"representing","streaming","invalidating"],e[te()]=[bm,"representing","item-events","tooltipping"],e[Rn()]=["focusing",bm,"item-type-events"],e[_n()]=["focusing",bm,"item-type-events"],e[An()]=["item-type-events","tooltipping"],e[Yn()]=["receiving","reflecting","tooltipping"],t=e,Kt.mergeWithThunk(y(t))),Rr()),Nr("domModification")]),n)},wm=function(e,n){P(n,function(n){bt(e,n)})},Sm=function(e,n){P(n,function(n){wt(e,n)})},Om=function(n,e){return t=n,o=N(r=e,function(n){return Hr(n.name(),[Br("config"),Lr("state",vo)])}),i=Mr("component.behaviours",yr(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:et(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},Tm=function(n){var e,t,r=(e=it(n,"behaviours").getOr({}),t=H(Qe(e),function(n){return e[n]!==undefined}),N(t,function(n){return e[n].me}));return Om(n,r)},km=function(n,e,t){var r,o,i,u=x(x({},(r=n).dom),{uid:r.uid,domChildren:N(r.components,function(n){return n.element})}),c=n.domModification.fold(function(){return lo({})},lo),a={"alloy.base.modification":c},f=0<e.length?function(e,n,t,r){var o=x({},n);P(t,function(n){o[n.name()]=n.exhibit(e,r)});var i=sm(o,function(n,e){return{name:n,modification:e}}),u=function(n){return z(n,function(n,e){return x(x({},e.modification),n)},{})},c=z(i.classes,function(n,e){return e.modification.concat(n)},[]),a=u(i.attributes),f=u(i.styles);return lo({classes:c,attributes:a,styles:f})}(t,a,e,u):c;return i=f,x(x({},o=u),{attributes:x(x({},o.attributes),i.attributes),styles:x(x({},o.styles),i.styles),classes:o.classes.concat(i.classes)})},Em=function(n,e,t){var r,o,i,u={"alloy.base.behaviour":n.events};return r=t,o=n.eventOrder,i=pm(r,e,u),ym(i,o).getOrDie()},Cm=function(t){var n=function(){return s},r=ko(fm),e=Dr(xm(t)),o=Tm(t),i=o.list,u=o.data,c=function(n){var e=de.fromTag(n.tag);st(e,n.attributes),wm(e,n.classes),Vi(e,n.styles),n.innerHtml.each(function(n){return No(e,n)});var t=n.domChildren;return Re(e,t),n.value.each(function(n){Cd(e,n)}),n.uid,vf(e,n.uid),e}(km(e,i,u)),a=Em(e,i,u),f=ko(e.components),s={getSystem:r.get,config:function(n){var e=u;return(I(e[n.name()])?e[n.name()]:function(){throw new Error("Could not find "+n.name()+" in "+JSON.stringify(t,null,2))})()},hasConfigured:function(n){return I(u[n.name()])},spec:t,readState:function(n){return u[n]().map(function(n){return n.state.readState()}).getOr("not enabled")},getApis:function(){return e.apis},connect:function(n){r.set(n)},disconnect:function(){r.set(am(n))},element:c,syncComponents:function(){var n=Ce(c),e=W(n,function(n){return r.get().getByDom(n).fold(function(){return[]},function(n){return[n]})});f.set(e)},components:f.get,events:a};return s},Mm=function(n){var e,t=cm(n),r=t.events,o=c(t,["events"]),i=(e=it(o,"components").getOr([]),N(e,Fm)),u=x(x({},o),{events:x(x({},um),r),components:i});return Ct.value(Cm(u))},Dm=function(n){var e=de.fromText(n);return _m({element:e})},_m=function(n){var e=_r("external.component",vr([Br("element"),Nr("uid")]),n),t=ko(am());e.uid.each(function(n){vf(e.element,n)});var r={getSystem:t.get,config:T.none,hasConfigured:l,connect:function(n){t.set(n)},disconnect:function(){t.set(am(function(){return r}))},getApis:function(){return{}},element:e.element,spec:n,readState:y("No state"),syncComponents:O,components:y([]),events:{}};return lf(r)},Im=bf,Fm=function(e){return it(e,sf).fold(function(){var n=e.hasOwnProperty("uid")?e:x({uid:Im("")},e);return Mm(n).getOrDie()},function(n){return n})},Rm=lf,Vm="alloy.item-hover",Bm="alloy.item-focus",Am=function(n){(Do(n.element).isNone()||_i.isFocused(n))&&(_i.isFocused(n)||_i.focus(n),ce(n,Vm,{item:n}))},jm=function(n){ce(n,Bm,{item:n})},Nm=y(Vm),Pm=y(Bm),Hm=[Br("data"),Br("components"),Br("dom"),Lr("hasSubmenu",!1),Nr("toggling"),Oa("itemBehaviours",[bi,_i,ba,as]),Lr("ignoreFocus",!1),Lr("domModification",{}),ri("builder",function(n){return{dom:n.dom,domModification:x(x({},n.domModification),{attributes:x(x(x({role:n.toggling.isSome()?"menuitemcheckbox":"menuitem"},n.domModification.attributes),{"aria-haspopup":n.hasSubmenu}),n.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:Ta(n.itemBehaviours,[n.toggling.fold(bi.revoke,function(n){return bi.config(x({aria:{mode:"checked"}},n))}),_i.config({ignore:n.ignoreFocus,stopMousedown:n.ignoreFocus,onFocus:function(n){jm(n)}}),ba.config({mode:"execution"}),as.config({store:{mode:"memory",initialValue:n.data}}),xd("item-type-events",u(ki(),[Zr(An(),Am),Zr(Jn(),_i.focus)]))]),components:n.components,eventOrder:n.eventOrder}}),Lr("eventOrder",{})],zm=[Br("dom"),Br("components"),ri("builder",function(n){return{dom:n.dom,components:n.components,events:Jr([(e=Jn(),Zr(e,function(n,e){e.stop()}))])};var e})],Lm=function(){return"item-widget"},Gm=y([Ka({name:"widget",overrides:function(e){return{behaviours:bo([as.config({store:{mode:"manual",getValue:function(n){return e.data},setValue:function(){}}})])}}})]),$m=[Br("uid"),Br("data"),Br("components"),Br("dom"),Lr("autofocus",!1),Lr("ignoreFocus",!1),Oa("widgetBehaviours",[as,_i,ba]),Lr("domModification",{}),ff(Gm()),ri("builder",function(t){var n=rf(Lm(),t,Gm()),e=of(Lm(),t,n.internals()),r=function(n){return uf(n,t,"widget").map(function(n){return ba.focusIn(n),n})},o=function(n,e){return Yu(e.event.target)||t.autofocus&&e.setSource(n.element),T.none()};return{dom:t.dom,components:e,domModification:t.domModification,events:Jr([ao(function(n,e){r(n).each(function(n){e.stop()})}),Zr(An(),Am),Zr(Jn(),function(n,e){t.autofocus?r(n):_i.focus(n)})]),behaviours:Ta(t.widgetBehaviours,[as.config({store:{mode:"memory",initialValue:t.data}}),_i.config({ignore:t.ignoreFocus,onFocus:function(n){jm(n)}}),ba.config({mode:"special",focusIn:t.autofocus?function(n){r(n)}:Oo(),onLeft:o,onRight:o,onEscape:function(n,e){return _i.isFocused(n)||t.autofocus?(t.autofocus&&e.setSource(n.element),T.none()):(_i.focus(n),T.some(!0))}})])}})],Um=Fr("type",{widget:$m,item:Hm,separator:zm}),Wm=y([Qa({factory:{sketch:function(n){var e=_r("menu.spec item",Um,n);return e.builder(e)}},name:"items",unit:"item",defaults:function(n,e){return e.hasOwnProperty("uid")?e:x(x({},e),{uid:bf("item")})},overrides:function(n,e){return{type:e.type,ignoreFocus:n.fakeFocus,domModification:{classes:[n.markers.item]}}}})]),Xm=y([Br("value"),Br("items"),Br("dom"),Br("components"),Lr("eventOrder",{}),xa("menuBehaviours",[Fu,as,Od,ba]),Gr("movement",{mode:"menu",moveOnTab:!0},Fr("mode",{grid:[ii(),ri("config",function(n,e){return{mode:"flatgrid",selector:"."+n.markers.item,initSize:{numColumns:e.initSize.numColumns,numRows:e.initSize.numRows},focusManager:n.focusManager}})],matrix:[ri("config",function(n,e){return{mode:"matrix",selectors:{row:e.rowSelector,cell:"."+n.markers.item},focusManager:n.focusManager}}),Br("rowSelector")],menu:[Lr("moveOnTab",!0),ri("config",function(n,e){return{mode:"menu",selector:"."+n.markers.item,moveOnTab:e.moveOnTab,focusManager:n.focusManager}})]})),Ar("markers",Ko()),Lr("fakeFocus",!1),Lr("focusManager",Vu()),Zo("onHighlight")]),qm=y("alloy.menu-focus"),Ym=_f({name:"Menu",configFields:Xm(),partFields:Wm(),factory:function(n,e,t,r){return{uid:n.uid,dom:n.dom,markers:n.markers,behaviours:Sa(n.menuBehaviours,[Fu.config({highlightClass:n.markers.selectedItem,itemClass:n.markers.item,onHighlight:n.onHighlight}),as.config({store:{mode:"memory",initialValue:n.value}}),Od.config({find:T.some}),ba.config(n.movement.config(n,n.movement))]),events:Jr([Zr(Pm(),function(e,t){var n=t.event;e.getSystem().getByDom(n.target).each(function(n){Fu.highlight(e,n),t.stop(),ce(e,qm(),{menu:e,item:n})})}),Zr(Nm(),function(n,e){var t=e.event.item;Fu.highlight(n,t)})]),components:e,eventOrder:n.eventOrder,domModification:{attributes:{role:"menu"}}}}}),Km=function(n,t){var r=Ne(t),e=Mo(r).bind(function(e){var o,i,n=function(n){return ve(e,n)};return n(t)?T.some(t):(o=n,(i=function(n){for(var e=0;e<n.childNodes.length;e++){var t=de.fromDom(n.childNodes[e]);if(o(t))return T.some(t);var r=i(n.childNodes[e]);if(r.isSome())return r}return T.none()})(t.dom))}),o=n(t);return e.each(function(e){Mo(r).filter(function(n){return ve(n,e)}).fold(function(){Eo(e)},O)}),o},Jm=function(n,e,t,r){var o=n.getSystem().build(r);Ye(n,o,t)},Qm=function(n,e,t,r){var o=Zm(n);G(o,function(n){return ve(r.element,n.element)}).each(Ke)},Zm=function(n,e){return n.components()},ng=function(e,n,t,o,r){var i=Zm(e);return T.from(i[o]).map(function(n){return Qm(e,0,0,n),r.each(function(n){Jm(e,0,function(n,e){var t,r;r=e,Me(t=n,o).fold(function(){Fe(t,r)},function(n){De(n,r)})},n)}),n})},eg=wo({fields:[],name:"replacing",apis:/* */Object.freeze({__proto__:null,append:function(n,e,t,r){Jm(n,0,Fe,r)},prepend:function(n,e,t,r){Jm(n,0,Ie,r)},remove:Qm,replaceAt:ng,replaceBy:function(e,n,t,r,o){var i=Zm(e);return $(i,r).bind(function(n){return ng(e,0,0,n,o)})},set:function(e,n,t,r){Km(function(){var n=N(r,e.getSystem().build);qe(e,n)},e.element)},contents:Zm})}),tg=function(t,r,o,n){return it(o,n).bind(function(n){return it(t,n).bind(function(n){var e=tg(t,r,o,n);return T.some([n].concat(e))})}).getOr([])},rg=function(n,e){var t={};nt(n,function(n,e){P(n,function(n){t[n]=e})});var r=e,o=tt(e,function(n,e){return{k:n,v:e}}),i=et(o,function(n,e){return[e].concat(tg(t,r,o,e))});return et(t,function(n){return it(i,n).getOr([n])})},og=function(n){return"prepared"===n.type?T.some(n.menu):T.none()},ig={init:function(){var i=ko({}),u=ko({}),c=ko({}),a=ko(T.none()),f=ko({}),s=function(t){return function(n,e){for(var t=Qe(n),r=0,o=t.length;r<o;r++){var i=t[r],u=n[i];if(e(u,i,n))return T.some(u)}return T.none()}(i.get(),function(n,e){return n===t})},l=function(n){return e(n).bind(og)},e=function(n){return it(u.get(),n)},t=function(n){return it(i.get(),n)};return{setMenuBuilt:function(n,e){var t;u.set(x(x({},u.get()),((t={})[n]={type:"prepared",menu:e},t)))},setContents:function(n,e,t,r){a.set(T.some(n)),i.set(t),u.set(e),f.set(r);var o=rg(r,t);c.set(o)},expand:function(t){return it(i.get(),t).map(function(n){var e=it(c.get(),t).getOr([]);return[n].concat(e)})},refresh:function(n){return it(c.get(),n)},collapse:function(n){return it(c.get(),n).bind(function(n){return 1<n.length?T.some(n.slice(1)):T.none()})},lookupMenu:e,lookupItem:t,otherMenus:function(n){var e=f.get();return Y(Qe(e),n)},getPrimary:function(){return a.get().bind(l)},getMenus:function(){return u.get()},clear:function(){i.set({}),u.set({}),c.set({}),a.set(T.none())},isClear:function(){return a.get().isNone()},getTriggeringPath:function(n,u){var e=H(t(n).toArray(),function(n){return l(n).isSome()});return it(c.get(),n).bind(function(n){var i=q(e.concat(n));return function(n){for(var e=[],t=0;t<n.length;t++){var r=n[t];if(!r.isSome())return T.none();e.push(r.getOrDie())}return T.some(e)}(W(i,function(n,e){return t=n,r=u,o=i.slice(0,e+1),l(t).bind(function(e){return s(t).bind(function(n){return r(n).map(function(n){return{triggeredMenu:e,triggeringItem:n,triggeringPath:o}})})}).fold(function(){return a.get().is(n)?[]:[T.none()]},function(n){return[T.some(n)]});var t,r,o}))})}}},extractPreparedMenu:og},ug=y("collapse-item"),cg=Df({name:"TieredMenu",configFields:[ti("onExecute"),ti("onEscape"),ei("onOpenMenu"),ei("onOpenSubmenu"),Zo("onRepositionMenu"),Zo("onCollapseMenu"),Lr("highlightImmediately",!0),jr("data",[Br("primary"),Br("menus"),Br("expansions")]),Lr("fakeFocus",!1),Zo("onHighlight"),Zo("onHover"),jr("markers",[Br("backgroundMenu")].concat(qo()).concat(Yo())),Br("dom"),Lr("navigateOnHover",!0),Lr("stayInDom",!1),xa("tmenuBehaviours",[ba,Fu,Od,eg]),Lr("eventOrder",{})],apis:{collapseMenu:function(n,e){n.collapseMenu(e)},highlightPrimary:function(n,e){n.highlightPrimary(e)},repositionMenus:function(n,e){n.repositionMenus(e)}},factory:function(c,n){var a,e,i=ko(T.none()),o=function(r,o,n){return et(n,function(n,e){var t=function(){return Ym.sketch(x(x({},n),{value:e,markers:c.markers,fakeFocus:c.fakeFocus,onHighlight:c.onHighlight,focusManager:c.fakeFocus?{get:o=function(n){return Fu.getHighlighted(n).map(function(n){return n.element})},set:function(e,n){var t=o(e);e.getSystem().getByDom(n).fold(O,function(n){Fu.highlight(e,n)});var r=o(e);Ru(e,t,r)}}:Vu()}));var o};return e===o?{type:"prepared",menu:r.getSystem().build(t())}:{type:"notbuilt",nbMenu:t}})},f=ig.init(),s=function(n){return as.getValue(n).value},u=function(n){return et(c.data.menus,function(n,e){return W(n.items,function(n){return"separator"===n.type?[]:[n.data.value]})})},l=function(e,n){Fu.highlight(e,n),Fu.getHighlighted(n).orThunk(function(){return Fu.getFirst(n)}).each(function(n){fe(e,n.element,Jn())})},d=function(e,n){return wu(N(n,function(n){return e.lookupMenu(n).bind(function(n){return"prepared"===n.type?T.some(n.menu):T.none()})}))},m=function(e,n,t){var r=d(n,n.otherMenus(t));P(r,function(n){Sm(n.element,[c.markers.backgroundMenu]),c.stayInDom||eg.remove(e,n)})},g=function(n,r){var o,e=(o=n,i.get().getOrThunk(function(){var t={},n=Ui(o.element,"."+c.markers.item),e=H(n,function(n){return"true"===lt(n,"aria-haspopup")});return P(e,function(n){o.getSystem().getByDom(n).each(function(n){var e=s(n);t[e]=n})}),i.set(T.some(t)),t}));nt(e,function(n,e){var t=A(r,e);ft(n.element,"aria-expanded",t)})},p=function(r,o,i){return T.from(i[0]).bind(function(n){return o.lookupMenu(n).bind(function(n){if("notbuilt"===n.type)return T.none();var e=n.menu,t=d(o,i.slice(1));return P(t,function(n){bt(n.element,c.markers.backgroundMenu)}),Le(e.element)||eg.append(r,Rm(e)),Sm(e.element,[c.markers.backgroundMenu]),l(r,e),m(r,o,i),T.some(e)})})};(e=a=a||{})[e.HighlightSubmenu=0]="HighlightSubmenu",e[e.HighlightParent=1]="HighlightParent";var h=function(o,i,u){void 0===u&&(u=a.HighlightSubmenu);var n=s(i);return f.expand(n).bind(function(r){return g(o,r),T.from(r[0]).bind(function(t){return f.lookupMenu(t).bind(function(n){var e=function(n,e,t){if("notbuilt"!==t.type)return t.menu;var r=n.getSystem().build(t.nbMenu());return f.setMenuBuilt(e,r),r}(o,t,n);return Le(e.element)||eg.append(o,Rm(e)),c.onOpenSubmenu(o,i,e,q(r)),u===a.HighlightSubmenu?(Fu.highlightFirst(e),p(o,f,r)):(Fu.dehighlightAll(e),T.some(i))})})})},r=function(e,t){var n=s(t);return f.collapse(n).bind(function(n){return g(e,n),p(e,f,n).map(function(n){return c.onCollapseMenu(e,t,n),n})})},t=function(t){return function(e,n){return Zi(n.getSource(),"."+c.markers.item).bind(function(n){return e.getSystem().getByDom(n).toOptional().bind(function(n){return t(e,n).map(function(){return!0})})})}},v=Jr([Zr(qm(),function(t,r){var n=r.event.item;f.lookupItem(s(n)).each(function(){var n=r.event.menu;Fu.highlight(t,n);var e=s(r.event.item);f.refresh(e).each(function(n){return m(t,f,n)})})}),ao(function(e,n){var t=n.event.target;e.getSystem().getByDom(t).each(function(n){0===s(n).indexOf("collapse-item")&&r(e,n),h(e,n,a.HighlightSubmenu).fold(function(){c.onExecute(e,n)},function(){})})}),io(function(e,n){var t,r;t=o(e,c.data.primary,c.data.menus),r=u(),f.setContents(c.data.primary,t,c.data.expansions,r),f.getPrimary().each(function(n){eg.append(e,Rm(n)),c.onOpenMenu(e,n),c.highlightImmediately&&l(e,n)})})].concat(c.navigateOnHover?[Zr(Nm(),function(n,e){var t,r,o=e.event.item;t=n,r=s(o),f.refresh(r).bind(function(n){return g(t,n),p(t,f,n)}),h(n,o,a.HighlightParent),c.onHover(n,o)})]:[])),y=function(n){return Fu.getHighlighted(n).bind(Fu.getHighlighted)},b={collapseMenu:function(e){y(e).each(function(n){r(e,n)})},highlightPrimary:function(e){f.getPrimary().each(function(n){l(e,n)})},repositionMenus:function(r){f.getPrimary().bind(function(e){return y(r).bind(function(n){var e,t=s(n),r=(e=f.getMenus(),ot(e,function(n){return n})),o=wu(N(r,ig.extractPreparedMenu));return f.getTriggeringPath(t,function(n){return t=n,Q(o,function(n){if(!n.getSystem().isConnected())return T.none();var e=Fu.getCandidates(n);return G(e,function(n){return s(n)===t})});var t})}).map(function(n){return{primary:e,triggeringPath:n}})}).fold(function(){var n;n=r,T.from(n.components()[0]).filter(function(n){return"menu"===lt(n.element,"role")}).each(function(n){c.onRepositionMenu(r,n,[])})},function(n){var e=n.primary,t=n.triggeringPath;c.onRepositionMenu(r,e,t)})}};return{uid:c.uid,dom:c.dom,markers:c.markers,behaviours:Sa(c.tmenuBehaviours,[ba.config({mode:"special",onRight:t(function(n,e){return Yu(e.element)?T.none():h(n,e,a.HighlightSubmenu)}),onLeft:t(function(n,e){return Yu(e.element)?T.none():r(n,e)}),onEscape:t(function(n,e){return r(n,e).orThunk(function(){return c.onEscape(n,e).map(function(){return n})})}),focusIn:function(e,n){f.getPrimary().each(function(n){fe(e,n.element,Jn())})}}),Fu.config({highlightClass:c.markers.selectedMenu,itemClass:c.markers.menu}),Od.config({find:function(n){return Fu.getHighlighted(n)}}),eg.config({})]),eventOrder:c.eventOrder,apis:b,events:v}},extraApis:{tieredData:function(n,e,t){return{primary:n,menus:e,expansions:t}},singleData:function(n,e){return{primary:n,menus:or(n,e),expansions:{}}},collapseItem:function(n){return{value:Ba(ug()),meta:{text:n}}}}}),ag=function(n,e,t,r){return it(e.routes,r.start).bind(function(n){return it(n,r.destination)})},fg=function(n,e,t,r){return ag(0,e,0,r).bind(function(e){return e.transition.map(function(n){return{transition:n,route:e}})})},sg=function(t,r,n){var e,o,i;i=n,lg(e=t,o=r).bind(function(n){return fg(e,o,i,n)}).each(function(n){var e=n.transition;wt(t.element,e.transitionClass),gt(t.element,r.destinationAttr)})},lg=function(e,t,n){var r=e.element;return dt(r,t.destinationAttr).map(function(n){return{start:lt(e.element,t.stateAttr),destination:n}})},dg=function(n,e,t,r){sg(n,e,t),mt(n.element,e.stateAttr)&&lt(n.element,e.stateAttr)!==r&&e.onFinish(n,r),ft(n.element,e.stateAttr,r)},mg=/* */Object.freeze({__proto__:null,findRoute:ag,disableTransition:sg,getCurrentRoute:lg,jumpTo:dg,progressTo:function(t,r,o,i){var e,u;u=r,mt((e=t).element,u.destinationAttr)&&(dt(e.element,u.destinationAttr).each(function(n){ft(e.element,u.stateAttr,n)}),gt(e.element,u.destinationAttr));var n,c,a=(n=r,c=i,{start:lt(t.element,n.stateAttr),destination:c});fg(t,r,o,a).fold(function(){dg(t,r,o,i)},function(n){sg(t,r,o);var e=n.transition;bt(t.element,e.transitionClass),ft(t.element,r.destinationAttr,i)})},getState:function(n,e,t){return dt(n.element,e.stateAttr)}}),gg=/* */Object.freeze({__proto__:null,events:function(o,i){return Jr([Zr(Ln(),function(t,n){var r=n.event.raw;lg(t,o).each(function(e){ag(0,o,0,e).each(function(n){n.transition.each(function(n){r.propertyName===n.property&&(dg(t,o,i,e.destination),o.onTransition(t,e))})})})}),io(function(n,e){dg(n,o,i,o.initialState)})])}}),pg=[Lr("destinationAttr","data-transitioning-destination"),Lr("stateAttr","data-transitioning-state"),Br("initialState"),Zo("onTransition"),Zo("onFinish"),Ar("routes",Cr(Ct.value,Cr(Ct.value,vr([zr("transition",[Br("property"),Br("transitionClass")])]))))],hg=wo({fields:pg,name:"transitioning",active:gg,apis:mg,extra:{createRoutes:function(n){var r={};return nt(n,function(n,e){var t=e.split("<->");r[t[0]]=or(t[1],n),r[t[1]]=or(t[0],n)}),r},createBistate:function(n,e,t){return ir([{key:n,value:or(e,t)},{key:e,value:or(n,t)}])},createTristate:function(n,e,t,r){return ir([{key:n,value:ir([{key:e,value:r},{key:t,value:r}])},{key:e,value:ir([{key:n,value:r},{key:t,value:r}])},{key:t,value:ir([{key:n,value:r},{key:e,value:r}])}])}}}),vg=Ti("scrollable"),yg=function(n){bt(n,vg)},bg=function(n){wt(n,vg)},xg=vg,wg=function(n){return it(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?[Ti("styles-item-is-menu")]:[]},toggling:{toggleOnExecute:!1,toggleClass:Ti("format-matches"),selected:t},itemBehaviours:bo(o?[]:[xi(n,function(n,e){(e?bi.on:bi.off)(n)})]),components:[{dom:{tag:"div",attributes:{style:r},innerHtml:e}}]}},Og=function(n,e,t,r){return{value:n,dom:{tag:"div"},components:[If.sketch({dom:{tag:"div",classes:[Ti("styles-collapser")]},components:r?[{dom:{tag:"span",classes:[Ti("styles-collapse-icon")]}},Dm(n)]:[Dm(n)],action:function(n){var e;r&&(e=t().get(n),cg.collapseMenu(e))}}),{dom:{tag:"div",classes:[Ti("styles-menu-items-container")]},components:[Ym.parts.items({})],behaviours:bo([xd("adhoc-scrollable-menu",[io(function(n,e){Ri(n.element,"overflow-y","auto"),Ri(n.element,"-webkit-overflow-scrolling","touch"),yg(n.element)}),uo(function(n){Ni(n.element,"overflow-y"),Ni(n.element,"-webkit-overflow-scrolling"),bg(n.element)})])])}],items:e,menuBehaviours:bo([hg.config({initialState:"after",routes:hg.createTristate("before","current","after",{transition:{property:"transform",transitionClass:"transitioning"}})})])}},Tg=function(r){var o,i,n,e,t,u=(o=r.formats,i=function(){return c},n=Og("Styles",[].concat(N(o.items,function(n){return Sg(wg(n),n.title,n.isSelected(),n.getPreview(),ct(o.expansions,wg(n)))})),i,!1),e=et(o.menus,function(n,e){var t=N(n,function(n){return Sg(wg(n),n.title,n.isSelected!==undefined&&n.isSelected(),n.getPreview!==undefined?n.getPreview():"",ct(o.expansions,wg(n)))});return Og(e,t,i,!0)}),t=qt(e,or("styles",n)),{tmenu:cg.tieredData("styles",t,o.expansions)}),c=Zl(cg.sketch({dom:{tag:"div",classes:[Ti("styles-menu")]},components:[],fakeFocus:!0,stayInDom:!0,onExecute:function(n,e){var t=as.getValue(e);return r.handle(e,t.value),T.none()},onEscape:function(){return T.none()},onOpenMenu:function(n,e){var t=ls(n.element);ss(e.element,t),hg.jumpTo(e,"current")},onOpenSubmenu:function(n,e,t){var r=ls(n.element),o=Ji(e.element,'[role="menu"]').getOrDie("hacky"),i=n.getSystem().getByDom(o).getOrDie();ss(t.element,r),hg.progressTo(i,"before"),hg.jumpTo(t,"after"),hg.progressTo(t,"current")},onCollapseMenu:function(n,e,t){var r=Ji(e.element,'[role="menu"]').getOrDie("hacky"),o=n.getSystem().getByDom(r).getOrDie();hg.progressTo(o,"after"),hg.progressTo(t,"current")},navigateOnHover:!1,highlightImmediately:!0,data:u.tmenu,markers:{backgroundMenu:Ti("styles-background-menu"),menu:Ti("styles-menu"),selectedMenu:Ti("styles-selected-menu"),item:Ti("styles-item"),selectedItem:Ti("styles-selected-item")}}));return c.asSpec()},kg=function(n){return ct(n,"items")?(t=qt(rr(e=n,["items"]),{menu:!0}),r=Eg(e.items),{item:t,menus:qt(r.menus,or(e.title,r.items)),expansions:qt(r.expansions,or(e.title,e.title))}):{item:n,menus:{},expansions:{}};var e,t,r},Eg=function(n){return z(n,function(n,e){var t=kg(e);return{menus:qt(n.menus,t.menus),items:[t.item].concat(n.items),expansions:qt(n.expansions,t.expansions)}},{menus:{},expansions:{},items:[]})},Cg=function(u){var c=function(n){return function(){return u.formatter.match(n)}},a=function(n){return function(){return u.formatter.getCssText(n)}},f=function(n){return N(n,function(n){if(ct(n,"items")){var e=f(n.items);return qt(qt(n,{isSelected:l,getPreview:y("")}),{items:e})}return ct(n,"format")?qt(i=n,{isSelected:c(i.format),getPreview:a(i.format)}):(r=Ba((t=n).title),o=qt(t,{format:r,isSelected:c(r),getPreview:a(r)}),u.formatter.register(r,o),o);var t,r,o,i})};return f(u.getParam("style_formats",Fo,"array"))},Mg=function(t,n,r){var e,o,i,u=(e=t,i=(o=function(n){return W(n,function(n){return n.items===undefined?!ct(n,"format")||e.formatter.canApply(n.format)?[n]:[]:0<o(n.items).length?[n]:[]})})(n),Eg(i));return Tg({formats:u,handle:function(n,e){t.undoManager.transact(function(){bi.isOn(n)?t.formatter.remove(e):t.formatter.apply(e)}),r()}})},Dg=function(n){var e=n.replace(/\|/g," ").trim();return 0<e.length?e.split(/\s+/):[]},_g=function(n){return W(n,function(n){return(M(n)?_g:Dg)(n)})},Ig=function(n){var e=n.getParam("toolbar",Ro,"array");return(M(e)?_g:Dg)(e)},Fg=function(t,o){var n=function(t){return function(){return Pf(e=t,function(){n.execCommand(e)},{},n=o);var n,e}},e=function(r){return function(){return n=o,t=Af(e=r),Pf(e,function(){n.execCommand(e)},t,n);var n,e,t}},r=function(n,e,t){return function(){return jf(o,n,e,t)}},i=n("undo"),u=n("redo"),c=e("bold"),a=e("italic"),f=e("underline"),s=n("removeformat"),l=r("unlink","link",function(){o.execCommand("unlink",null,!1)}),d=r("unordered-list","ul",function(){o.execCommand("InsertUnorderedList",null,!1)}),m=r("ordered-list","ol",function(){o.execCommand("InsertOrderedList",null,!1)}),g=Cg(o),p=function(){return Mg(o,g,function(){o.fire("scrollIntoView")})},h=function(n,e){return{isSupported:function(){var e=o.ui.registry.getAll().buttons;return n.forall(function(n){return ct(e,n)})},sketch:e}};return{undo:h(T.none(),i),redo:h(T.none(),u),bold:h(T.none(),c),italic:h(T.none(),a),underline:h(T.none(),f),removeformat:h(T.none(),s),link:h(T.none(),function(){return om(t,o)}),unlink:h(T.none(),l),image:h(T.none(),function(){return sd(o)}),bullist:h(T.some("bullist"),d),numlist:h(T.some("numlist"),m),fontsizeselect:h(T.none(),function(){return n={onChange:function(n){Xl(e,n)},getInitialValue:function(){return Wl(e)}},zl(t,"font-size",function(){return Ql(n)},e=o);var e,n}),forecolor:h(T.none(),function(){return n={onChange:function(n,e,t){r.undoManager.transact(function(){r.formatter.apply("forecolor",{value:t}),r.nodeChanged()})},getInitialValue:function(){return-1}},zl(t,"color-levels",function(){return Ll(n)},r=o);var r,n}),styleselect:h(T.none(),function(){return Pf("style-formats",function(n){o.fire("toReading"),t.dropup.appear(p,bi.on,n)},bo([bi.config({toggleClass:Ti("toolbar-button-selected"),toggleOnExecute:!1,aria:{mode:"pressed"}}),ci.config({channels:ir([Si(Bo,bi.off),Si(Ao,bi.off)])})]),o)})}},Rg=function(n){var e=de.fromDom(function(n){if(je()&&_(n.target)){var e=de.fromDom(n.target);if(xe(e)&&ze(e)&&n.composed&&n.composedPath){var t=n.composedPath();if(t)return J(t)}}return T.from(n.target)}(n).getOr(n.target)),t=function(){return n.stopPropagation()},r=function(){return n.preventDefault()},o=i(r,t);return{target:e,x:n.clientX,y:n.clientY,stop:t,prevent:r,kill:o,raw:n}},Vg=function(n,e,t,r,o){var i,u,c=(i=t,u=r,function(n){i(n)&&u(Rg(n))});return n.dom.addEventListener(e,c,o),{unbind:b(Bg,n,e,c,o)}},Bg=function(n,e,t,r){n.dom.removeEventListener(e,t,r)},Ag=w,jg=function(n,e,t){return Vg(n,e,Ag,t,!1)},Ng=function(n,e,t){return Vg(n,e,Ag,t,!0)},Pg=tinymce.util.Tools.resolve("tinymce.util.Delay"),Hg=function(n){var e=n.matchMedia("(orientation: portrait)").matches;return{isPortrait:y(e)}},zg=function(r,e){var n=de.fromDom(r),o=null,t=jg(n,"orientationchange",function(){Pg.clearInterval(o);var n=Hg(r);e.onChange(n),i(function(){e.onReady(n)})}),i=function(n){Pg.clearInterval(o);var e=r.innerHeight,t=0;o=Pg.setInterval(function(){e!==r.innerHeight?(Pg.clearInterval(o),n(T.some(r.innerHeight))):20<t&&(Pg.clearInterval(o),n(T.none())),t++},50)};return{onAdjustment:i,destroy:function(){t.unbind()}}},Lg=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},Gg=function(n,e,t,r,o){var i=n.document.createRange();return i.setStart(e.dom,t),i.setEnd(r.dom,o),i},$g=function(n){return{left:n.left,top:n.top,right:n.right,bottom:n.bottom,width:n.width,height:n.height}},Ug=Ut([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Wg=function(n,e,t){return e(de.fromDom(t.startContainer),t.startOffset,de.fromDom(t.endContainer),t.endOffset)},Xg=function(n,e){var o,t,r,i=(o=n,e.match({domRange:function(n){return{ltr:y(n),rtl:T.none}},relative:function(n,e){return{ltr:d(function(){return Lg(o,n,e)}),rtl:d(function(){return T.some(Lg(o,e,n))})}},exact:function(n,e,t,r){return{ltr:d(function(){return Gg(o,n,e,t,r)}),rtl:d(function(){return T.some(Gg(o,t,r,n,e))})}}}));return(r=(t=i).ltr()).collapsed?t.rtl().filter(function(n){return!1===n.collapsed}).map(function(n){return Ug.rtl(de.fromDom(n.endContainer),n.endOffset,de.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return Wg(0,Ug.ltr,r)}):Wg(0,Ug.ltr,r)},qg=(Ug.ltr,Ug.rtl,function(n,e,t,r){return{start:n,soffset:e,finish:t,foffset:r}});var Yg,Kg,Jg,Qg,Zg,np=(Yg=we,Kg="text",{get:function(n){if(!Yg(n))throw new Error("Can only get "+Kg+" value of a "+Kg+" node");return Jg(n).getOr("")},getOption:Jg=function(n){return Yg(n)?T.from(n.dom.nodeValue):T.none()},set:function(n,e){if(!Yg(n))throw new Error("Can only set raw "+Kg+" value of a "+Kg+" node");n.dom.nodeValue=e}}),ep=function(n){return"img"===ye(n)?1:(e=n,np.getOption(e).fold(function(){return Ce(n).length},function(n){return n.length}));var e},tp=Ut([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),rp={before:tp.before,on:tp.on,after:tp.after,cata:function(n,e,t,r){return n.fold(e,t,r)},getStart:function(n){return n.fold(v,v,v)}},op=Ut([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),ip={domRange:op.domRange,relative:op.relative,exact:op.exact,exactFromRange:function(n){return op.exact(n.start,n.soffset,n.finish,n.foffset)},getWin:function(n){var e,t=n.match({domRange:function(n){return de.fromDom(n.startContainer)},relative:function(n,e){return rp.getStart(n)},exact:function(n,e,t,r){return n}});return e=t,de.fromDom(ke(e).dom.defaultView)},range:qg},up=function(n,e){var t=ye(n);return"input"===t?rp.after(n):A(["br","img"],t)?0===e?rp.before(n):rp.after(n):rp.on(n,e)},cp=function(n,e,t,r){var o,i,u,c,a,f=(i=e,u=t,c=r,(a=Te(o=n).dom.createRange()).setStart(o.dom,i),a.setEnd(u.dom,c),a),s=ve(n,t)&&e===r;return f.collapsed&&!s},ap=function(n){return T.from(n.getSelection())},fp=function(n,e,t,r,o){var i,u=Gg(n,e,t,r,o);i=u,ap(n).each(function(n){n.removeAllRanges(),n.addRange(i)})},sp=function(l,n){return Xg(l,n).match({ltr:function(n,e,t,r){fp(l,n,e,t,r)},rtl:function(c,a,f,s){ap(l).each(function(n){if(n.setBaseAndExtent)n.setBaseAndExtent(c.dom,a,f.dom,s);else if(n.extend)try{t=c,r=a,o=f,i=s,(e=n).collapse(t.dom,r),e.extend(o.dom,i)}catch(u){fp(l,f,s,c,a)}else fp(l,f,s,c,a);var e,t,r,o,i})}})},lp=function(n,e,t,r,o){var i,u,c,a,f=(i=r,u=o,c=up(e,t),a=up(i,u),ip.relative(c,a));sp(n,f)},dp=function(n){if(0<n.rangeCount){var e=n.getRangeAt(0),t=n.getRangeAt(n.rangeCount-1);return T.some(qg(de.fromDom(e.startContainer),e.startOffset,de.fromDom(t.endContainer),t.endOffset))}return T.none()},mp=function(n){if(null===n.anchorNode||null===n.focusNode)return dp(n);var e=de.fromDom(n.anchorNode),t=de.fromDom(n.focusNode);return cp(e,n.anchorOffset,t,n.focusOffset)?T.some(qg(e,n.anchorOffset,t,n.focusOffset)):dp(n)},gp=function(n){return ap(n).filter(function(n){return 0<n.rangeCount}).bind(mp)},pp=function(n,e){var i,t,r,o,u=Xg(i=n,e).match({ltr:function(n,e,t,r){var o=i.document.createRange();return o.setStart(n.dom,e),o.setEnd(t.dom,r),o},rtl:function(n,e,t,r){var o=i.document.createRange();return o.setStart(t.dom,r),o.setEnd(n.dom,e),o}});return r=(t=u).getClientRects(),0<(o=0<r.length?r[0]:t.getBoundingClientRect()).width||0<o.height?T.some(o).map($g):T.none()},hp=function(n){return T.from(n.dom.contentWindow)},vp=function(n){return hp(n).bind(gp)},yp=function(n){return n.getFrame()},bp=function(n,e,t,r){return n[t].getOrThunk(function(){return function(n){return jg(e,r,n)}})},xp=function(c){var n,a=yp(c);return n=a,T.some(de.fromDom(n.dom.contentWindow.document.body)).bind(function(u){return n=a,T.some(de.fromDom(n.dom.contentWindow.document)).bind(function(i){return hp(a).map(function(o){var n=de.fromDom(i.dom.documentElement),e=c.getCursorBox.getOrThunk(function(){return function(){return gp(o).map(function(n){return ip.exact(n.start,n.soffset,n.finish,n.foffset)}).bind(function(n){return pp(o,n).orThunk(function(){return gp(o).filter(function(n){return ve(n.start,n.finish)&&n.soffset===n.foffset}).bind(function(n){var e=n.start.dom.getBoundingClientRect();return 0<e.width||0<e.height?T.some(e):T.none()})})})}}),t=c.setSelection.getOrThunk(function(){return function(n,e,t,r){lp(o,n,e,t,r)}}),r=c.clearSelection.getOrThunk(function(){return function(){ap(o).each(function(n){return n.removeAllRanges()})}});return{body:u,doc:i,win:o,html:n,getSelection:b(vp,a),setSelection:t,clearSelection:r,frame:a,onKeyup:bp(c,i,"onKeyup","keyup"),onNodeChanged:bp(c,i,"onNodeChanged","SelectionChange"),onDomChanged:c.onDomChanged,onScrollToCursor:c.onScrollToCursor,onScrollToElement:c.onScrollToElement,onToReading:c.onToReading,onToEditing:c.onToEditing,onToolbarScrollStart:c.onToolbarScrollStart,onTouchContent:c.onTouchContent,onTapContent:c.onTapContent,onTouchToolstrip:c.onTouchToolstrip,getCursorBox:e}})});var n})},wp=(Qg="getWin",Zg=hp,function(e){return e[Qg].getOrThunk(function(){var n=yp(e);return function(){return Zg(n)}})()}),Sp=function(){var e=Ki("head").getOrDie(),n=Ki('meta[name="viewport"]').getOrThunk(function(){var n=de.fromTag("meta");return ft(n,"name","viewport"),Fe(e,n),n}),t=lt(n,"content");return{maximize:function(){ft(n,"content","width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0")},restore:function(){t!==undefined&&null!==t&&0<t.length?ft(n,"content",t):ft(n,"content","user-scalable=yes")}}},Op="data-ephox-mobile-fullscreen-style",Tp="position:absolute!important;",kp="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",Ep=Mn().os.isAndroid(),Cp=function(n,e){var t,r,o,i=function(r){return function(n){var e=lt(n,"style"),t=e===undefined?"no-styles":e.trim();t!==r&&(ft(n,Op,t),ft(n,"style",r))}},u=(t="*",Gi(n,function(n){return me(n,t)},r)),c=W(u,function(n){return e="*",$i(n,function(n){return me(n,e)});var e}),a=(o=Bi(e,"background-color"))!==undefined&&""!==o?"background-color:"+o+"!important":"background-color:rgb(255,255,255)!important;";P(c,i("display:none!important;")),P(u,i(Tp+kp+a)),i((!0===Ep?"":Tp)+kp+a)(n)},Mp=function(){var n=pe("["+Op+"]");P(n,function(n){var e=lt(n,Op);"no-styles"!==e?ft(n,"style",e):gt(n,"style"),gt(n,Op)})};var Dp=function(n){var e=n.raw;return e.touches===undefined||1!==e.touches.length?T.none():T.some(e.touches[0])},_p=function(t){var r,o,i,u=ko(T.none()),c=ko(!1),a=(r=function(n){t.triggerEvent(Zn(),n),c.set(!0)},o=400,i=null,{cancel:function(){null!==i&&(clearTimeout(i),i=null)},schedule:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];i=setTimeout(function(){r.apply(null,n),i=null},o)}}),f=ir([{key:_n(),value:function(t){return Dp(t).each(function(n){a.cancel();var e={x:n.clientX,y:n.clientY,target:t.target};a.schedule(t),c.set(!1),u.set(T.some(e))}),T.none()}},{key:In(),value:function(n){return a.cancel(),Dp(n).each(function(i){u.get().each(function(n){var e,t,r,o;e=i,t=n,r=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),(5<r||5<o)&&u.set(T.none())})}),T.none()}},{key:Fn(),value:function(e){a.cancel();return u.get().filter(function(n){return ve(n.target,e.target)}).map(function(n){return c.get()?(e.prevent(),!1):t.triggerEvent(Qn(),e)})}}]);return{fireIfReady:function(e,n){return it(f,n).bind(function(n){return n(e)})}}},Ip=function(t){var e=_p({triggerEvent:function(n,e){t.onTapContent(e)}});return{fireTouchstart:function(n){e.fireIfReady(n,"touchstart")},onTouchend:function(){return jg(t.body,"touchend",function(n){e.fireIfReady(n,"touchend")})},onTouchmove:function(){return jg(t.body,"touchmove",function(n){e.fireIfReady(n,"touchmove")})}}},Fp=6<=Mn().os.version.major,Rp=function(r,e,t){var o=Ip(r),i=Te(e),u=function(n){return!ve(n.start,n.finish)||n.soffset!==n.foffset},n=function(){var n=r.doc.dom.hasFocus()&&r.getSelection().exists(u);t.getByDom(e).each(!0===(n||Mo(i).filter(function(n){return"input"===ye(n)}).exists(function(n){return n.dom.selectionStart!==n.dom.selectionEnd}))?bi.on:bi.off)},c=[jg(r.body,"touchstart",function(n){r.onTouchContent(),o.fireTouchstart(n)}),o.onTouchmove(),o.onTouchend(),jg(e,"touchstart",function(n){r.onTouchToolstrip()}),r.onToReading(function(){Co(r.body)}),r.onToEditing(O),r.onScrollToCursor(function(n){n.preventDefault(),r.getCursorBox().each(function(n){var e=r.win,t=n.top>e.innerHeight||n.bottom>e.innerHeight?n.bottom-e.innerHeight+50:0;0!=t&&e.scrollTo(e.pageXOffset,e.pageYOffset+t)})})].concat(!0==Fp?[]:[jg(de.fromDom(r.win),"blur",function(){t.getByDom(e).each(bi.off)}),jg(i,"select",n),jg(r.doc,"selectionchange",n)]);return{destroy:function(){P(c,function(n){n.unbind()})}}},Vp=function(n,e){var t=parseInt(lt(n,e),10);return isNaN(t)?0:t},Bp=function(n){return x(x({},n),{width:2})},Ap=function(n){return{left:n.left,top:n.top,right:n.right,bottom:n.bottom,width:n.width,height:n.height}},jp=function(n){var e=n.getSelection();return e!==undefined&&0<e.rangeCount?function(t){if(t.collapsed){var r=de.fromDom(t.startContainer);return Ee(r).bind(function(n){var e=ip.exact(r,t.startOffset,n,ep(n));return pp(t.startContainer.ownerDocument.defaultView,e).map(Bp).map(K)}).getOr([])}return N(t.getClientRects(),Ap)}(e.getRangeAt(0)):[]},Np=function(n){n.focus();var e=de.fromDom(n.document.body);(Mo().exists(function(n){return A(["input","textarea"],ye(n))})?function(n){Pg.setTimeout(function(){n()},0)}:s)(function(){Mo().each(Co),Eo(e)})},Pp="data-"+Ti("last-outer-height"),Hp=function(n,e){ft(n,Pp,e)},zp=function(n){return{top:n.top,bottom:n.top+n.height}},Lp=function(n,e){var t=Vp(e,Pp),r=n.innerHeight;return r<t?T.some(t-r):T.none()},Gp=function(n,u){var e=de.fromDom(u.document.body),t=jg(de.fromDom(n),"resize",function(){Lp(n,e).each(function(i){var n;(0<(n=jp(u)).length?T.some(n[0]).map(zp):T.none()).each(function(n){var e,t,r,o=(e=u,r=i,(t=n).top>e.innerHeight||t.bottom>e.innerHeight?Math.min(r,t.bottom-e.innerHeight+50):0);0!==o&&u.scrollTo(u.pageXOffset,u.pageYOffset+o)})}),Hp(e,n.innerHeight)});Hp(e,n.innerHeight);return{toEditing:function(){Np(u)},destroy:function(){t.unbind()}}},$p=function(t,r){var o=null;return{cancel:function(){null!==o&&(clearTimeout(o),o=null)},throttle:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];null!==o&&clearTimeout(o),o=setTimeout(function(){t.apply(null,n),o=null},r)}}},Up=function(n,e){var t,r,o,i=Zl(Td.sketch({dom:Vf('<div aria-hidden="true" class="${prefix}-mask-tap-icon"></div>'),containerBehaviours:bo([bi.config({toggleClass:Ti("mask-tap-icon-selected"),toggleOnExecute:!1})])})),u=(t=n,r=200,o=null,{cancel:function(){null!==o&&(clearTimeout(o),o=null)},throttle:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];null===o&&(o=setTimeout(function(){t.apply(null,n),o=null},r))}});return Td.sketch({dom:Vf('<div class="${prefix}-disabled-mask"></div>'),components:[Td.sketch({dom:Vf('<div class="${prefix}-content-container"></div>'),components:[If.sketch({dom:Vf('<div class="${prefix}-content-tap-section"></div>'),components:[i.asSpec()],action:function(n){u.throttle()},buttonBehaviours:bo([bi.config({toggleClass:Ti("mask-tap-icon-selected")})])})]})]})},Wp=y({unbind:O}),Xp=yr([jr("editor",[Br("getFrame"),Nr("getBody"),Nr("getDoc"),Nr("getWin"),Nr("getSelection"),Nr("setSelection"),Nr("clearSelection"),Nr("cursorSaver"),Nr("onKeyup"),Nr("onNodeChanged"),Nr("getCursorBox"),Br("onDomChanged"),Lr("onTouchContent",O),Lr("onTapContent",O),Lr("onTouchToolstrip",O),Lr("onScrollToCursor",Wp),Lr("onScrollToElement",Wp),Lr("onToEditing",Wp),Lr("onToReading",Wp),Lr("onToolbarScrollStart",v)]),Br("socket"),Br("toolstrip"),Br("dropup"),Br("toolbar"),Br("container"),Br("alloy"),$r("win",function(n){return Te(n.socket).dom.defaultView}),$r("body",function(n){return de.fromDom(n.socket.dom.ownerDocument.body)}),Lr("translate",v),Lr("setReadOnly",O),Lr("readOnlyOnInit",w)]),qp=function(n){var e=_r("Getting AndroidWebapp schema",Xp,n);Ri(e.toolstrip,"width","100%");var t=Fm(Up(function(){e.setReadOnly(e.readOnlyOnInit()),f.enter()},e.translate));e.alloy.add(t);var r={show:function(){e.alloy.add(t)},hide:function(){e.alloy.remove(t)}};Fe(e.container,t.element);var o,i,u,c,a,f=(o=e,i=r,u=Sp(),c=nm(),a=nm(),{enter:function(){i.hide(),bt(o.container,Ti("fullscreen-maximized")),bt(o.container,Ti("android-maximized")),u.maximize(),bt(o.body,Ti("android-scroll-reload")),c.set(Gp(o.win,wp(o.editor).getOrDie("no"))),xp(o.editor).each(function(n){Cp(o.container,n.body),a.set(Rp(n,o.toolstrip,o.alloy))})},exit:function(){u.restore(),i.show(),wt(o.container,Ti("fullscreen-maximized")),wt(o.container,Ti("android-maximized")),Mp(),wt(o.body,Ti("android-scroll-reload")),a.clear(),c.clear()}});return{setReadOnly:e.setReadOnly,refreshStructure:O,enter:f.enter,exit:f.exit,destroy:O}},Yp=y([Br("dom"),Lr("shell",!0),xa("toolbarBehaviours",[eg])]),Kp=y([Ja({name:"groups",overrides:function(){return{behaviours:bo([eg.config({})])}}})]),Jp=_f({name:"Toolbar",configFields:Yp(),partFields:Kp(),factory:function(e,n,t,r){var o=function(n){return e.shell?T.some(n):uf(n,e,"groups")},i=e.shell?{behaviours:[eg.config({})],components:[]}:{behaviours:[],components:n};return{uid:e.uid,dom:e.dom,components:i.components,behaviours:Sa(e.toolbarBehaviours,i.behaviours),apis:{setGroups:function(n,e){o(n).fold(function(){throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},function(n){eg.set(n,e)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(n,e,t){n.setGroups(e,t)}}}),Qp=y([Br("items"),jr("markers",N(["itemSelector"],Br)),xa("tgroupBehaviours",[ba])]),Zp=y([Qa({name:"items",unit:"item"})]),nh=_f({name:"ToolbarGroup",configFields:Qp(),partFields:Zp(),factory:function(n,e,t,r){return{uid:n.uid,dom:n.dom,components:e,behaviours:Sa(n.tgroupBehaviours,[ba.config({mode:"flow",selector:n.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),eh="data-"+Ti("horizontal-scroll"),th=function(n){return"true"===lt(n,eh)?0<(t=n).dom.scrollLeft||function(n){n.dom.scrollLeft=1;var e=0!==n.dom.scrollLeft;return n.dom.scrollLeft=0,e}(t):0<(e=n).dom.scrollTop||function(n){n.dom.scrollTop=1;var e=0!==n.dom.scrollTop;return n.dom.scrollTop=0,e}(e);var e,t},rh=function(){var e=function(n){var e=!0===n.scrollable?"${prefix}-toolbar-scrollable-group":"";return{dom:Vf('<div aria-label="'+n.label+'" class="${prefix}-toolbar-group '+e+'"></div>'),tgroupBehaviours:bo([xd("adhoc-scrollable-toolbar",!0===n.scrollable?[co(function(n,e){var t;Ri(n.element,"overflow-x","auto"),t=n.element,ft(t,eh,"true"),yg(n.element)})]:[])]),components:[Td.sketch({components:[nh.parts.items({})]})],markers:{itemSelector:"."+Ti("toolbar-group-item")},items:n.items}},t=Fm(Jp.sketch({dom:Vf('<div class="${prefix}-toolbar"></div>'),components:[Jp.parts.groups({})],toolbarBehaviours:bo([bi.config({toggleClass:Ti("context-toolbar"),toggleOnExecute:!1,aria:{mode:"none"}}),ba.config({mode:"cyclic"})]),shell:!0})),n=Fm(Td.sketch({dom:{classes:[Ti("toolstrip")]},components:[Rm(t)],containerBehaviours:bo([bi.config({toggleClass:Ti("android-selection-context-toolbar"),toggleOnExecute:!1})])})),r=function(){Jp.setGroups(t,o.get()),bi.off(t)},o=ko([]);return{wrapper:n,toolbar:t,createGroups:function(n){return N(n,i(nh.sketch,e))},setGroups:function(n){o.set(n),r()},setContextToolbar:function(n){bi.on(t),Jp.setGroups(t,n)},restoreToolbar:function(){bi.isOn(t)&&r()},refresh:function(){},focus:function(){ba.focusIn(t)}}},oh=function(n){return Fm(If.sketch({dom:Vf('<div class="${prefix}-mask-edit-icon ${prefix}-icon"></div>'),action:function(){n.run(function(n){n.setReadOnly(!1)})}}))},ih=function(){return Fm(Td.sketch({dom:Vf('<div class="${prefix}-editor-socket"></div>'),components:[],containerBehaviours:bo([eg.config({})])}))},uh=function(n,e){eg.append(n,Rm(e))},ch=function(n,e){eg.remove(n,e)},ah=function(n,e,t,r){(!0===t?To.toAlpha:To.toOmega)(r),(t?uh:ch)(n,e)},fh=function(e,n){return n.getAnimationRoot.fold(function(){return e.element},function(n){return n(e)})},sh=function(n){return n.dimension.property},lh=function(n,e){return n.dimension.getDimension(e)},dh=function(n,e){var t=fh(n,e);Sm(t,[e.shrinkingClass,e.growingClass])},mh=function(n,e){wt(n.element,e.openClass),bt(n.element,e.closedClass),Ri(n.element,sh(e),"0px"),Pi(n.element)},gh=function(n,e){wt(n.element,e.closedClass),bt(n.element,e.openClass),Ni(n.element,sh(e))},ph=function(n,e,t,r){t.setCollapsed(),Ri(n.element,sh(e),lh(e,n.element)),Pi(n.element),dh(n,e),mh(n,e),e.onStartShrink(n),e.onShrunk(n)},hh=function(n,e,t,r){var o=r.getOrThunk(function(){return lh(e,n.element)});t.setCollapsed(),Ri(n.element,sh(e),o),Pi(n.element);var i=fh(n,e);wt(i,e.growingClass),bt(i,e.shrinkingClass),mh(n,e),e.onStartShrink(n)},vh=function(n,e,t){var r=lh(e,n.element);("0px"===r?ph:hh)(n,e,t,T.some(r))},yh=function(n,e,t){var r=fh(n,e),o=St(r,e.shrinkingClass),i=lh(e,n.element);gh(n,e);var u=lh(e,n.element);(o?function(){Ri(n.element,sh(e),i),Pi(n.element)}:function(){mh(n,e)})(),wt(r,e.shrinkingClass),bt(r,e.growingClass),gh(n,e),Ri(n.element,sh(e),u),t.setExpanded(),e.onStartGrow(n)},bh=function(n,e,t){var r=fh(n,e);return!0===St(r,e.growingClass)},xh=function(n,e,t){var r=fh(n,e);return!0===St(r,e.shrinkingClass)},wh=/* */Object.freeze({__proto__:null,refresh:function(n,e,t){var r;t.isExpanded()&&(Ni(n.element,sh(e)),r=lh(e,n.element),Ri(n.element,sh(e),r))},grow:function(n,e,t){t.isExpanded()||yh(n,e,t)},shrink:function(n,e,t){t.isExpanded()&&vh(n,e,t)},immediateShrink:function(n,e,t){t.isExpanded()&&ph(n,e,t,T.none())},hasGrown:function(n,e,t){return t.isExpanded()},hasShrunk:function(n,e,t){return t.isCollapsed()},isGrowing:bh,isShrinking:xh,isTransitioning:function(n,e,t){return!0===bh(n,e)||!0===xh(n,e)},toggleGrow:function(n,e,t){(t.isExpanded()?vh:yh)(n,e,t)},disableTransitions:dh}),Sh=/* */Object.freeze({__proto__:null,exhibit:function(n,e,t){var r=e.expanded;return lo(r?{classes:[e.openClass],styles:{}}:{classes:[e.closedClass],styles:or(e.dimension.property,"0px")})},events:function(t,r){return Jr([(n=Ln(),eo(n)(function(n,e){e.event.raw.propertyName===t.dimension.property&&(dh(n,t),r.isExpanded()&&Ni(n.element,t.dimension.property),(r.isExpanded()?t.onGrown:t.onShrunk)(n))}))]);var n}}),Oh=[Br("closedClass"),Br("openClass"),Br("shrinkingClass"),Br("growingClass"),Nr("getAnimationRoot"),Zo("onShrunk"),Zo("onStartShrink"),Zo("onGrown"),Zo("onStartGrow"),Lr("expanded",!1),Ar("dimension",Fr("property",{width:[ri("property","width"),ri("getDimension",function(n){return ls(n)+"px"})],height:[ri("property","height"),ri("getDimension",function(n){return Li(n)+"px"})]}))],Th=wo({fields:Oh,name:"sliding",active:Sh,apis:wh,state:/* */Object.freeze({__proto__:null,init:function(n){var e=ko(n.expanded);return yo({isExpanded:function(){return!0===e.get()},isCollapsed:function(){return!1===e.get()},setCollapsed:b(e.set,!1),setExpanded:b(e.set,!0),readState:function(){return"expanded: "+e.get()}})}})}),kh=function(e,t){var r=Fm(Td.sketch({dom:{tag:"div",classes:[Ti("dropup")]},components:[],containerBehaviours:bo([eg.config({}),Th.config({closedClass:Ti("dropup-closed"),openClass:Ti("dropup-open"),shrinkingClass:Ti("dropup-shrinking"),growingClass:Ti("dropup-growing"),dimension:{property:"height"},onShrunk:function(n){e(),t(),eg.set(n,[])},onGrown:function(n){e(),t()}}),wi(function(n,e){o(O)})])})),o=function(n){window.requestAnimationFrame(function(){n(),Th.shrink(r)})};return{appear:function(n,e,t){!0===Th.hasShrunk(r)&&!1===Th.isTransitioning(r)&&window.requestAnimationFrame(function(){e(t),eg.set(r,[n()]),Th.grow(r)})},disappear:o,component:r,element:r.element}},Eh=function(n){var e,t;return n.raw.which===nu[0]&&!A(["input","textarea"],ye(n.target))&&(e=n.target,!Zi(e,'[contenteditable="true"]',t).isSome())},Ch=function(){return Mn().browser.isFirefox()},Mh=vr([Ar("triggerEvent",Vr),Lr("stopBackspace",!0)]),Dh=function(e,n){var t,r,o,i,u=_r("Getting GUI events settings",Mh,n),c=_p(u),a=N(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),function(n){return jg(e,n,function(e){c.fireIfReady(e,n).each(function(n){n&&e.kill()}),u.triggerEvent(n,e)&&e.kill()})}),f=ko(T.none()),s=jg(e,"paste",function(e){c.fireIfReady(e,"paste").each(function(n){n&&e.kill()}),u.triggerEvent("paste",e)&&e.kill(),f.set(T.some(setTimeout(function(){u.triggerEvent(qn(),e)},0)))}),l=jg(e,"keydown",function(n){u.triggerEvent("keydown",n)?n.kill():!0===u.stopBackspace&&Eh(n)&&n.prevent()}),d=(t=e,r=function(n){u.triggerEvent("focusin",n)&&n.kill()},Ch()?Ng(t,"focus",r):jg(t,"focusin",r)),m=ko(T.none()),g=(o=e,i=function(n){u.triggerEvent("focusout",n)&&n.kill(),m.set(T.some(setTimeout(function(){u.triggerEvent(Xn(),n)},0)))},Ch()?Ng(o,"blur",i):jg(o,"focusout",i));return{unbind:function(){P(a,function(n){n.unbind()}),l.unbind(),d.unbind(),g.unbind(),s.unbind(),f.get().each(clearTimeout),m.get().each(clearTimeout)}}},_h=function(n,e){var t=it(n,"target").getOr(e);return ko(t)},Ih=Ut([{stopped:[]},{resume:["element"]},{complete:[]}]),Fh=function(n,r,e,t,o,i){var u,c,a,f,s=n(r,t),l=(u=e,c=o,a=ko(!1),f=ko(!1),{stop:function(){a.set(!0)},cut:function(){f.set(!0)},isStopped:a.get,isCut:f.get,event:u,setSource:c.set,getSource:c.get});return s.fold(function(){return i.logEventNoHandlers(r,t),Ih.complete()},function(e){var t=e.descHandler;return mm(t)(l),l.isStopped()?(i.logEventStopped(r,e.element,t.purpose),Ih.stopped()):l.isCut()?(i.logEventCut(r,e.element,t.purpose),Ih.complete()):Ee(e.element).fold(function(){return i.logNoParent(r,e.element,t.purpose),Ih.complete()},function(n){return i.logEventResponse(r,e.element,t.purpose),Ih.resume(n)})})},Rh=function(e,t,r,n,o,i){return Fh(e,t,r,n,o,i).fold(function(){return!0},function(n){return Rh(e,t,r,n,o,i)},function(){return!1})},Vh=function(n,e,t){var r,o,i=(r=e,o=ko(!1),{stop:function(){o.set(!0)},cut:O,isStopped:o.get,isCut:l,event:r,setSource:f("Cannot set source of a broadcasted event"),getSource:f("Cannot get source of a broadcasted event")});return P(n,function(n){var e=n.descHandler;mm(e)(i)}),i.isStopped()},Bh=function(n,e,t,r,o){var i=_h(t,r);return Rh(n,e,t,r,i,o)},Ah=function(n,e){return{element:n,descHandler:e}},jh=function(n,e){return{id:n,descHandler:e}};function Nh(){var i={};return{registerId:function(r,o,n){nt(n,function(n,e){var t=i[e]!==undefined?i[e]:{};t[o]=dm(n,r),i[e]=t})},unregisterId:function(t){nt(i,function(n,e){n.hasOwnProperty(t)&&delete n[t]})},filterByType:function(n){return it(i,n).map(function(n){return ot(n,function(n,e){return jh(e,n)})}).getOr([])},find:function(n,e,t){var o=it(i,e);return Xr(t,function(n){return t=o,yf(r=n).fold(function(){return T.none()},function(e){return t.bind(function(n){return it(n,e)}).map(function(n){return Ah(r,n)})});var t,r},n)}}}function Ph(){var r=Nh(),o={},i=function(r){var n=r.element;return yf(n).fold(function(){return n="uid-",e=r.element,t=Ba(pf+n),vf(e,t),t;var n,e,t},function(n){return n})},u=function(n){yf(n.element).each(function(n){delete o[n],r.unregisterId(n)})};return{find:function(n,e,t){return r.find(n,e,t)},filter:function(n){return r.filterByType(n)},register:function(n){var e=i(n);ct(o,e)&&function(n,e){var t=o[e];if(t!==n)throw new Error('The tagId "'+e+'" is already used by: '+Ho(t.element)+"\nCannot use it for: "+Ho(n.element)+"\nThe conflicting element is"+(Le(t.element)?" ":" not ")+"already in the DOM");u(n)}(n,e);var t=[n];r.registerId(t,e,n.events),o[e]=n},unregister:u,getById:function(n){return it(o,n)}}}var Hh=function(t){var r=function(e){return Ee(t.element).fold(function(){return!0},function(n){return ve(e,n)})},o=Ph(),f=function(n,e){return o.find(r,n,e)},n=Dh(t.element,{triggerEvent:function(r,o){return Wo(r,o.target,function(n){return t=n,Bh(f,r,e=o,e.target,t);var e,t})}}),i={debugInfo:y("real"),triggerEvent:function(e,t,r){Wo(e,t,function(n){return Bh(f,e,r,t,n)})},triggerFocus:function(c,a){yf(c).fold(function(){Eo(c)},function(n){Wo(Wn(),c,function(n){var e,t,r,o,i,u;return e=f,t=Wn(),i=n,u=_h(r={originator:a,kill:O,prevent:O,target:c},o=c),Fh(e,t,r,o,u,i),!1})})},triggerEscape:function(n,e){i.triggerEvent("keydown",n.element,e.event)},getByUid:function(n){return g(n)},getByDom:function(n){return p(n)},build:Fm,addToGui:function(n){c(n)},removeFromGui:function(n){a(n)},addToWorld:function(n){e(n)},removeFromWorld:function(n){u(n)},broadcast:function(n){l(n)},broadcastOn:function(n,e){d(n,e)},broadcastEvent:function(n,e){m(n,e)},isConnected:w},e=function(n){n.connect(i),we(n.element)||(o.register(n),P(n.components(),e),i.triggerEvent(ne(),n.element,{target:n.element}))},u=function(n){we(n.element)||(P(n.components(),u),o.unregister(n)),n.disconnect()},c=function(n){Ye(t,n,Fe)},a=function(n){Ke(n)},s=function(t){var n=o.filter(Yn());P(n,function(n){var e=n.descHandler;mm(e)(t)})},l=function(n){s({universal:!0,data:n})},d=function(n,e){s({universal:!1,channels:n,data:e})},m=function(n,e){var t=o.filter(n);return Vh(t,e)},g=function(n){return o.getById(n).fold(function(){return Ct.error(new Error('Could not find component with uid: "'+n+'" in system.'))},Ct.value)},p=function(n){var e=yf(n).getOr("not found");return g(e)};return e(t),{root:t,element:t.element,destroy:function(){n.unbind(),Be(t.element)},add:c,remove:a,getByUid:g,getByDom:p,addToWorld:e,removeFromWorld:u,broadcast:l,broadcastOn:d,broadcastEvent:m}},zh=Ti("readonly-mode"),Lh=Ti("edit-mode");function Gh(n){var e=Fm(Td.sketch({dom:{classes:[Ti("outer-container")].concat(n.classes)},containerBehaviours:bo([To.config({alpha:zh,omega:Lh})])}));return Hh(e)}var $h=function(n,e){var t=de.fromTag("input");Vi(t,{opacity:"0",position:"absolute",top:"-1000px",left:"-1000px"}),Fe(n,t),Eo(t),e(t),Be(t)},Uh=function(n){var e,t,r=n.getSelection();0<r.rangeCount&&(e=r.getRangeAt(0),(t=n.document.createRange()).setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),r.removeAllRanges(),r.addRange(t))},Wh=function(n,e){Mo().each(function(n){ve(n,e)||Co(n)}),n.focus(),Eo(de.fromDom(n.document.body)),Uh(n)},Xh=function(n,e,t,r){var o=function(){Wh(e,r)},i=jg(t,"keydown",function(n){A(["input","textarea"],ye(n.target))||o()});return{toReading:function(){$h(n,Co)},toEditing:o,onToolbarTouch:function(){},destroy:function(){i.unbind()}}},qh=function(t,r,o,i,n){var u=function(){r.run(function(n){n.refreshSelection()})},e=function(n,e){var t=n-i.dom.scrollTop;r.run(function(n){n.scrollIntoView(t,t+e)})},c=function(){r.run(function(n){n.clearSelection()})},a=function(){t.getCursorBox().each(function(n){e(n.top,n.height)}),r.run(function(n){n.syncHeight()})},f=Ip(t),s=$p(a,300),l=[t.onKeyup(function(){c(),s.throttle()}),t.onNodeChanged(u),t.onDomChanged(s.throttle),t.onDomChanged(u),t.onScrollToCursor(function(n){n.preventDefault(),s.throttle()}),t.onScrollToElement(function(n){n.element,e(r,i)}),t.onToEditing(function(){r.run(function(n){n.toEditing()})}),t.onToReading(function(){r.run(function(n){n.toReading()})}),jg(t.doc,"touchend",function(n){ve(t.html,n.target)||ve(t.body,n.target)}),jg(o,"transitionend",function(n){var e;"height"===n.raw.propertyName&&(e=Li(o),r.run(function(n){n.setViewportOffset(e)}),u(),a())}),Ng(o,"touchstart",function(n){var e;r.run(function(n){n.highlightSelection()}),e=n,r.run(function(n){n.onToolbarTouch(e)}),t.onTouchToolstrip()}),jg(t.body,"touchstart",function(n){c(),t.onTouchContent(),f.fireTouchstart(n)}),f.onTouchmove(),f.onTouchend(),jg(t.body,"click",function(n){n.kill()}),jg(o,"touchmove",function(){t.onToolbarScrollStart()})];return{destroy:function(){P(l,function(n){n.unbind()})}}};var Yh,Kh,Jh,Qh,Zh={},nv={exports:Zh};Yh=undefined,Kh=Zh,Jh=nv,Qh=undefined,function(n){"object"==typeof Kh&&void 0!==Jh?Jh.exports=n():"function"==typeof Yh&&Yh.amd?Yh([],n):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=n()}(function(){return function s(i,u,c){function a(e,n){if(!u[e]){if(!i[e]){var t="function"==typeof Qh&&Qh;if(!n&&t)return t(e,!0);if(f)return f(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[e]={exports:{}};i[e][0].call(o.exports,function(n){return a(i[e][1][n]||n)},o,o.exports,s,i,u,c)}return u[e].exports}for(var f="function"==typeof Qh&&Qh,n=0;n<c.length;n++)a(c[n]);return a}({1:[function(n,e,t){var r,o,i=e.exports={};function u(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function a(n){if(r===setTimeout)return setTimeout(n,0);if((r===u||!r)&&setTimeout)return r=setTimeout,setTimeout(n,0);try{return r(n,0)}catch(e){try{return r.call(null,n,0)}catch(e){return r.call(this,n,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:u}catch(n){r=u}try{o="function"==typeof clearTimeout?clearTimeout:c}catch(n){o=c}}();var f,s=[],l=!1,d=-1;function m(){l&&f&&(l=!1,f.length?s=f.concat(s):d=-1,s.length&&g())}function g(){if(!l){var n=a(m);l=!0;for(var e=s.length;e;){for(f=s,s=[];++d<e;)f&&f[d].run();d=-1,e=s.length}f=null,l=!1,function(n){if(o===clearTimeout)return clearTimeout(n);if((o===c||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(n);try{o(n)}catch(e){try{return o.call(null,n)}catch(e){return o.call(this,n)}}}(n)}}function p(n,e){this.fun=n,this.array=e}function h(){}i.nextTick=function(n){var e=new Array(arguments.length-1);if(1<arguments.length)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];s.push(new p(n,e)),1!==s.length||l||a(g)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(n){return[]},i.binding=function(n){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(n){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(n,l,e){(function(e){function r(){}function u(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=0,this._handled=!1,this._value=undefined,this._deferreds=[],s(n,this)}function o(r,o){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,u._immediateFn(function(){var n,e=1===r._state?o.onFulfilled:o.onRejected;if(null!==e){try{n=e(r._value)}catch(t){return void c(o.promise,t)}i(o.promise,n)}else(1===r._state?i:c)(o.promise,r._value)})):r._deferreds.push(o)}function i(n,e){try{if(e===n)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if(e instanceof u)return n._state=3,n._value=e,void a(n);if("function"==typeof t)return void s((r=t,o=e,function(){r.apply(o,arguments)}),n)}n._state=1,n._value=e,a(n)}catch(i){c(n,i)}var r,o}function c(n,e){n._state=2,n._value=e,a(n)}function a(n){2===n._state&&0===n._deferreds.length&&u._immediateFn(function(){n._handled||u._unhandledRejectionFn(n._value)});for(var e=0,t=n._deferreds.length;e<t;e++)o(n,n._deferreds[e]);n._deferreds=null}function f(n,e,t){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof e?e:null,this.promise=t}function s(n,e){var t=!1;try{n(function(n){t||(t=!0,i(e,n))},function(n){t||(t=!0,c(e,n))})}catch(r){if(t)return;t=!0,c(e,r)}}var n,t;n=this,t=setTimeout,u.prototype["catch"]=function(n){return this.then(null,n)},u.prototype.then=function(n,e){var t=new this.constructor(r);return o(this,new f(n,e,t)),t},u.all=function(n){var a=Array.prototype.slice.call(n);return new u(function(o,i){if(0===a.length)return o([]);var u=a.length;for(var n=0;n<a.length;n++)!function c(e,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if("function"==typeof t)return void t.call(n,function(n){c(e,n)},i)}a[e]=n,0==--u&&o(a)}catch(r){i(r)}}(n,a[n])})},u.resolve=function(e){return e&&"object"==typeof e&&e.constructor===u?e:new u(function(n){n(e)})},u.reject=function(t){return new u(function(n,e){e(t)})},u.race=function(o){return new u(function(n,e){for(var t=0,r=o.length;t<r;t++)o[t].then(n,e)})},u._immediateFn="function"==typeof e?function(n){e(n)}:function(n){t(n,0)},u._unhandledRejectionFn=function(n){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",n)},u._setImmediateFn=function(n){u._immediateFn=n},u._setUnhandledRejectionFn=function(n){u._unhandledRejectionFn=n},void 0!==l&&l.exports?l.exports=u:n.Promise||(n.Promise=u)}).call(this,n("timers").setImmediate)},{timers:3}],3:[function(a,n,f){(function(n,e){var r=a("process/browser.js").nextTick,t=Function.prototype.apply,o=Array.prototype.slice,i={},u=0;function c(n,e){this._id=n,this._clearFn=e}f.setTimeout=function(){return new c(t.call(setTimeout,window,arguments),clearTimeout)},f.setInterval=function(){return new c(t.call(setInterval,window,arguments),clearInterval)},f.clearTimeout=f.clearInterval=function(n){n.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},f.enroll=function(n,e){clearTimeout(n._idleTimeoutId),n._idleTimeout=e},f.unenroll=function(n){clearTimeout(n._idleTimeoutId),n._idleTimeout=-1},f._unrefActive=f.active=function(n){clearTimeout(n._idleTimeoutId);var e=n._idleTimeout;0<=e&&(n._idleTimeoutId=setTimeout(function(){n._onTimeout&&n._onTimeout()},e))},f.setImmediate="function"==typeof n?n:function(n){var e=u++,t=!(arguments.length<2)&&o.call(arguments,1);return i[e]=!0,r(function(){i[e]&&(t?n.apply(null,t):n.call(null),f.clearImmediate(e))}),e},f.clearImmediate="function"==typeof e?e:function(n){delete i[n]}}).call(this,a("timers").setImmediate,a("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(n,e,t){var r=n("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});var ev,tv=nv.exports.boltExport,rv=function(n){var t=T.none(),e=[],r=function(n){o()?u(n):e.push(n)},o=function(){return t.isSome()},i=function(n){P(n,u)},u=function(e){t.each(function(n){setTimeout(function(){e(n)},0)})};return n(function(n){o()||(t=T.some(n),i(e),e=[])}),{get:r,map:function(t){return rv(function(e){r(function(n){e(t(n))})})},isReady:o}},ov={nu:rv,pure:function(e){return rv(function(n){n(e)})}},iv=function(n){setTimeout(function(){throw n},0)},uv=function(t){var n=function(n){t().then(n,iv)};return{map:function(n){return uv(function(){return t().then(n)})},bind:function(e){return uv(function(){return t().then(function(n){return e(n).toPromise()})})},anonBind:function(n){return uv(function(){return t().then(function(){return n.toPromise()})})},toLazy:function(){return ov.nu(n)},toCached:function(){var n=null;return uv(function(){return null===n&&(n=t()),n})},toPromise:t,get:n}},cv=function(n){return uv(function(){return new tv(n)})},av=function(n){return uv(function(){return tv.resolve(n)})},fv=function(r,o){return Q([{width:320,height:480,keyboard:{portrait:300,landscape:240}},{width:320,height:568,keyboard:{portrait:300,landscape:240}},{width:375,height:667,keyboard:{portrait:305,landscape:240}},{width:414,height:736,keyboard:{portrait:320,landscape:240}},{width:768,height:1024,keyboard:{portrait:320,landscape:400}},{width:1024,height:1366,keyboard:{portrait:380,landscape:460}}],function(n){return e=r<=n.width&&o<=n.height,t=n.keyboard,e?T.some(t):T.none();var e,t}).getOr({portrait:o/5,landscape:r/4})},sv=function(n){var e,t=Hg(n).isPortrait(),r=fv((e=n).screen.width,e.screen.height),o=t?r.portrait:r.landscape;return(t?n.screen.height:n.screen.width)-n.innerHeight>o?0:o},lv=function(n,e){var t=Te(n).dom.defaultView;return Li(n)+Li(e)-sv(t)},dv=function(n,e,t){var r=lv(e,t),o=Li(e)+Li(t)-r;Ri(n,"padding-bottom",o+"px")},mv=Ut([{fixed:["element","property","offsetY"]},{scroller:["element","offsetY"]}]),gv="data-"+Ti("position-y-fixed"),pv="data-"+Ti("y-property"),hv="data-"+Ti("scrolling"),vv="data-"+Ti("last-window-height"),yv=function(n){return Vp(n,gv)},bv=function(n,e){var t=lt(n,pv);return mv.fixed(n,t,e)},xv=function(n,e){return mv.scroller(n,e)},wv=function(n){var e=yv(n);return("true"===lt(n,hv)?xv:bv)(n,e)},Sv=function(n,e,t){var r=Te(n).dom.defaultView.innerHeight;return ft(n,vv,r+"px"),r-e-t},Ov=function(r,o,i,u){var e=Te(r).dom.defaultView,n=function(n){var e=lt(n,"style");Vi(n,{position:"absolute",top:"0px"}),ft(n,gv,"0px"),ft(n,pv,"top");return{restore:function(){ft(n,"style",e||""),gt(n,gv),gt(n,pv)}}}(i),t=Li(i),c=Li(u),a=function(n,e,t){var r=lt(t,"style");yg(t),Vi(t,{position:"absolute",height:e+"px",width:"100%",top:n+"px"}),ft(t,gv,n+"px"),ft(t,hv,"true"),ft(t,pv,"top");return{restore:function(){bg(t),ft(t,"style",r||""),gt(t,gv),gt(t,hv),gt(t,pv)}}}(t,Sv(r,t,c),r),f=function(n){var e=lt(n,"style");Vi(n,{position:"absolute",bottom:"0px"}),ft(n,gv,"0px"),ft(n,pv,"bottom");return{restore:function(){ft(n,"style",e||""),gt(n,gv),gt(n,pv)}}}(u),s=!0,l=function(){var n=e.innerHeight;return Vp(r,vv)<n},d=function(){var n,e,t;s&&(n=Li(i),e=Li(u),t=Sv(r,n,e),ft(r,gv,n+"px"),Ri(r,"height",t+"px"),dv(o,r,u))};return dv(o,r,u),{setViewportOffset:function(n){ft(r,gv,n+"px"),d()},isExpanding:l,isShrinking:m(l),refresh:d,restore:function(){s=!1,n.restore(),a.restore(),f.restore()}}},Tv=(ev=null,{animate:function(o,i,u,c,e,n){var a=!1,f=function(n){a=!0,e(n)};Pg.clearInterval(ev);var s=function(n){Pg.clearInterval(ev),f(n)};ev=Pg.setInterval(function(){var n,e,t,r=o();n=r,e=i,t=u,(Math.abs(n-e)<=t?T.none():n<e?T.some(n+t):T.some(n-t)).fold(function(){Pg.clearInterval(ev),f(i)},function(n){var e;c(n,s),a||((e=o())!==n||Math.abs(e-i)>Math.abs(r-i))&&(Pg.clearInterval(ev),f(i))})},n)}}),kv="data-"+Ti("last-scroll-top"),Ev=function(n){var e=ji(n,"top").getOr("0");return parseInt(e,10)},Cv=function(n){return parseInt(n.dom.scrollTop,10)},Mv=function(o,i){return cv(function(n){var e=b(Cv,o);ft(o,kv,e());var t=Math.abs(i-e()),r=Math.ceil(t/10);Tv.animate(e,i,r,function(n,e){Vp(o,kv)!==o.dom.scrollTop?e(o.dom.scrollTop):(o.dom.scrollTop=n,ft(o,kv,n))},function(){o.dom.scrollTop=i,ft(o,kv,i),n(i)},10)})},Dv=function(n,e){var t=e+yv(n)+"px";Ri(n,"top",t)};var _v=function(u,n){return n(function(r){var o=[],i=0;0===u.length?r([]):P(u,function(n,e){var t;n.get((t=e,function(n){o[t]=n,++i>=u.length&&r(o)}))})})},Iv=function(n,e,t){var r,o,i,u=e+t,c=ji(n,"top").getOr(t),a=u-parseInt(c,10),f=n.dom.scrollTop+a;return r=n,o=f,i=u,cv(function(n){var e=b(Cv,r);Tv.animate(e,o,15,function(n){r.dom.scrollTop=n,Ri(r,"top",Ev(r)+15+"px")},function(){r.dom.scrollTop=o,Ri(r,"top",i+"px"),n(o)},10)})},Fv=function(n,o){return n.fold(function(n,e,t){return Ri(n,e,o+(r=t)+"px"),av(r);var r},function(n,e){return Iv(n,o,e)})},Rv=function(n,e){var t,r=(t=Ui(n,"["+gv+"]"),N(t,wv)),o=N(r,function(n){return Fv(n,e)});return _v(o,cv)},Vv=function(i,u,n,t,e,r){var o,c,a=(o=function(n){return t=u,r=n,o=Te(e=i).dom.defaultView,cv(function(n){Dv(e,r),Dv(t,r),o.scrollTo(0,r),n(r)});var e,t,r,o},c=ko(ov.pure({})),{start:function(e){var n=ov.nu(function(n){return o(e).get(n)});c.set(n)},idle:function(n){c.get().get(function(){n()})}}),f=$p(function(){a.idle(function(){Rv(n,t.pageYOffset).get(function(){var n;(n=jp(r),T.from(n[0]).bind(function(n){var e=n.top-u.dom.scrollTop;return e>t.innerHeight+5||e<-5?T.some({top:e,bottom:e+n.height}):T.none()})).each(function(n){u.dom.scrollTop=u.dom.scrollTop+n.top}),a.start(0),e.refresh()})})},1e3),s=jg(de.fromDom(t),"scroll",function(){t.pageYOffset<0||f.throttle()});return Rv(n,t.pageYOffset).get(v),{unbind:s.unbind}},Bv=function(n){var a=n.cWin,e=n.ceBody,f=n.socket,t=n.toolstrip,r=n.contentElement,o=n.keyboardType,i=n.outerWindow,s=n.dropup,u=n.outerBody,c=Ov(f,e,t,s),l=o(u,a,Ge(),r),d=zg(i,{onChange:O,onReady:c.refresh});d.onAdjustment(function(){c.refresh()});var m=jg(de.fromDom(i),"resize",function(){c.isExpanding()&&c.refresh()}),g=Vv(t,f,u,i,c,a),p=function(t,e){var n=t.document,r=de.fromTag("div");bt(r,Ti("unfocused-selections")),Fe(de.fromDom(n.documentElement),r);var o=jg(r,"touchstart",function(n){n.prevent(),Wh(t,e),u()}),i=function(n){var e=de.fromTag("span");return wm(e,[Ti("layer-editor"),Ti("unfocused-selection")]),Vi(e,{left:n.left+"px",top:n.top+"px",width:n.width+"px",height:n.height+"px"}),e},u=function(){Ve(r)};return{update:function(){u();var n=jp(t),e=N(n,i);Re(r,e)},isActive:function(){return 0<Ce(r).length},destroy:function(){o.unbind(),Be(r)},clear:u}}(a,r),h=function(){p.clear()};return{toEditing:function(){l.toEditing(),h()},toReading:function(){l.toReading()},onToolbarTouch:function(n){l.onToolbarTouch()},refreshSelection:function(){p.isActive()&&p.update()},clearSelection:h,highlightSelection:function(){p.update()},scrollIntoView:function(n,e){var t,r,o,i,u,c;t=a,o=n,i=e,u=lv(r=f,s),c=b(Uh,t),u<o||u<i?Mv(r,r.dom.scrollTop-u+i).get(c):o<0&&Mv(r,r.dom.scrollTop+o).get(c)},updateToolbarPadding:O,setViewportOffset:function(n){var i,u;c.setViewportOffset(n),i=f,u=n,cv(function(n){var e=b(Ev,i),t=function(n){Ri(i,"top",n+"px")},r=Math.abs(u-e()),o=Math.ceil(r/10);Tv.animate(e,u,o,t,function(){t(u),n(u)},10)}).get(v)},syncHeight:function(){Ri(r,"height",r.dom.contentWindow.document.body.scrollHeight+"px")},refreshStructure:c.refresh,destroy:function(){c.restore(),d.destroy(),g.unbind(),m.unbind(),l.destroy(),p.destroy(),$h(Ge(),Co)}}},Av=function(r,n){var o=Sp(),i=em(),u=em(),c=nm(),a=nm();return{enter:function(){n.hide();var t=de.fromDom(document);xp(r.editor).each(function(n){var e;i.set({socketHeight:ji(r.socket,"height"),iframeHeight:ji(n.frame,"height"),outerScroll:document.body.scrollTop}),u.set({exclusives:(e="."+xg,jg(t,"touchmove",function(n){Zi(n.target,e).filter(th).fold(function(){n.prevent()},O)}))}),bt(r.container,Ti("fullscreen-maximized")),Cp(r.container,n.body),o.maximize(),Ri(r.socket,"overflow","scroll"),Ri(r.socket,"-webkit-overflow-scrolling","touch"),Eo(n.body),c.set(Bv({cWin:n.win,ceBody:n.body,socket:r.socket,toolstrip:r.toolstrip,dropup:r.dropup.element,contentElement:n.frame,outerBody:r.body,outerWindow:r.win,keyboardType:Xh})),c.run(function(n){n.syncHeight()}),a.set(qh(n,c,r.toolstrip,r.socket,r.dropup))})},refreshStructure:function(){c.run(function(n){n.refreshStructure()})},exit:function(){o.restore(),a.clear(),c.clear(),n.show(),i.on(function(n){n.socketHeight.each(function(n){Ri(r.socket,"height",n)}),n.iframeHeight.each(function(n){Ri(r.editor.getFrame(),"height",n)}),document.body.scrollTop=n.scrollTop}),i.clear(),u.on(function(n){n.exclusives.unbind()}),u.clear(),wt(r.container,Ti("fullscreen-maximized")),Mp(),bg(r.toolbar),Ni(r.socket,"overflow"),Ni(r.socket,"-webkit-overflow-scrolling"),Co(r.editor.getFrame()),xp(r.editor).each(function(n){n.clearSelection()})}}};function jv(n){var e=Gh({classes:[Ti("ios-container")]}),t=rh(),r=nm(),o=oh(r),i=ih(),u=kh(function(){r.run(function(n){n.refreshStructure()})},n);e.add(t.wrapper),e.add(i),e.add(u.component);return{system:e,element:e.element,init:function(n){r.set(function(n){var e=_r("Getting IosWebapp schema",Xp,n);Ri(e.toolstrip,"width","100%"),Ri(e.container,"position","relative");var t=Fm(Up(function(){e.setReadOnly(e.readOnlyOnInit()),o.enter()},e.translate));e.alloy.add(t);var r={show:function(){e.alloy.add(t)},hide:function(){e.alloy.remove(t)}},o=Av(e,r);return{setReadOnly:e.setReadOnly,refreshStructure:o.refreshStructure,enter:o.enter,exit:o.exit,destroy:O}}(n))},exit:function(){r.run(function(n){eg.remove(i,o),n.exit()})},setToolbarGroups:function(n){var e=t.createGroups(n);t.setGroups(e)},setContextToolbar:function(n){var e=t.createGroups(n);t.setContextToolbar(e)},focusToolbar:function(){t.focus()},restoreToolbar:function(){t.restoreToolbar()},updateMode:function(n){ah(i,o,n,e.root)},socket:i,dropup:u}}var Nv=tinymce.util.Tools.resolve("tinymce.EditorManager"),Pv=function(n,e,t){n.system.broadcastOn([Vo],{command:e,state:t})},Hv=function(e){return function(){var n=function(){e._skinLoaded=!0,e.fire("SkinLoaded")};e.initialized?n():e.on("init",n)}},zv="toReading",Lv="toEditing",Gv=function(S){return{getNotificationManagerImpl:function(){return{open:y({progressBar:{value:O},close:O,text:O,getEl:y(null),moveTo:O,moveRel:O,settings:{}}),close:O,reposition:O,getArgs:y({})}},renderUI:function(){var n,e,t,r=S.getElement(),o=(n=S,{content:(e=T.from(n.getParam("skin_url")).fold(function(){return Nv.baseURL+"/skins/ui/oxide"},function(n){return n}))+"/content.mobile.min.css",ui:e+"/skin.mobile.min.css"});!1==(!1===S.getParam("skin"))?(t=_o.DOM.styleSheetLoader,S.contentCSS.push(o.content),t.load(o.ui,Hv(S)),S.on("remove",function(){return t.unload(o.ui)})):Hv(S)();var i,u,c,a,f,s,l,d,m,g=function(){S.fire("ScrollIntoView")},p=Mn().os.isAndroid()?(i=g,u=Gh({classes:[Ti("android-container")]}),c=rh(),a=nm(),f=oh(a),s=ih(),l=kh(O,i),u.add(c.wrapper),u.add(s),u.add(l.component),{system:u,element:u.element,init:function(n){a.set(qp(n))},exit:function(){a.run(function(n){n.exit(),eg.remove(s,f)})},setToolbarGroups:function(n){var e=c.createGroups(n);c.setGroups(e)},setContextToolbar:function(n){var e=c.createGroups(n);c.setContextToolbar(e)},focusToolbar:function(){c.focus()},restoreToolbar:function(){c.restoreToolbar()},updateMode:function(n){ah(s,f,n,u.root)},socket:s,dropup:l}):jv(g),h=de.fromDom(r);d=h,m=p.system,Je(d,m,_e);var v=r.ownerDocument.defaultView,y=zg(v,{onChange:function(){var n,e,t;p.system.broadcastOn([Bo],{width:(n=v,e=Mn().os.isiOS(),t=Hg(n).isPortrait(),e&&!t?n.screen.height:n.screen.width)})},onReady:O}),b=function(n,e,t,r){!1===r&&S.selection.collapse();var o=x(n,e,t);p.setToolbarGroups(!0===r?o.readOnly:o.main),S.setMode(!0===r?"readonly":"design"),S.fire(!0===r?zv:Lv),p.updateMode(r)},x=function(n,e,t){var r=n.get();return{readOnly:r.backToMask.concat(e.get()),main:r.backToMask.concat(t.get())}},w=function(n,e){return S.on(n,e),{unbind:function(){S.off(n)}}};return S.on("init",function(){p.init({editor:{getFrame:function(){return de.fromDom(S.contentAreaContainer.querySelector("iframe"))},onDomChanged:function(){return{unbind:O}},onToReading:function(n){return w(zv,n)},onToEditing:function(n){return w(Lv,n)},onScrollToCursor:function(e){S.on("ScrollIntoView",function(n){e(n)});return{unbind:function(){S.off("ScrollIntoView"),y.destroy()}}},onTouchToolstrip:function(){u()},onTouchContent:function(){var n=de.fromDom(S.editorContainer.querySelector("."+Ti("toolbar")));Do(n).bind(function(n){return p.system.getByDom(n).toOptional()}).each(ae),p.restoreToolbar(),u()},onTapContent:function(n){var e=n.target;"img"===ye(e)?(S.selection.select(e.dom),n.kill()):"a"===ye(e)&&p.system.getByDom(de.fromDom(S.editorContainer)).each(function(n){To.isAlpha(n)&&function(n){var e=document.createElement("a");e.target="_blank",e.href=n.href,e.rel="noreferrer noopener";var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)}(e.dom)})}},container:de.fromDom(S.editorContainer),socket:de.fromDom(S.contentAreaContainer),toolstrip:de.fromDom(S.editorContainer.querySelector("."+Ti("toolstrip"))),toolbar:de.fromDom(S.editorContainer.querySelector("."+Ti("toolbar"))),dropup:p.dropup,alloy:p.system,translate:O,setReadOnly:function(n){b(g,m,d,n)},readOnlyOnInit:function(){return!1}});var t,n,r,o,i,e,u=function(){p.dropup.disappear(function(){p.system.broadcastOn([Ao],{})})},c={label:"The first group",scrollable:!1,items:[Pf("back",function(){S.selection.collapse(),p.exit()},{},S)]},a={label:"Back to read only",scrollable:!1,items:[Pf("readonly-back",function(){b(g,m,d,!0)},{},S)]},f=Fg(p,S),s=(t=f,n=Ig(S),r={},W(n,function(n){var e=!ct(r,n)&&ct(t,n)&&t[n].isSupported()?[t[n].sketch()]:[];return r[n]=!0,e})),l={label:"The extra group",scrollable:!1,items:[]},d=ko([{label:"the action group",scrollable:!0,items:s},l]),m=ko([{label:"The read only mode group",scrollable:!0,items:[]},l]),g=ko({backToMask:[c],backToReadOnly:[a]});o=p,e=Qe((i=S).formatter.get()),P(e,function(e){i.formatter.formatChanged(e,function(n){Pv(o,e,n)})}),P(["ul","ol"],function(t){i.selection.selectorChanged(t,function(n,e){Pv(o,t,n)})})}),S.on("remove",function(){p.exit()}),S.on("detach",function(){var e,n;e=p.system,n=Ce(e.element),P(n,function(n){e.getByDom(n).each(Ue)}),Be(e.element),p.system.destroy()}),{iframeContainer:p.socket.element.dom,editorContainer:p.element.dom}}}};Io.add("mobile",Gv)}();
@@ -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.6.1 (2020-11-25)
7
+ * Version: 5.6.2 (2020-12-08)
8
8
  */
9
- !function(){"use strict";var $=function(){},i=function(e,o){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(o.apply(null,t))}},at=function(t){return function(){return t}},ct=function(t){return t};function y(o){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=r.concat(t);return o.apply(null,e)}}var x=function(n){return function(t){return!n(t)}},u=function(t){return function(){throw new Error(t)}},c=at(!1),b=at(!0),t=tinymce.util.Tools.resolve("tinymce.ThemeManager"),it=function(){return(it=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)};function w(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]]);return e}function S(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;for(var o=Array(t),r=0,n=0;n<e;n++)for(var i=arguments[n],u=0,a=i.length;u<a;u++,r++)o[r]=i[u];return o}var n,e,o,r,s,a,l=function(){return f},f=(n=function(t){return t.isNone()},{fold:function(t,n){return t()},is:c,isSome:c,isNone:b,getOr:o=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:at(null),getOrUndefined:at(undefined),or:o,orThunk:e,map:l,each:$,bind:l,exists:c,forall:b,filter:l,equals:n,equals_:n,toArray:function(){return[]},toString:at("none()")}),d=function(e){var t=at(e),n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:b,isNone:c,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return d(t(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?r:f},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(c,function(t){return n(e,t)})}};return r},st={some:d,none:l,from:function(t){return null===t||t===undefined?f:d(t)}},m=function(o){return function(t){return e=typeof(n=t),(null===n?"null":"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e)===o;var n,e}},g=function(n){return function(t){return typeof t===n}},k=m("string"),C=m("object"),p=m("array"),O=g("boolean"),h=(r=undefined,function(t){return r===t}),v=function(t){return!(null===(n=t)||n===undefined);var n},_=g("function"),ut=g("number"),T=function(t,n){if(p(t)){for(var e=0,o=t.length;e<o;++e)if(!n(t[e]))return!1;return!0}return!1},E=Array.prototype.slice,D=Array.prototype.indexOf,B=Array.prototype.push,A=function(t,n){return D.call(t,n)},M=function(t,n){return-1<A(t,n)},F=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e))return!0}return!1},I=function(t,n){for(var e=[],o=0;o<t;o++)e.push(n(o));return e},R=function(t,n){for(var e=[],o=0;o<t.length;o+=n){var r=E.call(t,o,o+n);e.push(r)}return e},V=function(t,n){for(var e=t.length,o=new Array(e),r=0;r<e;r++){var i=t[r];o[r]=n(i,r)}return o},lt=function(t,n){for(var e=0,o=t.length;e<o;e++){n(t[e],e)}},P=function(t,n){for(var e=[],o=[],r=0,i=t.length;r<i;r++){var u=t[r];(n(u,r)?e:o).push(u)}return{pass:e,fail:o}},H=function(t,n){for(var e=[],o=0,r=t.length;o<r;o++){var i=t[o];n(i,o)&&e.push(i)}return e},z=function(t,n,e){return function(t,n){for(var e=t.length-1;0<=e;e--){n(t[e],e)}}(t,function(t){e=n(e,t)}),e},N=function(t,n,e){return lt(t,function(t){e=n(e,t)}),e},L=function(t,n){return function(t,n,e){for(var o=0,r=t.length;o<r;o++){var i=t[o];if(n(i,o))return st.some(i);if(e(i,o))break}return st.none()}(t,n,c)},j=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e))return st.some(e)}return st.none()},ft=function(t){for(var n=[],e=0,o=t.length;e<o;++e){if(!p(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);B.apply(n,t[e])}return n},U=function(t,n){return ft(V(t,n))},W=function(t,n){for(var e=0,o=t.length;e<o;++e){if(!0!==n(t[e],e))return!1}return!0},G=function(t){var n=E.call(t,0);return n.reverse(),n},X=function(t,n){return H(t,function(t){return!M(n,t)})},Y=function(t,n){var e=E.call(t,0);return e.sort(n),e},q=function(t,n){return 0<=n&&n<t.length?st.some(t[n]):st.none()},K=function(t){return q(t,0)},J=function(t){return q(t,t.length-1)},Q=_(Array.from)?Array.from:function(t){return E.call(t)},Z=function(t,n){for(var e=0;e<t.length;e++){var o=n(t[e],e);if(o.isSome())return o}return st.none()},tt=function(e){return{is:function(t){return e===t},isValue:b,isError:c,getOr:at(e),getOrThunk:at(e),getOrDie:at(e),or:function(t){return tt(e)},orThunk:function(t){return tt(e)},fold:function(t,n){return n(e)},map:function(t){return tt(t(e))},mapError:function(t){return tt(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOptional:function(){return st.some(e)}}},nt=function(e){return{is:c,isValue:c,isError:b,getOr:ct,getOrThunk:function(t){return t()},getOrDie:function(){return u(String(e))()},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,n){return t(e)},map:function(t){return nt(e)},mapError:function(t){return nt(t(e))},each:$,bind:function(t){return nt(e)},exists:c,forall:b,toOptional:st.none}},dt={value:tt,error:nt,fromOption:function(t,n){return t.fold(function(){return nt(n)},tt)}};(a=s=s||{})[a.Error=0]="Error",a[a.Value=1]="Value";var et,ot,rt=function(t,n,e){return t.stype===s.Error?n(t.serror):e(t.svalue)},mt=function(t){return{stype:s.Value,svalue:t}},gt=function(t){return{stype:s.Error,serror:t}},pt=function(t){return t.fold(gt,mt)},ht=function(t){return rt(t,dt.error,dt.value)},vt=mt,bt=function(t){var n=[],e=[];return lt(t,function(t){rt(t,function(t){return e.push(t)},function(t){return n.push(t)})}),{values:n,errors:e}},yt=gt,xt=function(t,n){return t.stype===s.Value?n(t.svalue):t},wt=function(t,n){return t.stype===s.Error?n(t.serror):t},St=function(t,n){return t.stype===s.Value?{stype:s.Value,svalue:n(t.svalue)}:t},kt=function(t,n){return t.stype===s.Error?{stype:s.Error,serror:n(t.serror)}:t},Ct=Object.keys,Ot=Object.hasOwnProperty,_t=function(t,n){for(var e=Ct(t),o=0,r=e.length;o<r;o++){var i=e[o];n(t[i],i)}},Tt=function(t,e){return Et(t,function(t,n){return{k:n,v:e(t,n)}})},Et=function(t,o){var r={};return _t(t,function(t,n){var e=o(t,n);r[e.k]=e.v}),r},Dt=function(t,n){var e,o,r,i,u={};return e=n,i=u,o=function(t,n){i[n]=t},r=$,_t(t,function(t,n){(e(t,n)?o:r)(t,n)}),u},Bt=function(t,e){var o=[];return _t(t,function(t,n){o.push(e(t,n))}),o},At=function(t,n){for(var e=Ct(t),o=0,r=e.length;o<r;o++){var i=e[o],u=t[i];if(n(u,i,t))return st.some(u)}return st.none()},Mt=function(t){return Bt(t,function(t){return t})},Ft=function(t,n){return It(t,n)?st.from(t[n]):st.none()},It=function(t,n){return Ot.call(t,n)},Rt=function(t,n){return It(t,n)&&t[n]!==undefined&&null!==t[n]},Vt=function(u){if(!p(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var a=[],e={};return lt(u,function(t,o){var n=Ct(t);if(1!==n.length)throw new Error("one and only one name per case");var r=n[0],i=t[r];if(e[r]!==undefined)throw new Error("duplicate key detected:"+r);if("cata"===r)throw new Error("cannot have a case named cata (sorry)");if(!p(i))throw new Error("case arguments must be an array");a.push(r),e[r]=function(){var t=arguments.length;if(t!==i.length)throw new Error("Wrong number of arguments to case "+r+". Expected "+i.length+" ("+i+"), got "+t);for(var e=new Array(t),n=0;n<e.length;n++)e[n]=arguments[n];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[o].apply(null,e)},match:function(t){var n=Ct(t);if(a.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+a.join(",")+"\nActual: "+n.join(","));if(!W(a,function(t){return M(n,t)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+a.join(", "));return t[r].apply(null,e)},log:function(t){console.log(t,{constructors:a,constructor:r,params:e})}}}}),e},Pt=Object.prototype.hasOwnProperty,Ht=function(u){return function(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var e={},o=0;o<t.length;o++){var r=t[o];for(var i in r)Pt.call(r,i)&&(e[i]=u(e[i],r[i]))}return e}},zt=Ht(function(t,n){return C(t)&&C(n)?zt(t,n):n}),Nt=Ht(function(t,n){return n}),Lt=function(e){var o,r=!1;return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r||(r=!0,o=e.apply(null,t)),o}},jt=Vt([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),Ut=function(t){return jt.defaultedThunk(at(t))},Wt=jt.strict,Gt=jt.asOption,Xt=jt.defaultedThunk,Yt=(jt.asDefaultedOptionThunk,jt.mergeWithThunk),qt=(Vt([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(t,n){var e={};return e[t]=n,e}),Kt=function(t,n){return e=n,o={},_t(t,function(t,n){M(e,n)||(o[n]=t)}),o;var e,o},Jt=qt,$t=function(t){return n={},lt(t,function(t){n[t.key]=t.value}),n;var n},Qt=function(t,n){var e,o,r,i,u,a=(e=[],o=[],lt(t,function(t){t.fold(function(t){e.push(t)},function(t){o.push(t)})}),{errors:e,values:o});return 0<a.errors.length?(u=a.errors,dt.error(ft(u))):(i=n,0===(r=a.values).length?dt.value(i):dt.value(zt(i,Nt.apply(undefined,r))))},Zt=function(t){return i(yt,ft)(t)},tn=function(t,n){var e,o,r=bt(t);return 0<r.errors.length?Zt(r.errors):(e=r.values,o=n,0<e.length?vt(zt(o,Nt.apply(undefined,e))):vt(o))},nn=function(t){var n=bt(t);return 0<n.errors.length?Zt(n.errors):vt(n.values)},en=function(t){return C(t)&&100<Ct(t).length?" removed due to size":JSON.stringify(t,null,2)},on=function(t,n){return yt([{path:t,getErrorInfo:n}])},rn=Vt([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),un=function(e,o,r){return Ft(o,r).fold(function(){return t=r,n=o,on(e,function(){return'Could not find valid *strict* value for "'+t+'" in '+en(n)});var t,n},vt)},an=function(t,n,e){var o=Ft(t,n).fold(function(){return e(t)},ct);return vt(o)},cn=function(a,c,t,s){return t.fold(function(r,e,t,o){var i=function(t){var n=o.extract(a.concat([r]),s,t);return St(n,function(t){return qt(e,s(t))})},u=function(t){return t.fold(function(){var t=qt(e,s(st.none()));return vt(t)},function(t){var n=o.extract(a.concat([r]),s,t);return St(n,function(t){return qt(e,s(st.some(t)))})})};return t.fold(function(){return xt(un(a,c,r),i)},function(t){return xt(an(c,r,t),i)},function(){return xt(vt(Ft(c,r)),u)},function(t){return xt((e=t,o=Ft(n=c,r).map(function(t){return!0===t?e(n):t}),vt(o)),u);var n,e,o},function(t){var n=t(c),e=St(an(c,r,at({})),function(t){return zt(n,t)});return xt(e,i)})},function(t,n){var e=n(c);return vt(qt(t,s(e)))})},sn=function(o){return{extract:function(e,t,n){return wt(o(n,t),function(t){return n=t,on(e,function(){return n});var n})},toString:function(){return"val"}}},ln=function(t){var u=fn(t),a=z(t,function(n,t){return t.fold(function(t){return zt(n,Jt(t,!0))},at(n))},{});return{extract:function(t,n,e){var o,r=O(e)?[]:Ct(Dt(e,function(t){return t!==undefined&&null!==t})),i=H(r,function(t){return!Rt(a,t)});return 0===i.length?u.extract(t,n,e):(o=i,on(t,function(){return"There are unsupported fields: ["+o.join(", ")+"] specified"}))},toString:u.toString}},fn=function(a){return{extract:function(t,n,e){return o=t,r=e,i=n,u=V(a,function(t){return cn(o,r,t,i)}),tn(u,{});var o,r,i,u},toString:function(){return"obj{\n"+V(a,function(t){return t.fold(function(t,n,e,o){return t+" -> "+o.toString()},function(t,n){return"state("+t+")"})}).join("\n")+"}"}}},dn=function(r){return{extract:function(e,o,t){var n=V(t,function(t,n){return r.extract(e.concat(["["+n+"]"]),o,t)});return nn(n)},toString:function(){return"array("+r.toString()+")"}}},mn=function(a){return{extract:function(t,n,e){for(var o=[],r=0,i=a;r<i.length;r++){var u=i[r].extract(t,n,e);if(u.stype===s.Value)return u;o.push(u)}return nn(o)},toString:function(){return"oneOf("+V(a,function(t){return t.toString()}).join(", ")+")"}}},gn=function(a,c){return{extract:function(e,o,r){var t,n,i=Ct(r),u=(t=e,n=i,dn(sn(a)).extract(t,ct,n));return xt(u,function(t){var n=V(t,function(t){return rn.field(t,t,Wt(),c)});return fn(n).extract(e,o,r)})},toString:function(){return"setOf("+c.toString()+")"}}},pn=at(sn(vt)),hn=i(dn,fn),vn=rn.state,bn=rn.field,yn=function(e,n,o,r,i){return Ft(r,i).fold(function(){return t=r,n=i,on(e,function(){return'The chosen schema: "'+n+'" did not exist in branches: '+en(t)});var t,n},function(t){return t.extract(e.concat(["branch: "+i]),n,o)})},xn=function(r,i){return{extract:function(n,e,o){return Ft(o,r).fold(function(){return t=r,on(n,function(){return'Choice schema did not contain choice key: "'+t+'"'});var t},function(t){return yn(n,e,o,i,t)})},toString:function(){return"chooseOn("+r+"). Possible values: "+Ct(i)}}},wn=sn(vt),Sn=function(t){return hn(t)},kn=function(o){return{extract:function(t,n,e){return o().extract(t,n,e)},toString:function(){return o().toString()}}},Cn=function(n){return sn(function(t){return n(t).fold(yt,vt)})},On=function(n,t){return gn(function(t){return pt(n(t))},t)},_n=function(t,n,e){return ht((o=t,r=ct,i=e,u=n.extract([o],r,i),kt(u,function(t){return{input:i,errors:t}})));var o,r,i,u},Tn=function(t){return t.fold(function(t){throw new Error(Dn(t))},ct)},En=function(t,n,e){return Tn(_n(t,n,e))},Dn=function(t){return"Errors: \n"+(n=t.errors,e=10<n.length?n.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):n,V(e,function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}).join("\n"))+"\n\nInput object: "+en(t.input);var n,e},Bn=xn,An=function(t,n){return xn(t,Tt(n,fn))},Mn=at(wn),Fn=function(e,o){return sn(function(t){var n=typeof t;return e(t)?vt(t):yt("Expected type: "+o+" but got: "+n)})},In=Fn(ut,"number"),Rn=Fn(k,"string"),Vn=Fn(O,"boolean"),Pn=Fn(_,"function"),Hn=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 Hn(n[t])});case"Map":return t(n.keys(),Hn)&&t(n.values(),Hn);case"Set":return t(n.keys(),Hn);default:return!1}},zn=sn(function(t){return Hn(t)?vt(t):yt("Expected value to be acceptable for sending via postMessage")}),Nn=function(n){return Cn(function(t){return M(n,t)?dt.value(t):dt.error('Unsupported value: "'+t+'", choose one of "'+n.join(", ")+'".')})},Ln=function(t){return bn(t,t,Wt(),pn())},jn=function(t,n){return bn(t,t,Wt(),n)},Un=function(t){return jn(t,Rn)},Wn=function(t,n){return bn(t,t,Wt(),Nn(n))},Gn=function(t){return jn(t,Pn)},Xn=function(t,n){return bn(t,t,Wt(),fn(n))},Yn=function(t,n){return bn(t,t,Wt(),hn(n))},qn=function(t,n){return bn(t,t,Wt(),dn(n))},Kn=function(t){return bn(t,t,Gt(),pn())},Jn=function(t,n){return bn(t,t,Gt(),n)},$n=function(t){return Jn(t,In)},Qn=function(t){return Jn(t,Rn)},Zn=function(t){return Jn(t,Pn)},te=function(t,n){return Jn(t,fn(n))},ne=function(t,n){return bn(t,t,Ut(n),pn())},ee=function(t,n,e){return bn(t,t,Ut(n),e)},oe=function(t,n){return ee(t,n,In)},re=function(t,n){return ee(t,n,Rn)},ie=function(t,n,e){return ee(t,n,Nn(e))},ue=function(t,n){return ee(t,n,Vn)},ae=function(t,n){return ee(t,n,Pn)},ce=function(t,n,e){return ee(t,n,dn(e))},se=function(t,n,e){return ee(t,n,fn(e))},le=function(t,n){return vn(t,n)},fe=function(t){var n=t;return{get:function(){return n},set:function(t){n=t}}},de=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:t}},me={fromHtml:function(t,n){var e=(n||document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||1<e.childNodes.length)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return de(e.childNodes[0])},fromTag:function(t,n){var e=(n||document).createElement(t);return de(e)},fromText:function(t,n){var e=(n||document).createTextNode(t);return de(e)},fromDom:de,fromPoint:function(t,n,e){return st.from(t.dom.elementFromPoint(n,e)).map(de)}},ge=function(t,n){var e=function(t,n){for(var e=0;e<t.length;e++){var o=t[e];if(o.test(n))return o}return undefined}(t,n);if(!e)return{major:0,minor:0};var o=function(t){return Number(n.replace(e,"$"+t))};return he(o(1),o(2))},pe=function(){return he(0,0)},he=function(t,n){return{major:t,minor:n}},ve={nu:he,detect:function(t,n){var e=String(n).toLowerCase();return 0===t.length?pe():ge(t,e)},unknown:pe},be=function(t,n){var e=String(n).toLowerCase();return L(t,function(t){return t.search(e)})},ye=function(t,e){return be(t,e).map(function(t){var n=ve.detect(t.versionRegexes,e);return{current:t.name,version:n}})},xe=function(t,e){return be(t,e).map(function(t){var n=ve.detect(t.versionRegexes,e);return{current:t.name,version:n}})},we=function(t,n){return-1!==t.indexOf(n)},Se=function(t,n){return o=n,r=(e=t).length-n.length,""===o||e.length>=o.length&&e.substr(r,r+o.length)===o;var e,o,r},ke=(et=/^\s+|\s+$/g,function(t){return t.replace(et,"")}),Ce=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Oe=function(n){return function(t){return we(t,n)}},_e=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return we(t,"edge/")&&we(t,"chrome")&&we(t,"safari")&&we(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ce],search:function(t){return we(t,"chrome")&&!we(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return we(t,"msie")||we(t,"trident")}},{name:"Opera",versionRegexes:[Ce,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Oe("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Oe("firefox")},{name:"Safari",versionRegexes:[Ce,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(we(t,"safari")||we(t,"mobile/"))&&we(t,"applewebkit")}}],Te=[{name:"Windows",search:Oe("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return we(t,"iphone")||we(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Oe("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Oe("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Oe("linux"),versionRegexes:[]},{name:"Solaris",search:Oe("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Oe("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Oe("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ee={browsers:at(_e),oses:at(Te)},De="Firefox",Be=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isEdge:o("Edge"),isChrome:o("Chrome"),isIE:o("IE"),isOpera:o("Opera"),isFirefox:o(De),isSafari:o("Safari")}},Ae={unknown:function(){return Be({current:undefined,version:ve.unknown()})},nu:Be,edge:at("Edge"),chrome:at("Chrome"),ie:at("IE"),opera:at("Opera"),firefox:at(De),safari:at("Safari")},Me="Windows",Fe="Android",Ie="Solaris",Re="FreeBSD",Ve="ChromeOS",Pe=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isWindows:o(Me),isiOS:o("iOS"),isAndroid:o(Fe),isOSX:o("OSX"),isLinux:o("Linux"),isSolaris:o(Ie),isFreeBSD:o(Re),isChromeOS:o(Ve)}},He={unknown:function(){return Pe({current:undefined,version:ve.unknown()})},nu:Pe,windows:at(Me),ios:at("iOS"),android:at(Fe),linux:at("Linux"),osx:at("OSX"),solaris:at(Ie),freebsd:at(Re),chromeos:at(Ve)},ze=function(t,n){var e,o,r,i,u,a,c,s,l,f,d,m,g=Ee.browsers(),p=Ee.oses(),h=ye(g,t).fold(Ae.unknown,Ae.nu),v=xe(p,t).fold(He.unknown,He.nu);return{browser:h,os:v,deviceType:(o=h,r=t,i=n,u=(e=v).isiOS()&&!0===/ipad/i.test(r),a=e.isiOS()&&!u,c=e.isiOS()||e.isAndroid(),s=c||i("(pointer:coarse)"),l=u||!a&&c&&i("(min-device-width:768px)"),f=a||c&&!l,d=o.isSafari()&&e.isiOS()&&!1===/safari/i.test(r),m=!f&&!l&&!d,{isiPad:at(u),isiPhone:at(a),isTablet:at(l),isPhone:at(f),isTouch:at(s),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:at(d),isDesktop:at(m)})}},Ne=function(t){return window.matchMedia(t).matches},Le=Lt(function(){return ze(navigator.userAgent,Ne)}),je=function(){return Le()},Ue=function(t,n){var e=t.dom;if(1!==e.nodeType)return!1;var o=e;if(o.matches!==undefined)return o.matches(n);if(o.msMatchesSelector!==undefined)return o.msMatchesSelector(n);if(o.webkitMatchesSelector!==undefined)return o.webkitMatchesSelector(n);if(o.mozMatchesSelector!==undefined)return o.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},We=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Ge=function(t,n){return t.dom===n.dom},Xe=function(t,n){return e=t.dom,o=n.dom,r=e,i=o,u=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(r.compareDocumentPosition(i)&u);var e,o,r,i,u},Ye=function(t,n){return je().browser.isIE()?Xe(t,n):(e=n,o=t.dom,r=e.dom,o!==r&&o.contains(r));var e,o,r},qe=function(t){return _(t)?t:c},Ke=function(t,n,e){for(var o=t.dom,r=qe(e);o.parentNode;){o=o.parentNode;var i=me.fromDom(o),u=n(i);if(u.isSome())return u;if(r(i))break}return st.none()},Je=function(t,n,e){var o=n(t),r=qe(e);return o.orThunk(function(){return r(t)?st.none():Ke(t,n,r)})},$e=function(t,n){return Ge(t.element,n.event.target)},Qe=function(t){if(!Rt(t,"can")&&!Rt(t,"abort")&&!Rt(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return En("Extracting event.handler",ln([ne("can",b),ne("abort",c),ne("run",$)]),t)},Ze=function(e){var n,o,r,i,t=(o=function(t){return t.can},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(n,function(t,n){return t&&o(n).apply(undefined,e)},!0)}),u=(r=n=e,i=function(t){return t.abort},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(r,function(t,n){return t||i(n).apply(undefined,e)},!1)});return Qe({can:t,abort:u,run:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];lt(e,function(t){t.run.apply(undefined,n)})}})},to=at,no=to("touchstart"),eo=to("touchmove"),oo=to("touchend"),ro=to("touchcancel"),io=to("mousedown"),uo=to("mousemove"),ao=to("mouseout"),co=to("mouseup"),so=to("mouseover"),lo=to("focusin"),fo=to("focusout"),mo=to("keydown"),go=to("keyup"),po=to("input"),ho=to("change"),vo=to("click"),bo=to("transitionend"),yo=to("selectstart"),xo=function(t){return at("alloy."+t)},wo={tap:xo("tap")},So=xo("focus"),ko=xo("blur.post"),Co=xo("paste.post"),Oo=xo("receive"),_o=xo("execute"),To=xo("focus.item"),Eo=wo.tap,Do=xo("longpress"),Bo=xo("sandbox.close"),Ao=xo("typeahead.cancel"),Mo=xo("system.init"),Fo=xo("system.touchmove"),Io=xo("system.touchend"),Ro=xo("system.scroll"),Vo=xo("system.resize"),Po=xo("system.attached"),Ho=xo("system.detached"),zo=xo("system.dismissRequested"),No=xo("system.repositionRequested"),Lo=xo("focusmanager.shifted"),jo=xo("slotcontainer.visibility"),Uo=xo("change.tab"),Wo=xo("dismiss.tab"),Go=xo("highlight"),Xo=xo("dehighlight"),Yo=function(t,n){$o(t,t.element,n,{})},qo=function(t,n,e){$o(t,t.element,n,e)},Ko=function(t){Yo(t,_o())},Jo=function(t,n,e){$o(t,n,e,{})},$o=function(t,n,e,o){var r=it({target:n},o);t.getSystem().triggerEvent(e,n,r)},Qo=function(t,n,e,o){t.getSystem().triggerEvent(e,n,o.event)},Zo=$t,tr=function(t,n){return{key:t,value:Qe({abort:n})}},nr=function(t){return{key:t,value:Qe({run:function(t,n){n.event.prevent()}})}},er=function(t,n){return{key:t,value:Qe({run:n})}},or=function(t,e,o){return{key:t,value:Qe({run:function(t,n){e.apply(undefined,[t,n].concat(o))}})}},rr=function(t){return function(e){return{key:t,value:Qe({run:function(t,n){$e(t,n)&&e(t,n)}})}}},ir=function(t,n,e){var o,r,i=n.partUids[e];return r=i,er(o=t,function(t,n){t.getSystem().getByUid(r).each(function(t){Qo(t,t.element,o,n)})})},ur=function(t,r){return er(t,function(n,t){var e=t.event,o=n.getSystem().getByDom(e.target).fold(function(){return Je(e.target,function(t){return n.getSystem().getByDom(t).toOptional()},c).getOr(n)},function(t){return t});r(n,o,t)})},ar=function(t){return er(t,function(t,n){n.cut()})},cr=function(t,n){return rr(t)(n)},sr=rr(Po()),lr=rr(Ho()),fr=rr(Mo()),dr=(ot=_o(),function(t){return er(ot,t)}),mr=("undefined"!=typeof window||Function("return this;")(),function(t){return t.dom.nodeName.toLowerCase()}),gr=function(n){return function(t){return t.dom.nodeType===n}},pr=gr(1),hr=gr(3),vr=gr(9),br=gr(11),yr=function(t){return me.fromDom(t.dom.ownerDocument)},xr=function(t){return vr(t)?t:yr(t)},wr=function(t){return me.fromDom(xr(t).dom.documentElement)},Sr=function(t){return me.fromDom(xr(t).dom.defaultView)},kr=function(t){return st.from(t.dom.parentNode).map(me.fromDom)},Cr=kr,Or=function(t){return st.from(t.dom.offsetParent).map(me.fromDom)},_r=function(t){return V(t.dom.childNodes,me.fromDom)},Tr=function(t,n){var e=t.dom.childNodes;return st.from(e[n]).map(me.fromDom)},Er=function(n,e){kr(n).each(function(t){t.dom.insertBefore(e.dom,n.dom)})},Dr=function(t,n){var e;(e=t,st.from(e.dom.nextSibling).map(me.fromDom)).fold(function(){kr(t).each(function(t){Ar(t,n)})},function(t){Er(t,n)})},Br=function(n,e){Tr(n,0).fold(function(){Ar(n,e)},function(t){n.dom.insertBefore(e.dom,t.dom)})},Ar=function(t,n){t.dom.appendChild(n.dom)},Mr=function(n,t){lt(t,function(t){Ar(n,t)})},Fr=function(t){t.dom.textContent="",lt(_r(t),function(t){Ir(t)})},Ir=function(t){var n=t.dom;null!==n.parentNode&&n.parentNode.removeChild(n)},Rr=function(t){var n,e=_r(t);0<e.length&&(n=t,lt(e,function(t){Er(n,t)})),Ir(t)},Vr=function(t){return t.dom.innerHTML},Pr=function(t,n){var e,o,r=yr(t).dom,i=me.fromDom(r.createDocumentFragment()),u=(e=n,(o=(r||document).createElement("div")).innerHTML=e,_r(me.fromDom(o)));Mr(i,u),Fr(t),Ar(t,i)},Hr=function(t,n,e){if(!(k(e)||O(e)||ut(e)))throw console.error("Invalid call to Attribute.set. Key ",n,":: Value ",e,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,e+"")},zr=function(t,n,e){Hr(t.dom,n,e)},Nr=function(t,n){var e=t.dom.getAttribute(n);return null===e?undefined:e},Lr=function(t,n){return st.from(Nr(t,n))},jr=function(t,n){var e=t.dom;return!(!e||!e.hasAttribute)&&e.hasAttribute(n)},Ur=function(t,n){t.dom.removeAttribute(n)},Wr=function(t){return n=t,e=!1,me.fromDom(n.dom.cloneNode(e));var n,e},Gr=function(t){var n,e,o,r=Wr(t);return n=r,e=me.fromTag("div"),o=me.fromDom(n.dom.cloneNode(!0)),Ar(e,o),Vr(e)},Xr=Zo([{key:So(),value:Qe({can:function(t,n){var e,o,r=n.event,i=r.originator,u=r.target;return o=u,!(Ge(e=i,t.element)&&!Ge(e,o))||(console.warn(So()+" did not get interpreted by the desired target. \nOriginator: "+Gr(i)+"\nTarget: "+Gr(u)+"\nCheck the "+So()+" event handlers"),!1)}})}]),Yr=/* */Object.freeze({__proto__:null,events:Xr}),qr=0,Kr=function(t){var n=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++qr+String(n)},Jr=at("alloy-id-"),$r=at("data-alloy-id"),Qr=Jr(),Zr=$r(),ti=function(t,n){Object.defineProperty(t.dom,Zr,{value:n,writable:!0})},ni=function(t){var n=pr(t)?t.dom[Zr]:null;return st.from(n)},ei=Kr,oi=ct,ri=function(n){var t=function(t){return function(){throw new Error("The component must be in a context to send: "+t+(n?"\n"+Gr(n().element)+" is not in context.":""))}};return{debugInfo:at("fake"),triggerEvent:t("triggerEvent"),triggerFocus:t("triggerFocus"),triggerEscape:t("triggerEscape"),build:t("build"),addToWorld:t("addToWorld"),removeFromWorld:t("removeFromWorld"),addToGui:t("addToGui"),removeFromGui:t("removeFromGui"),getByUid:t("getByUid"),getByDom:t("getByDom"),broadcast:t("broadcast"),broadcastOn:t("broadcastOn"),broadcastEvent:t("broadcastEvent"),isConnected:c}},ii=ri(),ui=function(t){return V(t,function(t){return Se(t,"/*")?t.substring(0,t.length-"/*".length):t})},ai=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:ui(i)}},t},ci=Kr("alloy-premade"),si=function(t){return Jt(ci,t)},li=function(o){return t=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return o.apply(void 0,S([t.getApis(),t],n))},n=o.toString(),e=n.indexOf(")")+1,r=n.indexOf("("),i=n.substring(r+1,e-1).split(/,\s*/),t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:ui(i.slice(1))}},t;var t,n,e,r,i},fi={init:function(){return di({readState:function(){return"No State required"}})}},di=function(t){return t},mi=function(t,r){var i={};return _t(t,function(t,o){_t(t,function(t,n){var e=Ft(i,n).getOr([]);i[n]=e.concat([r(o,t)])})}),i},gi=function(t){return{classes:t.classes!==undefined?t.classes:[],attributes:t.attributes!==undefined?t.attributes:{},styles:t.styles!==undefined?t.styles:{}}},pi=function(t,n){return{cHandler:y.apply(undefined,[t.handler].concat(n)),purpose:t.purpose}},hi=function(t){return t.cHandler},vi=function(t,n){return{name:t,handler:n}},bi=function(t,n,e){var o,r,i=it(it({},e),(o=t,r={},lt(n,function(t){r[t.name()]=t.handlers(o)}),r));return mi(i,vi)},yi=function(t){var n,i=_(n=t)?{can:at(!0),abort:at(!1),run:n}:n;return function(t,n){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];var r=[t,n].concat(e);i.abort.apply(undefined,r)?n.stop():i.can.apply(undefined,r)&&i.run.apply(undefined,r)}},xi=function(t,n,e){var o,r,i=n[e];return i?function(u,a,t,c){try{var n=Y(t,function(t,n){var e=t[a],o=n[a],r=c.indexOf(e),i=c.indexOf(o);if(-1===r)throw new Error("The ordering for "+u+" does not have an entry for "+e+".\nOrder specified: "+JSON.stringify(c,null,2));if(-1===i)throw new Error("The ordering for "+u+" does not have an entry for "+o+".\nOrder specified: "+JSON.stringify(c,null,2));return r<i?-1:i<r?1:0});return dt.value(n)}catch(e){return dt.error([e])}}("Event: "+e,"name",t,i).map(function(t){var n=V(t,function(t){return t.handler});return Ze(n)}):(o=e,r=t,dt.error(["The event ("+o+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(V(r,function(t){return t.name}),null,2)]))},wi=function(t,i){var n=Bt(t,function(o,r){return(1===o.length?dt.value(o[0].handler):xi(o,i,r)).map(function(t){var n=yi(t),e=1<o.length?H(i[r],function(n){return F(o,function(t){return t.name===n})}).join(" > "):o[0].name;return Jt(r,{handler:n,purpose:e})})});return Qt(n,{})},Si="alloy.base.behaviour",ki=function(t){var n,e;return _n("custom.definition",fn([bn("dom","dom",Wt(),fn([Ln("tag"),ne("styles",{}),ne("classes",[]),ne("attributes",{}),Kn("value"),Kn("innerHtml")])),Ln("components"),Ln("uid"),ne("events",{}),ne("apis",{}),bn("eventOrder","eventOrder",((n={})[_o()]=["disabling",Si,"toggling","typeaheadevents"],n[So()]=[Si,"focusing","keying"],n[Mo()]=[Si,"disabling","toggling","representing"],n[po()]=[Si,"representing","streaming","invalidating"],n[Ho()]=[Si,"representing","item-events","tooltipping"],n[io()]=["focusing",Si,"item-type-events"],n[no()]=["focusing",Si,"item-type-events"],n[so()]=["item-type-events","tooltipping"],n[Oo()]=["receiving","reflecting","tooltipping"],e=n,jt.mergeWithThunk(at(e))),Mn()),Kn("domModification")]),t)},Ci=function(t,n){var e=Nr(t,n);return e===undefined||""===e?[]:e.split(" ")},Oi=function(t){return t.dom.classList!==undefined},_i=function(t,n){return r=n,i=Ci(e=t,o="class").concat([r]),zr(e,o,i.join(" ")),!0;var e,o,r,i},Ti=function(t,n){return r=n,0<(i=H(Ci(e=t,o="class"),function(t){return t!==r})).length?zr(e,o,i.join(" ")):Ur(e,o),!1;var e,o,r,i},Ei=function(t,n){Oi(t)?t.dom.classList.add(n):_i(t,n)},Di=function(t){0===(Oi(t)?t.dom.classList:Ci(t,"class")).length&&Ur(t,"class")},Bi=function(t,n){Oi(t)?t.dom.classList.remove(n):Ti(t,n),Di(t)},Ai=function(t,n){return Oi(t)&&t.dom.classList.contains(n)},Mi=function(n,t){lt(t,function(t){Ei(n,t)})},Fi=function(n,t){lt(t,function(t){Bi(n,t)})},Ii=function(t){return t.style!==undefined&&_(t.style.getPropertyValue)},Ri=function(t){return br(t)},Vi=_(Element.prototype.attachShadow)&&_(Node.prototype.getRootNode),Pi=at(Vi),Hi=Vi?function(t){return me.fromDom(t.dom.getRootNode())}:xr,zi=function(t){return Ri(t)?t:me.fromDom(xr(t).dom.body)},Ni=function(t){var n=Hi(t);return Ri(n)?st.some(n):st.none()},Li=function(t){return me.fromDom(t.dom.host)},ji=function(t){return v(t.dom.shadowRoot)},Ui=function(t){var n=hr(t)?t.dom.parentNode:t.dom;if(n===undefined||null===n||null===n.ownerDocument)return!1;var e,o,r=n.ownerDocument;return Ni(me.fromDom(n)).fold(function(){return r.body.contains(n)},(e=Ui,o=Li,function(t){return e(o(t))}))},Wi=function(){return Gi(me.fromDom(document))},Gi=function(t){var n=t.dom.body;if(null===n||n===undefined)throw new Error("Body is not available yet");return me.fromDom(n)},Xi=function(t,n,e){if(!k(e))throw console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Ii(t)&&t.style.setProperty(n,e)},Yi=function(t,n){Ii(t)&&t.style.removeProperty(n)},qi=function(t,n,e){var o=t.dom;Xi(o,n,e)},Ki=function(t,n){var e=t.dom;_t(n,function(t,n){Xi(e,n,t)})},Ji=function(t,n){var e=t.dom;_t(n,function(t,n){t.fold(function(){Yi(e,n)},function(t){Xi(e,n,t)})})},$i=function(t,n){var e=t.dom,o=window.getComputedStyle(e).getPropertyValue(n);return""!==o||Ui(t)?o:Qi(e,n)},Qi=function(t,n){return Ii(t)?t.style.getPropertyValue(n):""},Zi=function(t,n){var e=t.dom,o=Qi(e,n);return st.from(o).filter(function(t){return 0<t.length})},tu=function(t,n,e){var o=me.fromTag(t);return qi(o,n,e),Zi(o,n).isSome()},nu=function(t,n){var e=t.dom;Yi(e,n),Lr(t,"style").map(ke).is("")&&Ur(t,"style")},eu=function(t){return t.dom.offsetWidth},ou=function(t){return t.dom.value},ru=function(t,n){if(n===undefined)throw new Error("Value.set was undefined");t.dom.value=n},iu=function(t){var n,e,o,r=me.fromTag(t.tag);n=r,e=t.attributes,o=n.dom,_t(e,function(t,n){Hr(o,n,t)}),Mi(r,t.classes),Ki(r,t.styles),t.innerHtml.each(function(t){return Pr(r,t)});var i=t.domChildren;return Mr(r,i),t.value.each(function(t){ru(r,t)}),t.uid,ti(r,t.uid),r},uu=function(t,n){return e=t,r=V(o=n,function(t){return te(t.name(),[Ln("config"),ne("state",fi)])}),i=_n("component.behaviours",fn(r),e.behaviours).fold(function(t){throw new Error(Dn(t)+"\nComplete spec:\n"+JSON.stringify(e,null,2))},function(t){return t}),{list:o,data:Tt(i,function(t){var n=t.map(function(t){return{config:t.config,state:t.state.init(t.config)}});return function(){return n}})};var e,o,r,i},au=function(t){var n,e,o=(n=Ft(t,"behaviours").getOr({}),e=H(Ct(n),function(t){return n[t]!==undefined}),V(e,function(t){return n[t].me}));return uu(t,o)},cu=function(t,n,e){var o,r,i,u=it(it({},(o=t).dom),{uid:o.uid,domChildren:V(o.components,function(t){return t.element})}),a=t.domModification.fold(function(){return gi({})},gi),c={"alloy.base.modification":a},s=0<n.length?function(n,t,e,o){var r=it({},t);lt(e,function(t){r[t.name()]=t.exhibit(n,o)});var i=mi(r,function(t,n){return{name:t,modification:n}}),u=function(t){return z(t,function(t,n){return it(it({},n.modification),t)},{})},a=z(i.classes,function(t,n){return n.modification.concat(t)},[]),c=u(i.attributes),s=u(i.styles);return gi({classes:a,attributes:c,styles:s})}(e,c,n,u):a;return i=s,it(it({},r=u),{attributes:it(it({},r.attributes),i.attributes),styles:it(it({},r.styles),i.styles),classes:r.classes.concat(i.classes)})},su=function(t,n,e){var o,r,i,u={"alloy.base.behaviour":t.events};return o=e,r=t.eventOrder,i=bi(o,n,u),wi(i,r).getOrDie()},lu=function(t){var n,e,o,r,i,u,a,c,s,l,f,d,m,g=oi(t),p=g.events,h=w(g,["events"]),v=(n=Ft(h,"components").getOr([]),V(n,gu)),b=it(it({},h),{events:it(it({},Yr),p),components:v});return dt.value((o=function(){return m},r=fe(ii),i=Tn(ki(e=b)),u=au(e),a=u.list,c=u.data,s=cu(i,a,c),l=iu(s),f=su(i,a,c),d=fe(i.components),m={getSystem:r.get,config:function(t){var n=c;return(_(n[t.name()])?n[t.name()]:function(){throw new Error("Could not find "+t.name()+" in "+JSON.stringify(e,null,2))})()},hasConfigured:function(t){return _(c[t.name()])},spec:e,readState:function(t){return c[t]().map(function(t){return t.state.readState()}).getOr("not enabled")},getApis:function(){return i.apis},connect:function(t){r.set(t)},disconnect:function(){r.set(ri(o))},element:l,syncComponents:function(){var t=_r(l),n=U(t,function(t){return r.get().getByDom(t).fold(function(){return[]},function(t){return[t]})});d.set(n)},components:d.get,events:f}))},fu=function(t){var n=me.fromText(t);return du({element:n})},du=function(t){var n=En("external.component",ln([Ln("element"),Kn("uid")]),t),e=fe(ri());n.uid.each(function(t){ti(n.element,t)});var o={getSystem:e.get,config:st.none,hasConfigured:c,connect:function(t){e.set(t)},disconnect:function(){e.set(ri(function(){return o}))},getApis:function(){return{}},element:n.element,spec:t,readState:at("No state"),syncComponents:$,components:at([]),events:{}};return si(o)},mu=ei,gu=function(n){return Ft(n,ci).fold(function(){var t=n.hasOwnProperty("uid")?n:it({uid:mu("")},n);return lu(t).getOrDie()},function(t){return t})},pu=si;function hu(o,r){var t=function(t){var n=r(t);if(n<=0||null===n){var e=$i(t,o);return parseFloat(e)||0}return n},i=function(r,t){return N(t,function(t,n){var e=$i(r,n),o=e===undefined?0:parseInt(e,10);return isNaN(o)?t:t+o},0)};return{set:function(t,n){if(!ut(n)&&!n.match(/^[0-9]+$/))throw new Error(o+".set accepts only positive integer values. Value was "+n);var e=t.dom;Ii(e)&&(e.style[o]=n+"px")},get:t,getOuter:t,aggregate:i,max:function(t,n,e){var o=i(t,e);return o<n?n-o:0}}}var vu=hu("height",function(t){var n=t.dom;return Ui(t)?n.getBoundingClientRect().height:n.offsetHeight}),bu=function(t){return vu.get(t)},yu=function(t){return vu.getOuter(t)},xu=function(e,o){return{left:e,top:o,translate:function(t,n){return xu(e+t,o+n)}}},wu=xu,Su=function(t,n){return t!==undefined?t:n!==undefined?n:0},ku=function(t){var n=t.dom.ownerDocument,e=n.body,o=n.defaultView,r=n.documentElement;if(e===t.dom)return wu(e.offsetLeft,e.offsetTop);var i=Su(null==o?void 0:o.pageYOffset,r.scrollTop),u=Su(null==o?void 0:o.pageXOffset,r.scrollLeft),a=Su(r.clientTop,e.clientTop),c=Su(r.clientLeft,e.clientLeft);return Cu(t).translate(u-c,i-a)},Cu=function(t){var n,e=t.dom,o=e.ownerDocument.body;return o===e?wu(o.offsetLeft,o.offsetTop):Ui(t)?(n=e.getBoundingClientRect(),wu(n.left,n.top)):wu(0,0)},Ou=hu("width",function(t){return t.dom.offsetWidth}),_u=function(t){return Ou.get(t)},Tu=function(t){return Ou.getOuter(t)},Eu=function(t){var n=me.fromDom(function(t){if(Pi()&&v(t.target)){var n=me.fromDom(t.target);if(pr(n)&&ji(n)&&t.composed&&t.composedPath){var e=t.composedPath();if(e)return K(e)}}return st.from(t.target)}(t).getOr(t.target)),e=function(){return t.stopPropagation()},o=function(){return t.preventDefault()},r=i(o,e);return{target:n,x:t.clientX,y:t.clientY,stop:e,prevent:o,kill:r,raw:t}},Du=function(t,n,e,o,r){var i,u,a=(i=e,u=o,function(t){i(t)&&u(Eu(t))});return t.dom.addEventListener(n,a,r),{unbind:y(Bu,t,n,a,r)}},Bu=function(t,n,e,o){t.dom.removeEventListener(n,e,o)},Au=function(t){var n=t!==undefined?t.dom:document,e=n.body.scrollLeft||n.documentElement.scrollLeft,o=n.body.scrollTop||n.documentElement.scrollTop;return wu(e,o)},Mu=function(t,n,e){var o=(e!==undefined?e.dom:document).defaultView;o&&o.scrollTo(t,n)},Fu=function(t,n,e,o){return{x:t,y:n,width:e,height:o,right:t+e,bottom:n+o}},Iu=function(t){var n,e,o=t===undefined?window:t,r=o.document,i=Au(me.fromDom(r));return e=(n=o)===undefined?window:n,st.from(e.visualViewport).fold(function(){var t=o.document.documentElement,n=t.clientWidth,e=t.clientHeight;return Fu(i.left,i.top,n,e)},function(t){return Fu(Math.max(t.pageLeft,i.left),Math.max(t.pageTop,i.top),t.width,t.height)})},Ru=function(o,t){return o.view(t).fold(at([]),function(t){var n=o.owner(t),e=Ru(o,n);return[t].concat(e)})},Vu=/* */Object.freeze({__proto__:null,view:function(t){var n;return(t.dom===document?st.none():st.from(null===(n=t.dom.defaultView)||void 0===n?void 0:n.frameElement)).map(me.fromDom)},owner:yr}),Pu=function(o){var t,n,e,r,i=me.fromDom(document),u=Au(i);return(t=o,e=(n=Vu).owner(t),r=Ru(n,e),st.some(r)).fold(y(ku,o),function(t){var n=Cu(o),e=z(t,function(t,n){var e=Cu(n);return{left:t.left+e.left,top:t.top+e.top}},{left:0,top:0});return wu(e.left+n.left+u.left,e.top+n.top+u.top)})},Hu=function(t,n,e,o){return{x:t,y:n,width:e,height:o,right:t+e,bottom:n+o}},zu=function(t){var n=ku(t),e=Tu(t),o=yu(t);return Hu(n.left,n.top,e,o)},Nu=function(t){var n=Pu(t),e=Tu(t),o=yu(t);return Hu(n.left,n.top,e,o)},Lu=function(){return Iu(window)};function ju(t,n,e,o,r){return t(e,o)?st.some(e):_(r)&&r(e)?st.none():n(e,o,r)}var Uu,Wu,Gu=function(t,n,e){for(var o=t.dom,r=_(e)?e:c;o.parentNode;){o=o.parentNode;var i=me.fromDom(o);if(n(i))return st.some(i);if(r(i))break}return st.none()},Xu=function(t,n,e){return ju(function(t,n){return n(t)},Gu,t,n,e)},Yu=function(t,n,e){return Xu(t,n,e).isSome()},qu=function(t,n,e){return Gu(t,function(t){return Ue(t,n)},e)},Ku=function(t,n){return e=n,r=(o=t)===undefined?document:o.dom,We(r)?st.none():st.from(r.querySelector(e)).map(me.fromDom);var e,o,r},Ju=function(t,n,e){return ju(Ue,qu,t,n,e)},$u=function(){var n=Kr("aria-owns");return{id:n,link:function(t){zr(t,"aria-owns",n)},unlink:function(t){Ur(t,"aria-owns")}}},Qu=function(n,t){return Xu(t,function(t){if(!pr(t))return!1;var n=Nr(t,"id");return n!==undefined&&-1<n.indexOf("aria-owns")}).bind(function(t){var n=Nr(t,"id"),e=Hi(t);return Ku(e,'[aria-owns="'+n+'"]')}).exists(function(t){return Zu(n,t)})},Zu=function(n,t){return Yu(t,function(t){return Ge(t,n.element)},c)||Qu(n,t)},ta="unknown";(Wu=Uu=Uu||{})[Wu.STOP=0]="STOP",Wu[Wu.NORMAL=1]="NORMAL",Wu[Wu.LOGGING=2]="LOGGING";var na,ea,oa=fe({}),ra=["alloy/data/Fields","alloy/debugging/Debugging"],ia=function(n,t,e){var o,r,i,u;switch(Ft(oa.get(),n).orThunk(function(){var t=Ct(oa.get());return Z(t,function(t){return-1<n.indexOf(t)?st.some(oa.get()[t]):st.none()})}).getOr(Uu.NORMAL)){case Uu.NORMAL:return e(ua());case Uu.LOGGING:var a=(o=n,r=t,i=[],u=(new Date).getTime(),{logEventCut:function(t,n,e){i.push({outcome:"cut",target:n,purpose:e})},logEventStopped:function(t,n,e){i.push({outcome:"stopped",target:n,purpose:e})},logNoParent:function(t,n,e){i.push({outcome:"no-parent",target:n,purpose:e})},logEventNoHandlers:function(t,n){i.push({outcome:"no-handlers-left",target:n})},logEventResponse:function(t,n,e){i.push({outcome:"response",purpose:e,target:n})},write:function(){var t=(new Date).getTime();M(["mousemove","mouseover","mouseout",Mo()],o)||console.log(o,{event:o,time:t-u,target:r.dom,sequence:V(i,function(t){return M(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+Gr(t.target)+")":t.outcome})})}}),c=e(a);return a.write(),c;case Uu.STOP:return!0}},ua=at({logEventCut:$,logEventStopped:$,logNoParent:$,logEventNoHandlers:$,logEventResponse:$,write:$}),aa=at([Ln("menu"),Ln("selectedMenu")]),ca=at([Ln("item"),Ln("selectedItem")]),sa=(at(fn(ca().concat(aa()))),at(fn(ca()))),la=Xn("initSize",[Ln("numColumns"),Ln("numRows")]),fa=function(){return Xn("markers",[Ln("backgroundMenu")].concat(aa()).concat(ca()))},da=function(t){return Xn("markers",V(t,Ln))},ma=function(t,n,e){!function(){var t=new Error;if(t.stack===undefined)return;var n=t.stack.split("\n");L(n,function(n){return 0<n.indexOf("alloy")&&!F(ra,function(t){return-1<n.indexOf(t)})}).getOr(ta)}();return bn(n,n,e,Cn(function(e){return dt.value(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.apply(undefined,t)})}))},ga=function(t){return ma(0,t,Ut($))},pa=function(t){return ma(0,t,Ut(st.none))},ha=function(t){return ma(0,t,Wt())},va=function(t){return ma(0,t,Wt())},ba=function(t,n){return le(t,at(n))},ya=function(t){return le(t,ct)},xa=at(la),wa=function(t,n,e,o,r,i){return{x:t,y:n,bubble:e,direction:o,boundsRestriction:r,label:i}},Sa=Vt([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),ka=Sa.southeast,Ca=Sa.southwest,Oa=Sa.northeast,_a=Sa.northwest,Ta=Sa.south,Ea=Sa.north,Da=Sa.east,Ba=Sa.west,Aa=function(n,e){return function(t,n){for(var e={},o=0,r=t.length;o<r;o++){var i=t[o];e[String(i)]=n(i,o)}return e}(["left","right","top","bottom"],function(t){return Ft(e,t).map(function(t){return function(t,n){switch(n){case 1:return t.x;case 0:return t.x+t.width;case 2:return t.y;case 3:return t.y+t.height}}(n,t)})})},Ma=function(t){return t.x},Fa=function(t,n){return t.x+t.width/2-n.width/2},Ia=function(t,n){return t.x+t.width-n.width},Ra=function(t,n){return t.y-n.height},Va=function(t){return t.y+t.height},Pa=function(t,n){return t.y+t.height/2-n.height/2},Ha=function(t,n,e){return wa(Ma(t),Va(t),e.southeast(),ka(),Aa(t,{left:1,top:3}),"layout-se")},za=function(t,n,e){return wa(Ia(t,n),Va(t),e.southwest(),Ca(),Aa(t,{right:0,top:3}),"layout-sw")},Na=function(t,n,e){return wa(Ma(t),Ra(t,n),e.northeast(),Oa(),Aa(t,{left:1,bottom:2}),"layout-ne")},La=function(t,n,e){return wa(Ia(t,n),Ra(t,n),e.northwest(),_a(),Aa(t,{right:0,bottom:2}),"layout-nw")},ja=function(t,n,e){return wa(Fa(t,n),Ra(t,n),e.north(),Ea(),Aa(t,{bottom:2}),"layout-n")},Ua=function(t,n,e){return wa(Fa(t,n),Va(t),e.south(),Ta(),Aa(t,{top:3}),"layout-s")},Wa=function(t,n,e){return wa((o=t).x+o.width,Pa(t,n),e.east(),Da(),Aa(t,{left:0}),"layout-e");var o},Ga=function(t,n,e){return wa((o=n,t.x-o.width),Pa(t,n),e.west(),Ba(),Aa(t,{right:1}),"layout-w");var o},Xa=function(){return[Ha,za,Na,La,Ua,ja,Wa,Ga]},Ya=function(){return[za,Ha,La,Na,Ua,ja,Wa,Ga]},qa=function(){return[Na,La,Ha,za,ja,Ua]},Ka=function(){return[La,Na,za,Ha,ja,Ua]},Ja=function(){return[Ha,za,Na,La,Ua,ja]},$a=function(){return[za,Ha,La,Na,Ua,ja]},Qa=/* */Object.freeze({__proto__:null,events:function(c){return Zo([er(Oo(),function(r,t){var n,e,i=c.channels,o=Ct(i),u=t,a=(n=o,(e=u).universal?n:H(n,function(t){return M(e.channels,t)}));lt(a,function(t){var n=i[t],e=n.schema,o=En("channel["+t+"] data\nReceiver: "+Gr(r.element),e,u.data);n.onReceive(r,o)})})])}}),Za=[jn("channels",On(dt.value,ln([ha("onReceive"),ne("schema",Mn())])))],tc=function(e,o,r){return fr(function(t,n){r(t,e,o)})},nc=function(t,n,e,o,r,i){var u=ln(t),a=te(n,[Jn("config",ln(t))]);return rc(u,a,n,e,o,r,i)},ec=function(r,i,u){var t,n,e,o,a,c;return t=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=[e].concat(t);return e.config({name:at(r)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+r+". Using API: "+u)},function(t){var n=Array.prototype.slice.call(o,1);return i.apply(undefined,[e,t.config,t.state].concat(n))})},n=u,e=i.toString(),o=e.indexOf(")")+1,a=e.indexOf("("),c=e.substring(a+1,o-1).split(/,\s*/),t.toFunctionAnnotation=function(){return{name:n,parameters:ui(c.slice(0,1).concat(c.slice(3)))}},t},oc=function(t){return{key:t,value:undefined}},rc=function(e,t,o,r,n,i,u){var a=function(t){return Rt(t,o)?t[o]():st.none()},c=Tt(n,function(t,n){return ec(o,t,n)}),s=Tt(i,ai),l=it(it(it({},s),c),{revoke:y(oc,o),config:function(t){var n=En(o+"-config",e,t);return{key:o,value:{config:n,me:l,configAsRaw:Lt(function(){return En(o+"-config",e,t)}),initialConfig:t,state:u}}},schema:function(){return t},exhibit:function(t,e){return a(t).bind(function(n){return Ft(r,"exhibit").map(function(t){return t(e,n.config,n.state)})}).getOr(gi({}))},name:function(){return o},handlers:function(t){return a(t).map(function(t){return Ft(r,"events").getOr(function(){return{}})(t.config,t.state)}).getOr({})}});return l},ic=$t,uc=ln([Ln("fields"),Ln("name"),ne("active",{}),ne("apis",{}),ne("state",fi),ne("extra",{})]),ac=function(t){var n=En("Creating behaviour: "+t.name,uc,t);return nc(n.fields,n.name,n.active,n.apis,n.extra,n.state)},cc=ln([Ln("branchKey"),Ln("branches"),Ln("name"),ne("active",{}),ne("apis",{}),ne("state",fi),ne("extra",{})]),sc=function(t){var n,e,o,r,i,u,a,c,s=En("Creating behaviour: "+t.name,cc,t);return n=An(s.branchKey,s.branches),e=s.name,o=s.active,r=s.apis,i=s.extra,u=s.state,c=te(e,[Jn("config",a=n)]),rc(a,c,e,o,r,i,u)},lc=at(undefined),fc=ac({fields:Za,name:"receiving",active:Qa}),dc=/* */Object.freeze({__proto__:null,exhibit:function(t,n){return gi({classes:[],styles:n.useFixed()?{}:{position:"relative"}})}}),mc=function(t){return t.dom.focus()},gc=function(t){return void 0===t&&(t=me.fromDom(document)),st.from(t.dom.activeElement).map(me.fromDom)},pc=function(n){return gc(Hi(n)).filter(function(t){return n.dom.contains(t.dom)})},hc=function(t,e){var o=Hi(e),n=gc(o).bind(function(n){var r,i,t=function(t){return Ge(n,t)};return t(e)?st.some(e):(r=t,(i=function(t){for(var n=0;n<t.childNodes.length;n++){var e=me.fromDom(t.childNodes[n]);if(r(e))return st.some(e);var o=i(t.childNodes[n]);if(o.isSome())return o}return st.none()})(e.dom))}),r=t(e);return n.each(function(n){gc(o).filter(function(t){return Ge(t,n)}).fold(function(){mc(n)},$)}),r},vc=function(t,n,e,o,r){return{position:t,left:n,top:e,right:o,bottom:r}},bc=function(t,n){var e=function(t){return t+"px"};Ji(t,{position:st.some(n.position),left:n.left.map(e),top:n.top.map(e),right:n.right.map(e),bottom:n.bottom.map(e)})},yc=Vt([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),xc=function(t,n,e,o,r,i){var u,a,c,s,l,f,d,m,g,p=n.x-e,h=n.y-o,v=r-(p+n.width),b=i-(h+n.height),y=st.some(p),x=st.some(h),w=st.some(v),S=st.some(b),k=st.none();return u=n.direction,a=function(){return vc(t,y,x,k,k)},c=function(){return vc(t,k,x,w,k)},s=function(){return vc(t,y,k,k,S)},l=function(){return vc(t,k,k,w,S)},f=function(){return vc(t,y,x,k,k)},d=function(){return vc(t,y,k,k,S)},m=function(){return vc(t,y,x,k,k)},g=function(){return vc(t,k,x,w,k)},u.fold(a,c,s,l,f,d,m,g)},wc=function(t,n){var e=y(Pu,n),o=t.fold(e,e,function(){var t=Au();return Pu(n).translate(-t.left,-t.top)}),r=Tu(n),i=yu(n);return Hu(o.left,o.top,r,i)},Sc=function(t,n,e){var o=wu(n,e);return t.fold(at(o),at(o),function(){var t=Au();return o.translate(-t.left,-t.top)})},kc=(yc.none,yc.relative),Cc=yc.fixed,Oc=function(t,n,e,o){var r=t+n;return o<r?e:r<e?o:r},_c=function(t,n,e){return Math.min(Math.max(t,n),e)},Tc=Vt([{fit:["reposition"]},{nofit:["reposition","deltaW","deltaH"]}]),Ec=function(t,n,e,o){var r,i,u,a,c,s,l,f,d,m,g,p,h,v,b,y,x,w,S,k,C,O,_,T,E,D,B,A,M,F,I,R,V,P=t.x,H=t.y,z=t.bubble.offset,N=z.left,L=z.top,j=(r=o,i=t.boundsRestriction,u=z,c=(a=function(n,e){var o="top"===n||"bottom"===n?u.top:u.left;return Ft(i,n).bind(ct).bind(function(t){return"left"===n||"top"===n?e<=t?st.some(t):st.none():t<=e?st.some(t):st.none()}).map(function(t){return t+o}).getOr(e)})("left",r.x),s=a("top",r.y),l=a("right",r.right),f=a("bottom",r.bottom),Hu(c,s,l