/*! * froala_editor v4.0.0 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2021 Froala Labs */ !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(p){"use strict";p=p&&p.hasOwnProperty("default")?p["default"]:p,Object.assign(p.DEFAULTS,{listAdvancedTypes:!0}),p.PLUGINS.lists=function(d){var f=d.$;function g(e){return'')}function m(e){return'')}function o(e,t){!function c(e,t){for(var n=[],a=0;a").concat(i.html(),""))}}(e,t);var n,a=d.html.defaultTag(),r=null;e.length&&(n="rtl"==d.opts.direction||"rtl"==f(e[0]).css("direction")?"margin-right":"margin-left");for(var o=0;o'):"<".concat(t,">"),s="");for(i-=r;0"),s+=s,i-=d.opts.indentMargin;a&&e[o].tagName.toLowerCase()==a?f(e[o]).replaceWith("".concat(l,"").concat(f(e[o]).html(),"").concat(s)):f(e[o]).wrap("".concat(l,"
  • ").concat(s))}d.clean.lists()}function i(e){var t,n;for(t=e.length-1;0<=t;t--)for(n=t-1;0<=n;n--)if(f(e[n]).find(e[t]).length||e[n]==e[t]){e.splice(t,1);break}var a=[];for(t=0;t"),r.append(g("LI")),r.prepend(m("LI"))}r.after(g(o.tagName)),"LI"==o.parentNode.tagName&&(o=o.parentNode.parentNode),a.indexOf(o)<0&&a.push(o)}for(t=0;t<\/span>/g,"")).replace(/<\/span>/g,"<$1>"),c.replaceWith(d.node.openTagString(c.get(0))+p+d.node.closeTagString(c.get(0)))}d.$el.find("li:empty").remove(),d.$el.find("ul:empty, ol:empty").remove(),d.clean.lists(),d.$el.find("ul:empty, ol:empty").remove(),d.html.wrap()}function s(e){d.selection.save();for(var t=0;t ul, > ol").last().get(0);if(a){var r=f(document.createElement("li"));f(a).prepend(r);for(var o=d.node.contents(e[t])[0];o&&!d.node.isList(o);){var i=o.nextSibling;r.append(o),o=i}f(n).append(f(a)),f(e[t]).remove()}else{var l=f(n).find("> ul, > ol").last().get(0);if(l)f(l).append(f(e[t]));else{var s=f("<".concat(e[t].parentNode.tagName,">"));f(n).append(s),s.append(f(e[t]))}}}}d.clean.lists(),d.selection.restore()}function c(e){d.selection.save(),i(e),d.selection.restore()}function e(e){if("indent"==e||"outdent"==e){var t=!1,n=d.selection.blocks(),a=[],r=n[0].previousSibling||n[0].parentElement;if("outdent"==e){if("UL"!=r.parentNode.tagName&&"OL"!=r.parentNode.tagName&&"LI"!=r.parentNode.tagName)return;if(!n[0].previousSibling&&"none"==r.parentNode.style.listStyleType)return void function i(e){for(d.selection.save();0