wysiwyg-rails 4.0.8 → 4.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/froala_editor.min.js +3 -3
  3. data/app/assets/javascripts/froala_editor.pkgd.min.js +3 -3
  4. data/app/assets/javascripts/languages/ar.js +2 -2
  5. data/app/assets/javascripts/languages/bs.js +2 -2
  6. data/app/assets/javascripts/languages/cs.js +2 -2
  7. data/app/assets/javascripts/languages/da.js +2 -2
  8. data/app/assets/javascripts/languages/de.js +2 -2
  9. data/app/assets/javascripts/languages/el.js +2 -2
  10. data/app/assets/javascripts/languages/en_ca.js +2 -2
  11. data/app/assets/javascripts/languages/en_gb.js +2 -2
  12. data/app/assets/javascripts/languages/es.js +2 -2
  13. data/app/assets/javascripts/languages/et.js +2 -2
  14. data/app/assets/javascripts/languages/fa.js +2 -2
  15. data/app/assets/javascripts/languages/fi.js +2 -2
  16. data/app/assets/javascripts/languages/fr.js +2 -2
  17. data/app/assets/javascripts/languages/he.js +2 -2
  18. data/app/assets/javascripts/languages/hr.js +2 -2
  19. data/app/assets/javascripts/languages/hu.js +2 -2
  20. data/app/assets/javascripts/languages/id.js +2 -2
  21. data/app/assets/javascripts/languages/it.js +2 -2
  22. data/app/assets/javascripts/languages/ja.js +2 -2
  23. data/app/assets/javascripts/languages/ko.js +2 -2
  24. data/app/assets/javascripts/languages/ku.js +2 -2
  25. data/app/assets/javascripts/languages/me.js +2 -2
  26. data/app/assets/javascripts/languages/nb.js +2 -2
  27. data/app/assets/javascripts/languages/nl.js +2 -2
  28. data/app/assets/javascripts/languages/pl.js +2 -2
  29. data/app/assets/javascripts/languages/pt_br.js +2 -2
  30. data/app/assets/javascripts/languages/pt_pt.js +2 -2
  31. data/app/assets/javascripts/languages/ro.js +2 -2
  32. data/app/assets/javascripts/languages/ru.js +2 -2
  33. data/app/assets/javascripts/languages/sk.js +2 -2
  34. data/app/assets/javascripts/languages/sl.js +2 -2
  35. data/app/assets/javascripts/languages/sr.js +2 -2
  36. data/app/assets/javascripts/languages/sv.js +2 -2
  37. data/app/assets/javascripts/languages/th.js +2 -2
  38. data/app/assets/javascripts/languages/tr.js +2 -2
  39. data/app/assets/javascripts/languages/uk.js +2 -2
  40. data/app/assets/javascripts/languages/vi.js +2 -2
  41. data/app/assets/javascripts/languages/zh_cn.js +2 -2
  42. data/app/assets/javascripts/languages/zh_tw.js +2 -2
  43. data/app/assets/javascripts/plugins/align.min.js +2 -2
  44. data/app/assets/javascripts/plugins/char_counter.min.js +2 -2
  45. data/app/assets/javascripts/plugins/code_beautifier.min.js +2 -2
  46. data/app/assets/javascripts/plugins/code_view.min.js +2 -2
  47. data/app/assets/javascripts/plugins/colors.min.js +2 -2
  48. data/app/assets/javascripts/plugins/cryptojs.min.js +2 -2
  49. data/app/assets/javascripts/plugins/draggable.min.js +2 -2
  50. data/app/assets/javascripts/plugins/edit_in_popup.min.js +2 -2
  51. data/app/assets/javascripts/plugins/emoticons.min.js +2 -2
  52. data/app/assets/javascripts/plugins/entities.min.js +2 -2
  53. data/app/assets/javascripts/plugins/file.min.js +2 -2
  54. data/app/assets/javascripts/plugins/files_manager.min.js +3 -3
  55. data/app/assets/javascripts/plugins/font_family.min.js +2 -2
  56. data/app/assets/javascripts/plugins/font_size.min.js +2 -2
  57. data/app/assets/javascripts/plugins/forms.min.js +2 -2
  58. data/app/assets/javascripts/plugins/fullscreen.min.js +2 -2
  59. data/app/assets/javascripts/plugins/help.min.js +2 -2
  60. data/app/assets/javascripts/plugins/image.min.js +3 -3
  61. data/app/assets/javascripts/plugins/image_manager.min.js +2 -2
  62. data/app/assets/javascripts/plugins/inline_class.min.js +2 -2
  63. data/app/assets/javascripts/plugins/inline_style.min.js +2 -2
  64. data/app/assets/javascripts/plugins/line_breaker.min.js +2 -2
  65. data/app/assets/javascripts/plugins/line_height.min.js +3 -3
  66. data/app/assets/javascripts/plugins/link.min.js +3 -3
  67. data/app/assets/javascripts/plugins/lists.min.js +2 -2
  68. data/app/assets/javascripts/plugins/markdown.min.js +3 -3
  69. data/app/assets/javascripts/plugins/paragraph_format.min.js +2 -2
  70. data/app/assets/javascripts/plugins/paragraph_style.min.js +2 -2
  71. data/app/assets/javascripts/plugins/print.min.js +2 -2
  72. data/app/assets/javascripts/plugins/quick_insert.min.js +2 -2
  73. data/app/assets/javascripts/plugins/quote.min.js +3 -3
  74. data/app/assets/javascripts/plugins/save.min.js +2 -2
  75. data/app/assets/javascripts/plugins/special_characters.min.js +2 -2
  76. data/app/assets/javascripts/plugins/table.min.js +3 -3
  77. data/app/assets/javascripts/plugins/track_changes.min.js +3 -3
  78. data/app/assets/javascripts/plugins/trim_video.min.js +2 -2
  79. data/app/assets/javascripts/plugins/url.min.js +2 -2
  80. data/app/assets/javascripts/plugins/video.min.js +3 -3
  81. data/app/assets/javascripts/plugins/word_paste.min.js +3 -3
  82. data/app/assets/javascripts/plugins.pkgd.min.js +3 -3
  83. data/app/assets/javascripts/third_party/embedly.min.js +2 -2
  84. data/app/assets/javascripts/third_party/font_awesome.min.js +2 -2
  85. data/app/assets/javascripts/third_party/image_tui.min.js +2 -2
  86. data/app/assets/javascripts/third_party/showdown.min.js +3 -3
  87. data/app/assets/javascripts/third_party/spell_checker.min.js +2 -2
  88. data/app/assets/stylesheets/froala_editor.css +10 -6
  89. data/app/assets/stylesheets/froala_editor.min.css +3 -3
  90. data/app/assets/stylesheets/froala_editor.pkgd.css +12 -13
  91. data/app/assets/stylesheets/froala_editor.pkgd.min.css +3 -3
  92. data/app/assets/stylesheets/froala_style.css +4 -2
  93. data/app/assets/stylesheets/froala_style.min.css +3 -3
  94. data/app/assets/stylesheets/plugins/char_counter.css +2 -2
  95. data/app/assets/stylesheets/plugins/char_counter.min.css +2 -2
  96. data/app/assets/stylesheets/plugins/code_view.css +2 -2
  97. data/app/assets/stylesheets/plugins/code_view.min.css +2 -2
  98. data/app/assets/stylesheets/plugins/colors.css +2 -2
  99. data/app/assets/stylesheets/plugins/colors.min.css +2 -2
  100. data/app/assets/stylesheets/plugins/draggable.css +2 -2
  101. data/app/assets/stylesheets/plugins/draggable.min.css +2 -2
  102. data/app/assets/stylesheets/plugins/emoticons.css +2 -2
  103. data/app/assets/stylesheets/plugins/emoticons.min.css +2 -2
  104. data/app/assets/stylesheets/plugins/file.css +2 -2
  105. data/app/assets/stylesheets/plugins/file.min.css +2 -2
  106. data/app/assets/stylesheets/plugins/files_manager.css +2 -2
  107. data/app/assets/stylesheets/plugins/files_manager.min.css +2 -2
  108. data/app/assets/stylesheets/plugins/fullscreen.css +2 -2
  109. data/app/assets/stylesheets/plugins/fullscreen.min.css +2 -2
  110. data/app/assets/stylesheets/plugins/help.css +2 -2
  111. data/app/assets/stylesheets/plugins/help.min.css +2 -2
  112. data/app/assets/stylesheets/plugins/image.css +2 -2
  113. data/app/assets/stylesheets/plugins/image.min.css +2 -2
  114. data/app/assets/stylesheets/plugins/image_manager.css +2 -2
  115. data/app/assets/stylesheets/plugins/image_manager.min.css +2 -2
  116. data/app/assets/stylesheets/plugins/line_breaker.css +2 -2
  117. data/app/assets/stylesheets/plugins/line_breaker.min.css +2 -2
  118. data/app/assets/stylesheets/plugins/markdown.css +2 -2
  119. data/app/assets/stylesheets/plugins/markdown.min.css +2 -2
  120. data/app/assets/stylesheets/plugins/quick_insert.css +2 -2
  121. data/app/assets/stylesheets/plugins/quick_insert.min.css +2 -2
  122. data/app/assets/stylesheets/plugins/special_characters.css +2 -2
  123. data/app/assets/stylesheets/plugins/special_characters.min.css +2 -2
  124. data/app/assets/stylesheets/plugins/table.css +2 -9
  125. data/app/assets/stylesheets/plugins/table.min.css +3 -3
  126. data/app/assets/stylesheets/plugins/trim_video.css +2 -2
  127. data/app/assets/stylesheets/plugins/trim_video.min.css +2 -2
  128. data/app/assets/stylesheets/plugins/video.css +2 -2
  129. data/app/assets/stylesheets/plugins/video.min.css +2 -2
  130. data/app/assets/stylesheets/plugins.pkgd.css +2 -9
  131. data/app/assets/stylesheets/plugins.pkgd.min.css +3 -3
  132. data/app/assets/stylesheets/themes/dark.css +4 -14
  133. data/app/assets/stylesheets/themes/dark.min.css +3 -3
  134. data/app/assets/stylesheets/themes/gray.css +4 -14
  135. data/app/assets/stylesheets/themes/gray.min.css +3 -3
  136. data/app/assets/stylesheets/themes/royal.css +4 -14
  137. data/app/assets/stylesheets/themes/royal.min.css +3 -3
  138. data/app/assets/stylesheets/third_party/embedly.css +2 -2
  139. data/app/assets/stylesheets/third_party/embedly.min.css +2 -2
  140. data/app/assets/stylesheets/third_party/font_awesome.css +2 -2
  141. data/app/assets/stylesheets/third_party/font_awesome.min.css +2 -2
  142. data/app/assets/stylesheets/third_party/image_tui.css +2 -2
  143. data/app/assets/stylesheets/third_party/image_tui.min.css +2 -2
  144. data/app/assets/stylesheets/third_party/spell_checker.css +2 -2
  145. data/app/assets/stylesheets/third_party/spell_checker.min.css +2 -2
  146. data/lib/wysiwyg-rails/version.rb +1 -1
  147. metadata +2 -2
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v4.0.8 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v4.0.11 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2021 Froala Labs
4
+ * Copyright 2014-2022 Froala Labs
5
5
  */
