Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

froala-editor

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

froala-editor - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4

2

js/languages/ar.js
/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -7,2 +7,2 @@ * 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";function Me(e){return(Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}_e=_e&&_e.hasOwnProperty("default")?_e["default"]:_e,Object.assign(_e.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(_e.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadToAzure:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),_e.PLUGINS.image=function(C){var S,l,p,f,s,a,E=C.$,R="https://i.froala.com/upload",t=!1,i=1,c=2,d=3,m=4,D=5,U=6,r={};function g(){var e=C.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),S&&e.val(S.attr("src")),e.trigger("change")}function n(){var e=C.popups.get("image.edit");if(e||(e=$()),e){var t=Ae();Ce()&&(t=t.find(".fr-img-wrap")),C.popups.setContainer("image.edit",C.$sc),C.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=(function r(e){for(var t=0;e;){if("BODY"==e.tagName){var a=e.scrollTop||document.documentElement.scrollTop;t+=e.offsetTop-a+e.clientTop}else t+=e.offsetTop-e.scrollTop+e.clientTop;e=e.offsetParent}return{y:t}}(S[0]).y+t.outerHeight())/5;t.offset().top<0||!C.opts.height||C.helpers.isMobile()||C.opts.iframe?i=t.offset().top+t.outerHeight():Ce()&&C.opts.height&&(i=t.offset().top+t.outerHeight()/4),S.hasClass("fr-uploading")?N():C.popups.show("image.edit",a,i,t.outerHeight(),!0)}}function u(){k()}function o(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":he(e);ue(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function h(){for(var e,t="IMG"==C.el.tagName?[C.el]:C.el.querySelectorAll("img"),a=0;a<t.length;a++){var i=E(t[a]);!C.opts.htmlUntouched&&C.opts.useClasses?((C.opts.imageDefaultAlign||C.opts.imageDefaultDisplay)&&(0<(e=i).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi".concat(he(e)[0])),e.addClass("fr-di".concat(ve(e)[0])),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),C.opts.imageTextNear||(0<i.parents(".fr-img-caption").length?i.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):i.removeClass("fr-dii").addClass("fr-dib"))):C.opts.htmlUntouched||C.opts.useClasses||(C.opts.imageDefaultAlign||C.opts.imageDefaultDisplay)&&o(i),C.opts.iframe&&i.on("load",C.size.syncIframe)}}function v(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(C.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),E(a[t]).toggleClass("fr-draggable",C.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&C.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var r=a[t].parentNode.parentNode;C.browser.mozilla||r.setAttribute("contenteditable",!1),r.setAttribute("draggable",!1),r.classList.add("fr-draggable");var n=a[t].nextSibling;n&&!C.browser.mozilla&&n.setAttribute("contenteditable",!0)}if(s)for(t=0;t<s.length;t++)i.indexOf(s[t].getAttribute("src"))<0&&C.events.trigger("image.removed",[E(s[t])]);if(s&&e){var o=[];for(t=0;t<s.length;t++)o.push(s[t].getAttribute("src"));for(t=0;t<a.length;t++)o.indexOf(a[t].getAttribute("src"))<0&&C.events.trigger("image.loaded",[E(a[t])])}s=a}function x(){if(l||function o(){var e;C.shared.$image_resizer?(l=C.shared.$image_resizer,f=C.shared.$img_overlay,C.events.on("destroy",function(){E("body").first().append(l.removeClass("fr-active"))},!0)):(C.shared.$image_resizer=E(document.createElement("div")).attr("class","fr-image-resizer"),l=C.shared.$image_resizer,C.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),C.opts.imageResize&&(l.append(b("nw")+b("ne")+b("sw")+b("se")),C.shared.$img_overlay=E(document.createElement("div")).attr("class","fr-image-overlay"),f=C.shared.$img_overlay,e=l.get(0).ownerDocument,E(e).find("body").first().append(f)));C.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,C.opts.imageResize&&(f.remove(),f=null)},!0),C.helpers.isMobile()||C.events.$on(E(C.o_win),"resize",function(){S&&!S.hasClass("fr-uploading")?ge(!0):S&&(x(),be(),N(!1))});if(C.opts.imageResize){e=l.get(0).ownerDocument,C.events.$on(l,C._mousedown,".fr-handler",w),C.events.$on(E(e),C._mousemove,A),C.events.$on(E(e.defaultView||e.parentWindow),C._mouseup,T),C.events.$on(f,"mouseleave",T);var i=1,r=null,n=0;C.events.on("keydown",function(e){if(S){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-n)&&(i=1),(a==_e.KEYCODE.EQUALS||C.browser.mozilla&&a==_e.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=ee.call(this,e,1,1,i):(a==_e.KEYCODE.HYPHEN||C.browser.mozilla&&a==_e.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=ee.call(this,e,2,-1,i):C.keys.ctrlKey(e)||a!=_e.KEYCODE.ENTER||(S.before("<br>"),O(S)),r=a,n=e.timeStamp}},!0),C.events.on("keyup",function(){i=1})}}(),!S)return!1;var e=C.$wp||C.$sc;e.append(l),l.data("instance",C);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=C.helpers.getPX(e.css("border-left-width")),t-=C.helpers.getPX(e.css("border-top-width")),C.$el.is("img")&&C.$sc.is("body")&&(a=t=0);var i=Ae();Ce()&&(i=i.find(".fr-img-wrap"));var r=0,n=0;C.opts.iframe&&(r=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),n=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(C.opts.iframe?i.offset().top+r:i.offset().top+t)-1).css("left",(C.opts.iframe?i.offset().left+n:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function b(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function y(e){Ce()?S.parents(".fr-img-caption").css("width",e):S.css("width",e)}function w(e){if(!C.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),C.$el.find("img.fr-error").left)return!1;C.undo.canDo()||C.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=C.$oel.get(0).ownerDocument,i=a.defaultView||a.parentWindow,r=!1;try{r=i.location!=i.parent.location&&!(i.$&&i.$.FE)}catch(s){}r&&i.frameElement&&(t+=C.helpers.getPX(E(i.frameElement).offset().left)+i.frameElement.clientLeft)}(p=E(this)).data("start-x",t),p.data("start-width",S.width()),p.data("start-height",S.height());var n=S.width();if(C.opts.imageResizeWithPercent){var o=S.parentsUntil(C.$el,C.html.blockTagsQuery()).get(0)||C.el;n=(n/E(o).outerWidth()*100).toFixed(2)+"%"}y(n),f.show(),C.popups.hideAll(),me()}function A(e){if(!C.core.sameInstance(l))return!0;var t;if(p&&S){if(e.preventDefault(),C.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var i=a-p.data("start-x"),r=p.data("start-width");if((p.hasClass("fr-hnw")||p.hasClass("fr-hsw"))&&(i=0-i),C.opts.imageResizeWithPercent){var n=S.parentsUntil(C.$el,C.html.blockTagsQuery()).get(0)||C.el;r=((r+i)/E(n).outerWidth()*100).toFixed(2),C.opts.imageRoundPercent&&(r=Math.round(r)),y("".concat(r,"%")),(t=Ce()?(C.helpers.getPX(S.parents(".fr-img-caption").css("width"))/E(n).outerWidth()*100).toFixed(2):(C.helpers.getPX(S.css("width"))/E(n).outerWidth()*100).toFixed(2))===r||C.opts.imageRoundPercent||y("".concat(t,"%")),S.css("height","").removeAttr("height")}else r+i>=C.opts.imageMinWidth&&(y(r+i),t=Ce()?C.helpers.getPX(S.parents(".fr-img-caption").css("width")):C.helpers.getPX(S.css("width"))),t!==r+i&&y(t),((S.attr("style")||"").match(/(^height:)|(; *height:)/)||S.attr("height"))&&(S.css("height",p.data("start-height")*S.width()/p.data("start-width")),S.removeAttr("height"));x(),C.events.trigger("image.resize",[we()])}}function T(e){if(!C.core.sameInstance(l))return!0;if(p&&S){if(e&&e.stopPropagation(),C.$el.find("img.fr-error").left)return!1;p=null,f.hide(),x(),n(),C.undo.saveStep(),C.events.trigger("image.resizeEnd",[we()])}else l.removeClass("fr-active")}function P(e,t,a){C.edit.on(),S&&S.addClass("fr-error"),r[e]?z(C.language.translate(r[e])):z(C.language.translate("Something went wrong. Please try again.")),!S&&a&&te(a),C.events.trigger("image.error",[{code:e,message:r[e]},t,a])}function $(e){if(e)return C.$wp&&C.events.$on(C.$wp,"scroll.image-edit",function(){S&&C.popups.isVisible("image.edit")&&(C.events.disableBlur(),n())}),!0;var t="";if(0<C.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons">\n '.concat(C.button.buildList(C.opts.imageEditButtons),"\n </div>")};return C.popups.create("image.edit",a)}return!1}function N(e){var t=C.popups.get("image.insert");if(t||(t=V()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),S){var a=Ae();C.popups.setContainer("image.insert",C.$sc);var i=a.offset().left,r=a.offset().top+a.height();C.popups.show("image.insert",i,r,a.outerHeight())}void 0===e&&I(C.language.translate("Uploading"),0)}function k(e){var t=C.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||C.$el.find("img.fr-error").length)){if(C.events.focus(),C.$el.find("img.fr-error").length&&(C.$el.find("img.fr-error").remove(),C.undo.saveStep(),C.undo.run(),C.undo.dropRedo()),!C.$wp&&S){var a=S;ge(!0),C.selection.setAfter(a.get(0)),C.selection.restore()}C.popups.hide("image.insert")}}function I(e,t){var a=C.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function z(e){N();var t=C.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),C.events.disableBlur(),a.focus()}function O(e){fe.call(e.get(0))}function B(){var e=E(this);C.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),O(e),C.events.trigger("image.loaded",[e])}function L(o,e,s,l,p){l&&"string"==typeof l&&(l=C.$(l)),C.edit.off(),I(C.language.translate("Loading image")),e&&(o=C.helpers.sanitizeURL(o));var t=new Image;t.onload=function(){var e,t;if(l){C.undo.canDo()||l.hasClass("fr-uploading")||C.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),C.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),!C.opts.trackChangesEnabled||l[0].parentNode&&"SPAN"===l[0].parentNode.tagName&&l[0].parentNode.hasAttribute("data-tracking")||C.track_changes.replaceSpecialItem(l),l.replaceWith(e)):e=l;for(var i=e.get(0).attributes,r=0;r<i.length;r++){var n=i[r];0===n.nodeName.indexOf("data-")?e.removeAttr(n.nodeName):s&&s.hasOwnProperty(n.nodeName)&&e.removeAttr(n.nodeName)}if(void 0!==s)for(t in s)s.hasOwnProperty(t)&&"link"!=t&&e.attr("".concat(t),s[t]);e.on("load",B),e.attr("src",o),C.edit.on(),v(!1),C.undo.saveStep(),C.events.disableBlur(),C.$el.blur(),C.events.trigger(a?"image.replaced":"image.inserted",[e,p])}else(e=Y(o,s,B))&&(v(!1),C.undo.saveStep(),C.events.disableBlur(),C.$el.blur(),C.events.trigger("image.inserted",[e,p]))},t.onerror=function(){P(i)},N(C.language.translate("Loading image")),t.src=o}function _(e,t,a){I(C.language.translate("Loading image"));var i=this.status,r=this.response,n=this.responseXML,o=this.responseText;try{if(C.opts.imageUploadToS3||C.opts.imageUploadToAzure)if(201==i){var s;if(C.opts.imageUploadToAzure){if(!1===C.events.trigger("image.uploadedToAzure",[this.responseURL,a,r],!0))return C.edit.on(),!1;s=t}else s=function p(e){try{var t=E(e).find("Location").text(),a=E(e).find("Key").text();return!1===C.events.trigger("image.uploadedToS3",[t,a,e],!0)?(C.edit.on(),!1):t}catch(i){return P(m,e),!1}}(n);s&&L(s,!1,[],e,r||n)}else P(m,r||n,e);else if(200<=i&&i<300){var l=function f(e){try{if(!1===C.events.trigger("image.uploaded",[e],!0))return C.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(P(c,e),!1)}catch(a){return P(m,e),!1}}(o);l&&L(l.link,!1,l,e,r||o)}else P(d,r||o,e)}catch(g){P(m,r||o,e)}}function M(){P(m,this.response||this.responseText||this.responseXML)}function K(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;I(C.language.translate("Uploading"),t)}}function Y(e,t,a){var i,r=E(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-".concat(i,'="').concat(t[i],'"'),r.attr("".concat(i),t[i]));var n=C.opts.imageDefaultWidth;n&&"auto"!=n&&(n=C.opts.imageResizeWithPercent?"100%":"".concat(n,"px")),r.attr("style",n?"width: ".concat(n,";"):""),ue(r,C.opts.imageDefaultDisplay,C.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),C.edit.on(),C.events.focus(!0),C.selection.restore(),C.undo.saveStep(),C.opts.imageSplitHTML?C.markers.split():C.markers.insert(),C.html.wrap();var o=C.$el.find(".fr-marker");if(o.length)o.parent().is("hr")&&o.parent().after(o),C.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(r);else{if(C.opts.trackChangesEnabled)return k(!0),!1;C.$el.append(r)}return C.selection.clear(),r}function H(){C.edit.on(),k(!0)}function W(e,t){if(void 0!==e&&0<e.length){if(e&&"image/svg+xml"==e[0].type){var a=new FileReader;a.onload=function(e){var t=e.target.result;C.image.insert(t,null,null,C.image.get())},a.readAsDataURL(e[0])}if(!1===C.events.trigger("image.beforeUpload",[e,t]))return!1;var i,r=e[0];if(!(null!==C.opts.imageUploadURL&&C.opts.imageUploadURL!=R||C.opts.imageUploadToS3||C.opts.imageUploadToAzure))return function w(r,n){var o=new FileReader;o.onload=function(){var e=o.result;if(o.result.indexOf("svg+xml")<0){for(var t=atob(o.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r.type})),n&&n.data("fr-old-src",n.attr("src")),C.image.insert(e,!1,null,n)}},N(),o.readAsDataURL(r)}(r,t||S),!1;if(r.name||(r.name=(new Date).getTime()+"."+(r.type||"image/jpeg").replace(/image\//g,"")),r.size>C.opts.imageMaxSize)return P(D),!1;if(C.opts.imageAllowedTypes.indexOf(r.type.replace(/image\//g,""))<0)return P(U),!1;if(C.drag_support.formdata&&(i=C.drag_support.formdata?new FormData:null),i){var n;if(!1!==C.opts.imageUploadToS3)for(n in i.append("key",C.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(r.name||"untitled")),i.append("success_action_status","201"),i.append("X-Requested-With","xhr"),i.append("Content-Type",r.type),C.opts.imageUploadToS3.params)C.opts.imageUploadToS3.params.hasOwnProperty(n)&&i.append(n,C.opts.imageUploadToS3.params[n]);for(n in C.opts.imageUploadParams)C.opts.imageUploadParams.hasOwnProperty(n)&&i.append(n,C.opts.imageUploadParams[n]);i.append(C.opts.imageUploadParam,r,r.name);var o,s,l=C.opts.imageUploadURL,p=C.opts.imageUploadMethod;C.opts.imageUploadToS3&&(l=C.opts.imageUploadToS3.uploadURL?C.opts.imageUploadToS3.uploadURL:"https://".concat(C.opts.imageUploadToS3.region,".amazonaws.com/").concat(C.opts.imageUploadToS3.bucket)),C.opts.imageUploadToAzure&&(o=l=C.opts.imageUploadToAzure.uploadURL?"".concat(C.opts.imageUploadToAzure.uploadURL,"/").concat(r.name):encodeURI("https://".concat(C.opts.imageUploadToAzure.account,".blob.core.windows.net/").concat(C.opts.imageUploadToAzure.container,"/").concat(r.name)),C.opts.imageUploadToAzure.SASToken&&(l+=C.opts.imageUploadToAzure.SASToken),p="PUT");var f=C.core.getXHR(l,p);if(C.opts.imageUploadToAzure){var g=(new Date).toUTCString();if(!C.opts.imageUploadToAzure.SASToken&&C.opts.imageUploadToAzure.accessKey){var c=C.opts.imageUploadToAzure.account,d=C.opts.imageUploadToAzure.container;if(C.opts.imageUploadToAzure.uploadURL){var m=C.opts.imageUploadToAzure.uploadURL.split("/");d=m.pop(),c=m.pop().split(".")[0]}var u="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(g,"\nx-ms-version:2019-07-07"),h=encodeURI("/"+c+"/"+d+"/"+r.name),v=p+"\n\n\n"+r.size+"\n\n"+r.type+"\n\n\n\n\n\n\n"+u+"\n"+h,b=C.cryptoJSPlugin.cryptoJS.HmacSHA256(v,C.cryptoJSPlugin.cryptoJS.enc.Base64.parse(C.opts.imageUploadToAzure.accessKey)).toString(C.cryptoJSPlugin.cryptoJS.enc.Base64),y="SharedKey "+c+":"+b;s=b,f.setRequestHeader("Authorization",y)}for(n in f.setRequestHeader("x-ms-version","2019-07-07"),f.setRequestHeader("x-ms-date",g),f.setRequestHeader("Content-Type",r.type),f.setRequestHeader("x-ms-blob-type","BlockBlob"),C.opts.imageUploadParams)C.opts.imageUploadParams.hasOwnProperty(n)&&f.setRequestHeader(n,C.opts.imageUploadParams[n]);for(n in C.opts.imageUploadToAzure.params)C.opts.imageUploadToAzure.params.hasOwnProperty(n)&&f.setRequestHeader(n,C.opts.imageUploadToAzure.params[n])}!function A(t,a,i,r,n,o){function s(){var e=E(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),C.placeholder.refresh(),O(e),x(),N(),C.edit.off(),t.onload=function(){_.call(t,e,n,o)},t.onerror=M,t.upload.onprogress=K,t.onabort=H,E(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),r?(r.attr("src",r.data("fr-old-src")),r.removeClass("fr-uploading")):e.remove(),ge(!0))}),t.send(C.opts.imageUploadToAzure?i:a)}var l=new FileReader;l.onload=function(){var e=l.result;if(l.result.indexOf("svg+xml")<0){for(var t=atob(l.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}r?(r.on("load",s),r.on("error",function(){s(),E(this).off("error")}),C.edit.on(),C.undo.saveStep(),r.data("fr-old-src",r.attr("src")),r.attr("src",e)):Y(e,null,s)},l.readAsDataURL(i)}(f,i,r,t||S,o,s)}}}function G(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function F(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=C.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!C.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;C.markers.remove(),C.markers.insertAtPoint(e.originalEvent),C.$el.find(".fr-marker").replaceWith(_e.MARKERS),0===C.$el.find(".fr-marker").length&&C.selection.setAtEnd(C.el),C.popups.hideAll();var i=C.popups.get("image.insert");i||(i=V()),C.popups.setContainer("image.insert",C.$sc);var r=e.originalEvent.pageX,n=e.originalEvent.pageY;if(C.opts.iframe){var o=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),s=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"));n+=C.$iframe.offset().top+o,r+=C.$iframe.offset().left+s}return C.popups.show("image.insert",r,n),N(),0<=C.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(ge(!0),W(t.files)):P(U),e.preventDefault(),e.stopPropagation(),!1}}}function V(e){if(e)return C.popups.onRefresh("image.insert",g),C.popups.onHide("image.insert",u),!0;var t,a,i="";C.opts.imageUpload||-1===C.opts.imageInsertButtons.indexOf("imageUpload")||C.opts.imageInsertButtons.splice(C.opts.imageInsertButtons.indexOf("imageUpload"),1);var r=C.button.buildList(C.opts.imageInsertButtons);""!==r&&(i='<div class="fr-buttons fr-tabs">'.concat(r,"</div>"));var n=C.opts.imageInsertButtons.indexOf("imageUpload"),o=C.opts.imageInsertButtons.indexOf("imageByURL"),s="";0<=n&&(t=" fr-active",0<=o&&o<n&&(t=""),s='<div class="fr-image-upload-layer'.concat(t,' fr-layer" id="fr-image-upload-layer-').concat(C.id,'"><strong>').concat(C.language.translate("Drop image"),"</strong><br>(").concat(C.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(C.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(C.id,'" role="button"></div></div>'));var l="";0<=o&&(t=" fr-active",0<=n&&n<o&&(t=""),l='<div class="fr-image-by-url-layer'.concat(t,' fr-layer" id="fr-image-by-url-layer-').concat(C.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(C.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">').concat(C.language.translate("Insert"),"</button></div></div>"));var p={buttons:i,upload_layer:s,by_url_layer:l,progress_bar:'<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=C.opts.imageInsertButtons.length&&(a=C.popups.create("image.insert",p)),C.$wp&&C.events.$on(C.$wp,"scroll",function(){S&&C.popups.isVisible("image.insert")&&be()}),function f(i){C.events.$on(i,"dragover dragenter",".fr-image-upload-layer",function(e){return E(this).addClass("fr-drop"),(C.browser.msie||C.browser.edge)&&e.preventDefault(),!1},!0),C.events.$on(i,"dragleave dragend",".fr-image-upload-layer",function(e){return E(this).removeClass("fr-drop"),(C.browser.msie||C.browser.edge)&&e.preventDefault(),!1},!0),C.events.$on(i,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),E(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=i.data("instance")||C;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),C.helpers.isIOS()&&C.events.$on(i,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){E(this).trigger("click")},!0),C.events.$on(i,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||C;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,S)}E(this).val("")},!0)}(a),a}function X(){S&&C.popups.get("image.alt").find("input").val(S.attr("alt")||"").trigger("change")}function q(){var e=C.popups.get("image.alt");e||(e=j()),k(),C.popups.refresh("image.alt"),C.popups.setContainer("image.alt",C.$sc);var t=Ae();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();C.popups.show("image.alt",a,i,t.outerHeight(),!0)}function j(e){if(e)return C.popups.onRefresh("image.alt",X),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(C.button.buildList(C.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(C.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(C.id,'" type="text" placeholder="').concat(C.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(C.language.translate("Update"),"</button></div></div>")},a=C.popups.create("image.alt",t);return C.$wp&&C.events.$on(C.$wp,"scroll.image-alt",function(){S&&C.popups.isVisible("image.alt")&&q()}),a}function J(){var e=C.popups.get("image.size"),t=S.get(0).style.height?S.get(0).style.height:"auto",a=S.get(0).style.width?S.get(0).style.width:"auto";if(S)if(Ce()){var i=S.parent();i.get(0).style.width||(i=S.parent().parent()),e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}else e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}function Q(){var e=C.popups.get("image.size");e||(e=Z()),k(),C.popups.refresh("image.size"),C.popups.setContainer("image.size",C.$sc);var t=Ae();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();C.popups.show("image.size",a,i,t.outerHeight(),!0)}function Z(e){if(e)return C.popups.onRefresh("image.size",J),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(C.button.buildList(C.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(C.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(C.id,'" type="text" name="width" placeholder="').concat(C.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(C.id,'" type="text" name="height" placeholder="').concat(C.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(C.language.translate("Update"),"</button></div></div>")},a=C.popups.create("image.size",t);return C.$wp&&C.events.$on(C.$wp,"scroll.image-size",function(){S&&C.popups.isVisible("image.size")&&Q()}),a}function ee(e,t,a,i){return e.pageX=t,w.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),A.call(this,e),T.call(this,e),++i}function te(e){if(e=e||Ae(),C.opts.trackChangesEnabled&&!C.helpers.isMobile()&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return C.track_changes.removeSpecialItem(e),C.popups.hideAll(),void ge(!0);e&&!1!==C.events.trigger("image.beforeRemove",[e])&&(C.popups.hideAll(),ye(),ge(!0),C.undo.canDo()||C.undo.saveStep(),e.get(0)==C.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(C.selection.setBefore(e.get(0).parentNode)||C.selection.setAfter(e.get(0).parentNode)||e.parent().after(_e.MARKERS),E(e.get(0).parentNode).remove()):(C.selection.setBefore(e.get(0))||C.selection.setAfter(e.get(0))||e.after(_e.MARKERS),e.remove()),C.html.fillEmptyBlocks(),C.selection.restore()),C.undo.saveStep())}function ae(e){var t=e.which;if(S&&(t==_e.KEYCODE.BACKSPACE||t==_e.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),te(),!1;if(S&&t==_e.KEYCODE.ESC){var a=S;return ge(!0),C.selection.setAfter(a.get(0)),C.selection.restore(),e.preventDefault(),!1}if(!S||t!=_e.KEYCODE.ARROW_LEFT&&t!=_e.KEYCODE.ARROW_RIGHT)return S&&t===_e.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),ge(!0),!1):S&&t!=_e.KEYCODE.F10&&!C.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var i=S.get(0);return ge(!0),t==_e.KEYCODE.ARROW_LEFT?C.selection.setBefore(i):C.selection.setAfter(i),C.selection.restore(),e.preventDefault(),!1}function ie(e){if(e&&"IMG"==e.tagName){if(C.node.hasClass(e,"fr-uploading")||C.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):C.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&C.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),r=0;r<i.length;r++)ie(i[r])}function re(e){if(!1===C.events.trigger("image.beforePasteUpload",[e]))return!1;S=E(e),x(),n(),be(),N(),S.on("load",function(){var t=[];x(),E(C.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&N(),E(this).data("events").filter(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&E(this).off("load")});for(var t=E(e).attr("src").split(","),a=atob(t[1]),i=[],r=0;r<a.length;r++)i.push(a.charCodeAt(r));W([new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"")})],S)}function ne(){C.opts.imagePaste?C.$el.find("img[data-fr-image-pasted]").each(function(e,i){if(C.opts.imagePasteProcess){var t=C.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=C.opts.imageResizeWithPercent?"%":"px"),E(i).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),ue(E(i),C.opts.imageDefaultDisplay,C.opts.imageDefaultAlign)}if(0===i.src.indexOf("data:"))re(i);else if(0===i.src.indexOf("blob:")||0===i.src.indexOf("http")&&C.opts.imageUploadRemoteUrls&&C.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=C.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){re(i)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",i.src=t.toDataURL("image/".concat(e))},a.src=(0===i.src.indexOf("blob:")?"":"".concat(C.opts.imageCORSProxy,"/"))+i.src}else 0!==i.src.indexOf("http")||0===i.src.indexOf("https://mail.google.com/mail")?(C.selection.save(),E(i).remove(),C.selection.restore()):E(i).removeAttr("data-fr-image-pasted")}):C.$el.find("img[data-fr-image-pasted]").remove()}function oe(e){var t=e.target.result,a=C.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=C.opts.imageResizeWithPercent?"%":"px"),C.undo.saveStep(),C.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var i=C.$el.find('img[data-fr-image-pasted="true"]');i&&ue(i,C.opts.imageDefaultDisplay,C.opts.imageDefaultAlign),C.events.trigger("paste.after")}function se(e,t){var a=new FileReader;a.onload=function i(e){var t=C.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=C.opts.imageResizeWithPercent?"%":"px"),C.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(t?' style="width: '.concat(t,';"'):"",">"));var a=C.$el.find('img[data-fr-image-pasted="true"]');a&&ue(a,C.opts.imageDefaultDisplay,C.opts.imageDefaultAlign),C.events.trigger("paste.after")}(t),a.readAsDataURL(e,t)}function le(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=(e.clipboardData||window.clipboardData).getData("text/html")||"",a=(new DOMParser).parseFromString(t,"text/html").querySelector("img");if(a){if(!a)return!1;var i=a.src,r=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))r=e.clipboardData.items[0].getAsFile();else for(var n=0;n<e.clipboardData.items.length&&!(r=e.clipboardData.items[n].getAsFile());n++);if(r)return se(r,i),!1}else{var o=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))o=e.clipboardData.items[0].getAsFile();else for(var s=0;s<e.clipboardData.items.length&&!(o=e.clipboardData.items[s].getAsFile());s++);if(o)return function l(e){var t=new FileReader;t.onload=oe,t.readAsDataURL(e)}(o),!1}}}function pe(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function fe(e){if("false"==E(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&C.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<_e.INSTANCES.length;t++)_e.INSTANCES[t]!=C&&_e.INSTANCES[t].events.trigger("image.hideResizer");C.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),C.helpers.isMobile()&&(C.events.disableBlur(),C.$el.blur(),C.events.enableBlur()),C.opts.iframe&&C.size.syncIframe(),S=E(this),ye(),x(),n(),C.browser.msie?(C.popups.areVisible()&&C.events.disableBlur(),C.win.getSelection&&(C.win.getSelection().removeAllRanges(),C.win.getSelection().addRange(C.doc.createRange()))):C.selection.clear(),C.helpers.isIOS()&&(C.events.disableBlur(),C.$el.blur()),C.button.bulkRefresh(),C.events.trigger("video.hideResizer")}function ge(e){S&&(function t(){return ce}()||!0===e)&&(C.toolbar.enable(),l.removeClass("fr-active"),C.popups.hideAll(),S=null,me(),p=null,f&&f.hide())}r[i]="Image cannot be loaded from the passed link.",r[c]="No link in upload response.",r[d]="Error during file upload.",r[m]="Parsing response failed.",r[D]="File is too large.",r[U]="Image file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var ce=!(r[8]="Image file is corrupted.");function de(){ce=!0}function me(){ce=!1}function ue(e,t,a){!C.opts.htmlUntouched&&C.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi".concat(a[0])),t&&e.addClass("fr-di".concat(t[0]))):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:C.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*C.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(C.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(C.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(C.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function he(e){if(void 0===e&&(e=Ae()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function ve(e){void 0===e&&(e=Ae());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function be(){var e=C.popups.get("image.insert");e||(e=V()),C.popups.isVisible("image.insert")||(k(),C.popups.refresh("image.insert"),C.popups.setContainer("image.insert",C.$sc));var t=Ae();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();C.popups.show("image.insert",a,i,t.outerHeight(!0),!0)}function ye(){if(S){C.events.disableBlur(),C.selection.clear();var e=C.doc.createRange();e.selectNode(S.get(0)),C.browser.msie&&e.collapse(!0),C.selection.get().addRange(e),C.events.enableBlur()}}function we(){return S}function Ae(){return Ce()?S.parents(".fr-img-caption").first():S}function Ce(){return!!S&&0<S.parents(".fr-img-caption").length}function Se(e){for(var t=document.createDocumentFragment();e.firstChild;){var a=e.removeChild(e.firstChild);t.appendChild(a)}e.parentNode.replaceChild(t,e)}return{_init:function Ee(){var i;(function e(){C.events.$on(C.$el,C._mousedown,"IMG"==C.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==E(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;C.helpers.isMobile()||C.selection.clear(),t=!0,C.popups.areVisible()&&C.events.disableBlur(),C.browser.msie&&(C.events.disableBlur(),C.$el.attr("contenteditable",!1)),C.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),C.events.$on(C.$el,C._mousedown,".fr-img-caption .fr-inner",function(e){C.core.hasFocus()||C.events.focus(),e.stopPropagation()}),C.events.$on(C.$el,"paste",".fr-img-caption .fr-inner",function(e){!0===C.opts.toolbarInline&&(C.toolbar.hide(),e.stopPropagation())}),C.events.$on(C.$el,C._mouseup,"IMG"==C.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==E(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),C.browser.msie&&(C.$el.attr("contenteditable",!0),C.events.enableBlur()))}),C.events.on("keyup",function(e){if(e.shiftKey&&""===C.selection.text().replace(/\n/g,"")&&C.keys.isArrow(e.which)){var t=C.selection.element(),a=C.selection.endElement();t&&"IMG"==t.tagName?O(E(t)):a&&"IMG"==a.tagName&&O(E(a))}},!0),C.events.on("drop",F),C.events.on("element.beforeDrop",G),C.events.on("mousedown window.mousedown",de),C.events.on("window.touchmove",me),C.events.on("mouseup window.mouseup",function(){if(S&&!C.helpers.isMobile())return ge(),!1;me()}),C.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&ge()}),C.events.on("image.resizeEnd",function(){C.opts.iframe&&C.size.syncIframe()}),C.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){ge(!(t=!1))}),C.events.on("modals.hide",function(){S&&(ye(),C.selection.clear())}),C.events.on("image.resizeEnd",function(){C.win.getSelection&&O(S)}),C.opts.imageAddNewLine&&C.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!C.node.isElement(t);)t=C.node.isLastSibling(t)?t.parentNode:null;C.node.isElement(t)&&(C.opts.enter===_e.ENTER_BR?e.after("<br>"):E(C.node.blockParent(e.get(0))).after("<".concat(C.html.defaultTag(),"><br></").concat(C.html.defaultTag(),">")))})})(),"IMG"==C.el.tagName&&C.$el.addClass("fr-view"),C.events.$on(C.$el,C.helpers.isMobile()&&!C.helpers.isWindowsPhone()?"touchend":"click","IMG"==C.el.tagName?null:'img:not([contenteditable="false"])',fe),C.helpers.isMobile()&&(C.events.$on(C.$el,"touchstart","IMG"==C.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),C.events.$on(C.$el,"touchmove",function(){a=!0})),C.$wp?(C.events.on("window.keydown keydown",ae,!0),C.events.on("keyup",function(e){if(S&&e.which==_e.KEYCODE.ENTER)return!1},!0),C.events.$on(C.$el,"keydown",function(){var e=C.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&C.node.isLastSibling(e))&&(e=e.parentNode),C.node.hasClass(e,"fr-inner")||(C.node.hasClass(e,"fr-img-caption")||(e=E(e).parents(".fr-img-caption").get(0)),C.node.hasClass(e,"fr-img-caption")&&(C.opts.trackChangesEnabled||E(e).after(_e.INVISIBLE_SPACE+_e.MARKERS),C.selection.restore()))})):C.events.$on(C.$win,"keydown",ae),C.events.on("toolbar.esc",function(){if(S){if(C.$wp)C.events.disableBlur(),C.events.focus();else{var e=S;ge(!0),C.selection.setAfter(e.get(0)),C.selection.restore()}return!1}},!0),C.events.on("toolbar.focusEditor",function(){if(S)return!1},!0),C.events.on("window.cut window.copy",function(e){if(S&&C.popups.isVisible("image.edit")&&!C.popups.get("image.edit").find(":focus").length){var t=Ae();Ce()?(t.before(_e.START_MARKER),t.after(_e.END_MARKER),C.selection.restore(),C.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(ye(),C.paste.saveCopiedText(S.get(0).outerHTML,S.attr("alt"))),"copy"==e.type?setTimeout(function(){O(S)}):(ge(!0),C.undo.saveStep(),setTimeout(function(){C.undo.saveStep()},0))}},!0),C.browser.msie&&C.events.on("keydown",function(e){if(!C.selection.isCollapsed()||!S)return!0;var t=e.which;t==_e.KEYCODE.C&&C.keys.ctrlKey(e)?C.events.trigger("window.copy"):t==_e.KEYCODE.X&&C.keys.ctrlKey(e)&&C.events.trigger("window.cut")}),C.events.$on(E(C.o_win),"keydown",function(e){var t=e.which;if(S&&t==_e.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),C.events.$on(C.$win,"keydown",function(e){var t=e.which;S&&S.hasClass("fr-uploading")&&t==_e.KEYCODE.ESC&&S.trigger("abortUpload")}),C.events.on("destroy",function(){S&&S.hasClass("fr-uploading")&&S.trigger("abortUpload")}),C.events.on("paste.before",le),C.events.on("paste.beforeCleanup",pe),C.events.on("paste.after",ne),C.events.on("html.set",h),C.events.on("html.inserted",h),h(),C.events.on("destroy",function(){s=[]}),C.events.on("html.processGet",ie),C.opts.imageOutputSize&&C.events.on("html.beforeGet",function(){i=C.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=i[e].style.width||E(i[e]).width(),a=i[e].style.height||E(i[e]).height();t&&i[e].setAttribute("width","".concat(t).replace(/px/,"")),a&&i[e].setAttribute("height","".concat(a).replace(/px/,""))}}),C.opts.iframe&&C.events.on("image.loaded",C.size.syncIframe),C.$wp&&(v(),C.events.on("contentChanged",v)),C.events.$on(E(C.o_win),"orientationchange.image",function(){setTimeout(function(){S&&O(S)},100)}),$(!0),V(!0),Z(!0),j(!0),C.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return te(e),!1})},showInsertPopup:function Re(){var e=C.$tb.find('.fr-command[data-cmd="insertImage"]'),t=C.popups.get("image.insert");if(t||(t=V()),k(),!t.hasClass("fr-active"))if(C.popups.refresh("image.insert"),C.popups.setContainer("image.insert",C.$tb),e.isVisible()){var a=C.button.getPosition(e),i=a.left,r=a.top;C.popups.show("image.insert",i,r,e.outerHeight())}else C.position.forSelection(t),C.popups.show("image.insert")},showLayer:function De(e){var t,a,i=C.popups.get("image.insert");if(S||C.opts.toolbarInline){if(S){var r=Ae();Ce()&&(r=r.find(".fr-img-wrap")),a=r.offset().top+r.outerHeight(),t=r.offset().left}}else{var n=C.$tb.find('.fr-command[data-cmd="insertImage"]');t=n.offset().left,a=n.offset().top+(C.opts.toolbarBottom?10:n.outerHeight()-10)}!S&&C.opts.toolbarInline&&(a=i.offset().top-C.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),C.popups.show("image.insert",t,a,S?S.outerHeight():0),C.accessibility.focusPopup(i)},refreshUploadButton:function Ue(e){var t=C.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function xe(e){var t=C.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:W,insertByURL:function Te(){var e=C.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){N(),I(C.language.translate("Loading image"));var t=e.val().trim();if(C.opts.imageUploadRemoteUrls&&C.opts.imageCORSProxy&&C.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?W([new Blob([this.response],{type:this.response.type||"image/png"})],S):P(i)},a.onerror=function(){L(t,!0,[],S)},a.open("GET","".concat(C.opts.imageCORSProxy,"/").concat(t),!0),a.responseType="blob",a.send()}else L(t,!0,[],S);e.val(""),e.blur()}},align:function Pe(e){var t=Ae();t.removeClass("fr-fir fr-fil"),!C.opts.htmlUntouched&&C.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):ue(t,ve(),e),ye(),x(),n(),C.selection.clear()},refreshAlign:function $e(e){S&&e.find("> *").first().replaceWith(C.icon.create("image-align-".concat(he())))},refreshAlignOnShow:function Ne(e,t){S&&t.find('.fr-command[data-param1="'.concat(he(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ke(e){var t=Ae();t.removeClass("fr-dii fr-dib"),!C.opts.htmlUntouched&&C.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):ue(t,e,he()),ye(),x(),n(),C.selection.clear()},refreshDisplayOnShow:function Ie(e,t){S&&t.find('.fr-command[data-param1="'.concat(ve(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:be,back:function e(){S?(C.events.disableBlur(),E(".fr-popup input:focus").blur(),O(S)):(C.events.disableBlur(),C.selection.restore(),C.events.enableBlur(),C.popups.hide("image.insert"),C.toolbar.showInline())},get:we,getEl:Ae,insert:L,showProgressBar:N,remove:te,hideProgressBar:k,applyStyle:function ze(e,t,a){if(void 0===t&&(t=C.opts.imageStyles),void 0===a&&(a=C.opts.imageMultipleStyles),!S)return!1;var i=Ae();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),i.removeClass(r.join(" "))}"object"==Me(t[e])?(i.removeAttr("style"),i.css(t[e].style)):i.toggleClass(e),O(S)},showAltPopup:q,showSizePopup:Q,setAlt:function Oe(e){if(S){var t=C.popups.get("image.alt");S.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),O(S)}},setSize:function Be(e,t){if(S){var a=C.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;S.removeAttr("width").removeAttr("height"),e.match(i)?S.css("width",e):S.css("width",""),t.match(i)?S.css("height",t):S.css("height",""),Ce()&&(S.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?S.parents(".fr-img-caption").css("width",e):S.parents(".fr-img-caption").css("width",""),t.match(i)?S.parents(".fr-img-caption").css("height",t):S.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),O(S)}},toggleCaption:function Le(){var e;if(S&&!Ce()){((e=S).parent().is("a")||S.parent().is("p"))&&(e=S.parent());var t,a,i=S.parents("ul")&&0<S.parents("ul").length?S.parents("ul"):S.parents("ol")&&0<S.parents("ol").length?S.parents("ol"):[];if(0<i.length){var r=i.find("li").length,n=S.parents("li"),o=document.createElement("li");r-1===n.index()&&(i.append(o),o.innerHTML="&nbsp;")}e.attr("style")?a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"":e.attr("width")&&(a=e.attr("width"));var s=C.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":S.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(C.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+S.attr("class")+'" style="'+(C.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span></div>'),e.wrap('<span class="fr-img-wrap"></span>'),S.after('<span class="fr-inner"'.concat(C.browser.mozilla?"":' contenteditable="true"',">").concat(_e.START_MARKER).concat(C.language.translate("Image Caption")).concat(_e.END_MARKER,"</span>")),S.parents(".fr-img-caption").css("width",s),1<S.parents(".fr-img-space-wrap").length&&(Se(document.querySelector(".fr-img-space-wrap")),Se(document.querySelector(".fr-img-space-wrap2"))),ge(!0),C.selection.restore()}else{if(e=Ae(),S.insertBefore(e),null!==e[0].querySelector("a")){for(var l,p=e[0].querySelector("a"),f=document.createElement("a"),g=0,c=p.attributes,d=c.length;g<d;g++)l=c[g],f.setAttribute(l.nodeName,l.nodeValue);S.wrap(f)}S.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),1<S.parents(".fr-img-space-wrap").length&&(Se(document.querySelector(".fr-img-space-wrap")),Se(document.querySelector(".fr-img-space-wrap2"))),O(S)}},hasCaption:Ce,exitEdit:ge,edit:O}},_e.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),_e.RegisterShortcut(_e.KEYCODE.P,"insertImage",null,"P"),_e.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),_e.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),_e.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),_e.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),_e.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),_e.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),_e.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),_e.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),_e.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),_e.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),_e.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),_e.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=_e.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("image-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),_e.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),_e.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),_e.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),_e.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),_e.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),_e.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),_e.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),_e.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),_e.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];"object"==Me(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'.concat(a,'">').concat(this.language.translate(i),"</a></li>")}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=i.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),_e.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),_e.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),_e.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),_e.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),_e.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),_e.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),_e.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),_e.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}})});
!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";function Me(e){return(Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}_e=_e&&_e.hasOwnProperty("default")?_e["default"]:_e,Object.assign(_e.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(_e.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadToAzure:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),_e.PLUGINS.image=function(A){var C,l,p,f,s,a,S=A.$,E="https://i.froala.com/upload",t=!1,i=1,c=2,d=3,m=4,R=5,D=6,r={};function g(){var e=A.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),C&&e.val(C.attr("src")),e.trigger("change")}function n(){var e=A.popups.get("image.edit");if(e||(e=$()),e){var t=Ae();Ce()&&(t=t.find(".fr-img-wrap")),A.popups.setContainer("image.edit",A.$sc),A.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=(function r(e){for(var t=0;e;){if("BODY"==e.tagName){var a=e.scrollTop||document.documentElement.scrollTop;t+=e.offsetTop-a+e.clientTop}else t+=e.offsetTop-e.scrollTop+e.clientTop;e=e.offsetParent}return{y:t}}(C[0]).y+t.outerHeight())/2.5;t.offset().top<0||!A.opts.height||A.helpers.isMobile()||A.opts.iframe?i=t.offset().top+t.outerHeight():Ce()&&A.opts.height&&(i=t.offset().top+t.outerHeight()/4),C.hasClass("fr-uploading")?N():A.popups.show("image.edit",a,i,t.outerHeight(),!0)}}function u(){k()}function o(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":he(e);ue(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function h(){for(var e,t="IMG"==A.el.tagName?[A.el]:A.el.querySelectorAll("img"),a=0;a<t.length;a++){var i=S(t[a]);!A.opts.htmlUntouched&&A.opts.useClasses?((A.opts.imageDefaultAlign||A.opts.imageDefaultDisplay)&&(0<(e=i).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi".concat(he(e)[0])),e.addClass("fr-di".concat(ve(e)[0])),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),A.opts.imageTextNear||(0<i.parents(".fr-img-caption").length?i.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):i.removeClass("fr-dii").addClass("fr-dib"))):A.opts.htmlUntouched||A.opts.useClasses||(A.opts.imageDefaultAlign||A.opts.imageDefaultDisplay)&&o(i),A.opts.iframe&&i.on("load",A.size.syncIframe)}}function v(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(A.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),S(a[t]).toggleClass("fr-draggable",A.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&A.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var r=a[t].parentNode.parentNode;A.browser.mozilla||r.setAttribute("contenteditable",!1),r.setAttribute("draggable",!1),r.classList.add("fr-draggable");var n=a[t].nextSibling;n&&!A.browser.mozilla&&n.setAttribute("contenteditable",!0)}if(s)for(t=0;t<s.length;t++)i.indexOf(s[t].getAttribute("src"))<0&&A.events.trigger("image.removed",[S(s[t])]);if(s&&e){var o=[];for(t=0;t<s.length;t++)o.push(s[t].getAttribute("src"));for(t=0;t<a.length;t++)o.indexOf(a[t].getAttribute("src"))<0&&A.events.trigger("image.loaded",[S(a[t])])}s=a}function U(){if(l||function o(){var e;A.shared.$image_resizer?(l=A.shared.$image_resizer,f=A.shared.$img_overlay,A.events.on("destroy",function(){S("body").first().append(l.removeClass("fr-active"))},!0)):(A.shared.$image_resizer=S(document.createElement("div")).attr("class","fr-image-resizer"),l=A.shared.$image_resizer,A.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),A.opts.imageResize&&(l.append(b("nw")+b("ne")+b("sw")+b("se")),A.shared.$img_overlay=S(document.createElement("div")).attr("class","fr-image-overlay"),f=A.shared.$img_overlay,e=l.get(0).ownerDocument,S(e).find("body").first().append(f)));A.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,A.opts.imageResize&&(f.remove(),f=null)},!0),A.helpers.isMobile()||A.events.$on(S(A.o_win),"resize",function(){C&&!C.hasClass("fr-uploading")?ge(!0):C&&(U(),be(),N(!1))});if(A.opts.imageResize){e=l.get(0).ownerDocument,A.events.$on(l,A._mousedown,".fr-handler",w),A.events.$on(S(e),A._mousemove,x),A.events.$on(S(e.defaultView||e.parentWindow),A._mouseup,T),A.events.$on(f,"mouseleave",T);var i=1,r=null,n=0;A.events.on("keydown",function(e){if(C){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-n)&&(i=1),(a==_e.KEYCODE.EQUALS||A.browser.mozilla&&a==_e.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=ee.call(this,e,1,1,i):(a==_e.KEYCODE.HYPHEN||A.browser.mozilla&&a==_e.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=ee.call(this,e,2,-1,i):A.keys.ctrlKey(e)||a!=_e.KEYCODE.ENTER||(C.before("<br>"),O(C)),r=a,n=e.timeStamp}},!0),A.events.on("keyup",function(){i=1})}}(),!C)return!1;var e=A.$wp||A.$sc;e.append(l),l.data("instance",A);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=A.helpers.getPX(e.css("border-left-width")),t-=A.helpers.getPX(e.css("border-top-width")),A.$el.is("img")&&A.$sc.is("body")&&(a=t=0);var i=Ae();Ce()&&(i=i.find(".fr-img-wrap"));var r=0,n=0;A.opts.iframe&&(r=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-top")),n=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(A.opts.iframe?i.offset().top+r:i.offset().top+t)-1).css("left",(A.opts.iframe?i.offset().left+n:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function b(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function y(e){Ce()?C.parents(".fr-img-caption").css("width",e):C.css("width",e)}function w(e){if(!A.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;A.undo.canDo()||A.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=A.$oel.get(0).ownerDocument,i=a.defaultView||a.parentWindow,r=!1;try{r=i.location!=i.parent.location&&!(i.$&&i.$.FE)}catch(s){}r&&i.frameElement&&(t+=A.helpers.getPX(S(i.frameElement).offset().left)+i.frameElement.clientLeft)}(p=S(this)).data("start-x",t),p.data("start-width",C.width()),p.data("start-height",C.height());var n=C.width();if(A.opts.imageResizeWithPercent){var o=C.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;n=(n/S(o).outerWidth()*100).toFixed(2)+"%"}y(n),f.show(),A.popups.hideAll(),me()}function x(e){if(!A.core.sameInstance(l))return!0;var t;if(p&&C){if(e.preventDefault(),A.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var i=a-p.data("start-x"),r=p.data("start-width");if((p.hasClass("fr-hnw")||p.hasClass("fr-hsw"))&&(i=0-i),A.opts.imageResizeWithPercent){var n=C.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;r=((r+i)/S(n).outerWidth()*100).toFixed(2),A.opts.imageRoundPercent&&(r=Math.round(r)),y("".concat(r,"%")),(t=Ce()?(A.helpers.getPX(C.parents(".fr-img-caption").css("width"))/S(n).outerWidth()*100).toFixed(2):(A.helpers.getPX(C.css("width"))/S(n).outerWidth()*100).toFixed(2))===r||A.opts.imageRoundPercent||y("".concat(t,"%")),C.css("height","").removeAttr("height")}else r+i>=A.opts.imageMinWidth&&(y(r+i),t=Ce()?A.helpers.getPX(C.parents(".fr-img-caption").css("width")):A.helpers.getPX(C.css("width"))),t!==r+i&&y(t),((C.attr("style")||"").match(/(^height:)|(; *height:)/)||C.attr("height"))&&(C.css("height",p.data("start-height")*C.width()/p.data("start-width")),C.removeAttr("height"));U(),A.events.trigger("image.resize",[we()])}}function T(e){if(!A.core.sameInstance(l))return!0;if(p&&C){if(e&&e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;p=null,f.hide(),U(),n(),A.undo.saveStep(),A.events.trigger("image.resizeEnd",[we()])}else l.removeClass("fr-active")}function P(e,t,a){A.edit.on(),C&&C.addClass("fr-error"),r[e]?z(A.language.translate(r[e])):z(A.language.translate("Something went wrong. Please try again.")),!C&&a&&te(a),A.events.trigger("image.error",[{code:e,message:r[e]},t,a])}function $(e){if(e)return A.$wp&&A.events.$on(A.$wp,"scroll.image-edit",function(){C&&A.popups.isVisible("image.edit")&&(A.events.disableBlur(),n())}),!0;var t="";if(0<A.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons">\n '.concat(A.button.buildList(A.opts.imageEditButtons),"\n </div>")};return A.popups.create("image.edit",a)}return!1}function N(e){var t=A.popups.get("image.insert");if(t||(t=F()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),C){var a=Ae();A.popups.setContainer("image.insert",A.$sc);var i=a.offset().left,r=a.offset().top+a.height();A.popups.show("image.insert",i,r,a.outerHeight())}void 0===e&&I(A.language.translate("Uploading"),0)}function k(e){var t=A.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||A.$el.find("img.fr-error").length)){if(A.events.focus(),A.$el.find("img.fr-error").length&&(A.$el.find("img.fr-error").remove(),A.undo.saveStep(),A.undo.run(),A.undo.dropRedo()),!A.$wp&&C){var a=C;ge(!0),A.selection.setAfter(a.get(0)),A.selection.restore()}A.popups.hide("image.insert")}}function I(e,t){var a=A.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function z(e){N();var t=A.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),A.events.disableBlur(),a.focus()}function O(e){fe.call(e.get(0))}function B(){var e=S(this);A.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),O(e),A.events.trigger("image.loaded",[e])}function L(o,e,s,l,p){l&&"string"==typeof l&&(l=A.$(l)),A.edit.off(),I(A.language.translate("Loading image")),e&&(o=A.helpers.sanitizeURL(o));var t=new Image;t.onload=function(){var e,t;if(l){A.undo.canDo()||l.hasClass("fr-uploading")||A.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),A.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),!A.opts.trackChangesEnabled||l[0].parentNode&&"SPAN"===l[0].parentNode.tagName&&l[0].parentNode.hasAttribute("data-tracking")||A.track_changes.replaceSpecialItem(l),l.replaceWith(e)):e=l;for(var i=e.get(0).attributes,r=0;r<i.length;r++){var n=i[r];0===n.nodeName.indexOf("data-")?e.removeAttr(n.nodeName):s&&s.hasOwnProperty(n.nodeName)&&e.removeAttr(n.nodeName)}if(void 0!==s)for(t in s)s.hasOwnProperty(t)&&"link"!=t&&e.attr("".concat(t),s[t]);e.on("load",B),e.attr("src",o),A.edit.on(),v(!1),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger(a?"image.replaced":"image.inserted",[e,p])}else(e=Y(o,s,B))&&(v(!1),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger("image.inserted",[e,p]))},t.onerror=function(){P(i)},N(A.language.translate("Loading image")),t.src=o}function _(e,t,a){I(A.language.translate("Loading image"));var i=this.status,r=this.response,n=this.responseXML,o=this.responseText;try{if(A.opts.imageUploadToS3||A.opts.imageUploadToAzure)if(201==i){var s;if(A.opts.imageUploadToAzure){if(!1===A.events.trigger("image.uploadedToAzure",[this.responseURL,a,r],!0))return A.edit.on(),!1;s=t}else s=function p(e){try{var t=S(e).find("Location").text(),a=S(e).find("Key").text();return!1===A.events.trigger("image.uploadedToS3",[t,a,e],!0)?(A.edit.on(),!1):t}catch(i){return P(m,e),!1}}(n);s&&L(s,!1,[],e,r||n)}else P(m,r||n,e);else if(200<=i&&i<300){var l=function f(e){try{if(!1===A.events.trigger("image.uploaded",[e],!0))return A.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(P(c,e),!1)}catch(a){return P(m,e),!1}}(o);l&&L(l.link,!1,l,e,r||o)}else P(d,r||o,e)}catch(g){P(m,r||o,e)}}function M(){P(m,this.response||this.responseText||this.responseXML)}function K(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;I(A.language.translate("Uploading"),t)}}function Y(e,t,a){var i,r=S(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-".concat(i,'="').concat(t[i],'"'),r.attr("".concat(i),t[i]));var n=A.opts.imageDefaultWidth;n&&"auto"!=n&&(n=A.opts.imageResizeWithPercent?"100%":"".concat(n,"px")),r.attr("style",n?"width: ".concat(n,";"):""),ue(r,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),A.edit.on(),A.events.focus(!0),A.selection.restore(),A.undo.saveStep(),A.opts.imageSplitHTML?A.markers.split():A.markers.insert(),A.html.wrap();var o=A.$el.find(".fr-marker");if(o.length)o.parent().is("hr")&&o.parent().after(o),A.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(r);else{if(A.opts.trackChangesEnabled)return k(!0),!1;A.$el.append(r)}return A.selection.clear(),r}function H(){A.edit.on(),k(!0)}function W(e,t){if(void 0!==e&&0<e.length){if(!1===A.events.trigger("image.beforeUpload",[e,t]))return!1;var a,i=e[0];if(!(null!==A.opts.imageUploadURL&&A.opts.imageUploadURL!=E||A.opts.imageUploadToS3||A.opts.imageUploadToAzure))return function y(r,n){var o=new FileReader;o.onload=function(){var e=o.result;if(o.result.indexOf("svg+xml")<0){for(var t=atob(o.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r.type})),n&&n.data("fr-old-src",n.attr("src")),A.image.insert(e,!1,null,n)}else A.image.insert(e,null,null,A.image.get())},N(),o.readAsDataURL(r)}(i,t||C),!1;if(i.name||(i.name=(new Date).getTime()+"."+(i.type||"image/jpeg").replace(/image\//g,"")),i.size>A.opts.imageMaxSize)return P(R),!1;if(A.opts.imageAllowedTypes.indexOf(i.type.replace(/image\//g,""))<0)return P(D),!1;if(A.drag_support.formdata&&(a=A.drag_support.formdata?new FormData:null),a){var r;if(!1!==A.opts.imageUploadToS3)for(r in a.append("key",A.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",i.type),A.opts.imageUploadToS3.params)A.opts.imageUploadToS3.params.hasOwnProperty(r)&&a.append(r,A.opts.imageUploadToS3.params[r]);for(r in A.opts.imageUploadParams)A.opts.imageUploadParams.hasOwnProperty(r)&&a.append(r,A.opts.imageUploadParams[r]);a.append(A.opts.imageUploadParam,i,i.name);var n,o,s=A.opts.imageUploadURL,l=A.opts.imageUploadMethod;A.opts.imageUploadToS3&&(s=A.opts.imageUploadToS3.uploadURL?A.opts.imageUploadToS3.uploadURL:"https://".concat(A.opts.imageUploadToS3.region,".amazonaws.com/").concat(A.opts.imageUploadToS3.bucket)),A.opts.imageUploadToAzure&&(n=s=A.opts.imageUploadToAzure.uploadURL?"".concat(A.opts.imageUploadToAzure.uploadURL,"/").concat(i.name):encodeURI("https://".concat(A.opts.imageUploadToAzure.account,".blob.core.windows.net/").concat(A.opts.imageUploadToAzure.container,"/").concat(i.name)),A.opts.imageUploadToAzure.SASToken&&(s+=A.opts.imageUploadToAzure.SASToken),l="PUT");var p=A.core.getXHR(s,l);if(A.opts.imageUploadToAzure){var f=(new Date).toUTCString();if(!A.opts.imageUploadToAzure.SASToken&&A.opts.imageUploadToAzure.accessKey){var g=A.opts.imageUploadToAzure.account,c=A.opts.imageUploadToAzure.container;if(A.opts.imageUploadToAzure.uploadURL){var d=A.opts.imageUploadToAzure.uploadURL.split("/");c=d.pop(),g=d.pop().split(".")[0]}var m="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(f,"\nx-ms-version:2019-07-07"),u=encodeURI("/"+g+"/"+c+"/"+i.name),h=l+"\n\n\n"+i.size+"\n\n"+i.type+"\n\n\n\n\n\n\n"+m+"\n"+u,v=A.cryptoJSPlugin.cryptoJS.HmacSHA256(h,A.cryptoJSPlugin.cryptoJS.enc.Base64.parse(A.opts.imageUploadToAzure.accessKey)).toString(A.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+g+":"+v;o=v,p.setRequestHeader("Authorization",b)}for(r in p.setRequestHeader("x-ms-version","2019-07-07"),p.setRequestHeader("x-ms-date",f),p.setRequestHeader("Content-Type",i.type),p.setRequestHeader("x-ms-blob-type","BlockBlob"),A.opts.imageUploadParams)A.opts.imageUploadParams.hasOwnProperty(r)&&p.setRequestHeader(r,A.opts.imageUploadParams[r]);for(r in A.opts.imageUploadToAzure.params)A.opts.imageUploadToAzure.params.hasOwnProperty(r)&&p.setRequestHeader(r,A.opts.imageUploadToAzure.params[r])}!function w(t,a,i,r,n,o){function s(){var e=S(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),A.placeholder.refresh(),O(e),U(),N(),A.edit.off(),t.onload=function(){_.call(t,e,n,o)},t.onerror=M,t.upload.onprogress=K,t.onabort=H,S(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),r?(r.attr("src",r.data("fr-old-src")),r.removeClass("fr-uploading")):e.remove(),ge(!0))}),t.send(A.opts.imageUploadToAzure?i:a)}var l=new FileReader;l.onload=function(){var e=l.result;if(l.result.indexOf("svg+xml")<0){for(var t=atob(l.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}r?(r.on("load",s),r.on("error",function(){s(),S(this).off("error")}),A.edit.on(),A.undo.saveStep(),r.data("fr-old-src",r.attr("src")),r.attr("src",e)):Y(e,null,s)},l.readAsDataURL(i)}(p,a,i,t||C,n,o)}}}function G(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function V(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=A.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!A.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;A.markers.remove(),A.markers.insertAtPoint(e.originalEvent),A.$el.find(".fr-marker").replaceWith(_e.MARKERS),0===A.$el.find(".fr-marker").length&&A.selection.setAtEnd(A.el),A.popups.hideAll();var i=A.popups.get("image.insert");i||(i=F()),A.popups.setContainer("image.insert",A.$sc);var r=e.originalEvent.pageX,n=e.originalEvent.pageY;if(A.opts.iframe){var o=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-top")),s=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-left"));n+=A.$iframe.offset().top+o,r+=A.$iframe.offset().left+s}return A.popups.show("image.insert",r,n),N(),0<=A.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(ge(!0),W(t.files)):P(D),e.preventDefault(),e.stopPropagation(),!1}}}function F(e){if(e)return A.popups.onRefresh("image.insert",g),A.popups.onHide("image.insert",u),!0;var t,a,i="";A.opts.imageUpload||-1===A.opts.imageInsertButtons.indexOf("imageUpload")||A.opts.imageInsertButtons.splice(A.opts.imageInsertButtons.indexOf("imageUpload"),1);var r=A.button.buildList(A.opts.imageInsertButtons);""!==r&&(i='<div class="fr-buttons fr-tabs">'.concat(r,"</div>"));var n=A.opts.imageInsertButtons.indexOf("imageUpload"),o=A.opts.imageInsertButtons.indexOf("imageByURL"),s="";0<=n&&(t=" fr-active",0<=o&&o<n&&(t=""),s='<div class="fr-image-upload-layer'.concat(t,' fr-layer" id="fr-image-upload-layer-').concat(A.id,'"><strong>').concat(A.language.translate("Drop image"),"</strong><br>(").concat(A.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(A.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(A.id,'" role="button"></div></div>'));var l="";0<=o&&(t=" fr-active",0<=n&&n<o&&(t=""),l='<div class="fr-image-by-url-layer'.concat(t,' fr-layer" id="fr-image-by-url-layer-').concat(A.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(A.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">').concat(A.language.translate("Insert"),"</button></div></div>"));var p={buttons:i,upload_layer:s,by_url_layer:l,progress_bar:'<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=A.opts.imageInsertButtons.length&&(a=A.popups.create("image.insert",p)),A.$wp&&A.events.$on(A.$wp,"scroll",function(){C&&A.popups.isVisible("image.insert")&&be()}),function f(i){A.events.$on(i,"dragover dragenter",".fr-image-upload-layer",function(e){return S(this).addClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(i,"dragleave dragend",".fr-image-upload-layer",function(e){return S(this).removeClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(i,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),S(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=i.data("instance")||A;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),A.helpers.isIOS()&&A.events.$on(i,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){S(this).trigger("click")},!0),A.events.$on(i,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||A;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,C)}S(this).val("")},!0)}(a),a}function X(){C&&A.popups.get("image.alt").find("input").val(C.attr("alt")||"").trigger("change")}function q(){var e=A.popups.get("image.alt");e||(e=j()),k(),A.popups.refresh("image.alt"),A.popups.setContainer("image.alt",A.$sc);var t=Ae();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();A.popups.show("image.alt",a,i,t.outerHeight(),!0)}function j(e){if(e)return A.popups.onRefresh("image.alt",X),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(A.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(A.id,'" type="text" placeholder="').concat(A.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},a=A.popups.create("image.alt",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-alt",function(){C&&A.popups.isVisible("image.alt")&&q()}),a}function J(){var e=A.popups.get("image.size"),t=C.get(0).style.height?C.get(0).style.height:"auto",a=C.get(0).style.width?C.get(0).style.width:"auto";if(C)if(Ce()){var i=C.parent();i.get(0).style.width||(i=C.parent().parent()),e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}else e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}function Q(){var e=A.popups.get("image.size");e||(e=Z()),k(),A.popups.refresh("image.size"),A.popups.setContainer("image.size",A.$sc);var t=Ae();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();A.popups.show("image.size",a,i,t.outerHeight(),!0)}function Z(e){if(e)return A.popups.onRefresh("image.size",J),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(A.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(A.id,'" type="text" name="width" placeholder="').concat(A.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(A.id,'" type="text" name="height" placeholder="').concat(A.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},a=A.popups.create("image.size",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-size",function(){C&&A.popups.isVisible("image.size")&&Q()}),a}function ee(e,t,a,i){return e.pageX=t,w.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),x.call(this,e),T.call(this,e),++i}function te(e){if(e=e||Ae(),A.opts.trackChangesEnabled&&!A.helpers.isMobile()&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return A.track_changes.removeSpecialItem(e),A.popups.hideAll(),void ge(!0);e&&!1!==A.events.trigger("image.beforeRemove",[e])&&(A.popups.hideAll(),ye(),ge(!0),A.undo.canDo()||A.undo.saveStep(),e.get(0)==A.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(A.selection.setBefore(e.get(0).parentNode)||A.selection.setAfter(e.get(0).parentNode)||e.parent().after(_e.MARKERS),S(e.get(0).parentNode).remove()):(A.selection.setBefore(e.get(0))||A.selection.setAfter(e.get(0))||e.after(_e.MARKERS),e.remove()),A.html.fillEmptyBlocks(),A.selection.restore()),A.undo.saveStep())}function ae(e){var t=e.which;if(C&&(t==_e.KEYCODE.BACKSPACE||t==_e.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),te(),!1;if(C&&t==_e.KEYCODE.ESC){var a=C;return ge(!0),A.selection.setAfter(a.get(0)),A.selection.restore(),e.preventDefault(),!1}if(!C||t!=_e.KEYCODE.ARROW_LEFT&&t!=_e.KEYCODE.ARROW_RIGHT)return C&&t===_e.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),ge(!0),!1):C&&t!=_e.KEYCODE.F10&&!A.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var i=C.get(0);return ge(!0),t==_e.KEYCODE.ARROW_LEFT?A.selection.setBefore(i):A.selection.setAfter(i),A.selection.restore(),e.preventDefault(),!1}function ie(e){if(e&&"IMG"==e.tagName){if(A.node.hasClass(e,"fr-uploading")||A.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):A.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&A.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),r=0;r<i.length;r++)ie(i[r])}function re(e){if(!1===A.events.trigger("image.beforePasteUpload",[e]))return!1;C=S(e),U(),n(),be(),N(),C.on("load",function(){var t=[];U(),S(A.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&N(),S(this).data("events").filter(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&S(this).off("load")});for(var t=S(e).attr("src").split(","),a=atob(t[1]),i=[],r=0;r<a.length;r++)i.push(a.charCodeAt(r));W([new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"")})],C)}function ne(){A.opts.imagePaste?A.$el.find("img[data-fr-image-pasted]").each(function(e,i){if(A.opts.imagePasteProcess){var t=A.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=A.opts.imageResizeWithPercent?"%":"px"),S(i).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),ue(S(i),A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign)}if(0===i.src.indexOf("data:"))re(i);else if(0===i.src.indexOf("blob:")||0===i.src.indexOf("http")&&A.opts.imageUploadRemoteUrls&&A.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=A.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){re(i)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",i.src=t.toDataURL("image/".concat(e))},a.src=(0===i.src.indexOf("blob:")?"":"".concat(A.opts.imageCORSProxy,"/"))+i.src}else 0!==i.src.indexOf("http")||0===i.src.indexOf("https://mail.google.com/mail")?(A.selection.save(),S(i).remove(),A.selection.restore()):S(i).removeAttr("data-fr-image-pasted")}):A.$el.find("img[data-fr-image-pasted]").remove()}function oe(e){var t=e.target.result,a=A.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=A.opts.imageResizeWithPercent?"%":"px"),A.undo.saveStep(),A.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var i=A.$el.find('img[data-fr-image-pasted="true"]');i&&ue(i,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),A.events.trigger("paste.after")}function se(e,t){var a=new FileReader;a.onload=function i(e){var t=A.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=A.opts.imageResizeWithPercent?"%":"px"),A.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(t?' style="width: '.concat(t,';"'):"",">"));var a=A.$el.find('img[data-fr-image-pasted="true"]');a&&ue(a,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),A.events.trigger("paste.after")}(t),a.readAsDataURL(e,t)}function le(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=(e.clipboardData||window.clipboardData).getData("text/html")||"",a=(new DOMParser).parseFromString(t,"text/html").querySelector("img");if(a){if(!a)return!1;var i=a.src,r=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))r=e.clipboardData.items[0].getAsFile();else for(var n=0;n<e.clipboardData.items.length&&!(r=e.clipboardData.items[n].getAsFile());n++);if(r)return se(r,i),!1}else{var o=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))o=e.clipboardData.items[0].getAsFile();else for(var s=0;s<e.clipboardData.items.length&&!(o=e.clipboardData.items[s].getAsFile());s++);if(o)return function l(e){var t=new FileReader;t.onload=oe,t.readAsDataURL(e)}(o),!1}}}function pe(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function fe(e){if("false"==S(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&A.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<_e.INSTANCES.length;t++)_e.INSTANCES[t]!=A&&_e.INSTANCES[t].events.trigger("image.hideResizer");A.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),A.helpers.isMobile()&&(A.events.disableBlur(),A.$el.blur(),A.events.enableBlur()),A.opts.iframe&&A.size.syncIframe(),C=S(this),ye(),U(),n(),A.browser.msie?(A.popups.areVisible()&&A.events.disableBlur(),A.win.getSelection&&(A.win.getSelection().removeAllRanges(),A.win.getSelection().addRange(A.doc.createRange()))):A.selection.clear(),A.helpers.isIOS()&&(A.events.disableBlur(),A.$el.blur()),A.button.bulkRefresh(),A.events.trigger("video.hideResizer")}function ge(e){C&&(function t(){return ce}()||!0===e)&&(A.toolbar.enable(),l.removeClass("fr-active"),A.popups.hideAll(),C=null,me(),p=null,f&&f.hide())}r[i]="Image cannot be loaded from the passed link.",r[c]="No link in upload response.",r[d]="Error during file upload.",r[m]="Parsing response failed.",r[R]="File is too large.",r[D]="Image file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var ce=!(r[8]="Image file is corrupted.");function de(){ce=!0}function me(){ce=!1}function ue(e,t,a){!A.opts.htmlUntouched&&A.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi".concat(a[0])),t&&e.addClass("fr-di".concat(t[0]))):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:A.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*A.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(A.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function he(e){if(void 0===e&&(e=Ae()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function ve(e){void 0===e&&(e=Ae());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function be(){var e=A.popups.get("image.insert");e||(e=F()),A.popups.isVisible("image.insert")||(k(),A.popups.refresh("image.insert"),A.popups.setContainer("image.insert",A.$sc));var t=Ae();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();A.popups.show("image.insert",a,i,t.outerHeight(!0),!0)}function ye(){if(C){A.events.disableBlur(),A.selection.clear();var e=A.doc.createRange();e.selectNode(C.get(0)),A.browser.msie&&e.collapse(!0),A.selection.get().addRange(e),A.events.enableBlur()}}function we(){return C}function Ae(){return Ce()?C.parents(".fr-img-caption").first():C}function Ce(){return!!C&&0<C.parents(".fr-img-caption").length}function Se(e){for(var t=document.createDocumentFragment();e.firstChild;){var a=e.removeChild(e.firstChild);t.appendChild(a)}e.parentNode.replaceChild(t,e)}return{_init:function Ee(){var i;(function e(){A.events.$on(A.$el,A._mousedown,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==S(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;A.helpers.isMobile()||A.selection.clear(),t=!0,A.popups.areVisible()&&A.events.disableBlur(),A.browser.msie&&(A.events.disableBlur(),A.$el.attr("contenteditable",!1)),A.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),A.events.$on(A.$el,A._mousedown,".fr-img-caption .fr-inner",function(e){A.core.hasFocus()||A.events.focus(),e.stopPropagation()}),A.events.$on(A.$el,"paste",".fr-img-caption .fr-inner",function(e){!0===A.opts.toolbarInline&&(A.toolbar.hide(),e.stopPropagation())}),A.events.$on(A.$el,A._mouseup,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==S(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),A.browser.msie&&(A.$el.attr("contenteditable",!0),A.events.enableBlur()))}),A.events.on("keyup",function(e){if(e.shiftKey&&""===A.selection.text().replace(/\n/g,"")&&A.keys.isArrow(e.which)){var t=A.selection.element(),a=A.selection.endElement();t&&"IMG"==t.tagName?O(S(t)):a&&"IMG"==a.tagName&&O(S(a))}},!0),A.events.on("drop",V),A.events.on("element.beforeDrop",G),A.events.on("mousedown window.mousedown",de),A.events.on("window.touchmove",me),A.events.on("mouseup window.mouseup",function(){if(C&&!A.helpers.isMobile())return ge(),!1;me()}),A.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&ge()}),A.events.on("image.resizeEnd",function(){A.opts.iframe&&A.size.syncIframe()}),A.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){ge(!(t=!1))}),A.events.on("modals.hide",function(){C&&(ye(),A.selection.clear())}),A.events.on("image.resizeEnd",function(){A.win.getSelection&&O(C)}),A.opts.imageAddNewLine&&A.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!A.node.isElement(t);)t=A.node.isLastSibling(t)?t.parentNode:null;A.node.isElement(t)&&(A.opts.enter===_e.ENTER_BR?e.after("<br>"):S(A.node.blockParent(e.get(0))).after("<".concat(A.html.defaultTag(),"><br></").concat(A.html.defaultTag(),">")))})})(),"IMG"==A.el.tagName&&A.$el.addClass("fr-view"),A.events.$on(A.$el,A.helpers.isMobile()&&!A.helpers.isWindowsPhone()?"touchend":"click","IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',fe),A.helpers.isMobile()&&(A.events.$on(A.$el,"touchstart","IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),A.events.$on(A.$el,"touchmove",function(){a=!0})),A.$wp?(A.events.on("window.keydown keydown",ae,!0),A.events.on("keyup",function(e){if(C&&e.which==_e.KEYCODE.ENTER)return!1},!0),A.events.$on(A.$el,"keydown",function(){var e=A.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&A.node.isLastSibling(e))&&(e=e.parentNode),A.node.hasClass(e,"fr-inner")||(A.node.hasClass(e,"fr-img-caption")||(e=S(e).parents(".fr-img-caption").get(0)),A.node.hasClass(e,"fr-img-caption")&&(A.opts.trackChangesEnabled||S(e).after(_e.INVISIBLE_SPACE+_e.MARKERS),A.selection.restore()))})):A.events.$on(A.$win,"keydown",ae),A.events.on("toolbar.esc",function(){if(C){if(A.$wp)A.events.disableBlur(),A.events.focus();else{var e=C;ge(!0),A.selection.setAfter(e.get(0)),A.selection.restore()}return!1}},!0),A.events.on("toolbar.focusEditor",function(){if(C)return!1},!0),A.events.on("window.cut window.copy",function(e){if(C&&A.popups.isVisible("image.edit")&&!A.popups.get("image.edit").find(":focus").length){var t=Ae();Ce()?(t.before(_e.START_MARKER),t.after(_e.END_MARKER),A.selection.restore(),A.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(ye(),A.paste.saveCopiedText(C.get(0).outerHTML,C.attr("alt"))),"copy"==e.type?setTimeout(function(){O(C)}):(ge(!0),A.undo.saveStep(),setTimeout(function(){A.undo.saveStep()},0))}},!0),A.browser.msie&&A.events.on("keydown",function(e){if(!A.selection.isCollapsed()||!C)return!0;var t=e.which;t==_e.KEYCODE.C&&A.keys.ctrlKey(e)?A.events.trigger("window.copy"):t==_e.KEYCODE.X&&A.keys.ctrlKey(e)&&A.events.trigger("window.cut")}),A.events.$on(S(A.o_win),"keydown",function(e){var t=e.which;if(C&&t==_e.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),A.events.$on(A.$win,"keydown",function(e){var t=e.which;C&&C.hasClass("fr-uploading")&&t==_e.KEYCODE.ESC&&C.trigger("abortUpload")}),A.events.on("destroy",function(){C&&C.hasClass("fr-uploading")&&C.trigger("abortUpload")}),A.events.on("paste.before",le),A.events.on("paste.beforeCleanup",pe),A.events.on("paste.after",ne),A.events.on("html.set",h),A.events.on("html.inserted",h),h(),A.events.on("destroy",function(){s=[]}),A.events.on("html.processGet",ie),A.opts.imageOutputSize&&A.events.on("html.beforeGet",function(){i=A.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=i[e].style.width||S(i[e]).width(),a=i[e].style.height||S(i[e]).height();t&&i[e].setAttribute("width","".concat(t).replace(/px/,"")),a&&i[e].setAttribute("height","".concat(a).replace(/px/,""))}}),A.opts.iframe&&A.events.on("image.loaded",A.size.syncIframe),A.$wp&&(v(),A.events.on("contentChanged",v)),A.events.$on(S(A.o_win),"orientationchange.image",function(){setTimeout(function(){C&&O(C)},100)}),$(!0),F(!0),Z(!0),j(!0),A.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return te(e),!1})},showInsertPopup:function Re(){var e=A.$tb.find('.fr-command[data-cmd="insertImage"]'),t=A.popups.get("image.insert");if(t||(t=F()),k(),!t.hasClass("fr-active"))if(A.popups.refresh("image.insert"),A.popups.setContainer("image.insert",A.$tb),e.isVisible()){var a=A.button.getPosition(e),i=a.left,r=a.top;A.popups.show("image.insert",i,r,e.outerHeight())}else A.position.forSelection(t),A.popups.show("image.insert")},showLayer:function De(e){var t,a,i=A.popups.get("image.insert");if(C||A.opts.toolbarInline){if(C){var r=Ae();Ce()&&(r=r.find(".fr-img-wrap")),a=r.offset().top+r.outerHeight(),t=r.offset().left}}else{var n=A.$tb.find('.fr-command[data-cmd="insertImage"]');t=n.offset().left,a=n.offset().top+(A.opts.toolbarBottom?10:n.outerHeight()-10)}!C&&A.opts.toolbarInline&&(a=i.offset().top-A.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),A.popups.show("image.insert",t,a,C?C.outerHeight():0),A.accessibility.focusPopup(i)},refreshUploadButton:function Ue(e){var t=A.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function xe(e){var t=A.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:W,insertByURL:function Te(){var e=A.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){N(),I(A.language.translate("Loading image"));var t=e.val().trim();if(A.opts.imageUploadRemoteUrls&&A.opts.imageCORSProxy&&A.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?W([new Blob([this.response],{type:this.response.type||"image/png"})],C):P(i)},a.onerror=function(){L(t,!0,[],C)},a.open("GET","".concat(A.opts.imageCORSProxy,"/").concat(t),!0),a.responseType="blob",a.send()}else L(t,!0,[],C);e.val(""),e.blur()}},align:function Pe(e){var t=Ae();t.removeClass("fr-fir fr-fil"),!A.opts.htmlUntouched&&A.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):ue(t,ve(),e),ye(),U(),n(),A.selection.clear()},refreshAlign:function $e(e){C&&e.find("> *").first().replaceWith(A.icon.create("image-align-".concat(he())))},refreshAlignOnShow:function Ne(e,t){C&&t.find('.fr-command[data-param1="'.concat(he(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ke(e){var t=Ae();t.removeClass("fr-dii fr-dib"),!A.opts.htmlUntouched&&A.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):ue(t,e,he()),ye(),U(),n(),A.selection.clear()},refreshDisplayOnShow:function Ie(e,t){C&&t.find('.fr-command[data-param1="'.concat(ve(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:be,back:function e(){C?(A.events.disableBlur(),S(".fr-popup input:focus").blur(),O(C)):(A.events.disableBlur(),A.selection.restore(),A.events.enableBlur(),A.popups.hide("image.insert"),A.toolbar.showInline())},get:we,getEl:Ae,insert:L,showProgressBar:N,remove:te,hideProgressBar:k,applyStyle:function ze(e,t,a){if(void 0===t&&(t=A.opts.imageStyles),void 0===a&&(a=A.opts.imageMultipleStyles),!C)return!1;var i=Ae();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),i.removeClass(r.join(" "))}"object"==Me(t[e])?(i.removeAttr("style"),i.css(t[e].style)):i.toggleClass(e),O(C)},showAltPopup:q,showSizePopup:Q,setAlt:function Oe(e){if(C){var t=A.popups.get("image.alt");C.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),O(C)}},setSize:function Be(e,t){if(C){var a=A.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;C.removeAttr("width").removeAttr("height"),e.match(i)?C.css("width",e):C.css("width",""),t.match(i)?C.css("height",t):C.css("height",""),Ce()&&(C.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?C.parents(".fr-img-caption").css("width",e):C.parents(".fr-img-caption").css("width",""),t.match(i)?C.parents(".fr-img-caption").css("height",t):C.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),O(C)}},toggleCaption:function Le(){var e;if(C&&!Ce()){((e=C).parent().is("a")||C.parent().is("p"))&&(e=C.parent());var t,a,i=C.parents("ul")&&0<C.parents("ul").length?C.parents("ul"):C.parents("ol")&&0<C.parents("ol").length?C.parents("ol"):[];if(0<i.length){var r=i.find("li").length,n=C.parents("li"),o=document.createElement("li");r-1===n.index()&&(i.append(o),o.innerHTML="&nbsp;")}e.attr("style")?a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"":e.attr("width")&&(a=e.attr("width"));var s=A.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":C.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(A.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+C.attr("class")+'" style="'+(A.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span></div>'),e.wrap('<span class="fr-img-wrap"></span>'),C.after('<span class="fr-inner"'.concat(A.browser.mozilla?"":' contenteditable="true"',">").concat(_e.START_MARKER).concat(A.language.translate("Image Caption")).concat(_e.END_MARKER,"</span>")),C.parents(".fr-img-caption").css("width",s),1<C.parents(".fr-img-space-wrap").length&&(Se(document.querySelector(".fr-img-space-wrap")),Se(document.querySelector(".fr-img-space-wrap2"))),ge(!0),A.selection.restore()}else{if(e=Ae(),C.insertBefore(e),null!==e[0].querySelector("a")){for(var l,p=e[0].querySelector("a"),f=document.createElement("a"),g=0,c=p.attributes,d=c.length;g<d;g++)l=c[g],f.setAttribute(l.nodeName,l.nodeValue);C.wrap(f)}C.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),1<C.parents(".fr-img-space-wrap").length&&(Se(document.querySelector(".fr-img-space-wrap")),Se(document.querySelector(".fr-img-space-wrap2"))),O(C)}},hasCaption:Ce,exitEdit:ge,edit:O}},_e.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),_e.RegisterShortcut(_e.KEYCODE.P,"insertImage",null,"P"),_e.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),_e.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),_e.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),_e.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),_e.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),_e.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),_e.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),_e.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),_e.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),_e.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),_e.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),_e.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=_e.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("image-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),_e.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),_e.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),_e.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),_e.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),_e.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),_e.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),_e.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),_e.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),_e.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];"object"==Me(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'.concat(a,'">').concat(this.language.translate(i),"</a></li>")}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=i.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),_e.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),_e.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),_e.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),_e.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),_e.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),_e.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),_e.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),_e.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}})});
/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -7,2 +7,2 @@ * 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(j){"use strict";function F(e){return function t(e){if(Array.isArray(e))return i(e)}(e)||function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function n(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return i(e,t)}(e)||function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}j=j&&j.hasOwnProperty("default")?j["default"]:j,Object.assign(j.DEFAULTS,{trackChangesEnabled:!1,showChangesEnabled:!1}),j.PLUGINS.track_changes=function(A){var _=A.$;_.fn.isAfter=function(e){var t=_(this),a=t.parents(),n=e.parents(),r=t;for(var i in a){var s=e;if(a.hasOwnProperty(i)){var l=_(a[i]);for(var o in n)if(n.hasOwnProperty(o)){var c=_(n[o]);if(l[0]===c[0]){var d=r.index();return s.index()<d}s=c}r=l}}return!1};var l,i,s=[],M="",w="",I="",L="",d=[],o=[],g=null,T=[],h=!1;function c(){return s.pop()}function f(e){var t=!(!e||8!=e.keyCode),a=e&&13==e.keyCode,n=!(!e||46!=e.keyCode);if(A.opts.trackChangesEnabled){A.selection.restore(),e&&e.composing&&(A.selection.save(),A.selection.ranges()[0].collapse(!1));var r=A.selection.ranges(0).startContainer,i=_(r).parentsUntil(A.$el,"[data-tracking=true]");if(_(r).data("tracking")&&t)return void A.selection.clear();if(!i.length||"TD"==r.tagName||a){if(A.selection.isCollapsed()){A.markers.insert();var s=A.$el.find(".fr-marker");if(e&&e.composing&&(s=_(s[1])),!s.length)return;var l="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),o=A.opts.showChangesEnabled?'class="fr-highlight-change"':"";if(t||n){if(t){for(;_(s[0].previousSibling).data("tracking");)s.insertBefore(s.prev());_(s[0].previousSibling).find("[data-tracking=true]").length&&s.insertBefore(_(s[0].previousSibling).find("[data-tracking=true]").eq(0))}else if(_(r).data("tracking")){if(!r.nextSibling)return;s.insertBefore(r.nextSibling),P(s)}else P(s);var c=s[0]&&s[0].previousSibling?s[0].previousSibling.nodeValue:"",d=c&&c.slice(0,-(e.selectionLength?e.selectionLength:1));n&&(s[0].nextSibling&&"SPAN"!==s[0].nextSibling.tagName&&null===s[0].nextSibling.nodeValue&&s[0].nextSibling.firstChild&&s[0].nextSibling.firstChild.before(s[0]),d=(c=s[0].nextSibling?s[0].nextSibling.nodeValue:" ")&&c.slice(1)),n&&s[0].nextSibling&&"isPasted"===s[0].nextSibling.id?d=(c=s[0].nextSibling?s[0].nextSibling.textContent:" ")&&c.slice(1):t&&s[0].previousSibling&&"isPasted"===s[0].previousSibling.id&&(d=(c=s[0].previousSibling?s[0].previousSibling.textContent:" ")&&c.slice(0,-(e.selectionLength?e.selectionLength:1)));var g,h=_('<span data-tracking="true" data-track-id="'.concat(l,'" ').concat(o,"></span>")),f=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" '.concat(A.helpers.isIOS()?"":'contenteditable="false"',"></span>"));A.opts.showChangesEnabled||(A.helpers.isMobile()?f.addClass("fr-track-hide-mobile"):f.addClass("fr-track-hide"));var p=!1,u=!1;if(t)try{var k=s[0]&&s[0].previousSibling;if(s[0]&&s[0].previousElementSibling&&"I"===s[0].previousElementSibling.tagName&&!c&&(g=s[0].previousElementSibling),k&&3===k.nodeType&&"SPAN"!==k.parentNode.tagName&&k.previousSibling&&"SPAN"===k.previousSibling.tagName&&" "===k.nodeValue?g=k.previousSibling:k&&"SPAN"===k.parentNode.tagName&&0<_(k.parentNode).find(".fr-emoticon").length?(g=k.parentNode,p=!0):k&&("SPAN"===k.tagName&&"isPasted"!==k.id||"HR"===k.tagName)?g=k:_(s).parent().prev().is("hr")&&(g=_(s).parent().prev().get(0),p=u=!0),A.helpers.isMobile()&&s[0]&&!g&&!c&&!d)return;p?(_(s[0].parentNode).after(h),u?_(s).parent().remove():_(s).remove()):s[0]?e.composing?_(s).after(h):_(s).before(h):_(L).before(h)}catch(e){L&&_(L).before(h)}else if(n){var m=s[0].nextSibling;s[0].nextElementSibling&&"I"===s[0].nextElementSibling.tagName&&!s[0].nextSibling.nodeValue?g=s[0].nextElementSibling:m&&3===m.nodeType&&"SPAN"!==m.parentNode.tagName&&m.nextSibling&&"SPAN"===m.nextSibling.tagName&&" "===m.nodeValue?g=m.nextSibling:m&&"SPAN"===m.parentNode.tagName&&0<_(m.parentNode).find(".fr-emoticon").length?(g=m.parentNode,p=!0):m&&"SPAN"===m.tagName&&s[0].nextSibling&&"isPasted"!==s[0].nextSibling.id&&(g=m),p?(_(s[0].parentNode).before(h),_(s).remove()):_(s).after(h)}if(e.composing?T.push({span:h,"delete":f}):(A.helpers.isIOS()&&T.push({"delete":f}),_(h).prepend(f)),!g&&(g=c&&c.replace(d,""),A.helpers.isMobile()&&M&&!e.composing)){var v=A.selection.get().focusNode,C=A.selection.get().focusOffset,b=1;w&&v&&w.isSameNode(v)&&(b=I-C),g=M.replace(/\u00a0/g," ").replace(c.replace(/\u00a0/g," "),"").slice(0,b)}if(g&&(p?(_(f).append(_(_(g).get(0).outerHTML)),A.markers.insert()):_(f).append(g)),g&&0==g.length)return;A.browser.msie&&t&&(_(h).prepend("".concat(j.MARKERS)),_(h).append("".concat(j.MARKERS))),t&&(d||""===d)&&s[0].previousSibling?s[0].previousSibling.nodeValue=d:n&&(_(h).append("".concat(j.MARKERS)),s[0].nextSibling.nodeValue=d)}else{var S=j.INVISIBLE_SPACE;if(e&&A.helpers.isMobile()&&((S=s[0]&&s[0].previousSibling&&s[0].previousSibling.nodeValue?s[0].previousSibling.nodeValue.slice(-1):j.INVISIBLE_SPACE)&&s[0]&&s[0].previousSibling&&s[0].previousSibling.nodeValue?s[0].previousSibling.nodeValue=s[0].previousSibling.nodeValue.slice(0,-1):!s[0]||s[0].previousSibling||s[0].nextSibling||S!==j.INVISIBLE_SPACE||(S=A.selection.get().focusNode.nodeValue.slice(I,A.selection.get().focusOffset),A.selection.get().focusNode.nodeValue=A.selection.get().focusNode.nodeValue.slice(A.selection.get().focusOffset))),a){if(s.parent().parent().is("li"))return;var N=_("<p></p>");return s.closest("p").after(N),N.append(s),A.markers.remove(),void setTimeout(function(){N.prev().text()===String.fromCharCode(8203)&&N.prev().remove(),A.selection.setAfter(N[0])},1)}s.replaceWith('<span data-tracking="true" data-track-id="'.concat(l,'" ').concat(o,">").concat(S+j.MARKERS,"</span>"))}A.selection.restore(),A.track_changes.pushChange(l)}else{A.selection.save();var y=A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),E=A.$el.find('.fr-marker[data-type="false"]').length&&A.$el.find('.fr-marker[data-type="false"]').get(0);if(_(y).parent().hasClass("fr-emoticon")&&_(y).parent().before(y),_(y).isAfter(_(E))){var x=y;y=E,E=x}$(y,E,e&&e.deletion),A.selection.restore()}A.helpers.isMobile()&&M&&A.markers.remove()}}}function P(e){if(_(e[0].nextSibling).data("tracking")){for(;_(e[0].nextSibling).data("tracking")&&(!(0<_(e[0].previousElementSibling).find("[data-tracking-deleted=true]").length&&0<_(e[0].nextElementSibling).find("[data-tracking-deleted=true]").length)||_(e[0].previousSibling).data("tracking"));)_(e).insertAfter(e.next());e.insertBefore(e[0].previousSibling)}}function $(e,t){var a=2<arguments.length&&arguments[2]!==undefined&&arguments[2];if(e&&(!e.isSameNode(t)||!_(e).hasClass("fr-marker"))){for(;e.nodeType===Node.COMMENT_NODE;)e=e.nextSibling;if(_(e).parent().is("table")&&0!==_(e).parent().next().text().length&&$(_(e).parent().next()[0],t,a),"TD"!==e.tagName||1!==e.childNodes.length||"BR"!==e.childNodes[0].tagName){if(A.node.isBlock(e)&&"HR"!==e.tagName)return A.node.hasClass(e.firstChild,"fr-marker")?$(e.firstChild.nextSibling,t,a):$(e.firstChild,t,a),!1;if("BR"===e.tagName&&"TD"===e.parentElement.tagName){var n=e.parentElement.nextElementSibling;_(e).remove(),$(n,t)}var r="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),i=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",s=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(i,"></span>")),l=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" '.concat(A.helpers.isIOS()?"":'contenteditable="false"',"></span>"));A.opts.showChangesEnabled||(A.helpers.isMobile()?l.addClass("fr-track-hide-mobile"):l.addClass("fr-track-hide"));var o=e;for(_(e).before(s),A.track_changes.pushChange(r);o&&_(o).hasClass("fr-marker");)o=o.nextSibling;for(var c=!1;o&&!c&&!_(o).hasClass("fr-marker")&&!_(o).is("[data-track-id]")&&0===_(o).find("fr-marker").length&&"UL"!==o.tagName&&"OL"!==o.tagName;){var d=o;if("IMG"===o.tagName&&_(o).data("tracking-img","true"),A.node.isBlock(o)&&"HR"!==e.tagName)return $(o.firstChild,t,a),!1;if(o)for(var g=o.childNodes,h=0;h<g.length;h++)if(g[h].className&&"fr-marker"===g[h].className){c=!0,$(o.firstChild,t,a);break}c||(o=o.nextSibling,_(l).append(d))}if(!o||"UL"!==o.tagName&&"OL"!==o.tagName||$(o,t,a),a?T.push({span:s,"delete":l}):(A.helpers.isIOS()&&T.push({"delete":l}),_(s).prepend(l)),A.browser.msie?_(s).prepend("".concat(j.INVISIBLE_SPACE+j.MARKERS)):_(s).prepend("".concat(j.INVISIBLE_SPACE)),_(s).append("".concat(j.INVISIBLE_SPACE+j.MARKERS)),!o&&!e.isSameNode(t)){for(var f=s.get(0).parentNode;f&&!f.nextSibling&&!A.node.isElement(f);)f=f.parentNode;if(f){var p=f.nextSibling;p&&(A.node.isBlock(p)?"HR"===p.tagName?$(p.nextSibling,t,a):(A.browser.mozilla&&"LI"===f.tagName&&"SPAN"===f.lastChild.tagName&&_(f.lastChild).hasClass("fr-marker")&&f.lastChild.remove(),$(p.firstChild,t,a)):$(p,t,a))}}}}}function p(e){if(A.opts.trackChangesEnabled){A.selection.restore();var t=A.selection.ranges(0).startContainer,a=_(t).parentsUntil(A.$el,"[data-tracking=true]");if(_(t).data("tracking"))return;if(!a.length&&!A.selection.isCollapsed()&&"quote"!=e){A.selection.save(),u(A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),A.$el.find('.fr-marker[data-type="false"]').length&&A.$el.find('.fr-marker[data-type="false"]').get(0));var n=A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),r=n.parentNode;if(r&&"A"===r.tagName&&r.firstChild&&"SPAN"===r.firstChild.tagName&&2<r.firstChild.childNodes.length&&"STRONG"===r.firstChild.childNodes[3].tagName)_(r.firstChild.childNodes[3].firstChild).before(n);else{for(var i=n.previousSibling.firstChild;i&&"SPAN"!==i.tagName;)i=i.nextSibling;_(i).after(n)}A.selection.restore()}}}function u(e,t,a){if(e&&!("<br>"===_(e).html()&&_(e).parent().is("td")||(_(e).parent().is("table")&&0!==_(e).parent().next().text().length&&u(_(e).parent().next()[0],t,a),_(e).is("br")&&_(e).parent().length&&_(e).parent().is("td")&&0===_(e).parent().text().length))){for(a||(a="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),A.track_changes.pushChange(a));e.nodeType===Node.COMMENT_NODE;)e=e.nextSibling;if(A.node.isBlock(e)&&"HR"!==e.tagName)return A.node.hasClass(e.firstChild,"fr-marker")?u(e.firstChild.nextSibling,t,a):u(e.firstChild,t,a),!1;var n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r=_('<span data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></span>")),i=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false" style="display:none"></span>'),s=e;for(_(e).before(r);s&&_(s).hasClass("fr-marker");)s=s.nextSibling;for(var l=!1;s&&!l&&!_(s).hasClass("fr-marker")&&0===_(s).find("fr-marker").length&&"UL"!==s.tagName&&"OL"!==s.tagName;){var o=s;if(A.node.isBlock(s)&&"HR"!==e.tagName)return u(s.firstChild,t,a),!1;if(s)for(var c=s.childNodes,d=0;d<c.length;d++)if(c[d].className&&"fr-marker"===c[d].className){l=!0,u(s.firstChild,t,a);break}l||(s=s.nextSibling,_(i).append(o.cloneNode(!0)),_(r).append(o))}if(!s||"UL"!==s.tagName&&"OL"!==s.tagName||u(s,t,a),_(s).hasClass("fr-marker")&&_(r).append(s),_(r).prepend(i),_(r).prepend("".concat(j.INVISIBLE_SPACE)),_(r).append("".concat(j.INVISIBLE_SPACE)),!s&&!e.isSameNode(t)){for(var g=r.get(0).parentNode;g&&!g.nextSibling&&!A.node.isElement(g);)g=g.parentNode;if(g){var h=g.nextSibling;h&&(A.node.isBlock(h)?"HR"===h.tagName?u(h.nextSibling,t,a):u(h.firstChild,t,a):u(h,t,a))}}}}function k(e,t,a){var n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r=_('<span data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></span>")),i=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');A.opts.showChangesEnabled||i.addClass("fr-track-hide"),i.append(t.get(0).innerHTML),r.append(i);var s=e.get(0).innerHTML;e.html(""),e.append(r),r.append(s)}function m(){if(A.events.trigger("image.hideResizer"),A.events.trigger("video.hideResizer"),A.html.cleanEmptyTags(),A.helpers.isMobile())for(var e=A.$el.find("img[data-tracking-img]"),t=0;t<e.length;t++){var a=_(e.get(t));a.parent()&&a.parent().data("tracking")||a.removeData("tracking-img")}}function e(){A.$el.find("li").each(function(){0===this.innerText.replace(/\u200B/g,"").length&&this.remove()})}function t(){var e=c();if(e){var t,a=A.$el.find("[data-track-id=".concat(e,"]"));if(a.length){var n=a.parent("a");if(n.length){var r=_(n.get(0).outerHTML).text();1===[].filter.call(r,function(e){return 8203!==e.charCodeAt(0)}).length&&(t=n)}for(var i=0;i<a.length;i++){var s=a.get(i),l=_(a).data("tracking-deleted")?_(a):_(s).find("[data-tracking-deleted=true]");l.length&&(l.get(0).remove?l.get(0).remove():l.get(0).parentNode.removeChild(l.get(0))),s.hasAttribute("style")?(_(s).removeData("tracking"),_(s).removeData("track-id"),_(s).removeClass("fr-highlight-change")):(A.selection.save(),0<_(s).find("IFRAME").length?(_(s).removeData("tracking"),_(s).removeData("track-id"),_(s).removeClass("fr-highlight-change")):s.outerHTML=s.innerHTML,A.selection.restore())}}t&&t.remove()}m()}function a(){var e=c();if(e){var t=A.$el.find("[data-track-id=".concat(e,"]"));if(t.length){A.selection.save();for(var a=t.length-1;0<=a;a--){var n=_(t).data("tracking-deleted")?_(t):_(t.get(a)).find("[data-tracking-deleted=true]");if(n.length)if(0<_(t).find("IFRAME").length)_(t).removeData("tracking"),_(t).removeData("track-id"),_(t).removeClass("fr-highlight-change"),_(t).removeClass("fr-tracking-deleted"),_(t).removeData("tracking-deleted"),_(t).removeAttr("contenteditable");else n.parent("[data-tracking=true]").data("track-id")==e?(_(t.get(a)).find("[data-tracking-deleted=true]").remove(),t.get(a).outerHTML=n.get(0).innerHTML):t.get(a).remove?t.get(a).remove():t.get(a).parentNode.removeChild(t.get(a));else t.get(a).remove?t.get(a).remove():t.get(a).parentNode.removeChild(t.get(a))}A.selection.restore()}}m()}return A.events.on("keydown",function(e){var t,a;if(!A.opts.trackChangesEnabled)return!0;if(l=null===(t=A.selection.get())||void 0===t?void 0:null===(a=t.focusNode)||void 0===a?void 0:a.nodeValue,A.helpers.isAndroid()){var n,r,i=A.selection.get();M=null==i?void 0:null===(n=i.focusNode)||void 0===n?void 0:n.nodeValue,w=null==i?void 0:i.focusNode,L=null===(r=w)||void 0===r?void 0:r.nextSibling,I=null==i?void 0:i.focusOffset}else if(function s(e){return(!A.keys.ctrlKey(e)||e.which!==j.KEYCODE.Z&&e.which!==j.KEYCODE.C)&&(48<=e.keyCode&&e.keyCode<=57||65<=e.keyCode&&e.keyCode<=90||97<=e.keyCode&&e.keyCode<=122||186<=e.keyCode&&e.keyCode<=222||13===e.keyCode||8===e.keyCode||32===e.keyCode||46===e.keyCode||96<=e.keyCode&&e.keyCode<=111)}(e))if(!A.keys.ctrlKey(e)||"b"!==e.key&&"i"!==e.key&&"u"!==e.key){if(A.keys.ctrlKey(e)&&"a"===e.key||A.keys.ctrlKey(e)&&"s"===e.key)return;if("Enter"===e.key)return;f(e)}else p()},!0),A.events.on("keyup",function(e){if(!A.opts.trackChangesEnabled)return!0;var t,a;if(A.helpers.isMobile())if(i=null===(t=A.selection.get())||void 0===t?void 0:null===(a=t.focusNode)||void 0===a?void 0:a.nodeValue,h){for(var n=0;n<T.length;n++)A.opts.showChangesEnabled&&_(T[n].span).empty(),_(T[n].span).prepend(T[n]["delete"]);h=!(T=[])}else if(A.helpers.isIOS()){for(var r=0;r<T.length;r++)i&&1===i.length&&l&&1==l.length?(_(T[r]["delete"]).attr("contenteditable","true"),_(T[r]["delete"]).addClass("fr-ios-mobile-disable-select")):_(T[r]["delete"]).attr("contenteditable","false");T=[]}else{if(46===e.keyCode)return!0;f(e)}},!0),A.events.on("beforeinput",function(e){var t=e.originalEvent,a=!1;if(!A.opts.trackChangesEnabled)return!0;if(A.helpers.isAndroid()){var n=A.selection.get(),r=A.selection.ranges(0),i=r.startContainer,s=r.endContainer,l=_(i).parentsUntil(A.$el,"[data-tracking=true]"),o=_(s).parentsUntil(A.$el,"[data-tracking=true]");if("insertCompositionText"===t.inputType)if(""===t.data)a=!0;else if(n.toString().length>t.data.length){if(0<l.length||0<o.length)return h=!0,e.preventDefault(),!1;a=!0,e.composing=!0}if("insertText"!==t.inputType||A.selection.isCollapsed()||(a=!0),a||"deleteContentBackward"===t.inputType){var c,d;if(h=!0,i.lastChild&&!n.toString()&&null!==(c=i.lastChild.children)&&void 0!==c&&null!==(d=c.item(0))&&void 0!==d&&d.hasAttribute("contenteditable"))return;e.keyCode=8,e.deletion=!0,f(e)}}},!0),A.events.on("paste.before",function(e){A.opts.trackChangesEnabled&&A.helpers.isMobile()&&f(e)},!0),A.events.on("paste.after",function(e){if(A.opts.trackChangesEnabled){A.markers.insert();for(var t=A.$el.find(".fr-marker"),a=t.parent().data("tracking")?t.parent():t.parent().find("[data-tracking=true]"),n=a.children().eq(0).is("ul"),r=t.next();r.is("br");)(r=r.next()).prev().remove(),r.next().is("br")&&r.next().remove();if(r.is("ul")){var i=r.find("li");i.find("[data-tracking=true]").addClass("fr-highlight-change");var s=i[0].innerHTML;if(i.html(""),i.insertAfter(t.closest("li")),0==r.parent().find("[data-tracking=true]").length)return void i.append(s);if(r.remove(),a.data("tracking")){var l=a[0].innerHTML;0<l.trim().length&&a.parent().append(l),i.append(a),a.html(s)}else if(!n)return a.insertBefore(a.closest("ul")),void a.next().remove();A.markers.remove(),i.next().length&&i.next().is("li")&&""==i.next().text().trim()&&i.next().remove();var o=i.prev().children().eq(0);o.is("br")&&o.remove()}}},!0),A.events.on("image.inserted",function(e){A.helpers.isMobile()&&A.opts.trackChangesEnabled&&e.data("tracking-img",!0)}),A.events.on("image.removed",function(e){if(A.helpers.isMobile()&&A.opts.trackChangesEnabled&&!e.data("tracking-img")&&!e.parent().data("tracking")){var t=A.selection.ranges(0).startContainer,a=_(t).parentsUntil(A.$el,"[data-tracking=true]");A.markers.insert();var n=A.$el.find(".fr-marker"),r="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),i=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",s=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(i,"></span>")),l=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');A.opts.showChangesEnabled||l.addClass("fr-track-hide"),e.data("tracking-img",!0),_(t).data("tracking")||a.length?(_(n).replaceWith(l),_(l).append(e),A.markers.remove()):(_(n).replaceWith(s),_(s).prepend(l),_(l).append(e),A.markers.remove(),A.track_changes.pushChange(r))}}),A.events.on("commands.before",function(t){if(!A.opts.trackChangesEnabled)return!0;var e=["applytextColor","bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle","alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"];if(["change","applyAll","applyLast","removeLast","showChanges","trackChanges","moreTrackChanges","undo","redo","fullscreen","print","getPDF","spellChecker","selectAll","html","help"].filter(function(e){return e===t}).length||e.filter(function(e){return e===t}).length){if(e.filter(function(e){return e===t}).length&&"paragraphFormat"!==t&&"paragraphStyle"!==t&&"lineHeight"!==t)p(t);else if("paragraphFormat"===t||"paragraphStyle"===t||"lineHeight"===t){A.selection.save();for(var a=A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),i=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(n,"></span>")),s=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false" style="display:none"></span>'),l=a.parentNode.cloneNode(!0),o=l.childNodes,c=0;c<o.length;)o[c].className&&"fr-marker"===o[c].className?o[c].remove():c++;_(s).append(l),_(i).append(s),_(a.parentNode).after(_("<p></p>")),_(a.parentNode.nextSibling).append(i),i=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(n,"></span>")),_(a.parentNode.nextSibling).after(_("<p></p>")),_(a.parentNode.nextSibling.nextSibling).append(i),i.append(a.parentNode),A.track_changes.pushChange(r),A.selection.restore()}}else{if(j.COMMANDS[t]&&(j.COMMANDS[t].hasOwnProperty("type")&&"dropdown"===j.COMMANDS[t].type||j.COMMANDS[t].more_btn||j.COMMANDS[t].popup)){if("insertImage"!=t&&"insertFile"!=t)return}else if("clearFormatting"===t)return void(A.opts.trackChangesEnabled&&function(){g=A.selection.blocks();for(var a=[],n=0,e=0;e<g.length;e++){n=e<n?n:e;var t=_(g[e]);if(t.is("li"))t.siblings("li").each(function(e,t){_(t).find("li").length&&(a.push({index:n,item:t}),n+=1)});d[e]=_("<span>".concat(t.get(0).innerHTML,"</span>"))}for(var r=0,i=a;r<i.length;r++){var s=i[r],l=s.index,o=s.item,c=_(_(o).get(0).outerHTML);c.find("ul").remove(),c.find("ol").remove(),d=[].concat(F(d.slice(0,l+1)),[_("<span>".concat(c.get(0).innerHTML,"</span>"))],F(d.slice(l+1))),g=[].concat(F(g.slice(0,l+1)),[o],F(g.slice(l+1)))}}());f()}},!0),A.events.on("commands.after",function(e){if(!A.opts.trackChangesEnabled)return!0;if(0<=["undo","redo"].indexOf(e))!function r(){var e=A.$el.find("[data-tracking=true]");s.splice(0,s.length);for(var t=0;t<e.length;t++){var a=_(e.get(t)).data("track-id");s[a.slice(a.lastIndexOf("-")+1)]=a}}();else if("clearFormatting"==e&&A.opts.trackChangesEnabled){var t="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length);for(var a in g){var n=_(g[a]);d[a]&&(k(n,d[a],t),d[a]=null,o[a]=null)}A.track_changes.pushChange(t),d=[],g=null}},!0),A.events.on("quickInsert.commands.before",function(e){A.opts.trackChangesEnabled&&f(e)}),{toggleTracking:function n(){A.opts.trackChangesEnabled&&-1<A.html.get(!0,!0).indexOf("data-tracking")||A.opts.trackChangesEnabled&&0<A.$el.find("[data-tracking=true]").length?alert("Your editor has pending changes. Please resolve them before turning off Track Changes in the toolbar."):(A.commands.moreTrackChanges(),A.opts.trackChangesEnabled=!A.opts.trackChangesEnabled,A.opts.trackChangesEnabled||(A.opts.showChangesEnabled=!1))},pushChange:function r(e){s.push(e)},insertChangeAt:function v(e,t){s=[].concat(F(s.slice(0,e)),[t],F(s.slice(e)))},popChange:c,getPendingChanges:function C(){return s},showChanges:function b(){if(A.opts.showChangesEnabled=!A.opts.showChangesEnabled,function r(e,t){for(var a=0;a<e.length;a++)t?(_(e.get(a)).removeClass("fr-track-hide"),_(e.get(a)).removeClass("fr-track-hide-mobile")):A.helpers.isMobile()?_(e.get(a)).addClass("fr-track-hide-mobile"):_(e.get(a)).addClass("fr-track-hide")}(A.$el.find(".fr-tracking-deleted"),A.opts.showChangesEnabled),A.opts.showChangesEnabled)for(var e=A.$el.find("[data-tracking=true]").not(".fr-highlight-change"),t=0;t<e.length;t++)_(e.get(t)).addClass("fr-highlight-change");else for(var a=A.$el.find(".fr-highlight-change"),n=0;n<a.length;n++)_(a.get(n)).removeClass("fr-highlight-change")},acceptAllChanges:function S(){for(;0!=A.track_changes.getPendingChanges().length;)t();s=[],e(),A.$el.find("li").each(function(){!_(this).children()[0]||"OL"!==_(this).children()[0].tagName&&"UL"!==_(this).children()[0].tagName||e()})},rejectAllChanges:function N(){for(;0!=A.track_changes.getPendingChanges().length;)a();s=[]},acceptSingleChange:t,rejectSingleChange:a,refresh:function y(e){var t=A.$el.find("[data-tracking=true]");e.toggleClass("fr-disabled",!s.length),e.toggleClass("fr-active",s.length).attr("aria-pressed",s.length),0<!t.length&&(e.removeClass("fr-active"),e.addClass("fr-disabled"));var a=A.$tb.find('.fr-command[data-cmd="markdown"]');a&&A.opts.trackChangesEnabled?a.addClass("fr-disabled"):a&&!_(".fr-active.fr-popup").length&&a.removeClass("fr-disabled");var n=A.$tb.find('.fr-command[data-cmd="showChanges"]');n&&A.opts.trackChangesEnabled&&n.removeClass("fr-disabled")},replaceSpecialItem:function E(e){A.selection.setBefore(e.get(0)),A.selection.setAfter(e.get(0)),u(A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),A.$el.find('.fr-marker[data-type="false"]').length&&A.$el.find('.fr-marker[data-type="false"]').get(0))},removeSpecialItem:function x(e){A.selection.setBefore(e.get(0)),A.selection.setAfter(e.get(0)),$(A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),A.$el.find('.fr-marker[data-type="false"]').length&&A.$el.find('.fr-marker[data-type="false"]').get(0))},removedTable:function R(e){var t=!1;if(e.find("[data-tracking=true]").each(function(){0<this.innerText.replace(/\u200B/g,"").length&&(t=!0)}),t)alert("Your table has pending changes. Please resolve them before remove table.");else{var r="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),i=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",a=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(i,"></span>")),n=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');e.before(a),e.find("tr").find("> td").each(function(){var e=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(i,"></span>")),t=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>'),a=_(this),n=a[0].innerText;_(t)[0].innerText=n,a[0].innerText="",e.prepend(t),a.prepend(e)}),n.append(e),a.append(n),A.track_changes.pushChange(r)}},addQuote:function O(e){var t="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),a=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",n=_('<div data-tracking="true" data-track-id="'.concat(t,'" ').concat(a,"></div>")),r=_('<div data-tracking="true" data-track-id="'.concat(t,'" ').concat(a,"></div>")),i=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');A.opts.showChangesEnabled||i.addClass("fr-track-hide"),e.before(r),e.before(n);var s=e.get(0).innerHTML;i.append(s),n.append(i),r.append(e),r.find('[data-tracking="true"]').each(function(e,t){_(t).children().eq(0).insertBefore(_(t)),_(t).remove()}),A.track_changes.pushChange(t)},removeQuote:function V(e,t){if(!(0<t)){var a="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r=_('<div data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></div>")),i=_('<div data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></div>")),s=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');A.opts.showChangesEnabled||s.addClass("fr-track-hide"),e.before(i),e.before(r);var l=e.find("blockQuote").eq(0).html();l||(l=e.html()),s.append(e),r.append(s),i.append(l),i.find('[data-tracking="true"]').each(function(e,t){_(t).children().eq(0).insertBefore(_(t)),_(t).remove()}),A.track_changes.pushChange(a)}},wrapInTracking:function D(e,t){var a="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r=_('<span data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></span>"));t&&r.addClass(t);var i=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');return A.opts.showChangesEnabled||i.addClass("fr-track-hide"),e.before(r),r.append(e),A.track_changes.pushChange(a),r},wrapInDelete:function B(e){var t=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');return A.opts.showChangesEnabled||(A.helpers.isMobile()?t.addClass("fr-track-hide-mobile"):t.addClass("fr-track-hide")),t.append(e),t},wrapLinkInTracking:function H(e,t){var a="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r=_('<span data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></span>"));return e.before(r),r.append(e),A.track_changes.insertChangeAt(t-1,a),r},pasteInEmptyEdior:function K(e){var t=A.$el.find(".fr-highlight-change");_(t)[0].style.display="block",_(t)[0].innerHTML=e},pasteInEdior:function U(e){var t=A.$el.find(".fr-marker");_(t)[0].outerHTML=e,A.markers.remove()}}},j.DefineIcon("trackChanges",{NAME:"enable-tracking",SVG_KEY:"trackChanges"}),j.DefineIcon("showChanges",{NAME:"show-changes",SVG_KEY:"showTrackChanges"}),j.DefineIcon("applyAll",{NAME:"apply-all",SVG_KEY:"acceptAllChanges"}),j.DefineIcon("removeAll",{NAME:"remove-all",SVG_KEY:"rejectAllChanges"}),j.DefineIcon("applyLast",{NAME:"apply-last",SVG_KEY:"acceptSingleChange"}),j.DefineIcon("removeLast",{NAME:"remove-last",SVG_KEY:"rejectSingleChange"}),j.RegisterCommand("trackChanges",{type:"button",title:"Enable Track Changes",plugin:"track_changes",showOnMobile:!0,callback:function(){this.track_changes.toggleTracking()},refreshAfterCallback:!0,forcedRefresh:!0,refresh:function(e){e.toggleClass("fr-active",this.opts.trackChangesEnabled).attr("aria-pressed",this.opts.trackChangesEnabled)}}),j.RegisterCommand("showChanges",{type:"button",icon:"showChanges",title:"Show Changes",plugin:"track_changes",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,refreshAfterCallback:!0,toggle:!0,callback:function(){this.track_changes.showChanges()},refresh:function(e){e.toggleClass("fr-active",this.opts.showChangesEnabled).attr("aria-pressed",this.opts.showChangesEnabled)}}),j.RegisterCommand("applyAll",{type:"button",icon:"applyAll",title:"Accept All Changes",plugin:"track_changes",toggle:!0,refreshAfterCallback:!0,forcedRefresh:!0,callback:function(){0<this.track_changes.getPendingChanges().length&&this.track_changes.acceptAllChanges()},refresh:function(e){this.track_changes.refresh(e)}}),j.RegisterCommand("removeAll",{type:"button",icon:"removeAll",title:"Reject All Changes",plugin:"track_changes",toggle:!0,refreshAfterCallback:!0,forcedRefresh:!0,callback:function(){0<this.track_changes.getPendingChanges().length&&this.track_changes.rejectAllChanges()},refresh:function(e){this.track_changes.refresh(e)}}),j.RegisterCommand("applyLast",{type:"button",icon:"applyLast",title:"Accept Single Change",plugin:"track_changes",toggle:!0,refreshAfterCallback:!0,forcedRefresh:!0,callback:function(){0<this.track_changes.getPendingChanges().length&&this.track_changes.acceptSingleChange()},refresh:function(e){this.track_changes.refresh(e)}}),j.RegisterCommand("removeLast",{type:"button",icon:"removeLast",title:"Reject Single Change",plugin:"track_changes",toggle:!0,refreshAfterCallback:!0,forcedRefresh:!0,callback:function(){0<this.track_changes.getPendingChanges().length&&this.track_changes.rejectSingleChange()},refresh:function(e){this.track_changes.refresh(e)}})});
!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(j){"use strict";function F(e){return function t(e){if(Array.isArray(e))return i(e)}(e)||function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function n(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return i(e,t)}(e)||function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}j=j&&j.hasOwnProperty("default")?j["default"]:j,Object.assign(j.DEFAULTS,{trackChangesEnabled:!1,showChangesEnabled:!1}),j.PLUGINS.track_changes=function(A){var _=A.$;_.fn.isAfter=function(e){var t=_(this),a=t.parents(),n=e.parents(),r=t;for(var i in a){var s=e;if(a.hasOwnProperty(i)){var l=_(a[i]);for(var o in n)if(n.hasOwnProperty(o)){var c=_(n[o]);if(l[0]===c[0]){var d=r.index();return s.index()<d}s=c}r=l}}return!1};var l,i,s=[],M="",w="",I="",L="",d=[],o=[],g=null,T=[],h=!1;function c(){return s.pop()}function f(e){var t=!(!e||8!=e.keyCode),a=e&&13==e.keyCode,n=!(!e||46!=e.keyCode);if(A.opts.trackChangesEnabled){A.selection.restore(),e&&e.composing&&(A.selection.save(),A.selection.ranges()[0].collapse(!1));var r=A.selection.ranges(0).startContainer,i=_(r).parentsUntil(A.$el,"[data-tracking=true]");if(_(r).data("tracking")&&t)return void A.selection.clear();if(!i.length||"TD"==r.tagName||a){if(A.selection.isCollapsed()){A.markers.insert();var s=A.$el.find(".fr-marker");if(e&&e.composing&&(s=_(s[1])),!s.length)return;var l="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),o=A.opts.showChangesEnabled?'class="fr-highlight-change"':"";if(t||n){if(t){for(;_(s[0].previousSibling).data("tracking");)s.insertBefore(s.prev());_(s[0].previousSibling).find("[data-tracking=true]").length&&s.insertBefore(_(s[0].previousSibling).find("[data-tracking=true]").eq(0))}else if(_(r).data("tracking")){if(!r.nextSibling)return;s.insertBefore(r.nextSibling),P(s)}else P(s);var c=s[0]&&s[0].previousSibling?s[0].previousSibling.nodeValue:"",d=c&&c.slice(0,-(e.selectionLength?e.selectionLength:1));n&&(s[0].nextSibling&&"SPAN"!==s[0].nextSibling.tagName&&null===s[0].nextSibling.nodeValue&&s[0].nextSibling.firstChild&&s[0].nextSibling.firstChild.before(s[0]),d=(c=s[0].nextSibling?s[0].nextSibling.nodeValue:" ")&&c.slice(1)),n&&s[0].nextSibling&&"isPasted"===s[0].nextSibling.id?d=(c=s[0].nextSibling?s[0].nextSibling.textContent:" ")&&c.slice(1):t&&s[0].previousSibling&&"isPasted"===s[0].previousSibling.id&&(d=(c=s[0].previousSibling?s[0].previousSibling.textContent:" ")&&c.slice(0,-(e.selectionLength?e.selectionLength:1)));var g,h=_('<span data-tracking="true" data-track-id="'.concat(l,'" ').concat(o,"></span>")),f=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" '.concat(A.helpers.isIOS()?"":'contenteditable="false"',"></span>"));A.opts.showChangesEnabled||(A.helpers.isMobile()?f.addClass("fr-track-hide-mobile"):f.addClass("fr-track-hide"));var p=!1,u=!1;if(t)try{var k=s[0]&&s[0].previousSibling;if(s[0]&&s[0].previousElementSibling&&"I"===s[0].previousElementSibling.tagName&&!c&&(g=s[0].previousElementSibling),k&&3===k.nodeType&&"SPAN"!==k.parentNode.tagName&&k.previousSibling&&"SPAN"===k.previousSibling.tagName&&" "===k.nodeValue?g=k.previousSibling:k&&"SPAN"===k.parentNode.tagName&&0<_(k.parentNode).find(".fr-emoticon").length?(g=k.parentNode,p=!0):k&&("SPAN"===k.tagName&&"isPasted"!==k.id||"HR"===k.tagName)?g=k:_(s).parent().prev().is("hr")&&(g=_(s).parent().prev().get(0),p=u=!0),A.helpers.isMobile()&&s[0]&&!g&&!c&&!d)return;p?(_(s[0].parentNode).after(h),u?_(s).parent().remove():_(s).remove()):s[0]?e.composing?_(s).after(h):_(s).before(h):_(L).before(h)}catch(e){L&&_(L).before(h)}else if(n){var m=s[0].nextSibling;s[0].nextElementSibling&&"I"===s[0].nextElementSibling.tagName&&!s[0].nextSibling.nodeValue?g=s[0].nextElementSibling:m&&3===m.nodeType&&"SPAN"!==m.parentNode.tagName&&m.nextSibling&&"SPAN"===m.nextSibling.tagName&&" "===m.nodeValue?g=m.nextSibling:m&&"SPAN"===m.parentNode.tagName&&0<_(m.parentNode).find(".fr-emoticon").length?(g=m.parentNode,p=!0):m&&"SPAN"===m.tagName&&s[0].nextSibling&&"isPasted"!==s[0].nextSibling.id&&(g=m),p?(_(s[0].parentNode).before(h),_(s).remove()):_(s).after(h)}if(e.composing?T.push({span:h,"delete":f}):(A.helpers.isIOS()&&T.push({"delete":f}),_(h).prepend(f)),!g&&(g=c&&c.replace(d,""),A.helpers.isMobile()&&M&&!e.composing)){var v=A.selection.get().focusNode,C=A.selection.get().focusOffset,b=1;w&&v&&w.isSameNode(v)&&(b=I-C),g=M.replace(/\u00a0/g," ").replace(c.replace(/\u00a0/g," "),"").slice(0,b)}if(g&&(p?(_(f).append(_(_(g).get(0).outerHTML)),A.markers.insert()):_(f).append(g)),g&&0==g.length)return;A.browser.msie&&t&&(_(h).prepend("".concat(j.MARKERS)),_(h).append("".concat(j.MARKERS))),t&&(d||""===d)&&s[0].previousSibling?s[0].previousSibling.nodeValue=d:n&&(_(h).append("".concat(j.MARKERS)),s[0].nextSibling.nodeValue=d)}else{var S=j.INVISIBLE_SPACE;if(e&&A.helpers.isMobile()&&((S=s[0]&&s[0].previousSibling&&s[0].previousSibling.nodeValue?s[0].previousSibling.nodeValue.slice(-1):j.INVISIBLE_SPACE)&&s[0]&&s[0].previousSibling&&s[0].previousSibling.nodeValue?s[0].previousSibling.nodeValue=s[0].previousSibling.nodeValue.slice(0,-1):!s[0]||s[0].previousSibling||s[0].nextSibling||S!==j.INVISIBLE_SPACE||(S=A.selection.get().focusNode.nodeValue.slice(I,A.selection.get().focusOffset),A.selection.get().focusNode.nodeValue=A.selection.get().focusNode.nodeValue.slice(A.selection.get().focusOffset))),a){if(s.parent().parent().is("li"))return;var N=_("<p></p>");return s.closest("p").after(N),N.append(s),A.markers.remove(),void setTimeout(function(){N.prev().text()!==String.fromCharCode(8203)&&""!==N.prev().text()||N.prev().remove(),A.selection.setAfter(N[0])},1)}s[0].previousSibling&&"BR"===s[0].previousSibling.tagName&&s[0].previousSibling.remove(),s.replaceWith('<span data-tracking="true" data-track-id="'.concat(l,'" ').concat(o,">").concat(S+j.MARKERS,"</span>"))}A.selection.restore(),A.track_changes.pushChange(l)}else{A.selection.save();var y=A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),E=A.$el.find('.fr-marker[data-type="false"]').length&&A.$el.find('.fr-marker[data-type="false"]').get(0);if(_(y).parent().hasClass("fr-emoticon")&&_(y).parent().before(y),_(y).isAfter(_(E))){var x=y;y=E,E=x}$(y,E,e&&e.deletion),A.selection.restore()}A.helpers.isMobile()&&M&&A.markers.remove()}}}function P(e){if(_(e[0].nextSibling).data("tracking")){for(;_(e[0].nextSibling).data("tracking")&&(!(0<_(e[0].previousElementSibling).find("[data-tracking-deleted=true]").length&&0<_(e[0].nextElementSibling).find("[data-tracking-deleted=true]").length)||_(e[0].previousSibling).data("tracking"));)_(e).insertAfter(e.next());e.insertBefore(e[0].previousSibling)}}function $(e,t){var a=2<arguments.length&&arguments[2]!==undefined&&arguments[2];if(e&&(!e.isSameNode(t)||!_(e).hasClass("fr-marker"))){for(;e.nodeType===Node.COMMENT_NODE;)e=e.nextSibling;if(_(e).parent().is("table")&&0!==_(e).parent().next().text().length&&$(_(e).parent().next()[0],t,a),"TD"!==e.tagName||1!==e.childNodes.length||"BR"!==e.childNodes[0].tagName){if(A.node.isBlock(e)&&"HR"!==e.tagName)return A.node.hasClass(e.firstChild,"fr-marker")?$(e.firstChild.nextSibling,t,a):$(e.firstChild,t,a),!1;if("BR"===e.tagName&&"TD"===e.parentElement.tagName){var n=e.parentElement.nextElementSibling;_(e).remove(),$(n,t)}var r="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),i=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",s=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(i,"></span>")),l=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" '.concat(A.helpers.isIOS()?"":'contenteditable="false"',"></span>"));A.opts.showChangesEnabled||(A.helpers.isMobile()?l.addClass("fr-track-hide-mobile"):l.addClass("fr-track-hide"));var o=e;for(_(e).before(s),A.track_changes.pushChange(r);o&&_(o).hasClass("fr-marker");)o=o.nextSibling;for(var c=!1;o&&!c&&!_(o).hasClass("fr-marker")&&!_(o).is("[data-track-id]")&&0===_(o).find("fr-marker").length&&"UL"!==o.tagName&&"OL"!==o.tagName;){var d=o;if("IMG"===o.tagName&&_(o).data("tracking-img","true"),A.node.isBlock(o)&&"HR"!==e.tagName)return $(o.firstChild,t,a),!1;if(o)for(var g=o.childNodes,h=0;h<g.length;h++)if(g[h].className&&"fr-marker"===g[h].className){c=!0,$(o.firstChild,t,a);break}c||(o=o.nextSibling,_(l).append(d))}if(!o||"UL"!==o.tagName&&"OL"!==o.tagName||$(o,t,a),a?T.push({span:s,"delete":l}):(A.helpers.isIOS()&&T.push({"delete":l}),_(s).prepend(l)),A.browser.msie?_(s).prepend("".concat(j.INVISIBLE_SPACE+j.MARKERS)):_(s).prepend("".concat(j.INVISIBLE_SPACE)),_(s).append("".concat(j.INVISIBLE_SPACE+j.MARKERS)),!o&&!e.isSameNode(t)){for(var f=s.get(0).parentNode;f&&!f.nextSibling&&!A.node.isElement(f);)f=f.parentNode;if(f){var p=f.nextSibling;p&&(A.node.isBlock(p)?"HR"===p.tagName?$(p.nextSibling,t,a):(A.browser.mozilla&&"LI"===f.tagName&&"SPAN"===f.lastChild.tagName&&_(f.lastChild).hasClass("fr-marker")&&f.lastChild.remove(),$(p.firstChild,t,a)):$(p,t,a))}}}}}function p(e){if(A.opts.trackChangesEnabled){A.selection.restore();var t=A.selection.ranges(0).startContainer,a=_(t).parentsUntil(A.$el,"[data-tracking=true]");if(_(t).data("tracking"))return;if(!a.length&&!A.selection.isCollapsed()&&"quote"!=e){A.selection.save(),u(A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),A.$el.find('.fr-marker[data-type="false"]').length&&A.$el.find('.fr-marker[data-type="false"]').get(0));var n=A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),r=n.parentNode;if(r&&"A"===r.tagName&&r.firstChild&&"SPAN"===r.firstChild.tagName&&2<r.firstChild.childNodes.length&&"STRONG"===r.firstChild.childNodes[3].tagName)_(r.firstChild.childNodes[3].firstChild).before(n);else{for(var i=n.previousSibling.firstChild;i&&"SPAN"!==i.tagName;)i=i.nextSibling;_(i).after(n)}A.selection.restore()}}}function u(e,t,a){if(e&&!("<br>"===_(e).html()&&_(e).parent().is("td")||(_(e).parent().is("table")&&0!==_(e).parent().next().text().length&&u(_(e).parent().next()[0],t,a),_(e).is("br")&&_(e).parent().length&&_(e).parent().is("td")&&0===_(e).parent().text().length))){for(a||(a="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),A.track_changes.pushChange(a));e.nodeType===Node.COMMENT_NODE;)e=e.nextSibling;if(A.node.isBlock(e)&&"HR"!==e.tagName)return A.node.hasClass(e.firstChild,"fr-marker")?u(e.firstChild.nextSibling,t,a):u(e.firstChild,t,a),!1;var n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r=_('<span data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></span>")),i=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false" style="display:none"></span>'),s=e;for(_(e).before(r);s&&_(s).hasClass("fr-marker");)s=s.nextSibling;for(var l=!1;s&&!l&&!_(s).hasClass("fr-marker")&&0===_(s).find("fr-marker").length&&"UL"!==s.tagName&&"OL"!==s.tagName;){var o=s;if(A.node.isBlock(s)&&"HR"!==e.tagName)return u(s.firstChild,t,a),!1;if(s)for(var c=s.childNodes,d=0;d<c.length;d++)if(c[d].className&&"fr-marker"===c[d].className){l=!0,u(s.firstChild,t,a);break}l||(s=s.nextSibling,_(i).append(o.cloneNode(!0)),_(r).append(o))}if(!s||"UL"!==s.tagName&&"OL"!==s.tagName||u(s,t,a),_(s).hasClass("fr-marker")&&_(r).append(s),_(r).prepend(i),_(r).prepend("".concat(j.INVISIBLE_SPACE)),_(r).append("".concat(j.INVISIBLE_SPACE)),!s&&!e.isSameNode(t)){for(var g=r.get(0).parentNode;g&&!g.nextSibling&&!A.node.isElement(g);)g=g.parentNode;if(g){var h=g.nextSibling;h&&(A.node.isBlock(h)?"HR"===h.tagName?u(h.nextSibling,t,a):u(h.firstChild,t,a):u(h,t,a))}}}}function k(e,t,a){var n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r=_('<span data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></span>")),i=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');A.opts.showChangesEnabled||i.addClass("fr-track-hide"),i.append(t.get(0).innerHTML),r.append(i);var s=e.get(0).innerHTML;e.html(""),e.append(r),r.append(s)}function m(){if(A.events.trigger("image.hideResizer"),A.events.trigger("video.hideResizer"),A.html.cleanEmptyTags(!0),A.helpers.isMobile())for(var e=A.$el.find("img[data-tracking-img]"),t=0;t<e.length;t++){var a=_(e.get(t));a.parent()&&a.parent().data("tracking")||a.removeData("tracking-img")}}function e(){A.$el.find("li").each(function(){0===this.innerText.replace(/\u200B/g,"").length&&this.remove()})}function t(){var e=c();if(e){var t,a=A.$el.find("[data-track-id=".concat(e,"]"));if(a.length){var n=a.parent("a");if(n.length){var r=_(n.get(0).outerHTML).text();1===[].filter.call(r,function(e){return 8203!==e.charCodeAt(0)}).length&&(t=n)}for(var i=0;i<a.length;i++){var s=a.get(i),l=_(a).data("tracking-deleted")?_(a):_(s).find("[data-tracking-deleted=true]");l.length&&(l.get(0).remove?l.get(0).remove():l.get(0).parentNode.removeChild(l.get(0))),s.hasAttribute("style")?(_(s).removeData("tracking"),_(s).removeData("track-id"),_(s).removeClass("fr-highlight-change")):(A.selection.save(),0<_(s).find("IFRAME").length?(_(s).removeData("tracking"),_(s).removeData("track-id"),_(s).removeClass("fr-highlight-change")):s.outerHTML=s.innerHTML,A.selection.restore())}}t&&t.remove()}m()}function a(){var e=c();if(e){var t=A.$el.find("[data-track-id=".concat(e,"]"));if(t.length){A.selection.save();for(var a=t.length-1;0<=a;a--){var n=_(t).data("tracking-deleted")?_(t):_(t.get(a)).find("[data-tracking-deleted=true]");if(n.length)if(0<_(t).find("IFRAME").length)_(t).removeData("tracking"),_(t).removeData("track-id"),_(t).removeClass("fr-highlight-change"),_(t).removeClass("fr-tracking-deleted"),_(t).removeData("tracking-deleted"),_(t).removeAttr("contenteditable");else n.parent("[data-tracking=true]").data("track-id")==e?(_(t.get(a)).find("[data-tracking-deleted=true]").remove(),t.get(a).outerHTML=n.get(0).innerHTML):t.get(a).remove?t.get(a).remove():t.get(a).parentNode.removeChild(t.get(a));else t.get(a).remove?t.get(a).remove():t.get(a).parentNode.removeChild(t.get(a))}A.selection.restore()}}m()}return A.events.on("keydown",function(e){var t,a;if(!A.opts.trackChangesEnabled)return!0;if(l=null===(t=A.selection.get())||void 0===t?void 0:null===(a=t.focusNode)||void 0===a?void 0:a.nodeValue,A.helpers.isAndroid()){var n,r,i=A.selection.get();M=null==i?void 0:null===(n=i.focusNode)||void 0===n?void 0:n.nodeValue,w=null==i?void 0:i.focusNode,L=null===(r=w)||void 0===r?void 0:r.nextSibling,I=null==i?void 0:i.focusOffset}else if(function s(e){return(!A.keys.ctrlKey(e)||e.which!==j.KEYCODE.Z&&e.which!==j.KEYCODE.C)&&(48<=e.keyCode&&e.keyCode<=57||65<=e.keyCode&&e.keyCode<=90||97<=e.keyCode&&e.keyCode<=122||186<=e.keyCode&&e.keyCode<=222||13===e.keyCode||8===e.keyCode||32===e.keyCode||46===e.keyCode||96<=e.keyCode&&e.keyCode<=111)}(e))if(!A.keys.ctrlKey(e)||"b"!==e.key&&"i"!==e.key&&"u"!==e.key){if(A.keys.ctrlKey(e)&&"a"===e.key||A.keys.ctrlKey(e)&&"s"===e.key)return;f(e)}else p()},!0),A.events.on("keyup",function(e){if(!A.opts.trackChangesEnabled)return!0;var t,a;if(A.helpers.isMobile())if(i=null===(t=A.selection.get())||void 0===t?void 0:null===(a=t.focusNode)||void 0===a?void 0:a.nodeValue,h){for(var n=0;n<T.length;n++)A.opts.showChangesEnabled&&_(T[n].span).empty(),_(T[n].span).prepend(T[n]["delete"]);h=!(T=[])}else if(A.helpers.isIOS()){for(var r=0;r<T.length;r++)i&&1===i.length&&l&&1==l.length?(_(T[r]["delete"]).attr("contenteditable","true"),_(T[r]["delete"]).addClass("fr-ios-mobile-disable-select")):_(T[r]["delete"]).attr("contenteditable","false");T=[]}else{if(46===e.keyCode)return!0;f(e)}},!0),A.events.on("beforeinput",function(e){var t=e.originalEvent,a=!1;if(!A.opts.trackChangesEnabled)return!0;if(A.helpers.isAndroid()){var n=A.selection.get(),r=A.selection.ranges(0),i=r.startContainer,s=r.endContainer,l=_(i).parentsUntil(A.$el,"[data-tracking=true]"),o=_(s).parentsUntil(A.$el,"[data-tracking=true]");if("insertCompositionText"===t.inputType)if(""===t.data)a=!0;else if(n.toString().length>t.data.length){if(0<l.length||0<o.length)return h=!0,e.preventDefault(),!1;a=!0,e.composing=!0}if("insertText"!==t.inputType||A.selection.isCollapsed()||(a=!0),a||"deleteContentBackward"===t.inputType){var c,d;if(h=!0,i.lastChild&&!n.toString()&&null!==(c=i.lastChild.children)&&void 0!==c&&null!==(d=c.item(0))&&void 0!==d&&d.hasAttribute("contenteditable"))return;e.keyCode=8,e.deletion=!0,f(e)}}},!0),A.events.on("paste.before",function(e){A.opts.trackChangesEnabled&&A.helpers.isMobile()&&f(e)},!0),A.events.on("paste.after",function(e){if(A.opts.trackChangesEnabled){A.markers.insert();for(var t=A.$el.find(".fr-marker"),a=t.parent().data("tracking")?t.parent():t.parent().find("[data-tracking=true]"),n=a.children().eq(0).is("ul"),r=t.next();r.is("br");)(r=r.next()).prev().remove(),r.next().is("br")&&r.next().remove();if(r.is("ul")){var i=r.find("li");i.find("[data-tracking=true]").addClass("fr-highlight-change");var s=i[0].innerHTML;if(i.html(""),i.insertAfter(t.closest("li")),0==r.parent().find("[data-tracking=true]").length)return void i.append(s);if(r.remove(),a.data("tracking")){var l=a[0].innerHTML;0<l.trim().length&&a.parent().append(l),i.append(a),a.html(s)}else if(!n)return a.insertBefore(a.closest("ul")),void a.next().remove();A.markers.remove(),i.next().length&&i.next().is("li")&&""==i.next().text().trim()&&i.next().remove();var o=i.prev().children().eq(0);o.is("br")&&o.remove()}}},!0),A.events.on("image.inserted",function(e){A.helpers.isMobile()&&A.opts.trackChangesEnabled&&e.data("tracking-img",!0)}),A.events.on("image.removed",function(e){if(A.helpers.isMobile()&&A.opts.trackChangesEnabled&&!e.data("tracking-img")&&!e.parent().data("tracking")){var t=A.selection.ranges(0).startContainer,a=_(t).parentsUntil(A.$el,"[data-tracking=true]");A.markers.insert();var n=A.$el.find(".fr-marker"),r="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),i=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",s=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(i,"></span>")),l=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');A.opts.showChangesEnabled||l.addClass("fr-track-hide"),e.data("tracking-img",!0),_(t).data("tracking")||a.length?(_(n).replaceWith(l),_(l).append(e),A.markers.remove()):(_(n).replaceWith(s),_(s).prepend(l),_(l).append(e),A.markers.remove(),A.track_changes.pushChange(r))}}),A.events.on("commands.before",function(t){if(!A.opts.trackChangesEnabled)return!0;var e=["applytextColor","bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle","alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"];if(["change","applyAll","applyLast","removeLast","showChanges","trackChanges","moreTrackChanges","undo","redo","fullscreen","print","getPDF","spellChecker","selectAll","html","help"].filter(function(e){return e===t}).length||e.filter(function(e){return e===t}).length){if(e.filter(function(e){return e===t}).length&&"paragraphFormat"!==t&&"paragraphStyle"!==t&&"lineHeight"!==t)p(t);else if("paragraphFormat"===t||"paragraphStyle"===t||"lineHeight"===t){A.selection.save();for(var a=A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),i=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(n,"></span>")),s=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false" style="display:none"></span>'),l=a.parentNode.cloneNode(!0),o=l.childNodes,c=0;c<o.length;)o[c].className&&"fr-marker"===o[c].className?o[c].remove():c++;_(s).append(l),_(i).append(s),_(a.parentNode).after(_("<p></p>")),_(a.parentNode.nextSibling).append(i),i=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(n,"></span>")),_(a.parentNode.nextSibling).after(_("<p></p>")),_(a.parentNode.nextSibling.nextSibling).append(i),i.append(a.parentNode),A.track_changes.pushChange(r),A.selection.restore()}}else{if(j.COMMANDS[t]&&(j.COMMANDS[t].hasOwnProperty("type")&&"dropdown"===j.COMMANDS[t].type||j.COMMANDS[t].more_btn||j.COMMANDS[t].popup)){if("insertImage"!=t&&"insertFile"!=t)return}else if("clearFormatting"===t)return void(A.opts.trackChangesEnabled&&function(){g=A.selection.blocks();for(var a=[],n=0,e=0;e<g.length;e++){n=e<n?n:e;var t=_(g[e]);if(t.is("li"))t.siblings("li").each(function(e,t){_(t).find("li").length&&(a.push({index:n,item:t}),n+=1)});d[e]=_("<span>".concat(t.get(0).innerHTML,"</span>"))}for(var r=0,i=a;r<i.length;r++){var s=i[r],l=s.index,o=s.item,c=_(_(o).get(0).outerHTML);c.find("ul").remove(),c.find("ol").remove(),d=[].concat(F(d.slice(0,l+1)),[_("<span>".concat(c.get(0).innerHTML,"</span>"))],F(d.slice(l+1))),g=[].concat(F(g.slice(0,l+1)),[o],F(g.slice(l+1)))}}());f()}},!0),A.events.on("commands.after",function(e){if(!A.opts.trackChangesEnabled)return!0;if(0<=["undo","redo"].indexOf(e))!function r(){var e=A.$el.find("[data-tracking=true]");s.splice(0,s.length);for(var t=0;t<e.length;t++){var a=_(e.get(t)).data("track-id");s[a.slice(a.lastIndexOf("-")+1)]=a}}();else if("clearFormatting"==e&&A.opts.trackChangesEnabled){var t="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length);for(var a in g){var n=_(g[a]);d[a]&&(k(n,d[a],t),d[a]=null,o[a]=null)}A.track_changes.pushChange(t),d=[],g=null}},!0),A.events.on("quickInsert.commands.before",function(e){A.opts.trackChangesEnabled&&f(e)}),{toggleTracking:function n(){A.opts.trackChangesEnabled&&-1<A.html.get(!0,!0).indexOf("data-tracking")||A.opts.trackChangesEnabled&&0<A.$el.find("[data-tracking=true]").length?alert("Your editor has pending changes. Please resolve them before turning off Track Changes in the toolbar."):(A.commands.moreTrackChanges(),A.opts.trackChangesEnabled=!A.opts.trackChangesEnabled,A.opts.trackChangesEnabled||(A.opts.showChangesEnabled=!1))},pushChange:function r(e){s.push(e)},insertChangeAt:function v(e,t){s=[].concat(F(s.slice(0,e)),[t],F(s.slice(e)))},popChange:c,getPendingChanges:function C(){return s},showChanges:function b(){if(A.opts.showChangesEnabled=!A.opts.showChangesEnabled,function r(e,t){for(var a=0;a<e.length;a++)t?(_(e.get(a)).removeClass("fr-track-hide"),_(e.get(a)).removeClass("fr-track-hide-mobile")):A.helpers.isMobile()?_(e.get(a)).addClass("fr-track-hide-mobile"):_(e.get(a)).addClass("fr-track-hide")}(A.$el.find(".fr-tracking-deleted"),A.opts.showChangesEnabled),A.opts.showChangesEnabled)for(var e=A.$el.find("[data-tracking=true]").not(".fr-highlight-change"),t=0;t<e.length;t++)_(e.get(t)).addClass("fr-highlight-change");else for(var a=A.$el.find(".fr-highlight-change"),n=0;n<a.length;n++)_(a.get(n)).removeClass("fr-highlight-change")},acceptAllChanges:function S(){for(;0!=A.track_changes.getPendingChanges().length;)t();s=[],e(),A.$el.find("li").each(function(){!_(this).children()[0]||"OL"!==_(this).children()[0].tagName&&"UL"!==_(this).children()[0].tagName||e()})},rejectAllChanges:function N(){for(;0!=A.track_changes.getPendingChanges().length;)a();s=[]},acceptSingleChange:t,rejectSingleChange:a,refresh:function y(e){var t=A.$el.find("[data-tracking=true]");e.toggleClass("fr-disabled",!s.length),e.toggleClass("fr-active",s.length).attr("aria-pressed",s.length),0<!t.length&&(e.removeClass("fr-active"),e.addClass("fr-disabled"));var a=A.$tb.find('.fr-command[data-cmd="markdown"]');a&&A.opts.trackChangesEnabled?a.addClass("fr-disabled"):a&&!_(".fr-active.fr-popup").length&&a.removeClass("fr-disabled");var n=A.$tb.find('.fr-command[data-cmd="showChanges"]');n&&A.opts.trackChangesEnabled&&n.removeClass("fr-disabled")},replaceSpecialItem:function E(e){A.selection.setBefore(e.get(0)),A.selection.setAfter(e.get(0)),u(A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),A.$el.find('.fr-marker[data-type="false"]').length&&A.$el.find('.fr-marker[data-type="false"]').get(0))},removeSpecialItem:function x(e){A.selection.setBefore(e.get(0)),A.selection.setAfter(e.get(0)),$(A.$el.find('.fr-marker[data-type="true"]').length&&A.$el.find('.fr-marker[data-type="true"]').get(0),A.$el.find('.fr-marker[data-type="false"]').length&&A.$el.find('.fr-marker[data-type="false"]').get(0))},removedTable:function R(e){var t=!1;if(e.find("[data-tracking=true]").each(function(){0<this.innerText.replace(/\u200B/g,"").length&&(t=!0)}),t)alert("Your table has pending changes. Please resolve them before remove table.");else{var r="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),i=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",a=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(i,"></span>")),n=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');e.before(a),e.find("tr").find("> td").each(function(){var e=_('<span data-tracking="true" data-track-id="'.concat(r,'" ').concat(i,"></span>")),t=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>'),a=_(this),n=a[0].innerText;_(t)[0].innerText=n,a[0].innerText="",e.prepend(t),a.prepend(e)}),n.append(e),a.append(n),A.track_changes.pushChange(r)}},addQuote:function O(e){var t="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),a=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",n=_('<div data-tracking="true" data-track-id="'.concat(t,'" ').concat(a,"></div>")),r=_('<div data-tracking="true" data-track-id="'.concat(t,'" ').concat(a,"></div>")),i=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');A.opts.showChangesEnabled||i.addClass("fr-track-hide"),e.before(r),e.before(n);var s=e.get(0).innerHTML;i.append(s),n.append(i),r.append(e),r.find('[data-tracking="true"]').each(function(e,t){_(t).children().eq(0).insertBefore(_(t)),_(t).remove()}),A.track_changes.pushChange(t)},removeQuote:function V(e,t){if(!(0<t)){var a="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r=_('<div data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></div>")),i=_('<div data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></div>")),s=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');A.opts.showChangesEnabled||s.addClass("fr-track-hide"),e.before(i),e.before(r);var l=e.find("blockQuote").eq(0).html();l||(l=e.html()),s.append(e),r.append(s),i.append(l),i.find('[data-tracking="true"]').each(function(e,t){_(t).children().eq(0).insertBefore(_(t)),_(t).remove()}),A.track_changes.pushChange(a)}},wrapInTracking:function D(e,t){var a="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r=_('<span data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></span>"));t&&r.addClass(t);var i=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');return A.opts.showChangesEnabled||i.addClass("fr-track-hide"),e.before(r),r.append(e),A.track_changes.pushChange(a),r},wrapInDelete:function B(e){var t=_('<span data-tracking-deleted="true" class="fr-tracking-deleted" contenteditable="false"></span>');return A.opts.showChangesEnabled||(A.helpers.isMobile()?t.addClass("fr-track-hide-mobile"):t.addClass("fr-track-hide")),t.append(e),t},wrapLinkInTracking:function H(e,t){var a="pending-".concat(A.id,"-").concat(A.track_changes.getPendingChanges().length),n=A.opts.showChangesEnabled?'class="fr-highlight-change"':"",r=_('<span data-tracking="true" data-track-id="'.concat(a,'" ').concat(n,"></span>"));return e.before(r),r.append(e),A.track_changes.insertChangeAt(t-1,a),r},pasteInEmptyEdior:function K(e){var t=A.$el.find(".fr-highlight-change");_(t)[0].style.display="block",_(t)[0].innerHTML=e},pasteInEdior:function U(e){var t=A.$el.find(".fr-marker");_(t)[0].outerHTML=e,A.markers.remove()}}},j.DefineIcon("trackChanges",{NAME:"enable-tracking",SVG_KEY:"trackChanges"}),j.DefineIcon("showChanges",{NAME:"show-changes",SVG_KEY:"showTrackChanges"}),j.DefineIcon("applyAll",{NAME:"apply-all",SVG_KEY:"acceptAllChanges"}),j.DefineIcon("removeAll",{NAME:"remove-all",SVG_KEY:"rejectAllChanges"}),j.DefineIcon("applyLast",{NAME:"apply-last",SVG_KEY:"acceptSingleChange"}),j.DefineIcon("removeLast",{NAME:"remove-last",SVG_KEY:"rejectSingleChange"}),j.RegisterCommand("trackChanges",{type:"button",title:"Enable Track Changes",plugin:"track_changes",showOnMobile:!0,callback:function(){this.track_changes.toggleTracking()},refreshAfterCallback:!0,forcedRefresh:!0,refresh:function(e){e.toggleClass("fr-active",this.opts.trackChangesEnabled).attr("aria-pressed",this.opts.trackChangesEnabled)}}),j.RegisterCommand("showChanges",{type:"button",icon:"showChanges",title:"Show Changes",plugin:"track_changes",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,refreshAfterCallback:!0,toggle:!0,callback:function(){this.track_changes.showChanges()},refresh:function(e){e.toggleClass("fr-active",this.opts.showChangesEnabled).attr("aria-pressed",this.opts.showChangesEnabled)}}),j.RegisterCommand("applyAll",{type:"button",icon:"applyAll",title:"Accept All Changes",plugin:"track_changes",toggle:!0,refreshAfterCallback:!0,forcedRefresh:!0,callback:function(){0<this.track_changes.getPendingChanges().length&&this.track_changes.acceptAllChanges()},refresh:function(e){this.track_changes.refresh(e)}}),j.RegisterCommand("removeAll",{type:"button",icon:"removeAll",title:"Reject All Changes",plugin:"track_changes",toggle:!0,refreshAfterCallback:!0,forcedRefresh:!0,callback:function(){0<this.track_changes.getPendingChanges().length&&this.track_changes.rejectAllChanges()},refresh:function(e){this.track_changes.refresh(e)}}),j.RegisterCommand("applyLast",{type:"button",icon:"applyLast",title:"Accept Single Change",plugin:"track_changes",toggle:!0,refreshAfterCallback:!0,forcedRefresh:!0,callback:function(){0<this.track_changes.getPendingChanges().length&&this.track_changes.acceptSingleChange()},refresh:function(e){this.track_changes.refresh(e)}}),j.RegisterCommand("removeLast",{type:"button",icon:"removeLast",title:"Reject Single Change",plugin:"track_changes",toggle:!0,refreshAfterCallback:!0,forcedRefresh:!0,callback:function(){0<this.track_changes.getPendingChanges().length&&this.track_changes.rejectSingleChange()},refresh:function(e){this.track_changes.refresh(e)}})});
/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -7,2 +7,2 @@ * 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(ye){"use strict";ye=ye&&ye.hasOwnProperty("default")?ye["default"]:ye,Object.assign(ye.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(ye.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg","mp3","mpeg","url"],videoAllowedProviders:[".*"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","videoDisplay","videoAlign","videoSize","autoplay"],videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoMaxSize:52428800,videoMove:!0,videoResize:!0,videoResponsive:!1,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoUpload:!0,videoUploadMethod:"POST",videoUploadParam:"file",videoUploadParams:{},videoUploadToS3:!1,videoUploadToAzure:!1,videoUploadURL:null}),ye.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"https://www.youtube.com/embed/$1?$2",html:'<iframe width="640" height="360" src="{url}&wmode=opaque&rel=0" frameborder="0" allowfullscreen></iframe>',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vidyard"}],ye.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,ye.PLUGINS.video=function(w){var s,p,f,E,i,o,A=w.$,C="https://i.froala.com/upload",c=2,v=3,u=4,S=5,U=6,r={};function g(){var e=w.popups.get("video.insert");e.find(".fr-video-by-url-layer input").val("").trigger("change");var t=e.find(".fr-video-embed-layer textarea");t.val("").trigger("change"),(t=e.find(".fr-video-upload-layer input")).val("").trigger("change")}function a(){var e=w.popups.get("video.edit");if(e||(e=function n(){var e="";if(0<w.opts.videoEditButtons.length){w.opts.videoResponsive&&(-1<w.opts.videoEditButtons.indexOf("videoSize")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoSize"),1),-1<w.opts.videoEditButtons.indexOf("videoDisplay")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<w.opts.videoEditButtons.indexOf("videoAlign")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n '.concat(w.button.buildList(w.opts.videoEditButtons)," \n </div>")},o=w.popups.create("video.edit",t);return w.events.$on(w.$wp,"scroll.video-edit",function(){E&&w.popups.isVisible("video.edit")&&(w.events.disableBlur(),y(E))}),o}return!1}()),e){w.popups.setContainer("video.edit",w.$sc),w.popups.refresh("video.edit");var t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight(),r=t.get(0).src?t.get(0).src:t.get(0).currentSrc,a=!(!(r=(r=r.split("."))[r.length-1]).includes("pdf")&&!r.includes("txt"));t.hasClass("fr-file")||a||E.find("audio").get(0)?(document.getElementById("autoplay-".concat(w.id))&&(document.getElementById("autoplay-".concat(w.id)).style.display="none"),document.getElementById("videoReplace-".concat(w.id))&&(document.getElementById("videoReplace-".concat(w.id)).style.display="none")):(document.getElementById("autoplay-".concat(w.id))&&(document.getElementById("autoplay-".concat(w.id)).style.display=""),document.getElementById("videoReplace-".concat(w.id))&&(document.getElementById("videoReplace-".concat(w.id)).style.display="")),w.popups.show("video.edit",o,i,t.outerHeight(),!0)}}function n(e){if(e)return w.popups.onRefresh("video.insert",g),w.popups.onHide("video.insert",q),!0;var t="";w.opts.videoUpload||-1===w.opts.videoInsertButtons.indexOf("videoUpload")||w.opts.videoInsertButtons.splice(w.opts.videoInsertButtons.indexOf("videoUpload"),1);var o=w.button.buildList(w.opts.videoInsertButtons);""!==o&&(t='<div class="fr-buttons">'+o+"</div>");var i,r="",a=w.opts.videoInsertButtons.indexOf("videoUpload"),n=w.opts.videoInsertButtons.indexOf("videoByURL"),s=w.opts.videoInsertButtons.indexOf("videoEmbed");if(0<=n){i=" fr-active",(a<n&&0<=a||s<n&&0<=s)&&(i="");r='<div class="fr-video-by-url-layer fr-layer'.concat(i,'" id="fr-video-by-url-layer-').concat(w.id,'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Paste in a video URL"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><span style=\'float:left\'><div class="fr-checkbox-line fr-autoplay-margin"><span class="fr-checkbox"> <input id=\'videoPluginAutoplay\' data-checked="_blank" type="checkbox"> <span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','</span></span> <label id="fr-label-target-').concat(w.id,'">Autoplay</label></div> </span><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>")}var d="";0<=s&&(i=" fr-active",(a<s&&0<=a||n<s&&0<=n)&&(i=""),d='<div class="fr-video-embed-layer fr-layer'.concat(i,'" id="fr-video-embed-layer-').concat(w.id,'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertEmbed" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>"));var l="";0<=a&&(i=" fr-active",(s<a&&0<=s||n<a&&0<=n)&&(i=""),l='<div class="fr-video-upload-layer fr-layer'.concat(i,'" id="fr-video-upload-layer-').concat(w.id,'"><strong>').concat(w.language.translate("Drop video"),"</strong><br>(").concat(w.language.translate("or click"),')<div class="fr-form"><input type="file" accept="video/').concat(w.opts.videoAllowedTypes.join(", video/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-').concat(w.id,'" role="button"></div></div>'));var p={buttons:t,by_url_layer:r,embed_layer:d,upload_layer:l,progress_bar:'<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>'},f=w.popups.create("video.insert",p);return function c(i){w.events.$on(i,"dragover dragenter",".fr-video-upload-layer",function(){return A(this).addClass("fr-drop"),!1},!0),w.events.$on(i,"dragleave dragend",".fr-video-upload-layer",function(){return A(this).removeClass("fr-drop"),!1},!0),w.events.$on(i,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),A(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var o=i.data("instance")||w;o.events.disableBlur(),o.video.upload(t.files),o.events.enableBlur()}},!0),w.helpers.isIOS()&&w.events.$on(i,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){A(this).trigger("click")},!0);w.events.$on(i,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||w;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}A(this).val("")},!0)}(f),f}function d(e){w.events.focus(!0),w.selection.restore();var t=!1;if(E&&(W(),t=!0),w.opts.trackChangesEnabled){w.edit.on(),w.events.focus(!0),w.selection.restore(),w.undo.saveStep(),w.markers.insert(),w.html.wrap();var o=w.$el.find(".fr-marker");w.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>")),w.selection.clear()}else w.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>"),!1,w.opts.videoSplitHTML);w.popups.hide("video.insert");var i=w.$el.find(".fr-jiv");i.removeClass("fr-jiv"),i.toggleClass("fr-rv",w.opts.videoResponsive),J(i,w.opts.videoDefaultDisplay,w.opts.videoDefaultAlign),i.toggleClass("fr-draggable",w.opts.videoMove),w.events.trigger(t?"video.replaced":"video.inserted",[i])}function h(){var e=A(this);w.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),y(e.parent()),w.events.trigger("video.loaded",[e.parent()])}function R(s,e,l,p,f){w.edit.off(),m("Loading video"),e&&(s=w.helpers.sanitizeURL(s));var c=function c(){var e,t;if(p){w.undo.canDo()||p.find("video").hasClass("fr-uploading")||w.undo.saveStep();var o=p.find("video").data("fr-old-src"),i=p.data("fr-replaced");p.data("fr-replaced",!1),w.$wp?((e=p.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),o&&p.find("video").attr("src",o),p.replaceWith(e)):e=p;for(var r=e.find("video").get(0).attributes,a=0;a<r.length;a++){var n=r[a];0===n.nodeName.indexOf("data-")&&e.find("video").removeAttr(n.nodeName)}if(void 0!==l)for(t in l)l.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),l[t]);e.find("video").on("canplay",h),e.find("video").attr("src",s),w.edit.on(),L(),w.undo.saveStep(),w.$el.blur(),w.events.trigger(i?"video.replaced":"video.inserted",[e,f])}else e=function d(e,t,o){var i,r="";if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(r+=" data-".concat(i,'="').concat(t[i],'"'));var a=w.opts.videoDefaultWidth;a&&"auto"!=a&&(a="".concat(a,"px"));w.helpers.isMobile()&&w.browser.safari&&(r+=" autoplay playsinline");var n=A(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+w.opts.videoDefaultDisplay[0]+("center"!=w.opts.videoDefaultAlign?" fr-fv"+w.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+r+(a?' style="width: '+a+';" ':"")+" controls>"+w.language.translate("Your browser does not support HTML5 video.")+"</video>");n.toggleClass("fr-draggable",w.opts.videoMove),w.edit.on(),w.events.focus(!0),w.selection.restore(),w.undo.saveStep(),w.opts.videoSplitHTML?w.markers.split():w.markers.insert();w.html.wrap();var s=w.$el.find(".fr-marker");w.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent());s.replaceWith(n),w.selection.clear(),n.find("video").get(0).readyState>n.find("video").get(0).HAVE_FUTURE_DATA||w.helpers.isIOS()?o.call(n.find("video").get(0)):n.find("video").on("canplaythrough load",o);return n}(s,l,h),L(),w.undo.saveStep(),w.events.trigger("video.inserted",[e,f])};x("Loading video"),c()}function x(e){var t=w.popups.get("video.insert");if(t||(t=n()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),E){var o=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));w.popups.setContainer("video.insert",w.$sc);var i=o.offset().left,r=o.offset().top+o.height();w.popups.show("video.insert",i,r,o.outerHeight())}void 0===e&&m(w.language.translate("Uploading"),0)}function l(e){var t=w.popups.get("video.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||w.$el.find("video.fr-error").length)){if(w.events.focus(),w.$el.find("video.fr-error").length&&(w.$el.find("video.fr-error").parent().remove(),w.undo.saveStep(),w.undo.run(),w.undo.dropRedo()),!w.$wp&&E){var o=E;M(!0),w.selection.setAfter(o.find("video").get(0)),w.selection.restore()}w.popups.hide("video.insert")}}function m(e,t){var o=w.popups.get("video.insert");if(o){var i=o.find(".fr-video-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function b(e){x();var t=w.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var o=t.find("h3");o.text(e),w.events.disableBlur(),o.focus()}function y(e){t.call(e.get(0))}function _(e,t,o){m("Loading video");var i=this.status,r=this.response,a=this.responseXML,n=this.responseText;try{if(w.opts.videoUploadToS3||w.opts.videoUploadToAzure)if(201==i){var s;if(w.opts.videoUploadToAzure){if(!1===w.events.trigger("video.uploadedToAzure",[this.responseURL,o,r],!0))return w.edit.on(),!1;s=t}else s=function l(e){try{var t=A(e).find("Location").text(),o=A(e).find("Key").text();return!1===w.events.trigger("video.uploadedToS3",[t,o,e],!0)?(w.edit.on(),!1):t}catch(i){return K(u,e),!1}}(a);s&&R(s,!1,[],e,r||a)}else K(u,r||a);else if(200<=i&&i<300){var d=function p(e){try{if(!1===w.events.trigger("video.uploaded",[e],!0))return w.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(K(c,e),!1)}catch(o){return K(u,e),!1}}(n);d&&R(d.link,!1,d,e,r||n)}else K(v,r||n)}catch(f){K(u,r||n)}}function B(){K(u,this.response||this.responseText||this.responseXML)}function D(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;m(w.language.translate("Uploading"),t)}}function k(){w.edit.on(),l(!0)}function I(e){if(!w.core.sameInstance(f))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;if("mousedown"==e.type){var i=w.$oel.get(0).ownerDocument,r=i.defaultView||i.parentWindow,a=!1;try{a=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(n){}a&&r.frameElement&&(t+=w.helpers.getPX(A(r.frameElement).offset().left)+r.frameElement.clientLeft,o=e.clientY+w.helpers.getPX(A(r.frameElement).offset().top)+r.frameElement.clientTop)}w.undo.canDo()||w.undo.saveStep(),(p=A(this)).data("start-x",t),p.data("start-y",o),s.show(),w.popups.hideAll(),N()}function T(e){if(!w.core.sameInstance(f))return!0;if(p){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;var i=p.data("start-x"),r=p.data("start-y");p.data("start-x",t),p.data("start-y",o);var a=t-i,n=o-r,s=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),d=s.width(),l=s.height();(p.hasClass("fr-hnw")||p.hasClass("fr-hsw"))&&(a=0-a),(p.hasClass("fr-hnw")||p.hasClass("fr-hne"))&&(n=0-n),s.css("width",d+a),s.css("height",l+n),s.removeAttr("width"),s.removeAttr("height"),O()}}function z(e){if(!w.core.sameInstance(f))return!0;p&&E&&(e&&e.stopPropagation(),p=null,s.hide(),O(),a(),w.undo.saveStep())}function P(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function $(e,t,o,i){return e.pageX=t,e.pageY=t,I.call(this,e),e.pageX=e.pageX+o*Math.floor(Math.pow(1.1,i)),e.pageY=e.pageY+o*Math.floor(Math.pow(1.1,i)),T.call(this,e),z.call(this,e),++i}function L(){var e,t=Array.prototype.slice.call(w.el.querySelectorAll("video, .fr-video > *")),o=[];for(e=0;e<t.length;e++)o.push(t[e].getAttribute("src")),A(t[e]).toggleClass("fr-draggable",w.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(i)for(e=0;e<i.length;e++)o.indexOf(i[e].getAttribute("src"))<0&&w.events.trigger("video.removed",[A(i[e])]);i=t}function O(){f||function n(){var e;if(w.shared.$video_resizer?(f=w.shared.$video_resizer,s=w.shared.$vid_overlay,w.events.on("destroy",function(){A("body").first().append(f.removeClass("fr-active"))},!0)):(w.shared.$video_resizer=A(document.createElement("div")).attr("class","fr-video-resizer"),f=w.shared.$video_resizer,w.events.$on(f,"mousedown",function(e){e.stopPropagation()},!0),w.opts.videoResize&&(f.append(P("nw")+P("ne")+P("sw")+P("se")),w.shared.$vid_overlay=A(document.createElement("div")).attr("class","fr-video-overlay"),s=w.shared.$vid_overlay,e=f.get(0).ownerDocument,A(e).find("body").first().append(s))),w.events.on("shared.destroy",function(){f.html("").removeData().remove(),f=null,w.opts.videoResize&&(s.remove(),s=null)},!0),w.helpers.isMobile()||w.events.$on(A(w.o_win),"resize.video",function(){M(!0)}),w.opts.videoResize){e=f.get(0).ownerDocument,w.events.$on(f,w._mousedown,".fr-handler",I),w.events.$on(A(e),w._mousemove,T),w.events.$on(A(e.defaultView||e.parentWindow),w._mouseup,z),w.events.$on(s,"mouseleave",z);var i=1,r=null,a=0;w.events.on("keydown",function(e){if(E){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,o=e.which;(o!==r||200<e.timeStamp-a)&&(i=1),(o==ye.KEYCODE.EQUALS||w.browser.mozilla&&o==ye.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=$.call(this,e,1,1,i):(o==ye.KEYCODE.HYPHEN||w.browser.mozilla&&o==ye.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(i=$.call(this,e,2,-1,i)),r=o,a=e.timeStamp}}),w.events.on("keyup",function(){i=1})}}(),(w.$wp||w.$sc).append(f),f.data("instance",w);var e=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),t=0,o=0;w.opts.iframe&&(o=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-top")),t=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-left"))),f.css("top",(w.opts.iframe?e.offset().top+o-1:e.offset().top-w.$wp.offset().top-1)+w.$wp.scrollTop()).css("left",(w.opts.iframe?e.offset().left+t-1:e.offset().left-w.$wp.offset().left-1)+w.$wp.scrollLeft()).css("width",e.get(0).getBoundingClientRect().width).css("height",e.get(0).getBoundingClientRect().height).addClass("fr-active")}function t(e){if(e&&"touchend"==e.type&&o)return!0;if(e&&w.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(w.edit.isDisabled())return!1;for(var t=0;t<ye.INSTANCES.length;t++)ye.INSTANCES[t]!=w&&ye.INSTANCES[t].events.trigger("video.hideResizer");w.toolbar.disable(),w.helpers.isMobile()&&(w.events.disableBlur(),w.$el.blur(),w.events.enableBlur()),w.$el.find(".fr-video.fr-active").removeClass("fr-active"),(E=A(this)).addClass("fr-active"),w.opts.iframe&&w.size.syncIframe(),ee(),O(),a(),w.selection.clear(),w.button.bulkRefresh(),w.events.trigger("image.hideResizer")}function M(e){E&&(function t(){return w.shared.vid_exit_flag}()||!0===e)&&(f.removeClass("fr-active"),w.toolbar.enable(),E.removeClass("fr-active"),E=null,N())}function V(){w.shared.vid_exit_flag=!0}function N(){w.shared.vid_exit_flag=!1}function Y(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var o=t.files[0];if(o&&o.type&&-1!==o.type.indexOf("video")){if(!w.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;w.markers.remove(),w.markers.insertAtPoint(e.originalEvent),w.$el.find(".fr-marker").replaceWith(ye.MARKERS),w.popups.hideAll();var i=w.popups.get("video.insert");return i||(i=n()),w.popups.setContainer("video.insert",w.$sc),w.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),x(),0<=w.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))?H(t.files):K(U),e.preventDefault(),e.stopPropagation(),!1}}}function H(e){if(void 0!==e&&0<e.length){if(!1===w.events.trigger("video.beforeUpload",[e]))return!1;var t,o=e[0];if(!(null!==w.opts.videoUploadURL&&w.opts.videoUploadURL!=C||w.opts.videoUploadToS3||w.opts.videoUploadToAzure))return function y(i){E&&E.find("iframe")&&E.find("iframe").length&&W();var r=new FileReader;r.onload=function(){r.result;for(var e=atob(r.result.split(",")[1]),t=[],o=0;o<e.length;o++)t.push(e.charCodeAt(o));R(window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:i.type})),!1,null,E)},x(),r.readAsDataURL(i)}(o),!1;if(o.size>w.opts.videoMaxSize)return K(S),!1;if(w.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))<0)return K(U),!1;if(w.drag_support.formdata&&(t=w.drag_support.formdata?new FormData:null),t){var i;if(!1!==w.opts.videoUploadToS3)for(i in t.append("key",w.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(o.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",o.type),w.opts.videoUploadToS3.params)w.opts.videoUploadToS3.params.hasOwnProperty(i)&&t.append(i,w.opts.videoUploadToS3.params[i]);for(i in w.opts.videoUploadParams)w.opts.videoUploadParams.hasOwnProperty(i)&&t.append(i,w.opts.videoUploadParams[i]);t.append(w.opts.videoUploadParam,o);var r,a,n=w.opts.videoUploadURL;w.opts.videoUploadToS3&&(n=w.opts.videoUploadToS3.uploadURL?w.opts.videoUploadToS3.uploadURL:"https://".concat(w.opts.videoUploadToS3.region,".amazonaws.com/").concat(w.opts.videoUploadToS3.bucket));var s=w.opts.videoUploadMethod;w.opts.videoUploadToAzure&&(n=w.opts.videoUploadToAzure.uploadURL?"".concat(w.opts.videoUploadToAzure.uploadURL,"/").concat(o.name):encodeURI("https://".concat(w.opts.videoUploadToAzure.account,".blob.core.windows.net/").concat(w.opts.videoUploadToAzure.container,"/").concat(o.name)),r=n,w.opts.videoUploadToAzure.SASToken&&(n+=w.opts.videoUploadToAzure.SASToken),s="PUT");var d=w.core.getXHR(n,s);if(w.opts.videoUploadToAzure){var l=(new Date).toUTCString();if(!w.opts.videoUploadToAzure.SASToken&&w.opts.videoUploadToAzure.accessKey){var p=w.opts.videoUploadToAzure.account,f=w.opts.videoUploadToAzure.container;if(w.opts.videoUploadToAzure.uploadURL){var c=w.opts.videoUploadToAzure.uploadURL.split("/");f=c.pop(),p=c.pop().split(".")[0]}var v="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(l,"\nx-ms-version:2019-07-07"),u=encodeURI("/"+p+"/"+f+"/"+o.name),g=s+"\n\n\n"+o.size+"\n\n"+o.type+"\n\n\n\n\n\n\n"+v+"\n"+u,h=w.cryptoJSPlugin.cryptoJS.HmacSHA256(g,w.cryptoJSPlugin.cryptoJS.enc.Base64.parse(w.opts.videoUploadToAzure.accessKey)).toString(w.cryptoJSPlugin.cryptoJS.enc.Base64),m="SharedKey "+p+":"+h;a=h,d.setRequestHeader("Authorization",m)}for(i in d.setRequestHeader("x-ms-version","2019-07-07"),d.setRequestHeader("x-ms-date",l),d.setRequestHeader("Content-Type",o.type),d.setRequestHeader("x-ms-blob-type","BlockBlob"),w.opts.videoUploadParams)w.opts.videoUploadParams.hasOwnProperty(i)&&d.setRequestHeader(i,w.opts.videoUploadParams[i]);for(i in w.opts.videoUploadToAzure.params)w.opts.videoUploadToAzure.params.hasOwnProperty(i)&&d.setRequestHeader(i,w.opts.videoUploadToAzure.params[i])}d.onload=function(){_.call(d,E,r,a)},d.onerror=B,d.upload.onprogress=D,d.onabort=k,x(),w.events.disableBlur(),w.edit.off(),w.events.enableBlur();var b=w.popups.get("video.insert");b&&A(b.off("abortUpload")).on("abortUpload",function(){4!=d.readyState&&d.abort()}),d.send(w.opts.videoUploadToAzure?o:t)}}}function K(e,t){w.edit.on(),E&&E.find("video").addClass("fr-error"),b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.error",[{code:e,message:r[e]},t])}function F(){if(E){var e=w.popups.get("video.size"),t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));e.find('input[name="width"]').val(t.get(0).style.width||t.attr("width")).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height||t.attr("height")).trigger("change")}}function X(e){if(e)return w.popups.onRefresh("video.size",F),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.opts.videoSizeButtons),"</div>"),size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'.concat(w.id,'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-').concat(w.id,'" type="text" name="width" placeholder="').concat(w.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-').concat(w.id,'" type="text" name="height" placeholder="').concat(w.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoSetSize" tabIndex="2" role="button">').concat(w.language.translate("Update"),"</button></div></div>")},o=w.popups.create("video.size",t);return w.events.$on(w.$wp,"scroll",function(){E&&w.popups.isVisible("video.size")&&(w.events.disableBlur(),y(E))}),o}function G(e){if(void 0===e&&(e=E),e){if(e.hasClass("fr-fvl"))return"left";if(e.hasClass("fr-fvr"))return"right";if(e.hasClass("fr-dvb")||e.hasClass("fr-dvi"))return"center";if("block"==e.css("display")){if("left"==e.css("text-algin"))return"left";if("right"==e.css("text-align"))return"right"}else{if("left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function j(e){void 0===e&&(e=E);var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function W(){if(E&&!1!==w.events.trigger("video.beforeRemove",[E])){var e=E;if(w.popups.hideAll(),M(!0),w.opts.trackChangesEnabled&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return void w.track_changes.removeSpecialItem(e);w.selection.setBefore(e.get(0))||w.selection.setAfter(e.get(0)),e.remove(),w.selection.restore(),w.html.fillEmptyBlocks()}}function q(){l()}function J(e,t,o){!w.opts.htmlUntouched&&w.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(o[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==o?e.css({"float":"none"}):"left"==o?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==o?e.css({textAlign:"left"}):"right"==o?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function Z(){var e=w.$el.find("video").filter(function(){return 0===A(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(A(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),w.$el.find("embed, iframe").filter(function(){if(w.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<A(this).parents("span.fr-video").length)return!1;for(var e=A(this).attr("src"),t=0;t<ye.VIDEO_PROVIDERS.length;t++){var o=ye.VIDEO_PROVIDERS[t];if(o.test_regex.test(e)&&new RegExp(w.opts.videoAllowedProviders.join("|")).test(o.provider))return!0}return!1}).map(function(){return 0===A(this).parents("object").length?this:A(this).parents("object").get(0)}).wrap(A(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,o,i,r,a=w.$el.find("span.fr-video, video"),n=0;n<a.length;n++){var s=A(a[n]);!w.opts.htmlUntouched&&w.opts.useClasses?((r=s).hasClass("fr-dvi")||r.hasClass("fr-dvb")||(r.addClass("fr-fv".concat(G(r)[0])),r.addClass("fr-dv".concat(j(r)[0]))),w.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):w.opts.htmlUntouched||w.opts.useClasses||(void 0,o=(t=s).hasClass("fr-dvb")?"block":t.hasClass("fr-dvi")?"inline":null,i=t.hasClass("fr-fvl")?"left":t.hasClass("fr-fvr")?"right":G(t),J(t,o,i),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}a.toggleClass("fr-draggable",w.opts.videoMove)}}function Q(e){document.getElementById("autoplay-".concat(w.id)).style.cssText="background:".concat(e)}function ee(){if(E){w.selection.clear();var e=w.doc.createRange();e.selectNode(E.get(0)),w.selection.get().addRange(e)}}return r[1]="Video cannot be loaded from the passed link.",r[c]="No link in upload response.",r[v]="Error during file upload.",r[u]="Parsing response failed.",r[S]="File is too large.",r[U]="Video file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",w.shared.vid_exit_flag=!1,{_init:function te(){w.opts.videoResponsive&&(w.opts.videoResize=!1),function e(){w.events.on("drop",Y,!0),w.events.on("mousedown window.mousedown",V),w.events.on("window.touchmove",N),w.events.on("mouseup window.mouseup",M),w.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&M()}),w.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){M(!0)})}(),w.helpers.isMobile()&&(w.events.$on(w.$el,"touchstart","span.fr-video",function(){o=!1}),w.events.$on(w.$el,"touchmove",function(){o=!0})),w.events.on("html.set",Z),Z(),w.events.$on(w.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(w.browser.msie||w.browser.edge)&&(e.target.innerText||(e.target.dragDrop(),t.call(this,e)))}),w.events.$on(w.$el,"click touchend","span.fr-video",function(e){if(e.target.innerText.length||"false"==A(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),w.events.on("keydown",function(e){var t=e.which;return!E||t!=ye.KEYCODE.BACKSPACE&&t!=ye.KEYCODE.DELETE?E&&t==ye.KEYCODE.ESC?(M(!0),e.preventDefault(),!1):E&&t!=ye.KEYCODE.F10&&!w.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),W(),w.undo.saveStep(),!1)},!0),w.events.on("toolbar.esc",function(){if(E)return w.events.disableBlur(),w.events.focus(),!1},!0),w.events.on("toolbar.focusEditor",function(){if(E)return!1},!0),w.events.on("keydown",function(){w.$el.find("span.fr-video:empty").remove()}),w.$wp&&(L(),w.events.on("contentChanged",L)),n(!0),X(!0)},showInsertPopup:function oe(){var e=w.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=w.popups.get("video.insert");if(t||(t=n()),l(),!t.hasClass("fr-active"))if(w.popups.refresh("video.insert"),w.popups.setContainer("video.insert",w.$tb),e.isVisible()){var o=w.button.getPosition(e),i=o.left,r=o.top;w.popups.show("video.insert",i,r,e.outerHeight())}else w.position.forSelection(t),w.popups.show("video.insert")},showLayer:function ie(e){var t,o,i=w.popups.get("video.insert");if(!E&&!w.opts.toolbarInline){var r=w.$tb.find('.fr-command[data-cmd="insertVideo"]');t=r.offset().left,o=r.offset().top+(w.opts.toolbarBottom?10:r.outerHeight()-10)}w.opts.toolbarInline&&(o=i.offset().top-w.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(o+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),w.popups.show("video.insert",t,o,0),w.accessibility.focusPopup(i)},refreshByURLButton:function re(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshEmbedButton:function ae(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshUploadButton:function ne(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:H,insertByURL:function se(e){var t=!!document.getElementById("videoPluginAutoplay")&&document.getElementById("videoPluginAutoplay").checked;void 0===e&&(e=(w.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim());var o=null;if(/^http/.test(e)||(e="https://".concat(e)),w.helpers.isURL(e))for(var i=0;i<ye.VIDEO_PROVIDERS.length;i++){var r=ye.VIDEO_PROVIDERS[i],a="autoplay=1";if(r.html.includes("autoplay=1")&&document.getElementById("videoPluginAutoplay").checked)r.html=r.html,document.getElementById("videoPluginAutoplay").checked=!1;else if(t){var n=r.html.indexOf("{url}")+5;r.html=[r.html.slice(0,n),a,r.html.slice(n)].join(""),t=!1,document.getElementById("videoPluginAutoplay").checked=!1}else(r=ye.VIDEO_PROVIDERS[i]).html=r.html.replace(a,"");if(r.test_regex.test(e)&&new RegExp(w.opts.videoAllowedProviders.join("|")).test(r.provider)){o=e.replace(r.url_regex,r.url_text),o=r.html.replace(/\{url\}/,o);break}}o?d(o):(b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.linkError",[e]))},insertEmbed:function de(e){void 0===e&&(e=w.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&ye.VIDEO_EMBED_REGEX.test(e)?d(e):(b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.codeError",[e]))},insert:d,align:function le(e){E.removeClass("fr-fvr fr-fvl"),!w.opts.htmlUntouched&&w.opts.useClasses?"left"==e?E.addClass("fr-fvl"):"right"==e&&E.addClass("fr-fvr"):J(E,j(),e),ee(),O(),a(),w.selection.clear()},refreshAlign:function pe(e){if(!E)return!1;e.find(">*").first().replaceWith(w.icon.create("video-align-".concat(G())))},refreshAlignOnShow:function fe(e,t){E&&t.find('.fr-command[data-param1="'.concat(G(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ce(e){E.removeClass("fr-dvi fr-dvb"),!w.opts.htmlUntouched&&w.opts.useClasses?"inline"==e?E.addClass("fr-dvi"):"block"==e&&E.addClass("fr-dvb"):J(E,e,G()),ee(),O(),a(),w.selection.clear()},refreshDisplayOnShow:function ve(e,t){E&&t.find('.fr-command[data-param1="'.concat(j(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:W,hideProgressBar:l,showSizePopup:function ue(){var e=w.popups.get("video.size");e||(e=X()),l(),w.popups.refresh("video.size"),w.popups.setContainer("video.size",w.$sc);var t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.height();w.popups.show("video.size",o,i,t.height(),!0)},replace:function ge(){var e=w.popups.get("video.insert");e||(e=n()),w.popups.isVisible("video.insert")||(l(),w.popups.refresh("video.insert"),w.popups.setContainer("video.insert",w.$sc));var t=E.offset().left+E.outerWidth()/2,o=E.offset().top+E.height();w.popups.show("video.insert",t,o,E.outerHeight(),!0)},back:function e(){E?(w.events.disableBlur(),E[0].click()):(w.events.disableBlur(),w.selection.restore(),w.events.enableBlur(),w.popups.hide("video.insert"),w.toolbar.showInline())},setSize:function he(e,t){if(E){var o=w.popups.get("video.size"),i=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));i.css("width",e||o.find('input[name="width"]').val()),i.css("height",t||o.find('input[name="height"]').val()),i.get(0).style.width&&i.removeAttr("width"),i.get(0).style.height&&i.removeAttr("height"),o.find("input:focus").blur(),setTimeout(function(){E.trigger("click")},w.helpers.isAndroid()?50:0)}},get:function me(){return E},showProgressBar:x,_editVideo:y,setAutoplay:function be(){var e;if(E.find("iframe, embed, audio").get(0))(e=E.find("iframe, embed, audio")).get(0).src.includes("autoplay=1")?(Q("#FFFFFF"),e.get(0).src=e.get(0).src.replace("&autoplay=1","")):(Q("#D6D6D6"),e.get(0).src=e.get(0).src+"&autoplay=1");else if((e=E.find("iframe, embed, video")).get(0).outerHTML.includes("autoplay"))Q("#FFFFFF"),e.get(0).outerHTML=e.get(0).outerHTML.replace("autoplay","");else{Q("#D6D6D6");var t=e.get(0).outerHTML.indexOf("class")-1;e.get(0).outerHTML=[e.get(0).outerHTML.slice(0,t),"autoplay",e.get(0).outerHTML.slice(t)].join("")}}}},ye.RegisterCommand("insertVideo",{title:"Insert Video",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("video.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("video.insert")):this.video.showInsertPopup()},plugin:"video"}),ye.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),ye.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),ye.RegisterCommand("videoByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-by-url")},refresh:function(e){this.video.refreshByURLButton(e)}}),ye.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),ye.RegisterCommand("videoEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-embed")},refresh:function(e){this.video.refreshEmbedButton(e)}}),ye.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),ye.RegisterCommand("videoUpload",{title:"Upload Video",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-upload")},refresh:function(e){this.video.refreshUploadButton(e)}}),ye.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),ye.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),ye.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),ye.RegisterCommand("videoDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.video.display(t)},refresh:function(e){this.opts.videoTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.video.refreshDisplayOnShow(e,t)}}),ye.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),ye.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),ye.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),ye.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),ye.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),ye.RegisterCommand("videoAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=ye.COMMANDS.videoAlign.options;for(var o in t)t.hasOwnProperty(o)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'.concat(o,'" title="').concat(this.language.translate(t[o]),'">').concat(this.icon.create("video-align-".concat(o)),'<span class="fr-sr-only">').concat(this.language.translate(t[o]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.video.align(t)},refresh:function(e){this.video.refreshAlign(e)},refreshOnShow:function(e,t){this.video.refreshAlignOnShow(e,t)}}),ye.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),ye.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),ye.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),ye.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),ye.DefineIcon("autoplay",{NAME:"autoplay",SVG_KEY:"autoplay"}),ye.RegisterCommand("autoplay",{undo:!1,focus:!1,popup:!0,title:"Autoplay",callback:function(){this.video.setAutoplay()}}),ye.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),ye.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),ye.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),ye.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(e){this.video.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),ye.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),ye.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})});
!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(we){"use strict";we=we&&we.hasOwnProperty("default")?we["default"]:we,Object.assign(we.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(we.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg","mp3","mpeg","url"],videoAllowedProviders:[".*"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","videoDisplay","videoAlign","videoSize","autoplay"],videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoMaxSize:52428800,videoMove:!0,videoResize:!0,videoResponsive:!1,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoUpload:!0,videoUploadMethod:"POST",videoUploadParam:"file",videoUploadParams:{},videoUploadToS3:!1,videoUploadToAzure:!1,videoUploadURL:null}),we.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"https://www.youtube.com/embed/$1?$2",html:'<iframe width="640" height="360" src="{url}&wmode=opaque&rel=0" frameborder="0" allowfullscreen></iframe>',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vidyard"}],we.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,we.PLUGINS.video=function(w){var s,p,f,E,i,o,A=w.$,C="https://i.froala.com/upload",c=2,v=3,u=4,S=5,U=6,r={};function g(){var e=w.popups.get("video.insert");e.find(".fr-video-by-url-layer input").val("").trigger("change");var t=e.find(".fr-video-embed-layer textarea");t.val("").trigger("change"),(t=e.find(".fr-video-upload-layer input")).val("").trigger("change")}function a(){var e=w.popups.get("video.edit");if(e||(e=function n(){var e="";if(0<w.opts.videoEditButtons.length){w.opts.videoResponsive&&(-1<w.opts.videoEditButtons.indexOf("videoSize")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoSize"),1),-1<w.opts.videoEditButtons.indexOf("videoDisplay")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<w.opts.videoEditButtons.indexOf("videoAlign")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n '.concat(w.button.buildList(w.opts.videoEditButtons)," \n </div>")},o=w.popups.create("video.edit",t);return w.events.$on(w.$wp,"scroll.video-edit",function(){E&&w.popups.isVisible("video.edit")&&(w.events.disableBlur(),y(E))}),o}return!1}()),e){w.popups.setContainer("video.edit",w.$sc),w.popups.refresh("video.edit");var t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight(),r=t.get(0).src?t.get(0).src:t.get(0).currentSrc,a=!(!(r=(r=r.split("."))[r.length-1]).includes("pdf")&&!r.includes("txt"));t.hasClass("fr-file")||a||E.find("audio").get(0)?(document.getElementById("autoplay-".concat(w.id))&&(document.getElementById("autoplay-".concat(w.id)).style.display="none"),document.getElementById("videoReplace-".concat(w.id))&&(document.getElementById("videoReplace-".concat(w.id)).style.display="none")):(document.getElementById("autoplay-".concat(w.id))&&(document.getElementById("autoplay-".concat(w.id)).style.display=""),document.getElementById("videoReplace-".concat(w.id))&&(document.getElementById("videoReplace-".concat(w.id)).style.display="")),w.popups.show("video.edit",o,i,t.outerHeight(),!0)}}function n(e){if(e)return w.popups.onRefresh("video.insert",g),w.popups.onHide("video.insert",J),!0;var t="";w.opts.videoUpload||-1===w.opts.videoInsertButtons.indexOf("videoUpload")||w.opts.videoInsertButtons.splice(w.opts.videoInsertButtons.indexOf("videoUpload"),1);var o=w.button.buildList(w.opts.videoInsertButtons);""!==o&&(t='<div class="fr-buttons">'+o+"</div>");var i,r="",a=w.opts.videoInsertButtons.indexOf("videoUpload"),n=w.opts.videoInsertButtons.indexOf("videoByURL"),s=w.opts.videoInsertButtons.indexOf("videoEmbed");if(0<=n){i=" fr-active",(a<n&&0<=a||s<n&&0<=s)&&(i="");r='<div class="fr-video-by-url-layer fr-layer'.concat(i,'" id="fr-video-by-url-layer-').concat(w.id,'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Paste in a video URL"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><span style=\'float:left\'><div class="fr-checkbox-line fr-autoplay-margin"><span class="fr-checkbox"> <input id=\'videoPluginAutoplay\' data-checked="_blank" type="checkbox"> <span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','</span></span> <label id="fr-label-target-').concat(w.id,'">Autoplay</label></div> </span><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>")}var d="";0<=s&&(i=" fr-active",(a<s&&0<=a||n<s&&0<=n)&&(i=""),d='<div class="fr-video-embed-layer fr-layer'.concat(i,'" id="fr-video-embed-layer-').concat(w.id,'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertEmbed" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>"));var l="";0<=a&&(i=" fr-active",(s<a&&0<=s||n<a&&0<=n)&&(i=""),l='<div class="fr-video-upload-layer fr-layer'.concat(i,'" id="fr-video-upload-layer-').concat(w.id,'"><strong>').concat(w.language.translate("Drop video"),"</strong><br>(").concat(w.language.translate("or click"),')<div class="fr-form"><input type="file" accept="video/').concat(w.opts.videoAllowedTypes.join(", video/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-').concat(w.id,'" role="button"></div></div>'));var p={buttons:t,by_url_layer:r,embed_layer:d,upload_layer:l,progress_bar:'<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>'},f=w.popups.create("video.insert",p);return function c(i){w.events.$on(i,"dragover dragenter",".fr-video-upload-layer",function(){return A(this).addClass("fr-drop"),!1},!0),w.events.$on(i,"dragleave dragend",".fr-video-upload-layer",function(){return A(this).removeClass("fr-drop"),!1},!0),w.events.$on(i,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),A(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var o=i.data("instance")||w;o.events.disableBlur(),o.video.upload(t.files),o.events.enableBlur()}},!0),w.helpers.isIOS()&&w.events.$on(i,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){A(this).trigger("click")},!0);w.events.$on(i,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||w;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}A(this).val("")},!0)}(f),f}function d(e){w.events.focus(!0),w.selection.restore();var t=!1;if(E&&(q(),t=!0),w.opts.trackChangesEnabled){w.edit.on(),w.events.focus(!0),w.selection.restore(),w.undo.saveStep(),w.markers.insert(),w.html.wrap();var o=w.$el.find(".fr-marker");w.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>")),w.selection.clear()}else w.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>"),!1,w.opts.videoSplitHTML);w.popups.hide("video.insert");var i=w.$el.find(".fr-jiv");i.removeClass("fr-jiv"),i.toggleClass("fr-rv",w.opts.videoResponsive),Z(i,w.opts.videoDefaultDisplay,w.opts.videoDefaultAlign),i.toggleClass("fr-draggable",w.opts.videoMove),w.events.trigger(t?"video.replaced":"video.inserted",[i])}function h(){var e=A(this);w.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),y(e.parent()),w.events.trigger("video.loaded",[e.parent()])}function R(s,e,d,l,p){w.edit.off(),m("Loading video"),e&&(s=w.helpers.sanitizeURL(s));var f=function f(){var e,t;if(l){w.undo.canDo()||l.find("video").hasClass("fr-uploading")||w.undo.saveStep();var o=l.find("video").data("fr-old-src"),i=l.data("fr-replaced");if(l.data("fr-replaced",!1),0<l.find("iframe").length)l.remove(),e=I(s,d,h);else{w.$wp?((e=l.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),o&&l.find("video").attr("src",o),l.replaceWith(e)):e=l;for(var r=e.find("video").get(0).attributes,a=0;a<r.length;a++){var n=r[a];0===n.nodeName.indexOf("data-")&&e.find("video").removeAttr(n.nodeName)}if(void 0!==d)for(t in d)d.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),d[t]);e.find("video").on("canplay",h),e.find("video").attr("src",s)}w.edit.on(),O(),w.undo.saveStep(),w.$el.blur(),w.events.trigger(i?"video.replaced":"video.inserted",[e,p])}else e=I(s,d,h),O(),w.undo.saveStep(),w.events.trigger("video.inserted",[e,p])};x("Loading video"),f()}function x(e){var t=w.popups.get("video.insert");if(t||(t=n()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),E){var o=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));w.popups.setContainer("video.insert",w.$sc);var i=o.offset().left,r=o.offset().top+o.height();w.popups.show("video.insert",i,r,o.outerHeight())}void 0===e&&m(w.language.translate("Uploading"),0)}function l(e){var t=w.popups.get("video.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||w.$el.find("video.fr-error").length)){if(w.events.focus(),w.$el.find("video.fr-error").length&&(w.$el.find("video.fr-error").parent().remove(),w.undo.saveStep(),w.undo.run(),w.undo.dropRedo()),!w.$wp&&E){var o=E;V(!0),w.selection.setAfter(o.find("video").get(0)),w.selection.restore()}w.popups.hide("video.insert")}}function m(e,t){var o=w.popups.get("video.insert");if(o){var i=o.find(".fr-video-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function b(e){x();var t=w.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var o=t.find("h3");o.text(e),w.events.disableBlur(),o.focus()}function y(e){t.call(e.get(0))}function _(e,t,o){m("Loading video");var i=this.status,r=this.response,a=this.responseXML,n=this.responseText;try{if(w.opts.videoUploadToS3||w.opts.videoUploadToAzure)if(201==i){var s;if(w.opts.videoUploadToAzure){if(!1===w.events.trigger("video.uploadedToAzure",[this.responseURL,o,r],!0))return w.edit.on(),!1;s=t}else s=function l(e){try{var t=A(e).find("Location").text(),o=A(e).find("Key").text();return!1===w.events.trigger("video.uploadedToS3",[t,o,e],!0)?(w.edit.on(),!1):t}catch(i){return F(u,e),!1}}(a);s&&R(s,!1,[],e,r||a)}else F(u,r||a);else if(200<=i&&i<300){var d=function p(e){try{if(!1===w.events.trigger("video.uploaded",[e],!0))return w.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(F(c,e),!1)}catch(o){return F(u,e),!1}}(n);d&&R(d.link,!1,d,e,r||n)}else F(v,r||n)}catch(f){F(u,r||n)}}function B(){F(u,this.response||this.responseText||this.responseXML)}function D(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;m(w.language.translate("Uploading"),t)}}function k(){w.edit.on(),l(!0)}function I(e,t,o){var i,r="";if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(r+=" data-".concat(i,'="').concat(t[i],'"'));var a=w.opts.videoDefaultWidth;a&&"auto"!=a&&(a="".concat(a,"px")),w.helpers.isMobile()&&w.browser.safari&&(r+=" autoplay playsinline");var n=A(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+w.opts.videoDefaultDisplay[0]+("center"!=w.opts.videoDefaultAlign?" fr-fv"+w.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+r+(a?' style="width: '+a+';" ':"")+" controls>"+w.language.translate("Your browser does not support HTML5 video.")+"</video>");n.toggleClass("fr-draggable",w.opts.videoMove),w.edit.on(),w.events.focus(!0),w.selection.restore(),w.undo.saveStep(),w.opts.videoSplitHTML?w.markers.split():w.markers.insert(),w.html.wrap();var s=w.$el.find(".fr-marker");return w.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(n),w.selection.clear(),n.find("video").get(0).readyState>n.find("video").get(0).HAVE_FUTURE_DATA||w.helpers.isIOS()?o.call(n.find("video").get(0)):n.find("video").on("canplaythrough load",o),n}function T(e){if(!w.core.sameInstance(f))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;if("mousedown"==e.type){var i=w.$oel.get(0).ownerDocument,r=i.defaultView||i.parentWindow,a=!1;try{a=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(n){}a&&r.frameElement&&(t+=w.helpers.getPX(A(r.frameElement).offset().left)+r.frameElement.clientLeft,o=e.clientY+w.helpers.getPX(A(r.frameElement).offset().top)+r.frameElement.clientTop)}w.undo.canDo()||w.undo.saveStep(),(p=A(this)).data("start-x",t),p.data("start-y",o),s.show(),w.popups.hideAll(),Y()}function z(e){if(!w.core.sameInstance(f))return!0;if(p){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;var i=p.data("start-x"),r=p.data("start-y");p.data("start-x",t),p.data("start-y",o);var a=t-i,n=o-r,s=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),d=s.width(),l=s.height();(p.hasClass("fr-hnw")||p.hasClass("fr-hsw"))&&(a=0-a),(p.hasClass("fr-hnw")||p.hasClass("fr-hne"))&&(n=0-n),s.css("width",d+a),s.css("height",l+n),s.removeAttr("width"),s.removeAttr("height"),M()}}function P(e){if(!w.core.sameInstance(f))return!0;p&&E&&(e&&e.stopPropagation(),p=null,s.hide(),M(),a(),w.undo.saveStep())}function $(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function L(e,t,o,i){return e.pageX=t,e.pageY=t,T.call(this,e),e.pageX=e.pageX+o*Math.floor(Math.pow(1.1,i)),e.pageY=e.pageY+o*Math.floor(Math.pow(1.1,i)),z.call(this,e),P.call(this,e),++i}function O(){var e,t=Array.prototype.slice.call(w.el.querySelectorAll("video, .fr-video > *")),o=[];for(e=0;e<t.length;e++)o.push(t[e].getAttribute("src")),A(t[e]).toggleClass("fr-draggable",w.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(i)for(e=0;e<i.length;e++)o.indexOf(i[e].getAttribute("src"))<0&&w.events.trigger("video.removed",[A(i[e])]);i=t}function M(){f||function n(){var e;if(w.shared.$video_resizer?(f=w.shared.$video_resizer,s=w.shared.$vid_overlay,w.events.on("destroy",function(){A("body").first().append(f.removeClass("fr-active"))},!0)):(w.shared.$video_resizer=A(document.createElement("div")).attr("class","fr-video-resizer"),f=w.shared.$video_resizer,w.events.$on(f,"mousedown",function(e){e.stopPropagation()},!0),w.opts.videoResize&&(f.append($("nw")+$("ne")+$("sw")+$("se")),w.shared.$vid_overlay=A(document.createElement("div")).attr("class","fr-video-overlay"),s=w.shared.$vid_overlay,e=f.get(0).ownerDocument,A(e).find("body").first().append(s))),w.events.on("shared.destroy",function(){f.html("").removeData().remove(),f=null,w.opts.videoResize&&(s.remove(),s=null)},!0),w.helpers.isMobile()||w.events.$on(A(w.o_win),"resize.video",function(){V(!0)}),w.opts.videoResize){e=f.get(0).ownerDocument,w.events.$on(f,w._mousedown,".fr-handler",T),w.events.$on(A(e),w._mousemove,z),w.events.$on(A(e.defaultView||e.parentWindow),w._mouseup,P),w.events.$on(s,"mouseleave",P);var i=1,r=null,a=0;w.events.on("keydown",function(e){if(E){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,o=e.which;(o!==r||200<e.timeStamp-a)&&(i=1),(o==we.KEYCODE.EQUALS||w.browser.mozilla&&o==we.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=L.call(this,e,1,1,i):(o==we.KEYCODE.HYPHEN||w.browser.mozilla&&o==we.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(i=L.call(this,e,2,-1,i)),r=o,a=e.timeStamp}}),w.events.on("keyup",function(){i=1})}}(),(w.$wp||w.$sc).append(f),f.data("instance",w);var e=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),t=0,o=0;w.opts.iframe&&(o=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-top")),t=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-left"))),f.css("top",(w.opts.iframe?e.offset().top+o-1:e.offset().top-w.$wp.offset().top-1)+w.$wp.scrollTop()).css("left",(w.opts.iframe?e.offset().left+t-1:e.offset().left-w.$wp.offset().left-1)+w.$wp.scrollLeft()).css("width",e.get(0).getBoundingClientRect().width).css("height",e.get(0).getBoundingClientRect().height).addClass("fr-active")}function t(e){if(e&&"touchend"==e.type&&o)return!0;if(e&&w.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(w.edit.isDisabled())return!1;for(var t=0;t<we.INSTANCES.length;t++)we.INSTANCES[t]!=w&&we.INSTANCES[t].events.trigger("video.hideResizer");w.toolbar.disable(),w.helpers.isMobile()&&(w.events.disableBlur(),w.$el.blur(),w.events.enableBlur()),w.$el.find(".fr-video.fr-active").removeClass("fr-active"),(E=A(this)).addClass("fr-active"),w.opts.iframe&&w.size.syncIframe(),te(),M(),a(),w.selection.clear(),w.button.bulkRefresh(),w.events.trigger("image.hideResizer")}function V(e){E&&(function t(){return w.shared.vid_exit_flag}()||!0===e)&&(f.removeClass("fr-active"),w.toolbar.enable(),E.removeClass("fr-active"),E=null,Y())}function N(){w.shared.vid_exit_flag=!0}function Y(){w.shared.vid_exit_flag=!1}function H(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var o=t.files[0];if(o&&o.type&&-1!==o.type.indexOf("video")){if(!w.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;w.markers.remove(),w.markers.insertAtPoint(e.originalEvent),w.$el.find(".fr-marker").replaceWith(we.MARKERS),w.popups.hideAll();var i=w.popups.get("video.insert");return i||(i=n()),w.popups.setContainer("video.insert",w.$sc),w.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),x(),0<=w.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))?K(t.files):F(U),e.preventDefault(),e.stopPropagation(),!1}}}function K(e){if(void 0!==e&&0<e.length){if(!1===w.events.trigger("video.beforeUpload",[e]))return!1;var t,o=e[0];if(!(null!==w.opts.videoUploadURL&&w.opts.videoUploadURL!=C||w.opts.videoUploadToS3||w.opts.videoUploadToAzure))return function y(i){E&&E.find("iframe")&&E.find("iframe").length&&q();var r=new FileReader;r.onload=function(){r.result;for(var e=atob(r.result.split(",")[1]),t=[],o=0;o<e.length;o++)t.push(e.charCodeAt(o));R(window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:i.type})),!1,null,E)},x(),r.readAsDataURL(i)}(o),!1;if(o.size>w.opts.videoMaxSize)return F(S),!1;if(w.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))<0)return F(U),!1;if(w.drag_support.formdata&&(t=w.drag_support.formdata?new FormData:null),t){var i;if(!1!==w.opts.videoUploadToS3)for(i in t.append("key",w.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(o.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",o.type),w.opts.videoUploadToS3.params)w.opts.videoUploadToS3.params.hasOwnProperty(i)&&t.append(i,w.opts.videoUploadToS3.params[i]);for(i in w.opts.videoUploadParams)w.opts.videoUploadParams.hasOwnProperty(i)&&t.append(i,w.opts.videoUploadParams[i]);t.append(w.opts.videoUploadParam,o);var r,a,n=w.opts.videoUploadURL;w.opts.videoUploadToS3&&(n=w.opts.videoUploadToS3.uploadURL?w.opts.videoUploadToS3.uploadURL:"https://".concat(w.opts.videoUploadToS3.region,".amazonaws.com/").concat(w.opts.videoUploadToS3.bucket));var s=w.opts.videoUploadMethod;w.opts.videoUploadToAzure&&(n=w.opts.videoUploadToAzure.uploadURL?"".concat(w.opts.videoUploadToAzure.uploadURL,"/").concat(o.name):encodeURI("https://".concat(w.opts.videoUploadToAzure.account,".blob.core.windows.net/").concat(w.opts.videoUploadToAzure.container,"/").concat(o.name)),r=n,w.opts.videoUploadToAzure.SASToken&&(n+=w.opts.videoUploadToAzure.SASToken),s="PUT");var d=w.core.getXHR(n,s);if(w.opts.videoUploadToAzure){var l=(new Date).toUTCString();if(!w.opts.videoUploadToAzure.SASToken&&w.opts.videoUploadToAzure.accessKey){var p=w.opts.videoUploadToAzure.account,f=w.opts.videoUploadToAzure.container;if(w.opts.videoUploadToAzure.uploadURL){var c=w.opts.videoUploadToAzure.uploadURL.split("/");f=c.pop(),p=c.pop().split(".")[0]}var v="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(l,"\nx-ms-version:2019-07-07"),u=encodeURI("/"+p+"/"+f+"/"+o.name),g=s+"\n\n\n"+o.size+"\n\n"+o.type+"\n\n\n\n\n\n\n"+v+"\n"+u,h=w.cryptoJSPlugin.cryptoJS.HmacSHA256(g,w.cryptoJSPlugin.cryptoJS.enc.Base64.parse(w.opts.videoUploadToAzure.accessKey)).toString(w.cryptoJSPlugin.cryptoJS.enc.Base64),m="SharedKey "+p+":"+h;a=h,d.setRequestHeader("Authorization",m)}for(i in d.setRequestHeader("x-ms-version","2019-07-07"),d.setRequestHeader("x-ms-date",l),d.setRequestHeader("Content-Type",o.type),d.setRequestHeader("x-ms-blob-type","BlockBlob"),w.opts.videoUploadParams)w.opts.videoUploadParams.hasOwnProperty(i)&&d.setRequestHeader(i,w.opts.videoUploadParams[i]);for(i in w.opts.videoUploadToAzure.params)w.opts.videoUploadToAzure.params.hasOwnProperty(i)&&d.setRequestHeader(i,w.opts.videoUploadToAzure.params[i])}d.onload=function(){_.call(d,E,r,a)},d.onerror=B,d.upload.onprogress=D,d.onabort=k,x(),w.events.disableBlur(),w.edit.off(),w.events.enableBlur();var b=w.popups.get("video.insert");b&&A(b.off("abortUpload")).on("abortUpload",function(){4!=d.readyState&&d.abort()}),d.send(w.opts.videoUploadToAzure?o:t)}}}function F(e,t){w.edit.on(),E&&E.find("video").addClass("fr-error"),b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.error",[{code:e,message:r[e]},t])}function X(){if(E){var e=w.popups.get("video.size"),t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));e.find('input[name="width"]').val(t.get(0).style.width||t.attr("width")).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height||t.attr("height")).trigger("change")}}function G(e){if(e)return w.popups.onRefresh("video.size",X),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.opts.videoSizeButtons),"</div>"),size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'.concat(w.id,'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-').concat(w.id,'" type="text" name="width" placeholder="').concat(w.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-').concat(w.id,'" type="text" name="height" placeholder="').concat(w.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoSetSize" tabIndex="2" role="button">').concat(w.language.translate("Update"),"</button></div></div>")},o=w.popups.create("video.size",t);return w.events.$on(w.$wp,"scroll",function(){E&&w.popups.isVisible("video.size")&&(w.events.disableBlur(),y(E))}),o}function j(e){if(void 0===e&&(e=E),e){if(e.hasClass("fr-fvl"))return"left";if(e.hasClass("fr-fvr"))return"right";if(e.hasClass("fr-dvb")||e.hasClass("fr-dvi"))return"center";if("block"==e.css("display")){if("left"==e.css("text-algin"))return"left";if("right"==e.css("text-align"))return"right"}else{if("left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function W(e){void 0===e&&(e=E);var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function q(){if(E&&!1!==w.events.trigger("video.beforeRemove",[E])){var e=E;if(w.popups.hideAll(),V(!0),w.opts.trackChangesEnabled&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return void w.track_changes.removeSpecialItem(e);w.selection.setBefore(e.get(0))||w.selection.setAfter(e.get(0)),e.remove(),w.selection.restore(),w.html.fillEmptyBlocks()}}function J(){l()}function Z(e,t,o){!w.opts.htmlUntouched&&w.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(o[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==o?e.css({"float":"none"}):"left"==o?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==o?e.css({textAlign:"left"}):"right"==o?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function Q(){var e=w.$el.find("video").filter(function(){return 0===A(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(A(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),w.$el.find("embed, iframe").filter(function(){if(w.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<A(this).parents("span.fr-video").length)return!1;for(var e=A(this).attr("src"),t=0;t<we.VIDEO_PROVIDERS.length;t++){var o=we.VIDEO_PROVIDERS[t];if(o.test_regex.test(e)&&new RegExp(w.opts.videoAllowedProviders.join("|")).test(o.provider))return!0}return!1}).map(function(){return 0===A(this).parents("object").length?this:A(this).parents("object").get(0)}).wrap(A(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,o,i,r,a=w.$el.find("span.fr-video, video"),n=0;n<a.length;n++){var s=A(a[n]);!w.opts.htmlUntouched&&w.opts.useClasses?((r=s).hasClass("fr-dvi")||r.hasClass("fr-dvb")||(r.addClass("fr-fv".concat(j(r)[0])),r.addClass("fr-dv".concat(W(r)[0]))),w.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):w.opts.htmlUntouched||w.opts.useClasses||(void 0,o=(t=s).hasClass("fr-dvb")?"block":t.hasClass("fr-dvi")?"inline":null,i=t.hasClass("fr-fvl")?"left":t.hasClass("fr-fvr")?"right":j(t),Z(t,o,i),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}a.toggleClass("fr-draggable",w.opts.videoMove)}}function ee(e){document.getElementById("autoplay-".concat(w.id)).style.cssText="background:".concat(e)}function te(){if(E){w.selection.clear();var e=w.doc.createRange();e.selectNode(E.get(0)),w.selection.get().addRange(e)}}return r[1]="Video cannot be loaded from the passed link.",r[c]="No link in upload response.",r[v]="Error during file upload.",r[u]="Parsing response failed.",r[S]="File is too large.",r[U]="Video file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",w.shared.vid_exit_flag=!1,{_init:function oe(){w.opts.videoResponsive&&(w.opts.videoResize=!1),function e(){w.events.on("drop",H,!0),w.events.on("mousedown window.mousedown",N),w.events.on("window.touchmove",Y),w.events.on("mouseup window.mouseup",V),w.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&V()}),w.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){V(!0)})}(),w.helpers.isMobile()&&(w.events.$on(w.$el,"touchstart","span.fr-video",function(){o=!1}),w.events.$on(w.$el,"touchmove",function(){o=!0})),w.events.on("html.set",Q),Q(),w.events.$on(w.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(w.browser.msie||w.browser.edge)&&(e.target.innerText||(e.target.dragDrop(),t.call(this,e)))}),w.events.$on(w.$el,"click touchend","span.fr-video",function(e){if(e.target.innerText.length||"false"==A(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),w.events.on("keydown",function(e){var t=e.which;return!E||t!=we.KEYCODE.BACKSPACE&&t!=we.KEYCODE.DELETE?E&&t==we.KEYCODE.ESC?(V(!0),e.preventDefault(),!1):E&&t!=we.KEYCODE.F10&&!w.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),q(),w.undo.saveStep(),!1)},!0),w.events.on("toolbar.esc",function(){if(E)return w.events.disableBlur(),w.events.focus(),!1},!0),w.events.on("toolbar.focusEditor",function(){if(E)return!1},!0),w.events.on("keydown",function(){w.$el.find("span.fr-video:empty").remove()}),w.$wp&&(O(),w.events.on("contentChanged",O)),n(!0),G(!0)},showInsertPopup:function ie(){var e=w.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=w.popups.get("video.insert");if(t||(t=n()),l(),!t.hasClass("fr-active"))if(w.popups.refresh("video.insert"),w.popups.setContainer("video.insert",w.$tb),e.isVisible()){var o=w.button.getPosition(e),i=o.left,r=o.top;w.popups.show("video.insert",i,r,e.outerHeight())}else w.position.forSelection(t),w.popups.show("video.insert")},showLayer:function re(e){var t,o,i=w.popups.get("video.insert");if(!E&&!w.opts.toolbarInline){var r=w.$tb.find('.fr-command[data-cmd="insertVideo"]');t=r.offset().left,o=r.offset().top+(w.opts.toolbarBottom?10:r.outerHeight()-10)}w.opts.toolbarInline&&(o=i.offset().top-w.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(o+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),w.popups.show("video.insert",t,o,0),w.accessibility.focusPopup(i)},refreshByURLButton:function ae(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshEmbedButton:function ne(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshUploadButton:function se(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:K,insertByURL:function de(e){var t=!!document.getElementById("videoPluginAutoplay")&&document.getElementById("videoPluginAutoplay").checked;void 0===e&&(e=(w.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim());var o=null;if(/^http/.test(e)||(e="https://".concat(e)),w.helpers.isURL(e))for(var i=0;i<we.VIDEO_PROVIDERS.length;i++){var r=we.VIDEO_PROVIDERS[i],a="autoplay=1";if(r.html.includes("autoplay=1")&&document.getElementById("videoPluginAutoplay").checked)r.html=r.html,document.getElementById("videoPluginAutoplay").checked=!1;else if(t){var n=r.html.indexOf("{url}")+5;r.html=[r.html.slice(0,n),a,r.html.slice(n)].join(""),t=!1,document.getElementById("videoPluginAutoplay").checked=!1}else(r=we.VIDEO_PROVIDERS[i]).html=r.html.replace(a,"");if(r.test_regex.test(e)&&new RegExp(w.opts.videoAllowedProviders.join("|")).test(r.provider)){o=e.replace(r.url_regex,r.url_text),o=r.html.replace(/\{url\}/,o);break}}o?d(o):(b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.linkError",[e]))},insertEmbed:function le(e){void 0===e&&(e=w.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&we.VIDEO_EMBED_REGEX.test(e)?d(e):(b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.codeError",[e]))},insert:d,align:function pe(e){E.removeClass("fr-fvr fr-fvl"),!w.opts.htmlUntouched&&w.opts.useClasses?"left"==e?E.addClass("fr-fvl"):"right"==e&&E.addClass("fr-fvr"):Z(E,W(),e),te(),M(),a(),w.selection.clear()},refreshAlign:function fe(e){if(!E)return!1;e.find(">*").first().replaceWith(w.icon.create("video-align-".concat(j())))},refreshAlignOnShow:function ce(e,t){E&&t.find('.fr-command[data-param1="'.concat(j(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ve(e){E.removeClass("fr-dvi fr-dvb"),!w.opts.htmlUntouched&&w.opts.useClasses?"inline"==e?E.addClass("fr-dvi"):"block"==e&&E.addClass("fr-dvb"):Z(E,e,j()),te(),M(),a(),w.selection.clear()},refreshDisplayOnShow:function ue(e,t){E&&t.find('.fr-command[data-param1="'.concat(W(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:q,hideProgressBar:l,showSizePopup:function ge(){var e=w.popups.get("video.size");e||(e=G()),l(),w.popups.refresh("video.size"),w.popups.setContainer("video.size",w.$sc);var t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.height();w.popups.show("video.size",o,i,t.height(),!0)},replace:function he(){var e=w.popups.get("video.insert");e||(e=n()),w.popups.isVisible("video.insert")||(l(),w.popups.refresh("video.insert"),w.popups.setContainer("video.insert",w.$sc));var t=E.offset().left+E.outerWidth()/2,o=E.offset().top+E.height();w.popups.show("video.insert",t,o,E.outerHeight(),!0)},back:function e(){E?(w.events.disableBlur(),E[0].click()):(w.events.disableBlur(),w.selection.restore(),w.events.enableBlur(),w.popups.hide("video.insert"),w.toolbar.showInline())},setSize:function me(e,t){if(E){var o=w.popups.get("video.size"),i=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));i.css("width",e||o.find('input[name="width"]').val()),i.css("height",t||o.find('input[name="height"]').val()),i.get(0).style.width&&i.removeAttr("width"),i.get(0).style.height&&i.removeAttr("height"),o.find("input:focus").blur(),setTimeout(function(){E.trigger("click")},w.helpers.isAndroid()?50:0)}},get:function be(){return E},showProgressBar:x,_editVideo:y,setAutoplay:function ye(){var e;if(E.find("iframe, embed, audio").get(0))(e=E.find("iframe, embed, audio")).get(0).src.includes("autoplay=1")?(ee("#FFFFFF"),e.get(0).src=e.get(0).src.replace("&autoplay=1","")):(ee("#D6D6D6"),e.get(0).src=e.get(0).src+"&autoplay=1");else if((e=E.find("iframe, embed, video")).get(0).outerHTML.includes("autoplay"))ee("#FFFFFF"),e.get(0).outerHTML=e.get(0).outerHTML.replace("autoplay","");else{ee("#D6D6D6");var t=e.get(0).outerHTML.indexOf("class")-1;e.get(0).outerHTML=[e.get(0).outerHTML.slice(0,t),"autoplay",e.get(0).outerHTML.slice(t)].join("")}}}},we.RegisterCommand("insertVideo",{title:"Insert Video",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("video.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("video.insert")):this.video.showInsertPopup()},plugin:"video"}),we.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),we.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),we.RegisterCommand("videoByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-by-url")},refresh:function(e){this.video.refreshByURLButton(e)}}),we.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),we.RegisterCommand("videoEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-embed")},refresh:function(e){this.video.refreshEmbedButton(e)}}),we.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),we.RegisterCommand("videoUpload",{title:"Upload Video",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-upload")},refresh:function(e){this.video.refreshUploadButton(e)}}),we.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),we.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),we.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),we.RegisterCommand("videoDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.video.display(t)},refresh:function(e){this.opts.videoTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.video.refreshDisplayOnShow(e,t)}}),we.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),we.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),we.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),we.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),we.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),we.RegisterCommand("videoAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=we.COMMANDS.videoAlign.options;for(var o in t)t.hasOwnProperty(o)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'.concat(o,'" title="').concat(this.language.translate(t[o]),'">').concat(this.icon.create("video-align-".concat(o)),'<span class="fr-sr-only">').concat(this.language.translate(t[o]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.video.align(t)},refresh:function(e){this.video.refreshAlign(e)},refreshOnShow:function(e,t){this.video.refreshAlignOnShow(e,t)}}),we.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),we.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),we.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),we.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),we.DefineIcon("autoplay",{NAME:"autoplay",SVG_KEY:"autoplay"}),we.RegisterCommand("autoplay",{undo:!1,focus:!1,popup:!0,title:"Autoplay",callback:function(){this.video.setAutoplay()}}),we.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),we.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),we.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),we.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(e){this.video.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),we.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),we.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})});
/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -7,2 +7,2 @@ * 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(M){"use strict";M=M&&M.hasOwnProperty("default")?M["default"]:M,Object.assign(M.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}),M.PLUGINS.wordPaste=function(T){var l,n,d=T.$,s="word_paste",g={};function t(e){var t=T.opts.wordAllowedStyleProps;e||(T.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}),T.paste.getRtfClipboard());var r=T.doc.createElement("DIV");r.innerHTML=n,T.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=T.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){T.modals.hide(s)}(),T.paste.clean(n,!0,!0),T.opts.wordAllowedStyleProps=t}function A(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&&(T.browser.msie||T.browser.safari||T.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 C(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 L(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 u=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))u=f[1].split(" ");else{if((u=f[0].split(" "))&&u.length<2)continue;u.shift()}var g=u.join("");c[t+l]={image_hex:g,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://")&&T.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(r=g[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();if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return A(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),A(e),!1;for(var l=["I","U"],s=0;s<l.length;s++)if(r===l[s])return e.innerHTML&&(e.outerHTML=e.innerHTML),A(e),!1;if("TD"!==r){var o=e.getAttribute("class")||"MsoNormal";if(t&&o){for(var d=(o=E(o)).split(" "),f=0;f<d.length;f++){var u=[],g="."+d[f];u.push(g),g=i+g,u.push(g);for(var p=0;p<u.length;p++)t[u[p]]&&L(e,t[u[p]])}e.removeAttribute("class")}t&&t[i]&&L(e,t[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var c=e.getAttribute("class");if(c&&(t&&t[r.toLowerCase()+"."+c]&&L(e,t[r.toLowerCase()+"."+c]),-1!==c.toLowerCase().indexOf("mso"))){var m=E(c);(m=m.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",m):e.removeAttribute("class")}var h=e.getAttribute("style");if(h){var v=h.match(/text-align:.+?[; "]{1,1}/gi);v&&v[v.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}C(e)}if("TR"===r&&function N(e,t){T.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===M.UNICODE_NBSP)&&(r.firstChild&&A(r.firstChild),r.innerHTML="<br>");for(var l=r.firstElementChild,s=1===r.children.length;l;)"P"!==l.tagName||H(l)||s&&C(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]&&L(r,t[f])}}t.td&&L(r,t.td)}var u=r.getAttribute("style");u&&(u=E(u))&&";"!==u.slice(-1)&&(u+=";");var g=r.getAttribute("valign");if(!g&&u){var p=u.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(g=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var c=null;if(u){var m=u.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(u){var v=u.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),g&&(r.style["vertical-align"]=g),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 b=e.querySelectorAll("span"),y=0;y<b.length;y++)b[y].innerText||(b[y].outerHTML=b[y].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 x=E(e.getAttribute("style"));(x=x.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",x):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],g[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);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===M.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(A(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 S(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,u,g,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]),u=1==s?("1"==(c=p.textContent.trim().split(".")[0])?g="decimal;":"i"==c?g="lower-roman;":"I"==c?g="upper-roman;":"o"==c?g="circle;":c.match(/^v$/)||(c.match(/^[a-z]$/)||c.match(/^[a-z]\)$/)?g="lower-alpha;":(c.match(/^[A-Z]$/)||c.match(/^[A-Z]\)$/))&&(g="upper-alpha;")),g="list-style-type: "+g,"ol"):(null!=p&&(c=p.textContent.trim().split(".")[0]),"\xa7"==c?g="square;":"\xb7"==c&&(g="disc;"),g="list-style-type: "+g,"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=g?"<"+u+' style = "'+g+"; margin-left:"+y+v+';">':"<"+u+' style="margin-left:'+y+v+';">',"list-style-type: upper-alpha;"==g){var x=c.charCodeAt(0)-64;m=g?"<"+u+h+' start="'+x+'" style = "'+g+" margin-left:"+y+v+';">':"<"+u+">"}else if("list-style-type: lower-alpha;"==g){var N=c.charCodeAt(0)-96;m=g?"<"+u+h+' start="'+N+'" style = "'+g+"margin-left:"+y+v+';">':"<"+u+">"}else m=g?"<"+u+h+' style = "'+g+";margin-left:"+y+v+';">':"<"+u+' style="margin-left:'+y+v+';">';else if("list-style-type: upper-alpha;"==g){var T=c.charCodeAt(0)-64;m=g?"<"+u+h+' style = "'+g+' start="'+T+'">':"<"+u+">"}else if("list-style-type: lower-alpha;"==g){var A=c.charCodeAt(0)-96;m=g?"<"+u+h+' style = "'+g+' start="'+A+'">':"<"+u+">"}else m=g?"<"+u+h+' style = "'+g+'">':"<"+u+">";for(var C=!1;e;){if(!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var E=O(e);if((r=r||E)<E)m+=(f=S(e,t,E,e.style.marginLeft)).el.outerHTML,e=f.currentNode;else{if(E<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 L=!1;(!i&&!e.style.marginLeft||i&&e.style.marginLeft&&i===e.style.marginLeft)&&(L=!0),i=e.style.marginLeft,L||n===undefined?(d=I(e,t),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==E&&(m+="</"+u+">",C=!0,a=null),m+=(f=S(e,t,E,e.style.marginLeft)).el.outerHTML,e=f.currentNode);var M=e&&e.nextElementSibling;if(M&&(a=M.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=M}}C||(m+="</"+u+">");var w=document.createElement("div");return w.innerHTML=m,{el:w,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&&o["."+e.getAttribute("class")]&&(e=function s(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}(e,"span")),h(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)&&A(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 A(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&&(A(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}),p(n,function(e){return!e||"B"!==e.nodeName||(e.outerHTML=e.innerHTML,A(e),!1)});var s=n.outerHTML,d=T.opts.htmlAllowedStyleProps;return T.opts.htmlAllowedStyleProps=T.opts.wordAllowedStyleProps,s=T.clean.html(s,T.opts.wordDeniedTags,T.opts.wordDeniedAttrs,!1),T.opts.htmlAllowedStyleProps=d,s}return{_init:function e(){T.events.on("paste.wordPaste",function(e){return n=e,T.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> '+T.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;">'+T.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">'+T.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+T.language.translate("Keep")+"</button></div>",e+="</div>"}(),r=T.modals.create(s,e,t),i=r.$body;l=r.$modal,r.$modal.addClass("fr-middle"),T.events.bindClick(i,"button.fr-remove-word",function(){var e=l.data("instance")||T;e.wordPaste.clean()}),T.events.bindClick(i,"button.fr-keep-word",function(){var e=l.data("instance")||T;e.wordPaste.clean(!0)}),T.events.$on(d(T.o_win),"resize",function(){T.modals.resize(s)})}T.modals.show(s),T.modals.resize(s)}():t(T.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:a}}});
!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(M){"use strict";M=M&&M.hasOwnProperty("default")?M["default"]:M,Object.assign(M.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}),M.PLUGINS.wordPaste=function(T){var l,n,d=T.$,s="word_paste",g={};function t(e){var t=T.opts.wordAllowedStyleProps;e||(T.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}),T.paste.getRtfClipboard());var r=T.doc.createElement("DIV");r.innerHTML=n,T.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=T.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){T.modals.hide(s)}(),T.paste.clean(n,!0,!0),T.opts.wordAllowedStyleProps=t}function A(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&&(T.browser.msie||T.browser.safari||T.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 C(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 L(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 u=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))u=f[1].split(" ");else{if((u=f[0].split(" "))&&u.length<2)continue;u.shift()}var g=u.join("");c[t+l]={image_hex:g,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://")&&T.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(r=g[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();if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return A(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),A(e),!1;for(var l=["I","U"],s=0;s<l.length;s++)if(r===l[s])return e.innerHTML&&(e.outerHTML=e.innerHTML),A(e),!1;if("TD"!==r){var o=e.getAttribute("class")||"MsoNormal";if(t&&o){for(var d=(o=E(o)).split(" "),f=0;f<d.length;f++){var u=[],g="."+d[f];u.push(g),g=i+g,u.push(g);for(var p=0;p<u.length;p++)t[u[p]]&&L(e,t[u[p]])}e.removeAttribute("class")}t&&t[i]&&L(e,t[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var c=e.getAttribute("class");if(c&&(t&&t[r.toLowerCase()+"."+c]&&L(e,t[r.toLowerCase()+"."+c]),-1!==c.toLowerCase().indexOf("mso"))){var m=E(c);(m=m.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",m):e.removeAttribute("class")}var h=e.getAttribute("style");if(h){var v=h.match(/text-align:.+?[; "]{1,1}/gi);v&&v[v.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}C(e)}if("TR"===r&&function N(e,t){T.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===M.UNICODE_NBSP)&&(r.firstChild&&A(r.firstChild),r.innerHTML="<br>");for(var l=r.firstElementChild,s=1===r.children.length;l;)"P"!==l.tagName||H(l)||s&&C(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]&&L(r,t[f])}}t.td&&L(r,t.td)}var u=r.getAttribute("style");u&&(u=E(u))&&";"!==u.slice(-1)&&(u+=";");var g=r.getAttribute("valign");if(!g&&u){var p=u.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(g=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var c=null;if(u){var m=u.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(u){var v=u.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),g&&(r.style["vertical-align"]=g),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 b=e.querySelectorAll("span"),y=0;y<b.length;y++)b[y].innerText||(b[y].outerHTML=b[y].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 x=E(e.getAttribute("style"));(x=x.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",x):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],g[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);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===M.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(A(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 S(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,u,g,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]),u=1==s?("1"==(c=p.textContent.trim().split(".")[0])?g="decimal;":"i"==c?g="lower-roman;":"I"==c?g="upper-roman;":"o"==c?g="circle;":c.match(/^v$/)||(c.match(/^[a-z]$/)||c.match(/^[a-z]\)$/)?g="lower-alpha;":(c.match(/^[A-Z]$/)||c.match(/^[A-Z]\)$/))&&(g="upper-alpha;")),g="list-style-type: "+g,"ol"):(null!=p&&(c=p.textContent.trim().split(".")[0]),"\xa7"==c?g="square;":"\xb7"==c&&(g="disc;"),g="list-style-type: "+g,"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=g?"<"+u+' style = "'+g+"; margin-left:"+y+v+';">':"<"+u+' style="margin-left:'+y+v+';">',"list-style-type: upper-alpha;"==g){var x=c.charCodeAt(0)-64;m=g?"<"+u+h+' start="'+x+'" style = "'+g+" margin-left:"+y+v+';">':"<"+u+">"}else if("list-style-type: lower-alpha;"==g){var N=c.charCodeAt(0)-96;m=g?"<"+u+h+' start="'+N+'" style = "'+g+"margin-left:"+y+v+';">':"<"+u+">"}else m=g?"<"+u+h+' style = "'+g+";margin-left:"+y+v+';">':"<"+u+' style="margin-left:'+y+v+';">';else if("list-style-type: upper-alpha;"==g){var T=c.charCodeAt(0)-64;m=g?"<"+u+h+' style = "'+g+' start="'+T+'">':"<"+u+">"}else if("list-style-type: lower-alpha;"==g){var A=c.charCodeAt(0)-96;m=g?"<"+u+h+' style = "'+g+' start="'+A+'">':"<"+u+">"}else m=g?"<"+u+h+' style = "'+g+'">':"<"+u+">";for(var C=!1;e;){if(!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var E=O(e);if((r=r||E)<E)m+=(f=S(e,t,E,e.style.marginLeft)).el.outerHTML,e=f.currentNode;else{if(E<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 L=!1;(!i&&!e.style.marginLeft||i&&e.style.marginLeft&&i===e.style.marginLeft)&&(L=!0),i=e.style.marginLeft,L||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==E&&(m+="</"+u+">",C=!0,a=null),m+=(f=S(e,t,E,e.style.marginLeft)).el.outerHTML,e=f.currentNode);var M=e&&e.nextElementSibling;if(M&&(a=M.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=M}}C||(m+="</"+u+">");var w=document.createElement("div");return w.innerHTML=m,{el:w,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&&o["."+e.getAttribute("class")]&&(e=function s(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}(e,"span")),h(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)&&A(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 A(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&&(A(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}),p(n,function(e){return!e||"B"!==e.nodeName||(e.outerHTML=e.innerHTML,A(e),!1)});var s=n.outerHTML,d=T.opts.htmlAllowedStyleProps;return T.opts.htmlAllowedStyleProps=T.opts.wordAllowedStyleProps,s=T.clean.html(s,T.opts.wordDeniedTags,T.opts.wordDeniedAttrs,!1),T.opts.htmlAllowedStyleProps=d,s}return{_init:function e(){T.events.on("paste.wordPaste",function(e){return n=e,T.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> '+T.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;">'+T.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">'+T.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+T.language.translate("Keep")+"</button></div>",e+="</div>"}(),r=T.modals.create(s,e,t),i=r.$body;l=r.$modal,r.$modal.addClass("fr-middle"),T.events.bindClick(i,"button.fr-remove-word",function(){var e=l.data("instance")||T;e.wordPaste.clean()}),T.events.bindClick(i,"button.fr-keep-word",function(){var e=l.data("instance")||T;e.wordPaste.clean(!0)}),T.events.$on(d(T.o_win),"resize",function(){T.modals.resize(s)})}T.modals.show(s),T.modals.resize(s)}():t(T.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:a}}});
/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

/*!
* froala_editor v4.0.3 (https://www.froala.com/wysiwyg-editor)
* froala_editor v4.0.4 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/

@@ -4,0 +4,0 @@ * Copyright 2014-2021 Froala Labs

{
"name": "froala-editor",
"version": "4.0.3",
"version": "4.0.4",
"description": "The next generation Javascript WYSIWYG HTML rich text editor made by devs for devs. High performance and modern design make it easy to use for developers and loved by users.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc