/*!
* froala_editor v4.3.1 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2024 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(St){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a Emoji free by Emoji One',t=St.COMMANDS.align.options;for(var a in t)t.hasOwnProperty(a)&&(e+='
"},callback:function(e,t){this.align.apply(t)},refresh:function(e){this.align.refresh(e)},refreshOnShow:function(e,t){this.align.refreshOnShow(e,t)},plugin:"align"}),St.RegisterCommand("alignLeft",{type:"button",icon:"align-left",title:"Align Left",callback:function(){this.align.apply("left")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),St.RegisterCommand("alignRight",{type:"button",icon:"align-right",title:"Align Right",callback:function(){this.align.apply("right")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),St.RegisterCommand("alignCenter",{type:"button",icon:"align-center",title:"Align Center",callback:function(){this.align.apply("center")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),St.RegisterCommand("alignJustify",{type:"button",icon:"align-justify",title:"Align Justify",callback:function(){this.align.apply("justify")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),Object.assign(St.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),St.PLUGINS.charCounter=function(n){var a,r=n.$,i=function i(){return(n.opts.iframe&&n.markdown&&n.markdown.isEnabled()?n.$el.text()||"":n.el.textContent||"").replace(/\u200B/g,"").length};function e(e){if(n.opts.charCounterMax<0)return!0;if(i()'):"".concat(t.image,";")};r+='")}),r}(e,t),"\n ")}(r,i),"\n ").concat(function a(e){return'\n \n ")}(i),"\n ").concat(function e(){return E.opts.emoticonsUseImage?'
(").concat(w.language.translate("or click"),')
]*>/.test(c)&&(d=!0)}r[o]=c}return e=(e=(e=r.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),a.converter._dispatch("paragraphs.after",e,t,a)}),y.subParser("runExtension",function(e,t,a,n){if(e.filter)t=e.filter(t,n.converter,a);else if(e.regex){var r=e.regex;r instanceof RegExp||(r=new RegExp(r,"g")),t=t.replace(r,e.replace)}return t}),y.subParser("spanGamut",function(e,t,a){return e=a.converter._dispatch("spanGamut.before",e,t,a),e=y.subParser("codeSpans")(e,t,a),e=y.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,a),e=y.subParser("encodeBackslashEscapes")(e,t,a),e=y.subParser("images")(e,t,a),e=y.subParser("anchors")(e,t,a),e=y.subParser("autoLinks")(e,t,a),e=y.subParser("simplifiedAutoLinks")(e,t,a),e=y.subParser("emoji")(e,t,a),e=y.subParser("underline")(e,t,a),e=y.subParser("italicsAndBold")(e,t,a),e=y.subParser("strikethrough")(e,t,a),e=y.subParser("ellipsis")(e,t,a),e=y.subParser("hashHTMLSpans")(e,t,a),e=y.subParser("encodeAmpsAndAngles")(e,t,a),t.simpleLineBreaks?/\n\n\xa8K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=a.converter._dispatch("spanGamut.after",e,t,a)}),y.subParser("strikethrough",function(e,n,r){return n.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,n,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,t){return function a(e){return n.simplifiedAutoLink&&(e=y.subParser("simplifiedAutoLinks")(e,n,r)),""+e+""}(t)}),e=r.converter._dispatch("strikethrough.after",e,n,r)),e}),y.subParser("stripLinkDefinitions",function(e,s,l){var c=function c(e,t,a,n,r,i,o){return t=t.toLowerCase(),a.match(/^data:.+?\/.+?;base64,/)?l.gUrls[t]=a.replace(/\s/g,""):l.gUrls[t]=y.subParser("encodeAmpsAndAngles")(a,s,l),i?i+o:(o&&(l.gTitles[t]=o.replace(/"|'/g,""")),s.parseImgDimensions&&n&&r&&(l.gDimensions[t]={width:n,height:r}),"")};return e=(e=(e=(e+="\xa80").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=\xa80)|(?=\n\[))/gm,c)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=\xa80))/gm,c)).replace(/\xa80/,"")}),y.subParser("tables",function(e,v,b){if(!v.tables)return e;function t(e){var t,a=e.split("\n");for(t=0;t"+(r=y.subParser("spanGamut")(r,v,b))+"\n"));for(t=0;t"+y.subParser("spanGamut")(s,v,b)+"\n"));u.push(g)}return function m(e,t){for(var a="\n\n\n",n=e.length,r=0;r\n \n\n",r=0;r\n";for(var i=0;i\n"}return a+=" \n
\n"}(f,u)}return e=(e=(e=(e=b.converter._dispatch("tables.before",e,v,b)).replace(/\\(\|)/g,y.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|\xa80)/gm,t)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|\xa80)/gm,t),e=b.converter._dispatch("tables.after",e,v,b)}),y.subParser("underline",function(e,t,a){return t.underline?(e=a.converter._dispatch("underline.before",e,t,a),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return""+t+""})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return""+t+""}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?""+t+"":e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?""+t+"":e})).replace(/(_)/g,y.helper.escapeCharactersCallback),e=a.converter._dispatch("underline.after",e,t,a)):e}),y.subParser("unescapeSpecialChars",function(e,t,a){return e=(e=a.converter._dispatch("unescapeSpecialChars.before",e,t,a)).replace(/\xa8E(\d+)E/g,function(e,t){var a=parseInt(t);return String.fromCharCode(a)}),e=a.converter._dispatch("unescapeSpecialChars.after",e,t,a)}),y.subParser("makeMarkdown.blockquote",function(e,t){var a="";if(e.hasChildNodes())for(var n=e.childNodes,r=n.length,i=0;i ")}),y.subParser("makeMarkdown.codeBlock",function(e,t){var a=e.getAttribute("language"),n=e.getAttribute("precodenum");return"```"+a+"\n"+t.preList[n]+"\n```"}),y.subParser("makeMarkdown.codeSpan",function(e){return"`"+e.innerHTML+"`"}),y.subParser("makeMarkdown.emphasis",function(e,t){var a="";if(e.hasChildNodes()){a+="*";for(var n=e.childNodes,r=n.length,i=0;i",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t}),y.subParser("makeMarkdown.links",function(e,t){var a="";if(e.hasChildNodes()&&e.hasAttribute("href")){var n=e.childNodes,r=n.length;a="[";for(var i=0;i",e.hasAttribute("title")&&(a+=' "'+e.getAttribute("title")+'"'),a+=")"}return a}),y.subParser("makeMarkdown.list",function(e,t,a){var n="";if(!e.hasChildNodes())return"";for(var r=e.childNodes,i=r.length,o=e.getAttribute("start")||1,s=0;s"+t.preList[a]+""}),y.subParser("makeMarkdown.strikethrough",function(e,t){var a="";if(e.hasChildNodes()){a+="~~";for(var n=e.childNodes,r=n.length,i=0;itr>th"),s=e.querySelectorAll("tbody>tr");for(a=0;a/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}),St.PLUGINS.markdown=function(o){var s,l,a,n,r,c=o.$,i=!1,d="",f="",p="",u="",g=[],h=[],m="",v=null,b=null;function E(e){e=function u(e){var t=e,a=e.match(/(\[\^(.+?)\])[^:]/g),n=e.match(/(\[\^(.+?)\]:)/g);if(a&&n){a.forEach(function(e,t,a){a[t]=a[t].substring(0,a[t].length-1)}),a=a.filter(function(e,t){return a.indexOf(e)===t}),n=n.filter(function(e,t){return n.indexOf(e)===t});for(var r=1,i=0;i'),-1').concat(r,""))).indexOf(a[i])?1:0,l=0;s&&(l++,t=t.replace(n[i].substring(0,n[i].length-1),'').concat(r,":").concat(l,"")),s=-1\u21a9');for(var p=l;0!=l;)f+='\u21a9'),l--;f+="",t=t+o+'')+f,r++}}}1!=r&&(t+="
")}return e=t}(e=function s(e){for(var t=/^[A-Za-z0-9]/g,a=/^:[ ]{1}(.+?)+/g,n=e.split("\n"),r=n,i=n.length-1,o=1;o"+n[o-1]+" ",r[o]=""+n[o].substring(2)+" "):null!==n[o-1].match(t)&&(o"+n[o-1]+" ",r[o]=""+n[o].substring(2)+" "):o"+n[o].substring(2)+"":r[o]=""+n[o].substring(2)+" ");return e=r.join("\n")}(e=function t(e){var n=e.indexOf("```"),r=0;-1 \n"})}(e=function a(e){return-1<(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.split("").join("\n")).split("").join("\n")).replace(/(<([^>]+)>)/gi,"")).replace(/>/gi,">")).replace(/</gi,"<")).split(""").join('"')).split("&").join("&")).split("'").join("'")).split(" ").join(" ")).replace(/\|+\n[^\|]/g,function(e){return e.replace("\n","\n\n")})).indexOf("Powered by Froala Editor")&&(e=e.replace("Powered by Froala Editor","")),e}(e)))),e=n.makeHtml(e),e=o.clean.html(e),o.$wp.find(l)[0].innerHTML=e}return{_init:function t(){if(function e(){o.events.on("contentChanged",function(){i&&E(o.html.get(!1,!1))},!0),o.events.$on(c(o.o_win),"resize",function(){i&&(l[0].style.width=o.$wp[0].clientWidth-o.$el[0].clientWidth+2+"px")}),o.events.on("paste.afterCleanup",function(e){if(i){var t=o.doc.createElement("div");t.innerHTML=e;for(var a,n=t.querySelectorAll("img"),r=0;r /g,">").replace(/"/g,""").replace(/'/g,"'");e=t.innerHTML}return e})}(),n=new y.Converter({strikethrough:!0,tables:!0,tablesHeaderId:!0,simpleLineBreaks:!0,ghCodeBlocks:!0,tasklists:!0,customizedHeaderId:!0,requireSpaceBeforeHeadingText:!0,underline:!0}),o.$tb&&(a=o.$tb.find('.fr-command[data-cmd="markdown"]')),!o.$wp)return!1},refresh:function _(e){var t=i;e.toggleClass("fr-active",t).attr("aria-pressed",t)},toggle:function w(){i?function e(){f=o.html.get(!0,!0),o.opts.pastePlain=!1,o.$el.removeClass("fr-markdown-editor"),o.$wp.append(r[0].firstChild),c(r).remove(),o.$wp.find(s).remove(),o.$wp.find(l).remove(),o.$wp[0].lastChild.after(o.$placeholder[0]),o.$el.removeAttr("style"),o.size.refresh(),o.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(a).removeClass("fr-disabled").attr("aria-disabled",!1),o.opts.iframe&&(o.$el=b,o.$wp=v,Object.keys(h).map(function(e){o.$el[0].setAttribute(e,h[e]),"class"!=e&&m[0].removeAttribute(e)}),o.$el[0].style.removeProperty("padding")),o.html.set(d),o.opts.iframe&&(o.$el=b,o.$wp=v,o.$placeholder=null,o.placeholder.show(),o.placeholder.refresh())}():function t(){var i;d=o.html.get(!0,!0),o.html.set(f),o.opts.pastePlain=!0,o.opts.iframe?(o.$el[0].removeAttribute("spellcheck"),Array.from(o.$el[0].attributes).map(function(e){var t=e.name,a=e.value;return"class"!=t&&(g[t]=a),h[t]=a,o.$el[0].removeAttribute(t)}),o.$el[0].style.padding=0,o.$el[0].innerHTML="",o.$placeholder.hide()):o.$el.addClass("fr-markdown-editor"),r=c(''),o.opts.heightMin?r.css("min-height","".concat(o.opts.heightMin,"px")):r.css("min-height","200px"),o.opts.heightMax?(r.css("maxHeight","".concat(o.opts.heightMax,"px")),r.css("overflow","auto")):(r.css("maxHeight",""),r.css("overflow","")),o.opts.height&&(r.css("height","".concat(o.opts.height,"px")),r.css("overflow","auto"),r.css("minHeight",o.opts.height-o.helpers.getPX(o.$el.css("padding-top"))-o.helpers.getPX(o.$el.css("padding-bottom")))),o.opts.iframe?(u=c(''),p=c(''),m=c('
'),Object.keys(g).map(function(e){return m[0].setAttribute(e,g[e])}),f&&(m[0].innerHTML=f),r[0].appendChild(m[0]),p[0].appendChild(r[0]),u[0].appendChild(p[0]),1==c(o.$html.find("body")[0]).find(".fr-box").length?(o.$el.prevAll().filter(function(e){return!["CodeMirror cm-s-default CodeMirror-wrap","fr-code"].includes(e.className)}).remove(),o.$el[0].appendChild(r[0])):(o.$el[0].appendChild(u[0]),v=o.$wp,o.$wp=p),b=o.$el,o.$el=m):(o.$wp.append(r),r[0].appendChild(o.$el[0])),s=c(''),c(r).append(s[0]),l=c(''),c(r).append(l[0]),c(r).after(o.$placeholder[0]),o.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(a).filter(function(){return"fullscreen"!==c(this).data("cmd")&&"moreMisc"!==c(this).data("cmd")}).addClass("fr-disabled").attr("aria-disabled",!0),c(s).on("mousedown touchstart",function(e){i={e:e,offsetLeft:s[0].offsetLeft,offsetTop:s[0].offsetTop,firstWidth:o.$el[0].offsetWidth,secondWidth:l[0].offsetWidth};var a=function a(e){o.selection.clear();var t={x:e.clientX-i.e.clientX,y:e.clientY-i.e.clientY};t.x=Math.min(Math.max(t.x,-i.firstWidth),i.secondWidth),i.firstWidth+t.x<125||i.secondWidth-t.x<125||(s[0].style.left=i.offsetLeft+t.x+"px",o.$el[0].style.width=i.firstWidth+t.x+"px",l[0].style.width=i.secondWidth-t.x+"px")},n=function n(e){o.selection.clear();var t={x:e.changedTouches[0].clientX-i.e.changedTouches[0].clientX,y:e.changedTouches[0].clientY-i.e.changedTouches[0].clientY};t.x=Math.min(Math.max(t.x,-i.firstWidth),i.secondWidth),i.firstWidth+t.x<100||i.secondWidth-t.x<100||(s[0].style.left=i.offsetLeft+t.x+"px",o.$el[0].style.width=i.firstWidth+t.x+"px",l[0].style.width=i.secondWidth-t.x+"px")},t=function t(){document.onmousemove=document.onmouseup=null,document.ontouchmove=document.ontouchend=null},r=function r(){o.$doc[0].onmousemove=o.$doc[0].onmouseup=null,o.$doc[0].ontouchmove=o.$doc[0].ontouchend=null};o.opts.iframe&&o.markdown.isEnabled?(o.$doc[0].onmousemove=a,o.$doc[0].ontouchmove=n,o.$doc[0].onmouseup=r,o.$doc[0].ontouchend=r):(document.onmousemove=a,document.ontouchmove=n,document.onmouseup=t,document.ontouchend=t)}),E(f)}(),i=!i},isEnabled:function e(){return i}}},St.DefineIcon("markdown",{NAME:"markdown",SVG_KEY:"markdown"}),St.RegisterCommand("markdown",{title:"Markdown",undo:!1,focus:!1,toggle:!0,forcedRefresh:!0,accessibilityFocus:!0,callback:function(){this.markdown.toggle()},refresh:function(e){this.markdown.refresh(e)},plugin:"markdown"}),Object.assign(St.DEFAULTS,{wordCounterMax:-1,wordCounterCount:!0}),St.PLUGINS.wordCounter=function(p){var a,t=p.$;function u(){var e=p.el.innerText.toString();e=(e=(e=(e=(e=(e=(e=(e=e.replace(/(^\s*)|(\s*$)/gi," ")).replace(/\u00a0/g," ")).replace(/[ ]{2,}/gi," ")).replace(/\n /,"\n")).replace(/[\u200A\u200C-\u200D\uFEFF\u202F\u2000-\u2009\u205F\u3000\u1680\u00A0\u0020]/g," ")).replace(/[\u200B]/g,"")).replace(/\t+/g," ")).split(" ").join("\n");var t=p.$el.find(".fr-pagebreak"),a=e.split(/\r?\n/),n=0;return a.forEach(function(e){0<(e=e.replace(/\s/g,"")).length&&n++}),n-2*t.length}function e(e){var t=!1;if(p.opts.wordCounterMax<0)return!0;if(u()p.opts.wordCounterMax&&(p.keys.isCharacter(a)||a===St.KEYCODE.ENTER)&&(t=!0),!(!p.keys.ctrlKey(e)&&t||a===St.KEYCODE.IME)||(e.preventDefault(),e.stopPropagation(),p.events.trigger("wordCounter.exceeded"),!1)}function n(){if(p.opts.wordCounterCount){var e=u()+(0").html(e).text().split(" ").length+u()<=p.opts.wordCounterMax?e:(p.events.trigger("wordCounter.exceeded"),"")}return{_init:function i(){return!!p.$wp&&!!p.opts.wordCounterCount&&((a=t(document.createElement("span")).attr("class","fr-counter fr-wCounter")).css("bottom",p.$wp.css("border-bottom-width")),p.$second_tb?p.$second_tb.append(a):p.$wp.append(a),p.events.on("keydown",e,!0),p.events.on("paste.afterCleanup",r),p.events.on("keyup contentChanged input",function(){p.events.trigger("wordCounter.update")}),p.events.on("wordCounter.update",n),p.events.trigger("wordCounter.update"),void p.events.on("destroy",function(){t(p.o_win).off("resize.char".concat(p.id)),a.removeData().remove(),a=null}))},wordCount:u}},Object.assign(St.POPUP_TEMPLATES,{"filestackPlugin.error":"[_UPLOAD_LAYER_]"}),St.FILESTACK_PICKER_OPTIONS_MEDIA_MAX_SUPPORTED=[".pdf",".docx",".ppt",".pptx",".doc",".xlsx",".xls",".csv",".txt","image/jpeg","image/png","image/jpg","image/gif","image/webp","video/*","audio/*","mp3"],St.REQUIRED_PLUGINS=["image","video","file","filesManager"],St.FILESTACK_PICKER_OPTIONS_IMAGE_ONLY_SUPPORTED=["image/jpeg","image/png","image/jpg","image/gif","image/webp"],St.FILESTACK_DEFAULT_ACCEPT_FILE_TYPES=[".pdf",".docx",".ppt",".pptx",".doc",".xlsx",".xls",".csv",".txt"],St.FILESTACK_PICKER_OPTIONS_VIDEO_ONLY_SUPPORTED=["video/*"],St.FILESTACK_PICKER_OPTIONS_FROMSOURCES_MAX_SUPPORTED=["local_file_system","imagesearch","url","googledrive","facebook","instagram","dropbox"],St.FILESTACK_PICKER_DEFAULT_OPTIONS={displayMode:"overlay",uploadInBackground:!1,stage:{cname:"stage.filestackapi.com"}},Object.assign(St.DEFAULTS,{filestackOptions:{}}),St.FILE_STACK_URL_PART="filestack",St.PLUGINS.filestack=function(f){var r,p,t=["pdf","msword","vnd.openxmlformats-officedocument.wordprocessingml.document","vnd.ms-excel","vnd.openxmlformats-officedocument.spreadsheetml.sheet","vnd.ms-powerpoint","vnd.openxmlformats-officedocument.presentationml.presentation","csv","plain","ogg"],u=1,o=4,g=5,h=6,s=7,l={};function m(e,t,a){v(a?f.language.translate(l[e])+"\nResponse: "+JSON.stringify(a):f.language.translate(l[e]),t)}function v(e,t,a,n){var r;if((r=f.popups.get("filestackPlugin.error"))||(r=d(e)),a&&(r.find(".fr-image-progress-bar-layer").addClass("fr-active"),r.find(".fr-error-message").addClass("fr-layer"),r.find(".fr-buttons").hide()),!!f.$tb){var i;"openFilePicker"===t?i="openFilePicker":"openFilePickerReplaceImageOnly"===t||"openFilePickerImage"===t?i="insertImage":"openFilePickerReplaceVideoOnly"===t||"openFilePickerVideo"===t?i="insertVideo":"openFilePickerVideoOnly"===t?i="openFilePickerVideoOnly":"openFilePickerImageOnly"===t?i="openFilePickerImageOnly":"openFilePickerFile"===t&&(i="openFilePickerFile");var o=f.$tb.find(".fr-command[data-cmd='".concat(i,"']"));if(a)f.popups.show("filestackPlugin.error",n.x,n.y);else if(!r.hasClass("fr-active")&&(f.popups.refresh("filestackPlugin.error"),f.popups.setContainer("filestackPlugin.error",f.$tb),o.isVisible()||f.opts.toolbarInline)){var s=f.opts.toolbarInline&&["openFilePickerImage","openFilePickerVideo"].includes(t)?f.$(".fr-popup")[0].style:f.button.getPosition(o),l=s.left,c=s.top;f.popups.show("filestackPlugin.error",l,c,o.outerHeight())}}}function b(){var e="",t=function a(){var t=[];return St.REQUIRED_PLUGINS.forEach(function(e){f.opts.pluginsEnabled.indexOf(e)<0&&t.push(e.charAt(0).toUpperCase()+e.slice(1))}),t}();return e=t.join(", "),1\n \n \n "):""),n={upload_layer:"".concat('',"\n \n \n ").concat(a,"\n ")},r=f.popups.create("filestackPlugin.error",n);if(t){var i=r.find(".fr-plugins-enable")[0],o=r.find(".fr-plugins-cancel")[0];i.addEventListener("click",function(e){!function t(){St.REQUIRED_PLUGINS.forEach(function(e){f.opts.pluginsEnabled.indexOf(e)<0&&f.opts.pluginsEnabled.push(e)})}(),function a(e){for(var t in e)if(!f[t]){if(St.PLUGINS[t]&&f.opts.pluginsEnabled.indexOf(t)<0)continue;f[t]=new e[t](f),f[t]._init&&f[t]._init()}}(St.PLUGINS),R(),f.events.trigger("filestack.pluginsEnabled"),f.popups.hide("filestackPlugin.error"),y(),e.preventDefault()}),o.addEventListener("click",function(e){f.popups.hide("filestackPlugin.error"),y(),e.preventDefault()})}else{var s=r.find(".fr-plugins-ok")[0];s&&s.addEventListener("click",function(e){f.popups.hide("filestackPlugin.error"),e.preventDefault()})}return r}function E(){var t=!0;return St.REQUIRED_PLUGINS.forEach(function(e){f.opts.pluginsEnabled.indexOf(e)<0&&(t=!1)}),t}l[u]="Filestack api is missing",l[2]="The Filestack options are missing. Please check filestackOptions",l[3]="The Filestack picker is missing. Please check filestackOption",l[o]="Image upload to filestack failed while processing the request",l[g]="Filestack plugin is currently not supported on this browser",l[h]="The selected media types are not supported",l[s]="The selected source types are not supported by Filestack",l[8]="Error opening Filestack picker due to invalid picker parameters",l[9]="This image is not supported for image transformation",l[10]="The Filestack client is not created yet";var _=f.opts.filestackOptions.filestackAPI;if(_)try{p=f.opts.filestackOptions.staging?filestack.init(_,St.FILESTACK_PICKER_DEFAULT_OPTIONS.stage):filestack.init(_,St.FILESTACK_PICKER_DEFAULT_OPTIONS)}catch(L){0===!Object.keys(f.opts.filestackOptions).length&&m(10)}else;function w(){var e=navigator.userAgent,t=f||"",a=t.helpers,n=t.browser;if(a.isMac()&&n.mozilla)return!1;var r=-1!=e.indexOf("Windows NT 10.")||-1!=e.indexOf("Windows NT 7."),i=e.match(/(chrome|safari|firefox|trident(?=\/))\/?\s*(\d+)/i)[2]||[],o=null;return 0<=e.indexOf("Android")&&(o=parseFloat(e.slice(e.indexOf("Android")+8))),!!((a.isMac()||a.isIOS())&&12 '}),St.DefineIcon("videoFilestackOnly",{template:"svgMultiplePath",PATHS:' '}),St.RegisterCommand("openFilePicker",{type:"button",icon:"filestackIcon",title:"Open Filestack File Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePicker"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePicker")},plugin:"filestack"}),St.RegisterCommand("openFilePickerImageOnly",{type:"button",icon:"imageFilestackOnly",title:"Open Filestack Image Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerImageOnly"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerImageOnly",this.image&&this.image.get())},plugin:"filestack"}),St.RegisterCommand("openFilePickerImage",{type:"button",icon:"filestackIcon",title:"Open Filestack Image Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerImage"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerImage",this.image&&this.image.get())},plugin:"filestack"}),St.RegisterCommand("openFilePickerReplaceImageOnly",{type:"button",icon:"filestackIconAdd",title:"Open Filestack File Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerReplaceImageOnly"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerReplaceImageOnly",this.image&&this.image.get())},plugin:"filestack"}),St.RegisterCommand("openFilePickerVideoOnly",{type:"button",icon:"videoFilestackOnly",title:"Open Filestack Video Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerVideoOnly"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerVideoOnly",null,this.video&&this.video.get())},plugin:"filestack"}),St.RegisterCommand("openFilePickerVideo",{type:"button",icon:"filestackIcon",title:"Open Filestack Video Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerVideo"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerVideo",null,this.video&&this.video.get())},plugin:"filestack"}),St.RegisterCommand("openFilePickerReplaceVideoOnly",{type:"button",icon:"filestackIconAdd",title:"Open Filestack File Picker",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerReplaceVideoOnly"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerReplaceVideoOnly",null,this.video&&this.video.get())},plugin:"filestack"}),St.RegisterCommand("filestackIcon",{type:"button",icon:"imageTransformations",title:"Image Transformations",plugin:"filestack",callback:function(){var e=!1,t=this.image.get(0)[0];(t&&t.currentSrc&&(e=t.currentSrc.includes(St.FILE_STACK_URL_PART)&&!t.currentSrc.includes("blob:")),e)?(this.button.getButtons('button[data-cmd="filestackIcon"]').addClass("fr-filestack-active"),this.events.trigger("filestack.imageTransformation.click")):this.events.trigger("filestack.imageTransformation.error")}}),St.RegisterCommand("openFilePickerFile",{type:"button",icon:"filestackIcon",title:"Open Filestack Upload File",callback:function(){this.button.getButtons('button[data-cmd="openFilePickerFile"]').addClass("fr-filestack-active"),this.filestack.showFilestackPopup("openFilePickerFile")},plugin:"filestack"})});