6
6
 
7
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(w){"use strict";w=w&&w.hasOwnProperty("default")?w["default"]:w,Object.assign(w.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height","list-style-type"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),w.PLUGINS.wordPaste=function(N){var l,n,d=N.$,s="word_paste",u={};function t(e){var t=N.opts.wordAllowedStyleProps;e||(N.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=a(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var r="",i=0;i++<t.length;)r+="&nbsp;";return r}),N.paste.getRtfClipboard());var r=N.doc.createElement("DIV");r.innerHTML=n,N.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=N.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){N.modals.hide(s)}(),N.paste.clean(n,!0,!0),N.opts.wordAllowedStyleProps=t}function C(e){e.parentNode&&e.parentNode.removeChild(e)}function p(e,t){if(t(e))for(var r=e.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,p(i,t),i.previousSibling||i.nextSibling||i.parentNode||!r||n===r.previousSibling||!r.parentNode?i.previousSibling||i.nextSibling||i.parentNode||!r||r.previousSibling||r.nextSibling||r.parentNode||(n?r=n.nextSibling?n.nextSibling.nextSibling:null:e.firstChild&&(r=e.firstChild.nextSibling)):r=n?n.nextSibling:e.firstChild}}function H(e){if(!e.getAttribute("style")||!/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!e.querySelector('[style="mso-list:Ignore"]'))return!!(e.outerHTML&&0<=e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(t){return!1}return!0}function O(e){return e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function I(e,i){var t=e.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)){var r=document.createElement(e.tagName.toLowerCase());r.setAttribute("style",e.getAttribute("style")),r.innerHTML=t.innerHTML,t.innerHTML=r.outerHTML}p(t,function(e){if(e.nodeType==Node.COMMENT_NODE&&(N.browser.msie||N.browser.safari||N.browser.edge))try{if("[if !supportLists]"===e.data){for(e=e.nextSibling;e&&e.nodeType!==Node.COMMENT_NODE;){var t=e.nextSibling;e.parentNode.removeChild(e),e=t}e&&e.nodeType==Node.COMMENT_NODE&&e.parentNode.removeChild(e)}}catch(r){}return e.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===e.getAttribute("style")&&e.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===e.getAttribute("style")&&e.parentNode.removeChild(e),e.setAttribute("style",function n(e){var r="",i=e.getAttribute("style");i&&["line-height","font-family","font-size","color","background"].forEach(function(e){var t=i.match(new RegExp(e+":.*(;|)"));t&&(r+=t[0]+";")});return r}(e)),h(e,i)),!0});var n=t.innerHTML;return n=n.replace(/<!--[\s\S]*?-->/gi,"")}function y(e,t){for(var r=document.createElement(t),i=0;i<e.attributes.length;i++){var n=e.attributes[i].name;r.setAttribute(n,e.getAttribute(n))}return r.innerHTML=e.innerHTML,e.parentNode.replaceChild(r,e),r}function A(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function E(e){return e.replace(/\n|\r|\n\r|&quot;/g,"")}function T(e,t,r){if(t){var i=e.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var n=null;n=r?(i||"")+t:t+(i||""),e.setAttribute("style",n)}}var c=null;function f(e,t,r){for(var i=e.split(r),n=1;n<i.length;n++){var a=i[n];if(1<(a=a.split("shplid")).length){a=a[1];for(var l="",s=0;s<a.length&&"\\"!==a[s]&&"{"!==a[s]&&" "!==a[s]&&"\r"!==a[s]&&"\n"!==a[s];)l+=a[s],s++;var o=a.split("bliptag");if(o&&o.length<2)continue;var d=null;if(-1!==o[0].indexOf("pngblip")?d="image/png":-1!==o[0].indexOf("jpegblip")&&(d="image/jpeg"),!d)continue;var f=o[1].split("}");if(f&&f.length<2)continue;var g=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))g=f[1].split(" ");else{if((g=f[0].split(" "))&&g.length<2)continue;g.shift()}var u=g.join("");c[t+l]={image_hex:u,image_type:d}}}}function m(e,t){if(t){var r;if("IMG"===e.tagName){var i=e.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&N.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(r=u[e.getAttribute("v:shapes")])||(r=e.getAttribute("v:shapes"),e.parentNode&&e.parentNode.parentNode&&0<=e.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(r=null))}else r=e.parentNode.getAttribute("o:spid");if(e.removeAttribute("height"),r){!function s(e){c={},f(e,"i","\\shppict"),f(e,"s","\\shp{")}(t);var n=c[r.substring(7)];if(n){var a=function o(e){for(var t=e.match(/[0-9a-f]{2}/gi),r=[],i=0;i<t.length;i++)r.push(String.fromCharCode(parseInt(t[i],16)));var n=r.join("");return btoa(n)}(n.image_hex),l="data:"+n.image_type+";base64,"+a;"IMG"===e.tagName?(e.src=l,e.setAttribute("data-fr-image-pasted",!0)):d(e.parentNode).before('<img data-fr-image-pasted="true" src="'+l+'" style="'+e.parentNode.getAttribute("style")+'">').remove()}}}}function h(e,t){var r=e.tagName,i=r.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?y(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&y(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return C(e),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],a=0;a<n.length;a++)if(-1!==r.indexOf(n[a]))return e.innerHTML&&(e.outerHTML=e.innerHTML),C(e),!1;if("TD"!==r){var l=e.getAttribute("class")||"MsoNormal";if(t&&l){for(var s=(l=E(l)).split(" "),o=0;o<s.length;o++){var d=[],f="."+s[o];d.push(f),f=i+f,d.push(f);for(var g=0;g<d.length;g++)t[d[g]]&&T(e,t[d[g]])}e.removeAttribute("class")}t&&t[i]&&T(e,t[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var u=e.getAttribute("class");if(u&&(t&&t[r.toLowerCase()+"."+u]&&T(e,t[r.toLowerCase()+"."+u]),-1!==u.toLowerCase().indexOf("mso"))){var p=E(u);(p=p.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",p):e.removeAttribute("class")}var c=e.getAttribute("style");if(c){var m=c.match(/text-align:.+?[; "]{1,1}/gi);m&&m[m.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}A(e)}if("TR"===r&&function x(e,t){N.node.clearAttributes(e);for(var r=e.firstElementChild,i=0,n=!1,a=null;r;){r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:")&&(r.innerHTML=r.firstElementChild.innerHTML),(a=r.getAttribute("width"))||n||(n=!0),i+=parseInt(a,10),(!r.firstChild||r.firstChild&&r.firstChild.data===w.UNICODE_NBSP)&&(r.firstChild&&C(r.firstChild),r.innerHTML="<br>");for(var l=r.firstElementChild,s=1===r.children.length;l;)"P"!==l.tagName||H(l)||s&&A(l),l=l.nextElementSibling;if(t){var o=r.getAttribute("class");if(o){var d=(o=E(o)).match(/xl[0-9]+/gi);if(d){var f="."+d[0];t[f]&&T(r,t[f])}}t.td&&T(r,t.td)}var g=r.getAttribute("style");g&&(g=E(g))&&";"!==g.slice(-1)&&(g+=";");var u=r.getAttribute("valign");if(!u&&g){var p=g.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(u=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var c=null;if(g){var m=g.match(/text-align:.+?[; "]{1,1}/gi);m&&(c=m[m.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===c&&(c=null)}var h=null;if(g){var v=g.match(/background:.+?[; "]{1,1}/gi);v&&(h=v[v.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var b=r.getAttribute("colspan"),y=r.getAttribute("rowspan");b&&r.setAttribute("colspan",b),y&&r.setAttribute("rowspan",y),u&&(r.style["vertical-align"]=u),c&&(r.style["text-align"]=c),h&&(r.style["background-color"]=h),a&&r.setAttribute("width",a),r=r.nextElementSibling}for(r=e.firstElementChild;r;)a=r.getAttribute("width"),n?r.removeAttribute("width"):r.setAttribute("width",100*parseInt(a,10)/i+"%"),r=r.nextElementSibling}(e,t),"A"!==r||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==r&&e.getAttribute("href")&&e.querySelector("img"))for(var h=e.querySelectorAll("span"),v=0;v<h.length;v++)h[v].innerText||(h[v].outerHTML=h[v].innerHTML);if("TD"!==r&&"TH"!==r||e.innerHTML||(e.innerHTML="<br>"),"TABLE"===r&&(e.style.width=e.style.width),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=E(e.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",b):e.removeAttribute("style")}return!0}function a(e,t){0<=e.indexOf("<html")&&(e=e.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1")),function f(e){for(var t=e.split("v:shape"),r=1;r<t.length;r++){var i=t[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var a=i.split(' o:spid="')[1];a&&1<a.length&&(a=a.split('"')[0],u[n]=a)}}}(e);var r=(new DOMParser).parseFromString(e,"text/html"),i=r.head,n=r.body,s=function g(e){var t={},r=e.getElementsByTagName("style");if(r.length){var i=r[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(i)for(var n=0;n<i.length;n++){var a=i[n],l=a.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=a.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");l=l.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),l=l.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var o=l.split(", "),d=0;d<o.length;d++)t[o[d]]=s}}return t}(i);p(n,function(e){if(e.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(e.data)){if(!/\S| /.test(e.data)&&!/[\u00a0]+/.test(e.data))return e.data===w.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(C(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),p(n,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||m(e,t),!0});for(var a=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),l=a.length-1;0<=l;l--)a[l].previousElementSibling&&"LI"===a[l].previousElementSibling.tagName&&a[l].previousElementSibling.appendChild(a[l]);p(n,function(e){if(e.nodeType===Node.TEXT_NODE)return e.data=e.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(e.nodeType===Node.ELEMENT_NODE){if(H(e)){var t=e.parentNode,r=e.previousSibling,i=function M(e,t,r,i){var n,a,l=/[0-9a-zA-Z]./gi,s=!1,o=navigator.userAgent.toLowerCase();-1!=o.indexOf("safari")&&(o=-1<o.indexOf("chrome")?1:"safari"),e.innerHTML.includes("mso-list:\nIgnore")&&(e.innerHTML=e.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var d,f,g,u,p=e.querySelector('span[style="mso-list:Ignore"]');null==p&&"safari"==o&&(p=e.querySelector('span[lang="PT-BR"]'));var c;p&&(s=s||l.test(p.textContent)),null!==p&&(c=p.textContent.trim().split(".")[0]),g=1==s?("1"==(c=p.textContent.trim().split(".")[0])?u="decimal;":"i"==c?u="lower-roman;":"I"==c?u="upper-roman;":"o"==c?u="circle;":c.match(/^v$/)||(c.match(/^[a-z]$/)||c.match(/^[a-z]\)$/)?u="lower-alpha;":(c.match(/^[A-Z]$/)||c.match(/^[A-Z]\)$/))&&(u="upper-alpha;")),u="list-style-type: "+u,"ol"):(null!=p&&(c=p.textContent.trim().split(".")[0]),"\xa7"==c?u="square;":"\xb7"==c&&(u="disc;"),u="list-style-type: "+u,"ul");var m,h="";p==undefined||p.textContent==undefined||isNaN(parseInt(p.textContent.trim().split(".")[1],10))||(h=' class="decimal_type" ');var v,b=O(e),y=e.style.marginLeft;if(y.includes("in")?(v="in",y=parseFloat(y)-.5):y.includes("pt")&&(v="px",y=parseFloat(y)-10),1==b)if(m=u?"<"+g+' style = "'+u+"; margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">',"list-style-type: upper-alpha;"==u){var x=c.charCodeAt(0)-64;m=u?"<"+g+h+' start="'+x+'" style = "'+u+" margin-left:"+y+v+';">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var N=c.charCodeAt(0)-96;m=u?"<"+g+h+' start="'+N+'" style = "'+u+"margin-left:"+y+v+';">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+";margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">';else if("list-style-type: upper-alpha;"==u){var C=c.charCodeAt(0)-64;m=u?"<"+g+h+' style = "'+u+' start="'+C+'">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var A=c.charCodeAt(0)-96;m=u?"<"+g+h+' style = "'+u+' start="'+A+'">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+'">':"<"+g+">";for(var E=!1;e;){if(!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var T=O(e);if((r=r||T)<T)m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode;else{if(T<r)break;e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0,n=l.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var w=!1;(!i&&!e.style.marginLeft||i&&e.style.marginLeft&&i===e.style.marginLeft)&&(w=!0),i=e.style.marginLeft,w||n===undefined?(d=I(e,t),e.nextSibling&&e.nextSibling.innerText!=undefined&&e.nextSibling.innerText!=undefined&&!m.includes('class="decimal_type"')&&(isNaN(parseInt(e.nextSibling.innerText.trim().split(".")[1],10))||(m=m.substring(3,0)+' class="decimal_type"'+m.substring(3,m.length))),m+="<li>"+d+"</li>"):(1==T&&(m+="</"+g+">",E=!0,a=null),m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode);var S=e&&e.nextElementSibling;if(S&&(a=S.previousElementSibling),e&&!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}e&&e.parentNode&&e.parentNode.removeChild(e),e=S}}E||(m+="</"+g+">");var L=document.createElement("div");return L.innerHTML=m,{el:L,currentNode:e}}(e,s).el,n=null;return(n=r?r.nextSibling:t.firstChild)?t.insertBefore(i,n):t.appendChild(i),!1}return"FONT"===e.tagName&&s["."+e.getAttribute("class")]&&(e=y(e,"span")),h(e,s)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var a=e.nextSibling;a;)(a=e.nextSibling)&&C(a),a.data&&-1<a.data.indexOf("[endif]")&&(a=null);if(-1<e.data.indexOf("[if supportFields]")&&-1<e.data.indexOf("FORMCHECKBOX")){var l=document.createElement("input");l.type="checkbox",e.parentNode.insertBefore(l,e.nextSibling)}return C(e),!1}),p(n,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(t)){for(var r=e.parentNode;r&&(C(e),!(e=r).innerHTML)&&"TD"!==e.parentNode.tagName;)r=e.parentNode;return!1}!function f(e){var t=e.getAttribute("style");if(t){(t=E(t))&&";"!==t.slice(-1)&&(t+=";");var r=t.match(/(^|\S+?):.+?;{1,1}/gi);if(r){for(var i={},n=0;n<r.length;n++){var a=r[n].split(":");2===a.length&&("text-align"===a[0]&&"SPAN"===e.tagName||(i[a[0]]=a[1]))}var l="";for(var s in i)if(i.hasOwnProperty(s)){if("font-size"===s&&"pt;"===i[s].slice(-3)){var o=null;try{o=parseFloat(i[s].slice(0,-3),10)}catch(d){o=null}o&&(o=Math.round(1.33*o),i[s]=o+"px;")}l+=s+":"+i[s]}l&&e.setAttribute("style",l)}}}(e)}return!0}),p(n,function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0});var o=n.outerHTML,d=N.opts.htmlAllowedStyleProps;return N.opts.htmlAllowedStyleProps=N.opts.wordAllowedStyleProps,o=N.clean.html(o,N.opts.wordDeniedTags,N.opts.wordDeniedAttrs,!1),N.opts.htmlAllowedStyleProps=d,o}return{_init:function e(){N.events.on("paste.wordPaste",function(e){return n=e,N.opts.wordPasteModal?function a(){if(!l){var e='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+N.language.translate("Word Paste Detected")+"</h4>",t=function n(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e+='<p style="text-align: left;">'+N.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",e+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+N.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+N.language.translate("Keep")+"</button></div>",e+="</div>"}(),r=N.modals.create(s,e,t),i=r.$body;l=r.$modal,r.$modal.addClass("fr-middle"),N.events.bindClick(i,"button.fr-remove-word",function(){var e=l.data("instance")||N;e.wordPaste.clean()}),N.events.bindClick(i,"button.fr-keep-word",function(){var e=l.data("instance")||N;e.wordPaste.clean(!0)}),N.events.$on(d(N.o_win),"resize",function(){N.modals.resize(s)})}N.modals.show(s),N.modals.resize(s)}():t(N.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:a}}});
7
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(w){"use strict";w=w&&w.hasOwnProperty("default")?w["default"]:w,Object.assign(w.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height","list-style-type"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),w.PLUGINS.wordPaste=function(N){var l,n,d=N.$,s="word_paste",p={};function t(e){var t=N.opts.wordAllowedStyleProps;e||(N.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=a(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var r="",i=0;i++<t.length;)r+="&nbsp;";return r}),N.paste.getRtfClipboard());var r=N.doc.createElement("DIV");r.innerHTML=n,N.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=N.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){N.modals.hide(s)}(),N.paste.clean(n,!0,!0),N.opts.wordAllowedStyleProps=t}function C(e){e.parentNode&&e.parentNode.removeChild(e)}function c(e,t){if(t(e))for(var r=e.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,c(i,t),i.previousSibling||i.nextSibling||i.parentNode||!r||n===r.previousSibling||!r.parentNode?i.previousSibling||i.nextSibling||i.parentNode||!r||r.previousSibling||r.nextSibling||r.parentNode||(n?r=n.nextSibling?n.nextSibling.nextSibling:null:e.firstChild&&(r=e.firstChild.nextSibling)):r=n?n.nextSibling:e.firstChild}}function H(e){if(!e.getAttribute("style")||!/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!e.querySelector('[style="mso-list:Ignore"]'))return!!(e.outerHTML&&0<=e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(t){return!1}return!0}function O(e){return e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function I(e,i){var t=e.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)){var r=document.createElement(e.tagName.toLowerCase());r.setAttribute("style",e.getAttribute("style")),r.innerHTML=t.innerHTML,t.innerHTML=r.outerHTML}c(t,function(e){if(e.nodeType==Node.COMMENT_NODE&&(N.browser.msie||N.browser.safari||N.browser.edge))try{if("[if !supportLists]"===e.data){for(e=e.nextSibling;e&&e.nodeType!==Node.COMMENT_NODE;){var t=e.nextSibling;e.parentNode.removeChild(e),e=t}e&&e.nodeType==Node.COMMENT_NODE&&e.parentNode.removeChild(e)}}catch(r){}return e.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===e.getAttribute("style")&&e.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===e.getAttribute("style")&&e.parentNode.removeChild(e),e.setAttribute("style",function n(e){var r="",i=e.getAttribute("style");i&&["line-height","font-family","font-size","color","background"].forEach(function(e){var t=i.match(new RegExp(e+":.*(;|)"));t&&(r+=t[0]+";")});return r}(e)),v(e,i)),!0});var n=t.innerHTML;return n=n.replace(/<!--[\s\S]*?-->/gi,"")}function y(e,t){for(var r=document.createElement(t),i=0;i<e.attributes.length;i++){var n=e.attributes[i].name;"FONT"===e.tagName&&(N.browser.msie&&["id","class","style"].indexOf(n)<0||!N.browser.msie&&CSS.supports(n,e.getAttribute(n)))?d(r).css(n,e.getAttribute(n)):r.setAttribute(n,e.getAttribute(n))}return r.innerHTML=e.innerHTML,e.parentNode.replaceChild(r,e),r}function A(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function E(e){return e.replace(/\n|\r|\n\r|&quot;/g,"")}function T(e,t,r){if(t){var i=e.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var n=null;n=r?(i||"")+t:t+(i||""),e.setAttribute("style",n)}}var m=null;function f(e,t,r){for(var i=e.split(r),n=1;n<i.length;n++){var a=i[n];if(1<(a=a.split("shplid")).length){a=a[1];for(var l="",s=0;s<a.length&&"\\"!==a[s]&&"{"!==a[s]&&" "!==a[s]&&"\r"!==a[s]&&"\n"!==a[s];)l+=a[s],s++;var o=a.split("bliptag");if(o&&o.length<2)continue;var d=null;if(-1!==o[0].indexOf("pngblip")?d="image/png":-1!==o[0].indexOf("jpegblip")&&(d="image/jpeg"),!d)continue;var f=o[1].split("}");if(f&&f.length<2)continue;var g=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))g=f[1].split(" ");else{if((g=f[0].split(" "))&&g.length<2)continue;g.shift()}var u=g.join("");m[t+l]={image_hex:u,image_type:d}}}}function h(e,t){if(t){var r;if("IMG"===e.tagName){var i=e.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&N.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(r=p[e.getAttribute("v:shapes")])||(r=e.getAttribute("v:shapes"),e.parentNode&&e.parentNode.parentNode&&0<=e.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(r=null))}else r=e.parentNode.getAttribute("o:spid");if(e.removeAttribute("height"),r){!function s(e){m={},f(e,"i","\\shppict"),f(e,"s","\\shp{")}(t);var n=m[r.substring(7)];if(n){var a=function o(e){for(var t=e.match(/[0-9a-f]{2}/gi),r=[],i=0;i<t.length;i++)r.push(String.fromCharCode(parseInt(t[i],16)));var n=r.join("");return btoa(n)}(n.image_hex),l="data:"+n.image_type+";base64,"+a;"IMG"===e.tagName?(e.src=l,e.setAttribute("data-fr-image-pasted",!0)):d(e.parentNode).before('<img data-fr-image-pasted="true" src="'+l+'" style="'+e.parentNode.getAttribute("style")+'">').remove()}}}}function v(e,t){var r=e.tagName,i=r.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?y(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&y(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return C(e),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],a=0;a<n.length;a++)if(-1!==r.indexOf(n[a]))return e.innerHTML&&(e.outerHTML=e.innerHTML),C(e),!1;if("TD"!==r){var l=e.getAttribute("class")||"MsoNormal";if(t&&l){for(var s=(l=E(l)).split(" "),o=0;o<s.length;o++){var d=[],f="."+s[o];d.push(f),f=i+f,d.push(f);for(var g=0;g<d.length;g++)t[d[g]]&&T(e,t[d[g]])}e.removeAttribute("class")}t&&t[i]&&T(e,t[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var u=e.getAttribute("class");if(u&&(t&&t[r.toLowerCase()+"."+u]&&T(e,t[r.toLowerCase()+"."+u]),-1!==u.toLowerCase().indexOf("mso"))){var p=E(u);(p=p.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",p):e.removeAttribute("class")}var c=e.getAttribute("style");if(c){var m=c.match(/text-align:.+?[; "]{1,1}/gi);m&&m[m.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}A(e)}if("TR"===r&&function x(e,t){N.node.clearAttributes(e);for(var r=e.firstElementChild,i=0,n=!1,a=null;r;){r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:")&&(r.innerHTML=r.firstElementChild.innerHTML),(a=r.getAttribute("width"))||n||(n=!0),i+=parseInt(a,10),(!r.firstChild||r.firstChild&&r.firstChild.data===w.UNICODE_NBSP)&&(r.firstChild&&C(r.firstChild),r.innerHTML="<br>");for(var l=r.firstElementChild,s=1===r.children.length;l;)"P"!==l.tagName||H(l)||s&&A(l),l=l.nextElementSibling;if(t){var o=r.getAttribute("class");if(o){var d=(o=E(o)).match(/xl[0-9]+/gi);if(d){var f="."+d[0];t[f]&&T(r,t[f])}}t.td&&T(r,t.td)}var g=r.getAttribute("style");g&&(g=E(g))&&";"!==g.slice(-1)&&(g+=";");var u=r.getAttribute("valign");if(!u&&g){var p=g.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(u=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var c=null;if(g){var m=g.match(/text-align:.+?[; "]{1,1}/gi);m&&(c=m[m.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===c&&(c=null)}var h=null;if(g){var v=g.match(/background:.+?[; "]{1,1}/gi);v&&(h=v[v.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var b=r.getAttribute("colspan"),y=r.getAttribute("rowspan");b&&r.setAttribute("colspan",b),y&&r.setAttribute("rowspan",y),u&&(r.style["vertical-align"]=u),c&&(r.style["text-align"]=c),h&&(r.style["background-color"]=h),a&&r.setAttribute("width",a),r=r.nextElementSibling}for(r=e.firstElementChild;r;)a=r.getAttribute("width"),n?r.removeAttribute("width"):r.setAttribute("width",100*parseInt(a,10)/i+"%"),r=r.nextElementSibling}(e,t),"A"!==r||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==r&&e.getAttribute("href")&&e.querySelector("img"))for(var h=e.querySelectorAll("span"),v=0;v<h.length;v++)h[v].innerText||(h[v].outerHTML=h[v].innerHTML);if("TD"!==r&&"TH"!==r||e.innerHTML||(e.innerHTML="<br>"),"TABLE"===r&&(e.style.width=e.style.width),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=E(e.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",b):e.removeAttribute("style")}return!0}function a(e,t){0<=e.indexOf("<html")&&(e=e.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1"));var s=e.match(/(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi);!function g(e){for(var t=e.split("v:shape"),r=1;r<t.length;r++){var i=t[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var a=i.split(' o:spid="')[1];a&&1<a.length&&(a=a.split('"')[0],p[n]=a)}}}(e);var r=(new DOMParser).parseFromString(e,"text/html"),i=r.head,n=r.body,o=function u(e){var t={},r=e.getElementsByTagName("style");if(r.length){var i=r[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(i)for(var n=0;n<i.length;n++){var a=i[n],l=a.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=a.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");l=l.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),l=l.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var o=l.split(", "),d=0;d<o.length;d++)t[o[d]]=s}}return t}(i);c(n,function(e){if(e.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(e.data)){if(!/\S| /.test(e.data)&&!/[\u00a0]+/.test(e.data))return e.data===w.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(C(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),c(n,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||h(e,t),!0});for(var a=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),l=a.length-1;0<=l;l--)a[l].previousElementSibling&&"LI"===a[l].previousElementSibling.tagName&&a[l].previousElementSibling.appendChild(a[l]);c(n,function(e){if(e.nodeType===Node.TEXT_NODE)return e.data=e.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(e.nodeType===Node.ELEMENT_NODE){if(H(e)){var t=e.parentNode,r=e.previousSibling,i=function M(e,t,r,i){var n,a,l=/[0-9a-zA-Z]./gi,s=!1,o=navigator.userAgent.toLowerCase();-1!=o.indexOf("safari")&&(o=-1<o.indexOf("chrome")?1:"safari"),e.innerHTML.includes("mso-list:\nIgnore")&&(e.innerHTML=e.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var d,f,g,u,p=e.querySelector('span[style="mso-list:Ignore"]');null==p&&"safari"==o&&(p=e.querySelector('span[lang="PT-BR"]'));var c;p&&(s=s||l.test(p.textContent)),null!==p&&(c=p.textContent.trim().split(".")[0]),g=1==s?("1"==(c=p.textContent.trim().split(".")[0])?u="decimal;":"i"==c?u="lower-roman;":"I"==c?u="upper-roman;":"o"==c?u="circle;":c.match(/^v$/)||(c.match(/^[a-z]$/)||c.match(/^[a-z]\)$/)?u="lower-alpha;":(c.match(/^[A-Z]$/)||c.match(/^[A-Z]\)$/))&&(u="upper-alpha;")),u="list-style-type: "+u,"ol"):(null!=p&&(c=p.textContent.trim().split(".")[0]),"\xa7"==c?u="square;":"\xb7"==c&&(u="disc;"),u="list-style-type: "+u,"ul");var m,h="";p==undefined||p.textContent==undefined||isNaN(parseInt(p.textContent.trim().split(".")[1],10))||(h=' class="decimal_type" ');var v,b=O(e),y=e.style.marginLeft;if(y.includes("in")?(v="in",y=parseFloat(y)-.5):y.includes("pt")&&(v="px",y=parseFloat(y)-10),1==b)if(m=u?"<"+g+' style = "'+u+"; margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">',"list-style-type: upper-alpha;"==u){var x=c.charCodeAt(0)-64;m=u?"<"+g+h+' start="'+x+'" style = "'+u+" margin-left:"+y+v+';">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var N=c.charCodeAt(0)-96;m=u?"<"+g+h+' start="'+N+'" style = "'+u+"margin-left:"+y+v+';">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+";margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">';else if("list-style-type: upper-alpha;"==u){var C=c.charCodeAt(0)-64;m=u?"<"+g+h+' style = "'+u+' start="'+C+'">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var A=c.charCodeAt(0)-96;m=u?"<"+g+h+' style = "'+u+' start="'+A+'">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+'">':"<"+g+">";for(var E=!1;e;){if(!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var T=O(e);if((r=r||T)<T)m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode;else{if(T<r)break;e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0,n=l.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var w=!1;(!i&&!e.style.marginLeft||i&&e.style.marginLeft&&i===e.style.marginLeft)&&(w=!0),i=e.style.marginLeft,w||n===undefined?(d=I(e,t),e.nextSibling&&e.nextSibling.innerText!=undefined&&e.nextSibling.innerText!=undefined&&!m.includes('class="decimal_type"')&&(isNaN(parseInt(e.nextSibling.innerText.trim().split(".")[1],10))||(m=m.substring(3,0)+' class="decimal_type"'+m.substring(3,m.length))),m+="<li>"+d+"</li>"):(1==T&&(m+="</"+g+">",E=!0,a=null),m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode);var S=e&&e.nextElementSibling;if(S&&(a=S.previousElementSibling),e&&!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}e&&e.parentNode&&e.parentNode.removeChild(e),e=S}}E||(m+="</"+g+">");var L=document.createElement("div");return L.innerHTML=m,{el:L,currentNode:e}}(e,o).el,n=null;return(n=r?r.nextSibling:t.firstChild)?t.insertBefore(i,n):t.appendChild(i),!1}return"FONT"===e.tagName&&(s&&"LibreOffice"===s[0]||o["."+e.getAttribute("class")])&&(e=y(e,"span")),v(e,o)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var a=e.nextSibling;a;)(a=e.nextSibling)&&C(a),a.data&&-1<a.data.indexOf("[endif]")&&(a=null);if(-1<e.data.indexOf("[if supportFields]")&&-1<e.data.indexOf("FORMCHECKBOX")){var l=document.createElement("input");l.type="checkbox",e.parentNode.insertBefore(l,e.nextSibling)}return C(e),!1}),c(n,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(t)){for(var r=e.parentNode;r&&(C(e),!(e=r).innerHTML)&&"TD"!==e.parentNode.tagName;)r=e.parentNode;return!1}!function f(e){var t=e.getAttribute("style");if(t){(t=E(t))&&";"!==t.slice(-1)&&(t+=";");var r=t.match(/(^|\S+?):.+?;{1,1}/gi);if(r){for(var i={},n=0;n<r.length;n++){var a=r[n].split(":");2===a.length&&("text-align"===a[0]&&"SPAN"===e.tagName||(i[a[0]]=a[1]))}var l="";for(var s in i)if(i.hasOwnProperty(s)){if("font-size"===s&&"pt;"===i[s].slice(-3)){var o=null;try{o=parseFloat(i[s].slice(0,-3),10)}catch(d){o=null}o&&(o=Math.round(1.33*o),i[s]=o+"px;")}l+=s+":"+i[s]}l&&e.setAttribute("style",l)}}}(e)}return!0}),c(n,function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0});var d=n.outerHTML,f=N.opts.htmlAllowedStyleProps;return N.opts.htmlAllowedStyleProps=N.opts.wordAllowedStyleProps,d=N.clean.html(d,N.opts.wordDeniedTags,N.opts.wordDeniedAttrs,!1),N.opts.htmlAllowedStyleProps=f,d}return{_init:function e(){N.events.on("paste.wordPaste",function(e){return n=e,N.opts.wordPasteModal?function a(){if(!l){var e='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+N.language.translate("Word Paste Detected")+"</h4>",t=function n(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e+='<p style="text-align: left;">'+N.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",e+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+N.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+N.language.translate("Keep")+"</button></div>",e+="</div>"}(),r=N.modals.create(s,e,t),i=r.$body;l=r.$modal,r.$modal.addClass("fr-middle"),N.events.bindClick(i,"button.fr-remove-word",function(){var e=l.data("instance")||N;e.wordPaste.clean()}),N.events.bindClick(i,"button.fr-keep-word",function(){var e=l.data("instance")||N;e.wordPaste.clean(!0)}),N.events.$on(d(N.o_win),"resize",function(){N.modals.resize(s)})}N.modals.show(s),N.modals.resize(s)}():t(N.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:a}}});