/*!
* froala_editor v4.0.7 (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(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.quote=function(r){var c=r.$;function s(e){for(;e.parentNode&&e.parentNode!=r.el;)e=e.parentNode;return e}return{apply:function t(e){r.selection.save(),r.html.wrap(!0,!0,!0,!0),r.selection.restore(),"increase"==e?function n(){r.html.unwrap();var e,t=r.selection.blocks();for(e=0;e<t.length;e++)t[e]=s(t[e]);r.selection.save();var o=c(document.createElement("blockquote"));for(o.insertBefore(t[0]),e=0;e<t.length;e++)o.append(t[e]);r.opts.trackChangesEnabled&&r.track_changes.addQuote(o),r.selection.isCollapsed()||r.selection.restore()}():"decrease"==e&&function a(){var e=r.opts.trackChangesEnabled;r.html.unwrap();var t,o=r.selection.blocks();for(t=0;t<o.length;t++)"BLOCKQUOTE"!=o[t].tagName&&(o[t]=e&&c(o[t]).parentsUntil(r.$el,"[data-track-id^=pending]").get(0)||c(o[t]).parentsUntil(r.$el,"BLOCKQUOTE").get(0));for(r.selection.save(),t=0;t<o.length;t++)o[t]&&(e?r.track_changes.removeQuote(c(o[t]),t):c(o[t]).replaceWith(o[t].innerHTML));r.selection.isCollapsed()||r.selection.restore()}()}}},e.RegisterShortcut(e.KEYCODE.SINGLE_QUOTE,"quote","increase","'"),e.RegisterShortcut(e.KEYCODE.SINGLE_QUOTE,"quote","decrease","'",!0),e.RegisterCommand("quote",{title:"Quote",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t={increase:"Increase",decrease:"Decrease"};for(var o in t)if(t.hasOwnProperty(o)){var n=this.shortcuts.get("quote.".concat(o));e+='<li role="presentation"><a class="fr-command fr-active '.concat(o,'" tabIndex="-1" role="option" data-cmd="quote" data-param1="').concat(o,'" title="').concat(t[o],'">').concat(this.language.translate(t[o])).concat(n?'<span class="fr-shortcut">'.concat(n,"</span>"):"","</a></li>")}return e+="</ul>"},callback:function(e,t){this.quote.apply(t)},plugin:"quote"}),e.DefineIcon("quote",{NAME:"quote-left",SVG_KEY:"blockquote"})});